Browse Source

fix format

pull/2870/head
x1c0 2 years ago
committed by Thomas Kaul
parent
commit
b506166cd7
  1. 12
      apps/api/src/services/data-provider/data-enhancer/trackinsight/trackinsight.service.ts
  2. 2
      apps/client/src/app/components/access-table/access-table.component.html
  3. 26
      apps/client/src/app/components/access-table/access-table.component.ts
  4. 16
      apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html
  5. 2
      apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.component.ts

12
apps/api/src/services/data-provider/data-enhancer/trackinsight/trackinsight.service.ts

@ -62,9 +62,9 @@ export class TrackinsightDataEnhancerService implements DataEnhancerInterface {
}, this.configurationService.get('REQUEST_TIMEOUT')); }, this.configurationService.get('REQUEST_TIMEOUT'));
return got( return got(
`${TrackinsightDataEnhancerService.baseUrl}/funds/${symbol.split( `${TrackinsightDataEnhancerService.baseUrl}/funds/${
'.' symbol.split('.')?.[0]
)?.[0]}.json`, }.json`,
{ {
// @ts-ignore // @ts-ignore
signal: abortController.signal signal: abortController.signal
@ -104,9 +104,9 @@ export class TrackinsightDataEnhancerService implements DataEnhancerInterface {
}, this.configurationService.get('REQUEST_TIMEOUT')); }, this.configurationService.get('REQUEST_TIMEOUT'));
return got( return got(
`${TrackinsightDataEnhancerService.baseUrl}/holdings/${symbol.split( `${TrackinsightDataEnhancerService.baseUrl}/holdings/${
'.' symbol.split('.')?.[0]
)?.[0]}.json`, }.json`,
{ {
// @ts-ignore // @ts-ignore
signal: abortController.signal signal: abortController.signal

2
apps/client/src/app/components/access-table/access-table.component.html

@ -18,7 +18,7 @@
<td *matCellDef="let element" class="px-1 text-nowrap" mat-cell> <td *matCellDef="let element" class="px-1 text-nowrap" mat-cell>
<div class="align-items-center d-flex"> <div class="align-items-center d-flex">
<ion-icon class="mr-1" name="lock-closed-outline" /> <ion-icon class="mr-1" name="lock-closed-outline" />
{{ getDisplayName(element.type) }} {{ getPermissonDisplayName(element) }}
</div> </div>
</td> </td>
</ng-container> </ng-container>

26
apps/client/src/app/components/access-table/access-table.component.ts

@ -44,18 +44,20 @@ export class AccessTableComponent implements OnChanges, OnInit {
} }
} }
public getDisplayName( public getPermissonDisplayName(access: Access): string {
type: 'PRIVATE' | 'PUBLIC' | 'RESTRICTED_VIEW' | 'VIEW' if (access.type === 'PUBLIC') {
): string { return $localize`Public`;
switch (type) { }
case 'PUBLIC':
return $localize`Public`; if (access.type === 'PRIVATE') {
case 'RESTRICTED_VIEW': switch (access.permission) {
return $localize`Restricted View`; case 'READ':
case 'VIEW': return $localize`View`;
return $localize`View`; case 'READ_RESTRICTED':
default: return $localize`Restricted View`;
return $localize`Unknown`; default:
return $localize`Unknown`;
}
} }
} }

16
apps/client/src/app/components/portfolio-summary/portfolio-summary.component.html

@ -10,8 +10,8 @@
[hidden]="summary?.ordersCount === null" [hidden]="summary?.ordersCount === null"
> >
<div class="flex-grow-1 ml-3 text-truncate" i18n> <div class="flex-grow-1 ml-3 text-truncate" i18n>
{{ summary?.ordersCount }} {summary?.ordersCount, plural, =1 {transaction} {{ summary?.ordersCount }}
other {transactions}} {summary?.ordersCount, plural, =1 {transaction} other {transactions}}
</div> </div>
</div> </div>
<div class="row"> <div class="row">
@ -71,7 +71,11 @@
<div class="flex-nowrap px-3 py-1 row"> <div class="flex-nowrap px-3 py-1 row">
<div class="align-items-center d-flex flex-grow-1 ml-3 text-truncate"> <div class="align-items-center d-flex flex-grow-1 ml-3 text-truncate">
<ng-container i18n>Gross Performance</ng-container> <ng-container i18n>Gross Performance</ng-container>
<abbr class="initialism ml-2 text-muted" title="Time-Weighted Rate of Return">(TWR)</abbr> <abbr
class="initialism ml-2 text-muted"
title="Time-Weighted Rate of Return"
>(TWR)</abbr
>
</div> </div>
<div class="flex-column flex-wrap justify-content-end"> <div class="flex-column flex-wrap justify-content-end">
<gf-value <gf-value
@ -117,7 +121,11 @@
<div class="flex-nowrap px-3 py-1 row"> <div class="flex-nowrap px-3 py-1 row">
<div class="flex-grow-1 text-truncate ml-3"> <div class="flex-grow-1 text-truncate ml-3">
<ng-container i18n>Net Performance</ng-container> <ng-container i18n>Net Performance</ng-container>
<abbr class="initialism ml-2 text-muted" title="Time-Weighted Rate of Return">(TWR)</abbr> <abbr
class="initialism ml-2 text-muted"
title="Time-Weighted Rate of Return"
>(TWR)</abbr
>
</div> </div>
<div class="flex-column flex-wrap justify-content-end"> <div class="flex-column flex-wrap justify-content-end">
<gf-value <gf-value

2
apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.component.ts

@ -71,7 +71,7 @@ export class CreateOrUpdateAccessDialog implements OnDestroy {
type: this.accessForm.controls['type'].value, type: this.accessForm.controls['type'].value,
permission: this.accessForm.controls['permission'].value permission: this.accessForm.controls['permission'].value
}; };
this.dataService this.dataService
.postAccess(access) .postAccess(access)
.pipe( .pipe(

Loading…
Cancel
Save