Skip to content

Commit

Permalink
Merge pull request #98 from ymaheshwari1/#25k7kta
Browse files Browse the repository at this point in the history
Fixed: a typo for runTimeData variable(#25k7kta)
  • Loading branch information
adityasharma7 authored Apr 8, 2022
2 parents 998e99c + c3f09e2 commit 77d8bc9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
6 changes: 6 additions & 0 deletions changelogs/unreleased/-25k7kta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: 'Fixed: a typo for runTimeData variable'
ticket_id: "#25k7kta"
merge_request: 98
author: Yash Maheshwari
type: fixed
12 changes: 6 additions & 6 deletions src/store/modules/job/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,13 +313,13 @@ const actions: ActionTree<JobState, RootState> = {
'systemJobEnumId': job.systemJobEnumId
} as any

// checking if the runTimeData has productStoreId, and if present then adding it on root level
job?.runTimeData?.productStoreId?.length >= 0 && (payload['productStoreId'] = this.state.user.currentEComStore.productStoreId)
// checking if the runtimeData has productStoreId, and if present then adding it on root level
job?.runtimeData?.productStoreId?.length >= 0 && (payload['productStoreId'] = this.state.user.currentEComStore.productStoreId)
job?.priority && (payload['SERVICE_PRIORITY'] = job.priority.toString())
job?.runTime && (payload['SERVICE_TIME'] = job.runTime.toString())

try {
resp = await JobService.scheduleJob({ ...job.runTimeData, ...payload });
resp = await JobService.scheduleJob({ ...job.runtimeData, ...payload });
if (resp.status == 200 && !hasError(resp)) {
showToast(translate('Service has been scheduled'))
dispatch('fetchJobs', {
Expand Down Expand Up @@ -395,14 +395,14 @@ const actions: ActionTree<JobState, RootState> = {
'systemJobEnumId': job.systemJobEnumId
} as any

// checking if the runTimeData has productStoreId, and if present then adding it on root level
job?.runTimeData?.productStoreId?.length >= 0 && (payload['productStoreId'] = this.state.user.currentEComStore.productStoreId)
// checking if the runtimeData has productStoreId, and if present then adding it on root level
job?.runtimeData?.productStoreId?.length >= 0 && (payload['productStoreId'] = this.state.user.currentEComStore.productStoreId)
job?.priority && (payload['SERVICE_PRIORITY'] = job.priority.toString())
job?.sinceId && (payload['sinceId'] = job.sinceId)
job?.runTime && (payload['SERVICE_TIME'] = job.runTime.toString())

try {
resp = await JobService.scheduleJob({ ...job.runTimeData, ...payload });
resp = await JobService.scheduleJob({ ...job.runtimeData, ...payload });
if (resp.status == 200 && !hasError(resp)) {
showToast(translate('Service has been scheduled'))
// TODO: need to check if we actually need to call fetchJobs when running a service now
Expand Down

0 comments on commit 77d8bc9

Please sign in to comment.