Skip to content

Commit

Permalink
Merge pull request #1497 from bcgov/feature/vue3
Browse files Browse the repository at this point in the history
Nom roll Vue3
  • Loading branch information
arcshiftsolutions authored Jul 12, 2023
2 parents f79bc0d + 1424966 commit 437ef22
Show file tree
Hide file tree
Showing 8 changed files with 487 additions and 377 deletions.
2 changes: 1 addition & 1 deletion backend/src/components/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ function getPaginatedListForSCGroups(apiName, url, handleResponse) {
pageNumber: req.query.pageNumber,
pageSize,
sort: req.query.sort,
searchCriteriaList: JSON.stringify(req.query.searchQueries.map((query) => JSON.parse(query)))
searchCriteriaList: JSON.stringify(req.query.searchQueries)
}
};

Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/common/DocumentUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
:accept="fileAccept"
:rules="fileRules"
variant="underlined"
label="Select your file"
:disabled="hasReadOnlyRoleAccess()"
placeholder="Select your file"
hint="JPEG, PNG, CSV, MS-WORD, MS-EXCEL, .STD, .VER and PDF files supported"
Expand Down
15 changes: 15 additions & 0 deletions frontend/src/components/common/PenRequestSearchPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
min-length="8"
:rules="validateField(searchParams.mincode, isValidMincode, mincodeHint)"
density="compact"
variant="underlined"
autofocus
@keyup.enter="enterPushed()"
@input="searchHasValues"
Expand All @@ -34,6 +35,7 @@
color="#003366"
label="Legal Surname"
maxlength="255"
variant="underlined"
tabindex="2"
density="compact"
@keyup.enter="enterPushed()"
Expand All @@ -50,6 +52,7 @@
tabindex="3"
color="#003366"
label="Legal Given"
variant="underlined"
maxlength="255"
density="compact"
@keyup.enter="enterPushed()"
Expand All @@ -66,6 +69,7 @@
v-model.trim="searchParams.legalMiddleNames"
color="#003366"
label="Legal Middle"
variant="underlined"
tabindex="4"
maxlength="255"
density="compact"
Expand All @@ -83,6 +87,7 @@
tabindex="5"
color="#003366"
label="Gender"
variant="underlined"
maxlength="1"
:rules="validateField(searchParams.genderCode, isValidGender, genderHint)"
density="compact"
Expand All @@ -100,6 +105,7 @@
tabindex="6"
color="#003366"
label="Birth Date"
variant="underlined"
:rules="validateField(searchParams.dob, isValidDob, dobHint)"
maxlength="10"
min-length="10"
Expand All @@ -119,6 +125,7 @@
color="#003366"
label="Suggested PEN"
maxlength="9"
variant="underlined"
minlength="9"
tabindex="7"
density="compact"
Expand All @@ -137,6 +144,7 @@
v-model="searchParams.assignedPEN"
color="#003366"
label="Assigned PEN"
variant="underlined"
maxlength="9"
minlength="9"
:tabindex="fields.assignedPEN && fields.assignedPEN.tabindex || 8"
Expand All @@ -157,6 +165,7 @@
v-model="searchParams.localID"
color="#003366"
tabindex="9"
variant="underlined"
label="Local ID"
maxlength="12"
:rules="validateField(searchParams.localID)"
Expand All @@ -176,6 +185,7 @@
color="#003366"
label="Usual Surname"
tabindex="10"
variant="underlined"
maxlength="255"
density="compact"
@keyup.enter="enterPushed()"
Expand All @@ -193,6 +203,7 @@
color="#003366"
label="Usual Given"
tabindex="11"
variant="underlined"
maxlength="255"
density="compact"
@keyup.enter="enterPushed()"
Expand All @@ -210,6 +221,7 @@
color="#003366"
label="Usual Middle"
tabindex="12"
variant="underlined"
maxlength="255"
density="compact"
@keyup.enter="enterPushed()"
Expand All @@ -227,6 +239,7 @@
tabindex="13"
color="#003366"
label="Postal Code"
variant="underlined"
maxlength="7"
density="compact"
@input="[searchHasValues(),upperCaseInput('postalCode')]"
Expand All @@ -242,6 +255,7 @@
v-model="searchParams.gradeCode"
color="#003366"
label="Grade"
variant="underlined"
tabindex="14"
maxlength="2"
:rules="validateField(searchParams.gradeCode, isValidGradeCode, gradeHint)"
Expand All @@ -261,6 +275,7 @@
v-model="searchParams.submittedPen"
color="#003366"
label="Submitted PEN"
variant="underlined"
maxlength="9"
minlength="9"
tabindex="15"
Expand Down
70 changes: 34 additions & 36 deletions frontend/src/components/nominal-roll/MapSchoolCodeModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,35 @@
v-model="mapSchoolCodeDialog"
max-width="60%"
>
<template #activator="{ on, attrs }">
<template #activator="{ props }">
<TertiaryButton
id="add-school-code"
icon="$plus"
icon="mdi-plus-circle"
short
class="mx-0 mt-1 pl-2 pr-0"
class-modifier="mt-4 pr-0 pl-1 ml-2"
min-width="20px"
:bind="attrs"
:on="on"
:bind="props"
/>
</template>
<v-card fluid>
<v-card-title>
<span> Map school code </span>
<v-spacer />
<v-btn
id="mapSchoolCodeDialogCloseBtn"
text
icon
@click="mapSchoolCodeDialog = false"
>
<v-icon
large
color="#38598A"
>
mdi-close
</v-icon>
</v-btn>
<v-row>
<v-col class="mt-2">
<span style="font-size: x-large;font-weight: bold">Map School Code</span>
</v-col>
<v-col class="d-flex justify-end">
<v-btn
id="mapSchoolCodeDialogCloseBtn"
text
variant="flat"
icon="mdi-close"
@click="mapSchoolCodeDialog = false"
>
</v-btn>
</v-col>
</v-row>
</v-card-title>
<v-spacer />
<v-spacer/>
<v-card-text>
<v-form
ref="addSchoolCodeForm"
Expand Down Expand Up @@ -62,9 +61,8 @@
<v-text-field
id="federalCodeTxtField"
v-model="federalCode"
outlined
dense
filled
variant="outlined"
density="compact"
:rules="requiredRules"
required
tabindex="1"
Expand Down Expand Up @@ -92,17 +90,14 @@
id="schoolNameTxtField"
v-model="mincode"
:items="schools"
:messages="mincode && schoolApiMincodeSchoolNames.get(mincode)"
item-title="text"
item-value="value"
:rules="requiredRules"
tabindex="2"
clearable
filled
outlined
dense
variant="outlined"
density="compact"
>
<template #selection="{ item }">
<span> {{ item.value }} </span>
</template>
</v-autocomplete>
</v-col>
</v-row>
Expand All @@ -112,7 +107,7 @@
</v-card-text>

