Skip to content

Commit

Permalink
Updated: change empty state condition, add locale , imporve indentati…
Browse files Browse the repository at this point in the history
…on and shift to two-way data binding(hotwax#285)
  • Loading branch information
R-Sourabh committed Jun 10, 2024
1 parent f9e8905 commit 16c1c16
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"Click the backdrop to dismiss.": "Click the backdrop to dismiss.",
"Completed": "Completed",
"Confirm": "Confirm",
"Configuration missing": "Configuration missing",
"CSV input": "CSV input",
"CSV Mapping": "CSV Mapping",
"Custom date format": "Custom date format",
Expand Down
10 changes: 8 additions & 2 deletions src/store/modules/stock/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,13 @@ const actions: ActionTree<StockState, RootState> = {
commit(types.STOCK_SCHEDULED_INFORMATION, payload)
},
async clearScheduledStock({ commit }) {
commit(types.STOCK_SCHEDULED_INFORMATION, {})
commit(types.STOCK_SCHEDULED_INFORMATION, {
scheduledTime: "",
shopId: "",
restockName: "",
productStoreId: "",
facilityId: ""
})
},
async shopifyShop({ commit }, payload) {
commit(types.STOCK_SHOPIFY_SHOPS_UPDATED, payload)
Expand Down Expand Up @@ -219,7 +225,7 @@ const actions: ActionTree<StockState, RootState> = {
const jobs = resp.data.docs
commit(types.STOCK_JOBS_UPDATED, jobs);
} else {
commit(types.STOCK_JOBS_UPDATED, []);
commit(types.STOCK_JOBS_UPDATED, []);
}
} catch(error) {
logger.error(error);
Expand Down
2 changes: 0 additions & 2 deletions src/store/modules/stock/getters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,5 @@ const getters: GetterTree<OrderState, RootState> = {
getScheduledJobs(state) {
return state.jobs
}


};
export default getters;
5 changes: 3 additions & 2 deletions src/views/ScheduledRestock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
</ion-select>
</ion-item>
<ion-item>
<ion-select :label="translate('Product store')" interface="popover" :placeholder = "translate('Select')" :value="selectedProductStoreId" @ionChange="updateProductStore($event.detail.value)">
<ion-select :label="translate('Product store')" interface="popover" :placeholder = "translate('Select')" v-model="selectedProductStoreId" @ionChange="updateProductStore($event.detail.value)">
<ion-select-option v-for="productStore in productStores" :key="productStore.productStoreId" :value="productStore.productStoreId">
{{ productStore.storeName || productStore.productStoreId }}
</ion-select-option>
Expand Down Expand Up @@ -359,7 +359,8 @@ export default defineComponent({
showToast(translate("Select all the fields to continue"));
return;
}
emitter.emit("presentLoader")
const restockItems = this.content.map(item => {
return {
quantity: item[this.fieldMapping.restockQuantity],
Expand Down
2 changes: 1 addition & 1 deletion src/views/ScheduledRestockReview.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
</ion-item>
<ion-item>
<ion-icon slot="start" :icon="globeOutline"/>
<ion-select :label="translate('Product store')" interface="popover" :placeholder = "translate('Select')" :value="schedule.productStoreId" @ionChange="updateProductStore($event)">
<ion-select :label="translate('Product store')" interface="popover" :placeholder = "translate('Select')" v-model="schedule.productStoreId" @ionChange="updateProductStore($event)">
<ion-select-option v-for="productStore in productStores" :key="productStore.productStoreId" :value="productStore.productStoreId">
{{ productStore.storeName || productStore.productStoreId }}
</ion-select-option>
Expand Down

0 comments on commit 16c1c16

Please sign in to comment.