Skip to content

Commit 6224a11

Browse files
authored
Merge pull request #1275 from bcgov/stories/ecer-4383
Stories/ecer 4383
2 parents 85123a4 + 2e49489 commit 6224a11

File tree

22 files changed

+551
-1655
lines changed

22 files changed

+551
-1655
lines changed

src/ECER.Clients.RegistryPortal/ECER.Clients.RegistryPortal.Server/ConfigurationEndpoints.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ public void Register(IEndpointRouteBuilder endpointRouteBuilder)
2828
.WithOpenApi("Handles province queries", string.Empty, "province_get")
2929
.CacheOutput(p => p.Expire(TimeSpan.FromMinutes(5)));
3030

31+
32+
endpointRouteBuilder.MapGet("/api/defaultContents", async (HttpContext ctx, IMediator messageBus, IMapper mapper, CancellationToken ct) =>
33+
{
34+
var results = await messageBus.Send(new DefaultContentsQuery(), ct);
35+
return TypedResults.Ok(mapper.Map<IEnumerable<DefaultContent>>(results.Items));
36+
})
37+
.WithOpenApi("Handles default contents", string.Empty, "defaultContent_get")
38+
.CacheOutput(p => p.Expire(TimeSpan.FromMinutes(5)));
39+
3140
endpointRouteBuilder.MapGet("/api/countrylist", async (HttpContext ctx, IMediator messageBus, IMapper mapper, CancellationToken ct) =>
3241
{
3342
var results = await messageBus.Send(new CountriesQuery(), ct);
@@ -134,3 +143,9 @@ public record ComparisonRecord()
134143
public OutOfProvinceCertificationType? TransferringCertificate { get; set; }
135144
public IEnumerable<CertificationComparison> Options { get; set; } = Array.Empty<CertificationComparison>();
136145
}
146+
public record DefaultContent
147+
{
148+
public string? Name { get; set; }
149+
public string? SingleText { get; set; }
150+
public string? MultiText { get; set; }
151+
}

src/ECER.Clients.RegistryPortal/ECER.Clients.RegistryPortal.Server/ConfigurationMapper.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ public ConfigurationMapper()
1414
CreateMap<Managers.Admin.Contract.Metadatas.OutOfProvinceCertificationType, OutOfProvinceCertificationType>().ReverseMap();
1515
CreateMap<Managers.Admin.Contract.Metadatas.CertificationComparison, CertificationComparison>().ReverseMap();
1616
CreateMap<Managers.Admin.Contract.Metadatas.ComparisonRecord, ComparisonRecord>().ReverseMap();
17+
CreateMap<Managers.Admin.Contract.Metadatas.DefaultContent, DefaultContent>().ReverseMap();
1718
}
1819
}

src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/package-lock.json

Lines changed: 404 additions & 1556 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/src/api/configuration.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ const getConfiguration = async (): Promise<Components.Schemas.ApplicationConfigu
66
return (await client.configuration_get()).data;
77
};
88

9+
const getDefaultContent = async (): Promise<Components.Schemas.DefaultContent[] | null | undefined> => {
10+
const client = await getClient(false);
11+
return (await client.defaultContent_get()).data;
12+
};
13+
914
const getProvinceList = async (): Promise<Components.Schemas.Province[] | null | undefined> => {
1015
const client = await getClient(false);
1116
return (await client.province_get()).data;
@@ -53,4 +58,5 @@ export {
5358
getRecaptchaSiteKey,
5459
getSystemMessages,
5560
getIdentificationTypes,
61+
getDefaultContent,
5662
};

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

Lines changed: 0 additions & 50 deletions
This file was deleted.

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

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,7 @@
44
<h1 class="mb-5">Declaration and consent</h1>
55
<p>You must read and agree to the following to apply for certification.</p>
66
<br />
7-
<ul class="ml-10">
8-
<li>I understand that the ECE Registry may require additional information (including supporting documents) in connection with this application.</li>
9-
<li>
10-
I confirm that the information provided in this application is complete and accurate. I understand if inaccurate information is submitted it may result
11-
in the denial of certification.
12-
</li>
13-
<li>
14-
I understand that information in this application or subsequently provided information may be reviewed, audited, and verified for the purpose of
15-
determining or auditing my eligibility for an ECE Certificate in British Columbia.
16-
</li>
17-
<li>
18-
I understand that the ECE Registry may take disciplinary actions against me, including action to cancel my certification, if I have, by omission or
19-
commission, knowingly given false or misleading information in the course of completing this application.
20-
</li>
21-
<li>
22-
I consent the work experience and character references indicated in this application to provide the ECE Registry with this reference and other
23-
information as part of my application for certification.
24-
</li>
25-
</ul>
7+
<p class="ml-10 multiline">{{ configStore.defaultContents.find((content) => content.name == "New BC Recognized Application")?.multiText }}</p>
268

279
<v-form ref="declarationForm">
2810
<v-row>
@@ -59,7 +41,6 @@
5941
import { DateTime } from "luxon";
6042
import { defineComponent } from "vue";
6143
import type { VForm } from "vuetify/components";
62-
6344
import { getProfile } from "@/api/profile";
6445
import Breadcrumb from "@/components/Breadcrumb.vue";
6546
import EceCheckbox from "@/components/inputs/EceCheckbox.vue";
@@ -68,6 +49,7 @@ import EceDateInput from "@/components/inputs/EceDateInput.vue";
6849
import { useAlertStore } from "@/store/alert";
6950
import { useApplicationStore } from "@/store/application";
7051
import { useLoadingStore } from "@/store/loading";
52+
import { useConfigStore } from "@/store/config";
7153
import { useUserStore } from "@/store/user";
7254
import { formatDate } from "@/utils/format";
7355
import * as Rules from "@/utils/formRules";
@@ -79,6 +61,7 @@ export default defineComponent({
7961
async setup() {
8062
const userStore = useUserStore();
8163
const applicationStore = useApplicationStore();
64+
const configStore = useConfigStore();
8265
const alertStore = useAlertStore();
8366
const loadingStore = useLoadingStore();
8467
const router = useRouter();
@@ -154,7 +137,7 @@ export default defineComponent({
154137
},
155138
];
156139
157-
return { items, Rules, userStore, applicationStore, alertStore, loadingStore, router };
140+
return { items, Rules, userStore, applicationStore, alertStore, loadingStore, configStore, router };
158141
},
159142
data() {
160143
return {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<v-container>
66
<v-row v-for="systemMessage in configStore.systemMessages" class="mt-10 mb-10">
77
<v-col v-if="systemMessage.portalTags && systemMessage.portalTags.includes('LOOKUP')" cols="12">
8-
<Banner type="info" :title="systemMessage.message ? systemMessage.message : ''" />
8+
<Alert title="Alert">{{ systemMessage.message ? systemMessage.message : "" }}</Alert>
99
</v-col>
1010
</v-row>
1111
<v-row>
@@ -120,10 +120,10 @@ import { formatDate } from "@/utils/format";
120120
import { isNumber } from "@/utils/formInput";
121121
import { postLookupCertificate } from "@/api/certification";
122122
import { useConfigStore } from "@/store/config";
123-
import Banner from "@/components/Banner.vue";
124123
import * as Rules from "../utils/formRules";
125124
import EceRecaptcha from "./inputs/EceRecaptcha.vue";
126125
import type { Components } from "@/types/openapi";
126+
import Alert from "@/components/Alert.vue";
127127
128128
interface LookupCertificationData {
129129
recaptchaToken: string;
@@ -134,7 +134,7 @@ type ReadonlyHeaders = VDataTable["$props"]["headers"];
134134
135135
export default defineComponent({
136136
name: "LookupCertification",
137-
components: { EceRecaptcha, EceTextField, Banner },
137+
components: { EceRecaptcha, EceTextField, Alert },
138138
setup() {
139139
const alertStore = useAlertStore();
140140
const lookupCertificationStore = useLookupCertificationStore();

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<PageContainer :margin-top="false">
99
<div v-for="systemMessage in configStore.systemMessages">
1010
<div v-if="systemMessage.portalTags && systemMessage.portalTags.includes('LOGIN')" class="d-flex flex-column ga-3 mb-10">
11-
<Banner type="info" :title="systemMessage.message ? systemMessage.message : ''" />
11+
<Alert title="Alert">{{ systemMessage.message ? systemMessage.message : "" }}</Alert>
1212
</div>
1313
</div>
1414
<v-row>
@@ -40,11 +40,11 @@ import { useOidcStore } from "@/store/oidc";
4040
import { useUserStore } from "@/store/user";
4141
import { useConfigStore } from "@/store/config";
4242
import { useDisplay } from "vuetify";
43-
import Banner from "../Banner.vue";
43+
import Alert from "../Alert.vue";
4444
4545
export default defineComponent({
4646
name: "Login",
47-
components: { LoginCard, PageContainer, Banner },
47+
components: { LoginCard, PageContainer, Alert },
4848
setup() {
4949
const userStore = useUserStore();
5050
const oidcStore = useOidcStore();

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<Banner type="error" title="404 Error - Page not found" />
2+
<Alert type="error" title="404 Error - Page not found" />
33
<v-container>
44
<div class="d-flex flex-column ga-10 mt-10">
55
<h3>The page you’re looking for might have been removed, moved, or is temporarily unavailable.</h3>
@@ -21,11 +21,11 @@
2121
</template>
2222

2323
<script lang="ts">
24-
import Banner from "@/components/Banner.vue";
2524
import { useRouter } from "vue-router";
25+
import Alert from "../Alert.vue";
2626
export default {
2727
name: "PageNotFound",
28-
components: { Banner },
28+
components: { Alert },
2929
setup() {
3030
const router = useRouter();
3131
return { router };
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
<template>
22
<Banner type="error" title="Sorry, this link is no longer valid" />
3+
34
</template>
45

56
<script lang="ts">
67
import { defineComponent } from "vue";
78
8-
import Banner from "@/components/Banner.vue";
9+
import Alert from "../Alert.vue";
910
1011
export default defineComponent({
1112
name: "Invalid",
12-
components: { Banner },
13+
components: { Alert },
1314
});
1415
</script>

0 commit comments

Comments
 (0)