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

Improved: UI for the alternate pickup options #101

Draft
wants to merge 21 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
f01f071
Improved: font-family for the whole application to Futura and also ad…
ymaheshwari1 Sep 28, 2024
3b56702
Improved: UI to add the gorjana logo on the order screen
ymaheshwari1 Sep 30, 2024
f371093
Improved: global styling property to make the primary color of the ap…
ymaheshwari1 Sep 30, 2024
a0eaaaa
Implemented: service for fetching brokering history for the order
ymaheshwari1 Oct 1, 2024
20e69c8
Improved: static labels as per the changes suggested, added new field…
ymaheshwari1 Oct 1, 2024
f64f808
Implemented: support to fetch the last brokered facility for store pi…
ymaheshwari1 Oct 1, 2024
e333828
Updated: labels in locales file
ymaheshwari1 Oct 1, 2024
7889117
Improved: label in the pickup location modal, changed the save button…
ymaheshwari1 Oct 1, 2024
ba3ce82
Improved: UI to display background image
ymaheshwari1 Oct 1, 2024
0ebc4f1
Improved: UI as per the new desgins
ymaheshwari1 Oct 1, 2024
56b945e
Implemented: support to display the last rejected facility in the pic…
ymaheshwari1 Oct 1, 2024
fd33400
Implemented: support to display the rejected facility in pickup modal…
ymaheshwari1 Oct 1, 2024
a7ed2f0
Improved: code to display dynamic error message based on specific con…
ymaheshwari1 Oct 1, 2024
f7664c8
Implemented: support to dispaly stores after clearing the search results
ymaheshwari1 Oct 1, 2024
a9fdab6
Improved: the deployment configuration file for firebase
ymaheshwari1 Oct 1, 2024
aede64c
Improved: styling for the order details component
ymaheshwari1 Oct 1, 2024
493d8a7
Improved: UI to display the shipTo address in the accordion, and adde…
ymaheshwari1 Oct 1, 2024
8a42561
Implemented: support to display the previously selected facility by d…
ymaheshwari1 Oct 1, 2024
57e0f4f
Improved: viewSize to hardcoded value when fetching states
ymaheshwari1 Oct 1, 2024
cf378b4
Fixed: typos in the code
ymaheshwari1 Oct 1, 2024
4d8f2f7
Updated: static text entry sequencing in locales file
ymaheshwari1 Oct 1, 2024
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
11 changes: 4 additions & 7 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
{
"projects": {
"default": "hotwax-digital-commerce",
"uat": "hotwax-digital-commerce-uat",
"production": "digital-commerce-71eb8"
},
"targets": {
"hotwax-digital-commerce": {
"hotwax-digital-commerce-uat": {
"hosting": {
"dev": [
"dev-reroute-fulfilment"
],
"uat": [
"reroute-fulfilment-uat"
"gorjana-reroute-fulfilment-uat"
]
}
},
"digital-commerce-71eb8": {
"hosting": {
"prod": [
"reroute-fulfilment"
"gorjana-reroute-fulfilment"
]
}
}
Expand Down
Binary file added src/assets/images/background.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 25 additions & 18 deletions src/i18n/locales/en.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,60 @@
{
"Add address": "Add address",
"Address": "Address",
"An email will be sent to you when your item(s) are ready to collect at the new requested location(s).": "An email will be sent to you when your item(s) are ready to collect at the new requested location(s).",
"Are you sure you want to save the changes?": "Are you sure you want to save the changes?",
"Apartment, Suite, etc.": "Apartment, Suite, etc.",
"Are you sure you want to cancel the order items?": "Are you sure you want to cancel the order items?",
"Are you sure you want to save the changes?": "Are you sure you want to save the changes?",
"Cancel": "Cancel",
"Cancel items": "Cancel items",
"Change Store": "Change Store",
"Changes saved": "Changes saved",
"City": "City",
"Confirm": "Confirm",
"Click the backdrop to dismiss.": "Click the backdrop to dismiss.",
"Delivery method": "Delivery method",
"Confirm": "Confirm",
"Delivery Method": "Delivery Method",
"Don't Cancel": "Don't Cancel",
"Edit address": "Edit address",
"Edit Zip Code": "Edit Zip Code",
"Estimated delivery": "Estimated delivery",
"Existing facility selected again, please select a different facility": "Existing facility selected again, please select a different facility",
"Fetching order details.": "Fetching order details.",
"Fetching stores.": "Fetching stores.",
"First name": "First name",
"Failed to cancel the order": "Failed to cancel the order",
"Failed to update the pickup store": "Failed to update the pickup store",
"Failed to update the shipping addess": "Failed to update the shipping addess",
"Failed to update the shipping address": "Failed to update the shipping address",
"Fetching address": "Fetching address",
"Fetching order details.": "Fetching order details.",
"Fetching stores.": "Fetching stores.",
"Find Stores": "Find Stores",
"First Name": "First Name",
"Inventory not available at any nearby store, please select alternate delivery method": "Inventory not available at any nearby store, please select alternate delivery method",
"Last name": "Last name",
"Last Name": "Last Name",
"Login": "Login",
"Logout": "Logout",
"mi": "mi",
"Nearby stores": "Nearby stores",
"miles": "miles",
"Nearby Stores": "Nearby Stores",
"No stores found": "No stores found",
"OMS": "OMS",
"Order ID": "Order ID",
"Order cancelled successfully": "Order cancelled successfully",
"Order item not eligible for reroute fulfilment": "Order item not eligible for reroute fulfilment",
"Order ID": "Order ID",
"Order not found": "Order not found",
"Shipment has been cancelled": "Shipment has been cancelled",
"Password": "Password",
"Please fill all the fields": "Please fill all the fields",
"Save changes": "Save changes",
"Save shipping address": "Save shipping address",
"Select pickup location": "Select pickup location",
"Shipping address": "Shipping address",
"Showing pickup locations near": "Showing pickup locations near",
"Search for a postal code to check for pickup stores": "Search for a postal code to check for pickup stores",
"Search Zip Code": "Search Zip Code",
"Select Pickup Location": "Select Pickup Location",
"Settings": "Settings",
"Shipment has been cancelled": "Shipment has been cancelled",
"Shipping Address": "Shipping Address",
"Showing pickup locations near": "Showing pickup locations near ",
"Something went wrong while fetching stores": "Something went wrong while fetching stores",
"Something went wrong while fetching the order details": "Something went wrong while fetching the order details",
"Settings": "Settings",
"State": "State",
"Street": "Street",
"Tracking code": "Tracking code",
"Username": "Username",
"Your Order": "Your Order",
"Zipcode": "Zipcode"
"Zip Code": "Zip Code",
"Zip code not found or invalid": "Zip code not found or invalid"
}
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ app.config.globalProperties.$filters = {
formatDate(value: any, inFormat?: string, outFormat?: string) {
// TODO Use Loxon instead
// TODO Make default format configurable and from environment variables
return moment(value, inFormat).format(outFormat ? outFormat : 'MM-DD-YYYY');
return moment(value, inFormat).format(outFormat ? outFormat : 'MM/DD/YYYY');
},
formatUtcDate(value: any, inFormat?: string, outFormat?: string) {
// TODO Use Loxon instead
Expand Down
9 changes: 9 additions & 0 deletions src/services/OrderService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,17 @@ const getProductStoreSetting = async (payload: any): Promise<any> => {
});
}

const getRerouteOrderBrokeringHistory = async (payload: any): Promise<any> => {
return api({
url: "getRerouteOrderBrokeringHistory",
method: "post",
data: payload
});
}

export const OrderService = {
getOrder,
getRerouteOrderBrokeringHistory,
updateShippingAddress,
updatePickupFacility,
cancelOrderItem,
Expand Down
21 changes: 8 additions & 13 deletions src/theme/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ http://ionicframework.com/docs/theming/ */

/** Ionic CSS Variables **/
:root {
/** primary **/
--ion-color-primary: #3880ff;
--ion-color-primary-rgb: 56, 128, 255;
/** Font **/
--ion-font-family: 'Futura', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'Roboto', sans-serif;

/** primary: made primary color to black **/
--ion-color-primary: #222428;
--ion-color-primary-rgb: 34, 36, 40;
--ion-color-primary-contrast: #ffffff;
--ion-color-primary-contrast-rgb: 255, 255, 255;
--ion-color-primary-shade: #3171e0;
--ion-color-primary-tint: #4c8dff;
--ion-color-primary-shade: #1e2023;
--ion-color-primary-tint: #383a3e;

/** secondary **/
--ion-color-secondary: #3dc2ff;
Expand Down Expand Up @@ -51,14 +54,6 @@ http://ionicframework.com/docs/theming/ */
--ion-color-danger-shade: #cf3c4f;
--ion-color-danger-tint: #ed576b;

/** dark **/
--ion-color-dark: #222428;
--ion-color-dark-rgb: 34, 36, 40;
--ion-color-dark-contrast: #ffffff;
--ion-color-dark-contrast-rgb: 255, 255, 255;
--ion-color-dark-shade: #1e2023;
--ion-color-dark-tint: #383a3e;

/** medium **/
--ion-color-medium: #92949c;
--ion-color-medium-rgb: 146, 148, 156;
Expand Down
29 changes: 21 additions & 8 deletions src/views/AddressModal.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<ion-header>
<ion-toolbar>
<ion-title>{{ $t("Shipping address") }}</ion-title>
<ion-title>{{ $t("Shipping Address") }}</ion-title>
<ion-buttons slot="end" @click="close()">
<ion-button>
<ion-icon :icon="closeOutline" />
Expand All @@ -12,13 +12,16 @@
<ion-content>
<ion-list>
<ion-item>
<ion-input :label="$t('First name')" class="ion-text-right" name="firstName" v-model="address.firstName" id="firstName" type="text"/>
<ion-input :label="$t('First Name')" class="ion-text-right" name="firstName" v-model="address.firstName" id="firstName" type="text"/>
</ion-item>
<ion-item>
<ion-input :label="$t('Last name')" class="ion-text-right" name="lastName" v-model="address.lastName" id="lastName" type="text"/>
<ion-input :label="$t('Last Name')" class="ion-text-right" name="lastName" v-model="address.lastName" id="lastName" type="text"/>
</ion-item>
<ion-item>
<ion-input :label="$t('Street')" class="ion-text-right" name="street" v-model="address.address1" id="address1" type="text"/>
<ion-input :label="$t('Address')" class="ion-text-right" name="street" v-model="address.address1" id="address1" type="text"/>
</ion-item>
<ion-item>
<ion-input :label="$t('Apartment, Suite, etc.')" class="ion-text-right" name="street" v-model="address.address2" id="address2" type="text"/>
</ion-item>
<ion-item>
<ion-input :label="$t('City')" class="ion-text-right" name="city" v-model="address.city" id="city" type="text"/>
Expand All @@ -29,7 +32,7 @@
</ion-select>
</ion-item>
<ion-item>
<ion-input :label="$t('Zipcode')" class="ion-text-right" name="zipcode" v-model="address.postalCode" id="postalCode"/>
<ion-input :label="$t('Zip Code')" class="ion-text-right" name="zipcode" v-model="address.postalCode" id="postalCode"/>
</ion-item>
</ion-list>
<div class="ion-text-center">
Expand Down Expand Up @@ -85,6 +88,7 @@ export default defineComponent({
firstName: "",
lastName: "",
address1: "",
address2: "",
city: "",
stateProvinceGeoId: "",
postalCode: "",
Expand All @@ -106,7 +110,7 @@ export default defineComponent({
async updateAddress() {
const hasEmptyValues = Object.keys(this.address).some((field: string) => {
this.address[field] = this.address[field].trim();
return !this.address[field];
return !this.address[field] && field !== 'address2';
})
if (hasEmptyValues) return showToast(translate("Please fill all the fields"))
const state = this.states.find((state: any) => state.geoId === this.address.stateProvinceGeoId);
Expand All @@ -122,6 +126,7 @@ export default defineComponent({
}

this.address.address1 = this.shipGroup.shipTo.postalAddress.address1
this.address.address2 = this.shipGroup.shipTo.postalAddress.address2
this.address.city = this.shipGroup.shipTo.postalAddress.city
this.address.postalCode = this.shipGroup.shipTo.postalAddress.postalCode
this.address.stateProvinceGeoId = this.shipGroup.shipTo.postalAddress.stateProvinceGeoId
Expand All @@ -137,7 +142,7 @@ export default defineComponent({
const payload = {
"token": this.token,
"countryGeoId": this.shipGroup.shipTo.postalAddress.countryGeoId,
"viewSize": process.env.VUE_APP_VIEW_SIZE
"viewSize": 100
}
const resp = await UtilityService.getAssociatedStates(payload);
if (!hasError(resp)) {
Expand Down Expand Up @@ -172,4 +177,12 @@ export default defineComponent({
return { closeOutline, router, store };
}
});
</script>
</script>

<style>
/* Removes the background color on autofill of input fields */
input:-webkit-autofill,
input:-webkit-autofill:focus {
transition: background-color 0s 600000s, color 0s 600000s !important;
}
</style>
Loading
Loading