mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-18 06:13:52 +00:00
Set due date when create application (#7683)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
475e7ee62d
commit
1eb8977a6c
packages/ui/src/components/calendar
plugins
recruit-resources/src/components
task-resources/src/components
@ -16,6 +16,7 @@
|
||||
import { Timestamp } from '@hcengineering/core'
|
||||
import DueDatePopup from './DueDatePopup.svelte'
|
||||
import { tooltip } from '../../tooltips'
|
||||
import ui from '../../plugin'
|
||||
import DatePresenter from './DatePresenter.svelte'
|
||||
import { getDaysDifference, getDueDateIconModifier, getFormattedDate } from './internal/DateUtils'
|
||||
import { ButtonKind, ButtonSize } from '../../types'
|
||||
@ -67,6 +68,7 @@
|
||||
: undefined}
|
||||
>
|
||||
<DatePresenter
|
||||
labelNull={ui.string.DueDate}
|
||||
{value}
|
||||
{editable}
|
||||
{iconModifier}
|
||||
|
@ -18,7 +18,7 @@
|
||||
import type { Contact, Employee, Person } from '@hcengineering/contact'
|
||||
import contact from '@hcengineering/contact'
|
||||
import { EmployeeBox, ExpandRightDouble, UserBox } from '@hcengineering/contact-resources'
|
||||
import {
|
||||
import core, {
|
||||
Account,
|
||||
AccountRole,
|
||||
Class,
|
||||
@ -160,10 +160,7 @@
|
||||
status: selectedState._id,
|
||||
number,
|
||||
identifier: `APP-${number}`,
|
||||
assignee: doc.assignee,
|
||||
rank: makeRank(lastOne?.rank, undefined),
|
||||
startDate: null,
|
||||
dueDate: null,
|
||||
kind
|
||||
},
|
||||
doc._id
|
||||
@ -430,7 +427,7 @@
|
||||
<InlineAttributeBar
|
||||
_class={recruit.class.Applicant}
|
||||
object={doc}
|
||||
toClass={task.class.Task}
|
||||
toClass={core.class.AttachedDoc}
|
||||
ignoreKeys={['assignee', 'status']}
|
||||
extraProps={{ showNavigate: false, space: vacancy._id }}
|
||||
/>
|
||||
|
@ -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,6 +22,9 @@
|
||||
return
|
||||
}
|
||||
|
||||
if (onChange !== undefined) {
|
||||
onChange(newDueDate)
|
||||
} else {
|
||||
await client.updateCollection(
|
||||
object._class,
|
||||
object.space,
|
||||
@ -31,6 +35,7 @@
|
||||
{ dueDate: newDueDate }
|
||||
)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if object}
|
||||
|
Loading…
Reference in New Issue
Block a user