Iniziata implementazione form rilevazione
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
using SteUp.Shared.Core.Dto;
|
||||
using SteUp.Shared.Core.Dto.PageState;
|
||||
|
||||
namespace SteUp.Shared.Core.Data.Contracts;
|
||||
|
||||
public interface ISteupDataService
|
||||
{
|
||||
Task Init();
|
||||
|
||||
|
||||
List<PuntoVenditaDto> PuntiVenditaList { get; }
|
||||
InspectionPageState Inspection { get; set; }
|
||||
List<JtbFasiDto> Reparti { get; }
|
||||
List<StbActivityTypeDto> TipiAttività { get; }
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
using IntegryApiClient.Core.Domain.Abstraction.Contracts.Account;
|
||||
using SteUp.Shared.Core.Data.Contracts;
|
||||
using SteUp.Shared.Core.Dto;
|
||||
using SteUp.Shared.Core.Dto.PageState;
|
||||
using SteUp.Shared.Core.Interface.IntegryApi;
|
||||
|
||||
namespace SteUp.Shared.Core.Data;
|
||||
@@ -23,6 +24,7 @@ public class SteupDataService(
|
||||
TipiAttività = await integrySteupService.RetrieveActivityType();
|
||||
}
|
||||
|
||||
public InspectionPageState Inspection { get; set; } = new();
|
||||
public List<PuntoVenditaDto> PuntiVenditaList { get; private set; } = [];
|
||||
public List<JtbFasiDto> Reparti { get; private set; } = [];
|
||||
public List<StbActivityTypeDto> TipiAttività { get; private set; } = [];
|
||||
|
||||
8
SteUp.Shared/Core/Dto/PageState/InspectionPageState.cs
Normal file
8
SteUp.Shared/Core/Dto/PageState/InspectionPageState.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace SteUp.Shared.Core.Dto.PageState;
|
||||
|
||||
public class InspectionPageState
|
||||
{
|
||||
public DateTime DateInspection {get; set;}
|
||||
|
||||
public PuntoVenditaDto? PuntoVendita {get; set;}
|
||||
}
|
||||
8
SteUp.Shared/Core/Dto/SchedaDto.cs
Normal file
8
SteUp.Shared/Core/Dto/SchedaDto.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace SteUp.Shared.Core.Dto;
|
||||
|
||||
public class SchedaDto
|
||||
{
|
||||
public JtbFasiDto? Reparto { get; set; }
|
||||
public string? ActivityTypeId { get; set; }
|
||||
public string? Note { get; set; }
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using MudBlazor;
|
||||
using SteUp.Shared.Components.SingleElements.Modal;
|
||||
using SteUp.Shared.Core.Dto;
|
||||
|
||||
namespace SteUp.Shared.Core.Helpers;
|
||||
|
||||
@@ -21,4 +22,57 @@ public class ModalHelper
|
||||
|
||||
return await modal.Result;
|
||||
}
|
||||
|
||||
public static async Task<DialogResult?> OpenFormScheda(IDialogService dialog)
|
||||
{
|
||||
var modal = await dialog.ShowAsync<ModalFormScheda>(
|
||||
"ModalFormScheda",
|
||||
new DialogParameters(),
|
||||
new DialogOptions
|
||||
{
|
||||
FullScreen = true,
|
||||
CloseButton = false,
|
||||
NoHeader = true
|
||||
}
|
||||
);
|
||||
|
||||
return await modal.Result;
|
||||
}
|
||||
|
||||
public static async Task<DialogResult?> OpenAddAttached(IDialogService dialog)
|
||||
{
|
||||
var modal = await dialog.ShowAsync<ModalAddAttached>(
|
||||
"Add attached",
|
||||
new DialogParameters(),
|
||||
new DialogOptions
|
||||
{
|
||||
FullScreen = false,
|
||||
CloseButton = false,
|
||||
NoHeader = true,
|
||||
BackdropClick = false
|
||||
}
|
||||
);
|
||||
|
||||
return await modal.Result;
|
||||
}
|
||||
|
||||
public static async Task<DialogResult?> OpenSuggestActivityDescription(IDialogService dialog, List<StbActivityTyperDto>? activityTypers)
|
||||
{
|
||||
var modal = await dialog.ShowAsync<ModalSuggestDescription>(
|
||||
"Suggest activity description",
|
||||
new DialogParameters<ModalSuggestDescription>
|
||||
{
|
||||
{ x => x.ActivityTypers, activityTypers }
|
||||
},
|
||||
new DialogOptions
|
||||
{
|
||||
FullScreen = false,
|
||||
CloseButton = false,
|
||||
NoHeader = true,
|
||||
BackdropClick = true
|
||||
}
|
||||
);
|
||||
|
||||
return await modal.Result;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user