<v-card-actions class="mr-4 pb-6">
<v-spacer />
<v-spacer/>
<PrimaryButton
id="mapSchoolCodeDialogCancelBtn"
text="Cancel"
Expand Down Expand Up @@ -170,7 +165,10 @@ export default {
...mapState(appStore, ['schoolApiMincodeSchoolNames']),
...mapState(nominalRollStore, ['fedProvSchoolCodes']),
schools() {
return _.sortBy(Array.from(this.schoolApiMincodeSchoolNames.entries()).map(school => ({ text: `${school[0]} - ${school[1]}`, value: school[0]})), ['value']);
return _.sortBy(Array.from(this.schoolApiMincodeSchoolNames.entries()).map(school => ({
text: `${school[0]} - ${school[1]}`,
value: school[0]
})), ['value']);
},
},
beforeMount() {
Expand All @@ -179,7 +177,7 @@ export default {
methods: {
createFedProvSchoolCode() {
if (this.$refs.addSchoolCodeForm.validate()) {
if(this.fedProvSchoolCodes.find(obj => obj.federalCode === this.federalCode)) {
if (this.fedProvSchoolCodes.find(obj => obj.federalCode === this.federalCode)) {
this.setFailureAlert('Federal School Code already exists');
return;
}
Expand Down Expand Up @@ -213,9 +211,9 @@ export default {
</script>

<style scoped>
.v-select-list/deep/.v-list-item__mask {
.v-select-list /deep/ .v-list-item__mask {
color: rgb(0, 0, 0);
font-weight: bold;
background: rgba(238, 238, 238, 0.02);
}
}
</style>
Loading

0 comments on commit 437ef22

Please sign in to comment.