diff --git a/Wonky.Client/Components/ActivityTableComponent.razor b/Wonky.Client/Components/ActivityTableComponent.razor index 93b7912c..fe44779b 100644 --- a/Wonky.Client/Components/ActivityTableComponent.razor +++ b/Wonky.Client/Components/ActivityTableComponent.razor @@ -19,13 +19,13 @@ { - + - + - - + + @@ -33,14 +33,20 @@ @foreach (var activity in Activities) { - + + - + - - + + } + + + + +
KundeBynavnBynavn Demo SalgNotatNotesas Beløb
@activity.ViewCompany.Name, @activity.ViewCompany.ZipCity@activity.Company.Name@activity.Company.City @activity.Demo@activity.SalesResume@activity.Sales @activity.OfficeNote@activity.@(activity.Closed ? @activity.OrderAmount : 0)@activity.SasAmount@(activity.StatusTypeEnum == "Quote" ? 0 : activity.OrderAmount)
Total@Activities.Sum(x => x.OrderAmount)
} \ No newline at end of file diff --git a/Wonky.Client/Components/ActivityTableComponent.razor.cs b/Wonky.Client/Components/ActivityTableComponent.razor.cs index 897bfac2..d55a89f2 100644 --- a/Wonky.Client/Components/ActivityTableComponent.razor.cs +++ b/Wonky.Client/Components/ActivityTableComponent.razor.cs @@ -5,5 +5,5 @@ namespace Wonky.Client.Components; public partial class ActivityTableComponent { - [Parameter] public List Activities { get; set; } + [Parameter] public List Activities { get; set; } } \ No newline at end of file diff --git a/Wonky.Client/Components/AppSpinner.razor b/Wonky.Client/Components/AppSpinner.razor index facd837f..16f0cfc1 100644 --- a/Wonky.Client/Components/AppSpinner.razor +++ b/Wonky.Client/Components/AppSpinner.razor @@ -14,6 +14,6 @@ // along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html] // *@ -
- Venter på svar ... Afventer server ... +
+ Loading...
diff --git a/Wonky.Client/Components/ReportActivityLedgerComponent.razor b/Wonky.Client/Components/ReportActivityLedgerComponent.razor index 5192b7bc..0f93b8df 100644 --- a/Wonky.Client/Components/ReportActivityLedgerComponent.razor +++ b/Wonky.Client/Components/ReportActivityLedgerComponent.razor @@ -19,7 +19,7 @@ - Dagens Demo @(Report.NewDemoCount + Report.RecallDemoCount) + Dagens Demo @(ReportData.NewDemoCount + ReportData.RecallDemoCount) Dagens Resultat Måneds Resultat @@ -38,47 +38,47 @@ N - @Report.NewVisitCount - @Report.NewDemoCount - @Report.NewSaleCount - @Report.NewTurnover - @Report.NewVisitCountMonth - @Report.NewDemoCountMonth - @Report.NewSaleCountMonth - @Report.NewTurnoverMonth + @ReportData.NewVisitCount + @ReportData.NewDemoCount + @ReportData.NewSaleCount + @ReportData.NewTurnover + @ReportData.NewVisitCountMonth + @ReportData.NewDemoCountMonth + @ReportData.NewSaleCountMonth + @ReportData.NewTurnoverMonth R - @Report.RecallVisitCount - @Report.RecallDemoCount - @Report.RecallSaleCount - @Report.RecallTurnover - @Report.RecallVisitCountMonth - @Report.RecallDemoCountMonth - @Report.RecallSaleCountMonth - @Report.RecallTurnoverMonth + @ReportData.RecallVisitCount + @ReportData.RecallDemoCount + @ReportData.RecallSaleCount + @ReportData.RecallTurnover + @ReportData.RecallVisitCountMonth + @ReportData.RecallDemoCountMonth + @ReportData.RecallSaleCountMonth + @ReportData.RecallTurnoverMonth SAS - @Report.SasCount - @Report.SasTurnover + @ReportData.SasCount + @ReportData.SasTurnover - @Report.SasCountMonth - @Report.SasTurnoverMonth + @ReportData.SasCountMonth + @ReportData.SasTurnoverMonth TOTAL - @Report.TotalVisitCount - @Report.TotalDemoCount - @Report.TotalSaleCount - @Report.TotalTurnover - @Report.TotalVisitCountMonth - @Report.TotalDemoCountMonth - @Report.TotalSaleCountMonth - @Report.TotalTurnoverMonth + @ReportData.TotalVisitCount + @ReportData.TotalDemoCount + @ReportData.TotalSaleCount + @ReportData.TotalTurnover + @ReportData.TotalVisitCountMonth + @ReportData.TotalDemoCountMonth + @ReportData.TotalSaleCountMonth + @ReportData.TotalTurnoverMonth diff --git a/Wonky.Client/Components/ReportActivityLedgerComponent.razor.cs b/Wonky.Client/Components/ReportActivityLedgerComponent.razor.cs index d0ccf0af..5f5633fc 100644 --- a/Wonky.Client/Components/ReportActivityLedgerComponent.razor.cs +++ b/Wonky.Client/Components/ReportActivityLedgerComponent.razor.cs @@ -6,5 +6,5 @@ namespace Wonky.Client.Components; public partial class ReportActivityLedgerComponent { [Parameter] - public NgSalesReport Report { get; set; } + public SalesReportDataViewModel ReportData { get; set; } } \ No newline at end of file diff --git a/Wonky.Client/Components/ReportDistanceLedgerComponent.razor b/Wonky.Client/Components/ReportDistanceLedgerComponent.razor index d4269bee..16f239e0 100644 --- a/Wonky.Client/Components/ReportDistanceLedgerComponent.razor +++ b/Wonky.Client/Components/ReportDistanceLedgerComponent.razor @@ -17,35 +17,36 @@ - - - - - - - + - - - - - - + + + + + + + + + + + + + + + + + + + + + +
- Km Aften - - Km Morgen - - Km Kørt Dag - - Km Kørt Md. - - Km Privat - - Km Privat Md. +
+ Km regnskab
@Report.KmEvening@Report.KmMorning@Report.Distance@Report.DistanceMonth@Report.DistancePrivate@Report.DistancePrivateMonthKm Aften@ReportData.KmEvening
Km Morgen@ReportData.KmMorning
Km Kørt Dag@ReportData.Distance
Km Kørt Md.@ReportData.DistanceMonth
Km Privat@ReportData.DistancePrivate
Km Privat Md.@ReportData.DistancePrivateMonth
diff --git a/Wonky.Client/Components/ReportDistanceLedgerComponent.razor.cs b/Wonky.Client/Components/ReportDistanceLedgerComponent.razor.cs index 05019f4b..7b451820 100644 --- a/Wonky.Client/Components/ReportDistanceLedgerComponent.razor.cs +++ b/Wonky.Client/Components/ReportDistanceLedgerComponent.razor.cs @@ -6,6 +6,6 @@ namespace Wonky.Client.Components; public partial class ReportDistanceLedgerComponent { [Parameter] - public NgSalesReport Report { get; set; } + public SalesReportDataViewModel ReportData { get; set; } } \ No newline at end of file diff --git a/Wonky.Client/Components/ReportSummaryComponent.razor b/Wonky.Client/Components/ReportSummaryComponent.razor index 8d70c704..3ee84d57 100644 --- a/Wonky.Client/Components/ReportSummaryComponent.razor +++ b/Wonky.Client/Components/ReportSummaryComponent.razor @@ -17,16 +17,46 @@ - - - + + - - + + + + + + + + + + - -
BeskrivelseMedkørende Supervisor
+ Rapport +
@Report.Description@Report.SupervisedByBeskrivelse@ReportData.Description
Supervisor@ReportData.SupervisedBy
Dagtype + @{ + switch (ReportData.DayTypeEnum) + { + case "Sales": + Salgsdag: @ReportData.SalesDayNumber + break; + case "SickLeave": + Sygdom + break; + case "Office": + Kontordag + break; + case "Meeting": + Salgsmøde + break; + case "Leave": + Ferie + break; + } + } +
+ + \ No newline at end of file diff --git a/Wonky.Client/Components/ReportSummaryComponent.razor.cs b/Wonky.Client/Components/ReportSummaryComponent.razor.cs index bf196367..b8f26d05 100644 --- a/Wonky.Client/Components/ReportSummaryComponent.razor.cs +++ b/Wonky.Client/Components/ReportSummaryComponent.razor.cs @@ -6,6 +6,6 @@ namespace Wonky.Client.Components; public partial class ReportSummaryComponent { [Parameter] - public NgSalesReport Report { get; set; } + public SalesReportDataViewModel ReportData { get; set; } } \ No newline at end of file diff --git a/Wonky.Client/HttpRepository/AdminReportHttpRepository.cs b/Wonky.Client/HttpRepository/AdminReportHttpRepository.cs index 50423b49..34d7b6cb 100644 --- a/Wonky.Client/HttpRepository/AdminReportHttpRepository.cs +++ b/Wonky.Client/HttpRepository/AdminReportHttpRepository.cs @@ -35,9 +35,9 @@ public class AdminReportHttpRepository : IAdminReportHttpRepository return await _client.GetFromJsonAsync>($"{_apiConfig.AdminAdviserUri}/{userId}/reports"); } - public async Task GetReport(string userId, string workDate) + public async Task GetReport(string userId, string workDate) { - return await _client.GetFromJsonAsync($"{_apiConfig.AdminAdviserUri}/{userId}/reports/{workDate}"); + return await _client.GetFromJsonAsync($"{_apiConfig.AdminAdviserUri}/{userId}/reports/{workDate}"); } } \ No newline at end of file diff --git a/Wonky.Client/HttpRepository/IAdminReportHttpRepository.cs b/Wonky.Client/HttpRepository/IAdminReportHttpRepository.cs index 62a99fee..8c7362e4 100644 --- a/Wonky.Client/HttpRepository/IAdminReportHttpRepository.cs +++ b/Wonky.Client/HttpRepository/IAdminReportHttpRepository.cs @@ -7,5 +7,5 @@ namespace Wonky.Client.HttpRepository; public interface IAdminReportHttpRepository { Task> GetReports(string userId); - Task GetReport(string userId, string workDate); + Task GetReport(string userId, string workDate); } \ No newline at end of file diff --git a/Wonky.Client/HttpRepository/IReportHttpRepository.cs b/Wonky.Client/HttpRepository/IReportHttpRepository.cs index ad5b60b6..9271fb5b 100644 --- a/Wonky.Client/HttpRepository/IReportHttpRepository.cs +++ b/Wonky.Client/HttpRepository/IReportHttpRepository.cs @@ -8,7 +8,7 @@ public interface IReportHttpRepository { Task ReportExist(string workDate); Task> GetReports(); - Task GetReport(string workDate); + Task GetReport(string workDate); Task InitializeReportData(string workDate); Task PostReport(string workDate, ReportDto reportDto); } \ No newline at end of file diff --git a/Wonky.Client/HttpRepository/ReportHttpRepository.cs b/Wonky.Client/HttpRepository/ReportHttpRepository.cs index 2fc470b2..03156da9 100644 --- a/Wonky.Client/HttpRepository/ReportHttpRepository.cs +++ b/Wonky.Client/HttpRepository/ReportHttpRepository.cs @@ -38,13 +38,13 @@ public class ReportHttpRepository :IReportHttpRepository { var result = await _client - .GetFromJsonAsync($"{_apiConfig.ReportUri}/exist/{workDate}"); + .GetFromJsonAsync($"{_apiConfig.ReportUri}/exist/{workDate}"); return result.ReportClosed; } - public async Task GetReport(string workDate) + public async Task GetReport(string workDate) { - return await _client.GetFromJsonAsync($"{_apiConfig.ReportUri}/{workDate}"); + return await _client.GetFromJsonAsync($"{_apiConfig.ReportUri}/{workDate}"); } public async Task InitializeReportData(string workDate) diff --git a/Wonky.Client/Pages/ActivityVisitNew.razor b/Wonky.Client/Pages/ActivityVisitNew.razor index 545ebb7f..136528ef 100644 --- a/Wonky.Client/Pages/ActivityVisitNew.razor +++ b/Wonky.Client/Pages/ActivityVisitNew.razor @@ -52,7 +52,7 @@
- @if (!string.IsNullOrEmpty(_draft.VatNumber) && string.IsNullOrWhiteSpace(_draft.Address1)) + @if (!string.IsNullOrEmpty(_draft.VatNumber) && !string.IsNullOrWhiteSpace(_draft.Address1)) { @@ -118,21 +118,27 @@
- @* Order draft lines *@ -
-
- Kladdelinjer Global kladde (udløber efter @(DraftStateProvider.Draft.TimeToLiveInSeconds / 60)m inaktivitet) -
-
- +
+
+ @* Order draft lines *@ +
- + + + + + - + + @@ -146,119 +152,102 @@ - - } - - - - - - - - } + + + + + + + +
+ Ordrekladde Global kladde (udløber efter @(DraftStateProvider.Draft.TimeToLiveInSeconds / 60)m inaktivitet) + + +
Navn Varenr Antal Enhedspris Linjesum SAS
@cItem.Quantity @cItem.Price @cItem.LineTotal + - + +
Total@DraftStateProvider.Draft.Total
Total@DraftStateProvider.Draft.Total
-
-
- -
-
- @* draft line *@ - @if (_selectedItem != null && ShowItem) - { -
-
Kladdelinje
-
-
-
- Varenavn -
-
- Varenr -
-
- Antal -
-
- Pris -
-
- Rabat -
-
- SAS -
-
- -
-
-
-
- @_selectedItem.Name -
-
- @_selectedItem.Sku -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
+
+
+ @* draft line *@ + @if (_selectedItem != null && ShowItem) + { + + + + + + + + + + + + + + + + + + + + + + + + +
Kladdelinje
AntalPrisRabatSASVarenr.
+ + + + + + + + @_selectedItem.Sku + +
+ }
- } - @* catalog *@ -
-
-
-
- +
+
+
+ @* catalog *@ +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
-
- -
-
- -
-
- -
-
- +
+
+ +
-
-
- -
-
- @if (_caltalog.Any()) + @if (_catalog.Any()) { - + @@ -266,7 +255,7 @@ - @foreach (var item in _caltalog) + @foreach (var item in _catalog) { @@ -279,9 +268,9 @@
  • @rate.Quantity
    @rate.Rate
    - +
  • } @@ -293,7 +282,7 @@ } else { - +
    Der er ingen data
    } diff --git a/Wonky.Client/Pages/ActivityVisitNew.razor.cs b/Wonky.Client/Pages/ActivityVisitNew.razor.cs index b118d569..5add12ee 100644 --- a/Wonky.Client/Pages/ActivityVisitNew.razor.cs +++ b/Wonky.Client/Pages/ActivityVisitNew.razor.cs @@ -50,7 +50,7 @@ public partial class ActivityVisitNew : IDisposable // variables private readonly JsonSerializerOptions? _options = new JsonSerializerOptions{PropertyNameCaseInsensitive = true}; private SalesItemView _selectedItem { get; set; } = new(); - private List _caltalog { get; set; } = new(); + private List _catalog { get; set; } = new(); private MetaData _metaData { get; set; } = new(); private Preferences _prefs { get; set; } = new(); private ActivityDto _draft { get; set; } = new(); @@ -194,7 +194,7 @@ public partial class ActivityVisitNew : IDisposable private void SelectItem(string itemId, string quantity, string price) { ShowItem = true; - _selectedItem = (from x in _caltalog where x.ItemId == itemId select x).First(); + _selectedItem = (from x in _catalog where x.ItemId == itemId select x).First(); Price = price; Quantity = quantity; } @@ -230,14 +230,14 @@ public partial class ActivityVisitNew : IDisposable } private async Task SetItemGroup(string groupFilter) { - _caltalog = new List(); + _catalog = new List(); _paging.PageNumber = 1; _paging.SelectGroup = groupFilter; await GetSalesItems(); } private async Task SetSearchCol(string columnName) { - _caltalog = new List(); + _catalog = new List(); _paging.PageNumber = 1; _paging.SearchTerm = ""; _paging.SearchColumn = columnName; @@ -245,27 +245,27 @@ public partial class ActivityVisitNew : IDisposable } private async Task SetSortCol(string orderBy) { - _caltalog = new List(); + _catalog = new List(); _paging.OrderBy = orderBy; await GetSalesItems(); } private async Task SetSearchPhrase(string searchTerm) { - _caltalog = new List(); + _catalog = new List(); _paging.PageNumber = 1; _paging.SearchTerm = searchTerm; await GetSalesItems(); } private async Task SelectedPage(int page) { - _caltalog = new List(); + _catalog = new List(); _paging.PageNumber = page; await GetSalesItems(); } private async Task SetPageSize(string pageSize) { - _caltalog = new List(); + _catalog = new List(); _paging.PageSize = Convert.ToInt32(pageSize); _paging.PageNumber = 1; await GetSalesItems(); @@ -274,7 +274,7 @@ public partial class ActivityVisitNew : IDisposable private async Task GetSalesItems() { var response = await _itemRepo.GetSalesItemsPaged(_paging); - _caltalog = response.Items!; + _catalog = response.Items!; _metaData = response.MetaData; } diff --git a/Wonky.Client/Pages/AdminSalesReportView.razor b/Wonky.Client/Pages/AdminSalesReportView.razor index cb9ac4b0..ba6bad02 100644 --- a/Wonky.Client/Pages/AdminSalesReportView.razor +++ b/Wonky.Client/Pages/AdminSalesReportView.razor @@ -20,7 +20,7 @@ @page "/admin/users/advisers/{CountryCode}/{UserId}/reports/{ReportDate}" @attribute [Authorize(Roles = "Admin")] -@_report.Report.Name +@_report.ReportData.Name
    @@ -31,19 +31,32 @@

    @DateTime.Parse(ReportDate).ToLongDateString()

    }
    -
    - -
    -

    @_report.Report.Name

    +

    @_report.ReportData.Name

    - - +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    \ No newline at end of file diff --git a/Wonky.Client/Pages/AdminSalesReportView.razor.cs b/Wonky.Client/Pages/AdminSalesReportView.razor.cs index 600cee68..c23d1593 100644 --- a/Wonky.Client/Pages/AdminSalesReportView.razor.cs +++ b/Wonky.Client/Pages/AdminSalesReportView.razor.cs @@ -11,24 +11,21 @@ public partial class AdminSalesReportView [Parameter] public string UserId { get; set; } = ""; [Parameter] public string CountryCode { get; set; } = ""; [Inject] private IAdminReportHttpRepository _reportRepo { get; set; } - private NgSalesReportView _report { get; set; } = new(); - - protected override async Task OnInitializedAsync() - { - if (!string.IsNullOrWhiteSpace(ReportDate)) - { - await GetReport(ReportDate); - } - } + private SalesReportViewModel _report { get; set; } = new(); + protected override async Task OnParametersSetAsync() + { + await GetReport(ReportDate); + } + private async Task GetReport(string workDate) { ReportDate = workDate; - _report = new NgSalesReportView(); + _report = new SalesReportViewModel(); _report = await GetUserReport(UserId, workDate); } - private async Task GetUserReport(string userId, string workDate) + private async Task GetUserReport(string userId, string workDate) { return _report = await _reportRepo.GetReport(userId, workDate); } diff --git a/Wonky.Client/Pages/SalesReportNew.razor b/Wonky.Client/Pages/SalesReportNew.razor index 13cd901b..7c61a175 100644 --- a/Wonky.Client/Pages/SalesReportNew.razor +++ b/Wonky.Client/Pages/SalesReportNew.razor @@ -24,13 +24,13 @@
    -
    +

    @(_workDate.ToLongDateString())

    -
    +
    -
    +
    @if (_working) { @@ -222,28 +222,32 @@
    Navn Varenr Fork
    @item.Name
    - + + - - + + + @foreach (var activity in _activities) { - + + - - + + + + } - - - - + + +
    BesøgKundeBynavn Demo SalgBeløbNotesasBeløb
    @activity.ViewCompany.Name - @activity.ViewCompany.ZipCity@activity.Company.Name@activity.Company.City @activity.Demo@activity.SalesResume@activity.OrderAmount@activity.Sales@activity.OfficeNote@activity.SasAmount@activity.OrderAmount
    Total@_report.Figures.TotalTurnoverTotal@_activities.Sum(x => x.OrderAmount)
    @@ -251,4 +255,4 @@ }
    - \ No newline at end of file + diff --git a/Wonky.Client/Pages/SalesReportNew.razor.cs b/Wonky.Client/Pages/SalesReportNew.razor.cs index 5f72a795..b615d2b4 100644 --- a/Wonky.Client/Pages/SalesReportNew.razor.cs +++ b/Wonky.Client/Pages/SalesReportNew.razor.cs @@ -40,7 +40,7 @@ public partial class SalesReportNew : IDisposable [Inject] private IToastService _toast { get; set; } private EditContext _editContext { get; set; } private ReportDto _report { get; set; } = new(); - private List _activities { get; set; } = new(); + private List _activities { get; set; } = new(); private ReportFiguresDto _init { get; set; } private Preferences _prefs { get; set; } = new(); private bool _formInvalid = true; @@ -118,6 +118,7 @@ public partial class SalesReportNew : IDisposable checkOut = new DateTime(_workDate.Year, _workDate.Month, _workDate.Day, _checkOut.Hour, _checkOut.Minute, 0); } + _report.SalesDayNumber = _report.DayTypeEnum == "sales" ? _report.Figures.SalesDayCount + 1 : 0; _report.FromDateTime = checkIn.ToString("yyyy-MM-dd'T'HH:mm:ss", CultureInfo.InvariantCulture); _report.ToDateTime = checkOut.ToString("yyyy-MM-dd'T'HH:mm:ss", CultureInfo.InvariantCulture); @@ -151,7 +152,7 @@ public partial class SalesReportNew : IDisposable _noFigures = true; _report.Figures = new ReportFiguresDto(); _init = new ReportFiguresDto(); - _activities = new List(); + _activities = new List(); _report.Figures.KmEvening = 0; _report.Figures.KmMorning = 0; _report.Figures.Distance = 0; diff --git a/Wonky.Client/Pages/SalesReportView.razor b/Wonky.Client/Pages/SalesReportView.razor index d3e62206..9c7c6e34 100644 --- a/Wonky.Client/Pages/SalesReportView.razor +++ b/Wonky.Client/Pages/SalesReportView.razor @@ -20,7 +20,7 @@ @page "/sales-reports/view/{ReportDate}" @attribute [Authorize(Roles = "Adviser,Admin,Supervisor")] -@_report.Report.Name +@_report.ReportData.Name
    @@ -38,12 +38,20 @@
    -

    @_report.Report.Name

    +

    @_report.ReportData.Name

    - +
    +
    + +
    +
    + +
    +
    +
    \ No newline at end of file diff --git a/Wonky.Client/Pages/SalesReportView.razor.cs b/Wonky.Client/Pages/SalesReportView.razor.cs index 3c8ef756..902cac48 100644 --- a/Wonky.Client/Pages/SalesReportView.razor.cs +++ b/Wonky.Client/Pages/SalesReportView.razor.cs @@ -9,20 +9,20 @@ public partial class SalesReportView { [Parameter] public string ReportDate { get; set; } [Inject] private IReportHttpRepository _reportRepo { get; set; } - private NgSalesReportView _report { get; set; } = new(); + private SalesReportViewModel _report { get; set; } = new(); protected override async Task OnInitializedAsync() { if (!string.IsNullOrWhiteSpace(ReportDate)) { - await GetReport(ReportDate); + await GetReport(ReportDate); } } private async Task GetReport(string workDate) { ReportDate = workDate; - _report = new NgSalesReportView(); + _report = new SalesReportViewModel(); _report = await _reportRepo.GetReport(workDate); } } \ No newline at end of file diff --git a/Wonky.Client/wwwroot/appsettings.json b/Wonky.Client/wwwroot/appsettings.json index b21f8d81..2669e84f 100644 --- a/Wonky.Client/wwwroot/appsettings.json +++ b/Wonky.Client/wwwroot/appsettings.json @@ -1,12 +1,12 @@ { "appInfo": { "name": "Wonky Client", - "version": "0.8.80", + "version": "0.8.83", "isBeta": true, "image": "grumpy-coder.png" }, "apiConfig": { - "innoBaseUrl": "https://app.innotec.dk", + "innoBaseUrl": "https://dev.innotec.dk", "glsTrackUrl": "https://www.gls-group.eu/276-I-PORTAL-WEB/content/GLS/DK01/DA/5004.htm?txtAction=71000&txtRefNo=", "glsId": "", "virkUrl": "api/v2/services/virk", diff --git a/Wonky.Entity/DTO/ReportDto.cs b/Wonky.Entity/DTO/ReportDto.cs index 31697aae..ae8ecd56 100644 --- a/Wonky.Entity/DTO/ReportDto.cs +++ b/Wonky.Entity/DTO/ReportDto.cs @@ -10,6 +10,11 @@ public class ReportDto /// System generated public string Name { get; set; } = ""; + /// + /// Sales day counter + /// + public int SalesDayNumber { get; set; } + /// /// Report description /// diff --git a/Wonky.Entity/DTO/ReportFiguresDto.cs b/Wonky.Entity/DTO/ReportFiguresDto.cs index f1696363..45364cfe 100644 --- a/Wonky.Entity/DTO/ReportFiguresDto.cs +++ b/Wonky.Entity/DTO/ReportFiguresDto.cs @@ -5,7 +5,7 @@ public class ReportFiguresDto /// /// Sales day number /// - public int SalesDayNumber { get; set; } + public int SalesDayCount { get; set; } /// /// Distance today diff --git a/Wonky.Entity/DTO/ReportInitDto.cs b/Wonky.Entity/DTO/ReportInitDto.cs index c9198cde..298b5870 100644 --- a/Wonky.Entity/DTO/ReportInitDto.cs +++ b/Wonky.Entity/DTO/ReportInitDto.cs @@ -1,4 +1,5 @@ using Wonky.Entity.Models; +using Wonky.Entity.Views; namespace Wonky.Entity.DTO; @@ -17,6 +18,6 @@ public class ReportInitDto /// /// List of activities for report /// - public List Activities { get; set; } + public List Activities { get; set; } } \ No newline at end of file diff --git a/Wonky.Entity/Views/ActivityCompanyView.cs b/Wonky.Entity/Views/ActivityCompanyView.cs new file mode 100644 index 00000000..c5decc72 --- /dev/null +++ b/Wonky.Entity/Views/ActivityCompanyView.cs @@ -0,0 +1,7 @@ +namespace Wonky.Entity.Views; + +public class ActivityCompanyView +{ + public string Name { get; set; } = ""; + public string City { get; set; } = ""; +} \ No newline at end of file diff --git a/Wonky.Entity/DTO/ActivityViewReport.cs b/Wonky.Entity/Views/ActivityListItemView.cs similarity index 74% rename from Wonky.Entity/DTO/ActivityViewReport.cs rename to Wonky.Entity/Views/ActivityListItemView.cs index a5ccf64b..844035a8 100644 --- a/Wonky.Entity/DTO/ActivityViewReport.cs +++ b/Wonky.Entity/Views/ActivityListItemView.cs @@ -1,13 +1,16 @@ -using Wonky.Entity.Views; +namespace Wonky.Entity.Views; -namespace Wonky.Entity.DTO; - -public class ActivityViewReport +public class ActivityListItemView { /// /// Company Info in listing /// - public ActivityViewCompany ViewCompany { get; set; } = new(); + public ActivityCompanyView Company { get; set; } = new(); + + /// + /// Processing note to office + /// + public string OfficeNote { get; set; } = ""; /// /// Total amount @@ -48,6 +51,11 @@ public class ActivityViewReport /// Visit type enum as string /// public string VisitTypeEnum { get; set; } = ""; + + /// + /// Status type enum as string + /// + public string StatusTypeEnum { get; set; } = ""; /// /// Demonstration @@ -57,6 +65,6 @@ public class ActivityViewReport /// /// Sales resume /// - public string SalesResume { get; set; } = ""; + public string Sales { get; set; } = ""; } diff --git a/Wonky.Entity/Views/ActivityListReportView.cs b/Wonky.Entity/Views/ActivityListReportView.cs index da01fa06..d9688ee6 100644 --- a/Wonky.Entity/Views/ActivityListReportView.cs +++ b/Wonky.Entity/Views/ActivityListReportView.cs @@ -3,5 +3,5 @@ namespace Wonky.Entity.Views; public class ActivityListReportView { public bool ReportClosed { get; set; } - public List Activities { get; set; } = new(); + public List Activities { get; set; } = new(); } \ No newline at end of file diff --git a/Wonky.Entity/Views/ActivityReportView.cs b/Wonky.Entity/Views/ActivityReportView.cs deleted file mode 100644 index 4c7ecef9..00000000 --- a/Wonky.Entity/Views/ActivityReportView.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace Wonky.Entity.Views; - -public class ActivityReportView -{ - public ActivityViewCompany ViewCompany { get; set; } = new(); - public string SalesHeadId { get; set; } = ""; - public string OfficeNote { get; set; } = ""; - public string StatusTypeEnum { get; set; } = ""; - public bool Closed { get; set; } - public string OrderDate { get; set; } = ""; - public string ReferenceNumber { get; set; } = ""; - public string YourRef { get; set; } = ""; - public decimal OrderAmount { get; set; } - public decimal SasAmount { get; set; } - public string VisitTypeEnum { get; set; } = ""; - public string Demo { get; set; } = ""; - public string SalesResume { get; set; } = ""; -} - diff --git a/Wonky.Entity/Views/ActivityViewCompany.cs b/Wonky.Entity/Views/ActivityViewCompany.cs deleted file mode 100644 index 7017a90b..00000000 --- a/Wonky.Entity/Views/ActivityViewCompany.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace Wonky.Entity.Views; - -public class ActivityViewCompany -{ - public string CompanyId { get; set; } = ""; - public string Account { get; set; } = ""; - public string Name { get; set; } = ""; - public string ZipCity { get; set; } = ""; - public string Phone { get; set; } = ""; - public string VatNumber { get; set; } = ""; -} \ No newline at end of file diff --git a/Wonky.Entity/Views/NgSalesReportView.cs b/Wonky.Entity/Views/NgSalesReportView.cs deleted file mode 100644 index d18c2d0b..00000000 --- a/Wonky.Entity/Views/NgSalesReportView.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Wonky.Entity.Views; - -public class NgSalesReportView -{ - public NgSalesReport Report { get; set; } = new(); - public List Activities { get; set; } = new (); -} \ No newline at end of file diff --git a/Wonky.Entity/Views/ReportClosedView.cs b/Wonky.Entity/Views/SalesReportClosedView.cs similarity index 68% rename from Wonky.Entity/Views/ReportClosedView.cs rename to Wonky.Entity/Views/SalesReportClosedView.cs index 923911e9..537108df 100644 --- a/Wonky.Entity/Views/ReportClosedView.cs +++ b/Wonky.Entity/Views/SalesReportClosedView.cs @@ -1,6 +1,6 @@ namespace Wonky.Entity.Views; -public class ReportClosedView +public class SalesReportClosedView { public bool ReportClosed { get; set; } } \ No newline at end of file diff --git a/Wonky.Entity/Views/NgSalesReport.cs b/Wonky.Entity/Views/SalesReportDataViewModel.cs similarity index 90% rename from Wonky.Entity/Views/NgSalesReport.cs rename to Wonky.Entity/Views/SalesReportDataViewModel.cs index 6c4f1e19..3b246930 100644 --- a/Wonky.Entity/Views/NgSalesReport.cs +++ b/Wonky.Entity/Views/SalesReportDataViewModel.cs @@ -1,6 +1,6 @@ namespace Wonky.Entity.Views; -public class NgSalesReport +public class SalesReportDataViewModel { public string ReportId { get; set; } = ""; public string ErpUserId { get; set; } = ""; @@ -8,10 +8,11 @@ public class NgSalesReport public string SupervisedBy { get; set; } = ""; public string Description { get; set; } = ""; public string DayTypeEnum { get; set; } = ""; - public long ReportDate { get; set; } - public long FromDateTime { get; set; } - public long ToDateTime { get; set; } + public string ReportDate { get; set; } = ""; + public string FromDateTime { get; set; } = ""; + public string ToDateTime { get; set; } = ""; public bool Closed { get; set; } + public int SalesDayNumber { get; set; } // workday public int NewVisitCount { get; set; } public int RecallVisitCount { get; set; } diff --git a/Wonky.Entity/Views/SalesReportViewModel.cs b/Wonky.Entity/Views/SalesReportViewModel.cs new file mode 100644 index 00000000..4b7aa2aa --- /dev/null +++ b/Wonky.Entity/Views/SalesReportViewModel.cs @@ -0,0 +1,7 @@ +namespace Wonky.Entity.Views; + +public class SalesReportViewModel +{ + public SalesReportDataViewModel ReportData { get; set; } = new(); + public List Activities { get; set; } = new (); +} \ No newline at end of file