Skip to content

Commit

Permalink
Merge pull request #2027 from bcgov/feature/progress
Browse files Browse the repository at this point in the history
Changes for behavior on upload screen.
  • Loading branch information
SodhiA1 authored Nov 22, 2024
2 parents aa33881 + 936fa4a commit 550196b
Showing 1 changed file with 41 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,6 @@
:headers="headers"
mobile-breakpoint="0"
>
<template #top>
<v-progress-linear
v-show="isLoading"
:indeterminate="true"
color="primary"
/>
</template>
<template #item="props">
<tr>
<td
Expand All @@ -70,26 +63,48 @@
>
<span v-if="column.key === 'errorLink'">
<a
v-if="isFilesetComplete(props.item)"
class="ml-1"
@click="navigateToErrors(props.item)"
>View Errors/Warnings</a>
</span>
<span v-else-if="column.key === 'demFileUploadDate' || column.key === 'xamFileUploadDate' || column.key === 'crsFileUploadDate'">
{{ props.item[column.key] ? props.item[column.key].substring(0,19).replaceAll('-', '/').replaceAll('T', ' ') : '-' }}
</span>
<span v-else-if="column.key === 'demFileStatusCode' || column.key === 'xamFileStatusCode' || column.key === 'crsFileStatusCode'">
<v-icon
v-if="props.item[column.key] === 'LOADED'"
icon="mdi-clock-alert-outline"
color="warning"
/>
<v-icon
v-if="props.item[column.key] === 'NOTLOADED'"
icon="mdi-alert-circle-outline"
color="error"
/>
{{ props.item[column.key] === 'NOTLOADED' ? 'Not Loaded' : 'Awaiting Other Files' }}
</span>
<div v-else-if="column.key === 'demFileStatusCode' || column.key === 'xamFileStatusCode' || column.key === 'crsFileStatusCode'">
<div v-if="props.item[column.key] === 'LOADED'">
<span v-if="isFilesetInProgress(props.item)">
<v-progress-circular
:size="20"
:width="4"
color="primary"
indeterminate
/>
Processing
</span>
<span v-else>
<v-icon
icon="mdi-clock-alert-outline"
color="warning"
/>
Awaiting Other Files
</span>
</div>
<span v-if="props.item[column.key] === 'NOTLOADED'">
<v-icon
icon="mdi-alert-circle-outline"
color="error"
/>
Not Loaded
</span>
<span v-if="props.item[column.key] === 'COMPLETED'">
<v-icon
icon="mdi-check-circle-outline"
color="success"
/>
Processed
</span>
</div>
<span v-else-if="props.item[column.key]">
{{ props.item[column.key] }}
</span>
Expand Down Expand Up @@ -338,6 +353,12 @@ export default {
this.successfulUploadCount = 0;
this.$refs.uploader.click();
},
isFilesetInProgress(fileset){
return fileset.demFileStatusCode === 'LOADED' && fileset.crsFileStatusCode === 'LOADED' && fileset.xamFileStatusCode === 'LOADED';
},
isFilesetComplete(fileset){
return fileset.demFileStatusCode === 'COMPLETED' && fileset.crsFileStatusCode === 'COMPLETED' && fileset.xamFileStatusCode === 'COMPLETED';
},
async importFile() {
if(this.uploadFileValue.length > 0) {
this.isLoadingFiles = true;
Expand Down

0 comments on commit 550196b

Please sign in to comment.