MSP-3289 update date format in project
This commit is contained in:
1 parent
f9559055be
commit
b9f6de6968
10 files changed
+31
-18
No files matched your search
@@ -16,6 +16,7 @@ import { ColumnsType } from 'antd/es/table'
|
||||
import './active-configurations-table.scss'
|
||||
import dayjs from 'dayjs'
|
||||
import CanEdit from '@components/CanEdit'
|
||||
import { dateFormats } from '@constants/date.ts'
|
||||
|
||||
|
||||
const ActiveConfigurationsTable: FC<ActiveConfigurationsTablePropsType> =
|
||||
@@ -167,7 +168,7 @@ const ActiveConfigurationsTable: FC<ActiveConfigurationsTablePropsType> =
|
||||
key: 'updatedAt',
|
||||
align: 'center',
|
||||
render: (value: string) => {
|
||||
return dayjs(value).format('HH:mm:ss DD.MM.YYYY')
|
||||
return dayjs(value).format(dateFormats.fullFormat)
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -19,6 +19,7 @@ import { VersionType } from '@type/version.type'
|
||||
|
||||
import './compare-version-modal.scss'
|
||||
import dayjs from 'dayjs'
|
||||
import { dateFormats } from '@constants/date.ts'
|
||||
|
||||
|
||||
const Original = CodeMirrorMerge.Original
|
||||
@@ -52,7 +53,7 @@ const CompareVersionModal: FC<CompareVersionModalPropsType> = ({
|
||||
title: 'Создано',
|
||||
dataIndex: 'createdAt',
|
||||
render: (value: string) => {
|
||||
return dayjs(value).format('HH:mm:ss DD.MM.YYYY')
|
||||
return dayjs(value).format(dateFormats.fullFormat)
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -24,6 +24,7 @@ import tokensApi from '@services/tokensService.ts'
|
||||
|
||||
import './tokens.scss'
|
||||
import CanEdit from '@components/CanEdit'
|
||||
import { dateFormats } from '@constants/date.ts'
|
||||
|
||||
const { FormSelect } = FormComponents
|
||||
const { EmptyData } = Layout
|
||||
@@ -120,8 +121,7 @@ const TokenContent = ({ id }: TokenPropTypes) => {
|
||||
dataIndex: 'createdAt',
|
||||
key: 'createdAt',
|
||||
render: (record) => {
|
||||
const FULL_DATE_FORMAT = 'DD-MM-YYYY/HH:mm'
|
||||
const formatTime = dayjs(record.createdAt).format(FULL_DATE_FORMAT)
|
||||
const formatTime = dayjs(record.createdAt).format(dateFormats.fullFormat)
|
||||
return <div>{formatTime}</div>
|
||||
}
|
||||
},
|
||||
@@ -142,10 +142,9 @@ const TokenContent = ({ id }: TokenPropTypes) => {
|
||||
dataIndex: 'expireTime',
|
||||
key: 'expireTime',
|
||||
render: (value, record) => {
|
||||
const FULL_DATE_FORMAT = 'DD-MM-YYYY, HH:mm'
|
||||
const formatTime = dayjs(record.createdAt)
|
||||
.add(record.expireTime)
|
||||
.format(FULL_DATE_FORMAT)
|
||||
.format(dateFormats.fullFormat)
|
||||
|
||||
return value > 0 ? <span>{formatTime}</span> : <span> Никогда </span>
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user