disable update/save buttons to avoid doubled records
This commit is contained in:
parent
9ff13d9914
commit
1e298adab8
4 changed files with 7 additions and 3 deletions
|
@ -134,6 +134,7 @@ namespace Wonky.Client.Pages
|
|||
}
|
||||
private async Task SubmitCompanyForm()
|
||||
{
|
||||
_formInvalid = true;
|
||||
_company.LastVisit = $"{_lastVisit:yyyy-MM-dd}";
|
||||
_company.NextVisit = $"{_nextVisit:yyyy-MM-dd}";
|
||||
|
||||
|
@ -147,6 +148,7 @@ namespace Wonky.Client.Pages
|
|||
else
|
||||
{
|
||||
_toast.ShowWarning($"'{_company.Name}' IKKE oprettet.");
|
||||
_formInvalid = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -209,7 +209,7 @@
|
|||
<a class="btn btn-light border-dark d-block" href="/companies/@_company.CompanyId/h/i">Produktkøb</a>
|
||||
</div>
|
||||
<div class="col">
|
||||
<button type="submit" class="btn btn-light border-dark d-block">Gem</button>
|
||||
<button type="submit" class="btn btn-light border-dark d-block" disabled="@_working">Gem</button>
|
||||
</div>
|
||||
<div class="col">
|
||||
<ActivityButton ActionLink="@_actionLink"
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<div class="row">
|
||||
<div class="col text-end">
|
||||
<button type="button" class="btn btn-warning d-block" onclick="window.print();">PRINT</button>
|
||||
<button type="button" class="btn btn-warning d-block" @onclick="SetExpressState">SÆT I GANG</button>
|
||||
<button type="button" class="btn btn-warning d-block" @onclick="SetExpressState" disabled="@_isNotified">SÆT I GANG</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -26,6 +26,7 @@ public partial class OfficeViewActivityPage : IDisposable
|
|||
[Inject] public ILogger<OfficeViewActivityPage> Logger { get; set; }
|
||||
[Inject] public IToastService Toast { get; set; }
|
||||
private ReportItemView _reportItem { get; set; } = new();
|
||||
private bool _isNotified { get; set; }
|
||||
|
||||
private readonly JsonSerializerOptions? _options = new JsonSerializerOptions
|
||||
{
|
||||
|
@ -96,6 +97,7 @@ public partial class OfficeViewActivityPage : IDisposable
|
|||
"ADVARSEL");
|
||||
}
|
||||
|
||||
_isNotified = true;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
|
|
Loading…
Reference in a new issue