@masterteam/system-settings 0.0.24 → 0.0.26

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.
@@ -207,6 +207,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
207
207
  class SystemSettingsTimeSheetSection {
208
208
  policyForm = input.required(...(ngDevMode ? [{ debugName: "policyForm" }] : /* istanbul ignore next */ []));
209
209
  globalWorkingHoursForm = input.required(...(ngDevMode ? [{ debugName: "globalWorkingHoursForm" }] : /* istanbul ignore next */ []));
210
+ /** Organization timezone choices (`GET settings/timezones`). */
211
+ timeZoneOptions = input([], ...(ngDevMode ? [{ debugName: "timeZoneOptions" }] : /* istanbul ignore next */ []));
210
212
  dayOptions = input([], ...(ngDevMode ? [{ debugName: "dayOptions" }] : /* istanbul ignore next */ []));
211
213
  frequencyOptions = input([], ...(ngDevMode ? [{ debugName: "frequencyOptions" }] : /* istanbul ignore next */ []));
212
214
  maxDailyBelowDaily = input(false, ...(ngDevMode ? [{ debugName: "maxDailyBelowDaily" }] : /* istanbul ignore next */ []));
@@ -218,7 +220,7 @@ class SystemSettingsTimeSheetSection {
218
220
  */
219
221
  hidePolicy = input(false, ...(ngDevMode ? [{ debugName: "hidePolicy" }] : /* istanbul ignore next */ []));
220
222
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsTimeSheetSection, deps: [], target: i0.ɵɵFactoryTarget.Component });
221
- 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 }, 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 <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 });
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 });
222
224
  }
223
225
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettingsTimeSheetSection, decorators: [{
224
226
  type: Component,
@@ -230,8 +232,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
230
232
  NumberField,
231
233
  SelectField,
232
234
  ToggleField,
233
- ], 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 <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" }]
234
- }], 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 }] }], maxDailyBelowDaily: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxDailyBelowDaily", required: false }] }], hidePolicy: [{ type: i0.Input, args: [{ isSignal: true, alias: "hidePolicy", required: false }] }] } });
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" }]
236
+ }], 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 }] }] } });
235
237
 
236
238
  /** The settings record General Configuration fields live in. */
237
239
  const GENERAL_CONFIGURATION_SETTING_KEY = 'Identity';
@@ -457,6 +459,13 @@ class SystemSettings {
457
459
  },
458
460
  ];
459
461
  }, ...(ngDevMode ? [{ debugName: "breadcrumbItems" }] : /* istanbul ignore next */ []));
462
+ /**
463
+ * The saved GlobalWorkingHours object, so a save keeps the fields this
464
+ * screen does not edit (start/end minutes, anything newer). Null while the
465
+ * organization calendar is not configured. Declared before `form`: the
466
+ * Working Hours validator reads it as soon as the form is built.
467
+ */
468
+ savedGlobalWorkingHours = signal(null, ...(ngDevMode ? [{ debugName: "savedGlobalWorkingHours" }] : /* istanbul ignore next */ []));
460
469
  form = new FormGroup({
461
470
  generalConfiguration: new FormGroup({
462
471
  defaultExploreView: new FormControl('cards', {
@@ -489,14 +498,14 @@ class SystemSettings {
489
498
  submissionDeadlineDays: new FormControl(3, TIME_SHEET_SUBMISSION_DEADLINE_VALIDATORS),
490
499
  }),
491
500
  globalWorkingHours: new FormGroup({
492
- timeZoneId: new FormControl(null, GLOBAL_WORKING_HOURS_TIMEZONE_VALIDATORS),
501
+ timeZoneId: new FormControl(null),
493
502
  workingDays: new FormControl([0, 1, 2, 3, 4], {
494
503
  nonNullable: true,
495
504
  validators: GLOBAL_WORKING_HOURS_WORKING_DAYS_VALIDATORS,
496
505
  }),
497
506
  hoursPerDay: new FormControl(8, this.buildHoursPerDayValidators()),
498
507
  holidaysCsv: new FormControl('', { nonNullable: true }),
499
- }),
508
+ }, { validators: (group) => this.organizationTimeZoneRequired(group) }),
500
509
  }, maxDailyHoursGteHoursPerDay(() => this.hideTimeSheet()));
501
510
  settings = signal(null, ...(ngDevMode ? [{ debugName: "settings" }] : /* istanbul ignore next */ []));
502
511
  settingsLoading = signal(false, ...(ngDevMode ? [{ debugName: "settingsLoading" }] : /* istanbul ignore next */ []));
@@ -599,6 +608,25 @@ class SystemSettings {
599
608
  name: this.transloco.translate(`system-settings.${item.translationKey}`),
600
609
  }));
