Set due date when create application (#7683)
Some checks are pending
CI / build (push) Waiting to run
CI / svelte-check (push) Blocked by required conditions
CI / formatting (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / uitest (push) Waiting to run
CI / uitest-pg (push) Waiting to run
CI / uitest-qms (push) Waiting to run
CI / docker-build (push) Blocked by required conditions
CI / dist-build (push) Blocked by required conditions

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2025-01-16 21:03:47 +05:00 committed by GitHub
parent 475e7ee62d
commit 1eb8977a6c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 18 additions and 14 deletions

View File

@ -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}

View File

@ -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 }}
/>

View File

@ -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>