Skip to content

Commit 618b3ae

Browse files
committed
ECER-5113: ICRA Card added to dashboard, conditional functionalitities handled
1 parent ccbefe8 commit 618b3ae

File tree

2 files changed

+98
-26
lines changed

2 files changed

+98
-26
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<template>
2+
<v-card :rounded="!isRounded ? '0' : ''" variant="outlined" class="h-100 d-flex flex-column justify-space-between h-100">
3+
<v-card-item class="ma-4">
4+
<h2>Apply with international certification</h2>
5+
<p class="small mt-4">
6+
Apply for
7+
<b>ECE Five Year Certification</b>
8+
if you are internationally certified in a country that regulates the ECE profession and do not have 500 hours work experience supervised by a
9+
Canadian-certified ECE.
10+
</p>
11+
</v-card-item>
12+
13+
<div class="d-flex flex-row justify-start ga-3 flex-wrap ma-4">
14+
<v-card-actions>
15+
<router-link to="test">Learn more</router-link>
16+
</v-card-actions>
17+
</div>
18+
</v-card>
19+
</template>
20+
21+
<script lang="ts">
22+
import { defineComponent } from "vue";
23+
import { useRouter } from "vue-router";
24+
25+
export default defineComponent({
26+
name: "IcraCard",
27+
props: {
28+
isRounded: {
29+
type: Boolean,
30+
default: true,
31+
},
32+
},
33+
34+
setup() {
35+
const router = useRouter();
36+
return { router };
37+
},
38+
});
39+
</script>

src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/src/components/pages/Dashboard.vue

