Skip to content

Commit

Permalink
#382 - Rename OutcomeCard to ExpenseCard.
Browse files Browse the repository at this point in the history
  • Loading branch information
maraf committed Jun 9, 2021
1 parent 4c7528a commit 379d418
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace Money.Components
{
public partial class OutcomeCard
public partial class ExpenseCard
{
public interface IContext
{
Expand Down
14 changes: 7 additions & 7 deletions src/Money.Blazor.Host/Components/ExpenseCardContext.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace Money.Components
{
public partial class ExpenseCardContext : OutcomeCard.IContext
public partial class ExpenseCardContext : ExpenseCard.IContext
{
[Inject]
public ICommandDispatcher Commands { get; set; }
Expand All @@ -26,20 +26,20 @@ public partial class ExpenseCardContext : OutcomeCard.IContext

#region OutcomeCard.IContext

CurrencyFormatter OutcomeCard.IContext.CurrencyFormatter => currencyFormatter;
CurrencyFormatter ExpenseCard.IContext.CurrencyFormatter => currencyFormatter;

bool OutcomeCard.IContext.HasEdit => true;
bool ExpenseCard.IContext.HasEdit => true;

void OutcomeCard.IContext.EditAmount(OutcomeOverviewModel model)
void ExpenseCard.IContext.EditAmount(OutcomeOverviewModel model)
=> OnActionClick(model, AmountEditModal);

void OutcomeCard.IContext.EditDescription(OutcomeOverviewModel model)
void ExpenseCard.IContext.EditDescription(OutcomeOverviewModel model)
=> OnActionClick(model, DescriptionEditModal);

void OutcomeCard.IContext.EditWhen(OutcomeOverviewModel model)
void ExpenseCard.IContext.EditWhen(OutcomeOverviewModel model)
=> OnActionClick(model, WhenEditModal);

void OutcomeCard.IContext.Delete(OutcomeOverviewModel model)
void ExpenseCard.IContext.Delete(OutcomeOverviewModel model)
=> OnDeleteClick(model);

#endregion
Expand Down
2 changes: 1 addition & 1 deletion src/Money.Blazor.Host/Pages/ExpenseBag.razor
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<CascadingValue Value="@this">
@foreach (var model in Models)
{
<OutcomeCard Model="@model" />
<ExpenseCard Model="@model" />
}
</CascadingValue>
</div>
Expand Down
12 changes: 6 additions & 6 deletions src/Money.Blazor.Host/Pages/ExpenseBag.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
namespace Money.Pages
{
public partial class ExpenseBag : IDisposable,
OutcomeCard.IContext,
ExpenseCard.IContext,
IEventHandler<LocallyStoredExpenseCreated>,
IEventHandler<LocallyStoredExpensesPublished>
{
Expand Down Expand Up @@ -92,18 +92,18 @@ async Task IEventHandler<LocallyStoredExpensesPublished>.HandleAsync(LocallyStor
StateHasChanged();
}

bool OutcomeCard.IContext.HasEdit => true;
bool ExpenseCard.IContext.HasEdit => true;

void OutcomeCard.IContext.EditAmount(OutcomeOverviewModel model)
void ExpenseCard.IContext.EditAmount(OutcomeOverviewModel model)
{ }

void OutcomeCard.IContext.EditDescription(OutcomeOverviewModel model)
void ExpenseCard.IContext.EditDescription(OutcomeOverviewModel model)
{ }

void OutcomeCard.IContext.EditWhen(OutcomeOverviewModel model)
void ExpenseCard.IContext.EditWhen(OutcomeOverviewModel model)
{ }

async void OutcomeCard.IContext.Delete(OutcomeOverviewModel model)
async void ExpenseCard.IContext.Delete(OutcomeOverviewModel model)
{
Log.Debug($"Deleting '{model.Key}'.");

Expand Down
2 changes: 1 addition & 1 deletion src/Money.Blazor.Host/Pages/Overview.razor
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<ExpenseCardContext>
@foreach (var item in Items)
{
<OutcomeCard Model="@item" />
<ExpenseCard Model="@item" />
}
</ExpenseCardContext>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/Money.Blazor.Host/Pages/Search.razor
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<ExpenseCardContext>
@foreach (var item in Models)
{
<OutcomeCard Model="@item" />
<ExpenseCard Model="@item" />
}
</ExpenseCardContext>
</div>
Expand Down

0 comments on commit 379d418

Please sign in to comment.