diff --git a/src/app/core/utils/dates.spec.ts b/src/app/core/utils/dates.spec.ts new file mode 100644 index 000000000..519318192 --- /dev/null +++ b/src/app/core/utils/dates.spec.ts @@ -0,0 +1,102 @@ +import { TestBed } from '@angular/core/testing'; +import { DatePipe } from '@angular/common'; +import { Dates } from './dates'; + +describe('Dates', () => { + let service: Dates; + + beforeEach(() => { + TestBed.configureTestingModule({ + providers: [ + Dates, + DatePipe + ] + }); + service = TestBed.inject(Dates); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); + + describe('angularToMomentFormat', () => { + it('should convert dd/MM/yyyy to DD/MM/YYYY', () => { + expect(service.angularToMomentFormat('dd/MM/yyyy')).toBe('DD/MM/YYYY'); + }); + + it('should convert d MMMM yy to D MMMM YY', () => { + expect(service.angularToMomentFormat('d MMMM yy')).toBe('D MMMM YY'); + }); + + it('should convert yyyy-MM-dd HH:mm:ss to YYYY-MM-DD HH:mm:ss', () => { + expect(service.angularToMomentFormat('yyyy-MM-dd HH:mm:ss')).toBe('YYYY-MM-DD HH:mm:ss'); + }); + + it('should handle single characters d/M/y to D/M/Y', () => { + expect(service.angularToMomentFormat('d/M/y')).toBe('D/M/Y'); + }); + + it('should preserve other characters like HH:mm a to HH:mm A', () => { + expect(service.angularToMomentFormat('HH:mm a')).toBe('HH:mm A'); + }); + + it('should convert dd MMMM yyyy to DD MMMM YYYY', () => { + expect(service.angularToMomentFormat('dd MMMM yyyy')).toBe('DD MMMM YYYY'); + }); + + it('should convert all y variants: y, yy, yyy, yyyy', () => { + expect(service.angularToMomentFormat('y')).toBe('Y'); + expect(service.angularToMomentFormat('yy')).toBe('YY'); + expect(service.angularToMomentFormat('yyy')).toBe('YYY'); + expect(service.angularToMomentFormat('yyyy')).toBe('YYYY'); + }); + + it('should convert all d variants: d, dd', () => { + expect(service.angularToMomentFormat('d')).toBe('D'); + expect(service.angularToMomentFormat('dd')).toBe('DD'); + }); + + it('should handle complex format with all patterns', () => { + expect(service.angularToMomentFormat('dd-MM-yyyy HH:mm:ss a')).toBe('DD-MM-YYYY HH:mm:ss A'); + }); + + it('should preserve MM (month) unchanged', () => { + expect(service.angularToMomentFormat('MM')).toBe('MM'); + }); + + it('should preserve time components HH, mm, ss unchanged', () => { + expect(service.angularToMomentFormat('HH:mm:ss')).toBe('HH:mm:ss'); + }); + + describe('App-Supported Formats', () => { + const formats = [ + // HH:mm:ss variants + { angular: 'dd MMMM yyyy HH:mm:ss', moment: 'DD MMMM YYYY HH:mm:ss' }, + { angular: 'dd/MMMM/yyyy HH:mm:ss', moment: 'DD/MMMM/YYYY HH:mm:ss' }, + { angular: 'dd-MMMM-yyyy HH:mm:ss', moment: 'DD-MMMM-YYYY HH:mm:ss' }, + { angular: 'dd-MM-yy HH:mm:ss', moment: 'DD-MM-YY HH:mm:ss' }, + { angular: 'MMMM-dd-yyyy HH:mm:ss', moment: 'MMMM-DD-YYYY HH:mm:ss' }, + { angular: 'MMMM dd yyyy HH:mm:ss', moment: 'MMMM DD YYYY HH:mm:ss' }, + { angular: 'MMMM/dd/yyyy HH:mm:ss', moment: 'MMMM/DD/YYYY HH:mm:ss' }, + { angular: 'MM-dd-yy HH:mm:ss', moment: 'MM-DD-YY HH:mm:ss' }, + { angular: 'yyyy-MM-dd HH:mm:ss', moment: 'YYYY-MM-DD HH:mm:ss' }, + // HH:mm variants + { angular: 'dd MMMM yyyy HH:mm', moment: 'DD MMMM YYYY HH:mm' }, + { angular: 'dd/MMMM/yyyy HH:mm', moment: 'DD/MMMM/YYYY HH:mm' }, + { angular: 'dd-MMMM-yyyy HH:mm', moment: 'DD-MMMM-YYYY HH:mm' }, + { angular: 'dd-MM-yy HH:mm', moment: 'DD-MM-YY HH:mm' }, + { angular: 'MMMM-dd-yyyy HH:mm', moment: 'MMMM-DD-YYYY HH:mm' }, + { angular: 'MMMM dd yyyy HH:mm', moment: 'MMMM DD YYYY HH:mm' }, + { angular: 'MMMM/dd/yyyy HH:mm', moment: 'MMMM/DD/YYYY HH:mm' }, + { angular: 'MM-dd-yy HH:mm', moment: 'MM-DD-YY HH:mm' }, + { angular: 'yyyy-MM-dd HH:mm', moment: 'YYYY-MM-DD HH:mm' } + ]; + + formats.forEach((f) => { + it(`should convert "${f.angular}" to "${f.moment}"`, () => { + expect(service.angularToMomentFormat(f.angular)).toBe(f.moment); + }); + }); + }); + }); +}); diff --git a/src/app/core/utils/dates.ts b/src/app/core/utils/dates.ts index 70c396156..d256ea17d 100644 --- a/src/app/core/utils/dates.ts +++ b/src/app/core/utils/dates.ts @@ -29,10 +29,21 @@ export class Dates { } public formatDateAsString(value: Date, dateFormat: string): string { - const momentFormat = dateFormat.replace(/y/g, 'Y').replace(/d/g, 'D').replace(/a/g, 'A'); + const momentFormat = this.angularToMomentFormat(dateFormat); return moment(value).format(momentFormat); } + public angularToMomentFormat(angularFormat: string): string { + return angularFormat.replace(/y/g, 'Y').replace(/d/g, 'D').replace(/a/g, 'A'); + } + + public getMomentLocale(language?: { code: string }): string { + const langCode = language?.code; + if (!langCode) return 'en'; + if (langCode.includes('-')) return langCode.split('-')[0]; + return langCode; + } + public parseDate(value: any): Date { if (value instanceof Array) { return moment(value.join('-'), 'YYYY-MM-DD').toDate(); @@ -46,7 +57,7 @@ export class Dates { } public convertToDate(value: any, format: string): Date { - const momentFormat = format.replace(/y/g, 'Y').replace(/d/g, 'D').replace(/a/g, 'A'); + const momentFormat = this.angularToMomentFormat(format); return moment(value, momentFormat).toDate(); } diff --git a/src/app/pipes/date-format.pipe.ts b/src/app/pipes/date-format.pipe.ts index 08b416f7d..4582f2621 100644 --- a/src/app/pipes/date-format.pipe.ts +++ b/src/app/pipes/date-format.pipe.ts @@ -9,6 +9,7 @@ import { Pipe, PipeTransform, inject, OnDestroy } from '@angular/core'; import { SettingsService } from 'app/settings/settings.service'; import { TranslateService } from '@ngx-translate/core'; +import { Dates } from 'app/core/utils/dates'; import { Subscription } from 'rxjs'; import moment from 'moment'; @@ -29,6 +30,7 @@ import 'moment/locale/cs'; // Czech export class DateFormatPipe implements PipeTransform, OnDestroy { private settingsService = inject(SettingsService); private translateService = inject(TranslateService); + private dateUtils = inject(Dates); private onLangChange: Subscription; constructor() { @@ -45,24 +47,12 @@ export class DateFormatPipe implements PipeTransform, OnDestroy { } transform(value: any, dateFormat?: string): any { - const defaultDateFormat = this.settingsService.dateFormat.replace('dd', 'DD'); + const defaultDateFormat = this.dateUtils.angularToMomentFormat(this.settingsService.dateFormat); if (typeof value === 'undefined' || value === null) { return ''; } - // Map SettingsService language code to a moment.js locale identifier - const langCode = this.settingsService.language.code; - let momentLocale: string; - - if (!langCode) { - momentLocale = 'en'; - } else if (langCode.includes('-')) { - // Convert codes like 'ne-NE' or 'es-MX' to base language 'ne', 'es' - momentLocale = langCode.split('-')[0]; - } else { - momentLocale = langCode; - } - + const momentLocale = this.dateUtils.getMomentLocale(this.settingsService.language); moment.locale(momentLocale); let dateVal; diff --git a/src/app/pipes/datetime-format.pipe.ts b/src/app/pipes/datetime-format.pipe.ts index 53ae3bae4..9bdfb346f 100644 --- a/src/app/pipes/datetime-format.pipe.ts +++ b/src/app/pipes/datetime-format.pipe.ts @@ -6,13 +6,38 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -import { Pipe, PipeTransform } from '@angular/core'; +import { Pipe, PipeTransform, inject, OnDestroy } from '@angular/core'; +import { SettingsService } from 'app/settings/settings.service'; +import { TranslateService } from '@ngx-translate/core'; +import { Dates } from 'app/core/utils/dates'; +import { Subscription } from 'rxjs'; import moment, { Moment } from 'moment'; -@Pipe({ name: 'datetimeFormat', standalone: true }) -export class DatetimeFormatPipe implements PipeTransform { +@Pipe({ name: 'datetimeFormat', pure: false }) +export class DatetimeFormatPipe implements PipeTransform, OnDestroy { + private settingsService = inject(SettingsService); + private translateService = inject(TranslateService); + private dateUtils = inject(Dates); + private onLangChange: Subscription; + + constructor() { + this.onLangChange = this.translateService.onLangChange.subscribe(() => {}); + } + + ngOnDestroy(): void { + if (this.onLangChange) { + this.onLangChange.unsubscribe(); + } + } + transform(value: unknown, datetimeFormat?: string): string { + const defaultDatetimeFormat = this.dateUtils.angularToMomentFormat(this.settingsService.datetimeFormat); + if (value == null || value === '') return ''; + + const momentLocale = this.dateUtils.getMomentLocale(this.settingsService.language); + moment.locale(momentLocale); + let dateVal: Moment; if (Array.isArray(value)) { const [ @@ -24,17 +49,31 @@ export class DatetimeFormatPipe implements PipeTransform { ss ] = value as number[]; if (hh != null) { - dateVal = moment({ year: y, month: (m ?? 1) - 1, date: d, hour: hh, minute: mm ?? 0, second: ss ?? 0 }); + dateVal = moment({ + year: y, + month: (m ?? 1) - 1, + date: d, + hour: hh, + minute: mm ?? 0, + second: ss ?? 0 + }); } else { dateVal = moment({ year: y, month: (m ?? 1) - 1, date: d }); } } else if (typeof value === 'number' && value < 1e12) { - // epoch seconds dateVal = moment.unix(value); } else { dateVal = moment(value as any); } - const fmt = datetimeFormat ?? 'YYYY-MM-DDTHH:mm:ssZ'; - return dateVal.format(fmt); + + if (!dateVal.isValid()) { + return ''; + } + + if (!datetimeFormat) { + return dateVal.format(defaultDatetimeFormat); + } + + return dateVal.format(datetimeFormat); } } diff --git a/src/app/settings/settings.component.html b/src/app/settings/settings.component.html index fd7bc4524..bf3832941 100644 --- a/src/app/settings/settings.component.html +++ b/src/app/settings/settings.component.html @@ -41,6 +41,17 @@ + + {{ 'labels.inputs.Default Datetime Format' | translate }} + + @for (datetimeFormat of datetimeFormats; track datetimeFormat) { + + {{ datetimeFormat }} + + } + + + {{ 'labels.inputs.Decimals to Display' | translate }} diff --git a/src/app/settings/settings.component.ts b/src/app/settings/settings.component.ts index 7feabdec7..3135b2d26 100644 --- a/src/app/settings/settings.component.ts +++ b/src/app/settings/settings.component.ts @@ -7,11 +7,13 @@ */ /** Angular Imports */ -import { Component, OnInit, inject } from '@angular/core'; +import { Component, OnInit, OnDestroy, inject } from '@angular/core'; /** Custom Service */ import { SettingsService } from './settings.service'; -import { UntypedFormControl, ReactiveFormsModule } from '@angular/forms'; +import { FormControl, ReactiveFormsModule } from '@angular/forms'; +import { Subject } from 'rxjs'; +import { takeUntil } from 'rxjs/operators'; import { MatAccordion, MatExpansionPanel, @@ -39,8 +41,9 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; ThemePickerComponent ] }) -export class SettingsComponent implements OnInit { +export class SettingsComponent implements OnInit, OnDestroy { private settingsService = inject(SettingsService); + private destroy$ = new Subject(); /** Placeholder for languages. update once translations are set up */ languages: any[] = [ @@ -61,6 +64,28 @@ export class SettingsComponent implements OnInit { 'MM-dd-yy', 'yyyy-MM-dd' ]; + datetimeFormats: string[] = [ + // All date formats with HH:mm:ss (seconds) + 'dd MMMM yyyy HH:mm:ss', + 'dd/MMMM/yyyy HH:mm:ss', + 'dd-MMMM-yyyy HH:mm:ss', + 'dd-MM-yy HH:mm:ss', + 'MMMM-dd-yyyy HH:mm:ss', + 'MMMM dd yyyy HH:mm:ss', + 'MMMM/dd/yyyy HH:mm:ss', + 'MM-dd-yy HH:mm:ss', + 'yyyy-MM-dd HH:mm:ss', + // All date formats with HH:mm (no seconds) + 'dd MMMM yyyy HH:mm', + 'dd/MMMM/yyyy HH:mm', + 'dd-MMMM-yyyy HH:mm', + 'dd-MM-yy HH:mm', + 'MMMM-dd-yyyy HH:mm', + 'MMMM dd yyyy HH:mm', + 'MMMM/dd/yyyy HH:mm', + 'MM-dd-yy HH:mm', + 'yyyy-MM-dd HH:mm' + ]; /** Decimals. */ decimals: string[] = [ '0', @@ -77,15 +102,18 @@ export class SettingsComponent implements OnInit { fonts: any; /** Language Setting */ - language = new UntypedFormControl(''); + language = new FormControl(''); /** Date Format Setting */ - dateFormat = new UntypedFormControl(''); + dateFormat = new FormControl(''); + /** Datetime Format Setting */ + datetimeFormat = new FormControl(''); /** Decimals to Display Setting */ - decimalsToDisplay = new UntypedFormControl(''); + decimalsToDisplay = new FormControl(''); ngOnInit() { this.language.patchValue(this.settingsService.language); this.dateFormat.patchValue(this.settingsService.dateFormat); + this.datetimeFormat.patchValue(this.settingsService.datetimeFormat); this.decimalsToDisplay.patchValue(this.settingsService.decimals); this.buildDependencies(); } @@ -94,17 +122,25 @@ export class SettingsComponent implements OnInit { * Subscribe to value changes. */ buildDependencies() { - this.language.valueChanges.subscribe((language: any) => { + this.language.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((language: any) => { this.settingsService.setLanguage(language); }); - this.dateFormat.valueChanges.subscribe((dateFormat: string) => { + this.dateFormat.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((dateFormat: string) => { this.settingsService.setDateFormat(dateFormat); }); - this.decimalsToDisplay.valueChanges.subscribe((decimals: string) => { + this.datetimeFormat.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((datetimeFormat: string) => { + this.settingsService.setDatetimeFormat(datetimeFormat); + }); + this.decimalsToDisplay.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((decimals: string) => { this.settingsService.setDecimalToDisplay(decimals); }); } + ngOnDestroy() { + this.destroy$.next(); + this.destroy$.complete(); + } + /** * Compare function for mat-select. * Useful in patching values if value is an object. diff --git a/src/app/settings/settings.service.ts b/src/app/settings/settings.service.ts index 70b134e1c..ad41ceae6 100644 --- a/src/app/settings/settings.service.ts +++ b/src/app/settings/settings.service.ts @@ -39,6 +39,10 @@ export class SettingsService { localStorage.setItem('mifosXDateFormat', JSON.stringify(dateFormat)); } + setDatetimeFormat(datetimeFormat: string) { + localStorage.setItem('mifosXDatetimeFormat', JSON.stringify(datetimeFormat)); + } + /** * Sets language setting throughout the app. * @param {any} language Language. @@ -112,10 +116,37 @@ export class SettingsService { } /** - * Returns date format setting. + * Returns date format setting with fallback precedence: + * 1. User setting (localStorage) + * 2. Global env var + * 3. Hardcoded default */ get dateFormat() { - return JSON.parse(localStorage.getItem('mifosXDateFormat')); + const userSetting = localStorage.getItem('mifosXDateFormat'); + if (userSetting) { + return JSON.parse(userSetting); + } + if (environment.defaultFormatDate) { + return environment.defaultFormatDate; + } + return 'dd MMMM yyyy'; + } + + /** + * Returns datetime format setting with fallback precedence: + * 1. User setting (localStorage) + * 2. Global env var + * 3. Hardcoded default + */ + get datetimeFormat() { + const userSetting = localStorage.getItem('mifosXDatetimeFormat'); + if (userSetting) { + return JSON.parse(userSetting); + } + if (environment.defaultFormatDatetime) { + return environment.defaultFormatDatetime; + } + return 'dd MMMM yyyy HH:mm:ss'; } /** diff --git a/src/app/web-app.component.ts b/src/app/web-app.component.ts index 08bf4b69b..f3f757ab3 100644 --- a/src/app/web-app.component.ts +++ b/src/app/web-app.component.ts @@ -223,9 +223,6 @@ export class WebAppComponent implements OnInit, OnDestroy { if (!localStorage.getItem('mifosXLanguage')) { this.settingsService.setDefaultLanguage(); } - if (!localStorage.getItem('mifosXDateFormat')) { - this.settingsService.setDateFormat('dd MMMM yyyy'); - } // Set default max date picker as Today this.settingsService.setBusinessDate(this.dateUtils.formatDate(new Date(), SettingsService.businessDateFormat)); // Set the server list from the env var FINERACT_API_URLS, but avoid overwriting "Add new server" user choice diff --git a/src/assets/env.js b/src/assets/env.js index 469251823..e27da5a4b 100644 --- a/src/assets/env.js +++ b/src/assets/env.js @@ -6,19 +6,19 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -(function(window) { +(function (window) { window["env"] = window["env"] || {}; // BackEnd Environment variables window["env"]["fineractApiUrls"] = ''; - window["env"]["fineractApiUrl"] = ''; + window["env"]["fineractApiUrl"] = ''; window["env"]["apiProvider"] = ''; - window["env"]["apiVersion"] = ''; - window["env"]["apiActuator"] = ''; + window["env"]["apiVersion"] = ''; + window["env"]["apiActuator"] = ''; - window["env"]["fineractPlatformTenantId"] = ''; - window["env"]["fineractPlatformTenantIds"] = ''; + window["env"]["fineractPlatformTenantId"] = ''; + window["env"]["fineractPlatformTenantIds"] = ''; window['env']['tenantLogoUrl'] = ''; window['env']['tenantLogoUrlDark'] = ''; @@ -27,6 +27,9 @@ window["env"]["defaultLanguage"] = ''; window["env"]["supportedLanguages"] = ''; + window["env"]["defaultFormatDate"] = ''; + window["env"]["defaultFormatDatetime"] = ''; + window['env']['preloadClients'] = ''; // Char delimiter to Export CSV options: ',' ';' '|' ' ' @@ -34,7 +37,7 @@ // Display or not the Server Selector window['env']['allowServerSwitch'] = ''; - + // Display or not the BackEnd Info window['env']['displayBackEndInfo'] = ''; @@ -81,12 +84,12 @@ // Hide client data (mask names) window['env']['complianceHideClientData'] = ''; - // Interbank Transfers Environment variables + // Interbank Transfers Environment variables window['env']['mifosInterbankTransfersApiUrl'] = ''; window['env']['mifosInterbankTransfersApiProvider'] = ''; window['env']['mifosInterbankTransfersApiVersion'] = ''; window['env']['mifosInterbankTransfersEnabled'] = 'true'; - + // Enable Role-Based Access Control (RBAC) for menu/button permissions // Set to true to enable RBAC, false (default) for backward compatibility window['env']['productionModeEnableRBAC'] = false; @@ -103,9 +106,9 @@ // OIDC Plugin Environment variables window['env']['oidcServerEnabled'] = false; - window['env']['oidcBaseUrl'] = ''; - window['env']['oidcClientId'] = ''; - window['env']['oidcApiUrl'] = ''; - window['env']['oidcFrontUrl'] = ''; + window['env']['oidcBaseUrl'] = ''; + window['env']['oidcClientId'] = ''; + window['env']['oidcApiUrl'] = ''; + window['env']['oidcFrontUrl'] = ''; })(this); diff --git a/src/assets/env.template.js b/src/assets/env.template.js index da0d11452..ba01b2de0 100644 --- a/src/assets/env.template.js +++ b/src/assets/env.template.js @@ -32,6 +32,9 @@ window['env']['supportedLanguages'] = '$MIFOS_SUPPORTED_LANGUAGES'; + window['env']['defaultFormatDate'] = '$MIFOS_DEFAULT_FORMAT_DATE'; + window['env']['defaultFormatDatetime'] = '$MIFOS_DEFAULT_FORMAT_DATETIME'; + window['env']['preloadClients'] = '$MIFOS_PRELOAD_CLIENTS'; // Char delimiter to Export CSV options: ',' ';' '|' ' ' diff --git a/src/assets/translations/cs-CS.json b/src/assets/translations/cs-CS.json index f7e41ba7a..41549df86 100644 --- a/src/assets/translations/cs-CS.json +++ b/src/assets/translations/cs-CS.json @@ -1644,6 +1644,7 @@ "Decimals to Display": "Zobrazení desetinných míst", "Default": "Výchozí", "Default Date Format": "Výchozí formát data", + "Default Datetime Format": "Výchozí formát data a času", "Default Font": "Výchozí písmo", "Default Language": "Základní jazyk", "Default Savings Account": "Výchozí spořicí účet", diff --git a/src/assets/translations/de-DE.json b/src/assets/translations/de-DE.json index 5853731e0..23c0cfcd4 100644 --- a/src/assets/translations/de-DE.json +++ b/src/assets/translations/de-DE.json @@ -1646,6 +1646,7 @@ "Decimals to Display": "Anzuzeigende Dezimalstellen", "Default": "Standard", "Default Date Format": "Standarddatumsformat", + "Default Datetime Format": "Standard-Datums- und Zeitformat", "Default Font": "Standardschriftart", "Default Language": "Standardsprache", "Default Savings Account": "Standardsparkonto", diff --git a/src/assets/translations/en-US.json b/src/assets/translations/en-US.json index aad0ff642..8cc3cebf8 100644 --- a/src/assets/translations/en-US.json +++ b/src/assets/translations/en-US.json @@ -1651,6 +1651,7 @@ "Decimals to Display": "Decimals to Display", "Default": "Default", "Default Date Format": "Default Date Format", + "Default Datetime Format": "Default Datetime Format", "Default Font": "Default Font", "Default Language": "Default Language", "Default Savings Account": "Default Savings Account", diff --git a/src/assets/translations/es-CL.json b/src/assets/translations/es-CL.json index 79299eb72..da754f1ef 100644 --- a/src/assets/translations/es-CL.json +++ b/src/assets/translations/es-CL.json @@ -1646,6 +1646,7 @@ "Decimals to Display": "Decimales para mostrar", "Default": "Predeterminado", "Default Date Format": "Formato de fecha predeterminado", + "Default Datetime Format": "Formato de fecha y hora predeterminado", "Default Font": "Fuente predeterminada", "Default Language": "Idioma predeterminado", "Default Savings Account": "Cuenta de Ahorros predeterminada", diff --git a/src/assets/translations/es-MX.json b/src/assets/translations/es-MX.json index 375c8ef3c..0ed3aada1 100644 --- a/src/assets/translations/es-MX.json +++ b/src/assets/translations/es-MX.json @@ -1645,6 +1645,7 @@ "Decimals to Display": "Decimales para mostrar", "Default": "Predeterminado", "Default Date Format": "Formato de fecha predeterminado", + "Default Datetime Format": "Formato de fecha y hora predeterminado", "Default Font": "Fuente predeterminada", "Default Language": "Idioma predeterminado", "Default Savings Account": "Cuenta de Ahorros predeterminada", diff --git a/src/assets/translations/fr-FR.json b/src/assets/translations/fr-FR.json index 616dfbccb..4f1b9b415 100644 --- a/src/assets/translations/fr-FR.json +++ b/src/assets/translations/fr-FR.json @@ -1649,6 +1649,7 @@ "Decimals to Display": "Décimales à afficher", "Default": "Défaut", "Default Date Format": "Format de date par défaut", + "Default Datetime Format": "Format de date et heure par défaut", "Default Font": "Police par défaut", "Default Language": "Langage par défaut", "Default Savings Account": "Compte d'épargne par défaut", diff --git a/src/assets/translations/it-IT.json b/src/assets/translations/it-IT.json index dc5d7a1fd..9ff995332 100644 --- a/src/assets/translations/it-IT.json +++ b/src/assets/translations/it-IT.json @@ -1645,6 +1645,7 @@ "Decimals to Display": "Decimali da visualizzare", "Default": "Predefinito", "Default Date Format": "Formato data predefinito", + "Default Datetime Format": "Formato data e ora predefinito", "Default Font": "Carattere predefinito", "Default Language": "Lingua di default", "Default Savings Account": "Conto di risparmio predefinito", diff --git a/src/assets/translations/ko-KO.json b/src/assets/translations/ko-KO.json index 0f8240cc1..c9ce6535c 100644 --- a/src/assets/translations/ko-KO.json +++ b/src/assets/translations/ko-KO.json @@ -1647,6 +1647,7 @@ "Decimals to Display": "표시할 소수점", "Default": "기본", "Default Date Format": "기본 날짜 형식", + "Default Datetime Format": "기본 날짜 및 시간 형식", "Default Font": "기본 글꼴", "Default Language": "기본 설정 언어", "Default Savings Account": "기본 저축 계좌", diff --git a/src/assets/translations/lt-LT.json b/src/assets/translations/lt-LT.json index c94e84522..ff9089835 100644 --- a/src/assets/translations/lt-LT.json +++ b/src/assets/translations/lt-LT.json @@ -1644,6 +1644,7 @@ "Decimals to Display": "Rodomos dešimtainės trupmenos", "Default": "Numatytas", "Default Date Format": "Numatytasis datos formatas", + "Default Datetime Format": "Numatytasis datos ir laiko formatas", "Default Font": "Numatytasis šriftas", "Default Language": "Numatytoji kalba", "Default Savings Account": "Numatytoji taupomoji sąskaita", diff --git a/src/assets/translations/lv-LV.json b/src/assets/translations/lv-LV.json index c1e50884d..e80a20892 100644 --- a/src/assets/translations/lv-LV.json +++ b/src/assets/translations/lv-LV.json @@ -1646,6 +1646,7 @@ "Decimals to Display": "Parādāmie decimālskaitļi", "Default": "Noklusējums", "Default Date Format": "Noklusējuma datuma formāts", + "Default Datetime Format": "Noklusējuma datuma un laika formāts", "Default Font": "Noklusējuma fonts", "Default Language": "Noklusējuma valoda", "Default Savings Account": "Noklusējuma krājkonts", diff --git a/src/assets/translations/ne-NE.json b/src/assets/translations/ne-NE.json index 0df5b20a9..f46609b4e 100644 --- a/src/assets/translations/ne-NE.json +++ b/src/assets/translations/ne-NE.json @@ -1644,6 +1644,7 @@ "Decimals to Display": "प्रदर्शन गर्न दशमलव", "Default": "पूर्वनिर्धारित", "Default Date Format": "पूर्वनिर्धारित मिति ढाँचा", + "Default Datetime Format": "पूर्वनिर्धारित मिति र समय ढाँचा", "Default Font": "पूर्वनिर्धारित फन्ट", "Default Language": "पूर्वनिर्धारित भाषा", "Default Savings Account": "पूर्वनिर्धारित बचत खाता", diff --git a/src/assets/translations/pt-PT.json b/src/assets/translations/pt-PT.json index 3426c8583..a128934f4 100644 --- a/src/assets/translations/pt-PT.json +++ b/src/assets/translations/pt-PT.json @@ -1645,6 +1645,7 @@ "Decimals to Display": "Decimais para exibir", "Default": "Padrão", "Default Date Format": "Formato de data padrão", + "Default Datetime Format": "Formato de data e hora padrão", "Default Font": "Fonte padrão", "Default Language": "Idioma padrão", "Default Savings Account": "Conta poupança padrão", diff --git a/src/assets/translations/sw-SW.json b/src/assets/translations/sw-SW.json index 9f58087d6..9ee7acee9 100644 --- a/src/assets/translations/sw-SW.json +++ b/src/assets/translations/sw-SW.json @@ -1643,6 +1643,7 @@ "Decimals to Display": "Desimali za Kuonyeshwa", "Default": "Chaguomsingi", "Default Date Format": "Umbizo la Tarehe Chaguomsingi", + "Default Datetime Format": "Umbizo la Tarehe na Wakati Chaguomsingi", "Default Font": "Fonti Chaguomsingi", "Default Language": "Lugha Chaguomsingi", "Default Savings Account": "Akaunti ya Akiba chaguomsingi", diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 51c0849b4..0df9b90ed 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -56,6 +56,8 @@ export const environment = { defaultLanguage: loadedEnv['defaultLanguage'] || 'en-US', supportedLanguages: loadedEnv['supportedLanguages'] || 'cs-CS,de-DE,en-US,es-MX,fr-FR,it-IT,ko-KO,lt-LT,lv-LV,ne-NE,pt-PT,sw-SW', + defaultFormatDate: loadedEnv['defaultFormatDate'] || '', + defaultFormatDatetime: loadedEnv['defaultFormatDatetime'] || '', preloadClients: loadedEnv['preloadClients'] || true, defaultCharDelimiter: loadedEnv['defaultCharDelimiter'] || ',', diff --git a/src/environments/environment.ts b/src/environments/environment.ts index c25c2bc63..983360342 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -58,6 +58,8 @@ export const environment = { defaultLanguage: loadedEnv.defaultLanguage || 'en-US', supportedLanguages: loadedEnv.supportedLanguages || 'cs-CS,de-DE,en-US,es-MX,fr-FR,it-IT,ko-KO,lt-LT,lv-LV,ne-NE,pt-PT,sw-SW', + defaultFormatDate: loadedEnv.defaultFormatDate || '', + defaultFormatDatetime: loadedEnv.defaultFormatDatetime || '', preloadClients: loadedEnv['preloadClients'] || true, defaultCharDelimiter: loadedEnv.defaultCharDelimiter || ',',