Skip to content

Commit c42b3c7

Browse files
authored
Merge pull request #721 from lcnetdev/nar-tag-checkwq
Add check for tags
2 parents 18e95a2 + bbf0fd2 commit c42b3c7

1 file changed

Lines changed: 24 additions & 1 deletion

File tree

src/components/panels/edit/modals/NacoStubCreateModal.vue

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@
130130
return true
131131
}
132132
133+
if (!this.goodTags()){
134+
return true
135+
}
136+
133137
if (this.preferenceStore.returnValue('--b-edit-complex-nar-advanced-mode') && !this.good670()){
134138
return true
135139
}
@@ -222,6 +226,12 @@
222226
return good
223227
},
224228
229+
// Check that tag fields aren't empty
230+
goodTags: function(){
231+
let good = this.extraMarcStatements.every((row) => row.fieldTag.length == 3)
232+
return good
233+
},
234+
225235
dragResize: function(newRect){
226236
227237
this.width = newRect.width
@@ -2057,6 +2067,18 @@
20572067
<div>
20582068
<div class="error-info-title">Other Checks:</div>
20592069

2070+
<template v-if="goodTags()">
2071+
<div>
2072+
<span class="material-icons unique-icon">check</span>
2073+
<span class="not-unique-text">All Tags Present</span>
2074+
</div>
2075+
</template>
2076+
<template v-else>
2077+
<div>
2078+
<span class="material-icons not-unique-icon">cancel</span>
2079+
<span class="not-unique-text">Tag Missing</span><span data-tooltip="Add missing Tag in the red field" class="simptip-position-left"><span class="material-icons help-icon">help</span></span>
2080+
</div>
2081+
</template>
20602082

20612083
<template v-if="goodIndicators()">
20622084
<div>
@@ -2179,7 +2201,7 @@
21792201
v-model="row.fieldTag"
21802202
maxlength="3"
21812203
placeholder="TAG"
2182-
:class="['extra-marc-tag', {'literal-bold': preferenceStore.returnValue('--b-edit-main-literal-bold-font')}]"
2204+
:class="['extra-marc-tag', {'literal-bold': preferenceStore.returnValue('--b-edit-main-literal-bold-font'), 'missing-indicators': row.fieldTag.length != 3}]"
21832205
:style="`margin-right: 1em; width: 50px; font-size: ${preferenceStore.returnValue('--n-edit-main-literal-font-size')}; color: ${preferenceStore.returnValue('--c-edit-main-literal-font-color')};`"
21842206
/>
21852207
<input
@@ -2202,6 +2224,7 @@
22022224

22032225

22042226
<button v-if="extraMarcStatements.length-1 != index" @click="removeRow($event,index)" style="margin-left: 0.1em;" data-tooltip="Remove Row" class="simptip-position-left" > - </button>
2227+
<button v-if="extraMarcStatements.length-1 == index && index != 0" @click="removeRow($event,index)" style="margin-left: 1em;">-</button>
22052228
<button v-if="extraMarcStatements.length-1 == index" @click="addRow" style="margin-left: 1em;">Add Row</button>
22062229
</div>
22072230
</div>

0 commit comments

Comments
 (0)