File tree Expand file tree Collapse file tree
app/frontend/src/components/forms/submission Expand file tree Collapse file tree Original file line number Diff line number Diff line change 159159 </v-col>
160160
161161 <v-col cols="12" sm="6" xl="4" order="first" order-sm="last">
162- <v-btn block color="primary" v-on="on" @click="updateStatus">
163- <span>UPDATE </span>
162+ <v-btn block :disabled="!this.statusToSet" color="primary" v-on="on" @click="updateStatus">
163+ <span>{{ statusAction }} </span>
164164 </v-btn>
165165 </v-col>
166166 </v-row>
@@ -223,6 +223,15 @@ export default {
223223 showActionDate() {
224224 return ['ASSIGNED', 'COMPLETED'].includes(this.statusToSet);
225225 },
226+ statusAction() {
227+ const obj = Object.freeze({
228+ ASSIGNED: 'ASSIGN',
229+ COMPLETED: 'COMPLETE',
230+ REVISING: 'REVISE',
231+ DEFAULT: 'UPDATE'
232+ });
233+ return obj[this.statusToSet] ? obj[this.statusToSet] : obj['DEFAULT'];
234+ },
226235 },
227236 methods: {
228237 ...mapActions('notifications', ['addNotification']),
@@ -317,7 +326,6 @@ export default {
317326 this.$refs.form.resetValidation();
318327 this.revisionEmail = '';
319328 this.statusToSet = null;
320- this.statusFields = false;
321329 this.note = '';
322330 },
323331 async updateStatus() {
You can’t perform that action at this time.
0 commit comments