diff --git a/Wonky.Client/OverlayOffice/OfficeOrderInventoryReorderOverlay.razor b/Wonky.Client/OverlayOffice/OfficeOrderInventoryReorderOverlay.razor
index 299bb48b..55b10276 100644
--- a/Wonky.Client/OverlayOffice/OfficeOrderInventoryReorderOverlay.razor
+++ b/Wonky.Client/OverlayOffice/OfficeOrderInventoryReorderOverlay.razor
@@ -21,7 +21,7 @@
@@ -107,7 +107,7 @@
@if (!SalesItem.Discontinued)
{
-
+
}
|
diff --git a/Wonky.Client/OverlayOrderCreate/CatalogPagedOverlay.razor b/Wonky.Client/OverlayOrderCreate/CatalogPagedOverlay.razor
index b7797b06..593d9c02 100644
--- a/Wonky.Client/OverlayOrderCreate/CatalogPagedOverlay.razor
+++ b/Wonky.Client/OverlayOrderCreate/CatalogPagedOverlay.razor
@@ -20,7 +20,7 @@
@@ -79,7 +79,7 @@
@rate.Quantity
@rate.Rate
diff --git a/Wonky.Client/OverlayOrderCreate/ProductCheckConfirmationOverlay.razor b/Wonky.Client/OverlayOrderCreate/ProductCheckConfirmationOverlay.razor
index 2e51c519..54d80f0e 100644
--- a/Wonky.Client/OverlayOrderCreate/ProductCheckConfirmationOverlay.razor
+++ b/Wonky.Client/OverlayOrderCreate/ProductCheckConfirmationOverlay.razor
@@ -19,15 +19,15 @@
@((MarkupString) BodyMessage)
diff --git a/Wonky.Client/OverlayOrderCreate/ProductHistoryOverlay.razor b/Wonky.Client/OverlayOrderCreate/ProductHistoryOverlay.razor
index bc4163f2..15e8fe96 100644
--- a/Wonky.Client/OverlayOrderCreate/ProductHistoryOverlay.razor
+++ b/Wonky.Client/OverlayOrderCreate/ProductHistoryOverlay.razor
@@ -20,7 +20,7 @@
@if (!string.IsNullOrWhiteSpace(ProductName))
diff --git a/Wonky.Client/OverlayOrderCreate/ProductPriceHistoryOverlay.razor b/Wonky.Client/OverlayOrderCreate/ProductPriceHistoryOverlay.razor
index a44ee1cf..625d7b06 100644
--- a/Wonky.Client/OverlayOrderCreate/ProductPriceHistoryOverlay.razor
+++ b/Wonky.Client/OverlayOrderCreate/ProductPriceHistoryOverlay.razor
@@ -18,7 +18,7 @@
@if (!string.IsNullOrWhiteSpace(ProductName))
@@ -44,7 +44,7 @@
@entry.Discount |
@entry.Price |
-
+
|
}
diff --git a/Wonky.Client/Pages/AdvisorActivityCreatePage.razor b/Wonky.Client/Pages/AdvisorActivityCreatePage.razor
index fed52a55..f7702754 100644
--- a/Wonky.Client/Pages/AdvisorActivityCreatePage.razor
+++ b/Wonky.Client/Pages/AdvisorActivityCreatePage.razor
@@ -114,7 +114,25 @@ else
}
- @if (!Kanvas)
+ @if (Kanvas)
+ {
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ }
+ else
{
@@ -157,20 +175,18 @@ else
+
+
+
+
+
+
+
+
+
+
+
}
-
-
-
-
-
-
-
-
-
-
-
-
-
@if (!Kanvas)
@@ -180,23 +196,23 @@ else
@*
***************** Invoice history overlay *****************************
*@
-
+
@*
***************** Visit hisotry overlay *****************************
*@
-
+
@*
***************** Product Inventory overlay *****************************
*@
-
+
-
+
@* Draft lines in draft -----------------------------------------------------*@
@@ -210,7 +226,7 @@ else
@*
***************** Reset draft *****************************
*@
-
+
@@ -243,7 +259,7 @@ else
@*
***************** Remove item *****************************
*@
-
+
}
@@ -257,7 +273,7 @@ else
@*
***************** Price catalog overlay button *****************************
*@
-
@* Delivery address *@
-
+
diff --git a/Wonky.Client/Pages/AdvisorActivityViewEditPage.razor b/Wonky.Client/Pages/AdvisorActivityViewEditPage.razor
index 8cb5a665..3f749b71 100644
--- a/Wonky.Client/Pages/AdvisorActivityViewEditPage.razor
+++ b/Wonky.Client/Pages/AdvisorActivityViewEditPage.razor
@@ -142,7 +142,7 @@
- Opdater Note /Kontor
+ Opdater Note /Kontor
diff --git a/Wonky.Client/Pages/AdvisorCustomerCreatePage.razor b/Wonky.Client/Pages/AdvisorCustomerCreatePage.razor
index ec32ac6c..7da11f27 100644
--- a/Wonky.Client/Pages/AdvisorCustomerCreatePage.razor
+++ b/Wonky.Client/Pages/AdvisorCustomerCreatePage.razor
@@ -35,7 +35,7 @@
@switch (Company.CountryCode)
{
case "dk":
-
Firma søgning
+
Firma søgning
break;
case "no":
Firma søgning
diff --git a/Wonky.Client/Pages/AdvisorCustomerPagedListPage.razor b/Wonky.Client/Pages/AdvisorCustomerPagedListPage.razor
index bfaf9ada..ccb23cbb 100644
--- a/Wonky.Client/Pages/AdvisorCustomerPagedListPage.razor
+++ b/Wonky.Client/Pages/AdvisorCustomerPagedListPage.razor
@@ -34,14 +34,14 @@
-
+
@ToggleFoldedText
-
+
@ToggleHiddenText
diff --git a/Wonky.Client/Pages/AdvisorCustomerViewEditPage.razor b/Wonky.Client/Pages/AdvisorCustomerViewEditPage.razor
index 144a7879..ea496fd6 100644
--- a/Wonky.Client/Pages/AdvisorCustomerViewEditPage.razor
+++ b/Wonky.Client/Pages/AdvisorCustomerViewEditPage.razor
@@ -142,11 +142,11 @@
@* Enable edit/save *@
- STAM data
+ STAM data
@* Force enable visit *@
- Aktiver besøg
+ Aktiver besøg
@* Save erp data *@
@@ -165,14 +165,14 @@
@* Enable edit/save vatnumber *@
- ORG Nr.
+ ORG Nr.
@* vat lookup *@
@switch (CountryCode)
{
case "dk":
-
CVR
+
CVR
break;
case "no":
brreg.no
@@ -184,7 +184,7 @@
@* save vat number *@
- Moms/Org Nr.
+ Moms/Org Nr.
}
@@ -239,7 +239,7 @@
@* Save CRM data button *@
- CRM data
+ CRM data
@* crm context - contacts *@
@@ -247,7 +247,7 @@
@@ -130,7 +130,7 @@
@*
***************** Reset draft *****************************
*@
-
Slet kladde
+
Slet kladde
@@ -159,7 +159,7 @@
@*
***************** Remove draft line *****************************
*@
- RemoveItem(cartItem))"> Slet Linje
+ Slet Linje
}
@@ -172,7 +172,7 @@
@*
***************** Product Catalog overlay *****************************
*@
-
+
Ny linje
@@ -202,27 +202,27 @@
-
+
|
-
+
@*
-
+
*@
|
-
+
|
@SelectedItem.Sku |
@*
***************** Add line to draft *****************************
*@
- AddItem(SelectedItem))">@Quantity stk. @SelectedItem.Name
+ @Quantity stk. @SelectedItem.Name
|
@@ -238,7 +238,7 @@
@*
***************** Submit order to erp system *****************************
*@
- Opret ordre
+ Opret ordre
diff --git a/Wonky.Client/Pages/OfficeOrderCreatePage.razor.cs b/Wonky.Client/Pages/OfficeOrderCreatePage.razor.cs
index 02e82197..47400160 100644
--- a/Wonky.Client/Pages/OfficeOrderCreatePage.razor.cs
+++ b/Wonky.Client/Pages/OfficeOrderCreatePage.razor.cs
@@ -130,6 +130,7 @@ public partial class OfficeOrderCreatePage : IDisposable
// set activity salesRep and countryCode
Activity.SalesRep = SalesRep.SalesRep;
Activity.CountryCode = SalesRep.CountryCode;
+ Activity.SalesRepId = Company.SalesRepId;
// add customer info into activity properties
Activity.Account = Company.Account;
@@ -149,25 +150,25 @@ public partial class OfficeOrderCreatePage : IDisposable
Activity.DlvCity = Company.City;
Activity.BcId = Company.BcId;
Activity.CompanyId = Company.CompanyId;
- Activity.SalesRepId = Company.SalesRepId;
// setting up activity properties
- Activity.ActivityStatusEnum = "noSale";
- Activity.ActivityVisitEnum = "recall";
+ Activity.ActivityVisitEnum = "none";
Activity.ActivityTypeEnum = "phone";
Activity.ActivityStatusEnum = "order";
- Activity.OurRef = $"T:{UserInfo.FirstName}";
+ Activity.OurRef = $"INNOTEC:{UserInfo.FirstName}";
// Initialize date variable
SelectedDate = DateTime.Now;
Working = false;
}
+
private async Task DeleteDraft()
{
await DraftProvider.DeleteDraftAsync();
}
+
private async Task RemoveItem(DraftItem item)
{
// remove item
@@ -176,6 +177,7 @@ public partial class OfficeOrderCreatePage : IDisposable
await DraftProvider.SaveChangesAsync();
}
+
private async Task AddItem(SalesItemView salesItem)
{
ShowItem = false;
@@ -199,6 +201,7 @@ public partial class OfficeOrderCreatePage : IDisposable
await DraftProvider.SaveChangesAsync();
}
+
private async Task PriceListCallback(SelectedSku sku)
{
// get selected item
@@ -211,24 +214,31 @@ public partial class OfficeOrderCreatePage : IDisposable
StateHasChanged();
}
+
private void ShowCatalogOverlay()
{
CatalogOverlay.Show();
}
+
private void ShowInvoiceOverlay()
{
InvoiceListOverlay.Show();
}
+
+
private void ShowVisitOverlay()
{
ActivityListOverlay.Show();
}
+
+
private void ShowInventoryOverlay()
{
InventoryListOverlay.Show();
}
+
private async Task CreateActivity()
{
// avoid duplication
@@ -327,7 +337,6 @@ public partial class OfficeOrderCreatePage : IDisposable
Working = false;
// show error message
Toaster.ShowError(result.Message);
-
}
private void InventoryCallback(DraftItem item)
diff --git a/Wonky.Client/Pages/OfficeOrderViewPage.razor b/Wonky.Client/Pages/OfficeOrderViewPage.razor
index 08153fc2..8ad1583a 100644
--- a/Wonky.Client/Pages/OfficeOrderViewPage.razor
+++ b/Wonky.Client/Pages/OfficeOrderViewPage.razor
@@ -35,7 +35,7 @@
- Kvitter for modtagelse
+ Kvitter for modtagelse
diff --git a/Wonky.Client/Pages/SupervisorDocumentViewEditPage.razor b/Wonky.Client/Pages/SupervisorDocumentViewEditPage.razor
index a77a5a2d..9ab5205b 100644
--- a/Wonky.Client/Pages/SupervisorDocumentViewEditPage.razor
+++ b/Wonky.Client/Pages/SupervisorDocumentViewEditPage.razor
@@ -70,7 +70,7 @@
- SLET
+ SLET
- ReadOnly = !ReadOnly">Rediger
+ Rediger
Gem
@@ -185,7 +185,7 @@
diff --git a/Wonky.Client/Pages/WarehouseOrderViewPage.razor b/Wonky.Client/Pages/WarehouseOrderViewPage.razor
index 460835f7..9ba61c7b 100644
--- a/Wonky.Client/Pages/WarehouseOrderViewPage.razor
+++ b/Wonky.Client/Pages/WarehouseOrderViewPage.razor
@@ -108,15 +108,15 @@
@if (Order.ProcessStatusEnum.ToLower() is "none" or "printed")
{
- Sæt status plukket
+ Sæt status plukket
}
@if (Order.ProcessStatusEnum.ToLower() == "picked")
{
- Sæt status pakket
+ Sæt status pakket
}
@if (Order.ProcessStatusEnum.ToLower() == "packed")
{
- Sæt status afsendt
+ Sæt status afsendt
}
diff --git a/Wonky.Client/Shared/AuthStateProvider.cs b/Wonky.Client/Shared/AuthStateProvider.cs
index 64902f2a..746b2eeb 100644
--- a/Wonky.Client/Shared/AuthStateProvider.cs
+++ b/Wonky.Client/Shared/AuthStateProvider.cs
@@ -30,6 +30,7 @@ public class AuthStateProvider : AuthenticationStateProvider
private readonly AuthenticationState _anonymous;
private readonly IUserInfoService _infoService;
+
public AuthStateProvider(HttpClient client, IUserInfoService infoService)
{
_client = client;
@@ -37,15 +38,20 @@ public class AuthStateProvider : AuthenticationStateProvider
_anonymous = new AuthenticationState(new ClaimsPrincipal(new ClaimsIdentity()));
}
+
public override async Task
GetAuthenticationStateAsync()
{
var token = await _infoService.GetAccessToken();
if (string.IsNullOrEmpty(token))
+ {
return _anonymous;
+ }
var userInfo = await _infoService.GetUserInfo();
- if (userInfo == null)
+ if (string.IsNullOrWhiteSpace(userInfo.UserId))
+ {
return _anonymous;
+ }
_client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("bearer", token);
var exp = await _infoService.GetExpiration();
@@ -59,18 +65,22 @@ public class AuthStateProvider : AuthenticationStateProvider
};
claims.AddRange(
from role in userInfo.AssignedRoles
- where role.Assigned select new Claim(ClaimTypes.Role, role.Name));
+ where role.Assigned select new Claim(ClaimTypes.Role, role.Name)
+ );
// return the authState for the user
return new AuthenticationState(
new ClaimsPrincipal(
new ClaimsIdentity(claims, "token")));
}
-
+
+
public async void NotifyUserAuthenticationAsync(string token)
{
if (string.IsNullOrEmpty(token))
+ {
return;
+ }
_client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("bearer", token);
@@ -96,6 +106,8 @@ public class AuthStateProvider : AuthenticationStateProvider
NotifyAuthenticationStateChanged(authState);
}
+
+
public void NotifyUserLogout()
{
var authState = Task.FromResult(_anonymous);
diff --git a/Wonky.Client/Shared/ConfirmWorkDateModal.razor b/Wonky.Client/Shared/ConfirmWorkDateModal.razor
index 2a2a0cc5..bb7e6b64 100644
--- a/Wonky.Client/Shared/ConfirmWorkDateModal.razor
+++ b/Wonky.Client/Shared/ConfirmWorkDateModal.razor
@@ -19,14 +19,14 @@
diff --git a/Wonky.Client/Shared/ConfirmationModal.razor b/Wonky.Client/Shared/ConfirmationModal.razor
index 16eeb3f3..cc685bbb 100644
--- a/Wonky.Client/Shared/ConfirmationModal.razor
+++ b/Wonky.Client/Shared/ConfirmationModal.razor
@@ -19,14 +19,14 @@
@((MarkupString) BodyMessage)