Add set line complete / incomplete actions.

The following options are shown:

* Set line complete:

If a line has been partially shot and still has points
to be acquired.

This option marks remaining virgin points as NTBA=true.

* Set line incomplete:

If a line has been partially shot and remaining virgin
points have been marked as NTBA.

This option marks all points in the line as NTBA=false.

* Set line NTBA:

If a line has not been (successfully) shot at all, i.e.,
all points on the line are virgin.

This option marks the line itself as NTBA=true.

* Unset line NTBA:

If a line has been marked as NTBA.

This option clears the NTBA flag from the line.
This commit is contained in:
D. Berge
2021-05-17 20:19:53 +02:00
parent 57f4834da8
commit 820b0c2b91

View File

@@ -25,9 +25,21 @@
>
<v-list dense v-if="contextMenuItem">
<template v-if="!selectOn">
<v-list-item @click="setNTBA">
<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 @click="setNTBA" v-if="contextMenuItem.ntba || (contextMenuItem.num_points == contextMenuItem.na)">
<v-list-item-title v-if="contextMenuItem.ntba"
title="Mark the line as part of the acquisition plan"
>Unset NTBA</v-list-item-title>
<v-list-item-title v-else
title="Mark the line as not to be acquired"
>Set NTBA</v-list-item-title>
</v-list-item>
<v-list-item @click="setComplete" v-if="contextMenuItem.na && (contextMenuItem.num_points != contextMenuItem.na || contextMenuItem.tba != contextMenuItem.na)">
<v-list-item-title v-if="contextMenuItem.tba != contextMenuItem.na"
title="Mark any remaining points as pending acquisition"
>Unset line complete</v-list-item-title>
<v-list-item-title v-else
title="Mark any remaining points as not to be acquired"
>Set line complete</v-list-item-title>
</v-list-item>
<v-list-item @click="addToPlan" v-if="!contextMenuItem.ntba && !isPlanned(contextMenuItem)">
<v-list-item-title>Add to plan</v-list-item-title>
@@ -367,6 +379,14 @@ export default {
value: !this.contextMenuItem.ntba
})
},
setComplete () {
this.saveItem({
line: this.contextMenuItem.line,
key: 'complete',
value: this.contextMenuItem.na && this.contextMenuItem.tba == this.contextMenuItem.na
})
},
async addToPlan () {
const payload = {