@masterteam/system-settings 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/i18n/ar.json +42 -1
- package/assets/i18n/en.json +41 -0
- package/assets/system-settings.css +2 -2
- package/fesm2022/masterteam-system-settings.mjs +393 -6
- package/fesm2022/masterteam-system-settings.mjs.map +1 -1
- package/package.json +3 -3
- package/types/masterteam-system-settings.d.ts +155 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@masterteam/system-settings",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"directory": "../../../dist/masterteam/system-settings",
|
|
6
6
|
"linkDirectory": false,
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"rxjs": "^7.8.2",
|
|
20
20
|
"tailwindcss": "^4.2.2",
|
|
21
21
|
"tailwindcss-primeui": "^0.6.1",
|
|
22
|
-
"@masterteam/components": "^0.0.
|
|
23
|
-
"@masterteam/icons": "^0.0.
|
|
22
|
+
"@masterteam/components": "^0.0.197",
|
|
23
|
+
"@masterteam/icons": "^0.0.17"
|
|
24
24
|
},
|
|
25
25
|
"sideEffects": false,
|
|
26
26
|
"exports": {
|
|
@@ -76,6 +76,30 @@ interface SmtpSettingValue extends SystemSettingObject {
|
|
|
76
76
|
host: string;
|
|
77
77
|
port: number | null;
|
|
78
78
|
}
|
|
79
|
+
interface TimeSheetPolicySettingValue extends SystemSettingObject {
|
|
80
|
+
weekStartDay: number;
|
|
81
|
+
generationEnabled: boolean;
|
|
82
|
+
manualGenerationEnabled: boolean;
|
|
83
|
+
regularDailyHours: number;
|
|
84
|
+
maxDailyHours: number;
|
|
85
|
+
allowOvertime: boolean;
|
|
86
|
+
requireOvertimeReason: boolean;
|
|
87
|
+
requireDescription: boolean;
|
|
88
|
+
allowFutureEntry: boolean;
|
|
89
|
+
pastEntryLockDays: number | null;
|
|
90
|
+
allowedScheduleItemTypes: string[];
|
|
91
|
+
assignedItemsOnly: boolean;
|
|
92
|
+
allowZeroHourSubmit: boolean;
|
|
93
|
+
costEnabled: boolean;
|
|
94
|
+
rateSource: string;
|
|
95
|
+
}
|
|
96
|
+
interface GlobalWorkingHoursSettingValue extends SystemSettingObject {
|
|
97
|
+
timeZoneId: string;
|
|
98
|
+
workDayStartMinute: number;
|
|
99
|
+
workDayEndMinute: number;
|
|
100
|
+
workingDays: number[];
|
|
101
|
+
holidays: string[];
|
|
102
|
+
}
|
|
79
103
|
interface CurrencyCatalogItem {
|
|
80
104
|
code: string;
|
|
81
105
|
englishLabel: string;
|
|
@@ -90,6 +114,9 @@ interface SelectOption {
|
|
|
90
114
|
interface WeekendDayOption extends SelectOption {
|
|
91
115
|
dayNumber: number;
|
|
92
116
|
}
|
|
117
|
+
interface ScheduleItemTypeOption extends SelectOption {
|
|
118
|
+
itemType: string;
|
|
119
|
+
}
|
|
93
120
|
interface HolidayTableRow {
|
|
94
121
|
rowKey: string;
|
|
95
122
|
rowIndex: number;
|
|
@@ -103,6 +130,8 @@ interface SystemSettingsSnapshot {
|
|
|
103
130
|
currency: CurrencySettingValue;
|
|
104
131
|
weekend: WeekendSettingValue;
|
|
105
132
|
smtp: SmtpSettingValue;
|
|
133
|
+
timeSheetPolicy: TimeSheetPolicySettingValue;
|
|
134
|
+
globalWorkingHours: GlobalWorkingHoursSettingValue;
|
|
106
135
|
}
|
|
107
136
|
type SystemSettingsForm = FormGroup<{
|
|
108
137
|
timezone: FormGroup<{
|
|
@@ -124,6 +153,30 @@ type SystemSettingsForm = FormGroup<{
|
|
|
124
153
|
host: FormControl<string>;
|
|
125
154
|
port: FormControl<string>;
|
|
126
155
|
}>;
|
|
156
|
+
timeSheetPolicy: FormGroup<{
|
|
157
|
+
weekStartDay: FormControl<number | null>;
|
|
158
|
+
generationEnabled: FormControl<boolean>;
|
|
159
|
+
manualGenerationEnabled: FormControl<boolean>;
|
|
160
|
+
regularDailyHours: FormControl<number | null>;
|
|
161
|
+
maxDailyHours: FormControl<number | null>;
|
|
162
|
+
allowOvertime: FormControl<boolean>;
|
|
163
|
+
requireOvertimeReason: FormControl<boolean>;
|
|
164
|
+
requireDescription: FormControl<boolean>;
|
|
165
|
+
allowFutureEntry: FormControl<boolean>;
|
|
166
|
+
pastEntryLockDays: FormControl<number | null>;
|
|
167
|
+
allowedScheduleItemTypes: FormControl<string[]>;
|
|
168
|
+
assignedItemsOnly: FormControl<boolean>;
|
|
169
|
+
allowZeroHourSubmit: FormControl<boolean>;
|
|
170
|
+
costEnabled: FormControl<boolean>;
|
|
171
|
+
rateSource: FormControl<string | null>;
|
|
172
|
+
}>;
|
|
173
|
+
globalWorkingHours: FormGroup<{
|
|
174
|
+
timeZoneId: FormControl<string | null>;
|
|
175
|
+
workDayStart: FormControl<string>;
|
|
176
|
+
workDayEnd: FormControl<string>;
|
|
177
|
+
workingDays: FormControl<number[]>;
|
|
178
|
+
holidaysCsv: FormControl<string>;
|
|
179
|
+
}>;
|
|
127
180
|
}>;
|
|
128
181
|
declare const FIXED_CURRENCIES: CurrencyCatalogItem[];
|
|
129
182
|
declare const DEFAULT_DATE_FORMAT_OPTIONS: FormatSchemaOption[];
|
|
@@ -150,6 +203,45 @@ declare const WEEKEND_DAY_DEFINITIONS: readonly [{
|
|
|
150
203
|
readonly dayNumber: 7;
|
|
151
204
|
readonly translationKey: "sunday";
|
|
152
205
|
}];
|
|
206
|
+
declare const DOTNET_DAY_DEFINITIONS: readonly [{
|
|
207
|
+
readonly dayNumber: 0;
|
|
208
|
+
readonly translationKey: "sunday";
|
|
209
|
+
}, {
|
|
210
|
+
readonly dayNumber: 1;
|
|
211
|
+
readonly translationKey: "monday";
|
|
212
|
+
}, {
|
|
213
|
+
readonly dayNumber: 2;
|
|
214
|
+
readonly translationKey: "tuesday";
|
|
215
|
+
}, {
|
|
216
|
+
readonly dayNumber: 3;
|
|
217
|
+
readonly translationKey: "wednesday";
|
|
218
|
+
}, {
|
|
219
|
+
readonly dayNumber: 4;
|
|
220
|
+
readonly translationKey: "thursday";
|
|
221
|
+
}, {
|
|
222
|
+
readonly dayNumber: 5;
|
|
223
|
+
readonly translationKey: "friday";
|
|
224
|
+
}, {
|
|
225
|
+
readonly dayNumber: 6;
|
|
226
|
+
readonly translationKey: "saturday";
|
|
227
|
+
}];
|
|
228
|
+
declare const SCHEDULE_ITEM_TYPE_OPTIONS: readonly [{
|
|
229
|
+
readonly itemType: "Task";
|
|
230
|
+
readonly translationKey: "schedule-item-task";
|
|
231
|
+
}, {
|
|
232
|
+
readonly itemType: "Milestone";
|
|
233
|
+
readonly translationKey: "schedule-item-milestone";
|
|
234
|
+
}, {
|
|
235
|
+
readonly itemType: "Deliverable";
|
|
236
|
+
readonly translationKey: "schedule-item-deliverable";
|
|
237
|
+
}];
|
|
238
|
+
declare const RATE_SOURCE_OPTIONS: readonly [{
|
|
239
|
+
readonly id: "UserHourlyRate";
|
|
240
|
+
readonly translationKey: "rate-source-user-hourly-rate";
|
|
241
|
+
}, {
|
|
242
|
+
readonly id: "None";
|
|
243
|
+
readonly translationKey: "rate-source-none";
|
|
244
|
+
}];
|
|
153
245
|
|
|
154
246
|
declare class SystemSettings implements OnInit {
|
|
155
247
|
private readonly http;
|
|
@@ -203,6 +295,30 @@ declare class SystemSettings implements OnInit {
|
|
|
203
295
|
host: string;
|
|
204
296
|
port: string;
|
|
205
297
|
}>;
|
|
298
|
+
timeSheetPolicy: Partial<{
|
|
299
|
+
weekStartDay: number | null;
|
|
300
|
+
generationEnabled: boolean;
|
|
301
|
+
manualGenerationEnabled: boolean;
|
|
302
|
+
regularDailyHours: number | null;
|
|
303
|
+
maxDailyHours: number | null;
|
|
304
|
+
allowOvertime: boolean;
|
|
305
|
+
requireOvertimeReason: boolean;
|
|
306
|
+
requireDescription: boolean;
|
|
307
|
+
allowFutureEntry: boolean;
|
|
308
|
+
pastEntryLockDays: number | null;
|
|
309
|
+
allowedScheduleItemTypes: string[];
|
|
310
|
+
assignedItemsOnly: boolean;
|
|
311
|
+
allowZeroHourSubmit: boolean;
|
|
312
|
+
costEnabled: boolean;
|
|
313
|
+
rateSource: string | null;
|
|
314
|
+
}>;
|
|
315
|
+
globalWorkingHours: Partial<{
|
|
316
|
+
timeZoneId: string | null;
|
|
317
|
+
workDayStart: string;
|
|
318
|
+
workDayEnd: string;
|
|
319
|
+
workingDays: number[];
|
|
320
|
+
holidaysCsv: string;
|
|
321
|
+
}>;
|
|
206
322
|
}> | {
|
|
207
323
|
timezone: {
|
|
208
324
|
regionId: string | null;
|
|
@@ -223,12 +339,38 @@ declare class SystemSettings implements OnInit {
|
|
|
223
339
|
host: string;
|
|
224
340
|
port: string;
|
|
225
341
|
};
|
|
342
|
+
timeSheetPolicy: {
|
|
343
|
+
weekStartDay: number | null;
|
|
344
|
+
generationEnabled: boolean;
|
|
345
|
+
manualGenerationEnabled: boolean;
|
|
346
|
+
regularDailyHours: number | null;
|
|
347
|
+
maxDailyHours: number | null;
|
|
348
|
+
allowOvertime: boolean;
|
|
349
|
+
requireOvertimeReason: boolean;
|
|
350
|
+
requireDescription: boolean;
|
|
351
|
+
allowFutureEntry: boolean;
|
|
352
|
+
pastEntryLockDays: number | null;
|
|
353
|
+
allowedScheduleItemTypes: string[];
|
|
354
|
+
assignedItemsOnly: boolean;
|
|
355
|
+
allowZeroHourSubmit: boolean;
|
|
356
|
+
costEnabled: boolean;
|
|
357
|
+
rateSource: string | null;
|
|
358
|
+
};
|
|
359
|
+
globalWorkingHours: {
|
|
360
|
+
timeZoneId: string | null;
|
|
361
|
+
workDayStart: string;
|
|
362
|
+
workDayEnd: string;
|
|
363
|
+
workingDays: number[];
|
|
364
|
+
holidaysCsv: string;
|
|
365
|
+
};
|
|
226
366
|
}>;
|
|
227
367
|
readonly holidaysSetting: _angular_core.Signal<SystemSetting | null>;
|
|
228
368
|
readonly timezoneSetting: _angular_core.Signal<SystemSetting | null>;
|
|
229
369
|
readonly currencySetting: _angular_core.Signal<SystemSetting | null>;
|
|
230
370
|
readonly weekendSetting: _angular_core.Signal<SystemSetting | null>;
|
|
231
371
|
readonly smtpSetting: _angular_core.Signal<SystemSetting | null>;
|
|
372
|
+
readonly timeSheetPolicySetting: _angular_core.Signal<SystemSetting | null>;
|
|
373
|
+
readonly globalWorkingHoursSetting: _angular_core.Signal<SystemSetting | null>;
|
|
232
374
|
readonly resolvedFormatSchema: _angular_core.Signal<SystemSettingsFormatSchema>;
|
|
233
375
|
readonly timezoneOptions: _angular_core.Signal<{
|
|
234
376
|
name: string;
|
|
@@ -243,6 +385,9 @@ declare class SystemSettings implements OnInit {
|
|
|
243
385
|
readonly currencyOptions: _angular_core.Signal<SelectOption[]>;
|
|
244
386
|
readonly currencyFormatOptions: _angular_core.Signal<SelectOption[]>;
|
|
245
387
|
readonly weekendOptions: _angular_core.Signal<WeekendDayOption[]>;
|
|
388
|
+
readonly dotnetDayOptions: _angular_core.Signal<WeekendDayOption[]>;
|
|
389
|
+
readonly scheduleItemTypeOptions: _angular_core.Signal<ScheduleItemTypeOption[]>;
|
|
390
|
+
readonly rateSourceOptions: _angular_core.Signal<SelectOption[]>;
|
|
246
391
|
readonly isReady: _angular_core.Signal<boolean>;
|
|
247
392
|
readonly isLoading: _angular_core.Signal<boolean>;
|
|
248
393
|
readonly hasChanges: _angular_core.Signal<boolean>;
|
|
@@ -264,12 +409,16 @@ declare class SystemSettings implements OnInit {
|
|
|
264
409
|
private buildCurrencyValue;
|
|
265
410
|
private buildWeekendValue;
|
|
266
411
|
private buildSmtpValue;
|
|
412
|
+
private buildTimeSheetPolicyValue;
|
|
413
|
+
private buildGlobalWorkingHoursValue;
|
|
267
414
|
private findSettingByKey;
|
|
268
415
|
private extractHolidaysValue;
|
|
269
416
|
private extractTimezoneValue;
|
|
270
417
|
private extractCurrencyValue;
|
|
271
418
|
private extractWeekendValue;
|
|
272
419
|
private extractSmtpValue;
|
|
420
|
+
private extractTimeSheetPolicyValue;
|
|
421
|
+
private extractGlobalWorkingHoursValue;
|
|
273
422
|
private normalizeHolidayItem;
|
|
274
423
|
private normalizeTimezoneRegion;
|
|
275
424
|
private normalizeCurrencyUnit;
|
|
@@ -277,10 +426,14 @@ declare class SystemSettings implements OnInit {
|
|
|
277
426
|
private normalizeCurrencySnapshot;
|
|
278
427
|
private normalizeWeekendSnapshot;
|
|
279
428
|
private normalizeSmtpSnapshot;
|
|
429
|
+
private normalizeTimeSheetPolicySnapshot;
|
|
430
|
+
private normalizeGlobalWorkingHoursSnapshot;
|
|
280
431
|
private createFallbackSetting;
|
|
281
432
|
private getDefaultTimezoneValue;
|
|
282
433
|
private getDefaultCurrencyValue;
|
|
283
434
|
private getDefaultSmtpValue;
|
|
435
|
+
private getDefaultTimeSheetPolicyValue;
|
|
436
|
+
private getDefaultGlobalWorkingHoursValue;
|
|
284
437
|
private resolveCurrencyCode;
|
|
285
438
|
private mapFormatOptions;
|
|
286
439
|
private serializeHolidaysValue;
|
|
@@ -314,5 +467,5 @@ declare class SystemSettingsHolidayEditor {
|
|
|
314
467
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SystemSettingsHolidayEditor, "mt-system-settings-holiday-editor", never, { "holiday": { "alias": "holiday"; "required": false; "isSignal": true; }; "isEditMode": { "alias": "isEditMode"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
315
468
|
}
|
|
316
469
|
|
|
317
|
-
export { DEFAULT_DATE_FORMAT_OPTIONS, DEFAULT_TIME_FORMAT_OPTIONS, FIXED_CURRENCIES, SystemSettings, SystemSettingsHolidayEditor, WEEKEND_DAY_DEFINITIONS };
|
|
318
|
-
export type { ApiResponse, CurrencyCatalogItem, CurrencySettingValue, CurrencyUnitLabel, FormatSchemaOption, HolidayItem, HolidayTableRow, HolidaysSettingValue, SelectOption, SmtpSettingValue, SystemSetting, SystemSettingObject, SystemSettingPrimitive, SystemSettingValue, SystemSettingsForm, SystemSettingsFormatSchema, SystemSettingsSnapshot, TimezoneRegionOption, TimezoneSettingValue, UpdateSystemSettingItem, WeekendDayOption, WeekendSettingValue };
|
|
470
|
+
export { DEFAULT_DATE_FORMAT_OPTIONS, DEFAULT_TIME_FORMAT_OPTIONS, DOTNET_DAY_DEFINITIONS, FIXED_CURRENCIES, RATE_SOURCE_OPTIONS, SCHEDULE_ITEM_TYPE_OPTIONS, SystemSettings, SystemSettingsHolidayEditor, WEEKEND_DAY_DEFINITIONS };
|
|
471
|
+
export type { ApiResponse, CurrencyCatalogItem, CurrencySettingValue, CurrencyUnitLabel, FormatSchemaOption, GlobalWorkingHoursSettingValue, HolidayItem, HolidayTableRow, HolidaysSettingValue, ScheduleItemTypeOption, SelectOption, SmtpSettingValue, SystemSetting, SystemSettingObject, SystemSettingPrimitive, SystemSettingValue, SystemSettingsForm, SystemSettingsFormatSchema, SystemSettingsSnapshot, TimeSheetPolicySettingValue, TimezoneRegionOption, TimezoneSettingValue, UpdateSystemSettingItem, WeekendDayOption, WeekendSettingValue };
|