diff --git a/frontend/src/components/unification/Unification/LexicalUnitEdit.vue b/frontend/src/components/unification/Unification/LexicalUnitEdit.vue index 891426a78e33fb18abbb45bb8027e6506cfff6d7..4643ecd6a5b87d1246ae21bf9ee8f111cc007bc0 100644 --- a/frontend/src/components/unification/Unification/LexicalUnitEdit.vue +++ b/frontend/src/components/unification/Unification/LexicalUnitEdit.vue @@ -768,6 +768,10 @@ Object.assign(LexicalUnitEdit, { return !this.hidden_frame_ids.includes(frame.id) && !this.hidden_frame_status_set.includes(frame.status) && ((frame.status != 'B' && frame.status != 'C') || this.isSuperLeksykograf()); }, + getInvisibleFrameCnt() { + const invisibleFrames = this.frames.filter(frame => !this.isFrameVisible(frame)); + return invisibleFrames.length; + }, changeStatusButtonTitleToDefault() { const isSuperLeksykograf = this.isSuperLeksykograf(); this.statusButtonTitle = isSuperLeksykograf ? 'Sprawdź' : 'Gotowe'; @@ -950,7 +954,7 @@ Object.assign(LexicalUnitEdit, { return (this.isSuperLeksykograf() && this.unified_frame.status === 'O') && this.unified_frame.assignee_username !== window.USER_USERNAME; }, hideFrame(frame) { - this.hidden_frame_ids.add(frame.id); + this.hidden_frame_ids.push(frame.id); }, resetFrameVisibilityRestictions() { this.hidden_frame_ids = []; @@ -1325,7 +1329,7 @@ export default LexicalUnitEdit; <td id="wrong-frame" class="table-button-menu-td" style="padding: 10px 15px 10px 15px; color: #000000;" @click="!this.isSuperLeksykograf() ? change_slowal_frame_status('B') : this.active_slowal_frame && this.active_slowal_frame.status === 'B' ? slowal_frame_status_change_with_confirmation('frame_confirm_invalid') : change_slowal_frame_status('B')">{{createSlowalBadStatusButtonLabel()}}</td> <td id="hide-slowal-frame" style="padding: 10px 15px 10px 15px; color: #000000;"> <div class="d-flex"> - Ukryj: + Ukryj {{getInvisibleFrameCnt() > 0 ? '('+getInvisibleFrameCnt()+')' : ''}}: O <input id="checkbox-status-o" type="checkbox" @change="hideFrameOfStatus('O', $event)" class="custom-control custom-checkbox mr-1"> <template v-if="this.isSuperLeksykograf()">B <input id="checkbox-status-b" type="checkbox" @change="hideFrameOfStatus('B', $event)" class="custom-control custom-checkbox mr-1"></template> <template v-if="this.isSuperLeksykograf()">C <input id="checkbox-status-c" type="checkbox" @change="hideFrameOfStatus('C', $event)" class="custom-control custom-checkbox mr-1"></template>