@masterteam/system-settings 0.0.10 → 0.0.12
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/README.md +13 -4
- package/assets/i18n/ar.json +130 -128
- package/assets/i18n/en.json +130 -128
- package/assets/system-settings.css +1 -1
- package/fesm2022/masterteam-system-settings.mjs +135 -14
- package/fesm2022/masterteam-system-settings.mjs.map +1 -1
- package/package.json +2 -2
- package/types/masterteam-system-settings.d.ts +60 -2
|
@@ -17,6 +17,7 @@ import { SkeletonModule } from 'primeng/skeleton';
|
|
|
17
17
|
import { Card } from '@masterteam/components/card';
|
|
18
18
|
import { MultiSelectField } from '@masterteam/components/multi-select-field';
|
|
19
19
|
import { SelectField } from '@masterteam/components/select-field';
|
|
20
|
+
import { RadioCardsField } from '@masterteam/components/radio-cards-field';
|
|
20
21
|
import { ModalRef } from '@masterteam/components/dialog';
|
|
21
22
|
import { DateField } from '@masterteam/components/date-field';
|
|
22
23
|
import { TextField } from '@masterteam/components/text-field';
|
|
@@ -25,18 +26,35 @@ import { NumberField } from '@masterteam/components/number-field';
|
|
|
25
26
|
import { TextareaField } from '@masterteam/components/textarea-field';
|
|
26
27
|
import { ToggleField } from '@masterteam/components/toggle-field';
|
|
27
28
|
|
|
29
|
+
/**
|
|
30
|
+
* "General Configuration" — product-wide application behaviour that is not tied
|
|
31
|
+
* to a specific feature area. Currently holds the explore landing view; more
|
|
32
|
+
* entries are expected to land in this card.
|
|
33
|
+
*/
|
|
34
|
+
class SystemSettingsGeneralConfigSection {
|
|
35
|
+
generalConfigurationForm = input.required(...(ngDevMode ? [{ debugName: "generalConfigurationForm" }] : /* istanbul ignore next */ []));
|
|
36
|
+
exploreDefaultViewOptions = input([], ...(ngDevMode ? [{ debugName: "exploreDefaultViewOptions" }] : /* istanbul ignore next */ []));
|
|
37
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsGeneralConfigSection, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
38
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: SystemSettingsGeneralConfigSection, isStandalone: true, selector: "mt-system-settings-general-config-section", inputs: { generalConfigurationForm: { classPropertyName: "generalConfigurationForm", publicName: "generalConfigurationForm", isSignal: true, isRequired: true, transformFunction: null }, exploreDefaultViewOptions: { classPropertyName: "exploreDefaultViewOptions", publicName: "exploreDefaultViewOptions", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\r\n <mt-card class=\"block\">\r\n <div [formGroup]=\"generalConfigurationForm()\" class=\"space-y-5\">\r\n <div class=\"space-y-1\">\r\n <h4 class=\"text-base font-semibold text-neutral-900\">\r\n {{ t(\"general-configuration-title\") }}\r\n </h4>\r\n <p class=\"text-sm text-neutral-600\">\r\n {{ t(\"general-configuration-description\") }}\r\n </p>\r\n </div>\r\n\r\n <mt-radio-cards-field\r\n formControlName=\"defaultExploreView\"\r\n [options]=\"exploreDefaultViewOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'id'\"\r\n [label]=\"t('explore-default-view')\"\r\n [hint]=\"t('explore-default-view-hint')\"\r\n [required]=\"true\"\r\n size=\"small\"\r\n />\r\n </div>\r\n </mt-card>\r\n</ng-container>\r\n", styles: [":host{display:block;height:100%}mt-card{height:100%}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: RadioCardsField, selector: "mt-radio-cards-field", inputs: ["circle", "label", "hint", "readonly", "required", "color", "size", "optionLabel", "optionValue", "options"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
39
|
+
}
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsGeneralConfigSection, decorators: [{
|
|
41
|
+
type: Component,
|
|
42
|
+
args: [{ selector: 'mt-system-settings-general-config-section', imports: [ReactiveFormsModule, TranslocoDirective, Card, RadioCardsField], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\r\n <mt-card class=\"block\">\r\n <div [formGroup]=\"generalConfigurationForm()\" class=\"space-y-5\">\r\n <div class=\"space-y-1\">\r\n <h4 class=\"text-base font-semibold text-neutral-900\">\r\n {{ t(\"general-configuration-title\") }}\r\n </h4>\r\n <p class=\"text-sm text-neutral-600\">\r\n {{ t(\"general-configuration-description\") }}\r\n </p>\r\n </div>\r\n\r\n <mt-radio-cards-field\r\n formControlName=\"defaultExploreView\"\r\n [options]=\"exploreDefaultViewOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'id'\"\r\n [label]=\"t('explore-default-view')\"\r\n [hint]=\"t('explore-default-view-hint')\"\r\n [required]=\"true\"\r\n size=\"small\"\r\n />\r\n </div>\r\n </mt-card>\r\n</ng-container>\r\n", styles: [":host{display:block;height:100%}mt-card{height:100%}\n"] }]
|
|
43
|
+
}], propDecorators: { generalConfigurationForm: [{ type: i0.Input, args: [{ isSignal: true, alias: "generalConfigurationForm", required: true }] }], exploreDefaultViewOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "exploreDefaultViewOptions", required: false }] }] } });
|
|
44
|
+
|
|
28
45
|
class SystemSettingsGeneralSection {
|
|
46
|
+
generalConfigurationForm = input.required(...(ngDevMode ? [{ debugName: "generalConfigurationForm" }] : /* istanbul ignore next */ []));
|
|
29
47
|
timezoneForm = input.required(...(ngDevMode ? [{ debugName: "timezoneForm" }] : /* istanbul ignore next */ []));
|
|
30
48
|
currencyForm = input.required(...(ngDevMode ? [{ debugName: "currencyForm" }] : /* istanbul ignore next */ []));
|
|
31
49
|
weekendForm = input.required(...(ngDevMode ? [{ debugName: "weekendForm" }] : /* istanbul ignore next */ []));
|
|
32
|
-
|
|
50
|
+
exploreDefaultViewOptions = input([], ...(ngDevMode ? [{ debugName: "exploreDefaultViewOptions" }] : /* istanbul ignore next */ []));
|
|
33
51
|
dateFormatOptions = input([], ...(ngDevMode ? [{ debugName: "dateFormatOptions" }] : /* istanbul ignore next */ []));
|
|
34
52
|
timeFormatOptions = input([], ...(ngDevMode ? [{ debugName: "timeFormatOptions" }] : /* istanbul ignore next */ []));
|
|
35
53
|
currencyOptions = input([], ...(ngDevMode ? [{ debugName: "currencyOptions" }] : /* istanbul ignore next */ []));
|
|
36
54
|
currencyFormatOptions = input([], ...(ngDevMode ? [{ debugName: "currencyFormatOptions" }] : /* istanbul ignore next */ []));
|
|
37
55
|
weekendOptions = input([], ...(ngDevMode ? [{ debugName: "weekendOptions" }] : /* istanbul ignore next */ []));
|
|
38
56
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsGeneralSection, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
39
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: SystemSettingsGeneralSection, isStandalone: true, selector: "mt-system-settings-general-section", inputs: { timezoneForm: { classPropertyName: "timezoneForm", publicName: "timezoneForm", isSignal: true, isRequired: true, transformFunction: null }, currencyForm: { classPropertyName: "currencyForm", publicName: "currencyForm", isSignal: true, isRequired: true, transformFunction: null }, weekendForm: { classPropertyName: "weekendForm", publicName: "weekendForm", isSignal: true, isRequired: true, transformFunction: null },
|
|
57
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: SystemSettingsGeneralSection, isStandalone: true, selector: "mt-system-settings-general-section", inputs: { generalConfigurationForm: { classPropertyName: "generalConfigurationForm", publicName: "generalConfigurationForm", isSignal: true, isRequired: true, transformFunction: null }, timezoneForm: { classPropertyName: "timezoneForm", publicName: "timezoneForm", isSignal: true, isRequired: true, transformFunction: null }, currencyForm: { classPropertyName: "currencyForm", publicName: "currencyForm", isSignal: true, isRequired: true, transformFunction: null }, weekendForm: { classPropertyName: "weekendForm", publicName: "weekendForm", isSignal: true, isRequired: true, transformFunction: null }, exploreDefaultViewOptions: { classPropertyName: "exploreDefaultViewOptions", publicName: "exploreDefaultViewOptions", isSignal: true, isRequired: false, transformFunction: null }, dateFormatOptions: { classPropertyName: "dateFormatOptions", publicName: "dateFormatOptions", isSignal: true, isRequired: false, transformFunction: null }, timeFormatOptions: { classPropertyName: "timeFormatOptions", publicName: "timeFormatOptions", isSignal: true, isRequired: false, transformFunction: null }, currencyOptions: { classPropertyName: "currencyOptions", publicName: "currencyOptions", isSignal: true, isRequired: false, transformFunction: null }, currencyFormatOptions: { classPropertyName: "currencyFormatOptions", publicName: "currencyFormatOptions", isSignal: true, isRequired: false, transformFunction: null }, weekendOptions: { classPropertyName: "weekendOptions", publicName: "weekendOptions", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\n <div class=\"grid gap-6 xl:grid-cols-3\">\n <mt-card class=\"block\">\n <div class=\"space-y-4\">\n <div class=\"space-y-1\">\n <h4 class=\"text-base font-semibold text-neutral-900\">\n {{ t(\"date-time-weekend-title\") }}\n </h4>\n <p class=\"text-sm text-neutral-600\">\n {{ t(\"date-time-weekend-description\") }}\n </p>\n </div>\n\n <div [formGroup]=\"timezoneForm()\" class=\"grid gap-4 md:grid-cols-2\">\n <mt-select-field\n formControlName=\"dateFormat\"\n [options]=\"dateFormatOptions()\"\n [optionLabel]=\"'name'\"\n [optionValue]=\"'id'\"\n [label]=\"t('date-format')\"\n [placeholder]=\"t('date-format-placeholder')\"\n [required]=\"true\"\n />\n\n <mt-select-field\n formControlName=\"timeFormat\"\n [options]=\"timeFormatOptions()\"\n [optionLabel]=\"'name'\"\n [optionValue]=\"'id'\"\n [label]=\"t('time-format')\"\n [placeholder]=\"t('time-format-placeholder')\"\n [required]=\"true\"\n />\n </div>\n\n <div [formGroup]=\"weekendForm()\">\n <mt-multi-select-field\n formControlName=\"days\"\n [options]=\"weekendOptions()\"\n [optionLabel]=\"'name'\"\n [optionValue]=\"'dayNumber'\"\n [label]=\"t('weekend-days')\"\n [placeholder]=\"t('weekend-placeholder')\"\n [display]=\"'chip'\"\n [filter]=\"false\"\n [showClear]=\"true\"\n [maxSelectedLabels]=\"3\"\n />\n </div>\n </div>\n </mt-card>\n\n <mt-card class=\"block\">\n <div [formGroup]=\"currencyForm()\" class=\"space-y-4\">\n <div class=\"space-y-1\">\n <h4 class=\"text-base font-semibold text-neutral-900\">\n {{ t(\"currency-title\") }}\n </h4>\n <p class=\"text-sm text-neutral-600\">\n {{ t(\"currency-description\") }}\n </p>\n </div>\n\n <mt-select-field\n formControlName=\"code\"\n [options]=\"currencyOptions()\"\n [optionLabel]=\"'name'\"\n [optionValue]=\"'id'\"\n [label]=\"t('currency')\"\n [placeholder]=\"t('currency-placeholder')\"\n [required]=\"true\"\n />\n\n <mt-select-field\n formControlName=\"format\"\n [options]=\"currencyFormatOptions()\"\n [optionLabel]=\"'name'\"\n [optionValue]=\"'id'\"\n [label]=\"t('currency-format')\"\n [placeholder]=\"t('currency-format-placeholder')\"\n [required]=\"true\"\n />\n </div>\n </mt-card>\n\n <mt-system-settings-general-config-section\n class=\"block\"\n [generalConfigurationForm]=\"generalConfigurationForm()\"\n [exploreDefaultViewOptions]=\"exploreDefaultViewOptions()\"\n />\n </div>\n</ng-container>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: MultiSelectField, selector: "mt-multi-select-field", inputs: ["field", "label", "placeholder", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "display", "required", "maxSelectedLabels", "group", "virtualScroll", "virtualScrollItemSize", "optionGroupLabel", "optionGroupChildren", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }, { kind: "component", type: SystemSettingsGeneralConfigSection, selector: "mt-system-settings-general-config-section", inputs: ["generalConfigurationForm", "exploreDefaultViewOptions"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
40
58
|
}
|
|
41
59
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsGeneralSection, decorators: [{
|
|
42
60
|
type: Component,
|
|
@@ -46,8 +64,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
46
64
|
Card,
|
|
47
65
|
SelectField,
|
|
48
66
|
MultiSelectField,
|
|
49
|
-
|
|
50
|
-
|
|
67
|
+
SystemSettingsGeneralConfigSection,
|
|
68
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\n <div class=\"grid gap-6 xl:grid-cols-3\">\n <mt-card class=\"block\">\n <div class=\"space-y-4\">\n <div class=\"space-y-1\">\n <h4 class=\"text-base font-semibold text-neutral-900\">\n {{ t(\"date-time-weekend-title\") }}\n </h4>\n <p class=\"text-sm text-neutral-600\">\n {{ t(\"date-time-weekend-description\") }}\n </p>\n </div>\n\n <div [formGroup]=\"timezoneForm()\" class=\"grid gap-4 md:grid-cols-2\">\n <mt-select-field\n formControlName=\"dateFormat\"\n [options]=\"dateFormatOptions()\"\n [optionLabel]=\"'name'\"\n [optionValue]=\"'id'\"\n [label]=\"t('date-format')\"\n [placeholder]=\"t('date-format-placeholder')\"\n [required]=\"true\"\n />\n\n <mt-select-field\n formControlName=\"timeFormat\"\n [options]=\"timeFormatOptions()\"\n [optionLabel]=\"'name'\"\n [optionValue]=\"'id'\"\n [label]=\"t('time-format')\"\n [placeholder]=\"t('time-format-placeholder')\"\n [required]=\"true\"\n />\n </div>\n\n <div [formGroup]=\"weekendForm()\">\n <mt-multi-select-field\n formControlName=\"days\"\n [options]=\"weekendOptions()\"\n [optionLabel]=\"'name'\"\n [optionValue]=\"'dayNumber'\"\n [label]=\"t('weekend-days')\"\n [placeholder]=\"t('weekend-placeholder')\"\n [display]=\"'chip'\"\n [filter]=\"false\"\n [showClear]=\"true\"\n [maxSelectedLabels]=\"3\"\n />\n </div>\n </div>\n </mt-card>\n\n <mt-card class=\"block\">\n <div [formGroup]=\"currencyForm()\" class=\"space-y-4\">\n <div class=\"space-y-1\">\n <h4 class=\"text-base font-semibold text-neutral-900\">\n {{ t(\"currency-title\") }}\n </h4>\n <p class=\"text-sm text-neutral-600\">\n {{ t(\"currency-description\") }}\n </p>\n </div>\n\n <mt-select-field\n formControlName=\"code\"\n [options]=\"currencyOptions()\"\n [optionLabel]=\"'name'\"\n [optionValue]=\"'id'\"\n [label]=\"t('currency')\"\n [placeholder]=\"t('currency-placeholder')\"\n [required]=\"true\"\n />\n\n <mt-select-field\n formControlName=\"format\"\n [options]=\"currencyFormatOptions()\"\n [optionLabel]=\"'name'\"\n [optionValue]=\"'id'\"\n [label]=\"t('currency-format')\"\n [placeholder]=\"t('currency-format-placeholder')\"\n [required]=\"true\"\n />\n </div>\n </mt-card>\n\n <mt-system-settings-general-config-section\n class=\"block\"\n [generalConfigurationForm]=\"generalConfigurationForm()\"\n [exploreDefaultViewOptions]=\"exploreDefaultViewOptions()\"\n />\n </div>\n</ng-container>\n", styles: [":host{display:block}\n"] }]
|
|
69
|
+
}], propDecorators: { generalConfigurationForm: [{ type: i0.Input, args: [{ isSignal: true, alias: "generalConfigurationForm", required: true }] }], timezoneForm: [{ type: i0.Input, args: [{ isSignal: true, alias: "timezoneForm", required: true }] }], currencyForm: [{ type: i0.Input, args: [{ isSignal: true, alias: "currencyForm", required: true }] }], weekendForm: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekendForm", required: true }] }], exploreDefaultViewOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "exploreDefaultViewOptions", required: false }] }], dateFormatOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "dateFormatOptions", required: false }] }], timeFormatOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeFormatOptions", required: false }] }], currencyOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "currencyOptions", required: false }] }], currencyFormatOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "currencyFormatOptions", required: false }] }], weekendOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "weekendOptions", required: false }] }] } });
|
|
51
70
|
|
|
52
71
|
class SystemSettingsHolidayEditor {
|
|
53
72
|
ref = inject(ModalRef);
|
|
@@ -107,7 +126,7 @@ class SystemSettingsHolidayEditor {
|
|
|
107
126
|
this.ref.close(null);
|
|
108
127
|
}
|
|
109
128
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsHolidayEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
110
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SystemSettingsHolidayEditor, isStandalone: true, selector: "mt-system-settings-holiday-editor", inputs: { holiday: { classPropertyName: "holiday", publicName: "holiday", isSignal: true, isRequired: false, transformFunction: null }, isEditMode: { classPropertyName: "isEditMode", publicName: "isEditMode", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\r\n <div [class]=\"' ' + (modal.contentClass || '')\">\r\n <form [formGroup]=\"form\" class=\"space-y-4 p-3\" (ngSubmit)=\"onSave()\">\r\n <mt-text-field\r\n formControlName=\"label\"\r\n [label]=\"t('holiday-name')\"\r\n [placeholder]=\"t('holiday-name-placeholder')\"\r\n [required]=\"true\"\r\n />\r\n\r\n <div class=\"grid gap-4 md:grid-cols-2\">\r\n <div class=\"grid gap-1\">\r\n <mt-date-field\r\n formControlName=\"from\"\r\n [label]=\"t('from-date')\"\r\n [placeholder]=\"t('from-date')\"\r\n [showIcon]=\"true\"\r\n [required]=\"true\"\r\n />\r\n </div>\r\n\r\n <div class=\"grid gap-1\">\r\n <mt-date-field\r\n formControlName=\"to\"\r\n [label]=\"t('to-date')\"\r\n [placeholder]=\"t('to-date')\"\r\n [showIcon]=\"true\"\r\n [required]=\"true\"\r\n [pInputs]=\"toPickerInputs()\"\r\n />\r\n </div>\r\n </div>\r\n\r\n @if (form.errors?.[\"invalidRange\"] && (form.dirty || form.touched)) {\r\n <div class=\"text-sm text-red-600\">\r\n {{ t(\"holiday-range-error\") }}\r\n </div>\r\n }\r\n </form>\r\n </div>\r\n <div [class]=\"modal.footerClass\">\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n variant=\"outlined\"\r\n type=\"button\"\r\n (onClick)=\"onCancel()\"\r\n />\r\n <mt-button [label]=\"t(actionLabel())\" type=\"button\" (onClick)=\"onSave()\" />\r\n </div>\r\n</ng-container>\r\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: DateField, selector: "mt-date-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "showIcon", "showOnFocus", "showClear", "showTime", "minDate", "maxDate", "pInputs", "required"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
129
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SystemSettingsHolidayEditor, isStandalone: true, selector: "mt-system-settings-holiday-editor", inputs: { holiday: { classPropertyName: "holiday", publicName: "holiday", isSignal: true, isRequired: false, transformFunction: null }, isEditMode: { classPropertyName: "isEditMode", publicName: "isEditMode", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\r\n <div [class]=\"' ' + (modal.contentClass || '')\">\r\n <form [formGroup]=\"form\" class=\"space-y-4 p-3\" (ngSubmit)=\"onSave()\">\r\n <mt-text-field\r\n formControlName=\"label\"\r\n [label]=\"t('holiday-name')\"\r\n [placeholder]=\"t('holiday-name-placeholder')\"\r\n [required]=\"true\"\r\n />\r\n\r\n <div class=\"grid gap-4 md:grid-cols-2\">\r\n <div class=\"grid gap-1\">\r\n <mt-date-field\r\n formControlName=\"from\"\r\n [label]=\"t('from-date')\"\r\n [placeholder]=\"t('from-date')\"\r\n [showIcon]=\"true\"\r\n [required]=\"true\"\r\n />\r\n </div>\r\n\r\n <div class=\"grid gap-1\">\r\n <mt-date-field\r\n formControlName=\"to\"\r\n [label]=\"t('to-date')\"\r\n [placeholder]=\"t('to-date')\"\r\n [showIcon]=\"true\"\r\n [required]=\"true\"\r\n [pInputs]=\"toPickerInputs()\"\r\n />\r\n </div>\r\n </div>\r\n\r\n @if (form.errors?.[\"invalidRange\"] && (form.dirty || form.touched)) {\r\n <div class=\"text-sm text-red-600\">\r\n {{ t(\"holiday-range-error\") }}\r\n </div>\r\n }\r\n </form>\r\n </div>\r\n <div [class]=\"modal.footerClass\">\r\n <mt-button\r\n [label]=\"t('cancel')\"\r\n variant=\"outlined\"\r\n type=\"button\"\r\n (onClick)=\"onCancel()\"\r\n />\r\n <mt-button [label]=\"t(actionLabel())\" type=\"button\" (onClick)=\"onSave()\" />\r\n </div>\r\n</ng-container>\r\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: DateField, selector: "mt-date-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "showIcon", "showOnFocus", "showClear", "showTime", "timeOnly", "minDate", "maxDate", "pInputs", "required"] }, { kind: "component", type: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
111
130
|
}
|
|
112
131
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsHolidayEditor, decorators: [{
|
|
113
132
|
type: Component,
|
|
@@ -168,7 +187,7 @@ class SystemSettingsHolidaysSection {
|
|
|
168
187
|
], ...(ngDevMode ? [{ debugName: "rowActions" }] : /* istanbul ignore next */ []));
|
|
169
188
|
hasHolidays = computed(() => this.holidays().length > 0, ...(ngDevMode ? [{ debugName: "hasHolidays" }] : /* istanbul ignore next */ []));
|
|
170
189
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsHolidaysSection, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
171
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SystemSettingsHolidaysSection, isStandalone: true, selector: "mt-system-settings-holidays-section", inputs: { holidays: { classPropertyName: "holidays", publicName: "holidays", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { addHoliday: "addHoliday", editHoliday: "editHoliday", deleteHoliday: "deleteHoliday" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\r\n <mt-card class=\"block\">\r\n <div class=\"space-y-6\">\r\n <div\r\n class=\"flex flex-col gap-4 md:flex-row md:items-start md:justify-between\"\r\n >\r\n <div class=\"space-y-1\">\r\n <h4 class=\"text-base font-semibold text-neutral-900\">\r\n {{ t(\"holidays-title\") }}\r\n </h4>\r\n <p class=\"text-sm text-neutral-600\">\r\n {{ t(\"holidays-description\") }}\r\n </p>\r\n </div>\r\n\r\n <mt-button\r\n [label]=\"t('add-holiday')\"\r\n icon=\"general.plus\"\r\n (onClick)=\"addHoliday.emit()\"\r\n />\r\n </div>\r\n\r\n @if (hasHolidays()) {\r\n <mt-table\r\n noCard\r\n [data]=\"holidays()\"\r\n [columns]=\"columns()\"\r\n [rowActions]=\"rowActions()\"\r\n [generalSearch]=\"false\"\r\n [showFilters]=\"false\"\r\n [dataKey]=\"'rowKey'\"\r\n storageKey=\"admin-system-settings-holidays-table\"\r\n >\r\n </mt-table>\r\n } @else {\r\n <div\r\n class=\"rounded-xl border border-dashed border-neutral-300 bg-neutral-50 px-6 py-10 text-center\"\r\n >\r\n <h5 class=\"text-base font-semibold text-neutral-900\">\r\n {{ t(\"no-holidays-title\") }}\r\n </h5>\r\n <p class=\"mt-2 text-sm text-neutral-600\">\r\n {{ t(\"no-holidays-description\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n </mt-card>\r\n</ng-container>\r\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "clickableRows", "generalSearch", "lazyLocalSearch", "showFilters", "filterMode", "loading", "updating", "lazy", "lazyLocalSort", "lazyTotalRecords", "reorderableColumns", "reorderableRows", "dataKey", "storageKey", "storageMode", "persistStateExclude", "exportable", "printable", "groupable", "groupCountMap", "cellClickFilter", "freezeActions", "virtualScroll", "virtualScrollItemSize", "scrollHeight", "printTitle", "exportFilename", "actionShape", "rowActionsLoadingFn", "tableLayout", "noCard", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "paginatorPosition", "alwaysShowPaginator", "rowsPerPageOptions", "pageSize", "currentPage", "first", "filterTerm", "groupBy"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "rowActionsRequested", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange", "groupByChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
190
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SystemSettingsHolidaysSection, isStandalone: true, selector: "mt-system-settings-holidays-section", inputs: { holidays: { classPropertyName: "holidays", publicName: "holidays", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { addHoliday: "addHoliday", editHoliday: "editHoliday", deleteHoliday: "deleteHoliday" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\r\n <mt-card class=\"block\">\r\n <div class=\"space-y-6\">\r\n <div\r\n class=\"flex flex-col gap-4 md:flex-row md:items-start md:justify-between\"\r\n >\r\n <div class=\"space-y-1\">\r\n <h4 class=\"text-base font-semibold text-neutral-900\">\r\n {{ t(\"holidays-title\") }}\r\n </h4>\r\n <p class=\"text-sm text-neutral-600\">\r\n {{ t(\"holidays-description\") }}\r\n </p>\r\n </div>\r\n\r\n <mt-button\r\n [label]=\"t('add-holiday')\"\r\n icon=\"general.plus\"\r\n (onClick)=\"addHoliday.emit()\"\r\n />\r\n </div>\r\n\r\n @if (hasHolidays()) {\r\n <mt-table\r\n noCard\r\n [data]=\"holidays()\"\r\n [columns]=\"columns()\"\r\n [rowActions]=\"rowActions()\"\r\n [generalSearch]=\"false\"\r\n [showFilters]=\"false\"\r\n [dataKey]=\"'rowKey'\"\r\n storageKey=\"admin-system-settings-holidays-table\"\r\n >\r\n </mt-table>\r\n } @else {\r\n <div\r\n class=\"rounded-xl border border-dashed border-neutral-300 bg-neutral-50 px-6 py-10 text-center\"\r\n >\r\n <h5 class=\"text-base font-semibold text-neutral-900\">\r\n {{ t(\"no-holidays-title\") }}\r\n </h5>\r\n <p class=\"mt-2 text-sm text-neutral-600\">\r\n {{ t(\"no-holidays-description\") }}\r\n </p>\r\n </div>\r\n }\r\n </div>\r\n </mt-card>\r\n</ng-container>\r\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: Table, selector: "mt-table", inputs: ["filters", "data", "columns", "rowActions", "size", "showGridlines", "stripedRows", "selectableRows", "clickableRows", "generalSearch", "lazyLocalSearch", "showFilters", "filterMode", "loading", "updating", "lazy", "lazyLocalSort", "lazyTotalRecords", "reorderableColumns", "reorderableRows", "dataKey", "storageKey", "storageMode", "persistStateExclude", "exportable", "printable", "groupable", "groupCountMap", "cellClickFilter", "freezeActions", "virtualScroll", "virtualScrollItemSize", "scrollHeight", "printTitle", "exportFilename", "actionShape", "rowActionsLoadingFn", "tableLayout", "noCard", "tabs", "tabsOptionLabel", "tabsOptionValue", "activeTab", "actions", "paginatorPosition", "alwaysShowPaginator", "rowsPerPageOptions", "pageSize", "currentPage", "first", "filterTerm", "groupBy", "sortField", "sortDirection"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "rowActionsRequested", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange", "groupByChange", "sortFieldChange", "sortDirectionChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
172
191
|
}
|
|
173
192
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsHolidaysSection, decorators: [{
|
|
174
193
|
type: Component,
|
|
@@ -193,7 +212,7 @@ class SystemSettingsTimeSheetSection {
|
|
|
193
212
|
timezoneOptions = input([], ...(ngDevMode ? [{ debugName: "timezoneOptions" }] : /* istanbul ignore next */ []));
|
|
194
213
|
maxDailyBelowDaily = input(false, ...(ngDevMode ? [{ debugName: "maxDailyBelowDaily" }] : /* istanbul ignore next */ []));
|
|
195
214
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsTimeSheetSection, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
196
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: SystemSettingsTimeSheetSection, isStandalone: true, selector: "mt-system-settings-timesheet-section", inputs: { policyForm: { classPropertyName: "policyForm", publicName: "policyForm", isSignal: true, isRequired: true, transformFunction: null }, globalWorkingHoursForm: { classPropertyName: "globalWorkingHoursForm", publicName: "globalWorkingHoursForm", isSignal: true, isRequired: true, transformFunction: null }, dayOptions: { classPropertyName: "dayOptions", publicName: "dayOptions", isSignal: true, isRequired: false, transformFunction: null }, frequencyOptions: { classPropertyName: "frequencyOptions", publicName: "frequencyOptions", isSignal: true, isRequired: false, transformFunction: null }, timezoneOptions: { classPropertyName: "timezoneOptions", publicName: "timezoneOptions", isSignal: true, isRequired: false, transformFunction: null }, maxDailyBelowDaily: { classPropertyName: "maxDailyBelowDaily", publicName: "maxDailyBelowDaily", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\n <div class=\"grid gap-6 xl:grid-cols-2 mb-6\">\n <mt-card class=\"block\">\n <div [formGroup]=\"policyForm()\" class=\"space-y-5\">\n <div class=\"space-y-1\">\n <h4 class=\"text-base font-semibold text-neutral-900\">\n {{ t(\"general-card-title\") }}\n </h4>\n <p class=\"text-sm text-neutral-600\">\n {{ t(\"general-card-description\") }}\n </p>\n </div>\n\n <div class=\"grid gap-4 md:grid-cols-2\">\n <mt-select-field\n formControlName=\"frequency\"\n [options]=\"frequencyOptions()\"\n [optionLabel]=\"'name'\"\n [optionValue]=\"'id'\"\n [label]=\"t('frequency')\"\n [placeholder]=\"t('frequency-placeholder')\"\n [required]=\"true\"\n />\n\n <mt-number-field\n formControlName=\"maxDailyHours\"\n [label]=\"t('max-daily-hours')\"\n [placeholder]=\"t('max-daily-hours-placeholder')\"\n [min]=\"1\"\n [max]=\"24\"\n [required]=\"true\"\n [hint]=\"maxDailyBelowDaily() ? t('max-daily-below-daily') : ''\"\n />\n\n <mt-number-field\n formControlName=\"submissionDeadlineDays\"\n [label]=\"t('submission-deadline-days')\"\n [placeholder]=\"t('submission-deadline-days-placeholder')\"\n [min]=\"0\"\n [max]=\"90\"\n [required]=\"true\"\n [hint]=\"t('submission-deadline-hint')\"\n />\n </div>\n\n <div class=\"grid gap-3 md:grid-cols-2\">\n <mt-toggle-field\n formControlName=\"requireDescription\"\n [label]=\"t('require-description')\"\n />\n <mt-toggle-field\n formControlName=\"allowFutureEntry\"\n [label]=\"t('allow-future-entry')\"\n />\n <mt-toggle-field\n formControlName=\"allowBackdatedEntry\"\n [label]=\"t('allow-backdated-entry')\"\n />\n <mt-toggle-field\n formControlName=\"autoLockOnApprove\"\n [label]=\"t('auto-lock-on-approve')\"\n />\n </div>\n </div>\n </mt-card>\n\n <mt-card class=\"block\">\n <div [formGroup]=\"globalWorkingHoursForm()\" class=\"space-y-5\">\n <div class=\"space-y-1\">\n <h4 class=\"text-base font-semibold text-neutral-900\">\n {{ t(\"working-hours-card-title\") }}\n </h4>\n <p class=\"text-sm text-neutral-600\">\n {{ t(\"working-hours-card-description\") }}\n </p>\n </div>\n\n <div class=\"grid gap-4 md:grid-cols-2\">\n <mt-select-field\n class=\"md:col-span-2\"\n formControlName=\"timeZoneId\"\n [options]=\"timezoneOptions()\"\n [optionLabel]=\"'name'\"\n [optionValue]=\"'id'\"\n [label]=\"t('global-timezone')\"\n [placeholder]=\"t('global-timezone-placeholder')\"\n [filter]=\"true\"\n [required]=\"true\"\n />\n\n <mt-multi-select-field\n class=\"md:col-span-2\"\n formControlName=\"workingDays\"\n [options]=\"dayOptions()\"\n [optionLabel]=\"'name'\"\n [optionValue]=\"'dayNumber'\"\n [label]=\"t('working-days')\"\n [placeholder]=\"t('working-days-placeholder')\"\n [display]=\"'chip'\"\n [required]=\"true\"\n [showClear]=\"true\"\n />\n\n <mt-number-field\n class=\"md:col-span-2\"\n formControlName=\"hoursPerDay\"\n [label]=\"t('daily-working-hours')\"\n [placeholder]=\"t('daily-working-hours-placeholder')\"\n [min]=\"0\"\n [max]=\"24\"\n [required]=\"true\"\n />\n\n <mt-textarea-field\n class=\"md:col-span-2\"\n formControlName=\"holidaysCsv\"\n [label]=\"t('global-holidays')\"\n [placeholder]=\"t('global-holidays-placeholder')\"\n rows=\"3\"\n />\n </div>\n </div>\n </mt-card>\n </div>\n</ng-container>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: MultiSelectField, selector: "mt-multi-select-field", inputs: ["field", "label", "placeholder", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "display", "required", "maxSelectedLabels", "group", "virtualScroll", "virtualScrollItemSize", "optionGroupLabel", "optionGroupChildren", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }, { kind: "component", type: NumberField, selector: "mt-number-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "pInputs", "format", "useGrouping", "maxFractionDigits", "min", "max", "required"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: TextareaField, selector: "mt-textarea-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "noErrorStyle", "pInputs", "rows", "required", "maxLength"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
215
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: SystemSettingsTimeSheetSection, isStandalone: true, selector: "mt-system-settings-timesheet-section", inputs: { policyForm: { classPropertyName: "policyForm", publicName: "policyForm", isSignal: true, isRequired: true, transformFunction: null }, globalWorkingHoursForm: { classPropertyName: "globalWorkingHoursForm", publicName: "globalWorkingHoursForm", isSignal: true, isRequired: true, transformFunction: null }, dayOptions: { classPropertyName: "dayOptions", publicName: "dayOptions", isSignal: true, isRequired: false, transformFunction: null }, frequencyOptions: { classPropertyName: "frequencyOptions", publicName: "frequencyOptions", isSignal: true, isRequired: false, transformFunction: null }, timezoneOptions: { classPropertyName: "timezoneOptions", publicName: "timezoneOptions", isSignal: true, isRequired: false, transformFunction: null }, maxDailyBelowDaily: { classPropertyName: "maxDailyBelowDaily", publicName: "maxDailyBelowDaily", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\r\n <div class=\"grid gap-6 xl:grid-cols-2 mb-6\">\r\n <mt-card class=\"block\">\r\n <div [formGroup]=\"policyForm()\" class=\"space-y-5\">\r\n <div class=\"space-y-1\">\r\n <h4 class=\"text-base font-semibold text-neutral-900\">\r\n {{ t(\"general-card-title\") }}\r\n </h4>\r\n <p class=\"text-sm text-neutral-600\">\r\n {{ t(\"general-card-description\") }}\r\n </p>\r\n </div>\r\n\r\n <div class=\"grid gap-4 md:grid-cols-2\">\r\n <mt-select-field\r\n formControlName=\"frequency\"\r\n [options]=\"frequencyOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'id'\"\r\n [label]=\"t('frequency')\"\r\n [placeholder]=\"t('frequency-placeholder')\"\r\n [required]=\"true\"\r\n />\r\n\r\n <mt-number-field\r\n formControlName=\"maxDailyHours\"\r\n [label]=\"t('max-daily-hours')\"\r\n [placeholder]=\"t('max-daily-hours-placeholder')\"\r\n [min]=\"1\"\r\n [max]=\"24\"\r\n [required]=\"true\"\r\n [hint]=\"maxDailyBelowDaily() ? t('max-daily-below-daily') : ''\"\r\n />\r\n\r\n <mt-number-field\r\n formControlName=\"submissionDeadlineDays\"\r\n [label]=\"t('submission-deadline-days')\"\r\n [placeholder]=\"t('submission-deadline-days-placeholder')\"\r\n [min]=\"0\"\r\n [max]=\"90\"\r\n [required]=\"true\"\r\n [hint]=\"t('submission-deadline-hint')\"\r\n />\r\n </div>\r\n\r\n <div class=\"grid gap-3 md:grid-cols-2\">\r\n <mt-toggle-field\r\n formControlName=\"requireDescription\"\r\n [label]=\"t('require-description')\"\r\n />\r\n <mt-toggle-field\r\n formControlName=\"allowFutureEntry\"\r\n [label]=\"t('allow-future-entry')\"\r\n />\r\n <mt-toggle-field\r\n formControlName=\"allowBackdatedEntry\"\r\n [label]=\"t('allow-backdated-entry')\"\r\n />\r\n <mt-toggle-field\r\n formControlName=\"autoLockOnApprove\"\r\n [label]=\"t('auto-lock-on-approve')\"\r\n />\r\n </div>\r\n </div>\r\n </mt-card>\r\n\r\n <mt-card class=\"block\">\r\n <div [formGroup]=\"globalWorkingHoursForm()\" class=\"space-y-5\">\r\n <div class=\"space-y-1\">\r\n <h4 class=\"text-base font-semibold text-neutral-900\">\r\n {{ t(\"working-hours-card-title\") }}\r\n </h4>\r\n <p class=\"text-sm text-neutral-600\">\r\n {{ t(\"working-hours-card-description\") }}\r\n </p>\r\n </div>\r\n\r\n <div class=\"grid gap-4 md:grid-cols-2\">\r\n <mt-select-field\r\n class=\"md:col-span-2\"\r\n formControlName=\"timeZoneId\"\r\n [options]=\"timezoneOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'id'\"\r\n [label]=\"t('global-timezone')\"\r\n [placeholder]=\"t('global-timezone-placeholder')\"\r\n [filter]=\"true\"\r\n [required]=\"true\"\r\n />\r\n\r\n <mt-multi-select-field\r\n class=\"md:col-span-2\"\r\n formControlName=\"workingDays\"\r\n [options]=\"dayOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'dayNumber'\"\r\n [label]=\"t('working-days')\"\r\n [placeholder]=\"t('working-days-placeholder')\"\r\n [display]=\"'chip'\"\r\n [required]=\"true\"\r\n [showClear]=\"true\"\r\n />\r\n\r\n <mt-number-field\r\n class=\"md:col-span-2\"\r\n formControlName=\"hoursPerDay\"\r\n [label]=\"t('daily-working-hours')\"\r\n [placeholder]=\"t('daily-working-hours-placeholder')\"\r\n [min]=\"0\"\r\n [max]=\"24\"\r\n [required]=\"true\"\r\n />\r\n\r\n <mt-textarea-field\r\n class=\"md:col-span-2\"\r\n formControlName=\"holidaysCsv\"\r\n [label]=\"t('global-holidays')\"\r\n [placeholder]=\"t('global-holidays-placeholder')\"\r\n rows=\"3\"\r\n />\r\n </div>\r\n </div>\r\n </mt-card>\r\n </div>\r\n</ng-container>\r\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: MultiSelectField, selector: "mt-multi-select-field", inputs: ["field", "label", "placeholder", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "display", "required", "maxSelectedLabels", "group", "virtualScroll", "virtualScrollItemSize", "optionGroupLabel", "optionGroupChildren", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }, { kind: "component", type: NumberField, selector: "mt-number-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "pInputs", "format", "useGrouping", "maxFractionDigits", "min", "max", "required"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: TextareaField, selector: "mt-textarea-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "noErrorStyle", "pInputs", "rows", "required", "maxLength"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
197
216
|
}
|
|
198
217
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsTimeSheetSection, decorators: [{
|
|
199
218
|
type: Component,
|
|
@@ -206,9 +225,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
206
225
|
SelectField,
|
|
207
226
|
TextareaField,
|
|
208
227
|
ToggleField,
|
|
209
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\n <div class=\"grid gap-6 xl:grid-cols-2 mb-6\">\n <mt-card class=\"block\">\n <div [formGroup]=\"policyForm()\" class=\"space-y-5\">\n <div class=\"space-y-1\">\n <h4 class=\"text-base font-semibold text-neutral-900\">\n {{ t(\"general-card-title\") }}\n </h4>\n <p class=\"text-sm text-neutral-600\">\n {{ t(\"general-card-description\") }}\n </p>\n </div>\n\n <div class=\"grid gap-4 md:grid-cols-2\">\n <mt-select-field\n formControlName=\"frequency\"\n [options]=\"frequencyOptions()\"\n [optionLabel]=\"'name'\"\n [optionValue]=\"'id'\"\n [label]=\"t('frequency')\"\n [placeholder]=\"t('frequency-placeholder')\"\n [required]=\"true\"\n />\n\n <mt-number-field\n formControlName=\"maxDailyHours\"\n [label]=\"t('max-daily-hours')\"\n [placeholder]=\"t('max-daily-hours-placeholder')\"\n [min]=\"1\"\n [max]=\"24\"\n [required]=\"true\"\n [hint]=\"maxDailyBelowDaily() ? t('max-daily-below-daily') : ''\"\n />\n\n <mt-number-field\n formControlName=\"submissionDeadlineDays\"\n [label]=\"t('submission-deadline-days')\"\n [placeholder]=\"t('submission-deadline-days-placeholder')\"\n [min]=\"0\"\n [max]=\"90\"\n [required]=\"true\"\n [hint]=\"t('submission-deadline-hint')\"\n />\n </div>\n\n <div class=\"grid gap-3 md:grid-cols-2\">\n <mt-toggle-field\n formControlName=\"requireDescription\"\n [label]=\"t('require-description')\"\n />\n <mt-toggle-field\n formControlName=\"allowFutureEntry\"\n [label]=\"t('allow-future-entry')\"\n />\n <mt-toggle-field\n formControlName=\"allowBackdatedEntry\"\n [label]=\"t('allow-backdated-entry')\"\n />\n <mt-toggle-field\n formControlName=\"autoLockOnApprove\"\n [label]=\"t('auto-lock-on-approve')\"\n />\n </div>\n </div>\n </mt-card>\n\n <mt-card class=\"block\">\n <div [formGroup]=\"globalWorkingHoursForm()\" class=\"space-y-5\">\n <div class=\"space-y-1\">\n <h4 class=\"text-base font-semibold text-neutral-900\">\n {{ t(\"working-hours-card-title\") }}\n </h4>\n <p class=\"text-sm text-neutral-600\">\n {{ t(\"working-hours-card-description\") }}\n </p>\n </div>\n\n <div class=\"grid gap-4 md:grid-cols-2\">\n <mt-select-field\n class=\"md:col-span-2\"\n formControlName=\"timeZoneId\"\n [options]=\"timezoneOptions()\"\n [optionLabel]=\"'name'\"\n [optionValue]=\"'id'\"\n [label]=\"t('global-timezone')\"\n [placeholder]=\"t('global-timezone-placeholder')\"\n [filter]=\"true\"\n [required]=\"true\"\n />\n\n <mt-multi-select-field\n class=\"md:col-span-2\"\n formControlName=\"workingDays\"\n [options]=\"dayOptions()\"\n [optionLabel]=\"'name'\"\n [optionValue]=\"'dayNumber'\"\n [label]=\"t('working-days')\"\n [placeholder]=\"t('working-days-placeholder')\"\n [display]=\"'chip'\"\n [required]=\"true\"\n [showClear]=\"true\"\n />\n\n <mt-number-field\n class=\"md:col-span-2\"\n formControlName=\"hoursPerDay\"\n [label]=\"t('daily-working-hours')\"\n [placeholder]=\"t('daily-working-hours-placeholder')\"\n [min]=\"0\"\n [max]=\"24\"\n [required]=\"true\"\n />\n\n <mt-textarea-field\n class=\"md:col-span-2\"\n formControlName=\"holidaysCsv\"\n [label]=\"t('global-holidays')\"\n [placeholder]=\"t('global-holidays-placeholder')\"\n rows=\"3\"\n />\n </div>\n </div>\n </mt-card>\n </div>\n</ng-container>\n" }]
|
|
228
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\r\n <div class=\"grid gap-6 xl:grid-cols-2 mb-6\">\r\n <mt-card class=\"block\">\r\n <div [formGroup]=\"policyForm()\" class=\"space-y-5\">\r\n <div class=\"space-y-1\">\r\n <h4 class=\"text-base font-semibold text-neutral-900\">\r\n {{ t(\"general-card-title\") }}\r\n </h4>\r\n <p class=\"text-sm text-neutral-600\">\r\n {{ t(\"general-card-description\") }}\r\n </p>\r\n </div>\r\n\r\n <div class=\"grid gap-4 md:grid-cols-2\">\r\n <mt-select-field\r\n formControlName=\"frequency\"\r\n [options]=\"frequencyOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'id'\"\r\n [label]=\"t('frequency')\"\r\n [placeholder]=\"t('frequency-placeholder')\"\r\n [required]=\"true\"\r\n />\r\n\r\n <mt-number-field\r\n formControlName=\"maxDailyHours\"\r\n [label]=\"t('max-daily-hours')\"\r\n [placeholder]=\"t('max-daily-hours-placeholder')\"\r\n [min]=\"1\"\r\n [max]=\"24\"\r\n [required]=\"true\"\r\n [hint]=\"maxDailyBelowDaily() ? t('max-daily-below-daily') : ''\"\r\n />\r\n\r\n <mt-number-field\r\n formControlName=\"submissionDeadlineDays\"\r\n [label]=\"t('submission-deadline-days')\"\r\n [placeholder]=\"t('submission-deadline-days-placeholder')\"\r\n [min]=\"0\"\r\n [max]=\"90\"\r\n [required]=\"true\"\r\n [hint]=\"t('submission-deadline-hint')\"\r\n />\r\n </div>\r\n\r\n <div class=\"grid gap-3 md:grid-cols-2\">\r\n <mt-toggle-field\r\n formControlName=\"requireDescription\"\r\n [label]=\"t('require-description')\"\r\n />\r\n <mt-toggle-field\r\n formControlName=\"allowFutureEntry\"\r\n [label]=\"t('allow-future-entry')\"\r\n />\r\n <mt-toggle-field\r\n formControlName=\"allowBackdatedEntry\"\r\n [label]=\"t('allow-backdated-entry')\"\r\n />\r\n <mt-toggle-field\r\n formControlName=\"autoLockOnApprove\"\r\n [label]=\"t('auto-lock-on-approve')\"\r\n />\r\n </div>\r\n </div>\r\n </mt-card>\r\n\r\n <mt-card class=\"block\">\r\n <div [formGroup]=\"globalWorkingHoursForm()\" class=\"space-y-5\">\r\n <div class=\"space-y-1\">\r\n <h4 class=\"text-base font-semibold text-neutral-900\">\r\n {{ t(\"working-hours-card-title\") }}\r\n </h4>\r\n <p class=\"text-sm text-neutral-600\">\r\n {{ t(\"working-hours-card-description\") }}\r\n </p>\r\n </div>\r\n\r\n <div class=\"grid gap-4 md:grid-cols-2\">\r\n <mt-select-field\r\n class=\"md:col-span-2\"\r\n formControlName=\"timeZoneId\"\r\n [options]=\"timezoneOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'id'\"\r\n [label]=\"t('global-timezone')\"\r\n [placeholder]=\"t('global-timezone-placeholder')\"\r\n [filter]=\"true\"\r\n [required]=\"true\"\r\n />\r\n\r\n <mt-multi-select-field\r\n class=\"md:col-span-2\"\r\n formControlName=\"workingDays\"\r\n [options]=\"dayOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'dayNumber'\"\r\n [label]=\"t('working-days')\"\r\n [placeholder]=\"t('working-days-placeholder')\"\r\n [display]=\"'chip'\"\r\n [required]=\"true\"\r\n [showClear]=\"true\"\r\n />\r\n\r\n <mt-number-field\r\n class=\"md:col-span-2\"\r\n formControlName=\"hoursPerDay\"\r\n [label]=\"t('daily-working-hours')\"\r\n [placeholder]=\"t('daily-working-hours-placeholder')\"\r\n [min]=\"0\"\r\n [max]=\"24\"\r\n [required]=\"true\"\r\n />\r\n\r\n <mt-textarea-field\r\n class=\"md:col-span-2\"\r\n formControlName=\"holidaysCsv\"\r\n [label]=\"t('global-holidays')\"\r\n [placeholder]=\"t('global-holidays-placeholder')\"\r\n rows=\"3\"\r\n />\r\n </div>\r\n </div>\r\n </mt-card>\r\n </div>\r\n</ng-container>\r\n" }]
|
|
210
229
|
}], propDecorators: { policyForm: [{ type: i0.Input, args: [{ isSignal: true, alias: "policyForm", required: true }] }], globalWorkingHoursForm: [{ type: i0.Input, args: [{ isSignal: true, alias: "globalWorkingHoursForm", required: true }] }], dayOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "dayOptions", required: false }] }], frequencyOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "frequencyOptions", required: false }] }], timezoneOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "timezoneOptions", required: false }] }], maxDailyBelowDaily: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDailyBelowDaily", required: false }] }] } });
|
|
211
230
|
|
|
231
|
+
/** The settings record General Configuration fields live in. */
|
|
232
|
+
const GENERAL_CONFIGURATION_SETTING_KEY = 'Identity';
|
|
212
233
|
const FIXED_CURRENCIES = [
|
|
213
234
|
{
|
|
214
235
|
code: 'SAR',
|
|
@@ -238,6 +259,25 @@ const FIXED_CURRENCIES = [
|
|
|
238
259
|
},
|
|
239
260
|
},
|
|
240
261
|
];
|
|
262
|
+
/**
|
|
263
|
+
* Explore landing views, mirroring the app-client explore header switcher
|
|
264
|
+
* (same icons) so the configured default reads as the same choice.
|
|
265
|
+
*/
|
|
266
|
+
const EXPLORE_DEFAULT_VIEW_OPTIONS = [
|
|
267
|
+
{
|
|
268
|
+
id: 'cards',
|
|
269
|
+
translationKey: 'explore-default-view-cards',
|
|
270
|
+
icon: 'layout.grid-01',
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
id: 'timeline',
|
|
274
|
+
translationKey: 'explore-default-view-timeline',
|
|
275
|
+
icon: 'time.clock',
|
|
276
|
+
},
|
|
277
|
+
];
|
|
278
|
+
const DEFAULT_GENERAL_CONFIGURATION = {
|
|
279
|
+
defaultExploreView: 'cards',
|
|
280
|
+
};
|
|
241
281
|
const DEFAULT_DATE_FORMAT_OPTIONS = [
|
|
242
282
|
{
|
|
243
283
|
key: 'MM/dd/yyyy',
|
|
@@ -369,6 +409,12 @@ class SystemSettings {
|
|
|
369
409
|
},
|
|
370
410
|
];
|
|
371
411
|
form = new FormGroup({
|
|
412
|
+
generalConfiguration: new FormGroup({
|
|
413
|
+
defaultExploreView: new FormControl('cards', {
|
|
414
|
+
nonNullable: true,
|
|
415
|
+
validators: [Validators.required],
|
|
416
|
+
}),
|
|
417
|
+
}),
|
|
372
418
|
timezone: new FormGroup({
|
|
373
419
|
regionId: new FormControl(null, Validators.required),
|
|
374
420
|
dateFormat: new FormControl(null, Validators.required),
|
|
@@ -449,6 +495,12 @@ class SystemSettings {
|
|
|
449
495
|
formValue = toSignal(this.form.valueChanges, {
|
|
450
496
|
initialValue: this.form.getRawValue(),
|
|
451
497
|
});
|
|
498
|
+
/**
|
|
499
|
+
* The `Identity` record. It is shared with `@masterteam/brand-display`, which
|
|
500
|
+
* owns every other field in it — we only read/write the General Configuration
|
|
501
|
+
* slice and must preserve the rest verbatim.
|
|
502
|
+
*/
|
|
503
|
+
generalConfigurationSetting = computed(() => this.findSettingByKey(GENERAL_CONFIGURATION_SETTING_KEY), ...(ngDevMode ? [{ debugName: "generalConfigurationSetting" }] : /* istanbul ignore next */ []));
|
|
452
504
|
holidaysSetting = computed(() => this.findSettingByKey('Holidays'), ...(ngDevMode ? [{ debugName: "holidaysSetting" }] : /* istanbul ignore next */ []));
|
|
453
505
|
timezoneSetting = computed(() => this.findSettingByKey('Timezone'), ...(ngDevMode ? [{ debugName: "timezoneSetting" }] : /* istanbul ignore next */ []));
|
|
454
506
|
currencySetting = computed(() => this.findSettingByKey('Currency'), ...(ngDevMode ? [{ debugName: "currencySetting" }] : /* istanbul ignore next */ []));
|
|
@@ -496,6 +548,14 @@ class SystemSettings {
|
|
|
496
548
|
name: this.transloco.translate(`system-settings.${day.translationKey}`),
|
|
497
549
|
}));
|
|
498
550
|
}, ...(ngDevMode ? [{ debugName: "dotnetDayOptions" }] : /* istanbul ignore next */ []));
|
|
551
|
+
exploreDefaultViewOptions = computed(() => {
|
|
552
|
+
this.activeLang();
|
|
553
|
+
return EXPLORE_DEFAULT_VIEW_OPTIONS.map((option) => ({
|
|
554
|
+
id: option.id,
|
|
555
|
+
name: this.transloco.translate(`system-settings.${option.translationKey}`),
|
|
556
|
+
icon: option.icon,
|
|
557
|
+
}));
|
|
558
|
+
}, ...(ngDevMode ? [{ debugName: "exploreDefaultViewOptions" }] : /* istanbul ignore next */ []));
|
|
499
559
|
frequencyOptions = computed(() => {
|
|
500
560
|
this.activeLang();
|
|
501
561
|
return TIMESHEET_FREQUENCY_OPTIONS.map((item) => ({
|
|
@@ -516,7 +576,8 @@ class SystemSettings {
|
|
|
516
576
|
if (!current) {
|
|
517
577
|
return false;
|
|
518
578
|
}
|
|
519
|
-
return (!this.areEqual(initial.
|
|
579
|
+
return (!this.areEqual(initial.generalConfiguration, current.generalConfiguration) ||
|
|
580
|
+
!this.areEqual(initial.holidays, current.holidays) ||
|
|
520
581
|
!this.areEqual(initial.timezone, current.timezone) ||
|
|
521
582
|
!this.areEqual(initial.currency, current.currency) ||
|
|
522
583
|
!this.areEqual(initial.weekend, current.weekend) ||
|
|
@@ -550,7 +611,8 @@ class SystemSettings {
|
|
|
550
611
|
if (version === this.hydrationVersion()) {
|
|
551
612
|
return;
|
|
552
613
|
}
|
|
553
|
-
this.hydrateForm(this.
|
|
614
|
+
this.hydrateForm(this.generalConfigurationSetting() ??
|
|
615
|
+
this.createFallbackSetting(GENERAL_CONFIGURATION_SETTING_KEY), this.holidaysSetting() ?? this.createFallbackSetting('Holidays'), this.timezoneSetting() ?? this.createFallbackSetting('Timezone'), this.currencySetting() ?? this.createFallbackSetting('Currency'), this.weekendSetting() ?? this.createFallbackSetting('Weekend'), this.smtpSetting() ?? this.createFallbackSetting('SMTP'), this.timeSheetPolicySetting() ??
|
|
554
616
|
this.createFallbackSetting('TimeSheetPolicy'), this.globalWorkingHoursSetting() ??
|
|
555
617
|
this.createFallbackSetting('GlobalWorkingHours'));
|
|
556
618
|
this.hydrationVersion.set(version);
|
|
@@ -620,6 +682,18 @@ class SystemSettings {
|
|
|
620
682
|
return;
|
|
621
683
|
}
|
|
622
684
|
const values = [];
|
|
685
|
+
if (!this.areEqual(initialSnapshot.generalConfiguration, nextSnapshot.generalConfiguration)) {
|
|
686
|
+
// `Identity` is shared with brand-display and is saved by full
|
|
687
|
+
// replacement, so merge our slice onto the record as last loaded instead
|
|
688
|
+
// of sending it alone — sending only our fields would wipe the branding.
|
|
689
|
+
values.push({
|
|
690
|
+
key: GENERAL_CONFIGURATION_SETTING_KEY,
|
|
691
|
+
value: {
|
|
692
|
+
...this.getIdentityRecord(),
|
|
693
|
+
...nextSnapshot.generalConfiguration,
|
|
694
|
+
},
|
|
695
|
+
});
|
|
696
|
+
}
|
|
623
697
|
if (!this.areEqual(initialSnapshot.holidays, nextSnapshot.holidays)) {
|
|
624
698
|
values.push({
|
|
625
699
|
key: 'Holidays',
|
|
@@ -726,7 +800,8 @@ class SystemSettings {
|
|
|
726
800
|
},
|
|
727
801
|
});
|
|
728
802
|
}
|
|
729
|
-
hydrateForm(holidaysSetting, timezoneSetting, currencySetting, weekendSetting, smtpSetting, timeSheetPolicySetting, globalWorkingHoursSetting) {
|
|
803
|
+
hydrateForm(generalConfigurationSetting, holidaysSetting, timezoneSetting, currencySetting, weekendSetting, smtpSetting, timeSheetPolicySetting, globalWorkingHoursSetting) {
|
|
804
|
+
const generalConfiguration = this.normalizeGeneralConfigurationSnapshot(this.extractGeneralConfigurationValue(generalConfigurationSetting));
|
|
730
805
|
const holidays = this.extractHolidaysValue(holidaysSetting);
|
|
731
806
|
const timezone = this.normalizeTimezoneSnapshot(this.extractTimezoneValue(timezoneSetting));
|
|
732
807
|
const currency = this.normalizeCurrencySnapshot(this.extractCurrencyValue(currencySetting));
|
|
@@ -735,6 +810,9 @@ class SystemSettings {
|
|
|
735
810
|
const globalWorkingHours = this.normalizeGlobalWorkingHoursSnapshot(this.extractGlobalWorkingHoursValue(globalWorkingHoursSetting));
|
|
736
811
|
const timeSheetPolicy = this.normalizeTimeSheetPolicySnapshot(this.extractTimeSheetPolicyValue(timeSheetPolicySetting), globalWorkingHours.hoursPerDay);
|
|
737
812
|
this.holidayItems.set(holidays.data);
|
|
813
|
+
this.form.controls.generalConfiguration.setValue({
|
|
814
|
+
defaultExploreView: generalConfiguration.defaultExploreView,
|
|
815
|
+
});
|
|
738
816
|
this.form.controls.timezone.setValue({
|
|
739
817
|
regionId: timezone.region?.id ?? null,
|
|
740
818
|
dateFormat: timezone.dateFormat,
|
|
@@ -772,6 +850,7 @@ class SystemSettings {
|
|
|
772
850
|
this.form.markAsPristine();
|
|
773
851
|
this.form.markAsUntouched();
|
|
774
852
|
this.initialSnapshot.set({
|
|
853
|
+
generalConfiguration,
|
|
775
854
|
holidays,
|
|
776
855
|
timezone,
|
|
777
856
|
currency,
|
|
@@ -788,6 +867,7 @@ class SystemSettings {
|
|
|
788
867
|
return null;
|
|
789
868
|
}
|
|
790
869
|
return {
|
|
870
|
+
generalConfiguration: this.buildGeneralConfigurationValue(),
|
|
791
871
|
holidays: {
|
|
792
872
|
data: this.holidayItems().map((item) => ({
|
|
793
873
|
label: item.label.trim(),
|
|
@@ -838,6 +918,21 @@ class SystemSettings {
|
|
|
838
918
|
format: currencyForm.format,
|
|
839
919
|
};
|
|
840
920
|
}
|
|
921
|
+
/**
|
|
922
|
+
* The `Identity` value exactly as last returned by the API (or written by a
|
|
923
|
+
* previous save in this session), used as the base every save merges onto so
|
|
924
|
+
* branding fields this page does not model survive round-trips.
|
|
925
|
+
*/
|
|
926
|
+
getIdentityRecord() {
|
|
927
|
+
const value = this.generalConfigurationSetting()?.value;
|
|
928
|
+
return isRecord(value) ? value : {};
|
|
929
|
+
}
|
|
930
|
+
buildGeneralConfigurationValue() {
|
|
931
|
+
return {
|
|
932
|
+
defaultExploreView: normalizeExploreDefaultView(this.form.controls.generalConfiguration.controls.defaultExploreView
|
|
933
|
+
.value),
|
|
934
|
+
};
|
|
935
|
+
}
|
|
841
936
|
buildWeekendValue() {
|
|
842
937
|
return {
|
|
843
938
|
days: normalizeWeekendDays(this.form.controls.weekend.controls.days.value),
|
|
@@ -879,6 +974,15 @@ class SystemSettings {
|
|
|
879
974
|
const normalizedKey = key.trim().toLowerCase();
|
|
880
975
|
return (this.settings()?.find((setting) => setting.key.trim().toLowerCase() === normalizedKey) ?? null);
|
|
881
976
|
}
|
|
977
|
+
extractGeneralConfigurationValue(setting) {
|
|
978
|
+
if (!isRecord(setting.value)) {
|
|
979
|
+
return { ...DEFAULT_GENERAL_CONFIGURATION };
|
|
980
|
+
}
|
|
981
|
+
return {
|
|
982
|
+
defaultExploreView: normalizeExploreDefaultView(setting.value['defaultExploreView'] ??
|
|
983
|
+
setting.value['DefaultExploreView']),
|
|
984
|
+
};
|
|
985
|
+
}
|
|
882
986
|
extractHolidaysValue(setting) {
|
|
883
987
|
if (!isRecord(setting.value)) {
|
|
884
988
|
return { data: [] };
|
|
@@ -1037,6 +1141,11 @@ class SystemSettings {
|
|
|
1037
1141
|
ar: getString(value['ar']) ?? FIXED_CURRENCIES[0].unit.ar,
|
|
1038
1142
|
};
|
|
1039
1143
|
}
|
|
1144
|
+
normalizeGeneralConfigurationSnapshot(value) {
|
|
1145
|
+
return {
|
|
1146
|
+
defaultExploreView: normalizeExploreDefaultView(value.defaultExploreView),
|
|
1147
|
+
};
|
|
1148
|
+
}
|
|
1040
1149
|
normalizeTimezoneSnapshot(value) {
|
|
1041
1150
|
const defaults = this.getDefaultTimezoneValue();
|
|
1042
1151
|
return {
|
|
@@ -1092,6 +1201,13 @@ class SystemSettings {
|
|
|
1092
1201
|
}
|
|
1093
1202
|
createFallbackSetting(key) {
|
|
1094
1203
|
switch (key) {
|
|
1204
|
+
case 'Identity':
|
|
1205
|
+
return {
|
|
1206
|
+
key,
|
|
1207
|
+
label: key,
|
|
1208
|
+
description: key,
|
|
1209
|
+
value: { ...DEFAULT_GENERAL_CONFIGURATION },
|
|
1210
|
+
};
|
|
1095
1211
|
case 'Holidays':
|
|
1096
1212
|
return { key, label: key, description: key, value: { data: [] } };
|
|
1097
1213
|
case 'Timezone':
|
|
@@ -1302,7 +1418,7 @@ class SystemSettings {
|
|
|
1302
1418
|
return JSON.stringify(left) === JSON.stringify(right);
|
|
1303
1419
|
}
|
|
1304
1420
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettings, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1305
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SystemSettings, isStandalone: true, selector: "mt-system-settings", inputs: { apiBasePath: { classPropertyName: "apiBasePath", publicName: "apiBasePath", isSignal: true, isRequired: false, transformFunction: null }, backRoute: { classPropertyName: "backRoute", publicName: "backRoute", isSignal: true, isRequired: false, transformFunction: null }, formatSchema: { classPropertyName: "formatSchema", publicName: "formatSchema", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\
|
|
1421
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: SystemSettings, isStandalone: true, selector: "mt-system-settings", inputs: { apiBasePath: { classPropertyName: "apiBasePath", publicName: "apiBasePath", isSignal: true, isRequired: false, transformFunction: null }, backRoute: { classPropertyName: "backRoute", publicName: "backRoute", isSignal: true, isRequired: false, transformFunction: null }, formatSchema: { classPropertyName: "formatSchema", publicName: "formatSchema", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\n <mt-page\n [title]=\"t('page-title')\"\n [avatarIcon]=\"'general.settings-02'\"\n [avatarStyle]=\"{\n '--p-avatar-background': 'var(--p-emerald-100)',\n '--p-avatar-color': 'var(--p-emerald-700)',\n }\"\n (backButtonClick)=\"goBack()\"\n backButton\n >\n <div class=\"flex flex-col gap-3\">\n <div\n class=\"flex flex-col gap-4 md:flex-row md:items-end md:justify-between\"\n >\n <div>\n <h3 class=\"text-lg font-bold text-neutral-900\">\n {{ t(\"page-title\") }}\n </h3>\n <mt-breadcrumb\n [items]=\"breadcrumbItems\"\n [styleClass]=\"'flex justify-start mx-1'\"\n />\n </div>\n\n <mt-button\n [label]=\"t('save')\"\n icon=\"general.save-01\"\n [tooltip]=\"t('save-tooltip')\"\n [badge]=\"hasChanges() ? '!' : ''\"\n badgeSeverity=\"warn\"\n [loading]=\"updating()\"\n [disabled]=\"!canSaveSettings()\"\n (onClick)=\"onSave()\"\n />\n </div>\n\n @if (isLoading()) {\n <div class=\"space-y-4\">\n <p-skeleton width=\"100%\" height=\"12rem\" borderRadius=\"0.75rem\" />\n <p-skeleton width=\"100%\" height=\"18rem\" borderRadius=\"0.75rem\" />\n <p-skeleton width=\"100%\" height=\"14rem\" borderRadius=\"0.75rem\" />\n </div>\n } @else {\n <!--\n BE/HTTP errors (timezonesError, settingsError, updateError) are already\n surfaced as toasts by the HTTP interceptor, so they are intentionally\n not rendered as top-of-page banners here to avoid duplicate messaging.\n -->\n <div class=\"space-y-6\">\n <mt-system-settings-holidays-section\n [holidays]=\"holidayTableRows()\"\n (addHoliday)=\"openAddHoliday()\"\n (editHoliday)=\"editHoliday($event)\"\n (deleteHoliday)=\"deleteHoliday($event)\"\n />\n\n <mt-system-settings-general-section\n [generalConfigurationForm]=\"form.controls.generalConfiguration\"\n [timezoneForm]=\"form.controls.timezone\"\n [currencyForm]=\"form.controls.currency\"\n [weekendForm]=\"form.controls.weekend\"\n [exploreDefaultViewOptions]=\"exploreDefaultViewOptions()\"\n [dateFormatOptions]=\"dateFormatOptions()\"\n [timeFormatOptions]=\"timeFormatOptions()\"\n [currencyOptions]=\"currencyOptions()\"\n [currencyFormatOptions]=\"currencyFormatOptions()\"\n [weekendOptions]=\"weekendOptions()\"\n />\n\n <mt-system-settings-timesheet-section\n [policyForm]=\"form.controls.timeSheetPolicy\"\n [globalWorkingHoursForm]=\"form.controls.globalWorkingHours\"\n [dayOptions]=\"dotnetDayOptions()\"\n [frequencyOptions]=\"frequencyOptions()\"\n [timezoneOptions]=\"timezoneOptions()\"\n [maxDailyBelowDaily]=\"form.errors?.['maxDailyBelowDaily'] ?? false\"\n />\n\n <mt-system-settings-smtp-section [smtpForm]=\"form.controls.smtp\" />\n </div>\n }\n </div>\n </mt-page>\n</ng-container>\n", styles: [":host{display:block}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Page, selector: "mt-page", inputs: ["backButton", "backButtonIcon", "avatarIcon", "avatarStyle", "avatarShape", "title", "tabs", "activeTab", "contentClass", "contentId"], outputs: ["backButtonClick", "tabChange"] }, { kind: "component", type: Button, selector: "mt-button", inputs: ["icon", "label", "tooltip", "class", "type", "styleClass", "severity", "badge", "variant", "badgeSeverity", "size", "iconPos", "autofocus", "fluid", "raised", "rounded", "text", "plain", "outlined", "link", "disabled", "loading", "pInputs"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: Breadcrumb, selector: "mt-breadcrumb", inputs: ["items", "styleClass"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: SkeletonModule }, { kind: "component", type: i1$1.Skeleton, selector: "p-skeleton", inputs: ["styleClass", "shape", "animation", "borderRadius", "size", "width", "height"] }, { kind: "component", type: SystemSettingsHolidaysSection, selector: "mt-system-settings-holidays-section", inputs: ["holidays"], outputs: ["addHoliday", "editHoliday", "deleteHoliday"] }, { kind: "component", type: SystemSettingsGeneralSection, selector: "mt-system-settings-general-section", inputs: ["generalConfigurationForm", "timezoneForm", "currencyForm", "weekendForm", "exploreDefaultViewOptions", "dateFormatOptions", "timeFormatOptions", "currencyOptions", "currencyFormatOptions", "weekendOptions"] }, { kind: "component", type: SystemSettingsSmtpSection, selector: "mt-system-settings-smtp-section", inputs: ["smtpForm"] }, { kind: "component", type: SystemSettingsTimeSheetSection, selector: "mt-system-settings-timesheet-section", inputs: ["policyForm", "globalWorkingHoursForm", "dayOptions", "frequencyOptions", "timezoneOptions", "maxDailyBelowDaily"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1306
1422
|
}
|
|
1307
1423
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettings, decorators: [{
|
|
1308
1424
|
type: Component,
|
|
@@ -1318,7 +1434,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
1318
1434
|
SystemSettingsGeneralSection,
|
|
1319
1435
|
SystemSettingsSmtpSection,
|
|
1320
1436
|
SystemSettingsTimeSheetSection,
|
|
1321
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\
|
|
1437
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\n <mt-page\n [title]=\"t('page-title')\"\n [avatarIcon]=\"'general.settings-02'\"\n [avatarStyle]=\"{\n '--p-avatar-background': 'var(--p-emerald-100)',\n '--p-avatar-color': 'var(--p-emerald-700)',\n }\"\n (backButtonClick)=\"goBack()\"\n backButton\n >\n <div class=\"flex flex-col gap-3\">\n <div\n class=\"flex flex-col gap-4 md:flex-row md:items-end md:justify-between\"\n >\n <div>\n <h3 class=\"text-lg font-bold text-neutral-900\">\n {{ t(\"page-title\") }}\n </h3>\n <mt-breadcrumb\n [items]=\"breadcrumbItems\"\n [styleClass]=\"'flex justify-start mx-1'\"\n />\n </div>\n\n <mt-button\n [label]=\"t('save')\"\n icon=\"general.save-01\"\n [tooltip]=\"t('save-tooltip')\"\n [badge]=\"hasChanges() ? '!' : ''\"\n badgeSeverity=\"warn\"\n [loading]=\"updating()\"\n [disabled]=\"!canSaveSettings()\"\n (onClick)=\"onSave()\"\n />\n </div>\n\n @if (isLoading()) {\n <div class=\"space-y-4\">\n <p-skeleton width=\"100%\" height=\"12rem\" borderRadius=\"0.75rem\" />\n <p-skeleton width=\"100%\" height=\"18rem\" borderRadius=\"0.75rem\" />\n <p-skeleton width=\"100%\" height=\"14rem\" borderRadius=\"0.75rem\" />\n </div>\n } @else {\n <!--\n BE/HTTP errors (timezonesError, settingsError, updateError) are already\n surfaced as toasts by the HTTP interceptor, so they are intentionally\n not rendered as top-of-page banners here to avoid duplicate messaging.\n -->\n <div class=\"space-y-6\">\n <mt-system-settings-holidays-section\n [holidays]=\"holidayTableRows()\"\n (addHoliday)=\"openAddHoliday()\"\n (editHoliday)=\"editHoliday($event)\"\n (deleteHoliday)=\"deleteHoliday($event)\"\n />\n\n <mt-system-settings-general-section\n [generalConfigurationForm]=\"form.controls.generalConfiguration\"\n [timezoneForm]=\"form.controls.timezone\"\n [currencyForm]=\"form.controls.currency\"\n [weekendForm]=\"form.controls.weekend\"\n [exploreDefaultViewOptions]=\"exploreDefaultViewOptions()\"\n [dateFormatOptions]=\"dateFormatOptions()\"\n [timeFormatOptions]=\"timeFormatOptions()\"\n [currencyOptions]=\"currencyOptions()\"\n [currencyFormatOptions]=\"currencyFormatOptions()\"\n [weekendOptions]=\"weekendOptions()\"\n />\n\n <mt-system-settings-timesheet-section\n [policyForm]=\"form.controls.timeSheetPolicy\"\n [globalWorkingHoursForm]=\"form.controls.globalWorkingHours\"\n [dayOptions]=\"dotnetDayOptions()\"\n [frequencyOptions]=\"frequencyOptions()\"\n [timezoneOptions]=\"timezoneOptions()\"\n [maxDailyBelowDaily]=\"form.errors?.['maxDailyBelowDaily'] ?? false\"\n />\n\n <mt-system-settings-smtp-section [smtpForm]=\"form.controls.smtp\" />\n </div>\n }\n </div>\n </mt-page>\n</ng-container>\n", styles: [":host{display:block}\n"] }]
|
|
1322
1438
|
}], ctorParameters: () => [], propDecorators: { apiBasePath: [{ type: i0.Input, args: [{ isSignal: true, alias: "apiBasePath", required: false }] }], backRoute: [{ type: i0.Input, args: [{ isSignal: true, alias: "backRoute", required: false }] }], formatSchema: [{ type: i0.Input, args: [{ isSignal: true, alias: "formatSchema", required: false }] }] } });
|
|
1323
1439
|
function isRecord(value) {
|
|
1324
1440
|
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
@@ -1388,6 +1504,11 @@ function parsePort(value) {
|
|
|
1388
1504
|
const parsedValue = Number(normalizedValue);
|
|
1389
1505
|
return Number.isNaN(parsedValue) ? null : parsedValue;
|
|
1390
1506
|
}
|
|
1507
|
+
function normalizeExploreDefaultView(value) {
|
|
1508
|
+
return EXPLORE_DEFAULT_VIEW_OPTIONS.some((option) => option.id === value)
|
|
1509
|
+
? value
|
|
1510
|
+
: DEFAULT_GENERAL_CONFIGURATION.defaultExploreView;
|
|
1511
|
+
}
|
|
1391
1512
|
function normalizeWeekendDays(value) {
|
|
1392
1513
|
if (!Array.isArray(value)) {
|
|
1393
1514
|
return [];
|
|
@@ -1478,5 +1599,5 @@ function formatDateOnly(value) {
|
|
|
1478
1599
|
* Generated bundle index. Do not edit.
|
|
1479
1600
|
*/
|
|
1480
1601
|
|
|
1481
|
-
export { DEFAULT_DATE_FORMAT_OPTIONS, DEFAULT_TIME_FORMAT_OPTIONS, DOTNET_DAY_DEFINITIONS, FIXED_CURRENCIES, RATE_SOURCE_OPTIONS, SCHEDULE_ITEM_TYPE_OPTIONS, SystemSettings, SystemSettingsHolidayEditor, TIMESHEET_FREQUENCY_OPTIONS, WEEKEND_DAY_DEFINITIONS };
|
|
1602
|
+
export { DEFAULT_DATE_FORMAT_OPTIONS, DEFAULT_GENERAL_CONFIGURATION, DEFAULT_TIME_FORMAT_OPTIONS, DOTNET_DAY_DEFINITIONS, EXPLORE_DEFAULT_VIEW_OPTIONS, FIXED_CURRENCIES, GENERAL_CONFIGURATION_SETTING_KEY, RATE_SOURCE_OPTIONS, SCHEDULE_ITEM_TYPE_OPTIONS, SystemSettings, SystemSettingsHolidayEditor, TIMESHEET_FREQUENCY_OPTIONS, WEEKEND_DAY_DEFINITIONS };
|
|
1482
1603
|
//# sourceMappingURL=masterteam-system-settings.mjs.map
|