forked from hotwax/dxp-components
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented: support for product identifier component using ionic(hot…
- Loading branch information
1 parent
b59f3d5
commit 95c238c
Showing
5 changed files
with
84 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<template> | ||
<ion-card> | ||
<ion-card-header> | ||
<ion-card-title> | ||
{{ 'Product Identifier' }} | ||
</ion-card-title> | ||
</ion-card-header> | ||
|
||
<ion-card-content> | ||
{{ 'Choosing a product identifier allows you to view products with your preferred identifiers.' }} | ||
</ion-card-content> | ||
|
||
<ion-item> | ||
<ion-label>{{ "Primary Product Identifier" }}</ion-label> | ||
<ion-select 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> | ||
<ion-label>{{ "Secondary Product Identifier" }}</ion-label> | ||
<ion-select 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> | ||
</ion-select> | ||
</ion-item> | ||
</ion-card> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { IonCard, IonCardContent, IonCardHeader, IonCardTitle, IonItem, IonLabel, IonSelect, IonSelectOption } from '@ionic/vue'; | ||
import { appContext } from 'src'; | ||
import { useProductIdentificationStore } from 'src/store/productIdentification'; | ||
import { computed } from 'vue'; | ||
const productIdentificationStore = useProductIdentificationStore(); | ||
const appState = appContext.config.globalProperties.$store | ||
console.log('appState', appState) | ||
const eComStore = computed(() => appState.getters['user/getCurrentEComStore']) | ||
console.log(eComStore) | ||
const productIdentificationOptions = productIdentificationStore.getProductIdentificationOptions; | ||
const productIdentificationPref = productIdentificationStore.getProductIdentificationPref; | ||
function setProductIdentificationPref(value: string | any, id: string) { | ||
console.log('value, id', value, id) | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters