Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into hotwax#280-i18n-update
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Sourabh committed Apr 9, 2024
2 parents ab17d97 + 3120632 commit bd15606
Show file tree
Hide file tree
Showing 13 changed files with 83 additions and 104 deletions.
81 changes: 26 additions & 55 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
"@hotwax/apps-theme": "^1.2.6",
"@hotwax/dxp-components": "1.12.1",
"@hotwax/oms-api": "^1.13.0",
"@ionic/core": "6.7.5",
"@ionic/vue": "6.7.5",
"@ionic/vue-router": "6.7.5",
"@ionic/core": "^7.6.0",
"@ionic/vue": "^7.6.0",
"@ionic/vue-router": "^7.6.0",
"boon-js": "^2.0.3",
"core-js": "^3.6.5",
"luxon": "^3.2.0",
Expand Down
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ import localeMessages from './locales';

const app = createApp(App)
.use(IonicVue, {
mode: 'md'
mode: 'md',
innerHTMLTemplatesEnabled: true
})
.use(router)
.use(store)
Expand Down
7 changes: 7 additions & 0 deletions src/store/modules/order/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,13 @@ const actions: ActionTree<OrderState, RootState> = {
commit(types.ORDER_SELECTED_ITEMS_UPDATED, { selectedItems: state.selectedItems } );
},

/**
* Clear selected items list
*/
clearSelectedItems ( { commit }) {
commit(types.ORDER_SELECTED_ITEMS_UPDATED, { selectedItems: [] } );
},

