|
1 | | -@using PayrollEngine.WebApp.ViewModel |
| 1 | +@using System.Globalization |
2 | 2 | @using PayrollEngine.WebApp.Shared |
3 | | -@using System.Globalization |
| 3 | +@using PayrollEngine.WebApp.ViewModel |
4 | 4 |
|
5 | 5 | <MudDialog Style="min-width: 30em;" TitleClass="mud-theme-primary pe-dialog-title"> |
6 | 6 | <DialogContent> |
|
13 | 13 | { |
14 | 14 | @* legal job: new *@ |
15 | 15 | <MudPaper Class="pa-4" |
16 | | - Style="min-width: 25em; max-width: 40em"> |
| 16 | + Style="min-width: 25em; max-width: 40em"> |
17 | 17 | <MudStack Spacing="0"> |
18 | 18 | <MudText Typo="Typo.h6">@Localizer.PayrunJob.New</MudText> |
19 | 19 |
|
|
24 | 24 | <MudText Class="pr-4">@GetUserName(PayrunJob.CreatedUserId)</MudText> |
25 | 25 |
|
26 | 26 | <MudInputLabel Class="pt-4">@Localizer.PayrunJob.JobPeriod</MudInputLabel> |
27 | | - <MudText Class="pr-4">@PayrunJob.PeriodStart.ToCompactString()</MudText> |
| 27 | + <MudText Class="pr-4">@Period</MudText> |
28 | 28 |
|
29 | 29 | @if (PayrunJob.EvaluationDate != null) |
30 | 30 | { |
|
33 | 33 | } |
34 | 34 |
|
35 | 35 | <PayrunEmployeeInfo Class="pt-4" Employees="@Employees" |
36 | | - SelectedEmployees="@(PayrunJob.Employees?.Select(x => x.EmployeeId).ToList() ?? [])" /> |
| 36 | + SelectedEmployees="@(PayrunJob.Employees?.Select(x => x.EmployeeId).ToList() ?? [])" /> |
37 | 37 |
|
38 | 38 | <MudInputLabel Class="pt-4">@Localizer.PayrunJob.JobReason</MudInputLabel> |
39 | 39 | <MudText Class="pr-4">@PayrunJob.CreatedReason</MudText> |
40 | 40 |
|
41 | 41 | @if (PayrunJob.Attributes != null && PayrunJob.Attributes.Any()) |
42 | 42 | { |
43 | 43 | <PayrunParameterInfo Class="pt-4" Culture="@Culture" |
44 | | - ParameterAttributes="PayrunJob.Attributes" /> |
| 44 | + ParameterAttributes="PayrunJob.Attributes" /> |
45 | 45 | } |
46 | 46 | </MudStack> |
47 | 47 | </MudPaper> |
48 | 48 |
|
49 | 49 | @* legal job: draft *@ |
50 | 50 | <MudPaper Class="pa-4" Elevation="@(PayrunJob.JobStatus.IsDraft() ? 4 : 1)" |
51 | | - Style="min-width: 15em; max-width: 25em"> |
| 51 | + Style="min-width: 15em; max-width: 25em"> |
52 | 52 | <MudStack Spacing="0"> |
53 | 53 | <MudText Typo="Typo.h6" Color="@(PayrunJob.JobStatus.IsDraft() ? Color.Tertiary : Color.Default)"> |
54 | 54 | @Localizer.Enum(PayrunJobStatus.Draft) |
|
66 | 66 | @if (PayrunJob.Released.HasValue) |
67 | 67 | { |
68 | 68 | <MudPaper Class="pa-4" Elevation="@(PayrunJob.JobStatus.IsRelease() ? 4 : 1)" |
69 | | - Style="min-width: 15em; max-width: 25em"> |
| 69 | + Style="min-width: 15em; max-width: 25em"> |
70 | 70 | <MudStack Spacing="0"> |
71 | 71 | <MudText Typo="Typo.h6" |
72 | | - Color="@(PayrunJob.JobStatus == PayrunJobStatus.Release ? Color.Tertiary : Color.Default)"> |
| 72 | + Color="@(PayrunJob.JobStatus == PayrunJobStatus.Release ? Color.Tertiary : Color.Default)"> |
73 | 73 | @Localizer.Enum(PayrunJobStatus.Release) |
74 | 74 | </MudText> |
75 | 75 |
|
|
86 | 86 | @if (PayrunJob.Processed.HasValue) |
87 | 87 | { |
88 | 88 | <MudPaper Class="pa-4" Elevation="@(PayrunJob.JobStatus.IsProcess() ? 4 : 1)" |
89 | | - Style="min-width: 15em; max-width: 25em"> |
| 89 | + Style="min-width: 15em; max-width: 25em"> |
90 | 90 | <MudStack Spacing="0"> |
91 | 91 | <MudText Typo="Typo.h6" |
92 | | - Color="@(PayrunJob.JobStatus == PayrunJobStatus.Process ? Color.Tertiary : Color.Default)"> |
| 92 | + Color="@(PayrunJob.JobStatus == PayrunJobStatus.Process ? Color.Tertiary : Color.Default)"> |
93 | 93 | @Localizer.Enum(PayrunJobStatus.Process) |
94 | 94 | </MudText> |
95 | 95 |
|
|
106 | 106 | @if (PayrunJob.Finished.HasValue && PayrunJob.JobStatus is PayrunJobStatus.Complete) |
107 | 107 | { |
108 | 108 | <MudPaper Class="pa-4" Elevation="@(PayrunJob.JobStatus.IsComplete() ? 4 : 1)" |
109 | | - Style="min-width: 15em; max-width: 25em"> |
| 109 | + Style="min-width: 15em; max-width: 25em"> |
110 | 110 | <MudStack Spacing="0"> |
111 | 111 | <MudText Typo="Typo.h6" |
112 | | - Color="@(PayrunJob.JobStatus == PayrunJobStatus.Complete ? Color.Tertiary : Color.Default)"> |
| 112 | + Color="@(PayrunJob.JobStatus == PayrunJobStatus.Complete ? Color.Tertiary : Color.Default)"> |
113 | 113 | @Localizer.Enum(PayrunJobStatus.Complete) |
114 | 114 | </MudText> |
115 | 115 |
|
|
126 | 126 | @if (PayrunJob.Finished.HasValue && PayrunJob.JobStatus is PayrunJobStatus.Cancel or PayrunJobStatus.Abort) |
127 | 127 | { |
128 | 128 | <MudPaper Class="pa-4" Elevation="4" |
129 | | - Style="min-width: 15em; max-width: 25em"> |
| 129 | + Style="min-width: 15em; max-width: 25em"> |
130 | 130 | <MudStack Spacing="0"> |
131 | 131 | <MudText Typo="Typo.h6" Color="Color.Error">@PayrunJob.JobStatus</MudText> |
132 | 132 |
|
|
143 | 143 | { |
144 | 144 | @* forecast job *@ |
145 | 145 | <MudPaper Class="pa-4" Elevation="4" |
146 | | - Style="min-width: 35em; max-width: 50em"> |
| 146 | + Style="min-width: 35em; max-width: 50em"> |
147 | 147 | <MudStack Spacing="0"> |
148 | 148 | <MudText Typo="Typo.h6">@Localizer.PayrunJob.New</MudText> |
149 | 149 | <MudInputLabel Class="pt-4">@Localizer.PayrunJob.JobDate</MudInputLabel> |
|
157 | 157 | <MudInputLabel Class="pt-4">@Localizer.PayrunJob.JobReason</MudInputLabel> |
158 | 158 | <MudText Class="pr-4">@PayrunJob.CreatedReason</MudText> |
159 | 159 | <PayrunEmployeeInfo Class="pt-4" Employees="@Employees" |
160 | | - SelectedEmployees="@(PayrunJob.Employees?.Select(x => x.EmployeeId).ToList() ?? [])" /> |
| 160 | + SelectedEmployees="@(PayrunJob.Employees?.Select(x => x.EmployeeId).ToList() ?? [])" /> |
161 | 161 | @if (PayrunJob.Attributes != null && PayrunJob.Attributes.Any()) |
162 | 162 | { |
163 | 163 | <PayrunParameterInfo Class="pt-4" ParameterAttributes="@PayrunJob.Attributes" /> |
|
181 | 181 | [Parameter] public PayrunJob PayrunJob { get; set; } |
182 | 182 | [Parameter] public List<PayrollEngine.WebApp.User> Users { get; set; } = []; |
183 | 183 | [Parameter] public List<Employee> Employees { get; set; } = []; |
| 184 | + |
184 | 185 | [Inject] private ILocalizerService LocalizerService { get; set; } |
185 | 186 |
|
186 | 187 | private Localizer Localizer => LocalizerService.Localizer; |
| 188 | + private DatePeriod Period => new(PayrunJob.PeriodStart, PayrunJob.PeriodEnd); |
187 | 189 |
|
188 | 190 | private void Close() => MudDialog.Close(DialogResult.Ok(true)); |
189 | 191 |
|
|
0 commit comments