Browse Source

refactor(client): address review feedback on shell and dialogs

pull/8102/head
KenTandrian 5 days ago
parent
commit
010aa25f23
  1. 8
      apps/client/src/app/components/footer/footer.component.ts
  2. 2
      apps/client/src/app/components/header/header.component.html
  3. 2
      apps/client/src/app/components/user-account-membership/user-account-membership.html
  4. 2
      apps/client/src/app/util/date.util.ts

8
apps/client/src/app/components/footer/footer.component.ts

@ -24,27 +24,27 @@ import { openOutline } from 'ionicons/icons';
templateUrl: './footer.component.html' templateUrl: './footer.component.html'
}) })
export class GfFooterComponent { export class GfFooterComponent {
public readonly info = input.required<InfoItem>(); public readonly info = input.required<InfoItem | undefined>();
protected readonly currentYear = new Date().getFullYear(); protected readonly currentYear = new Date().getFullYear();
protected readonly hasPermissionForStatistics = computed(() => { protected readonly hasPermissionForStatistics = computed(() => {
return hasPermission( return hasPermission(
this.info().globalPermissions, this.info()?.globalPermissions,
permissions.enableStatistics permissions.enableStatistics
); );
}); });
protected readonly hasPermissionForSubscription = computed(() => { protected readonly hasPermissionForSubscription = computed(() => {
return hasPermission( return hasPermission(
this.info().globalPermissions, this.info()?.globalPermissions,
permissions.enableSubscription permissions.enableSubscription
); );
}); });
protected readonly hasPermissionToAccessFearAndGreedIndex = computed(() => { protected readonly hasPermissionToAccessFearAndGreedIndex = computed(() => {
return hasPermission( return hasPermission(
this.info().globalPermissions, this.info()?.globalPermissions,
permissions.enableFearAndGreedIndex permissions.enableFearAndGreedIndex
); );
}); });

2
apps/client/src/app/components/header/header.component.html

@ -144,7 +144,7 @@
class="no-max-width" class="no-max-width"
xPosition="before" xPosition="before"
[overlapTrigger]="true" [overlapTrigger]="true"
(closed)="assistantElement()?.setIsOpen(false)" (closed)="assistantElement().setIsOpen(false)"
> >
<gf-assistant <gf-assistant
#assistant #assistant

2
apps/client/src/app/components/user-account-membership/user-account-membership.html

@ -17,7 +17,7 @@
hasPermissionForSubscription && hasPermissionToUpdateUserSettings hasPermissionForSubscription && hasPermissionToUpdateUserSettings
) { ) {
<button color="primary" mat-flat-button (click)="onCheckout()"> <button color="primary" mat-flat-button (click)="onCheckout()">
@if (user?.subscription?.offer?.isRenewal) { @if (user.subscription.offer.isRenewal) {
<ng-container i18n>Renew Plan</ng-container> <ng-container i18n>Renew Plan</ng-container>
} @else { } @else {
<ng-container i18n>Upgrade Plan</ng-container> <ng-container i18n>Upgrade Plan</ng-container>

2
apps/client/src/app/util/date.util.ts

@ -10,7 +10,7 @@ export function formatRelativeTime({
date, date,
language language
}: { }: {
date: Date | string; date: Date | string | null | undefined;
language?: string; language?: string;
}) { }) {
if (date) { if (date) {

Loading…
Cancel
Save