fix: count salad slot on warning
This commit is contained in:
+1
-1
@@ -46,7 +46,7 @@
|
|||||||
<td><input v-model="config.duration" id="duration" type="range" min="5" v-bind:max="totalDuration" step="5" />
|
<td><input v-model="config.duration" id="duration" type="range" min="5" v-bind:max="totalDuration" step="5" />
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<span v-if="(totalDuration / config.duration) < candidates.length" title="slot duration might be too big">
|
<span v-if="slotTooBig" title="slot duration might be too big">
|
||||||
<i icon="triangle-alert"></i> {{config.duration}} minutes
|
<i icon="triangle-alert"></i> {{config.duration}} minutes
|
||||||
</span>
|
</span>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
|
|||||||
@@ -262,6 +262,15 @@ const app = createApp({
|
|||||||
value.length && array.indexOf(value) === index
|
value.length && array.indexOf(value) === index
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
slotTooBig() {
|
||||||
|
const slotCount = this.totalDuration / this.config.duration;
|
||||||
|
|
||||||
|
if (this.config.endWithAll) {
|
||||||
|
return slotCount - 1 < this.candidates.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
return slotCount < this.candidates.length;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
vegetable() {
|
vegetable() {
|
||||||
|
|||||||
Reference in New Issue
Block a user