diff --git a/Wonky.Client/Pages/CrmActivityCreate.razor b/Wonky.Client/Pages/CrmActivityCreate.razor index a34d3bdc..4a1bf873 100644 --- a/Wonky.Client/Pages/CrmActivityCreate.razor +++ b/Wonky.Client/Pages/CrmActivityCreate.razor @@ -22,7 +22,7 @@ @if (_dtoNgCrmCompany != null) {

@_poDraft.Name

- +
@@ -41,7 +41,7 @@
- @@ -327,12 +327,12 @@
-
+
- +
diff --git a/Wonky.Client/Pages/CrmActivityCreate.razor.cs b/Wonky.Client/Pages/CrmActivityCreate.razor.cs index bbd66558..9bbdec4e 100644 --- a/Wonky.Client/Pages/CrmActivityCreate.razor.cs +++ b/Wonky.Client/Pages/CrmActivityCreate.razor.cs @@ -43,12 +43,13 @@ public partial class CrmActivityCreate : IDisposable private List SalesItems { get; set; } = new(); // private MetaData _meta { get; set; } = new(); private Preferences _prefs { get; set; } = new(); - private DtoNgSalesHead _poDraft { get; set; } = new(); + private DtoNgSalesRepActivity _poDraft { get; set; } = new(); private DtoNgCrmCompany _dtoNgCrmCompany = new(); private CatalogPagingParams _paging = new(); private EditContext _createActivity { get; set; } private bool _poFormInvalid { get; set; } = true; private bool ShowItem { get; set; } + private bool HideButtons { get; set; } private string Quantity = "1"; private string Price = "0"; private string Discount = "0"; @@ -91,27 +92,37 @@ public partial class CrmActivityCreate : IDisposable _poDraft.ZipCode = _dtoNgCrmCompany.ZipCode; _poDraft.City = _dtoNgCrmCompany.City; - _poDraft.DlvName = ""; - _poDraft.DlvAddress1 = ""; - _poDraft.DlvAddress2 = ""; - _poDraft.DlvZipCode = ""; - _poDraft.DlvCity = ""; + _poDraft.DlvName = _dtoNgCrmCompany.Name; + _poDraft.DlvAddress1 = _dtoNgCrmCompany.Address1; + _poDraft.DlvAddress2 = _dtoNgCrmCompany.Address2; + _poDraft.DlvZipCode = _dtoNgCrmCompany.ZipCode; + _poDraft.DlvCity = _dtoNgCrmCompany.City; + } + + private async Task CreateCanvas() + { + HideButtons = true; + await CreateActivity(); + // post to create canvas endpoint } private async Task CreateOffer() { + HideButtons = true; await CreateActivity(); // post to create offer endpoint } private async Task CreateOrder() { + HideButtons = true; await CreateActivity(); // post to create order endpoint } private async Task CreateActivity() { + HideButtons = true; // write work date to preference await UserPrefs.SetWorkDate(_poDraft.ActivityDate); - var activityType = _poDraft.ActivityType switch + var activityType = _poDraft.ActivityTypeEnum switch { "caPhone" => "Tlf. ", "caOnSite" => "Bsg. ", @@ -140,7 +151,7 @@ public partial class CrmActivityCreate : IDisposable private void CheckActivity() { - InvalidActivityType = string.IsNullOrWhiteSpace(_poDraft.ActivityType); + InvalidActivityType = string.IsNullOrWhiteSpace(_poDraft.ActivityTypeEnum); Console.WriteLine($"invalidType => {InvalidActivityType}"); } @@ -229,7 +240,7 @@ public partial class CrmActivityCreate : IDisposable if(!VatUtils.ValidateFormat(_dtoNgCrmCompany.CountryCode, _poDraft.VatNumber)) ToastService.ShowWarning("CVR / ORG nummer er ikke et gyldigt registreringsnummer"); } - if (string.IsNullOrEmpty(_poDraft.ActivityType)) + if (string.IsNullOrEmpty(_poDraft.ActivityTypeEnum)) ToastService.ShowWarning("Aktivitet type kan ikke være tom"); _poFormInvalid = false; _createActivity.OnFieldChanged -= HandleFieldChanged; diff --git a/Wonky.Client/wwwroot/android-chrome-192x192.png b/Wonky.Client/wwwroot/android-chrome-192x192.png new file mode 100644 index 00000000..e73a8da4 Binary files /dev/null and b/Wonky.Client/wwwroot/android-chrome-192x192.png differ diff --git a/Wonky.Client/wwwroot/android-chrome-256x256.png b/Wonky.Client/wwwroot/android-chrome-256x256.png new file mode 100644 index 00000000..7f64bc04 Binary files /dev/null and b/Wonky.Client/wwwroot/android-chrome-256x256.png differ diff --git a/Wonky.Client/wwwroot/apple-touch-icon.png b/Wonky.Client/wwwroot/apple-touch-icon.png new file mode 100644 index 00000000..c95455ba Binary files /dev/null and b/Wonky.Client/wwwroot/apple-touch-icon.png differ diff --git a/Wonky.Client/wwwroot/appsettings.json b/Wonky.Client/wwwroot/appsettings.json index 3d8ed8c0..f4af2b20 100644 --- a/Wonky.Client/wwwroot/appsettings.json +++ b/Wonky.Client/wwwroot/appsettings.json @@ -7,7 +7,7 @@ } }, "apiConfig": { - "baseAddress": "https://api.innotec.dk", + "baseAddress": "https://staging.innotec.dk", "tokenPath": "token", "userInfo": "api/auth/userinfo", "crmCompanies": "api/v2/crm/companies", diff --git a/Wonky.Client/wwwroot/browserconfig.xml b/Wonky.Client/wwwroot/browserconfig.xml new file mode 100644 index 00000000..b3930d0f --- /dev/null +++ b/Wonky.Client/wwwroot/browserconfig.xml @@ -0,0 +1,9 @@ + + + + + + #da532c + + + diff --git a/Wonky.Client/wwwroot/favicon-16x16.png b/Wonky.Client/wwwroot/favicon-16x16.png new file mode 100644 index 00000000..5860eb68 Binary files /dev/null and b/Wonky.Client/wwwroot/favicon-16x16.png differ diff --git a/Wonky.Client/wwwroot/favicon-32x32.png b/Wonky.Client/wwwroot/favicon-32x32.png new file mode 100644 index 00000000..f23fb59a Binary files /dev/null and b/Wonky.Client/wwwroot/favicon-32x32.png differ diff --git a/Wonky.Client/wwwroot/favicon.ico b/Wonky.Client/wwwroot/favicon.ico index 63e859b4..9d58809c 100644 Binary files a/Wonky.Client/wwwroot/favicon.ico and b/Wonky.Client/wwwroot/favicon.ico differ diff --git a/Wonky.Client/wwwroot/icon-192.png b/Wonky.Client/wwwroot/icon-192.png deleted file mode 100644 index 166f56da..00000000 Binary files a/Wonky.Client/wwwroot/icon-192.png and /dev/null differ diff --git a/Wonky.Client/wwwroot/index.html b/Wonky.Client/wwwroot/index.html index 5565071f..d33b7c81 100644 --- a/Wonky.Client/wwwroot/index.html +++ b/Wonky.Client/wwwroot/index.html @@ -4,6 +4,13 @@ + + + + + + + Wonky Online diff --git a/Wonky.Client/wwwroot/mstile-150x150.png b/Wonky.Client/wwwroot/mstile-150x150.png new file mode 100644 index 00000000..6c6d735c Binary files /dev/null and b/Wonky.Client/wwwroot/mstile-150x150.png differ diff --git a/Wonky.Client/wwwroot/safari-pinned-tab.svg b/Wonky.Client/wwwroot/safari-pinned-tab.svg new file mode 100644 index 00000000..756bc588 --- /dev/null +++ b/Wonky.Client/wwwroot/safari-pinned-tab.svg @@ -0,0 +1,55 @@ + + + + +Created by potrace 1.14, written by Peter Selinger 2001-2017 + + + + + + + + + + + + + + + diff --git a/Wonky.Client/wwwroot/site.webmanifest b/Wonky.Client/wwwroot/site.webmanifest new file mode 100644 index 00000000..de65106f --- /dev/null +++ b/Wonky.Client/wwwroot/site.webmanifest @@ -0,0 +1,19 @@ +{ + "name": "", + "short_name": "", + "icons": [ + { + "src": "/android-chrome-192x192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "/android-chrome-256x256.png", + "sizes": "256x256", + "type": "image/png" + } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" +} diff --git a/Wonky.Entity/DTO/DtoNgCrmCompany.cs b/Wonky.Entity/DTO/DtoNgCrmCompany.cs index 97e37f4a..728b9859 100644 --- a/Wonky.Entity/DTO/DtoNgCrmCompany.cs +++ b/Wonky.Entity/DTO/DtoNgCrmCompany.cs @@ -34,7 +34,7 @@ public class DtoNgCrmCompany [MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")] public string Phone { get; set; } = ""; [MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")] public string Mobile { get; set; } = ""; [MaxLength(80, ErrorMessage = "Du kan højst bruge 80 tegn")] public string Email { get; set; } = ""; - [MaxLength(30, ErrorMessage = "Du kan højst bruge 30 tegn")] public string Attention { get; set; } = ""; + [MaxLength(100, ErrorMessage = "Du kan højst bruge 100 tegn")] public string Attention { get; set; } = ""; public string LastVisit { get; set; } = ""; public string NextVisit { get; set; } = ""; public int Interval { get; set; } = 8; diff --git a/Wonky.Entity/DTO/DtoNgSalesHead.cs b/Wonky.Entity/DTO/DtoNgSalesRepActivity.cs similarity index 91% rename from Wonky.Entity/DTO/DtoNgSalesHead.cs rename to Wonky.Entity/DTO/DtoNgSalesRepActivity.cs index 022756ae..3be31299 100644 --- a/Wonky.Entity/DTO/DtoNgSalesHead.cs +++ b/Wonky.Entity/DTO/DtoNgSalesRepActivity.cs @@ -17,26 +17,28 @@ using System.ComponentModel.DataAnnotations; namespace Wonky.Entity.DTO { - public class DtoNgSalesHead + public class DtoNgSalesRepActivity { public string SalesHeadId { get; set; } = ""; public string CompanyId { get; set; } = ""; - public string SalesRep { get; set; } = ""; - [MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")] public string Account { get; set; } = ""; + public string Account { get; set; } = ""; + [MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")] public string VatNumber { get; set; } = ""; [MaxLength(100, ErrorMessage = "Du kan højst bruge 100 tegn")] public string Name { get; set; } = ""; [MaxLength(30, ErrorMessage = "Du kan højst bruge 30 tegn")] public string City { get; set; }= ""; [MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")] public string ZipCode { get; set; } = ""; - [Required(ErrorMessage = "Vælg aktivitet")] public string ActivityType { get; set; } = ""; - [MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")] public string OurRef { get; set; } = ""; [MaxLength(100, ErrorMessage = "Du kan højst bruge 100 tegn")] public string Address { get; set; } = ""; [MaxLength(50, ErrorMessage = "Du kan højst bruge 50 tegn")] public string Address2 { get; set; } = ""; [MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")] public string Phone { get; set; } = ""; [MaxLength(80, ErrorMessage = "Du kan højst bruge 80 tegn")] public string EMail { get; set; } = ""; + [MaxLength(100, ErrorMessage = "Du kan højst bruge 100 tegn")] public string Attention { get; set; } = ""; // Form entries + public string SalesRep { get; set; } = ""; + [Required(ErrorMessage = "Vælg aktivitet")] public string ActivityTypeEnum { get; set; } = ""; + public string ActivityStatusEnum { get; set; } = ""; public bool CheckDate { get; set; } public DateTime ActivityDate { get; set; } [MaxLength(50, ErrorMessage = "Du kan højst bruge 50 tegn")] public string Demo { get; set; } = ""; - [MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")] public string VatNumber { get; set; } = ""; + [MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")] public string OurRef { get; set; } = ""; [MaxLength(20, ErrorMessage = "Du kan højst bruge 20 tegn")] public string ReferenceNumber { get; set; } = ""; [MaxLength(35, ErrorMessage = "Du kan højst bruge 35 tegn")] public string YourRef { get; set; } = ""; [MaxLength(255, ErrorMessage = "Du kan højst bruge 255 tegn")] public string OrderMessage { get; set; } = "";