Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
amansinghbais committed Oct 14, 2024
2 parents 7dfbbad + be965ca commit 3cc76f4
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@hotwax/dxp-components",
"version": "1.15.2",
"version": "1.15.3",
"description": "",
"type": "module",
"main": "lib/index.cjs",
Expand Down
2 changes: 1 addition & 1 deletion src/components/DxpOmsInstanceNavigator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<ion-card-content>
{{ $t('This is the name of the OMS you are connected to right now. Make sure that you are connected to the right instance before proceeding.') }}
</ion-card-content>
<ion-button @click="goToOms(token.value, oms)" fill="clear" :disabled="!appContext.hasPermission('APP_COMMERCE_VIEW')">
<ion-button @click="goToOms(token.value, oms)" fill="clear" :disabled="!appContext.hasPermission(appContext.Actions.APP_COMMERCE_VIEW)">
{{ $t('Go to OMS') }}
<ion-icon slot="end" :icon="openOutline" />
</ion-button>
Expand Down
4 changes: 2 additions & 2 deletions src/components/DxpProductIdentifier.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
{{ 'Choosing a product identifier allows you to view products with your preferred identifiers.' }}
</ion-card-content>

<ion-item>
<ion-item :disabled="!appContext.hasPermission(appContext.Actions.APP_PRODUCT_IDENTIFIER_UPDATE)">
<ion-select :label="$t('Primary')" interface="popover" :placeholder="'primary identifier'" :value="productIdentificationPref.primaryId" @ionChange="setProductIdentificationPref($event.detail.value, 'primaryId')">
<ion-select-option v-for="identification in productIdentificationOptions" :key="identification" :value="identification" >{{ identification }}</ion-select-option>
</ion-select>
</ion-item>
<ion-item lines="none">
<ion-item lines="none" :disabled="!appContext.hasPermission(appContext.Actions.APP_PRODUCT_IDENTIFIER_UPDATE)">
<ion-select :label="$t('Secondary')" interface="popover" :placeholder="'secondary identifier'" :value="productIdentificationPref.secondaryId" @ionChange="setProductIdentificationPref($event.detail.value, 'secondaryId')">
<ion-select-option v-for="identification in productIdentificationOptions" :key="identification" :value="identification" >{{ identification }}</ion-select-option>
<ion-select-option value="">{{ "None" }}</ion-select-option>
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ export let dxpComponents = {
loginContext.getConfig = options.getConfig
loginContext.initialise = options.initialise

appContext.Actions = options.Actions
appContext.hasPermission = options.hasPermission

// set a default locale in the state
Expand Down
2 changes: 1 addition & 1 deletion src/store/productIdentification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const useProductIdentificationStore = defineStore('productIdentification'
primaryId: '',
secondaryId: ''
},
productIdentificationOptions: ["productId", "groupId", "groupName", "internalName", "parentProductName", "primaryProductCategoryName", "sku", "title", "SHOPIFY_PROD_SKU"]
productIdentificationOptions: ["productId", "groupId", "groupName", "internalName", "parentProductName", "primaryProductCategoryName", "sku", "title", "SHOPIFY_PROD_SKU", "upc"]
}
},
getters: {
Expand Down

0 comments on commit 3cc76f4

Please sign in to comment.