BIG-71: localize moment date formats.

This commit is contained in:
a.bouhuolia
2021-09-15 11:30:03 +02:00
parent cc13383466
commit d5c1ec58c7
24 changed files with 144 additions and 133 deletions

View File

@@ -1,5 +1,4 @@
import React from 'react';
import moment from 'moment';
import {
Intent,
Button,
@@ -11,13 +10,9 @@ import {
} from '@blueprintjs/core';
import intl from 'react-intl-universal';
import { Icon, Money } from 'components';
import { Icon, Money, FormatDateCell } from 'components';
import { safeCallback } from 'utils';
export function DateCell({ value }) {
return moment(value).format('YYYY MMM DD');
}
export function AmountAccessor(row) {
return <Money amount={row.amount} currency={row.currency_code} />;
}
@@ -75,7 +70,7 @@ export function usePaymentMadesTableColumns() {
{
id: 'payment_date',
Header: intl.get('payment_date'),
Cell: DateCell,
Cell: FormatDateCell,
accessor: 'payment_date',
width: 140,
className: 'payment_date',