Skip to content

Commit

Permalink
#1978 - Request Offering Change - Student View Request (Bug fix) (#2282)
Browse files Browse the repository at this point in the history
The following two scenarios are fixed:

- **Problem:** Application Offering Change Request Status was not sent
in payload.
**Fix:** Application Offering Change Request Status is being set to
`InProgressWithSABC` in the payload.

- **Problem:** Text under the Application Details and Request Details
headings was only omitted when the application offering change request
was approved by the ministry.
**Fix** As per the requirement, text under the Application Details and
Request Details headings is only displayed when "In progress with
student." They are omitted after the student approves or declines.
  • Loading branch information
sh16011993 authored Sep 8, 2023
1 parent 642e0b0 commit 28fe367
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
></title-value
></content-group-info
><v-checkbox
v-model="formModel.studentConsent"
v-model="approveApplicationOfferingChangeRequestModal.studentConsent"
label="I agree to the terms and conditions of the StudentAid BC Declaration
form"
hide-details="auto"
Expand Down Expand Up @@ -65,16 +65,12 @@ export default defineComponent({
const { showDialog, showModal, resolvePromise } = useModalDialog<
StudentApplicationOfferingChangeRequestAPIInDTO | boolean
>();
const approveApplicationOfferingChangeRequestModal = ref(
const approveApplicationOfferingChangeRequestModal = reactive(
{} as StudentApplicationOfferingChangeRequestAPIInDTO,
);
const approveApplicationOfferingChangeRequest = ref({} as VForm);
const formModel = reactive(
{} as StudentApplicationOfferingChangeRequestAPIInDTO,
);
const cancel = () => {
approveApplicationOfferingChangeRequest.value.reset();
formModel.studentConsent = false;
approveApplicationOfferingChangeRequestModal.studentConsent = false;
approveApplicationOfferingChangeRequest.value.resetValidation();
resolvePromise(false);
};
Expand All @@ -84,9 +80,9 @@ export default defineComponent({
if (!validationResult.valid) {
return;
}
approveApplicationOfferingChangeRequestModal.value.applicationOfferingChangeRequestStatus =
approveApplicationOfferingChangeRequestModal.applicationOfferingChangeRequestStatus =
ApplicationOfferingChangeRequestStatus.InProgressWithSABC;
const payload = { ...formModel };
const payload = { ...approveApplicationOfferingChangeRequestModal };
resolvePromise(payload);
approveApplicationOfferingChangeRequest.value.reset();
};
Expand All @@ -95,7 +91,6 @@ export default defineComponent({
showModal,
cancel,
allowChange,
formModel,
approveApplicationOfferingChangeRequest,
approveApplicationOfferingChangeRequestModal,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</template>
<hr class="horizontal-divider" />
<h2 class="category-header-large primary-color">Application Details</h2>
<p v-if="changeRequestNotApproved">
<p v-if="changeRequestInProgressWithStudent">
Below displays the requested changes from your institution. You can
compare your
<span class="font-bold">active application details</span> by switching
Expand All @@ -24,7 +24,7 @@
<offering-view :offeringId="changeRequest.requestedOfferingId" />
<hr class="horizontal-divider" />
<h2 class="category-header-large primary-color">Request details</h2>
<p v-if="changeRequestNotApproved">
<p v-if="changeRequestInProgressWithStudent">
Contact your institution for more information if there are no
differences in the requested change above. There may be proposed changes
that aren't displayed such as study costs.
Expand Down Expand Up @@ -80,17 +80,17 @@ export default defineComponent({
Location: changeRequest.value.locationName,
} as Record<string, string>),
);
const changeRequestNotApproved = computed(() => {
const changeRequestInProgressWithStudent = computed(() => {
return (
changeRequest.value.status !==
ApplicationOfferingChangeRequestStatus.Approved
changeRequest.value.status ===
ApplicationOfferingChangeRequestStatus.InProgressWithStudent
);
});
return {
changeRequest,
studentFullName,
headerDetailsData,
changeRequestNotApproved,
changeRequestInProgressWithStudent,
ApplicationOfferingChangeRequestStatus,
};
},
Expand Down

0 comments on commit 28fe367

Please sign in to comment.