Skip to content

Commit

Permalink
Removed: removed getter , mutation for productIdentificationPref as n…
Browse files Browse the repository at this point in the history
…ow using it from DXP
Ridwan6947 committed Jul 23, 2024
1 parent 0753cf8 commit 71c48f1
Showing 10 changed files with 10 additions and 22 deletions.
1 change: 0 additions & 1 deletion src/store/modules/user/UserState.ts
Original file line number Diff line number Diff line change
@@ -5,7 +5,6 @@ export default interface UserState {
currentEComStore: object;
instanceUrl: string;
facilityLocationsByFacilityId: any;
productIdentificationPref: any;
permissions: any;
pwaState: any;
}
3 changes: 0 additions & 3 deletions src/store/modules/user/getters.ts
Original file line number Diff line number Diff line change
@@ -36,9 +36,6 @@ const getters: GetterTree <UserState, RootState> = {
getFacilityLocationsByFacilityId: (state) => (facilityId: string) => {
return state.facilityLocationsByFacilityId[facilityId];
},
getProductIdentificationPref: (state) => {
return state.productIdentificationPref;
},
getPwaState(state) {
return state.pwaState;
}
4 changes: 0 additions & 4 deletions src/store/modules/user/index.ts
Original file line number Diff line number Diff line change
@@ -15,10 +15,6 @@ const userModule: Module<UserState, RootState> = {
permissions: [],
instanceUrl: '',
facilityLocationsByFacilityId: {},
productIdentificationPref: {
primaryId: 'productId',
secondaryId: ''
},
pwaState: {
updateExists: false,
registration: null,
1 change: 0 additions & 1 deletion src/store/modules/user/mutation-types.ts
Original file line number Diff line number Diff line change
@@ -6,6 +6,5 @@ export const USER_CURRENT_FACILITY_UPDATED = SN_USER + '/CURRENT_FACILITY_UPDATE
export const USER_INSTANCE_URL_UPDATED = SN_USER + '/INSTANCE_URL_UPDATED'
export const USER_CURRENT_ECOM_STORE_UPDATED = SN_USER + '/CURRENT_ECOM_STORE_UPDATED'
export const USER_FACILITY_LOCATIONS_BY_FACILITY_ID = SN_USER + '/FACILITY_LOCATIONS_BY_FACILITY_ID'
export const USER_PREF_PRODUCT_IDENT_CHANGED = SN_USER + '/PREF_PRODUCT_IDENT_CHANGED'
export const USER_PERMISSIONS_UPDATED = SN_USER + '/PERMISSIONS_UPDATED'
export const USER_PWA_STATE_UPDATED = SN_USER + '/PWA_STATE_UPDATED'
3 changes: 0 additions & 3 deletions src/store/modules/user/mutations.ts
Original file line number Diff line number Diff line change
@@ -28,9 +28,6 @@ const mutations: MutationTree <UserState> = {
[types.USER_FACILITY_LOCATIONS_BY_FACILITY_ID] (state, payload) {
state.facilityLocationsByFacilityId[payload.facilityId] = payload.facilityLocations;
},
[types.USER_PREF_PRODUCT_IDENT_CHANGED](state, payload) {
state.productIdentificationPref = payload
},
[types.USER_PERMISSIONS_UPDATED] (state, payload) {
state.permissions = payload
},
4 changes: 2 additions & 2 deletions src/views/AddProductModal.vue
Original file line number Diff line number Diff line change
@@ -20,8 +20,8 @@
</ion-thumbnail>
<ion-label>
<!-- Honouring the identifications set by the user on the settings page -->
<h2>{{ getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(product.productId)) || getProduct(product.productId).productName }}</h2>
<p>{{ getProductIdentificationValue(productIdentificationPref.secondaryId, getProduct(product.productId))}}</p>
<h2>{{ getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(product.productId)) ? getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(product.productId)) : getProduct(product.productId).productName }}</h2>
<p>{{ getProductIdentificationValue(productIdentificationPref.secondaryId, getProduct(product.productId)) }}</p>
</ion-label>
<ion-icon v-if="isProductAvailableInShipment(product.productId)" color="success" :icon="checkmarkCircle" />
<ion-button v-else fill="outline" @click="addtoShipment(product)">{{ translate("Add to Shipment") }}</ion-button>
4 changes: 2 additions & 2 deletions src/views/AddProductToPOModal.vue
Original file line number Diff line number Diff line change
@@ -19,8 +19,8 @@
</ion-thumbnail>
<ion-label>
<!-- Honouring the identifications set by the user on the settings page -->
<h2>{{ getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(product.productId)) || getProduct(product.productId).productName }}</h2>
<p>{{ getProductIdentificationValue(productIdentificationPref.secondaryId, getProduct(product.productId))}}</p>
<h2>{{ getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(product.productId)) ? getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(product.productId)) : getProduct(product.productId).productName }}</h2>
<p>{{ getProductIdentificationValue(productIdentificationPref.secondaryId, getProduct(product.productId)) }}</p>
</ion-label>
<ion-icon v-if="isProductAvailableInOrder(product.productId)" color="success" :icon="checkmarkCircle" />
<ion-button v-else fill="outline" @click="addtoOrder(product)">{{ translate("Add to Purchase Order") }}</ion-button>
4 changes: 2 additions & 2 deletions src/views/PurchaseOrderDetail.vue
Original file line number Diff line number Diff line change
@@ -56,8 +56,8 @@
<DxpShopifyImg size="small" :src="getProduct(item.productId).mainImageUrl" />
</ion-thumbnail>
<ion-label class="ion-text-wrap">
<h2>{{ getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(item.productId)) || getProduct(item.productId).productName }}</h2>
<p>{{ getProductIdentificationValue(productIdentificationPref.secondaryId, getProduct(item.productId))}}</p>
<h2>{{ getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(item.productId)) ? getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(item.productId)) : getProduct(item.productId).productName }}</h2>
<p>{{ getProductIdentificationValue(productIdentificationPref.secondaryId, getProduct(item.productId)) }}</p>
</ion-label>
</ion-item>
</div>
4 changes: 2 additions & 2 deletions src/views/ReturnDetails.vue
Original file line number Diff line number Diff line change
@@ -41,8 +41,8 @@
<DxpShopifyImg :src="getProduct(item.productId).mainImageUrl" />
</ion-thumbnail>
<ion-label class="ion-text-wrap">
<h2>{{ getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(item.productId)) || getProduct(item.productId).productName }}</h2>
<p>{{ getProductIdentificationValue(productIdentificationPref.secondaryId, getProduct(item.productId))}}</p>
<h2>{{ getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(item.productId)) ? getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(item.productId)) : getProduct(item.productId).productName }}</h2>
<p>{{ getProductIdentificationValue(productIdentificationPref.secondaryId, getProduct(item.productId)) }}</p>
</ion-label>
</ion-item>
</div>
4 changes: 2 additions & 2 deletions src/views/ShipmentDetails.vue
Original file line number Diff line number Diff line change
@@ -39,8 +39,8 @@
<DxpShopifyImg :src="getProduct(item.productId).mainImageUrl" />
</ion-thumbnail>
<ion-label class="ion-text-wrap">
<h2>{{ getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(item.productId)) || getProduct(item.productId).productName }}</h2>
<p>{{ getProductIdentificationValue(productIdentificationPref.secondaryId, getProduct(item.productId))}}</p>
<h2>{{ getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(item.productId)) ? getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(item.productId)) : getProduct(item.productId).productName }}</h2>
<p>{{ getProductIdentificationValue(productIdentificationPref.secondaryId, getProduct(item.productId)) }}</p>
</ion-label>
</ion-item>
</div>

0 comments on commit 71c48f1

Please sign in to comment.