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'
})
export class GfFooterComponent {
public readonly info = input.required<InfoItem>();
public readonly info = input.required<InfoItem | undefined>();
protected readonly currentYear = new Date().getFullYear();
protected readonly hasPermissionForStatistics = computed(() => {
return hasPermission(
this.info().globalPermissions,
this.info()?.globalPermissions,
permissions.enableStatistics
);
});
protected readonly hasPermissionForSubscription = computed(() => {
return hasPermission(
this.info().globalPermissions,
this.info()?.globalPermissions,
permissions.enableSubscription
);
});
protected readonly hasPermissionToAccessFearAndGreedIndex = computed(() => {
return hasPermission(
this.info().globalPermissions,
this.info()?.globalPermissions,
permissions.enableFearAndGreedIndex
);
});

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

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

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

@ -17,7 +17,7 @@
hasPermissionForSubscription && hasPermissionToUpdateUserSettings
) {
<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>
} @else {
<ng-container i18n>Upgrade Plan</ng-container>

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

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

Loading…
Cancel
Save