Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update core #20

Merged
merged 2 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<Authors>EasyMicroservices</Authors>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>0.0.0.15</Version>
<Version>0.0.0.16</Version>
<Description>ordering UI compoents.</Description>
<Copyright>[email protected]</Copyright>
<PackageTags>component,microcomponent,ui,core,order,ordering</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@
<MudStack>
<MudPaper Class="pa-4">
<MudStack Spacing="4">
<MudTextField @bind-Value="viewModel.Name" Label="@viewModel.GetLanguage("Name")" Variant="Variant.Text"></MudTextField>
<MudTextField @bind-Value="viewModel.Name" Label="@viewModel.GetInnerTranslatedByKey("Name")" Variant="Variant.Text"></MudTextField>
</MudStack>
</MudPaper>
<MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Save" Color="Color.Info" Disabled="viewModel.IsBusy" OnClick="(arg) => viewModel.SaveCommand.Execute(null)">
@if (viewModel.IsBusy)
{
<MudProgressCircular Class="ms-n1" Size="Size.Small" Indeterminate="true" />
<MudText Class="ms-2">@viewModel.GetLanguage("Saving")</MudText>
<MudText Class="ms-2">@viewModel.GetInnerTranslatedByKey("Saving")</MudText>
}
else
{
<MudText>@viewModel.GetLanguage("Save")</MudText>
<MudText>@viewModel.GetInnerTranslatedByKey("Save")</MudText>
}
</MudButton>
</MudStack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,29 @@
<ToolBarContent>
<MudStack AlignItems="AlignItems.Center" Row="true" Spacing="5">
<MudFab Color="Color.Primary" StartIcon="@Icons.Material.Filled.Add" OnClick="(arg) => ShowAddDialog()" />
<MudText Typo="Typo.h6" mar>@viewModel.GetLanguage("Ordering_CountingUnit_Title")</MudText>
<MudText Typo="Typo.h6" mar>@viewModel.GetInnerTranslatedByKey("Ordering_CountingUnit_Title")</MudText>
</MudStack>

<MudSpacer />
<MudTextField @bind-Value="_searchString" Placeholder="@viewModel.GetLanguage("Search")" Adornment="Adornment.Start" Immediate="true"
<MudTextField @bind-Value="_searchString" Placeholder="@viewModel.GetInnerTranslatedByKey("Search")" Adornment="Adornment.Start" Immediate="true"
AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" Class="mt-0"></MudTextField>
<MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Search" Color="Color.Primary" Disabled="viewModel.IsBusy" OnClick="(arg) => viewModel.SearchCommand.Execute(null)">
@if (viewModel.IsBusy)
{
<MudProgressCircular Class="ms-n1" Size="Size.Small" Indeterminate="true" />
<MudText Class="ms-2">@viewModel.GetLanguage("Processing")</MudText>
<MudText Class="ms-2">@viewModel.GetInnerTranslatedByKey("Processing")</MudText>
}
else
{
<MudText>@viewModel.GetLanguage("Search")</MudText>
<MudText>@viewModel.GetInnerTranslatedByKey("Search")</MudText>
}
</MudButton>
</ToolBarContent>
<Columns>
<SelectColumn T="CountingUnitContract" />
<PropertyColumn Property="x => x.Id" Title="@viewModel.GetLanguage("Id")" />
<PropertyColumn Property="x => x.Name" Title="@viewModel.GetLanguage("Name")" />
<TemplateColumn CellClass="d-flex justify-end" Title="@viewModel.GetLanguage("Actions")">
<PropertyColumn Property="x => x.Id" Title="@viewModel.GetInnerTranslatedByKey("Id")" />
<PropertyColumn Property="x => x.Name" Title="@viewModel.GetInnerTranslatedByKey("Name")" />
<TemplateColumn CellClass="d-flex justify-end" Title="@viewModel.GetInnerTranslatedByKey("Actions")">
<CellTemplate>
<MudIconButton Size="@Size.Small" Icon="@Icons.Material.Outlined.Edit" OnClick="(arg) => ShowUpdateDialog(context.Item)" />
<MudIconButton Size="@Size.Small" Icon="@Icons.Material.Outlined.Delete" Color="Color.Error" OnClick="(arg) => ShowDeleteDialog(context.Item)" />
Expand All @@ -61,26 +61,26 @@
<MudDialog Class="@DialogClass" @ref="deleteDialog" @bind-IsVisible="IsShowDeleteDialog">
<TitleContent>
<MudText>
@viewModel.GetLanguage("Ordering_DeleteCountingUnit_Title")
@viewModel.GetInnerTranslatedByKey("Ordering_DeleteCountingUnit_Title")
</MudText>
</TitleContent>
<DialogContent>
@viewModel.GetLanguage("DeleteQuestion_Content")
@viewModel.GetInnerTranslatedByKey("DeleteQuestion_Content")
</DialogContent>
<DialogActions>
@if (!viewModel.IsBusy)
{
<MudButton OnClick="() => deleteDialog.Close()">@viewModel.GetLanguage("Cancel")</MudButton>
<MudButton OnClick="() => deleteDialog.Close()">@viewModel.GetInnerTranslatedByKey("Cancel")</MudButton>
}
<MudButton Color="Color.Error" Variant="Variant.Filled" Disabled="viewModel.IsBusy" OnClick="()=>DoDelete()">
@if (viewModel.IsBusy)
{
<MudProgressCircular Class="ms-n1" Size="Size.Small" Indeterminate="true" />
<MudText Class="ms-2">@viewModel.GetLanguage("Deleting")</MudText>
<MudText Class="ms-2">@viewModel.GetInnerTranslatedByKey("Deleting")</MudText>
}
else
{
<MudText>@viewModel.GetLanguage("Delete")</MudText>
<MudText>@viewModel.GetInnerTranslatedByKey("Delete")</MudText>
}
</MudButton>
</DialogActions>
Expand Down Expand Up @@ -138,16 +138,16 @@

