Skip to content

Commit

Permalink
fix: updated content to use v-show (bcgov#409)
Browse files Browse the repository at this point in the history
  • Loading branch information
EPortman authored Oct 7, 2024
1 parent 088c5f4 commit 2473196
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions web/site/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ const index2 = computed(() =>
contentDocs.value?.find(doc => doc._path === '/index/2')
)
const submittedSuccessText = computed(() => {
contentDocs.value?.find(doc => doc._path === '/submitted/success-text')
return contentDocs.value?.find(doc => doc._path === '/submitted/success-text')
})
const submittedPlatformInfo = computed(() => {
contentDocs.value?.find(doc => doc._path === '/submitted/platform-info')
return contentDocs.value?.find(doc => doc._path === '/submitted/platform-info')
})
provide('sbc-bar-help-docs', helpDocs)
provide('sbc-bar-index1', index1)
Expand Down
10 changes: 5 additions & 5 deletions web/site/pages/submitted.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
const submittedSuccessText = inject('sbc-bar-success-text')
const submittedPlatformInfo = inject('sbc-bar-platform-info')
const submittedSuccessText = inject<Record<string, any>>('sbc-bar-success-text')
const submittedPlatformInfo = inject<Record<string, any>>('sbc-bar-platform-info')
const { t } = useI18n()
const route = useRoute()
const busStore = useBusinessStore()
Expand Down Expand Up @@ -60,7 +60,7 @@ const handleFileNextReport = async () => {
return navigateTo(localePath('/annual-report'))
}
// Compute whether there are more reports (TO_DO)
// Compute whether there are more reports
const isMoreReports = () => {
const dueDates = busStore.getArDueDates()
return dueDates && dueDates.length > 0
Expand All @@ -73,7 +73,7 @@ if (import.meta.client) {

<template>
<client-only>
<div v-if="!pageLoading && !deepEqual(busStore.businessNano, {})" class="mx-auto flex flex-col items-center justify-center gap-4 text-center sm:w-4/5 xl:w-3/5">
<div v-show="!pageLoading" class="mx-auto flex flex-col items-center justify-center gap-4 text-center sm:w-4/5 xl:w-3/5">
<SbcPageSectionH1 class="mb-2 mt-3 flex items-center">
<span>{{ $t('page.submitted.h1', { year: lastARDate!.getFullYear() }) }}</span>
<UIcon name="i-mdi-check-circle-outline" class="size-10 shrink-0 text-outcomes-approved" />
Expand All @@ -83,7 +83,7 @@ if (import.meta.client) {

<SbcNuxtContentCard id="submitted-success-text" route-suffix="/success-text" :content="submittedSuccessText" />

<UCard v-if="isMoreReports()" class="w-full" data-testid="bus-details-card">
<UCard v-show="isMoreReports()" class="w-full" data-testid="bus-details-card">
<SbcFileAnotherReport
:items="[
{ label: $t('labels.busName'), value: busStore.businessNano.legalName },
Expand Down

0 comments on commit 2473196

Please sign in to comment.