Skip to content

Commit

Permalink
#1978 - Request Offering Change - Student Portal (Patch fix)
Browse files Browse the repository at this point in the history
The following two scenarios are fixed:
1) Approve application offering change request through the application offering change request dialog.
2)  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 committed Sep 8, 2023
1 parent 642e0b0 commit 21e08d9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 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 All @@ -50,7 +50,7 @@
</template>
<script lang="ts">
import ModalDialogBase from "@/components/generic/ModalDialogBase.vue";
import { ref, defineComponent, reactive } from "vue";
import { ref, defineComponent } from "vue";
import { useModalDialog } from "@/composables";
import { StudentApplicationOfferingChangeRequestAPIInDTO } from "@/services/http/dto";
import { ApplicationOfferingChangeRequestStatus, VForm } from "@/types";
Expand All @@ -69,12 +69,9 @@ export default defineComponent({
{} as StudentApplicationOfferingChangeRequestAPIInDTO,
);
const approveApplicationOfferingChangeRequest = ref({} as VForm);
const formModel = reactive(
{} as StudentApplicationOfferingChangeRequestAPIInDTO,
);
const cancel = () => {
approveApplicationOfferingChangeRequest.value.reset();
formModel.studentConsent = false;
approveApplicationOfferingChangeRequestModal.value.studentConsent = false;
approveApplicationOfferingChangeRequest.value.resetValidation();
resolvePromise(false);
};
Expand All @@ -86,7 +83,7 @@ export default defineComponent({
}
approveApplicationOfferingChangeRequestModal.value.applicationOfferingChangeRequestStatus =
ApplicationOfferingChangeRequestStatus.InProgressWithSABC;
const payload = { ...formModel };
const payload = { ...approveApplicationOfferingChangeRequestModal.value };
resolvePromise(payload);
approveApplicationOfferingChangeRequest.value.reset();
};
Expand All @@ -95,7 +92,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 21e08d9

Please sign in to comment.