mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 10:47:07 +00:00
@@ -182,6 +182,26 @@
|
||||
<v-list-item-icon><v-icon>mdi-delete</v-icon></v-list-item-icon>
|
||||
<v-list-item-title class="error--text">Delete all comments</v-list-item-title>
|
||||
</v-list-item>
|
||||
|
||||
<!-- BEGIN This section only applies to QC events -->
|
||||
<template v-if="contextMenuItem.meta.qc_id">
|
||||
|
||||
<v-divider></v-divider>
|
||||
|
||||
<!-- Mark QC accepted -->
|
||||
<v-list-item @click="() => acceptQc(contextMenuItem)" v-if="!isAcceptedQc(contextMenuItem)">
|
||||
<v-list-item-icon><v-icon>mdi-check</v-icon></v-list-item-icon>
|
||||
<v-list-item-title>Mark QC accepted</v-list-item-title>
|
||||
</v-list-item>
|
||||
<!-- Unmark QC accepted -->
|
||||
<v-list-item @click="() => acceptQc(contextMenuItem, false)" v-else>
|
||||
<v-list-item-icon><v-icon>mdi-restore</v-icon></v-list-item-icon>
|
||||
<v-list-item-title>Unmark QC accepted</v-list-item-title>
|
||||
</v-list-item>
|
||||
|
||||
</template>
|
||||
<!-- END This section only applies to QC events -->
|
||||
|
||||
</v-list>
|
||||
|
||||
</v-menu>
|
||||
@@ -949,6 +969,23 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
isAcceptedQc (item) {
|
||||
return item.labels.includes('QCAccepted');
|
||||
},
|
||||
|
||||
async acceptQc (item, accept = true) {
|
||||
|
||||
const url = accept
|
||||
? `/project/${this.$route.params.project}/qc/results/accept`
|
||||
: `/project/${this.$route.params.project}/qc/results/unaccept`;
|
||||
|
||||
await this.api([url, {
|
||||
method: "POST",
|
||||
body: [ item.id ]
|
||||
}]);
|
||||
|
||||
},
|
||||
|
||||
setActiveItem (item) {
|
||||
// Disable setting the active item for now,
|
||||
// it's kind of annoying.
|
||||
|
||||
Reference in New Issue
Block a user