built v.072.2
This commit is contained in:
parent
e6b7e658b3
commit
2cc9d55220
4 changed files with 15 additions and 8 deletions
|
@ -149,7 +149,7 @@ public partial class CrmActivityNewPage : IDisposable
|
|||
PoFormInvalid = false;
|
||||
}
|
||||
Working = false;
|
||||
StateHasChanged();
|
||||
//StateHasChanged();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<InputSelect id="dayType" class="form-select text-bg-primary bg-primary"
|
||||
<select id="dayType" class="form-select text-bg-primary bg-primary"
|
||||
@bind-Value="Report.DayTypeEnum" @bind-Value:event="onchange">
|
||||
<option value="">→ TAG MIG ←</option>
|
||||
<option value="sales">Salgsdag</option>
|
||||
|
@ -61,7 +61,7 @@
|
|||
<option value="supervisor">Medkørende Supervisor</option>
|
||||
<option value="sickLeave">Sygdom</option>
|
||||
<option value="leave">Ferie</option>
|
||||
</InputSelect>
|
||||
</select>
|
||||
<ValidationMessage For="@(() => Report.DayTypeEnum)"/>
|
||||
</td>
|
||||
@if (Report.DayTypeEnum.ToLower().Contains("leave"))
|
||||
|
|
|
@ -84,7 +84,6 @@ public partial class CrmReportNewPage : IDisposable
|
|||
Report.Figures.Distance = 0;
|
||||
Report.Figures.DistancePrivateMonth = 0;
|
||||
await GetKeyFigures();
|
||||
Working = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -94,7 +93,6 @@ public partial class CrmReportNewPage : IDisposable
|
|||
/// <param name="e"></param>
|
||||
private void HandleFieldChanged(object sender, FieldChangedEventArgs e)
|
||||
{
|
||||
Console.WriteLine($"e Model => {e.FieldIdentifier.Model}");
|
||||
Console.WriteLine($"e FieldName => {e.FieldIdentifier.FieldName}");
|
||||
FormInvalid = !ReportContext.Validate();
|
||||
StateHasChanged();
|
||||
|
@ -109,6 +107,7 @@ public partial class CrmReportNewPage : IDisposable
|
|||
{
|
||||
FormInvalid = false;
|
||||
ReportContext.OnFieldChanged -= HandleFieldChanged;
|
||||
ReportContext.OnValidationStateChanged -= ValidationChanged;
|
||||
ReportContext = new EditContext(Report);
|
||||
ReportContext.OnFieldChanged += HandleFieldChanged;
|
||||
ReportContext.OnValidationStateChanged += ValidationChanged;
|
||||
|
@ -139,7 +138,7 @@ public partial class CrmReportNewPage : IDisposable
|
|||
// attempt to eliminate doubled click on submit button
|
||||
if (Working)
|
||||
return;
|
||||
// check daytype
|
||||
// check day type
|
||||
if (string.IsNullOrWhiteSpace(Report.DayTypeEnum))
|
||||
{
|
||||
Toaster.ShowError("Dagtype skal vælges", "Dag type mangler");
|
||||
|
@ -222,14 +221,22 @@ public partial class CrmReportNewPage : IDisposable
|
|||
private async Task GetKeyFigures()
|
||||
{
|
||||
Working = true;
|
||||
|
||||
Report.Figures = new ReportFiguresDto();
|
||||
InitialValues = new ReportFiguresDto();
|
||||
Activities = new List<ReportItemView>();
|
||||
|
||||
var data = await CrmReportRepo.InitializeReportData($"{_workDate:yyyy-MM-dd}");
|
||||
if(data.ReportClosed)
|
||||
Navigator.NavigateTo($"/sales-reports/view/{_workDate:yyyy-MM-dd}");
|
||||
|
||||
Report.Figures = data.ReportData;
|
||||
InitialValues = data.ReportData;
|
||||
Activities = data.ReportItems;
|
||||
|
||||
if(!Report.DayTypeEnum.ToLower().Contains("leave"))
|
||||
Report.Figures.KmMorning = Preferences.KmMorning;
|
||||
|
||||
NoFigures = false;
|
||||
Working = false;
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
"appInfo": {
|
||||
"name": "Wonky Client",
|
||||
"version": "0.72.1",
|
||||
"version": "0.72.2",
|
||||
"rc": true,
|
||||
"sandBox": false,
|
||||
"image": "grumpy-coder.png"
|
||||
},
|
||||
"apiConfig": {
|
||||
"baseUrl": "https://dev.innotec.dk",
|
||||
"baseUrl": "https://zeta.innotec.dk",
|
||||
"catalog": "api/v2/catalog",
|
||||
"crmCustomers": "api/v2/crm/companies",
|
||||
"crmInventoryExt": "history/inventory",
|
||||
|
|
Loading…
Reference in a new issue