mirror of
https://github.com/Spythere/genera-tor.git
synced 2026-05-03 13:38:12 +00:00
Rozszerzono walidację rozkazu
This commit is contained in:
@@ -9,21 +9,15 @@ export default defineComponent({
|
||||
},
|
||||
|
||||
methods: {
|
||||
verifyOrder() {
|
||||
const orderMessage = this.store.orderMessage;
|
||||
|
||||
return !/<b>/g.test(orderMessage);
|
||||
},
|
||||
|
||||
verifyOrderFields() {
|
||||
const header = this.store[this.store.chosenOrderType].header;
|
||||
// const header = this.store[this.store.chosenOrderType].header;
|
||||
const footer = this.store.orderFooter;
|
||||
|
||||
const fieldsToCorrect = [];
|
||||
|
||||
if (!header.orderNo) fieldsToCorrect.push('numer rozkazu');
|
||||
if (!header.trainNo) fieldsToCorrect.push('numer pociągu / manewru');
|
||||
if (!header.date) fieldsToCorrect.push('data');
|
||||
// if (!header.orderNo) fieldsToCorrect.push('numer rozkazu');
|
||||
// if (!header.trainNo) fieldsToCorrect.push('numer pociągu / manewru');
|
||||
// if (!header.date) fieldsToCorrect.push('data');
|
||||
|
||||
if (!footer.stationName) fieldsToCorrect.push('stacja');
|
||||
if (!footer.checkpointName) fieldsToCorrect.push('posterunek');
|
||||
@@ -37,3 +31,5 @@ export default defineComponent({
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user