@masterteam/system-settings 0.0.12 → 0.0.14
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 +60 -13
- package/assets/i18n/ar.json +370 -130
- package/assets/i18n/en.json +370 -130
- package/assets/system-settings.css +1 -1
- package/fesm2022/masterteam-system-settings-email-delivery-shell-DowMjl4L.mjs +2501 -0
- package/fesm2022/masterteam-system-settings-email-delivery-shell-DowMjl4L.mjs.map +1 -0
- package/fesm2022/masterteam-system-settings.mjs +83 -108
- package/fesm2022/masterteam-system-settings.mjs.map +1 -1
- package/package.json +4 -3
- package/types/masterteam-system-settings.d.ts +366 -37
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CommonModule } from '@angular/common';
|
|
2
2
|
import { HttpClient } from '@angular/common/http';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { input, ChangeDetectionStrategy, Component, inject, computed, effect, output, signal } from '@angular/core';
|
|
4
|
+
import { input, ChangeDetectionStrategy, Component, inject, computed, effect, output, signal, InjectionToken, makeEnvironmentProviders } from '@angular/core';
|
|
5
5
|
import { toSignal } from '@angular/core/rxjs-interop';
|
|
6
6
|
import * as i1 from '@angular/forms';
|
|
7
7
|
import { ReactiveFormsModule, FormGroup, FormControl, Validators } from '@angular/forms';
|
|
@@ -18,28 +18,34 @@ import { Card } from '@masterteam/components/card';
|
|
|
18
18
|
import { MultiSelectField } from '@masterteam/components/multi-select-field';
|
|
19
19
|
import { SelectField } from '@masterteam/components/select-field';
|
|
20
20
|
import { RadioCardsField } from '@masterteam/components/radio-cards-field';
|
|
21
|
+
import { ToggleField } from '@masterteam/components/toggle-field';
|
|
21
22
|
import { ModalRef } from '@masterteam/components/dialog';
|
|
22
23
|
import { DateField } from '@masterteam/components/date-field';
|
|
23
24
|
import { TextField } from '@masterteam/components/text-field';
|
|
24
25
|
import { Table } from '@masterteam/components/table';
|
|
25
26
|
import { NumberField } from '@masterteam/components/number-field';
|
|
26
27
|
import { TextareaField } from '@masterteam/components/textarea-field';
|
|
27
|
-
import { ToggleField } from '@masterteam/components/toggle-field';
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
|
-
* "
|
|
31
|
-
* to a specific feature area
|
|
32
|
-
*
|
|
30
|
+
* "Experience & Appearance" — product-wide application behaviour that is not
|
|
31
|
+
* tied to a specific feature area: the explore landing view and whether the
|
|
32
|
+
* topbar design switcher is offered. More entries are expected here.
|
|
33
33
|
*/
|
|
34
34
|
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'\">\
|
|
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'\">\n <mt-card class=\"block\">\n <div [formGroup]=\"generalConfigurationForm()\" class=\"space-y-5\">\n <div class=\"space-y-1\">\n <h4 class=\"text-base font-semibold text-neutral-900\">\n {{ t(\"general-configuration-title\") }}\n </h4>\n <p class=\"text-sm text-neutral-600\">\n {{ t(\"general-configuration-description\") }}\n </p>\n </div>\n\n <mt-radio-cards-field\n formControlName=\"defaultExploreView\"\n [options]=\"exploreDefaultViewOptions()\"\n [optionLabel]=\"'name'\"\n [optionValue]=\"'id'\"\n [label]=\"t('explore-default-view')\"\n [hint]=\"t('explore-default-view-hint')\"\n [required]=\"true\"\n size=\"small\"\n />\n\n <div class=\"space-y-1\">\n <mt-toggle-field\n formControlName=\"showDesignSwitcher\"\n [label]=\"t('design-switcher')\"\n />\n <p class=\"text-sm text-neutral-600\">\n {{ t(\"design-switcher-hint\") }}\n </p>\n </div>\n </div>\n </mt-card>\n</ng-container>\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"] }, { 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 });
|
|
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: [
|
|
42
|
+
args: [{ selector: 'mt-system-settings-general-config-section', imports: [
|
|
43
|
+
ReactiveFormsModule,
|
|
44
|
+
TranslocoDirective,
|
|
45
|
+
Card,
|
|
46
|
+
RadioCardsField,
|
|
47
|
+
ToggleField,
|
|
48
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\n <mt-card class=\"block\">\n <div [formGroup]=\"generalConfigurationForm()\" class=\"space-y-5\">\n <div class=\"space-y-1\">\n <h4 class=\"text-base font-semibold text-neutral-900\">\n {{ t(\"general-configuration-title\") }}\n </h4>\n <p class=\"text-sm text-neutral-600\">\n {{ t(\"general-configuration-description\") }}\n </p>\n </div>\n\n <mt-radio-cards-field\n formControlName=\"defaultExploreView\"\n [options]=\"exploreDefaultViewOptions()\"\n [optionLabel]=\"'name'\"\n [optionValue]=\"'id'\"\n [label]=\"t('explore-default-view')\"\n [hint]=\"t('explore-default-view-hint')\"\n [required]=\"true\"\n size=\"small\"\n />\n\n <div class=\"space-y-1\">\n <mt-toggle-field\n formControlName=\"showDesignSwitcher\"\n [label]=\"t('design-switcher')\"\n />\n <p class=\"text-sm text-neutral-600\">\n {{ t(\"design-switcher-hint\") }}\n </p>\n </div>\n </div>\n </mt-card>\n</ng-container>\n", styles: [":host{display:block;height:100%}mt-card{height:100%}\n"] }]
|
|
43
49
|
}], propDecorators: { generalConfigurationForm: [{ type: i0.Input, args: [{ isSignal: true, alias: "generalConfigurationForm", required: true }] }], exploreDefaultViewOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "exploreDefaultViewOptions", required: false }] }] } });
|
|
44
50
|
|
|
45
51
|
class SystemSettingsGeneralSection {
|
|
@@ -126,7 +132,7 @@ class SystemSettingsHolidayEditor {
|
|
|
126
132
|
this.ref.close(null);
|
|
127
133
|
}
|
|
128
134
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsHolidayEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
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'\">\
|
|
135
|
+
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'\">\n <div [class]=\"' ' + (modal.contentClass || '')\">\n <form [formGroup]=\"form\" class=\"space-y-4 p-3\" (ngSubmit)=\"onSave()\">\n <mt-text-field\n formControlName=\"label\"\n [label]=\"t('holiday-name')\"\n [placeholder]=\"t('holiday-name-placeholder')\"\n [required]=\"true\"\n />\n\n <div class=\"grid gap-4 md:grid-cols-2\">\n <div class=\"grid gap-1\">\n <mt-date-field\n formControlName=\"from\"\n [label]=\"t('from-date')\"\n [placeholder]=\"t('from-date')\"\n [showIcon]=\"true\"\n [required]=\"true\"\n />\n </div>\n\n <div class=\"grid gap-1\">\n <mt-date-field\n formControlName=\"to\"\n [label]=\"t('to-date')\"\n [placeholder]=\"t('to-date')\"\n [showIcon]=\"true\"\n [required]=\"true\"\n [pInputs]=\"toPickerInputs()\"\n />\n </div>\n </div>\n\n @if (form.errors?.[\"invalidRange\"] && (form.dirty || form.touched)) {\n <div class=\"text-sm text-red-600\">\n {{ t(\"holiday-range-error\") }}\n </div>\n }\n </form>\n </div>\n <div [class]=\"modal.footerClass\">\n <mt-button\n [label]=\"t('cancel')\"\n variant=\"outlined\"\n type=\"button\"\n (onClick)=\"onCancel()\"\n />\n <mt-button [label]=\"t(actionLabel())\" type=\"button\" (onClick)=\"onSave()\" />\n </div>\n</ng-container>\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", "ariaLabel"], 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 });
|
|
130
136
|
}
|
|
131
137
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsHolidayEditor, decorators: [{
|
|
132
138
|
type: Component,
|
|
@@ -136,7 +142,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
136
142
|
Button,
|
|
137
143
|
DateField,
|
|
138
144
|
TextField,
|
|
139
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\
|
|
145
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\n <div [class]=\"' ' + (modal.contentClass || '')\">\n <form [formGroup]=\"form\" class=\"space-y-4 p-3\" (ngSubmit)=\"onSave()\">\n <mt-text-field\n formControlName=\"label\"\n [label]=\"t('holiday-name')\"\n [placeholder]=\"t('holiday-name-placeholder')\"\n [required]=\"true\"\n />\n\n <div class=\"grid gap-4 md:grid-cols-2\">\n <div class=\"grid gap-1\">\n <mt-date-field\n formControlName=\"from\"\n [label]=\"t('from-date')\"\n [placeholder]=\"t('from-date')\"\n [showIcon]=\"true\"\n [required]=\"true\"\n />\n </div>\n\n <div class=\"grid gap-1\">\n <mt-date-field\n formControlName=\"to\"\n [label]=\"t('to-date')\"\n [placeholder]=\"t('to-date')\"\n [showIcon]=\"true\"\n [required]=\"true\"\n [pInputs]=\"toPickerInputs()\"\n />\n </div>\n </div>\n\n @if (form.errors?.[\"invalidRange\"] && (form.dirty || form.touched)) {\n <div class=\"text-sm text-red-600\">\n {{ t(\"holiday-range-error\") }}\n </div>\n }\n </form>\n </div>\n <div [class]=\"modal.footerClass\">\n <mt-button\n [label]=\"t('cancel')\"\n variant=\"outlined\"\n type=\"button\"\n (onClick)=\"onCancel()\"\n />\n <mt-button [label]=\"t(actionLabel())\" type=\"button\" (onClick)=\"onSave()\" />\n </div>\n</ng-container>\n", styles: [":host{display:block}\n"] }]
|
|
140
146
|
}], ctorParameters: () => [], propDecorators: { holiday: [{ type: i0.Input, args: [{ isSignal: true, alias: "holiday", required: false }] }], isEditMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "isEditMode", required: false }] }] } });
|
|
141
147
|
function holidayRangeValidator() {
|
|
142
148
|
return (control) => {
|
|
@@ -187,23 +193,13 @@ class SystemSettingsHolidaysSection {
|
|
|
187
193
|
], ...(ngDevMode ? [{ debugName: "rowActions" }] : /* istanbul ignore next */ []));
|
|
188
194
|
hasHolidays = computed(() => this.holidays().length > 0, ...(ngDevMode ? [{ debugName: "hasHolidays" }] : /* istanbul ignore next */ []));
|
|
189
195
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsHolidaysSection, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
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'\">\
|
|
196
|
+
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", "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", "paginatorPosition", "alwaysShowPaginator", "rowsPerPageOptions", "pageSize", "currentPage", "first", "filterTerm", "groupBy", "sortField", "sortDirection"], outputs: ["selectionChange", "cellChange", "lazyLoad", "columnReorder", "rowReorder", "rowClick", "emptyAction", "rowActionsRequested", "filtersChange", "activeTabChange", "onTabChange", "pageSizeChange", "currentPageChange", "firstChange", "filterTermChange", "groupByChange", "sortFieldChange", "sortDirectionChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
191
197
|
}
|
|
192
198
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsHolidaysSection, decorators: [{
|
|
193
199
|
type: Component,
|
|
194
|
-
args: [{ selector: 'mt-system-settings-holidays-section', imports: [TranslocoDirective, Button, Card, Table], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\
|
|
200
|
+
args: [{ selector: 'mt-system-settings-holidays-section', imports: [TranslocoDirective, Button, Card, Table], changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
|
|
195
201
|
}], propDecorators: { holidays: [{ type: i0.Input, args: [{ isSignal: true, alias: "holidays", required: false }] }], addHoliday: [{ type: i0.Output, args: ["addHoliday"] }], editHoliday: [{ type: i0.Output, args: ["editHoliday"] }], deleteHoliday: [{ type: i0.Output, args: ["deleteHoliday"] }] } });
|
|
196
202
|
|
|
197
|
-
class SystemSettingsSmtpSection {
|
|
198
|
-
smtpForm = input.required(...(ngDevMode ? [{ debugName: "smtpForm" }] : /* istanbul ignore next */ []));
|
|
199
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsSmtpSection, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
200
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: SystemSettingsSmtpSection, isStandalone: true, selector: "mt-system-settings-smtp-section", inputs: { smtpForm: { classPropertyName: "smtpForm", publicName: "smtpForm", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\r\n <mt-card class=\"block\">\r\n <div [formGroup]=\"smtpForm()\" class=\"space-y-4\">\r\n <div class=\"space-y-1\">\r\n <h4 class=\"text-base font-semibold text-neutral-900\">\r\n {{ t(\"smtp-title\") }}\r\n </h4>\r\n <p class=\"text-sm text-neutral-600\">\r\n {{ t(\"smtp-description\") }}\r\n </p>\r\n </div>\r\n\r\n <div class=\"grid gap-4 md:grid-cols-2\">\r\n <mt-text-field\r\n formControlName=\"mail\"\r\n [label]=\"t('smtp-mail')\"\r\n [placeholder]=\"t('smtp-mail-placeholder')\"\r\n type=\"email\"\r\n />\r\n\r\n <mt-text-field\r\n formControlName=\"name\"\r\n [label]=\"t('smtp-name')\"\r\n [placeholder]=\"t('smtp-name-placeholder')\"\r\n />\r\n\r\n <mt-text-field\r\n formControlName=\"host\"\r\n [label]=\"t('smtp-host')\"\r\n [placeholder]=\"t('smtp-host-placeholder')\"\r\n />\r\n\r\n <mt-text-field\r\n formControlName=\"port\"\r\n [label]=\"t('smtp-port')\"\r\n [placeholder]=\"t('smtp-port-placeholder')\"\r\n type=\"number\"\r\n />\r\n\r\n <div class=\"md:col-span-2\">\r\n <mt-text-field\r\n formControlName=\"password\"\r\n [label]=\"t('smtp-password')\"\r\n [placeholder]=\"t('smtp-password-placeholder')\"\r\n type=\"password\"\r\n />\r\n </div>\r\n </div>\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.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: TextField, selector: "mt-text-field", inputs: ["field", "hint", "label", "placeholder", "class", "type", "readonly", "pInputs", "required", "maxLength", "icon", "iconPosition"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
201
|
-
}
|
|
202
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsSmtpSection, decorators: [{
|
|
203
|
-
type: Component,
|
|
204
|
-
args: [{ selector: 'mt-system-settings-smtp-section', imports: [ReactiveFormsModule, TranslocoDirective, Card, TextField], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\r\n <mt-card class=\"block\">\r\n <div [formGroup]=\"smtpForm()\" class=\"space-y-4\">\r\n <div class=\"space-y-1\">\r\n <h4 class=\"text-base font-semibold text-neutral-900\">\r\n {{ t(\"smtp-title\") }}\r\n </h4>\r\n <p class=\"text-sm text-neutral-600\">\r\n {{ t(\"smtp-description\") }}\r\n </p>\r\n </div>\r\n\r\n <div class=\"grid gap-4 md:grid-cols-2\">\r\n <mt-text-field\r\n formControlName=\"mail\"\r\n [label]=\"t('smtp-mail')\"\r\n [placeholder]=\"t('smtp-mail-placeholder')\"\r\n type=\"email\"\r\n />\r\n\r\n <mt-text-field\r\n formControlName=\"name\"\r\n [label]=\"t('smtp-name')\"\r\n [placeholder]=\"t('smtp-name-placeholder')\"\r\n />\r\n\r\n <mt-text-field\r\n formControlName=\"host\"\r\n [label]=\"t('smtp-host')\"\r\n [placeholder]=\"t('smtp-host-placeholder')\"\r\n />\r\n\r\n <mt-text-field\r\n formControlName=\"port\"\r\n [label]=\"t('smtp-port')\"\r\n [placeholder]=\"t('smtp-port-placeholder')\"\r\n type=\"number\"\r\n />\r\n\r\n <div class=\"md:col-span-2\">\r\n <mt-text-field\r\n formControlName=\"password\"\r\n [label]=\"t('smtp-password')\"\r\n [placeholder]=\"t('smtp-password-placeholder')\"\r\n type=\"password\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n </mt-card>\r\n</ng-container>\r\n", styles: [":host{display:block}\n"] }]
|
|
205
|
-
}], propDecorators: { smtpForm: [{ type: i0.Input, args: [{ isSignal: true, alias: "smtpForm", required: true }] }] } });
|
|
206
|
-
|
|
207
203
|
class SystemSettingsTimeSheetSection {
|
|
208
204
|
policyForm = input.required(...(ngDevMode ? [{ debugName: "policyForm" }] : /* istanbul ignore next */ []));
|
|
209
205
|
globalWorkingHoursForm = input.required(...(ngDevMode ? [{ debugName: "globalWorkingHoursForm" }] : /* istanbul ignore next */ []));
|
|
@@ -212,7 +208,7 @@ class SystemSettingsTimeSheetSection {
|
|
|
212
208
|
timezoneOptions = input([], ...(ngDevMode ? [{ debugName: "timezoneOptions" }] : /* istanbul ignore next */ []));
|
|
213
209
|
maxDailyBelowDaily = input(false, ...(ngDevMode ? [{ debugName: "maxDailyBelowDaily" }] : /* istanbul ignore next */ []));
|
|
214
210
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsTimeSheetSection, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
215
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: SystemSettingsTimeSheetSection, isStandalone: true, selector: "mt-system-settings-timesheet-section", inputs: { policyForm: { classPropertyName: "policyForm", publicName: "policyForm", isSignal: true, isRequired: true, transformFunction: null }, globalWorkingHoursForm: { classPropertyName: "globalWorkingHoursForm", publicName: "globalWorkingHoursForm", isSignal: true, isRequired: true, transformFunction: null }, dayOptions: { classPropertyName: "dayOptions", publicName: "dayOptions", isSignal: true, isRequired: false, transformFunction: null }, frequencyOptions: { classPropertyName: "frequencyOptions", publicName: "frequencyOptions", isSignal: true, isRequired: false, transformFunction: null }, timezoneOptions: { classPropertyName: "timezoneOptions", publicName: "timezoneOptions", isSignal: true, isRequired: false, transformFunction: null }, maxDailyBelowDaily: { classPropertyName: "maxDailyBelowDaily", publicName: "maxDailyBelowDaily", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\
|
|
211
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.8", type: SystemSettingsTimeSheetSection, isStandalone: true, selector: "mt-system-settings-timesheet-section", inputs: { policyForm: { classPropertyName: "policyForm", publicName: "policyForm", isSignal: true, isRequired: true, transformFunction: null }, globalWorkingHoursForm: { classPropertyName: "globalWorkingHoursForm", publicName: "globalWorkingHoursForm", isSignal: true, isRequired: true, transformFunction: null }, dayOptions: { classPropertyName: "dayOptions", publicName: "dayOptions", isSignal: true, isRequired: false, transformFunction: null }, frequencyOptions: { classPropertyName: "frequencyOptions", publicName: "frequencyOptions", isSignal: true, isRequired: false, transformFunction: null }, timezoneOptions: { classPropertyName: "timezoneOptions", publicName: "timezoneOptions", isSignal: true, isRequired: false, transformFunction: null }, maxDailyBelowDaily: { classPropertyName: "maxDailyBelowDaily", publicName: "maxDailyBelowDaily", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\n <div class=\"grid gap-6 xl:grid-cols-2 mb-6\">\n <mt-card class=\"block\">\n <div [formGroup]=\"policyForm()\" class=\"space-y-5\">\n <div class=\"space-y-1\">\n <h4 class=\"text-base font-semibold text-neutral-900\">\n {{ t(\"general-card-title\") }}\n </h4>\n <p class=\"text-sm text-neutral-600\">\n {{ t(\"general-card-description\") }}\n </p>\n </div>\n\n <div class=\"grid gap-4 md:grid-cols-2\">\n <mt-select-field\n formControlName=\"frequency\"\n [options]=\"frequencyOptions()\"\n [optionLabel]=\"'name'\"\n [optionValue]=\"'id'\"\n [label]=\"t('frequency')\"\n [placeholder]=\"t('frequency-placeholder')\"\n [required]=\"true\"\n />\n\n <mt-number-field\n formControlName=\"maxDailyHours\"\n [label]=\"t('max-daily-hours')\"\n [placeholder]=\"t('max-daily-hours-placeholder')\"\n [min]=\"1\"\n [max]=\"24\"\n [required]=\"true\"\n [hint]=\"maxDailyBelowDaily() ? t('max-daily-below-daily') : ''\"\n />\n\n <mt-number-field\n formControlName=\"submissionDeadlineDays\"\n [label]=\"t('submission-deadline-days')\"\n [placeholder]=\"t('submission-deadline-days-placeholder')\"\n [min]=\"0\"\n [max]=\"90\"\n [required]=\"true\"\n [hint]=\"t('submission-deadline-hint')\"\n />\n </div>\n\n <div class=\"grid gap-3 md:grid-cols-2\">\n <mt-toggle-field\n formControlName=\"requireDescription\"\n [label]=\"t('require-description')\"\n />\n <mt-toggle-field\n formControlName=\"allowFutureEntry\"\n [label]=\"t('allow-future-entry')\"\n />\n <mt-toggle-field\n formControlName=\"allowBackdatedEntry\"\n [label]=\"t('allow-backdated-entry')\"\n />\n <mt-toggle-field\n formControlName=\"autoLockOnApprove\"\n [label]=\"t('auto-lock-on-approve')\"\n />\n </div>\n </div>\n </mt-card>\n\n <mt-card class=\"block\">\n <div [formGroup]=\"globalWorkingHoursForm()\" class=\"space-y-5\">\n <div class=\"space-y-1\">\n <h4 class=\"text-base font-semibold text-neutral-900\">\n {{ t(\"working-hours-card-title\") }}\n </h4>\n <p class=\"text-sm text-neutral-600\">\n {{ t(\"working-hours-card-description\") }}\n </p>\n </div>\n\n <div class=\"grid gap-4 md:grid-cols-2\">\n <mt-select-field\n class=\"md:col-span-2\"\n formControlName=\"timeZoneId\"\n [options]=\"timezoneOptions()\"\n [optionLabel]=\"'name'\"\n [optionValue]=\"'id'\"\n [label]=\"t('global-timezone')\"\n [placeholder]=\"t('global-timezone-placeholder')\"\n [filter]=\"true\"\n [required]=\"true\"\n />\n\n <mt-multi-select-field\n class=\"md:col-span-2\"\n formControlName=\"workingDays\"\n [options]=\"dayOptions()\"\n [optionLabel]=\"'name'\"\n [optionValue]=\"'dayNumber'\"\n [label]=\"t('working-days')\"\n [placeholder]=\"t('working-days-placeholder')\"\n [display]=\"'chip'\"\n [required]=\"true\"\n [showClear]=\"true\"\n />\n\n <mt-number-field\n class=\"md:col-span-2\"\n formControlName=\"hoursPerDay\"\n [label]=\"t('daily-working-hours')\"\n [placeholder]=\"t('daily-working-hours-placeholder')\"\n [min]=\"0\"\n [max]=\"24\"\n [required]=\"true\"\n />\n\n <mt-textarea-field\n class=\"md:col-span-2\"\n formControlName=\"holidaysCsv\"\n [label]=\"t('global-holidays')\"\n [placeholder]=\"t('global-holidays-placeholder')\"\n rows=\"3\"\n />\n </div>\n </div>\n </mt-card>\n </div>\n</ng-container>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: Card, selector: "mt-card", inputs: ["class", "title", "paddingless"] }, { kind: "component", type: MultiSelectField, selector: "mt-multi-select-field", inputs: ["field", "label", "placeholder", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "display", "required", "maxSelectedLabels", "group", "virtualScroll", "virtualScrollItemSize", "optionGroupLabel", "optionGroupChildren", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape"], outputs: ["onChange"] }, { kind: "component", type: NumberField, selector: "mt-number-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "pInputs", "format", "useGrouping", "maxFractionDigits", "min", "max", "required"] }, { kind: "component", type: SelectField, selector: "mt-select-field", inputs: ["field", "hint", "label", "placeholder", "hasPlaceholderPrefix", "class", "readonly", "pInputs", "options", "optionValue", "optionLabel", "filter", "filterBy", "dataKey", "showClear", "clearAfterSelect", "required", "group", "size", "optionGroupLabel", "optionGroupChildren", "loading", "optionIcon", "optionIconColor", "optionIconShape", "optionAvatarShape", "optionGroupIcon", "optionGroupIconColor", "optionGroupIconShape", "optionGroupAvatarShape", "markCurrentUser"], outputs: ["onChange"] }, { kind: "component", type: TextareaField, selector: "mt-textarea-field", inputs: ["field", "hint", "label", "placeholder", "class", "readonly", "noErrorStyle", "pInputs", "rows", "required", "maxLength"] }, { kind: "component", type: ToggleField, selector: "mt-toggle-field", inputs: ["label", "inputId", "labelPosition", "placeholder", "readonly", "pInputs", "required", "toggleShape", "size", "icon", "descriptionCard"], outputs: ["onChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
216
212
|
}
|
|
217
213
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsTimeSheetSection, decorators: [{
|
|
218
214
|
type: Component,
|
|
@@ -225,7 +221,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
225
221
|
SelectField,
|
|
226
222
|
TextareaField,
|
|
227
223
|
ToggleField,
|
|
228
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\
|
|
224
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'system-settings'\">\n <div class=\"grid gap-6 xl:grid-cols-2 mb-6\">\n <mt-card class=\"block\">\n <div [formGroup]=\"policyForm()\" class=\"space-y-5\">\n <div class=\"space-y-1\">\n <h4 class=\"text-base font-semibold text-neutral-900\">\n {{ t(\"general-card-title\") }}\n </h4>\n <p class=\"text-sm text-neutral-600\">\n {{ t(\"general-card-description\") }}\n </p>\n </div>\n\n <div class=\"grid gap-4 md:grid-cols-2\">\n <mt-select-field\n formControlName=\"frequency\"\n [options]=\"frequencyOptions()\"\n [optionLabel]=\"'name'\"\n [optionValue]=\"'id'\"\n [label]=\"t('frequency')\"\n [placeholder]=\"t('frequency-placeholder')\"\n [required]=\"true\"\n />\n\n <mt-number-field\n formControlName=\"maxDailyHours\"\n [label]=\"t('max-daily-hours')\"\n [placeholder]=\"t('max-daily-hours-placeholder')\"\n [min]=\"1\"\n [max]=\"24\"\n [required]=\"true\"\n [hint]=\"maxDailyBelowDaily() ? t('max-daily-below-daily') : ''\"\n />\n\n <mt-number-field\n formControlName=\"submissionDeadlineDays\"\n [label]=\"t('submission-deadline-days')\"\n [placeholder]=\"t('submission-deadline-days-placeholder')\"\n [min]=\"0\"\n [max]=\"90\"\n [required]=\"true\"\n [hint]=\"t('submission-deadline-hint')\"\n />\n </div>\n\n <div class=\"grid gap-3 md:grid-cols-2\">\n <mt-toggle-field\n formControlName=\"requireDescription\"\n [label]=\"t('require-description')\"\n />\n <mt-toggle-field\n formControlName=\"allowFutureEntry\"\n [label]=\"t('allow-future-entry')\"\n />\n <mt-toggle-field\n formControlName=\"allowBackdatedEntry\"\n [label]=\"t('allow-backdated-entry')\"\n />\n <mt-toggle-field\n formControlName=\"autoLockOnApprove\"\n [label]=\"t('auto-lock-on-approve')\"\n />\n </div>\n </div>\n </mt-card>\n\n <mt-card class=\"block\">\n <div [formGroup]=\"globalWorkingHoursForm()\" class=\"space-y-5\">\n <div class=\"space-y-1\">\n <h4 class=\"text-base font-semibold text-neutral-900\">\n {{ t(\"working-hours-card-title\") }}\n </h4>\n <p class=\"text-sm text-neutral-600\">\n {{ t(\"working-hours-card-description\") }}\n </p>\n </div>\n\n <div class=\"grid gap-4 md:grid-cols-2\">\n <mt-select-field\n class=\"md:col-span-2\"\n formControlName=\"timeZoneId\"\n [options]=\"timezoneOptions()\"\n [optionLabel]=\"'name'\"\n [optionValue]=\"'id'\"\n [label]=\"t('global-timezone')\"\n [placeholder]=\"t('global-timezone-placeholder')\"\n [filter]=\"true\"\n [required]=\"true\"\n />\n\n <mt-multi-select-field\n class=\"md:col-span-2\"\n formControlName=\"workingDays\"\n [options]=\"dayOptions()\"\n [optionLabel]=\"'name'\"\n [optionValue]=\"'dayNumber'\"\n [label]=\"t('working-days')\"\n [placeholder]=\"t('working-days-placeholder')\"\n [display]=\"'chip'\"\n [required]=\"true\"\n [showClear]=\"true\"\n />\n\n <mt-number-field\n class=\"md:col-span-2\"\n formControlName=\"hoursPerDay\"\n [label]=\"t('daily-working-hours')\"\n [placeholder]=\"t('daily-working-hours-placeholder')\"\n [min]=\"0\"\n [max]=\"24\"\n [required]=\"true\"\n />\n\n <mt-textarea-field\n class=\"md:col-span-2\"\n formControlName=\"holidaysCsv\"\n [label]=\"t('global-holidays')\"\n [placeholder]=\"t('global-holidays-placeholder')\"\n rows=\"3\"\n />\n </div>\n </div>\n </mt-card>\n </div>\n</ng-container>\n" }]
|
|
229
225
|
}], propDecorators: { policyForm: [{ type: i0.Input, args: [{ isSignal: true, alias: "policyForm", required: true }] }], globalWorkingHoursForm: [{ type: i0.Input, args: [{ isSignal: true, alias: "globalWorkingHoursForm", required: true }] }], dayOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "dayOptions", required: false }] }], frequencyOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "frequencyOptions", required: false }] }], timezoneOptions: [{ type: i0.Input, args: [{ isSignal: true, alias: "timezoneOptions", required: false }] }], maxDailyBelowDaily: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDailyBelowDaily", required: false }] }] } });
|
|
230
226
|
|
|
231
227
|
/** The settings record General Configuration fields live in. */
|
|
@@ -277,6 +273,7 @@ const EXPLORE_DEFAULT_VIEW_OPTIONS = [
|
|
|
277
273
|
];
|
|
278
274
|
const DEFAULT_GENERAL_CONFIGURATION = {
|
|
279
275
|
defaultExploreView: 'cards',
|
|
276
|
+
showDesignSwitcher: false,
|
|
280
277
|
};
|
|
281
278
|
const DEFAULT_DATE_FORMAT_OPTIONS = [
|
|
282
279
|
{
|
|
@@ -414,6 +411,9 @@ class SystemSettings {
|
|
|
414
411
|
nonNullable: true,
|
|
415
412
|
validators: [Validators.required],
|
|
416
413
|
}),
|
|
414
|
+
showDesignSwitcher: new FormControl(false, {
|
|
415
|
+
nonNullable: true,
|
|
416
|
+
}),
|
|
417
417
|
}),
|
|
418
418
|
timezone: new FormGroup({
|
|
419
419
|
regionId: new FormControl(null, Validators.required),
|
|
@@ -427,13 +427,6 @@ class SystemSettings {
|
|
|
427
427
|
weekend: new FormGroup({
|
|
428
428
|
days: new FormControl([], { nonNullable: true }),
|
|
429
429
|
}),
|
|
430
|
-
smtp: new FormGroup({
|
|
431
|
-
mail: new FormControl('', { nonNullable: true }),
|
|
432
|
-
name: new FormControl('', { nonNullable: true }),
|
|
433
|
-
password: new FormControl('', { nonNullable: true }),
|
|
434
|
-
host: new FormControl('', { nonNullable: true }),
|
|
435
|
-
port: new FormControl('', { nonNullable: true }),
|
|
436
|
-
}),
|
|
437
430
|
timeSheetPolicy: new FormGroup({
|
|
438
431
|
frequency: new FormControl('Weekly', Validators.required),
|
|
439
432
|
maxDailyHours: new FormControl(24, [
|
|
@@ -505,7 +498,6 @@ class SystemSettings {
|
|
|
505
498
|
timezoneSetting = computed(() => this.findSettingByKey('Timezone'), ...(ngDevMode ? [{ debugName: "timezoneSetting" }] : /* istanbul ignore next */ []));
|
|
506
499
|
currencySetting = computed(() => this.findSettingByKey('Currency'), ...(ngDevMode ? [{ debugName: "currencySetting" }] : /* istanbul ignore next */ []));
|
|
507
500
|
weekendSetting = computed(() => this.findSettingByKey('Weekend'), ...(ngDevMode ? [{ debugName: "weekendSetting" }] : /* istanbul ignore next */ []));
|
|
508
|
-
smtpSetting = computed(() => this.findSettingByKey('SMTP'), ...(ngDevMode ? [{ debugName: "smtpSetting" }] : /* istanbul ignore next */ []));
|
|
509
501
|
timeSheetPolicySetting = computed(() => this.findSettingByKey('TimeSheetPolicy'), ...(ngDevMode ? [{ debugName: "timeSheetPolicySetting" }] : /* istanbul ignore next */ []));
|
|
510
502
|
globalWorkingHoursSetting = computed(() => this.findSettingByKey('GlobalWorkingHours'), ...(ngDevMode ? [{ debugName: "globalWorkingHoursSetting" }] : /* istanbul ignore next */ []));
|
|
511
503
|
resolvedFormatSchema = computed(() => {
|
|
@@ -581,7 +573,6 @@ class SystemSettings {
|
|
|
581
573
|
!this.areEqual(initial.timezone, current.timezone) ||
|
|
582
574
|
!this.areEqual(initial.currency, current.currency) ||
|
|
583
575
|
!this.areEqual(initial.weekend, current.weekend) ||
|
|
584
|
-
!this.areEqual(initial.smtp, current.smtp) ||
|
|
585
576
|
!this.areEqual(initial.timeSheetPolicy, current.timeSheetPolicy) ||
|
|
586
577
|
!this.areEqual(initial.globalWorkingHours, current.globalWorkingHours));
|
|
587
578
|
}, ...(ngDevMode ? [{ debugName: "hasChanges" }] : /* istanbul ignore next */ []));
|
|
@@ -612,7 +603,7 @@ class SystemSettings {
|
|
|
612
603
|
return;
|
|
613
604
|
}
|
|
614
605
|
this.hydrateForm(this.generalConfigurationSetting() ??
|
|
615
|
-
this.createFallbackSetting(GENERAL_CONFIGURATION_SETTING_KEY), this.holidaysSetting() ?? this.createFallbackSetting('Holidays'), this.timezoneSetting() ?? this.createFallbackSetting('Timezone'), this.currencySetting() ?? this.createFallbackSetting('Currency'), this.weekendSetting() ?? this.createFallbackSetting('Weekend'), this.
|
|
606
|
+
this.createFallbackSetting(GENERAL_CONFIGURATION_SETTING_KEY), this.holidaysSetting() ?? this.createFallbackSetting('Holidays'), this.timezoneSetting() ?? this.createFallbackSetting('Timezone'), this.currencySetting() ?? this.createFallbackSetting('Currency'), this.weekendSetting() ?? this.createFallbackSetting('Weekend'), this.timeSheetPolicySetting() ??
|
|
616
607
|
this.createFallbackSetting('TimeSheetPolicy'), this.globalWorkingHoursSetting() ??
|
|
617
608
|
this.createFallbackSetting('GlobalWorkingHours'));
|
|
618
609
|
this.hydrationVersion.set(version);
|
|
@@ -718,12 +709,6 @@ class SystemSettings {
|
|
|
718
709
|
value: nextSnapshot.weekend,
|
|
719
710
|
});
|
|
720
711
|
}
|
|
721
|
-
if (!this.areEqual(initialSnapshot.smtp, nextSnapshot.smtp)) {
|
|
722
|
-
values.push({
|
|
723
|
-
key: 'SMTP',
|
|
724
|
-
value: nextSnapshot.smtp,
|
|
725
|
-
});
|
|
726
|
-
}
|
|
727
712
|
if (!this.areEqual(initialSnapshot.timeSheetPolicy, nextSnapshot.timeSheetPolicy)) {
|
|
728
713
|
values.push({
|
|
729
714
|
key: 'TimeSheetPolicy',
|
|
@@ -800,18 +785,18 @@ class SystemSettings {
|
|
|
800
785
|
},
|
|
801
786
|
});
|
|
802
787
|
}
|
|
803
|
-
hydrateForm(generalConfigurationSetting, holidaysSetting, timezoneSetting, currencySetting, weekendSetting,
|
|
788
|
+
hydrateForm(generalConfigurationSetting, holidaysSetting, timezoneSetting, currencySetting, weekendSetting, timeSheetPolicySetting, globalWorkingHoursSetting) {
|
|
804
789
|
const generalConfiguration = this.normalizeGeneralConfigurationSnapshot(this.extractGeneralConfigurationValue(generalConfigurationSetting));
|
|
805
790
|
const holidays = this.extractHolidaysValue(holidaysSetting);
|
|
806
791
|
const timezone = this.normalizeTimezoneSnapshot(this.extractTimezoneValue(timezoneSetting));
|
|
807
792
|
const currency = this.normalizeCurrencySnapshot(this.extractCurrencyValue(currencySetting));
|
|
808
793
|
const weekend = this.normalizeWeekendSnapshot(this.extractWeekendValue(weekendSetting));
|
|
809
|
-
const smtp = this.normalizeSmtpSnapshot(this.extractSmtpValue(smtpSetting));
|
|
810
794
|
const globalWorkingHours = this.normalizeGlobalWorkingHoursSnapshot(this.extractGlobalWorkingHoursValue(globalWorkingHoursSetting));
|
|
811
795
|
const timeSheetPolicy = this.normalizeTimeSheetPolicySnapshot(this.extractTimeSheetPolicyValue(timeSheetPolicySetting), globalWorkingHours.hoursPerDay);
|
|
812
796
|
this.holidayItems.set(holidays.data);
|
|
813
797
|
this.form.controls.generalConfiguration.setValue({
|
|
814
798
|
defaultExploreView: generalConfiguration.defaultExploreView,
|
|
799
|
+
showDesignSwitcher: generalConfiguration.showDesignSwitcher,
|
|
815
800
|
});
|
|
816
801
|
this.form.controls.timezone.setValue({
|
|
817
802
|
regionId: timezone.region?.id ?? null,
|
|
@@ -825,13 +810,6 @@ class SystemSettings {
|
|
|
825
810
|
this.form.controls.weekend.setValue({
|
|
826
811
|
days: weekend.days,
|
|
827
812
|
});
|
|
828
|
-
this.form.controls.smtp.setValue({
|
|
829
|
-
mail: smtp.mail,
|
|
830
|
-
name: smtp.name,
|
|
831
|
-
password: smtp.password,
|
|
832
|
-
host: smtp.host,
|
|
833
|
-
port: smtp.port === null ? '' : String(smtp.port),
|
|
834
|
-
});
|
|
835
813
|
this.form.controls.timeSheetPolicy.setValue({
|
|
836
814
|
frequency: timeSheetPolicy.frequency,
|
|
837
815
|
maxDailyHours: timeSheetPolicy.maxDailyHours,
|
|
@@ -855,7 +833,6 @@ class SystemSettings {
|
|
|
855
833
|
timezone,
|
|
856
834
|
currency,
|
|
857
835
|
weekend,
|
|
858
|
-
smtp,
|
|
859
836
|
timeSheetPolicy,
|
|
860
837
|
globalWorkingHours,
|
|
861
838
|
});
|
|
@@ -878,7 +855,6 @@ class SystemSettings {
|
|
|
878
855
|
timezone,
|
|
879
856
|
currency,
|
|
880
857
|
weekend: this.buildWeekendValue(),
|
|
881
|
-
smtp: this.buildSmtpValue(),
|
|
882
858
|
timeSheetPolicy: this.buildTimeSheetPolicyValue(),
|
|
883
859
|
globalWorkingHours: this.buildGlobalWorkingHoursValue(),
|
|
884
860
|
};
|
|
@@ -931,6 +907,8 @@ class SystemSettings {
|
|
|
931
907
|
return {
|
|
932
908
|
defaultExploreView: normalizeExploreDefaultView(this.form.controls.generalConfiguration.controls.defaultExploreView
|
|
933
909
|
.value),
|
|
910
|
+
showDesignSwitcher: this.form.controls.generalConfiguration.controls.showDesignSwitcher
|
|
911
|
+
.value === true,
|
|
934
912
|
};
|
|
935
913
|
}
|
|
936
914
|
buildWeekendValue() {
|
|
@@ -938,16 +916,6 @@ class SystemSettings {
|
|
|
938
916
|
days: normalizeWeekendDays(this.form.controls.weekend.controls.days.value),
|
|
939
917
|
};
|
|
940
918
|
}
|
|
941
|
-
buildSmtpValue() {
|
|
942
|
-
const smtpForm = this.form.controls.smtp.getRawValue();
|
|
943
|
-
return {
|
|
944
|
-
mail: smtpForm.mail.trim(),
|
|
945
|
-
name: smtpForm.name.trim(),
|
|
946
|
-
password: smtpForm.password,
|
|
947
|
-
host: smtpForm.host.trim(),
|
|
948
|
-
port: parsePort(smtpForm.port),
|
|
949
|
-
};
|
|
950
|
-
}
|
|
951
919
|
buildTimeSheetPolicyValue() {
|
|
952
920
|
const policyForm = this.form.controls.timeSheetPolicy.getRawValue();
|
|
953
921
|
const hoursPerDay = clampNumber(this.form.controls.globalWorkingHours.controls.hoursPerDay.value ?? 8, 0, 24);
|
|
@@ -981,6 +949,8 @@ class SystemSettings {
|
|
|
981
949
|
return {
|
|
982
950
|
defaultExploreView: normalizeExploreDefaultView(setting.value['defaultExploreView'] ??
|
|
983
951
|
setting.value['DefaultExploreView']),
|
|
952
|
+
showDesignSwitcher: normalizeShowDesignSwitcher(setting.value['showDesignSwitcher'] ??
|
|
953
|
+
setting.value['ShowDesignSwitcher']),
|
|
984
954
|
};
|
|
985
955
|
}
|
|
986
956
|
extractHolidaysValue(setting) {
|
|
@@ -1033,18 +1003,6 @@ class SystemSettings {
|
|
|
1033
1003
|
days: normalizeWeekendDays(setting.value['days'] ?? setting.value['Days']),
|
|
1034
1004
|
};
|
|
1035
1005
|
}
|
|
1036
|
-
extractSmtpValue(setting) {
|
|
1037
|
-
if (!isRecord(setting.value)) {
|
|
1038
|
-
return this.getDefaultSmtpValue();
|
|
1039
|
-
}
|
|
1040
|
-
return {
|
|
1041
|
-
mail: getNullableString(setting.value['mail'] ?? setting.value['Mail']) ?? '',
|
|
1042
|
-
name: getNullableString(setting.value['name'] ?? setting.value['Name']) ?? '',
|
|
1043
|
-
password: getNullableString(setting.value['password'] ?? setting.value['Password']) ?? '',
|
|
1044
|
-
host: getNullableString(setting.value['host'] ?? setting.value['Host']) ?? '',
|
|
1045
|
-
port: getNullableNumber(setting.value['port'] ?? setting.value['Port']),
|
|
1046
|
-
};
|
|
1047
|
-
}
|
|
1048
1006
|
extractTimeSheetPolicyValue(setting) {
|
|
1049
1007
|
if (!isRecord(setting.value)) {
|
|
1050
1008
|
return this.getDefaultTimeSheetPolicyValue();
|
|
@@ -1144,6 +1102,7 @@ class SystemSettings {
|
|
|
1144
1102
|
normalizeGeneralConfigurationSnapshot(value) {
|
|
1145
1103
|
return {
|
|
1146
1104
|
defaultExploreView: normalizeExploreDefaultView(value.defaultExploreView),
|
|
1105
|
+
showDesignSwitcher: normalizeShowDesignSwitcher(value.showDesignSwitcher),
|
|
1147
1106
|
};
|
|
1148
1107
|
}
|
|
1149
1108
|
normalizeTimezoneSnapshot(value) {
|
|
@@ -1170,15 +1129,6 @@ class SystemSettings {
|
|
|
1170
1129
|
days: normalizeWeekendDays(value.days),
|
|
1171
1130
|
};
|
|
1172
1131
|
}
|
|
1173
|
-
normalizeSmtpSnapshot(value) {
|
|
1174
|
-
return {
|
|
1175
|
-
mail: value.mail.trim(),
|
|
1176
|
-
name: value.name.trim(),
|
|
1177
|
-
password: value.password,
|
|
1178
|
-
host: value.host.trim(),
|
|
1179
|
-
port: value.port,
|
|
1180
|
-
};
|
|
1181
|
-
}
|
|
1182
1132
|
normalizeTimeSheetPolicySnapshot(value, hoursPerDay) {
|
|
1183
1133
|
return {
|
|
1184
1134
|
frequency: normalizeFrequency(value.frequency),
|
|
@@ -1226,13 +1176,6 @@ class SystemSettings {
|
|
|
1226
1176
|
};
|
|
1227
1177
|
case 'Weekend':
|
|
1228
1178
|
return { key, label: key, description: key, value: { days: [] } };
|
|
1229
|
-
case 'SMTP':
|
|
1230
|
-
return {
|
|
1231
|
-
key,
|
|
1232
|
-
label: key,
|
|
1233
|
-
description: key,
|
|
1234
|
-
value: this.getDefaultSmtpValue(),
|
|
1235
|
-
};
|
|
1236
1179
|
case 'TimeSheetPolicy':
|
|
1237
1180
|
return {
|
|
1238
1181
|
key,
|
|
@@ -1276,15 +1219,6 @@ class SystemSettings {
|
|
|
1276
1219
|
format: this.buildCurrencyFormatOptions(currency)[0]?.id ?? null,
|
|
1277
1220
|
};
|
|
1278
1221
|
}
|
|
1279
|
-
getDefaultSmtpValue() {
|
|
1280
|
-
return {
|
|
1281
|
-
mail: '',
|
|
1282
|
-
name: '',
|
|
1283
|
-
password: '',
|
|
1284
|
-
host: '',
|
|
1285
|
-
port: null,
|
|
1286
|
-
};
|
|
1287
|
-
}
|
|
1288
1222
|
getDefaultTimeSheetPolicyValue() {
|
|
1289
1223
|
return {
|
|
1290
1224
|
frequency: 'Weekly',
|
|
@@ -1418,7 +1352,7 @@ class SystemSettings {
|
|
|
1418
1352
|
return JSON.stringify(left) === JSON.stringify(right);
|
|
1419
1353
|
}
|
|
1420
1354
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettings, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
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 />\
|
|
1355
|
+
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'\">\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-holidays-section\r\n [holidays]=\"holidayTableRows()\"\r\n (addHoliday)=\"openAddHoliday()\"\r\n (editHoliday)=\"editHoliday($event)\"\r\n (deleteHoliday)=\"deleteHoliday($event)\"\r\n />\r\n\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 [weekendForm]=\"form.controls.weekend\"\r\n [exploreDefaultViewOptions]=\"exploreDefaultViewOptions()\"\r\n [dateFormatOptions]=\"dateFormatOptions()\"\r\n [timeFormatOptions]=\"timeFormatOptions()\"\r\n [currencyOptions]=\"currencyOptions()\"\r\n [currencyFormatOptions]=\"currencyFormatOptions()\"\r\n [weekendOptions]=\"weekendOptions()\"\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 [dayOptions]=\"dotnetDayOptions()\"\r\n [frequencyOptions]=\"frequencyOptions()\"\r\n [timezoneOptions]=\"timezoneOptions()\"\r\n [maxDailyBelowDaily]=\"form.errors?.['maxDailyBelowDaily'] ?? false\"\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", "weekendForm", "exploreDefaultViewOptions", "dateFormatOptions", "timeFormatOptions", "currencyOptions", "currencyFormatOptions", "weekendOptions"] }, { kind: "component", type: SystemSettingsTimeSheetSection, selector: "mt-system-settings-timesheet-section", inputs: ["policyForm", "globalWorkingHoursForm", "dayOptions", "frequencyOptions", "timezoneOptions", "maxDailyBelowDaily"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1422
1356
|
}
|
|
1423
1357
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettings, decorators: [{
|
|
1424
1358
|
type: Component,
|
|
@@ -1432,9 +1366,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
|
|
|
1432
1366
|
SkeletonModule,
|
|
1433
1367
|
SystemSettingsHolidaysSection,
|
|
1434
1368
|
SystemSettingsGeneralSection,
|
|
1435
|
-
SystemSettingsSmtpSection,
|
|
1436
1369
|
SystemSettingsTimeSheetSection,
|
|
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 />\
|
|
1370
|
+
], 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-holidays-section\r\n [holidays]=\"holidayTableRows()\"\r\n (addHoliday)=\"openAddHoliday()\"\r\n (editHoliday)=\"editHoliday($event)\"\r\n (deleteHoliday)=\"deleteHoliday($event)\"\r\n />\r\n\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 [weekendForm]=\"form.controls.weekend\"\r\n [exploreDefaultViewOptions]=\"exploreDefaultViewOptions()\"\r\n [dateFormatOptions]=\"dateFormatOptions()\"\r\n [timeFormatOptions]=\"timeFormatOptions()\"\r\n [currencyOptions]=\"currencyOptions()\"\r\n [currencyFormatOptions]=\"currencyFormatOptions()\"\r\n [weekendOptions]=\"weekendOptions()\"\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 [dayOptions]=\"dotnetDayOptions()\"\r\n [frequencyOptions]=\"frequencyOptions()\"\r\n [timezoneOptions]=\"timezoneOptions()\"\r\n [maxDailyBelowDaily]=\"form.errors?.['maxDailyBelowDaily'] ?? false\"\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"] }]
|
|
1438
1371
|
}], 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 }] }] } });
|
|
1439
1372
|
function isRecord(value) {
|
|
1440
1373
|
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
@@ -1496,13 +1429,12 @@ function getNumberArray(value) {
|
|
|
1496
1429
|
.map((item) => (typeof item === 'number' ? item : Number(item)))
|
|
1497
1430
|
.filter((item) => Number.isInteger(item));
|
|
1498
1431
|
}
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
return Number.isNaN(parsedValue) ? null : parsedValue;
|
|
1432
|
+
/**
|
|
1433
|
+
* The design switcher is opt-in, so anything that is not an explicit `true`
|
|
1434
|
+
* (or the string a settings record may round-trip it as) reads as hidden.
|
|
1435
|
+
*/
|
|
1436
|
+
function normalizeShowDesignSwitcher(value) {
|
|
1437
|
+
return value === true || value === 'true' || value === 'True';
|
|
1506
1438
|
}
|
|
1507
1439
|
function normalizeExploreDefaultView(value) {
|
|
1508
1440
|
return EXPLORE_DEFAULT_VIEW_OPTIONS.some((option) => option.id === value)
|
|
@@ -1595,9 +1527,52 @@ function formatDateOnly(value) {
|
|
|
1595
1527
|
return `${year}-${month}-${day}`;
|
|
1596
1528
|
}
|
|
1597
1529
|
|
|
1530
|
+
const EMAIL_DELIVERY_PERMISSIONS = {
|
|
1531
|
+
controlPanel: 'CONTROL_PANEL',
|
|
1532
|
+
};
|
|
1533
|
+
const EMAIL_DELIVERY_ATTEMPT_STATUSES = [
|
|
1534
|
+
'Reserved',
|
|
1535
|
+
'ProviderInvocationStarted',
|
|
1536
|
+
'ProviderInvocationDefinitivelyNotAccepted',
|
|
1537
|
+
'ProviderResultReconciliation',
|
|
1538
|
+
'ProviderResultPending',
|
|
1539
|
+
'Blocked',
|
|
1540
|
+
'RetryScheduled',
|
|
1541
|
+
'Accepted',
|
|
1542
|
+
'OutcomeUnknown',
|
|
1543
|
+
'FailedPermanent',
|
|
1544
|
+
'DeadLettered',
|
|
1545
|
+
];
|
|
1546
|
+
|
|
1547
|
+
const DEFAULT_EMAIL_DELIVERY_OPTIONS = {
|
|
1548
|
+
apiBasePath: 'control-panel/email-delivery',
|
|
1549
|
+
notificationApiBasePath: 'Notifications',
|
|
1550
|
+
permissionKeys: [EMAIL_DELIVERY_PERMISSIONS.controlPanel],
|
|
1551
|
+
};
|
|
1552
|
+
const EMAIL_DELIVERY_OPTIONS = new InjectionToken('EMAIL_DELIVERY_OPTIONS', {
|
|
1553
|
+
providedIn: 'root',
|
|
1554
|
+
factory: () => DEFAULT_EMAIL_DELIVERY_OPTIONS,
|
|
1555
|
+
});
|
|
1556
|
+
function provideEmailDelivery(options = {}) {
|
|
1557
|
+
return makeEnvironmentProviders([
|
|
1558
|
+
{
|
|
1559
|
+
provide: EMAIL_DELIVERY_OPTIONS,
|
|
1560
|
+
useValue: { ...DEFAULT_EMAIL_DELIVERY_OPTIONS, ...options },
|
|
1561
|
+
},
|
|
1562
|
+
]);
|
|
1563
|
+
}
|
|
1564
|
+
|
|
1565
|
+
const EMAIL_DELIVERY_ROUTES = [
|
|
1566
|
+
{
|
|
1567
|
+
path: '',
|
|
1568
|
+
loadComponent: () => import('./masterteam-system-settings-email-delivery-shell-DowMjl4L.mjs').then((module) => module.EmailDeliveryShell),
|
|
1569
|
+
},
|
|
1570
|
+
{ path: '**', redirectTo: '' },
|
|
1571
|
+
];
|
|
1572
|
+
|
|
1598
1573
|
/**
|
|
1599
1574
|
* Generated bundle index. Do not edit.
|
|
1600
1575
|
*/
|
|
1601
1576
|
|
|
1602
|
-
export { DEFAULT_DATE_FORMAT_OPTIONS, DEFAULT_GENERAL_CONFIGURATION, DEFAULT_TIME_FORMAT_OPTIONS, DOTNET_DAY_DEFINITIONS, EXPLORE_DEFAULT_VIEW_OPTIONS, FIXED_CURRENCIES, GENERAL_CONFIGURATION_SETTING_KEY, RATE_SOURCE_OPTIONS, SCHEDULE_ITEM_TYPE_OPTIONS, SystemSettings, SystemSettingsHolidayEditor, TIMESHEET_FREQUENCY_OPTIONS, WEEKEND_DAY_DEFINITIONS };
|
|
1577
|
+
export { DEFAULT_DATE_FORMAT_OPTIONS, DEFAULT_EMAIL_DELIVERY_OPTIONS, DEFAULT_GENERAL_CONFIGURATION, DEFAULT_TIME_FORMAT_OPTIONS, DOTNET_DAY_DEFINITIONS, EMAIL_DELIVERY_ATTEMPT_STATUSES, EMAIL_DELIVERY_OPTIONS, EMAIL_DELIVERY_PERMISSIONS, EMAIL_DELIVERY_ROUTES, EXPLORE_DEFAULT_VIEW_OPTIONS, FIXED_CURRENCIES, GENERAL_CONFIGURATION_SETTING_KEY, RATE_SOURCE_OPTIONS, SCHEDULE_ITEM_TYPE_OPTIONS, SystemSettings, SystemSettingsHolidayEditor, TIMESHEET_FREQUENCY_OPTIONS, WEEKEND_DAY_DEFINITIONS, provideEmailDelivery };
|
|
1603
1578
|
//# sourceMappingURL=masterteam-system-settings.mjs.map
|