601
610
  }, ...(ngDevMode ? [{ debugName: "frequencyOptions" }] : /* istanbul ignore next */ []));
611
+ /**
612
+ * Organization timezone choices: the catalog name and its stable id. A saved
613
+ * id the catalog no longer lists stays visible so it can be corrected.
614
+ */
615
+ organizationTimeZoneOptions = computed(() => {
616
+ this.activeLang();
617
+ const saved = this.formValue()?.globalWorkingHours?.timeZoneId ?? null;
618
+ const options = this.timezones().map((zone) => ({
619
+ id: zone.id,
620
+ name: `${zone.displayName} · ${zone.id}`,
621
+ }));
622
+ if (saved && !options.some((option) => option.id === saved)) {
623
+ options.push({
624
+ id: saved,
625
+ name: this.transloco.translate('system-settings.organization-timezone-unavailable', { id: saved }),
626
+ });
627
+ }
628
+ return options;
629
+ }, ...(ngDevMode ? [{ debugName: "organizationTimeZoneOptions" }] : /* istanbul ignore next */ []));
602
630
  isReady = computed(() => this.hydrationVersion() !== null && this.initialSnapshot() !== null, ...(ngDevMode ? [{ debugName: "isReady" }] : /* istanbul ignore next */ []));
603
631
  isLoading = computed(() => this.settingsLoading() || this.timezonesLoading() || !this.isReady(), ...(ngDevMode ? [{ debugName: "isLoading" }] : /* istanbul ignore next */ []));
