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: Orders are not imported with multiple shopify configuration(#2mky5yp) #205

Merged
merged 4 commits into from
Jul 28, 2022
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions src/store/modules/job/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ const actions: ActionTree<JobState, RootState> = {
return resp;
},

async scheduleService({ dispatch, commit, rootGetters }, job) {
async scheduleService({ dispatch, commit }, job) {
let resp;

const payload = {
Expand All @@ -416,7 +416,7 @@ const actions: ActionTree<JobState, RootState> = {
'runAsUser': 'system', //default system, but empty in run now. TODO Need to remove this as we are using SERVICE_RUN_AS_SYSTEM, currently kept it for backward compatibility
'recurrenceTimeZone': this.state.user.current.userTimeZone
},
'shopifyConfigId': rootGetters['user/getShopifyConfigId'],
'shopifyConfigId': this.state.user.shopifyConfigId,
'statusId': "SERVICE_PENDING",
'systemJobEnumId': job.systemJobEnumId
} as any
Expand Down Expand Up @@ -520,7 +520,7 @@ const actions: ActionTree<JobState, RootState> = {
return resp;
},

async runServiceNow({ dispatch, rootGetters }, job) {
async runServiceNow({ dispatch }, job) {
let resp;

const payload = {
Expand All @@ -535,7 +535,7 @@ const actions: ActionTree<JobState, RootState> = {
'parentJobId': job.parentJobId,
'recurrenceTimeZone': this.state.user.current.userTimeZone
},
'shopifyConfigId': rootGetters['user/getShopifyConfigId'],
'shopifyConfigId': this.state.user.shopifyConfigId,
'statusId': "SERVICE_PENDING",
'systemJobEnumId': job.systemJobEnumId
} as any
Expand Down
8 changes: 4 additions & 4 deletions src/store/modules/webhook/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import * as types from './mutations-types'
import { translate } from '@/i18n'

const actions: ActionTree<WebhookState, RootState> = {
async fetchWebhooks({ commit, rootGetters }) {
await WebhookService.fetchShopifyWebhooks({ shopifyConfigId: rootGetters['user/getShopifyConfigId'] }).then(resp => {
async fetchWebhooks({ commit }) {
await WebhookService.fetchShopifyWebhooks({ shopifyConfigId: this.state.user.shopifyConfigId }).then(resp => {
if (resp.status == 200 && resp.data.webhooks?.length > 0 && !hasError(resp)) {
const webhooks = resp.data.webhooks;
const topics: any = {}
Expand All @@ -35,7 +35,7 @@ const actions: ActionTree<WebhookState, RootState> = {
dispatch('fetchWebhooks')
}
},
async subscribeWebhook({ dispatch, rootGetters }, id: string) {
async subscribeWebhook({ dispatch }, id: string) {

// stores the webhook service that needs to be called on the basis of current webhook selected, doing
// so as we have defined separate service for different webhook subscription
Expand All @@ -58,7 +58,7 @@ const actions: ActionTree<WebhookState, RootState> = {
let resp;

try {
resp = await webhookMethod({ shopifyConfigId: rootGetters['user/getShopifyConfigId'] })
resp = await webhookMethod({ shopifyConfigId: this.state.user.shopifyConfigId })

if (resp.status == 200 && !hasError(resp)) {
showToast(translate('Webhook subscribed successfully'))
Expand Down