mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-28 20:45:00 +02:00
Set due date when create application (#7683)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
export let size: ButtonSize = 'medium'
|
||||
export let kind: ButtonKind = 'link'
|
||||
export let editable: boolean = true
|
||||
export let onChange: ((value: any) => void) | undefined
|
||||
|
||||
const client = getClient()
|
||||
$: status = $statusStore.byId.get(object.status)
|
||||
@@ -21,15 +22,19 @@
|
||||
return
|
||||
}
|
||||
|
||||
await client.updateCollection(
|
||||
object._class,
|
||||
object.space,
|
||||
object._id,
|
||||
object.attachedTo,
|
||||
object.attachedToClass,
|
||||
object.collection,
|
||||
{ dueDate: newDueDate }
|
||||
)
|
||||
if (onChange !== undefined) {
|
||||
onChange(newDueDate)
|
||||
} else {
|
||||
await client.updateCollection(
|
||||
object._class,
|
||||
object.space,
|
||||
object._id,
|
||||
object.attachedTo,
|
||||
object.attachedToClass,
|
||||
object.collection,
|
||||
{ dueDate: newDueDate }
|
||||
)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user