Skip to content

Commit

Permalink
#3840 - Hotfix: Fix for withdraw upload (#3868)
Browse files Browse the repository at this point in the history
Same fix done for the bulk upload in
#3860.
  • Loading branch information
andrepestana-aot authored Oct 31, 2024
1 parent 32feef5 commit d5e0fa3
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions sources/packages/web/src/views/institution/WithdrawalUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
:clearable="true"
:accept="ACCEPTED_FILE_TYPE"
density="compact"
v-model="withdrawalFiles"
v-model="withdrawalFile"
label="Withdrawal text file"
variant="outlined"
prepend-icon="fa:fa-solid fa-file-text"
Expand Down Expand Up @@ -181,8 +181,8 @@ export default defineComponent({
const validationProcessing = ref(false);
const creationProcessing = ref(false);
const { dateOnlyLongString, numberEmptyFiller } = useFormatters();
// Only one will be used but the component allows multiple.
const withdrawalFiles = ref<InputFile[]>([]);
// If multiple prop is undefined or false for VFileInput the component returns now a File object.
const withdrawalFile = ref<File>();
// Possible errors and warnings received upon file upload.
const validationResults = ref([] as ApplicationBulkWithdrawal[]);
const uploadForm = ref({} as VForm);
Expand Down Expand Up @@ -210,10 +210,9 @@ export default defineComponent({
} else {
creationProcessing.value = true;
}
const [fileToUpload] = withdrawalFiles.value;
const uploadResults =
await ScholasticStandingService.shared.applicationBulkWithdrawal(
fileToUpload,
withdrawalFile.value as Blob,
validationOnly,
(progressEvent: AxiosProgressEvent) => {
uploadProgress.value = progressEvent;
Expand Down Expand Up @@ -265,7 +264,7 @@ export default defineComponent({
const resetForm = () => {
validationResults.value = [];
withdrawalFiles.value = [];
withdrawalFile.value = undefined;
};
const loading = computed(
Expand All @@ -279,7 +278,7 @@ export default defineComponent({
DEFAULT_PAGE_LIMIT,
ITEMS_PER_PAGE,
PAGINATION_LIST,
withdrawalFiles,
withdrawalFile,
uploadFile,
validationResults,
fileValidationRules,
Expand Down

0 comments on commit d5e0fa3

Please sign in to comment.