mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-22 01:25:00 +02:00
Change approve time format (#10504)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
@@ -16,15 +16,30 @@
|
||||
<script lang="ts">
|
||||
import { getEmbeddedLabel } from '@hcengineering/platform'
|
||||
import { ApproveRequest } from '@hcengineering/process'
|
||||
import { tooltip } from '@hcengineering/ui'
|
||||
import { getUserTimezone, tooltip } from '@hcengineering/ui'
|
||||
import { BooleanPresenter } from '@hcengineering/view-resources'
|
||||
|
||||
export let value: ApproveRequest
|
||||
|
||||
export function formatSignatureDate (date: number): string {
|
||||
const timeZone: string = getUserTimezone()
|
||||
|
||||
return new Date(date).toLocaleDateString('default', {
|
||||
year: 'numeric',
|
||||
month: 'short',
|
||||
day: 'numeric',
|
||||
timeZone,
|
||||
timeZoneName: 'short',
|
||||
hour: 'numeric',
|
||||
minute: 'numeric',
|
||||
second: 'numeric'
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<div
|
||||
use:tooltip={value.approved !== undefined
|
||||
? { label: getEmbeddedLabel(value.user + ' ' + new Date(value.modifiedOn).toLocaleString()) }
|
||||
? { label: getEmbeddedLabel(value.user + ' ' + formatSignatureDate(value.modifiedOn)) }
|
||||
: undefined}
|
||||
>
|
||||
<BooleanPresenter value={value.approved} />
|
||||
|
||||
Reference in New Issue
Block a user