Commit 7342e809 authored by Vitaly Slobodin's avatar Vitaly Slobodin

Merge branch 'al-331188-license-start-date-format' into 'master'

Display license start date without special format

See merge request gitlab-org/gitlab!64022
parents 14fd3b26 64e34537
...@@ -2,18 +2,15 @@ ...@@ -2,18 +2,15 @@
import { GlCard } from '@gitlab/ui'; import { GlCard } from '@gitlab/ui';
import { identity } from 'lodash'; import { identity } from 'lodash';
import { getIdFromGraphQLId } from '~/graphql_shared/utils'; import { getIdFromGraphQLId } from '~/graphql_shared/utils';
import { formatDate, getTimeago } from '~/lib/utils/datetime_utility'; import { getTimeago } from '~/lib/utils/datetime_utility';
import { capitalizeFirstCharacter } from '~/lib/utils/text_utility'; import { capitalizeFirstCharacter } from '~/lib/utils/text_utility';
import SubscriptionDetailsTable from './subscription_details_table.vue'; import SubscriptionDetailsTable from './subscription_details_table.vue';
const humanReadableDate = (value) => (value ? formatDate(value, 'd mmmm yyyy') : '');
const subscriptionDetailsFormatRules = { const subscriptionDetailsFormatRules = {
id: getIdFromGraphQLId, id: getIdFromGraphQLId,
expiresAt: getTimeago().format, expiresAt: getTimeago().format,
lastSync: getTimeago().format, lastSync: getTimeago().format,
plan: capitalizeFirstCharacter, plan: capitalizeFirstCharacter,
startsAt: humanReadableDate,
}; };
export default { export default {
......
...@@ -73,7 +73,7 @@ describe('Subscription Details Card', () => { ...@@ -73,7 +73,7 @@ describe('Subscription Details Card', () => {
}, },
{ {
detail: 'startsAt', detail: 'startsAt',
value: '11 March 2021', value: '2021-03-11',
}, },
]); ]);
}); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment