mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 10:07:08 +00:00
Revert "Show sequence comments in log page"
This reverts commit a5db9c984b.
Fixes #210.
This commit is contained in:
@@ -207,116 +207,6 @@
|
||||
</v-menu>
|
||||
<!-- END Context menu for log entries -->
|
||||
|
||||
<v-container fluid class="pa-0 pb-2" v-if="sequenceData">
|
||||
<v-row no-gutters class="d-flex flex-column flex-sm-row">
|
||||
<v-col cols="6" class="d-flex flex-column">
|
||||
<v-card outlined tile class="flex-grow-1">
|
||||
<v-card-subtitle>
|
||||
Acquisition remarks
|
||||
<template v-if="writeaccess">
|
||||
<template v-if="edit && edit.sequence == sequenceData.sequence && edit.key == 'remarks'">
|
||||
<v-btn
|
||||
class="ml-3"
|
||||
icon
|
||||
small
|
||||
title="Cancel edit"
|
||||
:disabled="loading"
|
||||
@click="edit.value = sequenceData.remarks; edit = null"
|
||||
>
|
||||
<v-icon small>mdi-close</v-icon>
|
||||
</v-btn>
|
||||
<v-btn v-if="edit.value != sequenceData.remarks"
|
||||
icon
|
||||
small
|
||||
title="Save edits"
|
||||
:disabled="loading"
|
||||
@click="edit = null"
|
||||
>
|
||||
<v-icon small>mdi-content-save-edit-outline</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-btn v-else-if="edit === null"
|
||||
class="ml-3"
|
||||
icon
|
||||
small
|
||||
title="Edit"
|
||||
:disabled="loading"
|
||||
@click="editItem(sequenceData, 'remarks')"
|
||||
>
|
||||
<v-icon small>mdi-square-edit-outline</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-card-subtitle>
|
||||
<v-card-text v-if="edit && edit.sequence == sequenceData.sequence && edit.key == 'remarks'">
|
||||
<v-textarea
|
||||
class="markdown"
|
||||
autofocus
|
||||
placeholder="Enter your text here"
|
||||
:disabled="loading"
|
||||
v-model="edit.value"
|
||||
>
|
||||
</v-textarea>
|
||||
</v-card-text>
|
||||
<v-card-text v-else v-html="$options.filters.markdown(sequenceData.remarks || '')">
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-col>
|
||||
|
||||
<v-col cols="6" class="d-flex flex-column">
|
||||
<v-card outlined tile class="flex-grow-1">
|
||||
<v-card-subtitle>
|
||||
Processing remarks
|
||||
<template v-if="writeaccess">
|
||||
<template v-if="edit && edit.sequence == sequenceData.sequence && edit.key == 'remarks_final'">
|
||||
<v-btn
|
||||
class="ml-3"
|
||||
icon
|
||||
small
|
||||
title="Cancel edit"
|
||||
:disabled="loading"
|
||||
@click="edit.value = sequenceData.remarks_final; edit = null"
|
||||
>
|
||||
<v-icon small>mdi-close</v-icon>
|
||||
</v-btn>
|
||||
<v-btn v-if="edit.value != sequenceData.remarks_final"
|
||||
icon
|
||||
small
|
||||
title="Save edits"
|
||||
:disabled="loading"
|
||||
@click="edit = null"
|
||||
>
|
||||
<v-icon small>mdi-content-save-edit-outline</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
<v-btn v-else-if="edit === null"
|
||||
class="ml-3"
|
||||
icon
|
||||
small
|
||||
title="Edit"
|
||||
:disabled="loading"
|
||||
@click="editItem(sequenceData, 'remarks_final')"
|
||||
>
|
||||
<v-icon small>mdi-square-edit-outline</v-icon>
|
||||
</v-btn>
|
||||
</template>
|
||||
</v-card-subtitle>
|
||||
<v-card-text v-if="edit && edit.sequence == sequenceData.sequence && edit.key == 'remarks_final'">
|
||||
<v-textarea
|
||||
class="markdown"
|
||||
autofocus
|
||||
placeholder="Enter your text here"
|
||||
:disabled="loading"
|
||||
v-model="edit.value"
|
||||
>
|
||||
</v-textarea>
|
||||
</v-card-text>
|
||||
<v-card-text v-else v-html="$options.filters.markdown(sequenceData.remarks_final || '')">
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
|
||||
<v-data-table
|
||||
dense
|
||||
:headers="headers"
|
||||
@@ -484,9 +374,6 @@ export default {
|
||||
queuedReload: false,
|
||||
itemsPerPage: 25,
|
||||
|
||||
sequenceData: null,
|
||||
edit: null, // { sequence, key, value }
|
||||
|
||||
// Row highlighter
|
||||
activeItem: null,
|
||||
|
||||
@@ -556,26 +443,6 @@ export default {
|
||||
},
|
||||
|
||||
watch: {
|
||||
|
||||
async edit (newVal, oldVal) {
|
||||
if (newVal === null && oldVal !== null) {
|
||||
const item = oldVal.sequence == this.sequenceData.sequence
|
||||
? this.sequenceData
|
||||
: null;
|
||||
if (item && item[oldVal.key] != oldVal.value) {
|
||||
if (await this.saveItem(oldVal)) {
|
||||
item[oldVal.key] = oldVal.value;
|
||||
} else {
|
||||
this.edit = oldVal;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
defaultSequence (sequenceNumber) {
|
||||
this.getSequenceData();
|
||||
},
|
||||
|
||||
options: {
|
||||
handler () {
|
||||
//this.getEvents();
|
||||
@@ -601,12 +468,6 @@ export default {
|
||||
} else {
|
||||
this.queuedReload = true;
|
||||
}
|
||||
} else if ((event.channel == "final_lines" || event.channel == "raw_lines") &&
|
||||
event.payload.schema == this.projectSchema &&
|
||||
this.sequenceData?.sequence &&
|
||||
(this.sequenceData.sequence == event.payload.old.sequence ||
|
||||
this.sequenceData.sequence == event.payload.new.sequence)) {
|
||||
this.getSequenceData();
|
||||
}
|
||||
},
|
||||
|
||||
@@ -722,44 +583,6 @@ export default {
|
||||
this.presetRemarks = await this.api([url]);
|
||||
},
|
||||
|
||||
async getSequenceData () {
|
||||
if (this.defaultSequence) {
|
||||
const url = `/project/${this.$route.params.project}/sequence?sequence=${this.defaultSequence}`;
|
||||
const res = await this.api([url]);
|
||||
this.sequenceData = res[0];
|
||||
} else {
|
||||
this.sequenceData = null;
|
||||
}
|
||||
},
|
||||
|
||||
editItem (item, key) {
|
||||
this.edit = {
|
||||
sequence: item.sequence,
|
||||
key,
|
||||
value: item[key]
|
||||
}
|
||||
},
|
||||
|
||||
async saveItem (edit) {
|
||||
if (!edit) return;
|
||||
|
||||
try {
|
||||
const url = `/project/${this.$route.params.project}/sequence/${edit.sequence}`;
|
||||
const init = {
|
||||
method: "PATCH",
|
||||
body: {
|
||||
[edit.key]: edit.value
|
||||
}
|
||||
};
|
||||
|
||||
let res;
|
||||
await this.api([url, init, (e, r) => res = r]);
|
||||
return res && res.ok;
|
||||
} catch (err) {
|
||||
return false;
|
||||
}
|
||||
},
|
||||
|
||||
newItem (from = {}) {
|
||||
const type = (from.sequence && from.point) ? "sequence" : "timed";
|
||||
const tstamp = from.tstamp || (new Date).toISOString();
|
||||
@@ -1005,7 +828,6 @@ export default {
|
||||
this.getEventCount();
|
||||
this.getEvents();
|
||||
this.getPresetRemarks();
|
||||
this.getSequenceData();
|
||||
|
||||
window.addEventListener('keyup', this.handleKeyboardEvent);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user