void ShowUpdateDialog(CountingUnitContract countingUnitContract)
{
_AddOrUpdateTitle = @viewModel.GetLanguage("Ordering_UpdateCountingUnit_Title");
_AddOrUpdatedMessage = @viewModel.GetLanguage("Ordering_UpdateCountingUnit_Message");
_AddOrUpdateTitle = @viewModel.GetInnerTranslatedByKey("Ordering_UpdateCountingUnit_Title");
_AddOrUpdatedMessage = @viewModel.GetInnerTranslatedByKey("Ordering_UpdateCountingUnit_Message");
addOrUpdateCountingUnitView.ViewModel.UpdateCountingUnitContract = countingUnitContract;
ShowAddOrUpdateDialog();
}

void ShowAddDialog()
{
_AddOrUpdateTitle = @viewModel.GetLanguage("Ordering_AddCountingUnit_Title");
_AddOrUpdatedMessage = @viewModel.GetLanguage("Ordering_AddCountingUnit_Message");
_AddOrUpdateTitle = @viewModel.GetInnerTranslatedByKey("Ordering_AddCountingUnit_Title");
_AddOrUpdatedMessage = @viewModel.GetInnerTranslatedByKey("Ordering_AddCountingUnit_Message");
addOrUpdateCountingUnitView.ViewModel.Clear();
ShowAddOrUpdateDialog();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
<MudStack>
<MudPaper Class="pa-4">
<MudStack Spacing="4">
<MudTextField @bind-Value="viewModel.Name" Label="@viewModel.GetLanguage("Name")" Variant="Variant.Text"></MudTextField>
<MudTextField @bind-Value="viewModel.PriceAmount" Label="@viewModel.GetLanguage("PriceAmount")" Variant="Variant.Text"></MudTextField>
<MudTextField @bind-Value="viewModel.Name" Label="@viewModel.GetInnerTranslatedByKey("Name")" Variant="Variant.Text"></MudTextField>
<MudTextField @bind-Value="viewModel.PriceAmount" Label="@viewModel.GetInnerTranslatedByKey("PriceAmount")" Variant="Variant.Text"></MudTextField>
</MudStack>
</MudPaper>
<MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Save" Color="Color.Info" Disabled="viewModel.IsBusy" OnClick="(arg) => viewModel.SaveCommand.Execute(null)">
@if (viewModel.IsBusy)
{
<MudProgressCircular Class="ms-n1" Size="Size.Small" Indeterminate="true" />
<MudText Class="ms-2">@viewModel.GetLanguage("Saving")</MudText>
<MudText Class="ms-2">@viewModel.GetInnerTranslatedByKey("Saving")</MudText>
}
else
{
<MudText>@viewModel.GetLanguage("Save")</MudText>
<MudText>@viewModel.GetInnerTranslatedByKey("Save")</MudText>
}
</MudButton>
</MudStack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,27 @@
<MudDataGrid T="OrderContract" MultiSelection="true" Items="viewModel.Orders" SortMode="SortMode.Multiple" Filterable="true"
Hideable="true">
<ToolBarContent>
<MudText Typo="Typo.h6">@viewModel.GetLanguage("Orders")</MudText>
<MudText Typo="Typo.h6">@viewModel.GetInnerTranslatedByKey("Orders")</MudText>
<MudSpacer />
<MudTextField @bind-Value="_searchString" Placeholder="@viewModel.GetLanguage("Search")" Adornment="Adornment.Start" Immediate="true"
<MudTextField @bind-Value="_searchString" Placeholder="@viewModel.GetInnerTranslatedByKey("Search")" Adornment="Adornment.Start" Immediate="true"
AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" Class="mt-0"></MudTextField>
<MudButton Variant="Variant.Filled" StartIcon="@Icons.Material.Filled.Search" Color="Color.Info" Disabled="viewModel.IsBusy" OnClick="(arg) => viewModel.SearchCommand.Execute(null)">
@if (viewModel.IsBusy)
{
<MudProgressCircular Class="ms-n1" Size="Size.Small" Indeterminate="true" />
<MudText Class="ms-2">@viewModel.GetLanguage("Processing")</MudText>
<MudText Class="ms-2">@viewModel.GetInnerTranslatedByKey("Processing")</MudText>
}
else
{
<MudText>@viewModel.GetLanguage("Search")</MudText>
<MudText>@viewModel.GetInnerTranslatedByKey("Search")</MudText>
}
</MudButton>
</ToolBarContent>
<Columns>
<SelectColumn T="OrderContract" />
<PropertyColumn Property="x => x.Id" Title="@viewModel.GetLanguage("Id")" />
<PropertyColumn Property="x => x.Name" Title="@viewModel.GetLanguage("Name")" />
<PropertyColumn Property="x => x.Prices.Select(x => x.Amount).DefaultIfEmpty(0).FirstOrDefault()" Title="@viewModel.GetLanguage("Amount")" />
<PropertyColumn Property="x => x.Id" Title="@viewModel.GetInnerTranslatedByKey("Id")" />
<PropertyColumn Property="x => x.Name" Title="@viewModel.GetInnerTranslatedByKey("Name")" />
<PropertyColumn Property="x => x.Prices.Select(x => x.Amount).DefaultIfEmpty(0).FirstOrDefault()" Title="@viewModel.GetInnerTranslatedByKey("Amount")" />
@* <PropertyColumn Property="x => x.Product.Name" Title="Product Name" /> *@
<TemplateColumn CellClass="d-flex justify-end">
<CellTemplate>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@
<MudPaper Class="pa-4">
<MudStack Spacing="4">

<MudTextField @bind-Value="viewModel.Name" Label="@viewModel.GetLanguage("Name")" Variant="Variant.Text"></MudTextField>
<MudTextField @bind-Value="viewModel.PriceAmount" Label="@viewModel.GetLanguage("Ordering_ValueAddedTax_Title")" Variant="Variant.Text"></MudTextField>
<MudTextField @bind-Value="viewModel.ExternalServiceIdentifier" Label="@viewModel.GetLanguage("Ordering_ExternalServiceIdentifier_Title")" Variant="Variant.Text"></MudTextField>
<MudSelect @bind-Value="viewModel.AmountType" Label="@viewModel.GetLanguage("Ordering_AmountType_Title")" OpenIcon="@Icons.Material.Filled.LocalDrink" AdornmentColor="Color.Secondary">
<MudTextField @bind-Value="viewModel.Name" Label="@viewModel.GetInnerTranslatedByKey("Name")" Variant="Variant.Text"></MudTextField>
<MudTextField @bind-Value="viewModel.PriceAmount" Label="@viewModel.GetInnerTranslatedByKey("Ordering_ValueAddedTax_Title")" Variant="Variant.Text"></MudTextField>
<MudTextField @bind-Value="viewModel.ExternalServiceIdentifier" Label="@viewModel.GetInnerTranslatedByKey("Ordering_ExternalServiceIdentifier_Title")" Variant="Variant.Text"></MudTextField>
<MudSelect @bind-Value="viewModel.AmountType" Label="@viewModel.GetInnerTranslatedByKey("Ordering_AmountType_Title")" OpenIcon="@Icons.Material.Filled.LocalDrink" AdornmentColor="Color.Secondary">
@foreach (AmountType item in Enum.GetValues<AmountType>())
{
if ((int)item < 6)
continue;
<MudSelectItem Value="@item">@viewModel.GetLanguage($"Ordering_{item.ToString()}_Title")</MudSelectItem>
<MudSelectItem Value="@item">@viewModel.GetInnerTranslatedByKey($"Ordering_{item.ToString()}_Title")</MudSelectItem>
}
</MudSelect>
@if (viewModel.CountingUnits is not null)
{
<MudSelect T="long" @bind-Value="viewModel.SelectedCountingUnitId" Label="@viewModel.GetLanguage("Ordering_CountingUnitType_Title")" Variant="Variant.Outlined" AnchorOrigin="Origin.BottomCenter">
<MudSelect T="long" @bind-Value="viewModel.SelectedCountingUnitId" Label="@viewModel.GetInnerTranslatedByKey("Ordering_CountingUnitType_Title")" Variant="Variant.Outlined" AnchorOrigin="Origin.BottomCenter">
@foreach (var item in viewModel.CountingUnits)
{
<MudSelectItem Value="@item.Id">@item.Name</MudSelectItem>
Expand All @@ -36,11 +36,11 @@
@if (viewModel.IsBusy)
{
<MudProgressCircular Class="ms-n1" Size="Size.Small" Indeterminate="true" />
<MudText Class="ms-2">@viewModel.GetLanguage("Saving")</MudText>
<MudText Class="ms-2">@viewModel.GetInnerTranslatedByKey("Saving")</MudText>
}
else
{
<MudText>@viewModel.GetLanguage("Save")</MudText>
<MudText>@viewModel.GetInnerTranslatedByKey("Save")</MudText>
}
</MudButton>
</MudStack>
Expand Down
Loading
Loading