Skip to content

Commit 33ce9e6

Browse files
committed
Add check for tags
functions like inidcator check
1 parent 18e95a2 commit 33ce9e6

1 file changed

Lines changed: 23 additions & 1 deletion

File tree

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

Lines changed: 23 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

0 commit comments

Comments
 (0)