Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit 6be53630 authored by Eva Bardou's avatar Eva Bardou

Fix input mismatch when editing transcription content

parent 880e2097
......@@ -96,13 +96,16 @@ export const actions = {
async updateLineTranscriptionVersion({commit, dispatch, rootState}, {line, content}) {
commit('lines/updateTranscriptionVersion', { pk: line.pk, content: content }, {root: true})
const l = rootState.lines.all.find(li=>li.pk == line.pk)
let data = {
content: l.currentTrans.content,
line: l.currentTrans.line,
transcription: l.currentTrans.transcription
}
if (rootState.lines.editedLine) {
commit('lines/setEditedLine', l, {root: true})
}
if (l.currentTrans.pk) {
await dispatch('updateContent', {pk: l.currentTrans.pk, content: data, currentTransLine: l.currentTrans.line})
......
......@@ -162,7 +162,6 @@ import HelpVersions from './HelpVersions.vue';
import HelpCompareTranscriptions from './HelpCompareTranscriptions.vue';
export default Vue.extend({
props: ['line'],
components: {
LineVersion,
HelpVersions,
......@@ -196,6 +195,9 @@ export default Vue.extend({
}
},
computed: {
line () {
return this.$store.state.lines.editedLine
},
momentDate() {
return moment.tz(this.line.currentTrans.version_updated_at, this.timeZone);
},
......
......@@ -17,8 +17,7 @@
</div>
</div>
<TranscriptionModal v-if="$store.state.lines.editedLine"
v-bind:line="$store.state.lines.editedLine">
<TranscriptionModal v-if="$store.state.lines.editedLine">
</TranscriptionModal>
</div>
</template>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment