mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
[ADF-4342] Create localized pipe and centralize date format (#4813)
* [ADF-4342] Date Format defined in app config * [ADF-4342] Create localized pipe and centralize date format * Add unit test for new date pipe * Add info internationalization docs * Fix lining * Fix linting * Fix date pipe unit test * [ADF-4342] Add supported language files * Fix e2e tests
This commit is contained in:
committed by
Denys Vuika
parent
990fa4625b
commit
7497822a46
@@ -59,6 +59,7 @@ export class TaskHeaderCloudComponent implements OnInit, OnDestroy {
|
||||
properties: CardViewItem[];
|
||||
inEdit: boolean = false;
|
||||
parentTaskName: string;
|
||||
dateFormat: string;
|
||||
|
||||
private subscriptions: Subscription[] = [];
|
||||
|
||||
@@ -68,7 +69,9 @@ export class TaskHeaderCloudComponent implements OnInit, OnDestroy {
|
||||
private appConfig: AppConfigService,
|
||||
private router: Router,
|
||||
private cardViewUpdateService: CardViewUpdateService
|
||||
) { }
|
||||
) {
|
||||
this.dateFormat = this.appConfig.get('dateValues.defaultDateFormat');
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
if ((this.appName || this.appName === '') && this.taskId) {
|
||||
@@ -122,7 +125,6 @@ export class TaskHeaderCloudComponent implements OnInit, OnDestroy {
|
||||
label: 'ADF_CLOUD_TASK_HEADER.PROPERTIES.DUE_DATE',
|
||||
value: this.taskDetails.dueDate,
|
||||
key: 'dueDate',
|
||||
format: 'DD-MM-YYYY',
|
||||
default: this.translationService.instant('ADF_CLOUD_TASK_HEADER.PROPERTIES.DUE_DATE_DEFAULT'),
|
||||
editable: true
|
||||
}
|
||||
@@ -139,7 +141,6 @@ export class TaskHeaderCloudComponent implements OnInit, OnDestroy {
|
||||
{
|
||||
label: 'ADF_CLOUD_TASK_HEADER.PROPERTIES.CREATED',
|
||||
value: this.taskDetails.createdDate,
|
||||
format: 'DD-MM-YYYY',
|
||||
key: 'created'
|
||||
}
|
||||
),
|
||||
@@ -162,7 +163,6 @@ export class TaskHeaderCloudComponent implements OnInit, OnDestroy {
|
||||
{
|
||||
label: 'ADF_CLOUD_TASK_HEADER.PROPERTIES.END_DATE',
|
||||
value: this.taskDetails.completedDate,
|
||||
format: 'DD-MM-YYYY',
|
||||
key: 'endDate'
|
||||
}
|
||||
),
|
||||
|
Reference in New Issue
Block a user