@masterteam/system-settings 0.0.26 → 0.0.28
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 +4 -2
- package/assets/i18n/ar.json +0 -2
- package/assets/i18n/en.json +0 -2
- package/assets/system-settings.css +2 -2
- package/fesm2022/{masterteam-system-settings-email-delivery-shell-Dv-S6XUS.mjs → masterteam-system-settings-email-delivery-shell-CYO489J5.mjs} +6 -6
- package/fesm2022/{masterteam-system-settings-email-delivery-shell-Dv-S6XUS.mjs.map → masterteam-system-settings-email-delivery-shell-CYO489J5.mjs.map} +1 -1
- package/fesm2022/{masterteam-system-settings-masterteam-system-settings-XqDwBrIa.mjs → masterteam-system-settings-masterteam-system-settings-D9LyVzzO.mjs} +24 -96
- package/fesm2022/masterteam-system-settings-masterteam-system-settings-D9LyVzzO.mjs.map +1 -0
- package/fesm2022/masterteam-system-settings.mjs +1 -1
- package/package.json +4 -4
- package/types/masterteam-system-settings.d.ts +0 -13
- package/fesm2022/masterteam-system-settings-masterteam-system-settings-XqDwBrIa.mjs.map +0 -1
|
@@ -17,13 +17,13 @@ import { SkeletonModule } from 'primeng/skeleton';
|
|
|
17
17
|
import { Card } from '@masterteam/components/card';
|
|
18
18
|
import { SelectField } from '@masterteam/components/select-field';
|
|
19
19
|
import { RadioCardsField } from '@masterteam/components/radio-cards-field';
|
|
20
|
-
import { ToggleField } from '@masterteam/components/toggle-field';
|
|
21
20
|
import { ModalRef } from '@masterteam/components/dialog';
|
|
22
21
|
import { DateField } from '@masterteam/components/date-field';
|
|
23
22
|
import { TextField } from '@masterteam/components/text-field';
|
|
24
23
|
import { Table } from '@masterteam/components/table';
|
|
25
24
|
import { MultiSelectField } from '@masterteam/components/multi-select-field';
|
|
26
25
|
import { NumberField } from '@masterteam/components/number-field';
|
|
26
|
+
import { ToggleField } from '@masterteam/components/toggle-field';
|
|
27
27
|
import { of, map, tap, catchError, throwError, finalize, shareReplay, mergeMap, switchMap, forkJoin, timer, Observable } from 'rxjs';
|
|
28
28
|
import { TextareaField } from '@masterteam/components/textarea-field';
|
|
29
29
|
import { EntityStatus } from '@masterteam/components/entities';
|
|
@@ -35,24 +35,18 @@ import { Icon } from '@masterteam/icons';
|
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
37
|
* "Experience & Appearance" — product-wide application behaviour that is not
|
|
38
|
-
* tied to a specific feature area: the explore landing view
|
|
39
|
-
*
|
|
38
|
+
* tied to a specific feature area: the explore landing view. More entries are
|
|
39
|
+
* expected here.
|
|
40
40
|
*/
|
|
41
41
|
class SystemSettingsGeneralConfigSection {
|
|
42
42
|
generalConfigurationForm = input.required(...(ngDevMode ? [{ debugName: "generalConfigurationForm" }] : /* istanbul ignore next */ []));
|
|
43
43
|
exploreDefaultViewOptions = input([], ...(ngDevMode ? [{ debugName: "exploreDefaultViewOptions" }] : /* istanbul ignore next */ []));
|
|
44
44
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsGeneralConfigSection, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
45
|
-
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
|
|
45
|
+
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 });
|
|
46
46
|
}
|
|
47
47
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsGeneralConfigSection, decorators: [{
|
|
48
48
|
type: Component,
|
|
49
|
-
args: [{ selector: 'mt-system-settings-general-config-section', imports: [
|
|
50
|
-
ReactiveFormsModule,
|
|
51
|
-
TranslocoDirective,
|
|
52
|
-
Card,
|
|
53
|
-
RadioCardsField,
|
|
54
|
-
ToggleField,
|
|
55
|
-
], 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\r\n <div class=\"space-y-1\">\r\n <mt-toggle-field\r\n formControlName=\"showDesignSwitcher\"\r\n [label]=\"t('design-switcher')\"\r\n />\r\n <p class=\"text-sm text-neutral-600\">\r\n {{ t(\"design-switcher-hint\") }}\r\n </p>\r\n </div>\r\n </div>\r\n </mt-card>\r\n</ng-container>\r\n", styles: [":host{display:block;height:100%}mt-card{height:100%}\n"] }]
|
|
49
|
+
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"] }]
|
|
56
50
|
}], propDecorators: { generalConfigurationForm: [{ type: i0.Input, args: [{ isSignal: true, alias: "generalConfigurationForm", required: true }] }], exploreDefaultViewOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "exploreDefaultViewOptions", required: false }] }] } });
|
|
57
51
|
|
|
58
52
|
class SystemSettingsGeneralSection {
|
|
@@ -197,7 +191,7 @@ class SystemSettingsHolidaysSection {
|
|
|
197
191
|
], ...(ngDevMode ? [{ debugName: "rowActions" }] : /* istanbul ignore next */ []));
|
|
198
192
|
hasHolidays = computed(() => this.holidays().length > 0, ...(ngDevMode ? [{ debugName: "hasHolidays" }] : /* istanbul ignore next */ []));
|
|
199
193
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsHolidaysSection, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
200
|
-
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'\">\n <mt-card class=\"block\">\n <div class=\"space-y-6\">\n <div\n class=\"flex flex-col gap-4 md:flex-row md:items-start md:justify-between\"\n >\n <div class=\"space-y-1\">\n <h4 class=\"text-base font-semibold text-neutral-900\">\n {{ t(\"holidays-title\") }}\n </h4>\n <p class=\"text-sm text-neutral-600\">\n {{ t(\"holidays-description\") }}\n </p>\n </div>\n\n <mt-button\n [label]=\"t('add-holiday')\"\n icon=\"general.plus\"\n (onClick)=\"addHoliday.emit()\"\n />\n </div>\n\n @if (hasHolidays()) {\n <mt-table\n noCard\n [data]=\"holidays()\"\n [columns]=\"columns()\"\n [rowActions]=\"rowActions()\"\n [generalSearch]=\"false\"\n [showFilters]=\"false\"\n [dataKey]=\"'rowKey'\"\n storageKey=\"admin-system-settings-holidays-table\"\n >\n </mt-table>\n } @else {\n <div\n class=\"rounded-xl border border-dashed border-neutral-300 bg-neutral-50 px-6 py-10 text-center\"\n >\n <h5 class=\"text-base font-semibold text-neutral-900\">\n {{ t(\"no-holidays-title\") }}\n </h5>\n <p class=\"mt-2 text-sm text-neutral-600\">\n {{ t(\"no-holidays-description\") }}\n </p>\n </div>\n }\n </div>\n </mt-card>\n</ng-container>\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", "ariaLabel"], 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", "filterCloseOnOutsideClick", "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", "captionStartTemplate", "captionEndTemplate", "emptyTitle", "emptyDescription", "emptyActionLabel", "emptyActionIcon", "externalFiltersActive", "paginatorPosition", "alwaysShowPaginator", "rowsPerPageOptions", "pageSize", "currentPage", "first", "filterTerm", "groupBy", "sortField", "sortDirection"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "emptyAction", "filtersCleared", "rowActionsRequested", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange", "groupByChange", "sortFieldChange", "sortDirectionChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
194
|
+
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'\">\n <mt-card class=\"block\">\n <div class=\"space-y-6\">\n <div\n class=\"flex flex-col gap-4 md:flex-row md:items-start md:justify-between\"\n >\n <div class=\"space-y-1\">\n <h4 class=\"text-base font-semibold text-neutral-900\">\n {{ t(\"holidays-title\") }}\n </h4>\n <p class=\"text-sm text-neutral-600\">\n {{ t(\"holidays-description\") }}\n </p>\n </div>\n\n <mt-button\n [label]=\"t('add-holiday')\"\n icon=\"general.plus\"\n (onClick)=\"addHoliday.emit()\"\n />\n </div>\n\n @if (hasHolidays()) {\n <mt-table\n noCard\n [data]=\"holidays()\"\n [columns]=\"columns()\"\n [rowActions]=\"rowActions()\"\n [generalSearch]=\"false\"\n [showFilters]=\"false\"\n [dataKey]=\"'rowKey'\"\n storageKey=\"admin-system-settings-holidays-table\"\n >\n </mt-table>\n } @else {\n <div\n class=\"rounded-xl border border-dashed border-neutral-300 bg-neutral-50 px-6 py-10 text-center\"\n >\n <h5 class=\"text-base font-semibold text-neutral-900\">\n {{ t(\"no-holidays-title\") }}\n </h5>\n <p class=\"mt-2 text-sm text-neutral-600\">\n {{ t(\"no-holidays-description\") }}\n </p>\n </div>\n }\n </div>\n </mt-card>\n</ng-container>\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", "ariaLabel"], 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", "searchScope", "showFilters", "filterMode", "filterCloseOnOutsideClick", "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", "captionStartTemplate", "captionEndTemplate", "emptyTitle", "emptyDescription", "emptyActionLabel", "emptyActionIcon", "externalFiltersActive", "paginatorPosition", "alwaysShowPaginator", "rowsPerPageOptions", "pageSize", "currentPage", "first", "filterTerm", "groupBy", "sortField", "sortDirection"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "emptyAction", "filtersCleared", "rowActionsRequested", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange", "groupByChange", "sortFieldChange", "sortDirectionChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
201
195
|
}
|
|
202
196
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsHolidaysSection, decorators: [{
|
|
203
197
|
type: Component,
|
|
@@ -220,7 +214,7 @@ class SystemSettingsTimeSheetSection {
|
|
|
220
214
|
*/
|
|
221
215
|
hidePolicy = input(false, ...(ngDevMode ? [{ debugName: "hidePolicy" }] : /* istanbul ignore next */ []));
|
|
222
216
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsTimeSheetSection, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
223
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.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 }, timeZoneOptions: { classPropertyName: "timeZoneOptions", publicName: "timeZoneOptions", isSignal: true, isRequired: false, transformFunction: null }, dayOptions: { classPropertyName: "dayOptions", publicName: "dayOptions", isSignal: true, isRequired: false, transformFunction: null }, frequencyOptions: { classPropertyName: "frequencyOptions", publicName: "frequencyOptions", isSignal: true, isRequired: false, transformFunction: null }, maxDailyBelowDaily: { classPropertyName: "maxDailyBelowDaily", publicName: "maxDailyBelowDaily", isSignal: true, isRequired: false, transformFunction: null }, hidePolicy: { classPropertyName: "hidePolicy", publicName: "hidePolicy", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\n <div\n [class]=\"\n hidePolicy() ? 'grid gap-6 mb-6' : 'grid gap-6 xl:grid-cols-2 mb-6'\n \"\n >\n @if (!hidePolicy()) {\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\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 <div class=\"flex min-w-0 flex-col gap-1 md:col-span-2\">\n <mt-select-field\n formControlName=\"timeZoneId\"\n [options]=\"timeZoneOptions()\"\n [optionLabel]=\"'name'\"\n [optionValue]=\"'id'\"\n [filter]=\"true\"\n [filterBy]=\"'name'\"\n [label]=\"t('organization-timezone')\"\n [hint]=\"t('organization-timezone-hint')\"\n [placeholder]=\"t('organization-timezone-placeholder')\"\n />\n @if (globalWorkingHoursForm().hasError(\"timeZoneRequired\")) {\n <p class=\"text-xs text-red-600\">\n {{ t(\"organization-timezone-required\") }}\n </p>\n }\n </div>\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 </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: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
217
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.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 }, timeZoneOptions: { classPropertyName: "timeZoneOptions", publicName: "timeZoneOptions", isSignal: true, isRequired: false, transformFunction: null }, dayOptions: { classPropertyName: "dayOptions", publicName: "dayOptions", isSignal: true, isRequired: false, transformFunction: null }, frequencyOptions: { classPropertyName: "frequencyOptions", publicName: "frequencyOptions", isSignal: true, isRequired: false, transformFunction: null }, maxDailyBelowDaily: { classPropertyName: "maxDailyBelowDaily", publicName: "maxDailyBelowDaily", isSignal: true, isRequired: false, transformFunction: null }, hidePolicy: { classPropertyName: "hidePolicy", publicName: "hidePolicy", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\r\n <div\r\n [class]=\"\r\n hidePolicy() ? 'grid gap-6 mb-6' : 'grid gap-6 xl:grid-cols-2 mb-6'\r\n \"\r\n >\r\n @if (!hidePolicy()) {\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\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 <div class=\"flex min-w-0 flex-col gap-1 md:col-span-2\">\r\n <mt-select-field\r\n formControlName=\"timeZoneId\"\r\n [options]=\"timeZoneOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'id'\"\r\n [filter]=\"true\"\r\n [filterBy]=\"'name'\"\r\n [label]=\"t('organization-timezone')\"\r\n [hint]=\"t('organization-timezone-hint')\"\r\n [placeholder]=\"t('organization-timezone-placeholder')\"\r\n />\r\n @if (globalWorkingHoursForm().hasError(\"timeZoneRequired\")) {\r\n <p class=\"text-xs text-red-600\">\r\n {{ t(\"organization-timezone-required\") }}\r\n </p>\r\n }\r\n </div>\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 </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: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
224
218
|
}
|
|
225
219
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsTimeSheetSection, decorators: [{
|
|
226
220
|
type: Component,
|
|
@@ -232,7 +226,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
232
226
|
NumberField,
|
|
233
227
|
SelectField,
|
|
234
228
|
ToggleField,
|
|
235
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\n <div\n [class]=\"\n hidePolicy() ? 'grid gap-6 mb-6' : 'grid gap-6 xl:grid-cols-2 mb-6'\n \"\n >\n @if (!hidePolicy()) {\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\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 <div class=\"flex min-w-0 flex-col gap-1 md:col-span-2\">\n <mt-select-field\n formControlName=\"timeZoneId\"\n [options]=\"timeZoneOptions()\"\n [optionLabel]=\"'name'\"\n [optionValue]=\"'id'\"\n [filter]=\"true\"\n [filterBy]=\"'name'\"\n [label]=\"t('organization-timezone')\"\n [hint]=\"t('organization-timezone-hint')\"\n [placeholder]=\"t('organization-timezone-placeholder')\"\n />\n @if (globalWorkingHoursForm().hasError(\"timeZoneRequired\")) {\n <p class=\"text-xs text-red-600\">\n {{ t(\"organization-timezone-required\") }}\n </p>\n }\n </div>\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 </div>\n </div>\n </mt-card>\n </div>\n</ng-container>\n" }]
|
|
229
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\r\n <div\r\n [class]=\"\r\n hidePolicy() ? 'grid gap-6 mb-6' : 'grid gap-6 xl:grid-cols-2 mb-6'\r\n \"\r\n >\r\n @if (!hidePolicy()) {\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\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 <div class=\"flex min-w-0 flex-col gap-1 md:col-span-2\">\r\n <mt-select-field\r\n formControlName=\"timeZoneId\"\r\n [options]=\"timeZoneOptions()\"\r\n [optionLabel]=\"'name'\"\r\n [optionValue]=\"'id'\"\r\n [filter]=\"true\"\r\n [filterBy]=\"'name'\"\r\n [label]=\"t('organization-timezone')\"\r\n [hint]=\"t('organization-timezone-hint')\"\r\n [placeholder]=\"t('organization-timezone-placeholder')\"\r\n />\r\n @if (globalWorkingHoursForm().hasError(\"timeZoneRequired\")) {\r\n <p class=\"text-xs text-red-600\">\r\n {{ t(\"organization-timezone-required\") }}\r\n </p>\r\n }\r\n </div>\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 </div>\r\n </div>\r\n </mt-card>\r\n </div>\r\n</ng-container>\r\n" }]
|
|
236
230
|
}], propDecorators: { policyForm: [{ type: i0.Input, args: [{ isSignal: true, alias: "policyForm", required: true }] }], globalWorkingHoursForm: [{ type: i0.Input, args: [{ isSignal: true, alias: "globalWorkingHoursForm", required: true }] }], timeZoneOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "timeZoneOptions", required: false }] }], dayOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "dayOptions", required: false }] }], frequencyOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "frequencyOptions", required: false }] }], maxDailyBelowDaily: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDailyBelowDaily", required: false }] }], hidePolicy: [{ type: i0.Input, args: [{ isSignal: true, alias: "hidePolicy", required: false }] }] } });
|
|
237
231
|
|
|
238
232
|
/** The settings record General Configuration fields live in. */
|
|
@@ -289,7 +283,6 @@ const EXPLORE_DEFAULT_VIEW_OPTIONS = [
|
|
|
289
283
|
];
|
|
290
284
|
const DEFAULT_GENERAL_CONFIGURATION = {
|
|
291
285
|
defaultExploreView: 'cards',
|
|
292
|
-
showDesignSwitcher: false,
|
|
293
286
|
};
|
|
294
287
|
const DEFAULT_DATE_FORMAT_OPTIONS = [
|
|
295
288
|
{
|
|
@@ -472,12 +465,8 @@ class SystemSettings {
|
|
|
472
465
|
nonNullable: true,
|
|
473
466
|
validators: [Validators.required],
|
|
474
467
|
}),
|
|
475
|
-
showDesignSwitcher: new FormControl(false, {
|
|
476
|
-
nonNullable: true,
|
|
477
|
-
}),
|
|
478
468
|
}),
|
|
479
469
|
timezone: new FormGroup({
|
|
480
|
-
regionId: new FormControl(null, Validators.required),
|
|
481
470
|
dateFormat: new FormControl(null, Validators.required),
|
|
482
471
|
timeFormat: new FormControl(null, Validators.required),
|
|
483
472
|
}),
|
|
@@ -910,10 +899,8 @@ class SystemSettings {
|
|
|
910
899
|
this.holidayItems.set(holidays.data);
|
|
911
900
|
this.form.controls.generalConfiguration.setValue({
|
|
912
901
|
defaultExploreView: generalConfiguration.defaultExploreView,
|
|
913
|
-
showDesignSwitcher: generalConfiguration.showDesignSwitcher,
|
|
914
902
|
});
|
|
915
903
|
this.form.controls.timezone.setValue({
|
|
916
|
-
regionId: timezone.region?.id ?? null,
|
|
917
904
|
dateFormat: timezone.dateFormat,
|
|
918
905
|
timeFormat: timezone.timeFormat,
|
|
919
906
|
});
|
|
@@ -975,20 +962,14 @@ class SystemSettings {
|
|
|
975
962
|
}
|
|
976
963
|
buildTimezoneValue() {
|
|
977
964
|
const timezoneForm = this.form.controls.timezone.getRawValue();
|
|
978
|
-
if (!timezoneForm.
|
|
979
|
-
!timezoneForm.dateFormat ||
|
|
980
|
-
!timezoneForm.timeFormat) {
|
|
981
|
-
return null;
|
|
982
|
-
}
|
|
983
|
-
const region = this.timezones().find((item) => item.id === timezoneForm.regionId);
|
|
984
|
-
if (!region) {
|
|
965
|
+
if (!timezoneForm.dateFormat || !timezoneForm.timeFormat) {
|
|
985
966
|
return null;
|
|
986
967
|
}
|
|
987
968
|
return {
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
969
|
+
// Not editable on this page: send back what was loaded, untouched. It
|
|
970
|
+
// is never looked up in the catalog, so a stored id the catalog no
|
|
971
|
+
// longer lists (or a catalog that failed to load) cannot block a save.
|
|
972
|
+
region: this.initialSnapshot()?.timezone.region ?? null,
|
|
992
973
|
dateFormat: timezoneForm.dateFormat,
|
|
993
974
|
timeFormat: timezoneForm.timeFormat,
|
|
994
975
|
};
|
|
@@ -1021,8 +1002,6 @@ class SystemSettings {
|
|
|
1021
1002
|
return {
|
|
1022
1003
|
defaultExploreView: this.normalizeExploreDefaultView(this.form.controls.generalConfiguration.controls.defaultExploreView
|
|
1023
1004
|
.value),
|
|
1024
|
-
showDesignSwitcher: this.form.controls.generalConfiguration.controls.showDesignSwitcher
|
|
1025
|
-
.value === true,
|
|
1026
1005
|
};
|
|
1027
1006
|
}
|
|
1028
1007
|
buildWeekendValue() {
|
|
@@ -1102,8 +1081,6 @@ class SystemSettings {
|
|
|
1102
1081
|
return {
|
|
1103
1082
|
defaultExploreView: this.normalizeExploreDefaultView(setting.value['defaultExploreView'] ??
|
|
1104
1083
|
setting.value['DefaultExploreView']),
|
|
1105
|
-
showDesignSwitcher: normalizeShowDesignSwitcher(setting.value['showDesignSwitcher'] ??
|
|
1106
|
-
setting.value['ShowDesignSwitcher']),
|
|
1107
1084
|
};
|
|
1108
1085
|
}
|
|
1109
1086
|
extractHolidaysValue(setting) {
|
|
@@ -1129,7 +1106,11 @@ class SystemSettings {
|
|
|
1129
1106
|
};
|
|
1130
1107
|
}
|
|
1131
1108
|
return {
|
|
1132
|
-
|
|
1109
|
+
// Kept exactly as stored: the page has no control for it, so it is
|
|
1110
|
+
// neither rebuilt from the catalog nor allowed to block a save.
|
|
1111
|
+
region: (setting.value['region'] ??
|
|
1112
|
+
setting.value['Region'] ??
|
|
1113
|
+
null),
|
|
1133
1114
|
dateFormat: getNullableString(setting.value['dateFormat'] ??
|
|
1134
1115
|
setting.value['DateFormat'] ??
|
|
1135
1116
|
setting.value['dateformat']),
|
|
@@ -1204,45 +1185,6 @@ class SystemSettings {
|
|
|
1204
1185
|
}
|
|
1205
1186
|
return { label, from, to };
|
|
1206
1187
|
}
|
|
1207
|
-
normalizeTimezoneRegion(value) {
|
|
1208
|
-
if (typeof value === 'string' && value.trim()) {
|
|
1209
|
-
const normalizedValue = value.trim().toLowerCase();
|
|
1210
|
-
const region = this.timezones().find((item) => item.id.trim().toLowerCase() === normalizedValue) ?? null;
|
|
1211
|
-
return region
|
|
1212
|
-
? {
|
|
1213
|
-
...region,
|
|
1214
|
-
name: region.name ?? region.displayName,
|
|
1215
|
-
}
|
|
1216
|
-
: null;
|
|
1217
|
-
}
|
|
1218
|
-
if (!isRecord(value)) {
|
|
1219
|
-
return null;
|
|
1220
|
-
}
|
|
1221
|
-
const id = getString(value['id'] ?? value['Id']);
|
|
1222
|
-
if (!id) {
|
|
1223
|
-
return null;
|
|
1224
|
-
}
|
|
1225
|
-
const matchedRegion = this.timezones().find((item) => item.id.trim().toLowerCase() === id.trim().toLowerCase());
|
|
1226
|
-
if (matchedRegion) {
|
|
1227
|
-
return {
|
|
1228
|
-
...matchedRegion,
|
|
1229
|
-
name: getString(value['name'] ?? value['Name']) ??
|
|
1230
|
-
matchedRegion.name ??
|
|
1231
|
-
matchedRegion.displayName,
|
|
1232
|
-
};
|
|
1233
|
-
}
|
|
1234
|
-
const standardName = getString(value['standardName'] ?? value['StandardName']) ?? id;
|
|
1235
|
-
const displayName = getString(value['displayName'] ?? value['DisplayName']) ?? id;
|
|
1236
|
-
return {
|
|
1237
|
-
id,
|
|
1238
|
-
baseUtcOffset: getString(value['baseUtcOffset'] ?? value['BaseUtcOffset']) ?? '',
|
|
1239
|
-
standardName,
|
|
1240
|
-
displayName,
|
|
1241
|
-
daylightName: getString(value['daylightName'] ?? value['DaylightName']) ??
|
|
1242
|
-
standardName,
|
|
1243
|
-
name: getString(value['name'] ?? value['Name']) ?? displayName,
|
|
1244
|
-
};
|
|
1245
|
-
}
|
|
1246
1188
|
normalizeCurrencyUnit(value) {
|
|
1247
1189
|
if (!isRecord(value)) {
|
|
1248
1190
|
return FIXED_CURRENCIES[0].unit;
|
|
@@ -1255,7 +1197,6 @@ class SystemSettings {
|
|
|
1255
1197
|
normalizeGeneralConfigurationSnapshot(value) {
|
|
1256
1198
|
return {
|
|
1257
1199
|
defaultExploreView: this.normalizeExploreDefaultView(value.defaultExploreView),
|
|
1258
|
-
showDesignSwitcher: normalizeShowDesignSwitcher(value.showDesignSwitcher),
|
|
1259
1200
|
};
|
|
1260
1201
|
}
|
|
1261
1202
|
/**
|
|
@@ -1275,7 +1216,7 @@ class SystemSettings {
|
|
|
1275
1216
|
normalizeTimezoneSnapshot(value) {
|
|
1276
1217
|
const defaults = this.getDefaultTimezoneValue();
|
|
1277
1218
|
return {
|
|
1278
|
-
region: value.region
|
|
1219
|
+
region: value.region,
|
|
1279
1220
|
dateFormat: value.dateFormat ?? defaults.dateFormat,
|
|
1280
1221
|
timeFormat: value.timeFormat ?? defaults.timeFormat,
|
|
1281
1222
|
};
|
|
@@ -1359,7 +1300,6 @@ class SystemSettings {
|
|
|
1359
1300
|
}
|
|
1360
1301
|
}
|
|
1361
1302
|
getDefaultTimezoneValue() {
|
|
1362
|
-
const region = this.timezones()[0] ?? null;
|
|
1363
1303
|
const defaultDateFormat = this.dateFormatOptions().find((option) => option.isSelected)?.id ??
|
|
1364
1304
|
this.dateFormatOptions()[0]?.id ??
|
|
1365
1305
|
null;
|
|
@@ -1367,12 +1307,7 @@ class SystemSettings {
|
|
|
1367
1307
|
this.timeFormatOptions()[0]?.id ??
|
|
1368
1308
|
null;
|
|
1369
1309
|
return {
|
|
1370
|
-
region:
|
|
1371
|
-
? {
|
|
1372
|
-
...region,
|
|
1373
|
-
name: region.name ?? region.displayName,
|
|
1374
|
-
}
|
|
1375
|
-
: null,
|
|
1310
|
+
region: null,
|
|
1376
1311
|
dateFormat: defaultDateFormat,
|
|
1377
1312
|
timeFormat: defaultTimeFormat,
|
|
1378
1313
|
};
|
|
@@ -1531,7 +1466,7 @@ class SystemSettings {
|
|
|
1531
1466
|
return JSON.stringify(left) === JSON.stringify(right);
|
|
1532
1467
|
}
|
|
1533
1468
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettings, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1534
|
-
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 }, homeRoute: { classPropertyName: "homeRoute", publicName: "homeRoute", isSignal: true, isRequired: false, transformFunction: null }, hideTimeSheet: { classPropertyName: "hideTimeSheet", publicName: "hideTimeSheet", isSignal: true, isRequired: false, transformFunction: null }, exploreViewOptions: { classPropertyName: "exploreViewOptions", publicName: "exploreViewOptions", 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-general-section\n [generalConfigurationForm]=\"form.controls.generalConfiguration\"\n [timezoneForm]=\"form.controls.timezone\"\n [currencyForm]=\"form.controls.currency\"\n [exploreDefaultViewOptions]=\"exploreDefaultViewOptions()\"\n [dateFormatOptions]=\"dateFormatOptions()\"\n [timeFormatOptions]=\"timeFormatOptions()\"\n [currencyOptions]=\"currencyOptions()\"\n [currencyFormatOptions]=\"currencyFormatOptions()\"\n />\n\n <mt-system-settings-timesheet-section\n [policyForm]=\"form.controls.timeSheetPolicy\"\n [globalWorkingHoursForm]=\"form.controls.globalWorkingHours\"\n [timeZoneOptions]=\"organizationTimeZoneOptions()\"\n [dayOptions]=\"dotnetDayOptions()\"\n [frequencyOptions]=\"frequencyOptions()\"\n [maxDailyBelowDaily]=\"form.errors?.['maxDailyBelowDaily'] ?? false\"\n [hidePolicy]=\"hideTimeSheet()\"\n />\n\n <mt-system-settings-holidays-section\n [holidays]=\"holidayTableRows()\"\n (addHoliday)=\"openAddHoliday()\"\n (editHoliday)=\"editHoliday($event)\"\n (deleteHoliday)=\"deleteHoliday($event)\"\n />\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", "ariaLabel"], 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", "exploreDefaultViewOptions", "dateFormatOptions", "timeFormatOptions", "currencyOptions", "currencyFormatOptions"] }, { kind: "component", type: SystemSettingsTimeSheetSection, selector: "mt-system-settings-timesheet-section", inputs: ["policyForm", "globalWorkingHoursForm", "timeZoneOptions", "dayOptions", "frequencyOptions", "maxDailyBelowDaily", "hidePolicy"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1469
|
+
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 }, homeRoute: { classPropertyName: "homeRoute", publicName: "homeRoute", isSignal: true, isRequired: false, transformFunction: null }, hideTimeSheet: { classPropertyName: "hideTimeSheet", publicName: "hideTimeSheet", isSignal: true, isRequired: false, transformFunction: null }, exploreViewOptions: { classPropertyName: "exploreViewOptions", publicName: "exploreViewOptions", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\r\n <mt-page\r\n [title]=\"t('page-title')\"\r\n [avatarIcon]=\"'general.settings-02'\"\r\n [avatarStyle]=\"{\r\n '--p-avatar-background': 'var(--p-emerald-100)',\r\n '--p-avatar-color': 'var(--p-emerald-700)',\r\n }\"\r\n (backButtonClick)=\"goBack()\"\r\n backButton\r\n >\r\n <div class=\"flex flex-col gap-3\">\r\n <div\r\n class=\"flex flex-col gap-4 md:flex-row md:items-end md:justify-between\"\r\n >\r\n <div>\r\n <h3 class=\"text-lg font-bold text-neutral-900\">\r\n {{ t(\"page-title\") }}\r\n </h3>\r\n <mt-breadcrumb\r\n [items]=\"breadcrumbItems()\"\r\n [styleClass]=\"'flex justify-start mx-1'\"\r\n />\r\n </div>\r\n\r\n <mt-button\r\n [label]=\"t('save')\"\r\n icon=\"general.save-01\"\r\n [tooltip]=\"t('save-tooltip')\"\r\n [badge]=\"hasChanges() ? '!' : ''\"\r\n badgeSeverity=\"warn\"\r\n [loading]=\"updating()\"\r\n [disabled]=\"!canSaveSettings()\"\r\n (onClick)=\"onSave()\"\r\n />\r\n </div>\r\n\r\n @if (isLoading()) {\r\n <div class=\"space-y-4\">\r\n <p-skeleton width=\"100%\" height=\"12rem\" borderRadius=\"0.75rem\" />\r\n <p-skeleton width=\"100%\" height=\"18rem\" borderRadius=\"0.75rem\" />\r\n <p-skeleton width=\"100%\" height=\"14rem\" borderRadius=\"0.75rem\" />\r\n </div>\r\n } @else {\r\n <!--\r\n BE/HTTP errors (timezonesError, settingsError, updateError) are already\r\n surfaced as toasts by the HTTP interceptor, so they are intentionally\r\n not rendered as top-of-page banners here to avoid duplicate messaging.\r\n -->\r\n <div class=\"space-y-6\">\r\n <mt-system-settings-general-section\r\n [generalConfigurationForm]=\"form.controls.generalConfiguration\"\r\n [timezoneForm]=\"form.controls.timezone\"\r\n [currencyForm]=\"form.controls.currency\"\r\n [exploreDefaultViewOptions]=\"exploreDefaultViewOptions()\"\r\n [dateFormatOptions]=\"dateFormatOptions()\"\r\n [timeFormatOptions]=\"timeFormatOptions()\"\r\n [currencyOptions]=\"currencyOptions()\"\r\n [currencyFormatOptions]=\"currencyFormatOptions()\"\r\n />\r\n\r\n <mt-system-settings-timesheet-section\r\n [policyForm]=\"form.controls.timeSheetPolicy\"\r\n [globalWorkingHoursForm]=\"form.controls.globalWorkingHours\"\r\n [timeZoneOptions]=\"organizationTimeZoneOptions()\"\r\n [dayOptions]=\"dotnetDayOptions()\"\r\n [frequencyOptions]=\"frequencyOptions()\"\r\n [maxDailyBelowDaily]=\"form.errors?.['maxDailyBelowDaily'] ?? false\"\r\n [hidePolicy]=\"hideTimeSheet()\"\r\n />\r\n\r\n <mt-system-settings-holidays-section\r\n [holidays]=\"holidayTableRows()\"\r\n (addHoliday)=\"openAddHoliday()\"\r\n (editHoliday)=\"editHoliday($event)\"\r\n (deleteHoliday)=\"deleteHoliday($event)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </mt-page>\r\n</ng-container>\r\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", "ariaLabel"], 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", "exploreDefaultViewOptions", "dateFormatOptions", "timeFormatOptions", "currencyOptions", "currencyFormatOptions"] }, { kind: "component", type: SystemSettingsTimeSheetSection, selector: "mt-system-settings-timesheet-section", inputs: ["policyForm", "globalWorkingHoursForm", "timeZoneOptions", "dayOptions", "frequencyOptions", "maxDailyBelowDaily", "hidePolicy"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1535
1470
|
}
|
|
1536
1471
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettings, decorators: [{
|
|
1537
1472
|
type: Component,
|
|
@@ -1546,7 +1481,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
1546
1481
|
SystemSettingsHolidaysSection,
|
|
1547
1482
|
SystemSettingsGeneralSection,
|
|
1548
1483
|
SystemSettingsTimeSheetSection,
|
|
1549
|
-
], 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-general-section\n [generalConfigurationForm]=\"form.controls.generalConfiguration\"\n [timezoneForm]=\"form.controls.timezone\"\n [currencyForm]=\"form.controls.currency\"\n [exploreDefaultViewOptions]=\"exploreDefaultViewOptions()\"\n [dateFormatOptions]=\"dateFormatOptions()\"\n [timeFormatOptions]=\"timeFormatOptions()\"\n [currencyOptions]=\"currencyOptions()\"\n [currencyFormatOptions]=\"currencyFormatOptions()\"\n />\n\n <mt-system-settings-timesheet-section\n [policyForm]=\"form.controls.timeSheetPolicy\"\n [globalWorkingHoursForm]=\"form.controls.globalWorkingHours\"\n [timeZoneOptions]=\"organizationTimeZoneOptions()\"\n [dayOptions]=\"dotnetDayOptions()\"\n [frequencyOptions]=\"frequencyOptions()\"\n [maxDailyBelowDaily]=\"form.errors?.['maxDailyBelowDaily'] ?? false\"\n [hidePolicy]=\"hideTimeSheet()\"\n />\n\n <mt-system-settings-holidays-section\n [holidays]=\"holidayTableRows()\"\n (addHoliday)=\"openAddHoliday()\"\n (editHoliday)=\"editHoliday($event)\"\n (deleteHoliday)=\"deleteHoliday($event)\"\n />\n </div>\n }\n </div>\n </mt-page>\n</ng-container>\n", styles: [":host{display:block}\n"] }]
|
|
1484
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\r\n <mt-page\r\n [title]=\"t('page-title')\"\r\n [avatarIcon]=\"'general.settings-02'\"\r\n [avatarStyle]=\"{\r\n '--p-avatar-background': 'var(--p-emerald-100)',\r\n '--p-avatar-color': 'var(--p-emerald-700)',\r\n }\"\r\n (backButtonClick)=\"goBack()\"\r\n backButton\r\n >\r\n <div class=\"flex flex-col gap-3\">\r\n <div\r\n class=\"flex flex-col gap-4 md:flex-row md:items-end md:justify-between\"\r\n >\r\n <div>\r\n <h3 class=\"text-lg font-bold text-neutral-900\">\r\n {{ t(\"page-title\") }}\r\n </h3>\r\n <mt-breadcrumb\r\n [items]=\"breadcrumbItems()\"\r\n [styleClass]=\"'flex justify-start mx-1'\"\r\n />\r\n </div>\r\n\r\n <mt-button\r\n [label]=\"t('save')\"\r\n icon=\"general.save-01\"\r\n [tooltip]=\"t('save-tooltip')\"\r\n [badge]=\"hasChanges() ? '!' : ''\"\r\n badgeSeverity=\"warn\"\r\n [loading]=\"updating()\"\r\n [disabled]=\"!canSaveSettings()\"\r\n (onClick)=\"onSave()\"\r\n />\r\n </div>\r\n\r\n @if (isLoading()) {\r\n <div class=\"space-y-4\">\r\n <p-skeleton width=\"100%\" height=\"12rem\" borderRadius=\"0.75rem\" />\r\n <p-skeleton width=\"100%\" height=\"18rem\" borderRadius=\"0.75rem\" />\r\n <p-skeleton width=\"100%\" height=\"14rem\" borderRadius=\"0.75rem\" />\r\n </div>\r\n } @else {\r\n <!--\r\n BE/HTTP errors (timezonesError, settingsError, updateError) are already\r\n surfaced as toasts by the HTTP interceptor, so they are intentionally\r\n not rendered as top-of-page banners here to avoid duplicate messaging.\r\n -->\r\n <div class=\"space-y-6\">\r\n <mt-system-settings-general-section\r\n [generalConfigurationForm]=\"form.controls.generalConfiguration\"\r\n [timezoneForm]=\"form.controls.timezone\"\r\n [currencyForm]=\"form.controls.currency\"\r\n [exploreDefaultViewOptions]=\"exploreDefaultViewOptions()\"\r\n [dateFormatOptions]=\"dateFormatOptions()\"\r\n [timeFormatOptions]=\"timeFormatOptions()\"\r\n [currencyOptions]=\"currencyOptions()\"\r\n [currencyFormatOptions]=\"currencyFormatOptions()\"\r\n />\r\n\r\n <mt-system-settings-timesheet-section\r\n [policyForm]=\"form.controls.timeSheetPolicy\"\r\n [globalWorkingHoursForm]=\"form.controls.globalWorkingHours\"\r\n [timeZoneOptions]=\"organizationTimeZoneOptions()\"\r\n [dayOptions]=\"dotnetDayOptions()\"\r\n [frequencyOptions]=\"frequencyOptions()\"\r\n [maxDailyBelowDaily]=\"form.errors?.['maxDailyBelowDaily'] ?? false\"\r\n [hidePolicy]=\"hideTimeSheet()\"\r\n />\r\n\r\n <mt-system-settings-holidays-section\r\n [holidays]=\"holidayTableRows()\"\r\n (addHoliday)=\"openAddHoliday()\"\r\n (editHoliday)=\"editHoliday($event)\"\r\n (deleteHoliday)=\"deleteHoliday($event)\"\r\n />\r\n </div>\r\n }\r\n </div>\r\n </mt-page>\r\n</ng-container>\r\n", styles: [":host{display:block}\n"] }]
|
|
1550
1485
|
}], 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 }] }], homeRoute: [{ type: i0.Input, args: [{ isSignal: true, alias: "homeRoute", required: false }] }], hideTimeSheet: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideTimeSheet", required: false }] }], exploreViewOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "exploreViewOptions", required: false }] }] } });
|
|
1551
1486
|
function isRecord(value) {
|
|
1552
1487
|
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
@@ -1608,13 +1543,6 @@ function getNumberArray(value) {
|
|
|
1608
1543
|
.map((item) => (typeof item === 'number' ? item : Number(item)))
|
|
1609
1544
|
.filter((item) => Number.isInteger(item));
|
|
1610
1545
|
}
|
|
1611
|
-
/**
|
|
1612
|
-
* The design switcher is opt-in, so anything that is not an explicit `true`
|
|
1613
|
-
* (or the string a settings record may round-trip it as) reads as hidden.
|
|
1614
|
-
*/
|
|
1615
|
-
function normalizeShowDesignSwitcher(value) {
|
|
1616
|
-
return value === true || value === 'true' || value === 'True';
|
|
1617
|
-
}
|
|
1618
1546
|
function normalizeWeekendDays(value) {
|
|
1619
1547
|
if (!Array.isArray(value)) {
|
|
1620
1548
|
return [];
|
|
@@ -3393,7 +3321,7 @@ const EMAIL_DELIVERY_ROUTES = [
|
|
|
3393
3321
|
{
|
|
3394
3322
|
path: '',
|
|
3395
3323
|
canDeactivate: [emailDesignLeaveGuard],
|
|
3396
|
-
loadComponent: () => import('./masterteam-system-settings-email-delivery-shell-
|
|
3324
|
+
loadComponent: () => import('./masterteam-system-settings-email-delivery-shell-CYO489J5.mjs').then((module) => module.EmailDeliveryShell),
|
|
3397
3325
|
},
|
|
3398
3326
|
{ path: '**', redirectTo: '' },
|
|
3399
3327
|
];
|
|
@@ -4620,4 +4548,4 @@ function numberAttribute(element, name) {
|
|
|
4620
4548
|
*/
|
|
4621
4549
|
|
|
4622
4550
|
export { EmailDeliveryAccessService as A, collectEmailTemplatePlaceholders as B, buildEmailTemplatePlaceholderFields as C, DEFAULT_GENERAL_CONFIGURATION as D, EmailDeliveryFacade as E, FIXED_CURRENCIES as F, GENERAL_CONFIGURATION_SETTING_KEY as G, EmailUserTestDialog as H, EMAIL_USER_INITIATED_TEST_OPERATION_KIND as I, EMAIL_DELIVERY_ROUTES as J, EMAIL_FONT_FAMILIES as K, EMAIL_STYLE_RANGES as L, EMAIL_FONT_WEIGHTS as M, EMAIL_FONT_LABELS as N, EMAIL_STYLE_SECTIONS as O, EMAIL_STYLE_ADVANCED_SECTIONS as P, readEmailStyle as Q, RATE_SOURCE_OPTIONS as R, SystemSettings as S, TIMESHEET_FREQUENCY_OPTIONS as T, writeEmailStyle as U, normalizeEmailColor as V, WEEKEND_DAY_DEFINITIONS as W, emailDesignLeaveGuard as X, buildEmailPreviewDocument as Y, EmailDeliveryStatus as a, EMAIL_DELIVERY_ATTEMPT_STATUSES as b, createEmailTestRequestId as c, areEmailTestRecipientsValid as d, isEmailTestRequestPending as e, EMAIL_DELIVERY_PERMISSIONS as f, getEmailDeliveryStatusMap as g, EmailLayoutFacade as h, isConnectionTestAttempt as i, emailStylesKey as j, EMAIL_LAYOUT_CONTENT_SLOT as k, EMAIL_LAYOUT_MAX_BYTES as l, EmailVisualEditor as m, EmailContentStylesEditor as n, EmailHtmlPreview as o, parseEmailTestRecipients as p, EXPLORE_DEFAULT_VIEW_OPTIONS as q, readLayoutErrorDiagnostics as r, DEFAULT_DATE_FORMAT_OPTIONS as s, DEFAULT_TIME_FORMAT_OPTIONS as t, DOTNET_DAY_DEFINITIONS as u, SCHEDULE_ITEM_TYPE_OPTIONS as v, SystemSettingsHolidayEditor as w, DEFAULT_EMAIL_DELIVERY_OPTIONS as x, EMAIL_DELIVERY_OPTIONS as y, provideEmailDelivery as z };
|
|
4623
|
-
//# sourceMappingURL=masterteam-system-settings-masterteam-system-settings-
|
|
4551
|
+
//# sourceMappingURL=masterteam-system-settings-masterteam-system-settings-D9LyVzzO.mjs.map
|