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 { Timestamp } from '@hcengineering/core'
import DueDatePopup from './DueDatePopup.svelte' import DueDatePopup from './DueDatePopup.svelte'
import { tooltip } from '../../tooltips' import { tooltip } from '../../tooltips'
import ui from '../../plugin'
import DatePresenter from './DatePresenter.svelte' import DatePresenter from './DatePresenter.svelte'
import { getDaysDifference, getDueDateIconModifier, getFormattedDate } from './internal/DateUtils' import { getDaysDifference, getDueDateIconModifier, getFormattedDate } from './internal/DateUtils'
import { ButtonKind, ButtonSize } from '../../types' import { ButtonKind, ButtonSize } from '../../types'
@ -67,6 +68,7 @@
: undefined} : undefined}
> >
<DatePresenter <DatePresenter
labelNull={ui.string.DueDate}
{value} {value}
{editable} {editable}
{iconModifier} {iconModifier}

View File

@ -18,7 +18,7 @@
import type { Contact, Employee, Person } from '@hcengineering/contact' import type { Contact, Employee, Person } from '@hcengineering/contact'
import contact from '@hcengineering/contact' import contact from '@hcengineering/contact'
import { EmployeeBox, ExpandRightDouble, UserBox } from '@hcengineering/contact-resources' import { EmployeeBox, ExpandRightDouble, UserBox } from '@hcengineering/contact-resources'
import { import core, {
Account, Account,
AccountRole, AccountRole,
Class, Class,
@ -160,10 +160,7 @@
status: selectedState._id, status: selectedState._id,
number, number,
identifier: `APP-${number}`, identifier: `APP-${number}`,
assignee: doc.assignee,
rank: makeRank(lastOne?.rank, undefined), rank: makeRank(lastOne?.rank, undefined),
startDate: null,
dueDate: null,
kind kind
}, },
doc._id doc._id
@ -430,7 +427,7 @@
<InlineAttributeBar <InlineAttributeBar
_class={recruit.class.Applicant} _class={recruit.class.Applicant}
object={doc} object={doc}
toClass={task.class.Task} toClass={core.class.AttachedDoc}
ignoreKeys={['assignee', 'status']} ignoreKeys={['assignee', 'status']}
extraProps={{ showNavigate: false, space: vacancy._id }} extraProps={{ showNavigate: false, space: vacancy._id }}
/> />

View File

@ -10,6 +10,7 @@
export let size: ButtonSize = 'medium' export let size: ButtonSize = 'medium'
export let kind: ButtonKind = 'link' export let kind: ButtonKind = 'link'
export let editable: boolean = true export let editable: boolean = true
export let onChange: ((value: any) => void) | undefined
const client = getClient() const client = getClient()
$: status = $statusStore.byId.get(object.status) $: status = $statusStore.byId.get(object.status)
@ -21,6 +22,9 @@
return return
} }
if (onChange !== undefined) {
onChange(newDueDate)
} else {
await client.updateCollection( await client.updateCollection(
object._class, object._class,
object.space, object.space,
@ -31,6 +35,7 @@
{ dueDate: newDueDate } { dueDate: newDueDate }
) )
} }
}
</script> </script>
{#if object} {#if object}