jhipster-vuejs icon indicating copy to clipboard operation
jhipster-vuejs copied to clipboard

Map all dates from server in HTTP services

Open hdurix opened this issue 5 years ago • 3 comments

Overview of the feature request

It would be better to map every dates we receive from the server to Date objects directly in services (between axios and components).

Motivation for or Use Case

We could use dates as real dates and not sometimes as dates and sometimes as strings. See for instance how it is handled in an Angular app: https://github.com/jhipster/jhipster-sample-app/blob/master/src/main/webapp/app/entities/operation/operation.service.ts#L60-L65.

The only difference is that we use plain Date in Vue.js instead of moment types in Angular.

We should do this in entities and in admin pages (user & audits).

The Date filter may also change in order to handle date values instead of strings.

Related issues or PR

https://github.com/jhipster/jhipster-vuejs/pull/479 https://github.com/jhipster/jhipster-vuejs/pull/464

  • [x] Checking this box is mandatory (this is just to show you read everything)

hdurix avatar Oct 15 '19 18:10 hdurix

@hdurix @pascalgrimaud Can I take this up?

snitin315 avatar Jun 16 '20 06:06 snitin315

@snitin315 Sure!

atomfrede avatar Jun 16 '20 06:06 atomfrede

yes plz @snitin315, go ahead :)

pascalgrimaud avatar Jun 16 '20 06:06 pascalgrimaud