mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
[AAE-463] - change dueDate render component (#5200)
* change dueDate render component * fix tests * fix lint * rebase and add test * split code into 2 declarations
This commit is contained in:
committed by
Eugenio Romano
parent
f20b78a2c5
commit
b41514cad7
@@ -25,7 +25,8 @@ import {
|
||||
TranslationService,
|
||||
AppConfigService,
|
||||
UpdateNotification,
|
||||
CardViewUpdateService
|
||||
CardViewUpdateService,
|
||||
CardViewDatetimeItemModel
|
||||
} from '@alfresco/adf-core';
|
||||
import { TaskDetailsCloudModel, TaskStatusEnum } from '../../start-task/models/task-details-cloud.model';
|
||||
import { Router } from '@angular/router';
|
||||
@@ -66,6 +67,7 @@ export class TaskHeaderCloudComponent implements OnInit, OnDestroy, OnChanges {
|
||||
inEdit: boolean = false;
|
||||
parentTaskName: string;
|
||||
dateFormat: string;
|
||||
dateTimeFormat: string;
|
||||
dateLocale: string;
|
||||
displayDateClearAction = false;
|
||||
|
||||
@@ -80,6 +82,7 @@ export class TaskHeaderCloudComponent implements OnInit, OnDestroy, OnChanges {
|
||||
) {
|
||||
this.dateFormat = this.appConfig.get('dateValues.defaultDateFormat');
|
||||
this.dateLocale = this.appConfig.get('dateValues.defaultDateLocale');
|
||||
this.dateTimeFormat = this.appConfig.get('dateValue.defaultDateTimeFormat');
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
@@ -145,14 +148,14 @@ export class TaskHeaderCloudComponent implements OnInit, OnDestroy, OnChanges {
|
||||
validators: [new NumericFieldValidator()]
|
||||
}
|
||||
),
|
||||
new CardViewDateItemModel(
|
||||
new CardViewDatetimeItemModel(
|
||||
{
|
||||
label: 'ADF_CLOUD_TASK_HEADER.PROPERTIES.DUE_DATE',
|
||||
value: this.taskDetails.dueDate,
|
||||
key: 'dueDate',
|
||||
default: this.translationService.instant('ADF_CLOUD_TASK_HEADER.PROPERTIES.DUE_DATE_DEFAULT'),
|
||||
editable: true,
|
||||
format: this.dateFormat,
|
||||
format: this.dateTimeFormat,
|
||||
locale: this.dateLocale
|
||||
}
|
||||
),
|
||||
|
Reference in New Issue
Block a user