diff --git a/.env.example b/.env.example index 9e1f3493..eb3f1a64 100644 --- a/.env.example +++ b/.env.example @@ -7,7 +7,7 @@ VUE_APP_PERMISSION_ID= VUE_APP_ALIAS={} VUE_APP_MAPPING_TYPES={"IMPORD": "IMP_ORD_MAPPING_PREF","EXPORD": "EXP_PKD_ORD_MAP_PREF"} VUE_APP_MAPPING_IMPORD={"orderId": { "label": "Order ID", "value": "" }, "facilityId": { "label": "Facility ID", "value": "" },"trackingCode": { "label": "Tracking Code", "value": "" }} -VUE_APP_MAPPING_EXPORD={"shipment-id": { "label": "Shipment ID", "value": "" }, "order-id": { "label": "Order ID", "value": "" },"to-name": { "label": "To Name", "value": "" },"address1": { "label": "Address 1", "value": "" },"address2": { "label": "Address 2", "value": "" },"city": { "label": "City", "value": "" },"state": { "label": "State", "value": "" },"zip-code": { "label": "Zip Code", "value": "" },"country-code": { "label": "Country Code", "value": "" },"full-to-address": { "label": "Full Address", "value": "" },"phone-number": { "label": "Phone Number", "value": "" },"email-address": { "label": "Email", "value": "" },"weight": { "label": "Weight", "value": "" },"quantity": { "label": "Quantity", "value": "" },"product-name": { "label": "Product Name", "value": "" },"product-sku": { "label": "Product Sku", "value": "" },"shipping-method": { "label": "Shipping Method", "value": "" },"facility-name": { "label": "Facility Name", "value": "" },"facility-address1": { "label": "Facility Address 1", "value": "" },"facility-address2": { "label": "Facility Address 2", "value": "" },"facility-city": { "label": "Facility City", "value": "" },"facility-state": { "label": "Facility State", "value": "" },"facility-zip-code": { "label": "Facility Zip Code", "value": "" },"facility-phone": { "label": "Facility Phone", "value": "" },"facility-full-address": { "label": "Facility Full Address", "value": "" }, "order-name": { "label": "Order Name", "value": "" }, "customer-name": { "label": "Customer Name", "value": "" }, "first-name": { "label": "First Name", "value": "" }, "last-name": { "label": "Last Name", "value": "" }, "billing-address1": { "label": "Billing Address 1", "value": "" }, "billing-address2": { "label": "Billing Address 2", "value": "" }, "billing-city": { "label": "Billing City", "value": "" }, "billing-state": { "label": "Billing State", "value": "" }, "billing-zip-code": { "label": "Billing Zip Code", "value": "" }, "billing-country-code": { "label": "Billing Country Code", "value": "" }, "billing-phone-number": { "label": "Billing Phone Number", "value": "" }, "delivery-date": { "label": "Delivery Date", "value": "" }, "delivery-time": { "label": "Delivery Time", "value": "" }, "cod-fee": { "label": "COD Fee", "value": "" }, "cod-fee-tax": { "label": "COD Fee Tax", "value": "" }} +VUE_APP_MAPPING_EXPORD={"shipment-id": { "label": "Shipment ID", "value": "" }, "order-id": { "label": "Order ID", "value": "" },"to-name": { "label": "To Name", "value": "" }, "state+city": { "label": "State + City", "value": "" }, "address1": { "label": "Address 1", "value": "" },"address2": { "label": "Address 2", "value": "" },"city": { "label": "City", "value": "" },"state": { "label": "State", "value": "" },"zip-code": { "label": "Zip Code", "value": "" },"country-code": { "label": "Country Code", "value": "" },"full-to-address": { "label": "Full Address", "value": "" },"phone-number": { "label": "Phone Number", "value": "" },"email-address": { "label": "Email", "value": "" },"weight": { "label": "Weight", "value": "" },"quantity": { "label": "Quantity", "value": "" },"product-name": { "label": "Product Name", "value": "" },"product-sku": { "label": "Product Sku", "value": "" },"shipping-method": { "label": "Shipping Method", "value": "" },"facility-name": { "label": "Facility Name", "value": "" },"facility-address1": { "label": "Facility Address 1", "value": "" },"facility-address2": { "label": "Facility Address 2", "value": "" },"facility-city": { "label": "Facility City", "value": "" },"facility-state": { "label": "Facility State", "value": "" },"facility-zip-code": { "label": "Facility Zip Code", "value": "" },"facility-phone": { "label": "Facility Phone", "value": "" },"facility-full-address": { "label": "Facility Full Address", "value": "" }, "order-name": { "label": "Order Name", "value": "" }, "customer-name": { "label": "Customer Name", "value": "" }, "billing-address1": { "label": "Billing Address 1", "value": "" }, "billing-address2": { "label": "Billing Address 2", "value": "" }, "billing-city": { "label": "Billing City", "value": "" }, "billing-state": { "label": "Billing State", "value": "" }, "billing-zip-code": { "label": "Billing Zip Code", "value": "" }, "billing-country-code": { "label": "Billing Country Code", "value": "" }, "billing-phone-number": { "label": "Billing Phone Number", "value": "" }, "delivery-date": { "label": "Delivery Date", "value": "" }, "delivery-time": { "label": "Delivery Time", "value": "" }, "cod-fee": { "label": "COD Fee", "value": "" }, "cod-fee-tax": { "label": "COD Fee Tax", "value": "" }} VUE_APP_LOCALES={"en-US": "English", "es-ES": "EspaƱol", "ja-JP": "Japanese"} VUE_APP_DEFAULT_LOG_LEVEL="error" VUE_APP_LOGIN_URL="http://launchpad.hotwax.io/login" diff --git a/src/locales/en.json b/src/locales/en.json index e7dfe626..d02487a3 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -485,6 +485,7 @@ "Standard": "Standard", "STANDARD": "STANDARD", "State": "State", + "State + City": "State + City", "Status": "Status", "store name": "store name", "Store": "Store", diff --git a/src/locales/es.json b/src/locales/es.json index a7abdfd7..f4d2fc42 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -482,6 +482,7 @@ "Standard": "Standard", "STANDARD": "STANDARD", "State": "Estado", + "State + City": "State + City", "Status": "Estatus", "STAY": "STAY", "Store name": "Nombre de la tienda", diff --git a/src/locales/ja.json b/src/locales/ja.json index 0fcb60ca..01817dc8 100644 --- a/src/locales/ja.json +++ b/src/locales/ja.json @@ -480,6 +480,7 @@ "Standard": "Standard", "STANDARD": "STANDARD", "State": "State", + "State + City": "State + City", "Status": "Status", "store name": "store name", "Store": "Store", diff --git a/src/views/DownloadPackedOrders.vue b/src/views/DownloadPackedOrders.vue index 3df589ef..bba7f726 100644 --- a/src/views/DownloadPackedOrders.vue +++ b/src/views/DownloadPackedOrders.vue @@ -35,7 +35,7 @@ - {{ fields[field] ? fields[field].label : field }} + {{ fields[field] ? translate(fields[field].label) : field }} {{ translate('Custom Label') }} {{ value }} @@ -56,7 +56,7 @@ - {{ fields[field] ? fields[field].label : field }} + {{ fields[field] ? translate(fields[field].label) : field }} @@ -168,6 +168,13 @@ export default defineComponent({ async parse(data: any) { try { this.content = await parseCsv(data).then(res => res); + + // Creating a new field by combining the state and city field + this.content = this.content.map((contentData: any) => { + contentData["state+city"] = (contentData["state"] ? contentData["state"] : "") + (contentData["state"] && contentData["city"] ? " " : "") + (contentData["city"] ? contentData["city"] : "") + + return contentData + }) // get the column names from the data this.dataColumns = Object.keys(this.content[0]); // generating mapping only when we get the packed orders information and parsing of data is successfull