From c5e584bd512c7da401d72279bdc22b67baf843b7 Mon Sep 17 00:00:00 2001 From: dcz <dcz@ipipan.waw.pl> Date: Thu, 9 Nov 2023 12:21:13 +0100 Subject: [PATCH] Only free lus shwow up in popup bugfix. --- .../components/unification/free_lu/FreeLuEdit.vue | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/unification/free_lu/FreeLuEdit.vue b/frontend/src/components/unification/free_lu/FreeLuEdit.vue index 5988eb6..b9b4d2d 100644 --- a/frontend/src/components/unification/free_lu/FreeLuEdit.vue +++ b/frontend/src/components/unification/free_lu/FreeLuEdit.vue @@ -153,14 +153,19 @@ }, connect_lus_to_slowal_frame(frame_in_progress) { const frame_in_progress_lus = frame_in_progress ? frames2lexical_units([frame_in_progress]).map(l => { - l.pk = l.id; - l.display = l.str; + l.id = l.id; + l.str = l.str; return l; }) : []; - const frame_in_progress_lus_ids = new Set(frame_in_progress_lus.map(l => l.pk)); + const free_lus = this.free_lexical_units.map(l => { + l.id = l.pk; + l.str = l.display; + return l; + }); + const frame_in_progress_lus_ids = new Set(frame_in_progress_lus.map(l => l.id)); const lusSelect = function () { - return this.lexical_units.concat(this.free_lexical_units).concat(frame_in_progress_lus).map(lu => { - return `<label><input type="checkbox" ${frame_in_progress_lus_ids.has(lu.pk) ? 'checked' : ''} name="lus" value="${lu.pk}" /> ${lu.display}</label><br />`; + return free_lus.concat(frame_in_progress_lus).map(lu => { + return `<label><input type="checkbox" ${frame_in_progress_lus_ids.has(lu.id) ? 'checked' : ''} name="lus" value="${lu.id}" /> ${lu.str}</label><br />`; }).join(""); }.bind(this); -- GitLab