improvements, fixes...

This commit is contained in:
Loretta 2024-07-06 08:24:00 +02:00
parent 0aaa907c20
commit 4beae9c801
6 changed files with 25 additions and 20 deletions

View File

@ -34,28 +34,26 @@
<div class="d-flex flex-column mb-4 pb-2"> <div class="d-flex flex-column mb-4 pb-2">
<CarDetailGridComponent DetailExpandButtonDisplayMode="GridDetailExpandButtonDisplayMode.Auto" ContextId="driverId" GetAllTag="SignalRTags.GetCarsForUserProductMapping"></CarDetailGridComponent> <CarGridComponent ContextId="DriverId" GetAllTag="SignalRTags.GetCarsForUserProductMapping"
NewButtonVisible="true" DeleteButtonVisible="false" EditButtonVisible="true" DetailExpandButtonDisplayMode="GridDetailExpandButtonDisplayMode.Never" />
</div> </div>
</div> </div>
</Animation> </Animation>
</div> </div>
<div class=" col-12 col-xl-6"> <div class=" col-12 col-xl-6">
</div> </div>
</div> </div>
</div> </div>
@code { @code {
[Parameter] public Guid driverId { get; set; } [Parameter] public Guid DriverId { get; set; }
private LoggerClient<DriverManageCars> _logger; private LoggerClient<DriverManageCars> _logger;
protected override async Task OnInitializedAsync() protected override void OnInitialized()
{ {
_logger = new LoggerClient<DriverManageCars>(LogWriters.ToArray()); _logger = new LoggerClient<DriverManageCars>(LogWriters.ToArray());

View File

@ -100,7 +100,7 @@
ShowFilterRow="true"> ShowFilterRow="true">
<Columns> <Columns>
<DxGridCommandColumn NewButtonVisible="false" DeleteButtonVisible="AcDomain.IsDeveloperVersion" Width="80" MinWidth="80" FixedPosition="GridColumnFixedPosition.Left" /> <DxGridCommandColumn Visible="false" Width="80" MinWidth="80" FixedPosition="GridColumnFixedPosition.Left" />
<DxGridDataColumn FieldName="Id" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" /> <DxGridDataColumn FieldName="Id" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
<DxGridDataColumn FieldName="OrderId" Caption="Order" SortIndex="1" SortOrder="GridColumnSortOrder.Descending" Width="70"> <DxGridDataColumn FieldName="OrderId" Caption="Order" SortIndex="1" SortOrder="GridColumnSortOrder.Descending" Width="70">
<CellDisplayTemplate> <CellDisplayTemplate>

View File

@ -50,8 +50,8 @@
</Columns> </Columns>
<DetailRowTemplate> <DetailRowTemplate>
@{ @{
// TODO: ide max a transferek kellenek, nem a UserProductMapping! - J.
<DxTabs> <DxTabs>
<DxTabPage Text="Driving permissions assigned"> <DxTabPage Text="Driving permissions assigned">
<UserProductMappingGridComponent GetAllTag="SignalRTags.GetUserProductMappingsById" ContextIds="new[] { ((Car)context.DataItem).UserProductMappingId }"/> <UserProductMappingGridComponent GetAllTag="SignalRTags.GetUserProductMappingsById" ContextIds="new[] { ((Car)context.DataItem).UserProductMappingId }"/>
</DxTabPage> </DxTabPage>

View File

@ -20,6 +20,7 @@
<CarGrid Logger="_logger" <CarGrid Logger="_logger"
GetAllMessageTag="GetAllTag" GetAllMessageTag="GetAllTag"
ContextIds="@(ContextId.IsNullOrEmpty() ? null : [ContextId])"
SignalRClient="AdminSignalRClient" SignalRClient="AdminSignalRClient"
PageSize="10" PageSize="10"
ValidationEnabled="false" ValidationEnabled="false"
@ -29,7 +30,8 @@
DetailExpandButtonDisplayMode="DetailExpandButtonDisplayMode" DetailExpandButtonDisplayMode="DetailExpandButtonDisplayMode"
ShowFilterRow="true"> ShowFilterRow="true">
<Columns> <Columns>
<DxGridCommandColumn NewButtonVisible="false" DeleteButtonVisible="false" Width="135" MinWidth="135" FixedPosition="GridColumnFixedPosition.Left" /> <DxGridCommandColumn Width="135" MinWidth="135" FixedPosition="GridColumnFixedPosition.Left"
Visible="CommandColumnVisible" NewButtonVisible="NewButtonVisible" EditButtonVisible="EditButtonVisible" DeleteButtonVisible="DeleteButtonVisible" />
<DxGridDataColumn FieldName="Id" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" /> <DxGridDataColumn FieldName="Id" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
<DxGridDataColumn FieldName="UserProductMappingId" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" /> <DxGridDataColumn FieldName="UserProductMappingId" ShowInColumnChooser="AcDomain.IsDeveloperVersion" Visible="AcDomain.IsDeveloperVersion" DisplayFormat="N" />
@{ @{
@ -49,13 +51,12 @@
</Columns> </Columns>
<DetailRowTemplate> <DetailRowTemplate>
@{ @{
// TODO: ide max a transferek kellenek, nem a UserProductMapping! - J.
<DxTabs> <DxTabs>
<DxTabPage Text="Driving permissions assigned"> <DxTabPage Text="Driving permissions assigned">
<UserProductMappingGridComponent GetAllTag="SignalRTags.GetUserProductMappingsById" ContextIds="new[] { ((Car)context.DataItem).UserProductMappingId }" <UserProductMappingGridComponent GetAllTag="SignalRTags.GetUserProductMappingsById" ContextIds="new[] { ((Car)context.DataItem).UserProductMappingId }"
CommandColumnVisible="false" /> CommandColumnVisible="false" />
</DxTabPage> </DxTabPage>
</DxTabs> </DxTabs>
} }
</DetailRowTemplate> </DetailRowTemplate>
@ -95,10 +96,16 @@
</CarGrid> </CarGrid>
@code { @code {
[Parameter] public ICarRelation ParentData { get; set; } = null!; [Parameter] public Guid ContextId { get; set; }
//[Parameter] public ICarRelation ParentData { get; set; } = null!;
[Parameter] public int GetAllTag { get; set; } = SignalRTags.GetAllCars; [Parameter] public int GetAllTag { get; set; } = SignalRTags.GetAllCars;
[Parameter] public GridDetailExpandButtonDisplayMode DetailExpandButtonDisplayMode { get; set; } = GridDetailExpandButtonDisplayMode.Never; [Parameter] public GridDetailExpandButtonDisplayMode DetailExpandButtonDisplayMode { get; set; } = GridDetailExpandButtonDisplayMode.Never;
[Parameter] public bool CommandColumnVisible { get; set; } = true;
[Parameter] public bool NewButtonVisible { get; set; } = false;
[Parameter] public bool EditButtonVisible { get; set; } = true;
[Parameter] public bool DeleteButtonVisible { get; set; } = false;
private LoggerClient<CarGridComponent> _logger = null!; private LoggerClient<CarGridComponent> _logger = null!;
protected override void OnInitialized() protected override void OnInitialized()

View File

@ -43,7 +43,7 @@
var userEmailFieldNameComboItem = $"{nameof(UserProductMapping.User)}.{nameof(User.EmailAddress)}"; var userEmailFieldNameComboItem = $"{nameof(UserProductMapping.User)}.{nameof(User.EmailAddress)}";
var userNameFieldNameComboItem = $"{nameof(UserProductMapping.User)}.{nameof(User.FullName)}"; var userNameFieldNameComboItem = $"{nameof(UserProductMapping.User)}.{nameof(User.FullName)}";
} }
<DxGridDataColumn FieldName="@userEmailFieldName" Caption="Driver" SortIndex="0" ReadOnly="!DriverId.IsNullOrEmpty()"> <DxGridDataColumn FieldName="@userEmailFieldName" Caption="Driver" SortIndex="0" ReadOnly="!DriverId.IsNullOrEmpty()" Visible="DriverId.IsNullOrEmpty()">
<CellDisplayTemplate> <CellDisplayTemplate>
@{ @{
var email = string.Empty; var email = string.Empty;

View File

@ -72,8 +72,8 @@
</DxGridDataColumn> </DxGridDataColumn>
<DxGridDataColumn FieldName="Permissions" /> <DxGridDataColumn FieldName="Permissions" />
<DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" /> <DxGridDataColumn FieldName="Created" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" ReadOnly="true" />
<DxGridDataColumn FieldName="Modified" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" /> <DxGridDataColumn FieldName="Modified" DisplayFormat="g" Width="140" CaptionAlignment="GridTextAlignment.Center" TextAlignment="GridTextAlignment.Center" ReadOnly="true" />
</Columns> </Columns>
<DetailRowTemplate> <DetailRowTemplate>
@{ @{