From e0dd7b9cb7cf016fe95b529d5cc82c3983b980c4 Mon Sep 17 00:00:00 2001 From: Aditya Sharma Date: Thu, 20 Oct 2022 14:44:45 +0530 Subject: [PATCH] Fixed: job search not working properly on pipeline page Internally contains uses Like operator so changed the operator --- src/store/modules/job/actions.ts | 33 ++++++++------------------------ 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/src/store/modules/job/actions.ts b/src/store/modules/job/actions.ts index e4293d29..af0321b1 100644 --- a/src/store/modules/job/actions.ts +++ b/src/store/modules/job/actions.ts @@ -70,15 +70,9 @@ const actions: ActionTree = { } if (payload.queryString) { - params.inputFields["enumName_value"] = "%"+ payload.queryString + "%" - params.inputFields["enumName_op"] = "like" - params.inputFields["enumName_ic"] = "Y" - params.inputFields["enumName_ic"] = "Y" - params.inputFields["enumName_grp"] = "1" - params.inputFields["description_value"] = "%"+ payload.queryString + "%" - params.inputFields["description_op"] = "like" + params.inputFields["description_value"] = payload.queryString + params.inputFields["description_op"] = "contains" params.inputFields["description_ic"] = "Y" - params.inputFields["description_grp"] = "2" } await JobService.fetchJobInformation(params).then((resp) => { @@ -145,15 +139,9 @@ const actions: ActionTree = { } if (payload.queryString) { - params.inputFields["enumName_value"] = "%"+ payload.queryString + "%" - params.inputFields["jobName_op"] = "like" - params.inputFields["jobName_ic"] = "Y" - params.inputFields["enumName_ic"] = "Y" - params.inputFields["enumName_grp"] = "1" - params.inputFields["description_value"] = "%"+ payload.queryString + "%" - params.inputFields["description_op"] = "like" + params.inputFields["description_value"] = payload.queryString + params.inputFields["description_op"] = "contains" params.inputFields["description_ic"] = "Y" - params.inputFields["description_grp"] = "2" } await JobService.fetchJobInformation(params).then((resp) => { @@ -218,15 +206,10 @@ const actions: ActionTree = { } if (payload.queryString) { - params.inputFields["enumName_value"] = "%"+ payload.queryString + "%" - params.inputFields["enumName_op"] = "like" - params.inputFields["enumName_ic"] = "Y" - params.inputFields["enumName_grp"] = "1" - params.inputFields["description_value"] = "%"+ payload.queryString + "%" - params.inputFields["description_op"] = "like" + params.inputFields["description_value"] = payload.queryString + params.inputFields["description_op"] = "contains" params.inputFields["description_ic"] = "Y" - params.inputFields["description_grp"] = "2" - } + } await JobService.fetchJobInformation(params).then((resp) => { if (resp.status === 200 && resp.data.docs?.length > 0 && !hasError(resp)) { if (resp.data.docs) { @@ -753,4 +736,4 @@ const actions: ActionTree = { } } } -export default actions; \ No newline at end of file +export default actions;