diff --git a/src/components/management/EditJobSlot.vue b/src/components/management/EditJobSlot.vue index 1c83610..deb2dac 100644 --- a/src/components/management/EditJobSlot.vue +++ b/src/components/management/EditJobSlot.vue @@ -33,7 +33,7 @@ input-debounce="0" class="col-xs-12 col-sm-6 q-pa-sm" :options="jobtypes" - option-label="name" + :option-label="jobtype => typeof jobtype === 'number' ? '' : jobtype.name" option-value="id" map-options clearable diff --git a/src/store/models.ts b/src/store/models.ts index fed3e19..2644891 100644 --- a/src/store/models.ts +++ b/src/store/models.ts @@ -30,6 +30,14 @@ export class Job implements FG.Job { milliseconds: 0, }); else this.start = new Date(); // <-- make TS happy "no initalizer" + if (!iJob || iJob.end === undefined) { + this.end = date.buildDate({ + hours: new Date().getHours() + 4, + minutes: 0, + seconds: 0, + milliseconds: 0, + }); + } if (iJob !== undefined) Object.assign(this, iJob); }