From 1389f99b8161643f1f391918d9f7071a9a500acd Mon Sep 17 00:00:00 2001 From: Frede Hundewadt Date: Tue, 11 Apr 2023 17:27:35 +0200 Subject: [PATCH] DEV: v.135.1 --- .../AdvisorCustomerInventoryListPage.razor.cs | 8 --- .../Pages/AdvisorCustomerViewEditPage.razor | 12 +++-- .../AdvisorCustomerViewEditPage.razor.cs | 18 +++++-- ...mDocumentEmergencyTextsViewEditPage.razor} | 0 ...cumentEmergencyTextsViewEditPage.razor.cs} | 2 +- ...emDocumentFirstAidTextsViewEditPage.razor} | 0 ...ocumentFirstAidTextsViewEditPage.razor.cs} | 2 +- ... => SystemDocumentLandingLabelsPage.razor} | 10 ++-- ... SystemDocumentLandingLabelsPage.razor.cs} | 2 +- ...r => SystemDocumentLandingTextsPage.razor} | 12 ++--- .../SystemDocumentLandingTextsPage.razor.cs | 6 +++ ...ystemDocumentQuoteLabelsViewEditPage.razor | 4 +- ...emDocumentQuoteMailTextsViewEditPage.razor | 54 +++++++++++++++++++ ...ocumentQuoteMailTextsViewEditPage.razor.cs | 35 ++++++++++++ ...SystemDocumentQuoteTextsViewEditPage.razor | 54 +++++++++++++++++++ ...temDocumentQuoteTextsViewEditPage.razor.cs | 35 ++++++++++++ .../SystemDocumentTextsAdminPage.razor.cs | 6 --- Wonky.Client/wwwroot/appsettings.json | 4 +- 18 files changed, 224 insertions(+), 40 deletions(-) rename Wonky.Client/Pages/{SystemEmergcencyTextsViewEditPage.razor => SystemDocumentEmergencyTextsViewEditPage.razor} (100%) rename Wonky.Client/Pages/{SystemEmergcencyTextsViewEditPage.razor.cs => SystemDocumentEmergencyTextsViewEditPage.razor.cs} (95%) rename Wonky.Client/Pages/{SystemFirstAidTextsViewEditPage.razor => SystemDocumentFirstAidTextsViewEditPage.razor} (100%) rename Wonky.Client/Pages/{SystemFirstAidTextsViewEditPage.razor.cs => SystemDocumentFirstAidTextsViewEditPage.razor.cs} (95%) rename Wonky.Client/Pages/{SystemDocumentLabelsAdminPage.razor => SystemDocumentLandingLabelsPage.razor} (100%) rename Wonky.Client/Pages/{SystemDocumentLabelsAdminPage.razor.cs => SystemDocumentLandingLabelsPage.razor.cs} (57%) rename Wonky.Client/Pages/{SystemDocumentTextsAdminPage.razor => SystemDocumentLandingTextsPage.razor} (100%) create mode 100644 Wonky.Client/Pages/SystemDocumentLandingTextsPage.razor.cs create mode 100644 Wonky.Client/Pages/SystemDocumentQuoteMailTextsViewEditPage.razor create mode 100644 Wonky.Client/Pages/SystemDocumentQuoteMailTextsViewEditPage.razor.cs create mode 100644 Wonky.Client/Pages/SystemDocumentQuoteTextsViewEditPage.razor create mode 100644 Wonky.Client/Pages/SystemDocumentQuoteTextsViewEditPage.razor.cs delete mode 100644 Wonky.Client/Pages/SystemDocumentTextsAdminPage.razor.cs diff --git a/Wonky.Client/Pages/AdvisorCustomerInventoryListPage.razor.cs b/Wonky.Client/Pages/AdvisorCustomerInventoryListPage.razor.cs index 183f7a1e..31f4b5d3 100644 --- a/Wonky.Client/Pages/AdvisorCustomerInventoryListPage.razor.cs +++ b/Wonky.Client/Pages/AdvisorCustomerInventoryListPage.razor.cs @@ -60,14 +60,6 @@ public partial class AdvisorCustomerInventoryListPage : IDisposable Company = await CustomerRepo.GetCompanyById(CompanyId); - while (string.IsNullOrWhiteSpace(Company.HistorySync)) - await Task.Delay(250); - - var x = await HistoryRepo.InvoiceErpToCrmRpc(CompanyId, Company.HistorySync); - - while(string.IsNullOrWhiteSpace(x)) - await Task.Delay(500); - // fetch product inventory await FetchProductInventory(); diff --git a/Wonky.Client/Pages/AdvisorCustomerViewEditPage.razor b/Wonky.Client/Pages/AdvisorCustomerViewEditPage.razor index d15a94e4..eddf638e 100644 --- a/Wonky.Client/Pages/AdvisorCustomerViewEditPage.razor +++ b/Wonky.Client/Pages/AdvisorCustomerViewEditPage.razor @@ -16,6 +16,7 @@ @using Microsoft.AspNetCore.Authorization @using Microsoft.AspNetCore.Components @using Wonky.Client.Components +@using Wonky.Entity.Configuration @attribute [Authorize(Roles = "Advisor")] @page "/advisor/customers/{CompanyId}" Kundekort for @Company.Name @@ -266,11 +267,14 @@ -
-
- Arbejdssteder + @if (AppInfo.Value.Rc) + { + -
+ } } } diff --git a/Wonky.Client/Pages/AdvisorCustomerViewEditPage.razor.cs b/Wonky.Client/Pages/AdvisorCustomerViewEditPage.razor.cs index f50e0bb2..8c79affa 100644 --- a/Wonky.Client/Pages/AdvisorCustomerViewEditPage.razor.cs +++ b/Wonky.Client/Pages/AdvisorCustomerViewEditPage.razor.cs @@ -19,12 +19,14 @@ using Blazored.LocalStorage; using Blazored.Toast.Services; using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components.Forms; +using Microsoft.Extensions.Options; using Wonky.Client.Helpers; using Wonky.Client.HttpInterceptors; using Wonky.Client.HttpRepository; using Wonky.Client.Local.Services; using Wonky.Client.Models; using Wonky.Client.Shared; +using Wonky.Entity.Configuration; using Wonky.Entity.DTO; using Wonky.Entity.Models; @@ -34,7 +36,7 @@ namespace Wonky.Client.Pages; public partial class AdvisorCustomerViewEditPage : IDisposable { - [Parameter] public string CompanyId { get; set; } = ""; + // ########################################################################### [Inject] public IToastService Toaster { get; set; } [Inject] public ILogger Logger { get; set; } [Inject] public NavigationManager Navigator { get; set; } @@ -45,7 +47,12 @@ public partial class AdvisorCustomerViewEditPage : IDisposable [Inject] public VatInfoLookupService VatService { get; set; } [Inject] public ILocalStorageService Storage { get; set; } [Inject] public IUserInfoService UserInfoService { get; set; } - + [Inject] public IOptions? AppInfo { get; set; } + + // ########################################################################### + [Parameter] public string CompanyId { get; set; } = ""; + + // ########################################################################### private readonly JsonSerializerOptions _options = new() { PropertyNameCaseInsensitive = true }; private CompanyDto Company { get; set; } = new(); private EditContext ErpContext { get; set; } @@ -108,6 +115,7 @@ public partial class AdvisorCustomerViewEditPage : IDisposable // action link passed to activity button component ActionLink = $"/advisor/customers/{CompanyId}/activities/new"; // used when drawing visit button + // only execute if the company a 'real' customer if (!Kanvas) { @@ -152,8 +160,10 @@ public partial class AdvisorCustomerViewEditPage : IDisposable if (CountryIsDk) CompanyVatAddress = PrepareVatAddress(Company); - await FetchContacts(CompanyId); - await Task.Delay(100); + await FetchContacts(CompanyId); + + Working = false; + await RequestErpUpdate(); } diff --git a/Wonky.Client/Pages/SystemEmergcencyTextsViewEditPage.razor b/Wonky.Client/Pages/SystemDocumentEmergencyTextsViewEditPage.razor similarity index 100% rename from Wonky.Client/Pages/SystemEmergcencyTextsViewEditPage.razor rename to Wonky.Client/Pages/SystemDocumentEmergencyTextsViewEditPage.razor diff --git a/Wonky.Client/Pages/SystemEmergcencyTextsViewEditPage.razor.cs b/Wonky.Client/Pages/SystemDocumentEmergencyTextsViewEditPage.razor.cs similarity index 95% rename from Wonky.Client/Pages/SystemEmergcencyTextsViewEditPage.razor.cs rename to Wonky.Client/Pages/SystemDocumentEmergencyTextsViewEditPage.razor.cs index 273b731f..23d434ce 100644 --- a/Wonky.Client/Pages/SystemEmergcencyTextsViewEditPage.razor.cs +++ b/Wonky.Client/Pages/SystemDocumentEmergencyTextsViewEditPage.razor.cs @@ -20,7 +20,7 @@ using Wonky.Entity.DTO; namespace Wonky.Client.Pages; -public partial class SystemEmergcencyTextsViewEditPage +public partial class SystemDocumentEmergencyTextsViewEditPage { [Inject] public ISystemTextsRepository TextsRepo { get; set; } private KrvEmergencyTexts Section { get; set; } = new(); diff --git a/Wonky.Client/Pages/SystemFirstAidTextsViewEditPage.razor b/Wonky.Client/Pages/SystemDocumentFirstAidTextsViewEditPage.razor similarity index 100% rename from Wonky.Client/Pages/SystemFirstAidTextsViewEditPage.razor rename to Wonky.Client/Pages/SystemDocumentFirstAidTextsViewEditPage.razor diff --git a/Wonky.Client/Pages/SystemFirstAidTextsViewEditPage.razor.cs b/Wonky.Client/Pages/SystemDocumentFirstAidTextsViewEditPage.razor.cs similarity index 95% rename from Wonky.Client/Pages/SystemFirstAidTextsViewEditPage.razor.cs rename to Wonky.Client/Pages/SystemDocumentFirstAidTextsViewEditPage.razor.cs index 3799d6e6..a32e05e3 100644 --- a/Wonky.Client/Pages/SystemFirstAidTextsViewEditPage.razor.cs +++ b/Wonky.Client/Pages/SystemDocumentFirstAidTextsViewEditPage.razor.cs @@ -22,7 +22,7 @@ using Wonky.Entity.DTO; namespace Wonky.Client.Pages; -public partial class SystemFirstAidTextsViewEditPage +public partial class SystemDocumentFirstAidTextsViewEditPage { [Inject] public ISystemTextsRepository TextsRepo { get; set; } private KrvFirstAidTexts Section { get; set; } = new(); diff --git a/Wonky.Client/Pages/SystemDocumentLabelsAdminPage.razor b/Wonky.Client/Pages/SystemDocumentLandingLabelsPage.razor similarity index 100% rename from Wonky.Client/Pages/SystemDocumentLabelsAdminPage.razor rename to Wonky.Client/Pages/SystemDocumentLandingLabelsPage.razor index 8f7b930b..36bf774e 100644 --- a/Wonky.Client/Pages/SystemDocumentLabelsAdminPage.razor +++ b/Wonky.Client/Pages/SystemDocumentLandingLabelsPage.razor @@ -23,6 +23,11 @@ Dokument Labels (beskrivelse af feltindhold)
+
+ +
-
- -
diff --git a/Wonky.Client/Pages/SystemDocumentLabelsAdminPage.razor.cs b/Wonky.Client/Pages/SystemDocumentLandingLabelsPage.razor.cs similarity index 57% rename from Wonky.Client/Pages/SystemDocumentLabelsAdminPage.razor.cs rename to Wonky.Client/Pages/SystemDocumentLandingLabelsPage.razor.cs index 056cb27d..4f1b4ebc 100644 --- a/Wonky.Client/Pages/SystemDocumentLabelsAdminPage.razor.cs +++ b/Wonky.Client/Pages/SystemDocumentLandingLabelsPage.razor.cs @@ -2,7 +2,7 @@ namespace Wonky.Client.Pages; #pragma warning disable CS8618 -public partial class SystemDocumentLabelsAdminPage +public partial class SystemDocumentLandingLabelsPage { } \ No newline at end of file diff --git a/Wonky.Client/Pages/SystemDocumentTextsAdminPage.razor b/Wonky.Client/Pages/SystemDocumentLandingTextsPage.razor similarity index 100% rename from Wonky.Client/Pages/SystemDocumentTextsAdminPage.razor rename to Wonky.Client/Pages/SystemDocumentLandingTextsPage.razor index bdd089a3..d31d4f22 100644 --- a/Wonky.Client/Pages/SystemDocumentTextsAdminPage.razor +++ b/Wonky.Client/Pages/SystemDocumentLandingTextsPage.razor @@ -23,6 +23,12 @@ Dokument Tekster +
+ +
-
- -
\ No newline at end of file diff --git a/Wonky.Client/Pages/SystemDocumentLandingTextsPage.razor.cs b/Wonky.Client/Pages/SystemDocumentLandingTextsPage.razor.cs new file mode 100644 index 00000000..829559f5 --- /dev/null +++ b/Wonky.Client/Pages/SystemDocumentLandingTextsPage.razor.cs @@ -0,0 +1,6 @@ +namespace Wonky.Client.Pages; + +public partial class SystemDocumentLandingTextsPage +{ + +} \ No newline at end of file diff --git a/Wonky.Client/Pages/SystemDocumentQuoteLabelsViewEditPage.razor b/Wonky.Client/Pages/SystemDocumentQuoteLabelsViewEditPage.razor index 120843e7..78cad518 100644 --- a/Wonky.Client/Pages/SystemDocumentQuoteLabelsViewEditPage.razor +++ b/Wonky.Client/Pages/SystemDocumentQuoteLabelsViewEditPage.razor @@ -18,11 +18,11 @@ @page "/system/labels/quote" -Labels for 'Affald og Spild APB/KRV Dokument' +Labels for 'Tilbud dokumentt'
-

Affald og Spild

+

Tilbud Labels

diff --git a/Wonky.Client/Pages/SystemDocumentQuoteMailTextsViewEditPage.razor b/Wonky.Client/Pages/SystemDocumentQuoteMailTextsViewEditPage.razor new file mode 100644 index 00000000..5bcac78e --- /dev/null +++ b/Wonky.Client/Pages/SystemDocumentQuoteMailTextsViewEditPage.razor @@ -0,0 +1,54 @@ +@* Copyright (C) 2022 FCS Frede's Computer Services. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] +*@ + +@using Microsoft.AspNetCore.Authorization +@attribute [Authorize(Roles = "Admin")] + +@page "/system/texts/quotemail" + +Tekster for 'Tilbud Mail dokument' +
+
+
+

Tilbud Mail Tekster

+
+
+
+ @if (TextProps.Any()) + { + + + + + + + + + @foreach (var textProp in TextProps) + { + + + + + } + +
NavnTekst
@textProp.Name
+ } + else + { +
Ingen data!
+ } +
+
diff --git a/Wonky.Client/Pages/SystemDocumentQuoteMailTextsViewEditPage.razor.cs b/Wonky.Client/Pages/SystemDocumentQuoteMailTextsViewEditPage.razor.cs new file mode 100644 index 00000000..7e28611d --- /dev/null +++ b/Wonky.Client/Pages/SystemDocumentQuoteMailTextsViewEditPage.razor.cs @@ -0,0 +1,35 @@ +// Copyright (C) 2022 FCS Frede's Computer Services. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] +// + +using System.Reflection; +using Microsoft.AspNetCore.Components; +using Wonky.Client.HttpRepository; +using Wonky.Entity.DTO; + +#pragma warning disable CS8618 + +namespace Wonky.Client.Pages; + +public partial class SystemDocumentQuoteMailTextsViewEditPage +{ + [Inject] public ISystemTextsRepository TextRepo { get; set; } + private SystemQuoteMailTexts Section { get; set; } = new(); + private PropertyInfo[] TextProps { get; set; } + protected override async Task OnInitializedAsync() + { + Section = await TextRepo.GetSystemQuoteMailTexts(); + TextProps = Section.GetType().GetProperties(); + } +} \ No newline at end of file diff --git a/Wonky.Client/Pages/SystemDocumentQuoteTextsViewEditPage.razor b/Wonky.Client/Pages/SystemDocumentQuoteTextsViewEditPage.razor new file mode 100644 index 00000000..8c517a0b --- /dev/null +++ b/Wonky.Client/Pages/SystemDocumentQuoteTextsViewEditPage.razor @@ -0,0 +1,54 @@ +@* Copyright (C) 2022 FCS Frede's Computer Services. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] +*@ + +@using Microsoft.AspNetCore.Authorization +@attribute [Authorize(Roles = "Admin")] + +@page "/system/texts/quote" + +Tekster for 'Tilbud dokument' +
+
+
+

Tilbud Tekster

+
+
+
+ @if (TextProps.Any()) + { + + + + + + + + + @foreach (var textProp in TextProps) + { + + + + + } + +
NavnTekst
@textProp.Name
+ } + else + { +
Ingen data!
+ } +
+
diff --git a/Wonky.Client/Pages/SystemDocumentQuoteTextsViewEditPage.razor.cs b/Wonky.Client/Pages/SystemDocumentQuoteTextsViewEditPage.razor.cs new file mode 100644 index 00000000..db9d68d8 --- /dev/null +++ b/Wonky.Client/Pages/SystemDocumentQuoteTextsViewEditPage.razor.cs @@ -0,0 +1,35 @@ +// Copyright (C) 2022 FCS Frede's Computer Services. +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] +// + +using System.Reflection; +using Microsoft.AspNetCore.Components; +using Wonky.Client.HttpRepository; +using Wonky.Entity.DTO; + +#pragma warning disable CS8618 + +namespace Wonky.Client.Pages; + +public partial class SystemDocumentQuoteTextsViewEditPage +{ + [Inject] public ISystemTextsRepository TextRepo { get; set; } + private SystemQuoteTexts Section { get; set; } = new(); + private PropertyInfo[] TextProps { get; set; } + protected override async Task OnInitializedAsync() + { + Section = await TextRepo.GetSystemQuoteTexts(); + TextProps = Section.GetType().GetProperties(); + } +} \ No newline at end of file diff --git a/Wonky.Client/Pages/SystemDocumentTextsAdminPage.razor.cs b/Wonky.Client/Pages/SystemDocumentTextsAdminPage.razor.cs deleted file mode 100644 index 963c8033..00000000 --- a/Wonky.Client/Pages/SystemDocumentTextsAdminPage.razor.cs +++ /dev/null @@ -1,6 +0,0 @@ -namespace Wonky.Client.Pages; - -public partial class SystemDocumentTextsAdminPage -{ - -} \ No newline at end of file diff --git a/Wonky.Client/wwwroot/appsettings.json b/Wonky.Client/wwwroot/appsettings.json index 00d2449c..49110f38 100644 --- a/Wonky.Client/wwwroot/appsettings.json +++ b/Wonky.Client/wwwroot/appsettings.json @@ -1,7 +1,7 @@ { "appInfo": { "name": "Wonky Online", - "version": "0.134.2", + "version": "0.135.1", "rc": true, "sandBox": false, "image": "grumpy-coder.png" @@ -19,7 +19,7 @@ } }, "apiConfig": { - "baseUrl": "https://zeta.innotec.dk", + "baseUrl": "https://dev.innotec.dk", "catalog": "api/v2/catalog/country", "crmCustomers": "api/v2/crm/companies", "crmInventoryExt": "history/inventory",