/**
* Remove items from selected items
*/
Expand Down
6 changes: 2 additions & 4 deletions src/views/catalog-product-details.vue
Original file line number Diff line number Diff line change
Expand Up @@ -255,12 +255,10 @@
<ion-label slot="end">{{ (atpCalcDetails.excludedAtp || atpCalcDetails.excludedAtp === 0) ? atpCalcDetails.excludedAtp : '-' }}</ion-label>
</ion-item>
<ion-item>
<ion-label>{{ translate("Reserve inventory") }}</ion-label>
<ion-toggle slot="end" :disabled="!inventoryConfig.reserveInvStatus || !hasPermission(Actions.APP_INV_CNFG_UPDT)" :checked="inventoryConfig.reserveInvStatus === 'Y'" @click="updateReserveInvConfig($event)"/>
<ion-toggle :disabled="!inventoryConfig.reserveInvStatus || !hasPermission(Actions.APP_INV_CNFG_UPDT)" :checked="inventoryConfig.reserveInvStatus === 'Y'" @click="updateReserveInvConfig($event)">{{ translate("Reserve inventory") }}</ion-toggle>
</ion-item>
<ion-item>
<ion-label>{{ translate("Hold pre-order physical inventory") }}</ion-label>
<ion-toggle slot="end" :disabled="!inventoryConfig.preOrdPhyInvHoldStatus || !hasPermission(Actions.APP_INV_CNFG_UPDT)" :checked="inventoryConfig.preOrdPhyInvHoldStatus != 'false'" @click="updatePreOrdPhyInvHoldConfig($event)"/>
<ion-toggle :disabled="!inventoryConfig.preOrdPhyInvHoldStatus || !hasPermission(Actions.APP_INV_CNFG_UPDT)" :checked="inventoryConfig.preOrdPhyInvHoldStatus != 'false'" @click="updatePreOrdPhyInvHoldConfig($event)">{{ translate("Hold pre-order physical inventory") }}</ion-toggle>
</ion-item>
</div>
</ion-card>
Expand Down
8 changes: 8 additions & 0 deletions src/views/catalog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,14 @@ export default defineComponent({
border-bottom: 1px solid var(--ion-color-medium);
cursor: pointer;
}
/* Added width property as after updating to ionic7 min-width is getting applied on ion-label inside ion-item
which results in distorted label text and thus reduced ion-item width */
.list-item > ion-item {
width: 100%;
}
@media (max-width: 991px) {
/* ==============
3. Mobile Header
Expand Down
9 changes: 3 additions & 6 deletions src/views/edit-shipping-modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,17 @@
<ion-content>
<ion-radio-group>
<ion-item lines="none">
<ion-radio slot="start"></ion-radio>
<ion-label>{{ translate("Custom") }}</ion-label>
<ion-radio justify="start" label-placement="end">{{ translate("Custom") }}</ion-radio>
</ion-item>
</ion-radio-group>

<ion-item>
<ion-label position="stacked">{{ translate("Ships from date") }}</ion-label>
<ion-input type="date"></ion-input>
<ion-input :label="translate('Ships from date')" label-placement="stacked" type="date"></ion-input>
</ion-item>

<ion-radio-group>
<ion-item lines="none">
<ion-radio slot="start"></ion-radio>
<ion-label>{{ translate("Auto") }}</ion-label>
<ion-radio label-placement="end" justify="start">{{ translate("Auto") }}</ion-radio>
</ion-item>
</ion-radio-group>

Expand Down
24 changes: 14 additions & 10 deletions src/views/orders.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,44 +33,43 @@
:value is a recommended way for vuex state but value is not working for date when resetting with close button used v-model instead of :value
https://vuex.vuejs.org/guide/forms.html#two-way-computed-property
-->
<ion-input v-model="query.orderedAfter" @ionChange="updateQuery()" type="date" />
<ion-input aria-label="ordered-after" v-model="query.orderedAfter" @ionChange="updateQuery()" type="date" />
<ion-icon @click='query.orderedAfter = ""' v-if="query.orderedAfter" :icon="close"/>
</ion-chip>
</ion-item>
<ion-item>
<ion-label>{{ translate("Ordered before") }}</ion-label>
<ion-chip slot="end">
<ion-input v-model="query.orderedBefore" @ionChange="query.orderedBefore = $event.target.value; updateQuery()" type="date" />
<ion-input aria-label="ordered-before" v-model="query.orderedBefore" @ionChange="query.orderedBefore = $event.target.value; updateQuery()" type="date" />
<ion-icon @click='query.orderedBefore = ""' v-if="query.orderedBefore" :icon="close"/>
</ion-chip>
</ion-item>
<ion-item>
<ion-label>{{ translate("Promised after") }}</ion-label>
<ion-chip slot="end">
<ion-input v-model="query.promisedAfter" @ionChange="query.promisedAfter = $event.target.value; updateQuery()" type="date" />
<ion-input aria-label="promised-after" v-model="query.promisedAfter" @ionChange="query.promisedAfter = $event.target.value; updateQuery()" type="date" />
<ion-icon @click='query.promisedAfter = ""' v-if="query.promisedAfter" :icon="close"/>
</ion-chip>
</ion-item>
<ion-item>
<ion-label>{{ translate("Promised before") }}</ion-label>
<ion-chip slot="end">
<ion-input v-model="query.promisedBefore" @ionChange="query.promisedBefore = $event.target.value; updateQuery()" type="date" />
<ion-input aria-label="promised-before" v-model="query.promisedBefore" @ionChange="query.promisedBefore = $event.target.value; updateQuery()" type="date" />
<ion-icon @click='query.promisedBefore = ""' v-if="query.promisedBefore" :icon="close"/>
</ion-chip>
</ion-item>
<ion-item>
<ion-label>{{ translate("Loyalty status") }}</ion-label>
<ion-chip slot="end">
<ion-icon :icon="ribbon" />
<ion-select :placeholder="translate('select')" v-model="query.cusotmerLoyalty" @ionChange="updateQuery()" interface="popover" interface-options="{showBackdrop:false}">
<ion-select aria-label="loyalty-status" :placeholder="translate('select')" v-model="query.cusotmerLoyalty" @ionChange="updateQuery()" interface="popover" interface-options="{showBackdrop:false}">
<ion-select-option v-for=" (key, value) in cusotmerLoyaltyOptions" v-bind:key="key" :value="value">{{key}}</ion-select-option>
</ion-select>
<ion-icon @click='query.cusotmerLoyalty = ""' v-if="query.cusotmerLoyalty" :icon="close"/>
</ion-chip>
</ion-item>
<ion-item lines="none">
<ion-label>{{ translate("Only orders without promise date") }}</ion-label>
<ion-toggle slot="end" @ionChange="query.hasPromisedDate = !query.hasPromisedDate; updateQuery()" :checked="!query.hasPromisedDate"></ion-toggle>
<ion-toggle @ionChange="query.hasPromisedDate = !query.hasPromisedDate; updateQuery()" :checked="!query.hasPromisedDate">{{ translate("Only orders without promise date") }}</ion-toggle>
</ion-item>
</div>

Expand Down Expand Up @@ -134,8 +133,7 @@
<p slot="end"> {{ item.promisedDatetime ? $filters.formatUtcDate(item.promisedDatetime, "yyyy-MM-dd'T'HH:mm:ss'Z'") : '-' }}</p>
</ion-item>
<ion-item button @click="item.isChecked = !item.isChecked" lines="none">
<ion-checkbox :modelValue="item.isChecked" @ionChange="selectItem($event, item)" slot="start"></ion-checkbox>
<ion-label>{{translate("Select item")}}</ion-label>
<ion-checkbox :modelValue="item.isChecked" @ionChange="selectItem($event, item)" label-placement="end" justify="start">{{ translate("Select item") }}</ion-checkbox>
<ion-button fill="clear" color="medium" @click.stop="openPopover($event, item)">
<ion-icon slot="icon-only" :icon="ellipsisVertical" />
</ion-button>
Expand Down Expand Up @@ -448,6 +446,7 @@ export default defineComponent({
this.selectedItems.forEach((item: any) => {
item.isChecked = false;
})
this.store.dispatch("order/clearSelectedItems");
},
async openPopover(ev: Event, item: any) {
const popover = await popoverController.create({
Expand Down Expand Up @@ -552,7 +551,7 @@ export default defineComponent({
.order-header {
display: grid;
grid:"id tags metadata" / max-content 1fr minmax(min-content, max-content);
grid:"id tags metadata" / 1fr 1fr minmax(min-content, max-content);
align-items: center;
}
Expand Down Expand Up @@ -585,6 +584,11 @@ export default defineComponent({
gap: 10px;
}
ion-chip > ion-input, ion-chip > ion-select {
/* In ionic 7, a min-height is getting set on the ion-chip hence removing it. */
min-height: unset !important;
}
@media (max-width: 991px) {
/* ==============
Expand Down
Loading

0 comments on commit bd15606

Please sign in to comment.