|
|
@ -17,6 +17,7 @@ import { isNumber } from 'lodash';
|
|
|
|
export class ValueComponent implements OnChanges {
|
|
|
|
export class ValueComponent implements OnChanges {
|
|
|
|
@Input() colorizeSign = false;
|
|
|
|
@Input() colorizeSign = false;
|
|
|
|
@Input() currency = '';
|
|
|
|
@Input() currency = '';
|
|
|
|
|
|
|
|
@Input() isAbsolute = false;
|
|
|
|
@Input() isCurrency = false;
|
|
|
|
@Input() isCurrency = false;
|
|
|
|
@Input() isPercent = false;
|
|
|
|
@Input() isPercent = false;
|
|
|
|
@Input() label = '';
|
|
|
|
@Input() label = '';
|
|
|
@ -91,6 +92,11 @@ export class ValueComponent implements OnChanges {
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
this.formattedValue = this.value?.toString();
|
|
|
|
this.formattedValue = this.value?.toString();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.isAbsolute) {
|
|
|
|
|
|
|
|
// Remove algebraic sign
|
|
|
|
|
|
|
|
this.formattedValue = this.formattedValue.replace(/^-/, '');
|
|
|
|
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
if (isDate(new Date(this.value))) {
|
|
|
|
if (isDate(new Date(this.value))) {
|
|
|
|