Aggiunta modifica esito
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
<link rel="stylesheet" href="_content/Template.Shared/css/remixicon/remixicon.css"/>
|
||||
<link rel="stylesheet" href="_content/Template.Shared/css/app.css"/>
|
||||
<link rel="stylesheet" href="_content/Template.Shared/css/form.css"/>
|
||||
<link rel="stylesheet" href="_content/Template.Shared/css/bottomSheet.css"/>
|
||||
<link rel="stylesheet" href="_content/Template.Shared/css/default-theme.css"/>
|
||||
<link rel="stylesheet" href="Template.Maui.styles.css"/>
|
||||
<link rel="icon" type="image/png" href="favicon.png"/>
|
||||
@@ -51,7 +52,7 @@
|
||||
<script src="_content/CodeBeam.MudBlazor.Extensions/MudExtensions.min.js"></script>
|
||||
<script src="_content/Template.Shared/js/main.js"></script>
|
||||
<script src="_content/Template.Shared/js/calendar.js"></script>
|
||||
<script src="_content/Template.Shared/js/header.js"></script>
|
||||
<script src="_content/Template.Shared/js/alphaScroll.js"></script>
|
||||
|
||||
</body>
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
@using Template.Shared.Components.Layout
|
||||
@using Template.Shared.Components.SingleElements
|
||||
@using Template.Shared.Components.Layout.Spinner
|
||||
@using Template.Shared.Components.Layout.BottomSheet
|
||||
@using Template.Shared.Components.SingleElements.BottomSheet
|
||||
@inject IManageDataService ManageData
|
||||
@inject IJSRuntime JS
|
||||
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
|
||||
<HeaderLayout Title="Contatti" />
|
||||
|
||||
<div class="container">
|
||||
|
||||
</div>
|
||||
|
||||
@code {
|
||||
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,106 @@
|
||||
@using Template.Shared.Core.Dto
|
||||
@using Template.Shared.Core.Entity
|
||||
@using Template.Shared.Core.Interface
|
||||
@inject IManageDataService ManageData
|
||||
|
||||
<div class="bottom-sheet-backdrop @(IsSheetVisible ? "show" : "")" @onclick="CloseBottomSheet"></div>
|
||||
|
||||
<div class="bottom-sheet-container @(IsSheetVisible ? "show" : "")">
|
||||
<div class="bottom-sheet pb-safe-area">
|
||||
<div class="title">
|
||||
<MudText Typo="Typo.h6">
|
||||
<b>Esito</b>
|
||||
</MudText>
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Close" OnClick="CloseBottomSheet"/>
|
||||
</div>
|
||||
|
||||
<div class="input-card">
|
||||
<div class="form-container">
|
||||
<span>Data effettiva</span>
|
||||
|
||||
<MudTextField T="DateTime" Format="yyyy-MM-dd" InputType="InputType.Date" @bind-Value="EffectiveDate" />
|
||||
</div>
|
||||
|
||||
<div class="divider"></div>
|
||||
|
||||
<div class="form-container">
|
||||
<span>Inizio</span>
|
||||
|
||||
<MudTextField T="TimeSpan" InputType="InputType.Time" @bind-Value="EffectiveTime" />
|
||||
</div>
|
||||
|
||||
<div class="divider"></div>
|
||||
|
||||
<div class="form-container">
|
||||
<span>Fine</span>
|
||||
|
||||
<MudTextField T="TimeSpan" InputType="InputType.Time" @bind-Value="EffectiveEndTime" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="input-card">
|
||||
<div class="form-container">
|
||||
<span class="disable-full-width">Esito</span>
|
||||
|
||||
<MudSelectExtended FullWidth="true" T="string?" Variant="Variant.Text" @bind-Value="ActivityModel.ActivityResultId" Class="customIcon-select" AdornmentIcon="@Icons.Material.Filled.Code">
|
||||
@foreach (var result in ActivityResult)
|
||||
{
|
||||
<MudSelectItemExtended Class="custom-item-select" Value="@result.ActivityResultId">@result.ActivityResultId</MudSelectItemExtended>
|
||||
}
|
||||
</MudSelectExtended>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="input-card">
|
||||
<MudTextField T="string?" Placeholder="Descrizione esito" Variant="Variant.Text" Lines="4" @bind-Value="ActivityModel.ResultDescription" />
|
||||
</div>
|
||||
|
||||
<div class="button-section">
|
||||
<MudButton Variant="Variant.Filled" Color="Color.Primary" OnClick="CloseBottomSheet">Salva</MudButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
[Parameter] public bool IsSheetVisible { get; set; }
|
||||
[Parameter] public EventCallback<bool> IsSheetVisibleChanged { get; set; }
|
||||
|
||||
[Parameter] public ActivityDTO ActivityModel { get; set; }
|
||||
[Parameter] public EventCallback<ActivityDTO> ActivityModelChanged { get; set; }
|
||||
|
||||
private List<StbActivityResult> ActivityResult { get; set; } = [];
|
||||
|
||||
private DateTime EffectiveDate { get; set; } = DateTime.Today;
|
||||
|
||||
private TimeSpan EffectiveTime { get; set; }
|
||||
private TimeSpan EffectiveEndTime { get; set; }
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
if (IsSheetVisible)
|
||||
await LoadData();
|
||||
}
|
||||
|
||||
private async Task LoadData()
|
||||
{
|
||||
ActivityResult = await ManageData.GetTable<StbActivityResult>();
|
||||
|
||||
EffectiveTime = ActivityModel.EffectiveTime?.TimeOfDay ?? TimeSpan.Zero;
|
||||
EffectiveEndTime = ActivityModel.EffectiveEndtime?.TimeOfDay ?? TimeSpan.Zero;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private void CloseBottomSheet()
|
||||
{
|
||||
ActivityModel.EffectiveTime = new DateTime(EffectiveDate.Year, EffectiveDate.Month, EffectiveDate.Day,
|
||||
EffectiveTime.Hours, EffectiveTime.Minutes, EffectiveTime.Seconds);
|
||||
|
||||
ActivityModel.EffectiveEndtime = new DateTime(EffectiveDate.Year, EffectiveDate.Month, EffectiveDate.Day,
|
||||
EffectiveEndTime.Hours, EffectiveEndTime.Minutes, EffectiveEndTime.Seconds);
|
||||
|
||||
IsSheetVisible = false;
|
||||
IsSheetVisibleChanged.InvokeAsync(IsSheetVisible);
|
||||
ActivityModelChanged.InvokeAsync(ActivityModel);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
@using Template.Shared.Core.Dto
|
||||
@using Microsoft.VisualBasic
|
||||
@using Template.Shared.Core.Dto
|
||||
@using Template.Shared.Components.Layout
|
||||
@using Template.Shared.Core.Entity
|
||||
@using Template.Shared.Core.Interface
|
||||
@using Template.Shared.Components.Layout.Overlay
|
||||
@using Template.Shared.Components.SingleElements.BottomSheet
|
||||
@inject IManageDataService ManageData
|
||||
@inject INetworkService NetworkService
|
||||
@inject IIntegryApiService IntegryApiService
|
||||
@@ -79,10 +81,10 @@
|
||||
|
||||
<div class="divider"></div>
|
||||
|
||||
<div class="form-container">
|
||||
<div class="form-container" @onclick="OpenSelectEsito">
|
||||
<span class="disable-full-width">Esito</span>
|
||||
|
||||
<MudSelectExtended ReadOnly="IsView" FullWidth="true" T="string?" Variant="Variant.Text" @bind-Value="ActivityModel.ActivityResultId" @bind-Value:after="OnAfterChangeValue" Class="customIcon-select" AdornmentIcon="@Icons.Material.Filled.Code">
|
||||
<MudSelectExtended ReadOnly="true" FullWidth="true" T="string?" Variant="Variant.Text" @bind-Value="ActivityModel.ActivityResultId" @bind-Value:after="OnAfterChangeValue" Class="customIcon-select" AdornmentIcon="@Icons.Material.Filled.Code">
|
||||
@foreach (var result in ActivityResult)
|
||||
{
|
||||
<MudSelectItemExtended Class="custom-item-select" Value="@result.ActivityResultId">@result.ActivityResultId</MudSelectItemExtended>
|
||||
@@ -100,6 +102,8 @@
|
||||
|
||||
<SaveOverlay VisibleOverlay="VisibleOverlay" SuccessAnimation="SuccessAnimation" />
|
||||
|
||||
<SelectEsito @bind-IsSheetVisible="OpenEsito" @bind-ActivityModel="ActivityModel" />
|
||||
|
||||
@code {
|
||||
[CascadingParameter] private IMudDialogInstance MudDialog { get; set; }
|
||||
|
||||
@@ -121,6 +125,8 @@
|
||||
private bool VisibleOverlay { get; set; }
|
||||
private bool SuccessAnimation { get; set; }
|
||||
|
||||
private bool OpenEsito { get; set; } = false;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
_ = LoadData();
|
||||
@@ -169,4 +175,10 @@
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private void OpenSelectEsito()
|
||||
{
|
||||
OpenEsito = !OpenEsito;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -22,9 +22,7 @@
|
||||
z-index: 1003;
|
||||
}
|
||||
|
||||
.bottom-sheet-container.show {
|
||||
bottom: 0;
|
||||
}
|
||||
.bottom-sheet-container.show { bottom: 0; }
|
||||
|
||||
.bottom-sheet {
|
||||
background-color: var(--mud-palette-surface);
|
||||
@@ -34,11 +32,9 @@
|
||||
box-shadow: 0 -2px 10px rgba(165, 165, 165, 0.5);
|
||||
}
|
||||
|
||||
.clearButton ::deep .mud-icon-button {
|
||||
padding: 4px !important;
|
||||
}
|
||||
.clearButton .mud-icon-button { padding: 4px !important; }
|
||||
|
||||
.bottom-sheet ::deep .closeIcon .mud-icon-root {
|
||||
.bottom-sheet .closeIcon .mud-icon-root {
|
||||
border-radius: 50%;
|
||||
padding: 2px;
|
||||
min-width: 15px;
|
||||
1
Template.Shared/wwwroot/js/alphaScroll.js
Normal file
1
Template.Shared/wwwroot/js/alphaScroll.js
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
window.blazorIosHeader = {
|
||||
init: function () {
|
||||
const largeTitleSection = document.querySelector('.large-title-section');
|
||||
const largeTitle = document.querySelector('.large-title');
|
||||
const centerTitle = document.querySelector('.center-title');
|
||||
|
||||
if (!largeTitleSection || !largeTitle || !centerTitle) return;
|
||||
|
||||
window.addEventListener('scroll', function () {
|
||||
// Soglia simile a iOS: metà della sezione large title
|
||||
const threshold = largeTitleSection.offsetHeight / 2;
|
||||
if (window.scrollY > threshold) {
|
||||
largeTitle.classList.add('hide');
|
||||
centerTitle.classList.add('visible');
|
||||
} else {
|
||||
largeTitle.classList.remove('hide');
|
||||
centerTitle.classList.remove('visible');
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// Per compatibilità con il tuo GoBack Blazor
|
||||
window.goBack = function () {
|
||||
window.history.back();
|
||||
}
|
||||
Reference in New Issue
Block a user