add end time for job, delete empty jobtype
This commit is contained in:
parent
e1ad8f0f11
commit
3ba7e5d366
|
@ -33,7 +33,7 @@
|
||||||
input-debounce="0"
|
input-debounce="0"
|
||||||
class="col-xs-12 col-sm-6 q-pa-sm"
|
class="col-xs-12 col-sm-6 q-pa-sm"
|
||||||
:options="jobtypes"
|
:options="jobtypes"
|
||||||
option-label="name"
|
:option-label="jobtype => typeof jobtype === 'number' ? '' : jobtype.name"
|
||||||
option-value="id"
|
option-value="id"
|
||||||
map-options
|
map-options
|
||||||
clearable
|
clearable
|
||||||
|
|
|
@ -30,6 +30,14 @@ export class Job implements FG.Job {
|
||||||
milliseconds: 0,
|
milliseconds: 0,
|
||||||
});
|
});
|
||||||
else this.start = new Date(); // <-- make TS happy "no initalizer"
|
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);
|
if (iJob !== undefined) Object.assign(this, iJob);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue