Skip to content

Commit

Permalink
Merge pull request #1855 from bcgov/feature/expiryFix
Browse files Browse the repository at this point in the history
Fix for expiring student reg contacts
  • Loading branch information
SoLetsDev authored Apr 16, 2024
2 parents 8b2ddc7 + 7945eb2 commit a6bf08a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
4 changes: 2 additions & 2 deletions backend/src/components/institute/institute.js
Original file line number Diff line number Diff line change
Expand Up @@ -760,8 +760,8 @@ async function getSchoolByMincode(req, res) {
async function getStudentRegistrationContacts(req, res) {
let contactsList = [];
try {
const schoolContactURL = `${config.get('server:institute:instituteSchoolURL')}/contact/paginated?pageNumber=0&pageSize=10000&searchCriteriaList=[{"searchCriteriaList":[{"key":"schoolContactTypeCode","operation":"eq","value":"STUDREGIS","valueType":"STRING","condition":"AND"}]}]`;
const districtContactURL = `${config.get('server:institute:instituteDistrictURL')}/contact/paginated?pageNumber=0&pageSize=10000&searchCriteriaList=[{"searchCriteriaList":[{"key":"districtContactTypeCode","operation":"eq","value":"STUDREGIS","valueType":"STRING","condition":"AND"}]}]`;
const schoolContactURL = `${config.get('server:institute:instituteSchoolURL')}/contact/paginated?pageNumber=0&pageSize=10000&searchCriteriaList=[{"condition":"AND","searchCriteriaList":[{"key":"expiryDate","operation":"gte","value":"${LocalDateTime.now()}","valueType":"DATE_TIME","condition":"OR"},{"key":"expiryDate","operation":"eq","value":null,"valueType":"STRING","condition":"OR"}]}, {"condition":"AND","searchCriteriaList":[{"key":"schoolContactTypeCode","operation":"eq","value":"STUDREGIS","valueType":"STRING","condition":"OR"}]}]`;
const districtContactURL = `${config.get('server:institute:instituteDistrictURL')}/contact/paginated?pageNumber=0&pageSize=10000&searchCriteriaList=[{"condition":"AND","searchCriteriaList":[{"key":"expiryDate","operation":"gte","value":"${LocalDateTime.now()}","valueType":"DATE_TIME","condition":"OR"},{"key":"expiryDate","operation":"eq","value":null,"valueType":"STRING","condition":"OR"}]}, {"condition":"AND","searchCriteriaList":[{"key":"districtContactTypeCode","operation":"eq","value":"STUDREGIS","valueType":"STRING","condition":"OR"}]}]`;
Promise.all([
getData(schoolContactURL),
getData(districtContactURL),
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/components/common/SearchDemographicModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
v-model="student.legalLastName"
variant="outlined"
density="compact"
maxlength="25"
:readonly="isFieldReadOnly(STUDENT_DETAILS_FIELDS.LEGAL_LAST_NAME)"
:rules="validateLegalLastName()"
:onkeyup="upperCaseInput(STUDENT_DETAILS_FIELDS.LEGAL_LAST_NAME)"
Expand All @@ -84,6 +85,7 @@
<v-text-field
id="searchDemogModalLegalFirstNameTxtField"
v-model="student.legalFirstName"
maxlength="25"
variant="outlined"
density="compact"
filled
Expand Down Expand Up @@ -115,6 +117,7 @@
id="searchDemogModalLegalMiddleNameTxtField"
v-model="student.legalMiddleNames"
variant="outlined"
maxlength="25"
density="compact"
@update:model-value="validateForm"
filled
Expand Down Expand Up @@ -146,6 +149,7 @@
v-model="student.usualLastName"
variant="outlined"
density="compact"
maxlength="25"
@update:model-value="validateForm"
filled
:readonly="isFieldReadOnly(STUDENT_DETAILS_FIELDS.USUAL_LAST_NAME)"
Expand Down Expand Up @@ -177,6 +181,7 @@
variant="outlined"
@update:model-value="validateForm"
density="compact"
maxlength="25"
filled
:readonly="isFieldReadOnly(STUDENT_DETAILS_FIELDS.USUAL_FIRST_NAME)"
tabindex="5"
Expand Down Expand Up @@ -207,6 +212,7 @@
variant="outlined"
@update:model-value="validateForm"
density="compact"
maxlength="25"
filled
:readonly="isFieldReadOnly(STUDENT_DETAILS_FIELDS.USUAL_MIDDLE_NAMES)"
tabindex="6"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@
density="compact"
bg-color="#efefef"
variant="outlined"
maxlength="255"
maxlength="25"
@keyup.enter="enterPushed()"
@input="[searchHasValues(), $emit('valueChange')]"
/>
Expand All @@ -415,7 +415,7 @@
density="compact"
bg-color="#efefef"
variant="outlined"
maxlength="255"
maxlength="25"
@keyup.enter="enterPushed()"
@input="[searchHasValues(), $emit('valueChange')]"
/>
Expand All @@ -436,7 +436,7 @@
density="compact"
bg-color="#efefef"
variant="outlined"
maxlength="255"
maxlength="25"
@input="[searchHasValues(), $emit('valueChange')]"
@keyup.enter="enterPushed()"
/>
Expand All @@ -457,7 +457,7 @@
density="compact"
bg-color="#efefef"
variant="outlined"
maxlength="255"
maxlength="25"
@keyup.enter="enterPushed()"
@input="[searchHasValues(), $emit('valueChange')]"
/>
Expand All @@ -478,7 +478,7 @@
density="compact"
bg-color="#efefef"
variant="outlined"
maxlength="255"
maxlength="25"
@keyup.enter="enterPushed()"
@input="[searchHasValues(), $emit('valueChange')]"
/>
Expand All @@ -499,7 +499,7 @@
density="compact"
bg-color="#efefef"
variant="outlined"
maxlength="255"
maxlength="25"
@keyup.enter="enterPushed()"
@input="[searchHasValues(), $emit('valueChange')]"
/>
Expand Down

0 comments on commit a6bf08a

Please sign in to comment.