improvements, fixes, etc...

This commit is contained in:
Loretta 2024-06-25 06:47:58 +02:00
parent 28c673b613
commit 7c25243fc1
4 changed files with 9 additions and 30 deletions

View File

@ -30,7 +30,7 @@
ShowFilterRow="true">
<Columns>
<DxGridCommandColumn NewButtonVisible="false" DeleteButtonVisible="false" Width="70" MinWidth="70" FixedPosition="GridColumnFixedPosition.Left" />
<DxGridDataColumn FieldName="Id" GroupIndex="0" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" />
<DxGridDataColumn FieldName="Id" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" />
<DxGridDataColumn FieldName="AddressText" />
<DxGridDataColumn FieldName="IsValid" Width="40" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" />
<DxGridDataColumn FieldName="IsHelper" Width="40" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" />

View File

@ -151,27 +151,9 @@
// //transferToModify.Driver = myModel.Driver;
// }
// }
//TODO: ne a teljes grid-et refresh-eljük, elég lenne csak az adott sort! - J.
await UpdateDataAsync();
}
async Task Grid_DataItemDeleting(GridDataItemDeletingEventArgs e)
{
//await NwindDataService.RemoveEmployeeAsync((EditableEmployee)e.DataItem);
//remove orderData from orderData array
_logger.Info("orderData deleted");
//await UpdateDataAsync();
}
async Task UpdateDataAsync()
{
//refresh grid
_logger.Info("orderData grid refreshed");
}
protected override async Task OnInitializedAsync()
protected override void OnInitialized()
{
_logger = new LoggerClient<ManageUserProductMappings>(LogWriters.ToArray());

View File

@ -9,6 +9,7 @@
@using TIAMWebApp.Shared.Application.Models.PageModels
@using TIAMWebApp.Shared.Application.Utility
@using AyCode.Services.Loggers
@using AyCode.Core
@layout AdminLayout
@inject IEnumerable<IAcLogWriterClientBase> LogWriters
@inject IStringLocalizer<TIAMResources> Localizer
@ -75,8 +76,8 @@
KeyFieldName="Id">
<Columns>
<DxGridCommandColumn NewButtonVisible="true" Width="8%" FixedPosition="GridColumnFixedPosition.Left" />
<DxGridDataColumn Name="@Localizer.GetString("Id")" FieldName="Id" ShowInColumnChooser="false" SortIndex="0" Visible="false" />
<DxGridCommandColumn Width="135" MinWidth="135" FixedPosition="GridColumnFixedPosition.Left" />
<DxGridDataColumn Name="@Localizer.GetString("Id")" FieldName="Id" SortIndex="0" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
<DxGridDataColumn Name="@Localizer.GetString("FullName")" FieldName="ProfileDto.FullName" />
<DxGridDataColumn Name="@Localizer.GetString("PhoneNumber")" FieldName="UserDto.PhoneNumber" />
<DxGridDataColumn Name="@Localizer.GetString("Created")" FieldName="UserDto.Created" />
@ -262,7 +263,6 @@
if (e.IsNew)
{
//add new orderData to orderData array
var registration = new RegistrationModel();
//TODO: Refractor to userDataService
@ -281,7 +281,7 @@
}
else
{
_logger.Info("orderData updated at id " + userModelDtoDetail.Id);
_logger.Info("UserData updated at id " + userModelDtoDetail.Id);
//await transferDataService.UpdateTransferAsync((TransferWizardModel)e.EditModel);
//modify transferData where transferData.Id == e.EditModel.Id
@ -304,17 +304,14 @@
async Task Grid_DataItemDeleting(GridDataItemDeletingEventArgs e)
{
//await NwindDataService.RemoveEmployeeAsync((EditableEmployee)e.DataItem);
//remove orderData from orderData array
_logger.Info("orderData deleted");
//await UpdateDataAsync();
_logger.Info("UserData deleted");
}
async Task UpdateDataAsync()
{
//refresh grid
UserData = (await UserDataService.GetUsersWithDetailsAsync()).OrderBy(x => x.ProfileDto?.Name).ToList();
_logger.Info("orderData grid refreshed");
_logger.Info("UserData grid refreshed");
}
protected override async Task OnInitializedAsync()

View File

@ -29,7 +29,7 @@
DetailExpandButtonDisplayMode="DetailExpandButtonDisplayMode">
<Columns>
<DxGridCommandColumn NewButtonVisible="false" DeleteButtonVisible="false" Width="70" MinWidth="70" FixedPosition="GridColumnFixedPosition.Left" />
<DxGridDataColumn FieldName="Id" GroupIndex="0" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
<DxGridDataColumn FieldName="Id" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
<DxGridDataColumn FieldName="Name" />
<DxGridDataColumn FieldName="FullName" />
<DxGridDataColumn FieldName="Created" Width="40%" />