604
632
  hasChanges = computed(() => {
@@ -871,7 +899,13 @@ class SystemSettings {
871
899
  const timezone = this.normalizeTimezoneSnapshot(this.extractTimezoneValue(timezoneSetting));
872
900
  const currency = this.normalizeCurrencySnapshot(this.extractCurrencyValue(currencySetting));
873
901
  const weekend = this.normalizeWeekendSnapshot(this.extractWeekendValue(weekendSetting));
874
- const globalWorkingHours = this.normalizeGlobalWorkingHoursSnapshot(this.extractGlobalWorkingHoursValue(globalWorkingHoursSetting));
902
+ // The server's value, not the placeholder used when the key is missing:
903
+ // null or {} means the organization calendar is not configured yet.
904
+ const savedCalendar = this.globalWorkingHoursSetting()?.value;
905
+ this.savedGlobalWorkingHours.set(isRecord(savedCalendar) && Object.keys(savedCalendar).length > 0
906
+ ? savedCalendar
907
+ : null);
908
+ const globalWorkingHours = this.withSavedCalendarFields(this.normalizeGlobalWorkingHoursSnapshot(this.extractGlobalWorkingHoursValue(globalWorkingHoursSetting)));
875
909
  const timeSheetPolicy = this.normalizeTimeSheetPolicySnapshot(this.extractTimeSheetPolicyValue(timeSheetPolicySetting), globalWorkingHours.hoursPerDay);
876
910
  this.holidayItems.set(holidays.data);
877
911
  this.form.controls.generalConfiguration.setValue({
@@ -1011,12 +1045,36 @@ class SystemSettings {
1011
1045
  }
1012
1046
  buildGlobalWorkingHoursValue() {
1013
1047
  const globalForm = this.form.controls.globalWorkingHours.getRawValue();
1014
- return {
1015
- timeZoneId: globalForm.timeZoneId ?? 'UTC',
1048
+ return this.withSavedCalendarFields({
1049
+ timeZoneId: globalForm.timeZoneId,
1016
1050
  workingDays: normalizeDotnetDays(globalForm.workingDays),
1017
1051
  hoursPerDay: clampNumber(globalForm.hoursPerDay ?? 8, 0, 24),
1018
1052
  holidays: parseCsv(globalForm.holidaysCsv),
1019
- };
1053
+ });
1054
+ }
1055
+ /**
1056
+ * The saved calendar with this screen's fields applied, so the full object
1057
+ * is sent back (the key is replaced as a whole). When the duration changes
1058
+ * the saved start/end go: the server re-derives them from the saved start.
1059
+ */
1060
+ withSavedCalendarFields(value) {
1061
+ const saved = this.savedGlobalWorkingHours() ?? {};
1062
+ const merged = { ...saved, ...value };
1063
+ if (saved['hoursPerDay'] !== value.hoursPerDay) {
1064
+ delete merged.workDayStartMinute;
1065
+ delete merged.workDayEndMinute;
1066
+ }
1067
+ return merged;
1068
+ }
1069
+ /**
1070
+ * A calendar that is configured, or being set up now, needs its zone. One
1071
+ * that is not configured and left alone does not block saving other settings.
1072
+ */
1073
+ organizationTimeZoneRequired(group) {
1074
+ const configured = this.savedGlobalWorkingHours() !== null;
1075
+ return (configured || group.dirty) && !group.get('timeZoneId')?.value
1076
+ ? { timeZoneRequired: true }
1077
+ : null;
1020
1078
  }
1021
1079
  /**
1022
1080
  * Built via a method (not a module-level constant like the other
@@ -1124,8 +1182,8 @@ class SystemSettings {
1124
1182
  const value = setting.value;
1125
1183
  const defaults = this.getDefaultGlobalWorkingHoursValue();
1126
1184
  return {
1127
- timeZoneId: getString(value['timeZoneId'] ?? value['TimeZoneId']) ??
1128
- defaults.timeZoneId,
1185
+ // No fallback zone: a missing one is chosen by the administrator.
1186
+ timeZoneId: getString(value['timeZoneId'] ?? value['TimeZoneId']),
1129
1187
  workingDays: getNumberArray(value['workingDays'] ?? value['WorkingDays']) ??
1130
1188
  defaults.workingDays,
1131
1189
  hoursPerDay: getNumber(value['hoursPerDay'] ?? value['HoursPerDay']) ??
@@ -1250,9 +1308,8 @@ class SystemSettings {
1250
1308
  };
1251
1309
  }
1252
1310
  normalizeGlobalWorkingHoursSnapshot(value) {
1253
- const defaults = this.getDefaultGlobalWorkingHoursValue();
1254
1311
  return {
1255
- timeZoneId: value.timeZoneId || defaults.timeZoneId,
1312
+ timeZoneId: value.timeZoneId || null,
1256
1313
  workingDays: normalizeDotnetDays(value.workingDays),
1257
1314
  hoursPerDay: clampNumber(value.hoursPerDay, 0, 24),
1258
1315
  holidays: value.holidays,
@@ -1341,7 +1398,8 @@ class SystemSettings {
1341
1398
  }
1342
1399
  getDefaultGlobalWorkingHoursValue() {
1343
1400
  return {
1344
- timeZoneId: this.timezones()[0]?.id ?? 'UTC',
1401
+ // Never a guessed zone (the first catalog entry used to be saved here).
1402
+ timeZoneId: null,
1345
1403
  workingDays: [0, 1, 2, 3, 4],
1346
1404
  hoursPerDay: 8,
1347
1405
  holidays: [],
@@ -1473,7 +1531,7 @@ class SystemSettings {
1473
1531
  return JSON.stringify(left) === JSON.stringify(right);
1474
1532
  }
1475
1533
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettings, deps: [], target: i0.ɵɵFactoryTarget.Component });
1476
- 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 [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", "dayOptions", "frequencyOptions", "maxDailyBelowDaily", "hidePolicy"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
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 });
1477
1535
  }
1478
1536
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: SystemSettings, decorators: [{
1479
1537
  type: Component,
@@ -1488,7 +1546,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
1488
1546
  SystemSettingsHolidaysSection,
1489
1547
  SystemSettingsGeneralSection,
1490
1548
  SystemSettingsTimeSheetSection,
1491
- ], 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 [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"] }]
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"] }]
1492
1550
  }], 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 }] }] } });
1493
1551
  function isRecord(value) {
1494
1552
  return typeof value === 'object' && value !== null && !Array.isArray(value);
@@ -1636,7 +1694,6 @@ const TIME_SHEET_SUBMISSION_DEADLINE_VALIDATORS = [
1636
1694
  Validators.min(0),
1637
1695
  Validators.max(90),
1638
1696
  ];
1639
- const GLOBAL_WORKING_HOURS_TIMEZONE_VALIDATORS = [Validators.required];
1640
1697
  const GLOBAL_WORKING_HOURS_WORKING_DAYS_VALIDATORS = [Validators.required];
1641
1698
  /**
1642
1699
  * `hoursPerDay` ("Daily Working Hours") needs an *exclusive* lower bound -
@@ -2127,9 +2184,12 @@ class EmailDeliveryHttpApi extends EmailDeliveryApi {
2127
2184
  return this.sendUserTest(this.notificationUrl(`alerts/${alertId}/test`), request);
2128
2185
  }
2129
2186
  sendUserTest(url, request) {
2187
+ // The dialog shows the outcome and any error itself; without `noMessage`
2188
+ // the host interceptor adds "Created successfully" or a second error.
2130
2189
  return this.http
2131
2190
  .post(url, request, {
2132
2191
  observe: 'response',
2192
+ headers: { noMessage: 'true' },
2133
2193
  })
2134
2194
  .pipe(mergeMap((response) => {
2135
2195
  if (response.body?.data)
@@ -3333,7 +3393,7 @@ const EMAIL_DELIVERY_ROUTES = [
3333
3393
  {
3334
3394
  path: '',
3335
3395
  canDeactivate: [emailDesignLeaveGuard],
3336
- loadComponent: () => import('./masterteam-system-settings-email-delivery-shell-DhJ_GMml.mjs').then((module) => module.EmailDeliveryShell),
3396
+ loadComponent: () => import('./masterteam-system-settings-email-delivery-shell-Dv-S6XUS.mjs').then((module) => module.EmailDeliveryShell),
3337
3397
  },
3338
3398
  { path: '**', redirectTo: '' },
3339
3399
  ];
@@ -3494,7 +3554,7 @@ class EmailContentStylesEditor {
3494
3554
  return this.transloco.translate(`email-delivery.design.styles.${key}`);
3495
3555
  }
3496
3556
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EmailContentStylesEditor, deps: [], target: i0.ɵɵFactoryTarget.Component });
3497
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EmailContentStylesEditor, isStandalone: true, selector: "mt-email-content-styles", inputs: { styles: { classPropertyName: "styles", publicName: "styles", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { stylesChange: "stylesChange" }, host: { classAttribute: "block min-w-0" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'email-delivery.design.styles'\">\n <div class=\"flex min-w-0 flex-col gap-4\">\n <p class=\"text-xs text-muted-color\">{{ t(\"hint\") }}</p>\n\n @for (section of sections; track section.key) {\n <ng-container\n [ngTemplateOutlet]=\"sectionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: section }\"\n />\n }\n\n <div>\n <mt-button\n [icon]=\"showAdvanced() ? 'arrow.chevron-up' : 'arrow.chevron-down'\"\n [label]=\"t(showAdvanced() ? 'hide-advanced' : 'show-advanced')\"\n severity=\"secondary\"\n variant=\"text\"\n size=\"small\"\n (onClick)=\"showAdvanced.set(!showAdvanced())\"\n />\n </div>\n <!-- Hidden advanced values are kept: the styles object passes through. -->\n @if (showAdvanced()) {\n @for (section of advancedSections; track section.key) {\n <ng-container\n [ngTemplateOutlet]=\"sectionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: section }\"\n />\n }\n }\n </div>\n\n <ng-template #sectionTemplate let-section>\n <section\n class=\"flex min-w-0 flex-col gap-3 rounded-md border border-surface p-3\"\n >\n <h4 class=\"text-sm font-semibold\">{{ sectionLabel(section) }}</h4>\n @for (row of rows(section); track $index) {\n <div class=\"flex min-w-0 flex-col gap-2\">\n @if (groupLabel(row[0]) && rows(section).length > 1) {\n <span class=\"text-xs font-medium text-muted-color\">{{\n groupLabel(row[0])\n }}</span>\n }\n <div class=\"grid min-w-0 grid-cols-1 gap-3 sm:grid-cols-2\">\n @for (item of row; track item.id) {\n @switch (item.kind) {\n @case (\"font\") {\n <mt-select-field\n [formControl]=\"control(item.id)\"\n [options]=\"fontOptions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [showClear]=\"true\"\n [label]=\"label(item)\"\n [placeholder]=\"t('inherit')\"\n [hasPlaceholderPrefix]=\"false\"\n />\n }\n @case (\"weight\") {\n <mt-select-field\n [formControl]=\"control(item.id)\"\n [options]=\"weightOptions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [showClear]=\"true\"\n [label]=\"label(item)\"\n [placeholder]=\"t('inherit')\"\n [hasPlaceholderPrefix]=\"false\"\n />\n }\n @case (\"underline\") {\n <mt-select-field\n [formControl]=\"control(item.id)\"\n [options]=\"underlineOptions()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [showClear]=\"true\"\n [label]=\"label(item)\"\n [placeholder]=\"t('inherit')\"\n [hasPlaceholderPrefix]=\"false\"\n />\n }\n @case (\"color\") {\n <mt-color-picker-field\n [formControl]=\"control(item.id)\"\n [label]=\"label(item)\"\n [placeholder]=\"t('inherit')\"\n />\n }\n @default {\n <mt-number-field\n [formControl]=\"control(item.id)\"\n [label]=\"label(item)\"\n [placeholder]=\"t('inherit')\"\n [min]=\"range(item).min\"\n [max]=\"range(item).max\"\n [maxFractionDigits]=\"range(item).fractionDigits\"\n />\n }\n }\n }\n </div>\n </div>\n }\n </section>\n </ng-template>\n</ng-container>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { 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: ColorPickerField, selector: "mt-color-picker-field", inputs: ["label", "appendTo", "placeholder", "class", "variant", "readonly", "pInputs", "required"], 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3557
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: EmailContentStylesEditor, isStandalone: true, selector: "mt-email-content-styles", inputs: { styles: { classPropertyName: "styles", publicName: "styles", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { stylesChange: "stylesChange" }, host: { classAttribute: "block min-w-0" }, ngImport: i0, template: "<ng-container *transloco=\"let t; prefix: 'email-delivery.design.styles'\">\r\n <div class=\"flex min-w-0 flex-col gap-4\">\r\n <p class=\"text-xs text-muted-color\">{{ t(\"hint\") }}</p>\r\n\r\n @for (section of sections; track section.key) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"sectionTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: section }\"\r\n />\r\n }\r\n\r\n <div>\r\n <mt-button\r\n [icon]=\"showAdvanced() ? 'arrow.chevron-up' : 'arrow.chevron-down'\"\r\n [label]=\"t(showAdvanced() ? 'hide-advanced' : 'show-advanced')\"\r\n severity=\"secondary\"\r\n variant=\"text\"\r\n size=\"small\"\r\n (onClick)=\"showAdvanced.set(!showAdvanced())\"\r\n />\r\n </div>\r\n <!-- Hidden advanced values are kept: the styles object passes through. -->\r\n @if (showAdvanced()) {\r\n @for (section of advancedSections; track section.key) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"sectionTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: section }\"\r\n />\r\n }\r\n }\r\n </div>\r\n\r\n <ng-template #sectionTemplate let-section>\r\n <section\r\n class=\"flex min-w-0 flex-col gap-3 rounded-md border border-surface p-3\"\r\n >\r\n <h4 class=\"text-sm font-semibold\">{{ sectionLabel(section) }}</h4>\r\n @for (row of rows(section); track $index) {\r\n <div class=\"flex min-w-0 flex-col gap-2\">\r\n @if (groupLabel(row[0]) && rows(section).length > 1) {\r\n <span class=\"text-xs font-medium text-muted-color\">{{\r\n groupLabel(row[0])\r\n }}</span>\r\n }\r\n <div class=\"grid min-w-0 grid-cols-1 gap-3 sm:grid-cols-2\">\r\n @for (item of row; track item.id) {\r\n @switch (item.kind) {\r\n @case (\"font\") {\r\n <mt-select-field\r\n [formControl]=\"control(item.id)\"\r\n [options]=\"fontOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [showClear]=\"true\"\r\n [label]=\"label(item)\"\r\n [placeholder]=\"t('inherit')\"\r\n [hasPlaceholderPrefix]=\"false\"\r\n />\r\n }\r\n @case (\"weight\") {\r\n <mt-select-field\r\n [formControl]=\"control(item.id)\"\r\n [options]=\"weightOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [showClear]=\"true\"\r\n [label]=\"label(item)\"\r\n [placeholder]=\"t('inherit')\"\r\n [hasPlaceholderPrefix]=\"false\"\r\n />\r\n }\r\n @case (\"underline\") {\r\n <mt-select-field\r\n [formControl]=\"control(item.id)\"\r\n [options]=\"underlineOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [showClear]=\"true\"\r\n [label]=\"label(item)\"\r\n [placeholder]=\"t('inherit')\"\r\n [hasPlaceholderPrefix]=\"false\"\r\n />\r\n }\r\n @case (\"color\") {\r\n <mt-color-picker-field\r\n [formControl]=\"control(item.id)\"\r\n [label]=\"label(item)\"\r\n [placeholder]=\"t('inherit')\"\r\n />\r\n }\r\n @default {\r\n <mt-number-field\r\n [formControl]=\"control(item.id)\"\r\n [label]=\"label(item)\"\r\n [placeholder]=\"t('inherit')\"\r\n [min]=\"range(item).min\"\r\n [max]=\"range(item).max\"\r\n [maxFractionDigits]=\"range(item).fractionDigits\"\r\n />\r\n }\r\n }\r\n }\r\n </div>\r\n </div>\r\n }\r\n </section>\r\n </ng-template>\r\n</ng-container>\r\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { 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: ColorPickerField, selector: "mt-color-picker-field", inputs: ["label", "appendTo", "placeholder", "class", "variant", "readonly", "pInputs", "required"], 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3498
3558
  }
3499
3559
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: EmailContentStylesEditor, decorators: [{
3500
3560
  type: Component,
@@ -3506,7 +3566,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImpor
3506
3566
  ColorPickerField,
3507
3567
  NumberField,
3508
3568
  SelectField,
3509
- ], host: { class: 'block min-w-0' }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'email-delivery.design.styles'\">\n <div class=\"flex min-w-0 flex-col gap-4\">\n <p class=\"text-xs text-muted-color\">{{ t(\"hint\") }}</p>\n\n @for (section of sections; track section.key) {\n <ng-container\n [ngTemplateOutlet]=\"sectionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: section }\"\n />\n }\n\n <div>\n <mt-button\n [icon]=\"showAdvanced() ? 'arrow.chevron-up' : 'arrow.chevron-down'\"\n [label]=\"t(showAdvanced() ? 'hide-advanced' : 'show-advanced')\"\n severity=\"secondary\"\n variant=\"text\"\n size=\"small\"\n (onClick)=\"showAdvanced.set(!showAdvanced())\"\n />\n </div>\n <!-- Hidden advanced values are kept: the styles object passes through. -->\n @if (showAdvanced()) {\n @for (section of advancedSections; track section.key) {\n <ng-container\n [ngTemplateOutlet]=\"sectionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: section }\"\n />\n }\n }\n </div>\n\n <ng-template #sectionTemplate let-section>\n <section\n class=\"flex min-w-0 flex-col gap-3 rounded-md border border-surface p-3\"\n >\n <h4 class=\"text-sm font-semibold\">{{ sectionLabel(section) }}</h4>\n @for (row of rows(section); track $index) {\n <div class=\"flex min-w-0 flex-col gap-2\">\n @if (groupLabel(row[0]) && rows(section).length > 1) {\n <span class=\"text-xs font-medium text-muted-color\">{{\n groupLabel(row[0])\n }}</span>\n }\n <div class=\"grid min-w-0 grid-cols-1 gap-3 sm:grid-cols-2\">\n @for (item of row; track item.id) {\n @switch (item.kind) {\n @case (\"font\") {\n <mt-select-field\n [formControl]=\"control(item.id)\"\n [options]=\"fontOptions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [showClear]=\"true\"\n [label]=\"label(item)\"\n [placeholder]=\"t('inherit')\"\n [hasPlaceholderPrefix]=\"false\"\n />\n }\n @case (\"weight\") {\n <mt-select-field\n [formControl]=\"control(item.id)\"\n [options]=\"weightOptions\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [showClear]=\"true\"\n [label]=\"label(item)\"\n [placeholder]=\"t('inherit')\"\n [hasPlaceholderPrefix]=\"false\"\n />\n }\n @case (\"underline\") {\n <mt-select-field\n [formControl]=\"control(item.id)\"\n [options]=\"underlineOptions()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [showClear]=\"true\"\n [label]=\"label(item)\"\n [placeholder]=\"t('inherit')\"\n [hasPlaceholderPrefix]=\"false\"\n />\n }\n @case (\"color\") {\n <mt-color-picker-field\n [formControl]=\"control(item.id)\"\n [label]=\"label(item)\"\n [placeholder]=\"t('inherit')\"\n />\n }\n @default {\n <mt-number-field\n [formControl]=\"control(item.id)\"\n [label]=\"label(item)\"\n [placeholder]=\"t('inherit')\"\n [min]=\"range(item).min\"\n [max]=\"range(item).max\"\n [maxFractionDigits]=\"range(item).fractionDigits\"\n />\n }\n }\n }\n </div>\n </div>\n }\n </section>\n </ng-template>\n</ng-container>\n" }]
3569
+ ], host: { class: 'block min-w-0' }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *transloco=\"let t; prefix: 'email-delivery.design.styles'\">\r\n <div class=\"flex min-w-0 flex-col gap-4\">\r\n <p class=\"text-xs text-muted-color\">{{ t(\"hint\") }}</p>\r\n\r\n @for (section of sections; track section.key) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"sectionTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: section }\"\r\n />\r\n }\r\n\r\n <div>\r\n <mt-button\r\n [icon]=\"showAdvanced() ? 'arrow.chevron-up' : 'arrow.chevron-down'\"\r\n [label]=\"t(showAdvanced() ? 'hide-advanced' : 'show-advanced')\"\r\n severity=\"secondary\"\r\n variant=\"text\"\r\n size=\"small\"\r\n (onClick)=\"showAdvanced.set(!showAdvanced())\"\r\n />\r\n </div>\r\n <!-- Hidden advanced values are kept: the styles object passes through. -->\r\n @if (showAdvanced()) {\r\n @for (section of advancedSections; track section.key) {\r\n <ng-container\r\n [ngTemplateOutlet]=\"sectionTemplate\"\r\n [ngTemplateOutletContext]=\"{ $implicit: section }\"\r\n />\r\n }\r\n }\r\n </div>\r\n\r\n <ng-template #sectionTemplate let-section>\r\n <section\r\n class=\"flex min-w-0 flex-col gap-3 rounded-md border border-surface p-3\"\r\n >\r\n <h4 class=\"text-sm font-semibold\">{{ sectionLabel(section) }}</h4>\r\n @for (row of rows(section); track $index) {\r\n <div class=\"flex min-w-0 flex-col gap-2\">\r\n @if (groupLabel(row[0]) && rows(section).length > 1) {\r\n <span class=\"text-xs font-medium text-muted-color\">{{\r\n groupLabel(row[0])\r\n }}</span>\r\n }\r\n <div class=\"grid min-w-0 grid-cols-1 gap-3 sm:grid-cols-2\">\r\n @for (item of row; track item.id) {\r\n @switch (item.kind) {\r\n @case (\"font\") {\r\n <mt-select-field\r\n [formControl]=\"control(item.id)\"\r\n [options]=\"fontOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [showClear]=\"true\"\r\n [label]=\"label(item)\"\r\n [placeholder]=\"t('inherit')\"\r\n [hasPlaceholderPrefix]=\"false\"\r\n />\r\n }\r\n @case (\"weight\") {\r\n <mt-select-field\r\n [formControl]=\"control(item.id)\"\r\n [options]=\"weightOptions\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [showClear]=\"true\"\r\n [label]=\"label(item)\"\r\n [placeholder]=\"t('inherit')\"\r\n [hasPlaceholderPrefix]=\"false\"\r\n />\r\n }\r\n @case (\"underline\") {\r\n <mt-select-field\r\n [formControl]=\"control(item.id)\"\r\n [options]=\"underlineOptions()\"\r\n optionLabel=\"label\"\r\n optionValue=\"value\"\r\n [showClear]=\"true\"\r\n [label]=\"label(item)\"\r\n [placeholder]=\"t('inherit')\"\r\n [hasPlaceholderPrefix]=\"false\"\r\n />\r\n }\r\n @case (\"color\") {\r\n <mt-color-picker-field\r\n [formControl]=\"control(item.id)\"\r\n [label]=\"label(item)\"\r\n [placeholder]=\"t('inherit')\"\r\n />\r\n }\r\n @default {\r\n <mt-number-field\r\n [formControl]=\"control(item.id)\"\r\n [label]=\"label(item)\"\r\n [placeholder]=\"t('inherit')\"\r\n [min]=\"range(item).min\"\r\n [max]=\"range(item).max\"\r\n [maxFractionDigits]=\"range(item).fractionDigits\"\r\n />\r\n }\r\n }\r\n }\r\n </div>\r\n </div>\r\n }\r\n </section>\r\n </ng-template>\r\n</ng-container>\r\n" }]
3510
3570
  }], ctorParameters: () => [], propDecorators: { styles: [{ type: i0.Input, args: [{ isSignal: true, alias: "styles", required: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], stylesChange: [{ type: i0.Output, args: ["stylesChange"] }] } });
3511
3571
  function sameValue(current, next, definition) {
3512
3572
  if (definition.kind === 'color') {
@@ -4560,4 +4620,4 @@ function numberAttribute(element, name) {
4560
4620
  */
4561
4621
 
4562
4622
  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 };
4563
- //# sourceMappingURL=masterteam-system-settings-masterteam-system-settings-KfJrvCL9.mjs.map
4623
+ //# sourceMappingURL=masterteam-system-settings-masterteam-system-settings-XqDwBrIa.mjs.map