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'));
return got(
`${TrackinsightDataEnhancerService.baseUrl}/funds/${symbol.split(
'.'
)?.[0]}.json`,
`${TrackinsightDataEnhancerService.baseUrl}/funds/${
symbol.split('.')?.[0]
}.json`,
{
// @ts-ignore
signal: abortController.signal
@ -104,9 +104,9 @@ export class TrackinsightDataEnhancerService implements DataEnhancerInterface {
}, this.configurationService.get('REQUEST_TIMEOUT'));
return got(
`${TrackinsightDataEnhancerService.baseUrl}/holdings/${symbol.split(
'.'
)?.[0]}.json`,
`${TrackinsightDataEnhancerService.baseUrl}/holdings/${
symbol.split('.')?.[0]
}.json`,
{
// @ts-ignore
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>
<div class="align-items-center d-flex">
<ion-icon class="mr-1" name="lock-closed-outline" />
{{ getDisplayName(element.type) }}
{{ getPermissonDisplayName(element) }}
</div>
</td>
</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(
type: 'PRIVATE' | 'PUBLIC' | 'RESTRICTED_VIEW' | 'VIEW'
): string {
switch (type) {
case 'PUBLIC':
return $localize`Public`;
case 'RESTRICTED_VIEW':
return $localize`Restricted View`;
case 'VIEW':
return $localize`View`;
default:
return $localize`Unknown`;
public getPermissonDisplayName(access: Access): string {
if (access.type === 'PUBLIC') {
return $localize`Public`;
}
if (access.type === 'PRIVATE') {
switch (access.permission) {
case 'READ':
return $localize`View`;
case 'READ_RESTRICTED':
return $localize`Restricted View`;
default:
return $localize`Unknown`;
}
}
}

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

@ -10,8 +10,8 @@
[hidden]="summary?.ordersCount === null"
>
<div class="flex-grow-1 ml-3 text-truncate" i18n>
{{ summary?.ordersCount }} {summary?.ordersCount, plural, =1 {transaction}
other {transactions}}
{{ summary?.ordersCount }}
{summary?.ordersCount, plural, =1 {transaction} other {transactions}}
</div>
</div>
<div class="row">
@ -71,7 +71,11 @@
<div class="flex-nowrap px-3 py-1 row">
<div class="align-items-center d-flex flex-grow-1 ml-3 text-truncate">
<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 class="flex-column flex-wrap justify-content-end">
<gf-value
@ -117,7 +121,11 @@
<div class="flex-nowrap px-3 py-1 row">
<div class="flex-grow-1 text-truncate ml-3">
<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 class="flex-column flex-wrap justify-content-end">
<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,
permission: this.accessForm.controls['permission'].value
};
this.dataService
.postAccess(access)
.pipe(

Loading…
Cancel
Save