Skip to content

Commit

Permalink
[BI-1459] - Adding link to jobs page
Browse files Browse the repository at this point in the history
Adding an info message to show after starting an import informing the user they can view the job on the jobs page
  • Loading branch information
timparsons committed Apr 20, 2022
1 parent 9c6e6a1 commit 79b82fb
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/components/trait/ConfirmImportMessageBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@

<template>
<div class="corfirm-import">
<article class="message is-warning" v-if="confirmImportState.saveStarted">
<div class="message-body">
Your import is being processed. You can view on its progress by going to the <router-link v-bind:to="{name: 'job-management', params:{programId: activeProgram.id}}">Jobs</router-link> page.
</div>
</article>
<article class="message is-success">
<div class="message-body">
<nav class="columns">
Expand Down Expand Up @@ -59,11 +64,18 @@
import {AlertTriangleIcon} from 'vue-feather-icons'
import {StringFormatters} from '@/breeding-insight/utils/StringFormatters'
import {DataFormEventBusHandler} from "@/components/forms/DataFormEventBusHandler";
import {mapGetters} from "vuex";
import { Program } from '@/breeding-insight/model/Program';

@Component({
components: {
AlertTriangleIcon
}
},
computed: {
...mapGetters([
'activeProgram',
])
},
})
export default class ConfirmImportMessageBox extends Vue {

Expand All @@ -76,6 +88,8 @@
@Prop()
confirmImportState!: DataFormEventBusHandler;

private activeProgram?: Program;

confirm() {
this.$emit('confirm');
this.confirmImportState.bus.$emit(DataFormEventBusHandler.SAVE_STARTED_EVENT);
Expand Down
5 changes: 5 additions & 0 deletions src/views/import/BrAPIImporter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,11 @@
<template v-slot:write-display>
<!-- In Progress -->
<template v-if="currentImport.progress.statuscode == 202">
<article class="message is-warning">
<div class="message-body">
Your import is being processed. You can view on its progress by going to the <router-link v-bind:to="{name: 'job-management', params:{programId: activeProgram.id}}">Jobs</router-link> page.
</div>
</article>
<ProgressBar
v-bind:max="currentImport.progress.total"
v-bind:value="currentImport.progress.finished"
Expand Down

0 comments on commit 79b82fb

Please sign in to comment.