Default end_time => Time.now + 63.minutes

This commit is contained in:
Rick Carlino 2017-10-31 14:27:54 -05:00
parent b708bc2b9d
commit 73a1e0ac7d
2 changed files with 2 additions and 3 deletions

View file

@ -52,7 +52,7 @@ export class AddFarmEvent
specialStatus: SpecialStatus.DIRTY,
uuid: "---",
body: {
end_time: moment().add(6, "minutes").toISOString(),
end_time: moment().add(63, "minutes").toISOString(),
start_time: moment().add(3, "minutes").toISOString(),
time_unit: "never",
executable_id,

View file

@ -57,8 +57,7 @@ export interface FarmEventViewModel {
* USE CASE EXAMPLE: We have a "date" and "time" field that are created from
* a single "start_time" FarmEvent field. */
function destructureFarmEvent(fe: TaggedFarmEvent): FarmEventViewModel {
const three = moment().add(3, "minutes").toISOString();
const six = moment().add(6, "minutes").toISOString()
return {
startDate: formatDate((fe.body.start_time || three).toString()),
startTime: formatTime((fe.body.start_time || three).toString()),