Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated the code to make date format configurable through env file(#24gtujf) #28

Merged
merged 7 commits into from
Mar 31, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ VUE_APP_I18N_FALLBACK_LOCALE=en
VUE_APP_CACHE_MAX_AGE=3600
VUE_APP_VIEW_SIZE=10
VUE_APP_SECURITY_KEY=VUE_APP_SECURITY_KEY
VUE_APP_DATE_FORMAT = MM/dd/yyyy
adityasharma7 marked this conversation as resolved.
Show resolved Hide resolved
6 changes: 6 additions & 0 deletions changelogs/unreleased/-24gtujf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Updated the code to make date format configurable through env file
ticket_id: "#24gtujf"
merge_request: 28
author: Disha Talreja
type: performance
2 changes: 1 addition & 1 deletion src/views/OrderDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ export default defineComponent({
this.ordersList.items.map((item: any) => {
if (item.isSelected) {
item.quantityOrdered -= this.numberOfPieces;
item.arrivalDate = DateTime.fromFormat(item.arrivalDate, "D").plus({ days: this.numberOfDays }).toFormat('MM/dd/yyyy');
item.arrivalDate = DateTime.fromFormat(item.arrivalDate, "D").plus({ days: this.numberOfDays }).toFormat(process.env.VUE_APP_DATE_FORMAT ? process.env.VUE_APP_DATE_FORMAT : 'MM/dd/yyyy' );
item.isNewProduct = this.catalog;
if(this.facilityId) {
item.facilityId = this.facilityId;
Expand Down