mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 13:07:08 +00:00
Add option to append line to planner
This commit is contained in:
@@ -28,6 +28,9 @@
|
||||
<v-list-item-title v-if="contextMenuItem.ntba">Unset NTBA</v-list-item-title>
|
||||
<v-list-item-title v-else>Set NTBA</v-list-item-title>
|
||||
</v-list-item>
|
||||
<v-list-item @click="addToPlan" v-if="!contextMenuItem.ntba">
|
||||
<v-list-item-title>Add to plan</v-list-item-title>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-menu>
|
||||
|
||||
@@ -244,7 +247,24 @@ export default {
|
||||
value: !this.contextMenuItem.ntba
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
async addToPlan () {
|
||||
const payload = {
|
||||
sequence: null,
|
||||
line: this.contextMenuItem.line,
|
||||
fsp: this.contextMenuItem.fsp,
|
||||
lsp: this.contextMenuItem.lsp
|
||||
}
|
||||
console.log("Plan", payload);
|
||||
const url = `/project/${this.$route.params.project}/plan`;
|
||||
const init = {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: payload
|
||||
}
|
||||
await this.api([url, init]);
|
||||
},
|
||||
|
||||
editItem (item, key) {
|
||||
this.edit = {
|
||||
line: item.line,
|
||||
|
||||
Reference in New Issue
Block a user