@masterteam/system-settings 0.0.11 → 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 -134
- package/assets/i18n/en.json +130 -134
- package/fesm2022/masterteam-system-settings.mjs +13 -12
- package/fesm2022/masterteam-system-settings.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -15,9 +15,9 @@ import { ToastService } from '@masterteam/components/toast';
|
|
|
15
15
|
import * as i1$1 from 'primeng/skeleton';
|
|
16
16
|
import { SkeletonModule } from 'primeng/skeleton';
|
|
17
17
|
import { Card } from '@masterteam/components/card';
|
|
18
|
-
import { RadioCardsField } from '@masterteam/components/radio-cards-field';
|
|
19
18
|
import { MultiSelectField } from '@masterteam/components/multi-select-field';
|
|
20
19
|
import { SelectField } from '@masterteam/components/select-field';
|
|
20
|
+
import { RadioCardsField } from '@masterteam/components/radio-cards-field';
|
|
21
21
|
import { ModalRef } from '@masterteam/components/dialog';
|
|
22
22
|
import { DateField } from '@masterteam/components/date-field';
|
|
23
23
|
import { TextField } from '@masterteam/components/text-field';
|
|
@@ -35,25 +35,26 @@ class SystemSettingsGeneralConfigSection {
|
|
|
35
35
|
generalConfigurationForm = input.required(...(ngDevMode ? [{ debugName: "generalConfigurationForm" }] : /* istanbul ignore next */ []));
|
|
36
36
|
exploreDefaultViewOptions = input([], ...(ngDevMode ? [{ debugName: "exploreDefaultViewOptions" }] : /* istanbul ignore next */ []));
|
|
37
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}\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 });
|
|
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
39
|
}
|
|
40
40
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsGeneralConfigSection, decorators: [{
|
|
41
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}\n"] }]
|
|
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
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
44
|
|
|
45
45
|
class SystemSettingsGeneralSection {
|
|
46
|
+
generalConfigurationForm = input.required(...(ngDevMode ? [{ debugName: "generalConfigurationForm" }] : /* istanbul ignore next */ []));
|
|
46
47
|
timezoneForm = input.required(...(ngDevMode ? [{ debugName: "timezoneForm" }] : /* istanbul ignore next */ []));
|
|
47
48
|
currencyForm = input.required(...(ngDevMode ? [{ debugName: "currencyForm" }] : /* istanbul ignore next */ []));
|
|
48
49
|
weekendForm = input.required(...(ngDevMode ? [{ debugName: "weekendForm" }] : /* istanbul ignore next */ []));
|
|
49
|
-
|
|
50
|
+
exploreDefaultViewOptions = input([], ...(ngDevMode ? [{ debugName: "exploreDefaultViewOptions" }] : /* istanbul ignore next */ []));
|
|
50
51
|
dateFormatOptions = input([], ...(ngDevMode ? [{ debugName: "dateFormatOptions" }] : /* istanbul ignore next */ []));
|
|
51
52
|
timeFormatOptions = input([], ...(ngDevMode ? [{ debugName: "timeFormatOptions" }] : /* istanbul ignore next */ []));
|
|
52
53
|
currencyOptions = input([], ...(ngDevMode ? [{ debugName: "currencyOptions" }] : /* istanbul ignore next */ []));
|
|
53
54
|
currencyFormatOptions = input([], ...(ngDevMode ? [{ debugName: "currencyFormatOptions" }] : /* istanbul ignore next */ []));
|
|
54
55
|
weekendOptions = input([], ...(ngDevMode ? [{ debugName: "weekendOptions" }] : /* istanbul ignore next */ []));
|
|
55
56
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsGeneralSection, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
56
|
-
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 });
|
|
57
58
|
}
|
|
58
59
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsGeneralSection, decorators: [{
|
|
59
60
|
type: Component,
|
|
@@ -63,8 +64,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
63
64
|
Card,
|
|
64
65
|
SelectField,
|
|
65
66
|
MultiSelectField,
|
|
66
|
-
|
|
67
|
-
|
|
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 }] }] } });
|
|
68
70
|
|
|
69
71
|
class SystemSettingsHolidayEditor {
|
|
70
72
|
ref = inject(ModalRef);
|
|
@@ -124,7 +126,7 @@ class SystemSettingsHolidayEditor {
|
|
|
124
126
|
this.ref.close(null);
|
|
125
127
|
}
|
|
126
128
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsHolidayEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
127
|
-
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 });
|
|
128
130
|
}
|
|
129
131
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsHolidayEditor, decorators: [{
|
|
130
132
|
type: Component,
|
|
@@ -185,7 +187,7 @@ class SystemSettingsHolidaysSection {
|
|
|
185
187
|
], ...(ngDevMode ? [{ debugName: "rowActions" }] : /* istanbul ignore next */ []));
|
|
186
188
|
hasHolidays = computed(() => this.holidays().length > 0, ...(ngDevMode ? [{ debugName: "hasHolidays" }] : /* istanbul ignore next */ []));
|
|
187
189
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsHolidaysSection, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
188
|
-
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 });
|
|
189
191
|
}
|
|
190
192
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsHolidaysSection, decorators: [{
|
|
191
193
|
type: Component,
|
|
@@ -1416,7 +1418,7 @@ class SystemSettings {
|
|
|
1416
1418
|
return JSON.stringify(left) === JSON.stringify(right);
|
|
1417
1419
|
}
|
|
1418
1420
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettings, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1419
|
-
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 });
|
|
1420
1422
|
}
|
|
1421
1423
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettings, decorators: [{
|
|
1422
1424
|
type: Component,
|
|
@@ -1429,11 +1431,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
1429
1431
|
Breadcrumb,
|
|
1430
1432
|
SkeletonModule,
|
|
1431
1433
|
SystemSettingsHolidaysSection,
|
|
1432
|
-
SystemSettingsGeneralConfigSection,
|
|
1433
1434
|
SystemSettingsGeneralSection,
|
|
1434
1435
|
SystemSettingsSmtpSection,
|
|
1435
1436
|
SystemSettingsTimeSheetSection,
|
|
1436
|
-
], 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"] }]
|
|
1437
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 }] }] } });
|
|
1438
1439
|
function isRecord(value) {
|
|
1439
1440
|
return typeof value === 'object' && value !== null && !Array.isArray(value);
|