Fix createOn (#2616)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2023-02-10 01:01:45 +07:00 committed by GitHub
parent 0f503edccb
commit 8d14dbef14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 6 deletions

View File

@ -91,7 +91,8 @@
modifiedOn: Date.now(), modifiedOn: Date.now(),
modifiedBy: '' as Ref<Account>, modifiedBy: '' as Ref<Account>,
startDate: null, startDate: null,
dueDate: null dueDate: null,
createOn: Date.now()
} }
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()
@ -149,7 +150,8 @@
assignee: doc.assignee, assignee: doc.assignee,
rank: calcRank(lastOne, undefined), rank: calcRank(lastOne, undefined),
startDate: null, startDate: null,
dueDate: null dueDate: null,
createOn: Date.now()
}, },
doc._id doc._id
) )
@ -181,7 +183,8 @@
modifiedOn: Date.now(), modifiedOn: Date.now(),
modifiedBy: '' as Ref<Account>, modifiedBy: '' as Ref<Account>,
startDate: null, startDate: null,
dueDate: null dueDate: null,
createOn: Date.now()
} }
} }
} }

View File

@ -34,9 +34,10 @@
_id: type.of _id: type.of
}, },
(res) => { (res) => {
items = res[0]?.enumValues?.map((p) => { items =
res[0]?.enumValues?.map((p) => {
return { id: p, label: p } return { id: p, label: p }
}) }) ?? []
}, },
{ limit: 1 } { limit: 1 }
) )