Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed: Allowed users to successfully update product identifiers(#494) #498

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/store/modules/user/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
/**
* Login user and return token
*/
async login ({ commit, dispatch, getters }, payload) {

Check warning on line 36 in src/store/modules/user/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (18.x)

'getters' is defined but never used

Check warning on line 36 in src/store/modules/user/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (20.x)

'getters' is defined but never used
try {
const {token, oms} = payload;
dispatch("setUserInstanceUrl", oms);
Expand Down Expand Up @@ -84,7 +84,7 @@
}, []);
// TODO Use a separate API for getting facilities, this should handle user like admin accessing the app
const currentEComStore = await UserService.getCurrentEComStore(token, getCurrentFacilityId());

await useUserStore().setEComStorePreference(currentEComStore);
/* ---- Guard clauses ends here --- */

setPermissions(appPermissions);
Expand Down Expand Up @@ -184,6 +184,7 @@
dispatch("order/clearOrders", null, {root: true})
dispatch("product/clearProducts", null, {root: true})
const eComStore = await UserService.getCurrentEComStore(token, facilityId);
await useUserStore().setEComStorePreference(eComStore);
commit(types.USER_CURRENT_ECOM_STORE_UPDATED, eComStore)
await useProductIdentificationStore().getIdentificationPref(eComStore?.productStoreId)
},
Expand Down Expand Up @@ -325,7 +326,7 @@
commit(types.USER_ALL_NOTIFICATION_PREFS_UPDATED, allNotificationPrefs)
},

async fetchBopisProductStoreSettings({ commit, dispatch }) {

Check warning on line 329 in src/store/modules/user/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (18.x)

'dispatch' is defined but never used

Check warning on line 329 in src/store/modules/user/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (20.x)

'dispatch' is defined but never used
const productStoreSettings = JSON.parse(process.env.VUE_APP_PRODUCT_STORE_SETTING_ENUMS);
const settingValues = {} as any;

Expand Down Expand Up @@ -359,7 +360,7 @@
commit(types.USER_BOPIS_PRODUCT_STORE_SETTINGS_UPDATED, settingValues)
},

async createProductStoreSetting({ commit }, enumeration) {

Check warning on line 363 in src/store/modules/user/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (18.x)

'commit' is defined but never used

Check warning on line 363 in src/store/modules/user/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (20.x)

'commit' is defined but never used
const fromDate = Date.now()

try {
Expand Down Expand Up @@ -391,8 +392,8 @@
return fromDate;
},

async setProductStoreSetting({ commit, dispatch, state }, payload) {

Check warning on line 395 in src/store/modules/user/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (18.x)

'dispatch' is defined but never used

Check warning on line 395 in src/store/modules/user/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (20.x)

'dispatch' is defined but never used
const productStoreSettings = JSON.parse(process.env.VUE_APP_PRODUCT_STORE_SETTING_ENUMS);

Check warning on line 396 in src/store/modules/user/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (18.x)

'productStoreSettings' is assigned a value but never used

Check warning on line 396 in src/store/modules/user/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (20.x)

'productStoreSettings' is assigned a value but never used
let prefValue = state.bopisProductStoreSettings[payload.enumId]
const eComStoreId = this.state.user.currentEComStore.productStoreId;

Expand Down
Loading