Lines changed: 59 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,9 @@
7373
<v-col v-if="showTransferCard" cols="12" sm="6">
7474
<TransferCard />
7575
</v-col>
76+
<v-col v-if="showIcraCard" cols="12" sm="6">
77+
<IcraCard />
78+
</v-col>
7679
</v-row>
7780
</v-col>
7881
</v-row>
@@ -131,37 +134,55 @@
131134
<ECEHeader title="Need other options?" />
132135
</v-col>
133136
</v-row>
134-
<v-row>
135-
<v-col cols="12" sm="6">
136-
<Card>
137+
<v-row align="stretch">
138+
<v-col class="d-flex" cols="12" sm="6" md="4">
139+
<Card class="d-flex flex-column">
137140
<h2>Apply for new certification</h2>
138141
<p class="mt-4">Start an application for a new certificate level based on your education and work experience.</p>
139-
<v-btn
140-
:variant="certificationStore.holdsPostBasicCertification ? 'outlined' : 'flat'"
141-
size="large"
142-
color="primary"
143-
id="btnNeedOtherOptions"
144-
class="mt-12"
145-
@click="handleStartNewApplication"
146-
>
147-
Apply now
148-
</v-btn>
142+
<div class="mt-auto">
143+
<v-btn
144+
:variant="certificationStore.holdsPostBasicCertification ? 'outlined' : 'flat'"
145+
size="large"
146+
class="mt-4"
147+
color="primary"
148+
id="btnNeedOtherOptions"
149+
@click="handleStartNewApplication"
150+
>
151+
Apply now
152+
</v-btn>
153+
</div>
149154
</Card>
150155
</v-col>
151-
<v-col cols="12" sm="6">
152-
<Card>
156+
<v-col class="d-flex" cols="12" sm="6" md="4">
157+
<Card class="d-flex flex-column">
153158
<h2>Transfer certification</h2>
154159
<p class="mt-4">If you are certified in another province or territory in Canada, you may be eligible to transfer your certification to B.C.</p>
155-
<v-btn
156-
:variant="certificationStore.holdsPostBasicCertification ? 'outlined' : 'flat'"
157-
size="large"
158-
color="primary"
159-
id="btnNeedOtherOptions"
160-
class="mt-12"
161-
@click="handleTransfer"
162-
>
163-
Transfer
164-
</v-btn>
160+
<div class="mt-auto">
161+
<v-btn
162+
:variant="certificationStore.holdsPostBasicCertification ? 'outlined' : 'flat'"
163+
size="large"
164+
class="mt-4"
165+
color="primary"
166+
id="btnNeedOtherOptions"
167+
@click="handleTransfer"
168+
>
169+
Transfer
170+
</v-btn>
171+
</div>
172+
</Card>
173+
</v-col>
174+
<v-col v-if="configurationStore.applicationConfiguration.icraFeatureEnabled" class="d-flex" cols="12" sm="6" md="4">
175+
<Card class="d-flex flex-column">
176+
<h2>Apply with international certification</h2>
177+
<p class="mt-4">
178+
Apply for
179+
<b>ECE Five Year Certification</b>
180+
if you are internationally certified in a country that regulates the ECE profession and do not have 500 hours work experience supervised by a
181+
Canadian-certified ECE.
182+
</p>
183+
<div class="mt-auto">
184+
<router-link class="mt-4" to="test">Learn more</router-link>
185+
</div>
165186
</Card>
166187
</v-col>
167188
</v-row>
@@ -198,13 +219,15 @@ import ActionCard from "@/components/ActionCard.vue";
198219
import Alert from "@/components/Alert.vue";
199220
import ApplicationCard from "@/components/ApplicationCard.vue";
200221
import TransferCard from "@/components/TransferCard.vue";
222+
import IcraCard from "@/components/IcraCard.vue";
201223
import CertificationCard from "@/components/CertificationCard.vue";
202224
import ConfirmationDialog from "@/components/ConfirmationDialog.vue";
203225
import ECEHeader from "@/components/ECEHeader.vue";
204226
import PageContainer from "@/components/PageContainer.vue";
205227
import UnreadMessages from "@/components/UnreadMessages.vue";
206228
import { useAlertStore } from "@/store/alert";
207229
import { useApplicationStore } from "@/store/application";
230+
import { useConfigStore } from "@/store/config";
208231
import { useCertificationStore } from "@/store/certification";
209232
import { useMessageStore } from "@/store/message";
210233
import { useUserStore } from "@/store/user";
@@ -221,6 +244,7 @@ export default defineComponent({
221244
PageContainer,
222245
ApplicationCard,
223246
TransferCard,
247+
IcraCard,
224248
CertificationCard,
225249
ECEHeader,
226250
ActionCard,
@@ -233,6 +257,7 @@ export default defineComponent({
233257
const userStore = useUserStore();
234258
const router = useRouter();
235259
const applicationStore = useApplicationStore();
260+
const configurationStore = useConfigStore();
236261
const certificationStore = useCertificationStore();
237262
const alertStore = useAlertStore();
238263
const loadingStore = useLoadingStore();
@@ -243,6 +268,7 @@ export default defineComponent({
243268
oidcStore,
244269
userStore,
245270
applicationStore,
271+
configurationStore,
246272
alertStore,
247273
loadingStore,
248274
messageStore,
@@ -296,7 +322,7 @@ export default defineComponent({
296322
return this.showTransferCard ? "Apply for ECE certification in B.C." : "My ECE Registry dashboard";
297323
},
298324
subheading(): string {
299-
return this.showTransferCard ? "There are two options to get certified in British Columbia." : "";
325+
return this.showTransferCard ? "Review your options to get certified in British Columbia." : "";
300326
},
301327
showApplicationCard(): boolean {
302328
if (this.certificationStore.hasCertifications && this.applicationStore.applicationStatus === undefined) {
@@ -317,6 +343,13 @@ export default defineComponent({
317343
showTransferCard(): boolean {
318344
return !this.certificationStore.hasCertifications && !this.applicationStore.hasApplication && !this.applicationStore.hasDraftApplication;
319345
},
346+
showIcraCard(): boolean {
347+
return (
348+
(this.configurationStore.applicationConfiguration.icraFeatureEnabled ?? false) &&
349+
!this.applicationStore.hasApplication &&
350+
!this.applicationStore.hasDraftApplication
351+
);
352+
},
320353
showLoading(): boolean {
321354
return (
322355
this.dataNotFetched ||

0 commit comments

Comments
 (0)