Bugfix/fix total value of activities table (#680)

* Fix total value (absolute value)

* Update changelog
pull/681/head
Thomas Kaul 2 years ago committed by GitHub
parent 9b5ec0c56d
commit 16f0743353
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -22,6 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed the horizontal overflow in the accounts table
- Fixed the horizontal overflow in the activities table
- Fixed the total value of the activities table in the position detail dialog (absolute value)
### Todo

@ -256,6 +256,7 @@
<td *matFooterCellDef class="px-1" mat-footer-cell>
<div class="d-flex justify-content-end">
<gf-value
[isAbsolute]="true"
[isCurrency]="true"
[locale]="locale"
[value]="isLoading ? undefined : totalValue"

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

Loading…
Cancel
Save