@@ -328,4 +335,6 @@
@ref="VatLookupPopup" OnSelectedCompany="SelectedCompanyCallback"/>
\ No newline at end of file
+ @ref="ContactViewPopup" OnSaveClicked="WriteContactCallback" OnDeleteClicked="DeleteContactCallback"/>
+
+
\ No newline at end of file
diff --git a/Wonky.Client/Pages/AdvisorCustomerViewEditPage.razor.cs b/Wonky.Client/Pages/AdvisorCustomerViewEditPage.razor.cs
index 6fc59bcb..a37a8026 100644
--- a/Wonky.Client/Pages/AdvisorCustomerViewEditPage.razor.cs
+++ b/Wonky.Client/Pages/AdvisorCustomerViewEditPage.razor.cs
@@ -66,7 +66,6 @@ public partial class AdvisorCustomerViewEditPage : IDisposable
private string CountryCode { get; set; } = "dk";
private string VisitState { get; set; } = "the-ugly";
private int EnableActivity { get; set; } = 1;
- private string ActionLink { get; set; } = "";
private bool Working { get; set; } = true;
private bool CountryIsDk { get; set; } = true;
private bool ErpEditDisabled { get; set; } = true;
@@ -79,6 +78,13 @@ public partial class AdvisorCustomerViewEditPage : IDisposable
private ContactDto DefaultContact { get; set; } = new();
private ContactViewEditModal ContactViewPopup { get; set; } = new();
private VatLookupDkModal VatLookupPopup { get; set; } = new();
+ private string RemoveHistoryWarning { get; set; } = "";
+ private ConfirmActionModal ConfirmActionHistory { get; set; }
+ private string InventoryLink { get; set; } = "";
+ private string ActivityLink { get; set; } = "";
+ private string InvoiceLink { get; set; } = "";
+ private string NewActivityLink { get; set; } = "";
+ private int EnableLink { get; set; } = 1;
protected override async Task OnInitializedAsync()
{
@@ -89,6 +95,12 @@ public partial class AdvisorCustomerViewEditPage : IDisposable
// initialize default contact
DefaultContact = new ContactDto { CompanyId = CompanyId, ContactId = "", FirstName = "" };
+ // navigation button links
+ InventoryLink = $"/advisor/customers/{CompanyId}/history/inventory";
+ ActivityLink = $"/advisor/customers/{CompanyId}/activities";
+ InvoiceLink = $"/advisor/customers/{CompanyId}/invoices";
+ NewActivityLink = $"/advisor/customers/{CompanyId}/activities/new";
+
// setup form context
ErpContext = new EditContext(Company);
@@ -114,9 +126,6 @@ public partial class AdvisorCustomerViewEditPage : IDisposable
if (Company.Account.StartsWith("KANVAS"))
Kanvas = true;
- // 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)
{
@@ -186,6 +195,34 @@ public partial class AdvisorCustomerViewEditPage : IDisposable
VatEditDisabled = !VatEditDisabled;
}
+
+ private void ConfirmReloadHistory()
+ {
+ // $"Bekræft at du sletter
{Workplace.Name} fra
{Workplace.CompanyName}?
AL INFORMATION slettes og handlingen er uigenkaldelig.";
+ RemoveHistoryWarning = $"Denne process kan tage lang tid.
Bekræft at al historik gendannes for
{Company.Account} {Company.Name}";
+ ConfirmActionHistory.Show();
+ }
+
+
+ private async Task ReloadHistory()
+ {
+ if (Working)
+ return;
+ Toaster.ShowWarning("Vent venligst ....");
+ Working = true;
+ EnableLink = 0;
+ EnableActivity = 0;
+ var result = await HistoryRepo.GetRecycledInvoiceList(CompanyId, Company.HistorySync, true);
+ await Task.Delay(1000);
+ Working = false;
+ if (!string.IsNullOrWhiteSpace(result))
+ {
+ Toaster.ShowInfo("Historik gendannelse er færdig");
+ EnableLink = 1;
+ EnableActivity = 1;
+ }
+ }
+
private async Task ToggleVisibility()
{
@@ -202,7 +239,7 @@ public partial class AdvisorCustomerViewEditPage : IDisposable
if (Working)
return;
Working = true;
- Company.HistorySync = await HistoryRepo.InvoiceErpToCrmRpc(CompanyId, Company.HistorySync);
+ Company.HistorySync = await HistoryRepo.GetRecycledInvoiceList(CompanyId, Company.HistorySync, false);
Working = false;
}
diff --git a/Wonky.Client/Pages/AdvisorCustomerWorkplaceViewEditPage.razor b/Wonky.Client/Pages/AdvisorCustomerWorkplaceViewEditPage.razor
index e250f9da..7da535e8 100644
--- a/Wonky.Client/Pages/AdvisorCustomerWorkplaceViewEditPage.razor
+++ b/Wonky.Client/Pages/AdvisorCustomerWorkplaceViewEditPage.razor
@@ -186,5 +186,5 @@
}
-
-
+
+
diff --git a/Wonky.Client/Pages/AdvisorCustomerWorkplaceViewEditPage.razor.cs b/Wonky.Client/Pages/AdvisorCustomerWorkplaceViewEditPage.razor.cs
index 7a33fde7..3b65cdaf 100644
--- a/Wonky.Client/Pages/AdvisorCustomerWorkplaceViewEditPage.razor.cs
+++ b/Wonky.Client/Pages/AdvisorCustomerWorkplaceViewEditPage.razor.cs
@@ -54,7 +54,7 @@ public partial class AdvisorCustomerWorkplaceViewEditPage : IDisposable
private bool Working { get; set; } = true;
private WorkplaceDocInfo WorkplaceDocInfo { get; set; } = new();
private List
DocViews { get; set; } = new();
- private ConfirmDeleteModal ConfirmDeleteWorkplace { get; set; }
+ private ConfirmActionModal ConfirmActionWorkplace { get; set; }
private string DeleteMessage { get; set; } = "";
private string LinkRecipients { get; set; } = "";
private const string CopyText = "Kopier";
@@ -74,7 +74,7 @@ public partial class AdvisorCustomerWorkplaceViewEditPage : IDisposable
private string _linkButtonText = LinkText;
private string _linkButtonStyle = LinkStyle;
- private ConfirmDeleteModal ConfirmDeleteVariant { get; set; }
+ private ConfirmActionModal ConfirmActionVariant { get; set; }
private DocView SelectedItem { get; set; } = new();
private bool OnlyOne { get; set; } = true;
@@ -193,7 +193,7 @@ public partial class AdvisorCustomerWorkplaceViewEditPage : IDisposable
Logger.LogDebug("ConfirmDeleteWorkplace");
- ConfirmDeleteWorkplace.Show();
+ ConfirmActionWorkplace.Show();
}
@@ -204,7 +204,7 @@ public partial class AdvisorCustomerWorkplaceViewEditPage : IDisposable
Working = true;
await Workplaces.DeleteWorkplace(CompanyId, WorkplaceId);
-
+
Toaster.ShowInfo("Arbejdssted er slettet.");
Navigator.NavigateTo($"/advisor/customers/{CompanyId}/workplaces");
@@ -217,7 +217,7 @@ public partial class AdvisorCustomerWorkplaceViewEditPage : IDisposable
DeleteMessage =
$"Bekræft at du sletter
{selectedItem.VariantName} fra {Workplace.CompanyName}?
AL INFORMATION slettes og handlingen er uigenkaldelig.";
Logger.LogDebug("ConfirmDeleteProduct");
- ConfirmDeleteVariant.Show();
+ ConfirmActionVariant.Show();
}
diff --git a/Wonky.Client/Shared/ConfirmDeleteModal.razor b/Wonky.Client/Shared/ConfirmActionModal.razor
similarity index 89%
rename from Wonky.Client/Shared/ConfirmDeleteModal.razor
rename to Wonky.Client/Shared/ConfirmActionModal.razor
index f6c96c9f..eb0b47b6 100644
--- a/Wonky.Client/Shared/ConfirmDeleteModal.razor
+++ b/Wonky.Client/Shared/ConfirmActionModal.razor
@@ -18,15 +18,15 @@
@((MarkupString)BodyMessage)
diff --git a/Wonky.Client/Shared/ConfirmDeleteModal.razor.cs b/Wonky.Client/Shared/ConfirmActionModal.razor.cs
similarity index 97%
rename from Wonky.Client/Shared/ConfirmDeleteModal.razor.cs
rename to Wonky.Client/Shared/ConfirmActionModal.razor.cs
index 1d0bde1c..4471f1ba 100644
--- a/Wonky.Client/Shared/ConfirmDeleteModal.razor.cs
+++ b/Wonky.Client/Shared/ConfirmActionModal.razor.cs
@@ -18,7 +18,7 @@ using Microsoft.AspNetCore.Components;
namespace Wonky.Client.Shared;
-public partial class ConfirmDeleteModal
+public partial class ConfirmActionModal
{
private string _modalDisplay = "";
private bool _showBackdrop;
diff --git a/Wonky.Client/wwwroot/appsettings.json b/Wonky.Client/wwwroot/appsettings.json
index 627399a6..cae1441b 100644
--- a/Wonky.Client/wwwroot/appsettings.json
+++ b/Wonky.Client/wwwroot/appsettings.json
@@ -1,7 +1,7 @@
{
"appInfo": {
"name": "Wonky Online",
- "version": "157.1",
+ "version": "158.0",
"rc": true,
"sandBox": false,
"image": "grumpy-coder.png"
@@ -43,8 +43,8 @@
"serviceVatEu": "api/v2/services/vies",
"servicesVatNo": "api/v2/services/brReg",
"servicesAuth": "v2/token",
- "syncRpc": "api/v2/rpc",
- "syncRpcInvoiceExt": "invoices",
+ "sync": "api/v2/sync",
+ "syncInvoice": "api/v2/sync/invoices",
"systemDocStringUrl": "api/v2/admin/doc",
"systemLabels": "api/v2/admin/doc/labels",
"systemTexts": "api/v2/admin/doc/texts",
diff --git a/Wonky.Entity/Configuration/ApiConfig.cs b/Wonky.Entity/Configuration/ApiConfig.cs
index 80111d77..fbd62d58 100644
--- a/Wonky.Entity/Configuration/ApiConfig.cs
+++ b/Wonky.Entity/Configuration/ApiConfig.cs
@@ -140,12 +140,12 @@ public class ApiConfig
///
/// Base sync url
///
- public string SyncRpc { get; set; } = "";
+ public string Sync { get; set; } = "";
///
/// Application uri for updating customer product sale request
///
- public string SyncRpcInvoiceExt { get; set; } = "";
+ public string SyncInvoice { get; set; } = "";
///
/// Generic system string endpoint