+
-
diff --git a/Wonky.Client/Pages/CrmActivityNewPage.razor.cs b/Wonky.Client/Pages/CrmActivityNewPage.razor.cs
index 330bfa1e..3dd11fec 100644
--- a/Wonky.Client/Pages/CrmActivityNewPage.razor.cs
+++ b/Wonky.Client/Pages/CrmActivityNewPage.razor.cs
@@ -100,6 +100,7 @@ public partial class CrmActivityNewPage : IDisposable
{
Company.Phone = Company.Account[..8];
}
+
// Populate base activity information
Activity.BcId = Company.BcId;
Activity.ActivityStatusEnum = "noSale";
@@ -135,7 +136,7 @@ public partial class CrmActivityNewPage : IDisposable
ConfirmWorkDate.Show();
}
// Lines may already have been added from the company inventory page
- if (DraftStateProvider.Draft.Items.Any())
+ if (DraftStateProvider.Draft.DraftType == "order")
{
// set dropdown selection accordingly
Activity.ActivityTypeEnum = "onSite";
@@ -144,6 +145,7 @@ public partial class CrmActivityNewPage : IDisposable
}
StateHasChanged();
}
+
///
/// Work Date confirm callback
///
@@ -153,6 +155,18 @@ public partial class CrmActivityNewPage : IDisposable
ConfirmWorkDate.Hide();
StateHasChanged();
}
+
+ ///
+ /// Work Date component callback
+ ///
+ ///
+ private async Task WorkDateComponentCallback(string workDate)
+ {
+ ReportClosed = await CrmReportRepo.ReportExist(workDate);
+ SelectedDate = DateTime.Parse(workDate);
+ Activity.ActivityDate = workDate;
+ }
+
///
/// Show Price list modal
///
@@ -160,6 +174,7 @@ public partial class CrmActivityNewPage : IDisposable
{
PriceListModal.Show();
}
+
///
/// Price List modal callback
///
@@ -177,6 +192,7 @@ public partial class CrmActivityNewPage : IDisposable
StateHasChanged();
}
+
///
/// Show Price History modal
///
@@ -185,6 +201,7 @@ public partial class CrmActivityNewPage : IDisposable
if(ShowItem)
PriceHistoryModal.Show();
}
+
///
/// Price History modal callback
///
@@ -198,16 +215,6 @@ public partial class CrmActivityNewPage : IDisposable
StateHasChanged();
}
- ///
- /// Work Date component callback
- ///
- ///
- private async Task WorkDateComponentCallback(string workDate)
- {
- ReportClosed = await CrmReportRepo.ReportExist(workDate);
- SelectedDate = DateTime.Parse(workDate);
- Activity.ActivityDate = workDate;
- }
///
/// Validate and Create Activity
///
@@ -294,6 +301,7 @@ public partial class CrmActivityNewPage : IDisposable
PoFormInvalid = false;
Toast.ShowError(result.Message, "ORDRE FEJL");
}
+
///
/// Delete current draft
///
@@ -302,6 +310,7 @@ public partial class CrmActivityNewPage : IDisposable
await DraftStateProvider.DeleteDraftAsync();
Activity.ActivityStatusEnum = "noSale";
}
+
///
/// Add item to draft
///
@@ -330,6 +339,7 @@ public partial class CrmActivityNewPage : IDisposable
// save the item using the CartStateProvider's save method
await DraftStateProvider.SaveChangesAsync();
}
+
///
/// Remove item from draft
///
@@ -343,6 +353,7 @@ public partial class CrmActivityNewPage : IDisposable
if (!DraftStateProvider.Draft.Items.Any())
Activity.ActivityStatusEnum = "noSale";
}
+
///
/// Edit Context handle field change
///
@@ -350,6 +361,7 @@ public partial class CrmActivityNewPage : IDisposable
///
private void HandleFieldChanged(object sender, FieldChangedEventArgs e)
{
+ DraftStateProvider.Draft.DraftType = Activity.ActivityStatusEnum;
// InvalidCanvas = InvalidActivityType;
InvalidActivity = InvalidActivityType
|| PoFormInvalid
@@ -368,6 +380,7 @@ public partial class CrmActivityNewPage : IDisposable
PoFormInvalid = !ActivityContext.Validate();
StateHasChanged();
}
+
///
/// Edit Context handle validation change
///
@@ -387,6 +400,7 @@ public partial class CrmActivityNewPage : IDisposable
ActivityContext.OnFieldChanged += HandleFieldChanged;
ActivityContext.OnValidationStateChanged += ValidationChanged;
}
+
///
/// Implement Dispose from IDisposable
///
diff --git a/Wonky.Client/Pages/CrmCompanyQuotes.razor b/Wonky.Client/Pages/CrmCompanyQuotes.razor
new file mode 100644
index 00000000..c102c516
--- /dev/null
+++ b/Wonky.Client/Pages/CrmCompanyQuotes.razor
@@ -0,0 +1,15 @@
+@page "/companies/{CompanyId}/quotes"
+@using Wonky.Client.HttpInterfaces
+
+
Åbne tilbud
+
+
+@code {
+ [Inject] ICrmHistoryHttpRepository HistoryRepo { get; set; }
+
+ protected override Task OnParametersSetAsync()
+ {
+ return base.OnParametersSetAsync();
+ }
+
+}
\ No newline at end of file
diff --git a/Wonky.Client/Pages/CrmCompanyViewPage.razor b/Wonky.Client/Pages/CrmCompanyViewPage.razor
index a3760abf..ff44c841 100644
--- a/Wonky.Client/Pages/CrmCompanyViewPage.razor
+++ b/Wonky.Client/Pages/CrmCompanyViewPage.razor
@@ -98,7 +98,7 @@