Skip to content

Commit

Permalink
Vue3 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
arcshiftsolutions committed Jul 28, 2023
1 parent 450a68f commit a9ecebd
Show file tree
Hide file tree
Showing 10 changed files with 161 additions and 124 deletions.
49 changes: 18 additions & 31 deletions frontend/src/components/common/CreateNewPenModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,14 @@
>
<v-card>
<v-card-title class="px-0 pb-0 pt-5">
<v-list-item>
<v-list-item class="pt-0 pl-2">
<slot name="headLine">
<v-list-item-title class="headline">
Create New PEN
</v-list-item-title>
</slot>
</v-list-item>
<v-list-item-media class="my-0">
<v-row class="px-6">
<v-col class="d-flex justify-start">
<span class="headline">Create New PEN</span>
</v-col>
<v-col class="d-flex justify-end">
<v-btn
id="closeCreateNewPenModalBtn"
text
variant="flat"
icon
@click="createNewPenDialog=false"
>
Expand All @@ -28,8 +24,8 @@
mdi-close
</v-icon>
</v-btn>
</v-list-item-media>
</v-list-item>
</v-col>
</v-row>
</v-card-title>
<v-spacer />
<v-card-text>
Expand Down Expand Up @@ -61,7 +57,7 @@
<v-text-field
id="createNewPenFormLegalLastName"
v-model="student.legalLastName"
outlined
variant="outlined"
density="compact"
filled
readonly
Expand All @@ -77,7 +73,7 @@
<v-text-field
id="createNewPenFormLegalFirstName"
v-model="student.legalFirstName"
outlined
variant="outlined"
density="compact"
filled
readonly
Expand All @@ -93,7 +89,7 @@
<v-text-field
id="createNewPenFormLegalMiddleNames"
v-model="student.legalMiddleNames"
outlined
variant="outlined"
density="compact"
filled
tabindex="3"
Expand Down Expand Up @@ -129,7 +125,7 @@
<v-text-field
id="createNewPenFormUsualLastName"
v-model="student.usualLastName"
outlined
variant="outlined"
density="compact"
filled
tabindex="4"
Expand All @@ -146,7 +142,7 @@
<v-text-field
id="createNewPenFormUsualFirstName"
v-model="student.usualFirstName"
outlined
variant="outlined"
density="compact"
filled
tabindex="5"
Expand All @@ -163,7 +159,7 @@
<v-text-field
id="createNewPenFormUsualMiddleNames"
v-model="student.usualMiddleNames"
outlined
variant="outlined"
density="compact"
filled
tabindex="6"
Expand All @@ -186,16 +182,7 @@
</v-col>
<v-spacer />
<v-col cols="3">
<strong>Birth Date
<v-btn
icon
x-small
title="YYYYMMDD"
>
<v-icon color="#2196f3">
info
</v-icon>
</v-btn>
<strong>Birth Date (YYYYMMDD)
</strong>
</v-col>
<v-spacer />
Expand All @@ -209,7 +196,7 @@
<v-text-field
id="createNewPenFormGender"
v-model="student.genderCode"
outlined
variant="outlined"
density="compact"
filled
readonly
Expand All @@ -223,7 +210,7 @@
id="createNewPenFormDOB"
v-model="student.dob"
readonly
outlined
variant="outlined"
density="compact"
filled
:error-messages="err.birthDateError"
Expand All @@ -235,7 +222,7 @@
<v-text-field
id="createNewPenFormLocalID"
v-model="student.localID"
outlined
variant="outlined"
density="compact"
filled
tabindex="9"
Expand Down
17 changes: 14 additions & 3 deletions frontend/src/components/common/SearchDemographicModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
</v-card-title>
<v-spacer/>
<v-card-text>
<div>{{isValidForm}}</div>
<v-form
ref="searchDemographicModalForm"
:model-value="isValidForm"
Expand Down Expand Up @@ -62,6 +61,7 @@
:readonly="isFieldReadOnly(STUDENT_DETAILS_FIELDS.LEGAL_LAST_NAME)"
:rules="validateLegalLastName()"
:onkeyup="upperCaseInput(STUDENT_DETAILS_FIELDS.LEGAL_LAST_NAME)"
@update:model-value="validateForm"
required
tabindex="1"
clearable
Expand All @@ -87,6 +87,7 @@
variant="outlined"
density="compact"
filled
@update:model-value="validateForm"
:readonly="isFieldReadOnly(STUDENT_DETAILS_FIELDS.LEGAL_FIRST_NAME)"
:onkeyup="upperCaseInput(STUDENT_DETAILS_FIELDS.LEGAL_FIRST_NAME)"
tabindex="2"
Expand Down Expand Up @@ -115,6 +116,7 @@
v-model="student.legalMiddleNames"
variant="outlined"
density="compact"
@update:model-value="validateForm"
filled
:readonly="isFieldReadOnly(STUDENT_DETAILS_FIELDS.LEGAL_MIDDLE_NAMES)"
tabindex="3"
Expand Down Expand Up @@ -144,6 +146,7 @@
v-model="student.usualLastName"
variant="outlined"
density="compact"
@update:model-value="validateForm"
filled
:readonly="isFieldReadOnly(STUDENT_DETAILS_FIELDS.USUAL_LAST_NAME)"
tabindex="4"
Expand Down Expand Up @@ -172,6 +175,7 @@
id="searchDemogModalUsualFirstNameTxtField"
v-model="student.usualFirstName"
variant="outlined"
@update:model-value="validateForm"
density="compact"
filled
:readonly="isFieldReadOnly(STUDENT_DETAILS_FIELDS.USUAL_FIRST_NAME)"
Expand Down Expand Up @@ -201,6 +205,7 @@
id="searchDemogModalUsualMiddleNameTxtField"
v-model="student.usualMiddleNames"
variant="outlined"
@update:model-value="validateForm"
density="compact"
filled
:readonly="isFieldReadOnly(STUDENT_DETAILS_FIELDS.USUAL_MIDDLE_NAMES)"
Expand Down Expand Up @@ -228,6 +233,7 @@
v-model="student.genderCode"
variant="outlined"
density="compact"
@update:model-value="validateForm"
class="hoverField"
filled
:readonly="isFieldReadOnly(STUDENT_DETAILS_FIELDS.GENDER_CODE)"
Expand Down Expand Up @@ -255,6 +261,7 @@
<FormattedTextField
id="searchDemogModalDobTxtField"
v-model="student.dob"
@update:model-value="validateForm"
:readonly="isFieldReadOnly(STUDENT_DETAILS_FIELDS.DOB)"
:rules="validateDOB()"
maxlength="8"
Expand All @@ -281,6 +288,7 @@
v-model="student.gradeCode"
variant="outlined"
density="compact"
@update:model-value="validateForm"
filled
:readonly="isFieldReadOnly(STUDENT_DETAILS_FIELDS.GRADE_CODE)"
:rules="validateGradeCode()"
Expand Down Expand Up @@ -312,6 +320,7 @@
v-model="student.postalCode"
:readonly="isFieldReadOnly(STUDENT_DETAILS_FIELDS.POSTAL_CODE)"
maxlength="7"
@update:model-value="validateForm"
tabindex="10"
:onkeyup="upperCaseInput(STUDENT_DETAILS_FIELDS.POSTAL_CODE)"
:format="formatPostalCode"
Expand Down Expand Up @@ -339,6 +348,7 @@
v-model="student.mincode"
:readonly="isFieldReadOnly(STUDENT_DETAILS_FIELDS.MINCODE)"
:rules="validateMincode()"
@update:model-value="validateForm"
maxlength="8"
:async-messages="mincodeErrors"
tabindex="11"
Expand All @@ -356,7 +366,8 @@
<v-spacer/>
<slot
name="actions"
:is-form-valid="isFormValid"
:searchEnabled="isValidForm"
:modifySearch="modifySearch"
/>
</v-card-actions>
</v-card>
Expand Down Expand Up @@ -453,7 +464,7 @@ export default {
'Invalid Gender Code'
];
},
isFormValid() {
modifySearch() {
if (this.$refs.searchDemographicModalForm.validate()) {
this.$emit('updateStudent', this.student);
}
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/components/common/StudentDetailsInfoPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
@closeDialog="closeDialog"
@updateStudent="updateStudent"
>
<template #actions="{ isFormValid }">
<template #actions="{ modifySearch, searchEnabled }">
<PrimaryButton
id="cancel"
:secondary="true"
Expand All @@ -27,7 +27,8 @@
id="searchDemogModalSearchBtn"
width="15%"
text="Modify Request"
@click-action="isFormValid"
:disabled="!searchEnabled"
@click-action="modifySearch()"
/>
<PrimaryButton
id="runAdvancedSearch"
Expand Down Expand Up @@ -155,7 +156,6 @@
<v-data-table
:headers="validationErrorFieldHeaders"
:items="validationErrorFields"
hide-default-footer
/>
</v-card>
</v-row>
Expand Down Expand Up @@ -230,8 +230,8 @@ export default {
{ title: '',text: '', value: '', sortable: false, key: 'none' }
],
validationErrorFieldHeaders: [
{ text: 'Field Name', value: 'uiFieldName', sortable: false },
{ text: 'Error Description', value: 'description', sortable: false }
{ title: 'Field Name', text: 'Field Name', value: 'uiFieldName', key: 'uiFieldName', sortable: false },
{ title: 'Error Description', text: 'Error Description', value: 'description', key: 'description', sortable: false }
],
modalStudent: {},
dialog: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ export default {
let result = true;
result = await this.$refs.confirmationDialogIgnore.open('Are you sure you want to ignore this student record?', '',
{
width: '760px',
width: '850px',
messagePadding: 'px-4 pt-1',
color: '',
dark: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ export default {
let result = true;
result = await this.$refs.confirmationDialogIgnore.open('Are you sure you want to ignore these student record(s)?', 'All selected records will be ignored.',
{
width: '680px',
width: '850px',
messagePadding: 'px-4 pt-1',
color: '',
dark: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,9 @@
/>
<PenRequestBatchHistoryModal
v-if="historyModalOpen"
v-model="historyModalOpen"
:value="historyModalOpen"
:batch-file="hoveredOveredRow"
@close-dialog="historyModalOpen = false"
/>
</div>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ export default {
`Please confirm that you would like to Archive ${fileNumber} ${pluralize('file', fileNumber)}`,
'Note this action will not return any files to the submitting school.',
{
width: '750px',
width: '800px',
messagePadding: 'px-4 pt-4',
color: '',
dark: false,
Expand Down
Loading

0 comments on commit a9ecebd

Please sign in to comment.