mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-5390] [ADF-5391] Add multivalue cardview for Date, Datetime, Integers and Decimal properties. (#6980)
* [ADF-5390] Addd multivalue cardview for Date, Datetime, Integers and Decimal properties * Fix unit test * Fix linting * Fix e2e tests * fix e2e Co-authored-by: Eugenio Romano <eugenio.romano@alfresco.com>
This commit is contained in:
@@ -42,11 +42,19 @@ export class CardViewDateItemModel extends CardViewBaseItemModel implements Card
|
||||
}
|
||||
|
||||
get displayValue() {
|
||||
if (!this.value) {
|
||||
return this.default;
|
||||
if (this.multivalued) {
|
||||
if (this.value) {
|
||||
return this.value.map((date) => this.transformDate(date));
|
||||
} else {
|
||||
return this.default ? [this.default] : [];
|
||||
}
|
||||
} else {
|
||||
this.localizedDatePipe = new LocalizedDatePipe();
|
||||
return this.localizedDatePipe.transform(this.value, this.format, this.locale);
|
||||
return this.value ? this.transformDate(this.value) : this.default;
|
||||
}
|
||||
}
|
||||
|
||||
transformDate(value: any) {
|
||||
this.localizedDatePipe = new LocalizedDatePipe();
|
||||
return this.localizedDatePipe.transform(value, this.format, this.locale);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user