Commit 64e34537 authored by a_luna's avatar a_luna

Display license start date without special format

The subscription details card and the license history entries
now display the `Started` and `Valid From` dates using the
same format (ISO 8601 date) that we get from the GraphQL
response.

Changelog: fixed
EE: true
parent 4439507e
......@@ -2,18 +2,15 @@
import { GlCard } from '@gitlab/ui';
import { identity } from 'lodash';
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 SubscriptionDetailsTable from './subscription_details_table.vue';
const humanReadableDate = (value) => (value ? formatDate(value, 'd mmmm yyyy') : '');
const subscriptionDetailsFormatRules = {
id: getIdFromGraphQLId,
expiresAt: getTimeago().format,
lastSync: getTimeago().format,
plan: capitalizeFirstCharacter,
startsAt: humanReadableDate,
};
export default {
......
......@@ -73,7 +73,7 @@ describe('Subscription Details Card', () => {
},
{
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