Skip to content

Commit

Permalink
checklist-bugs-localisation, search (#1486)
Browse files Browse the repository at this point in the history
Co-authored-by: suryansh-egov <suryansh.singh.egovernments.org>
  • Loading branch information
suryansh-egov authored Oct 9, 2024
1 parent 171ad78 commit 37c4629
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ export const UICustomizations = {
MyChecklistSearchConfig: {
preProcess: (data, additionalDetails) => {
data.body.ServiceDefinitionCriteria.code.length=0;
let pay = window.history.state.name + '.' + data?.state?.searchForm?.Type?.list + '.' + data?.state?.searchForm?.Role?.code;
let listTemp = data?.state?.searchForm?.Type?.list;
let codeTemp = data?.state?.searchForm?.Role?.code;
let listt = "";
let codee = "";
if(listTemp) listt = listTemp.toUpperCase().replace(/ /g, "_");
if(codeTemp) codee = codeTemp.toUpperCase().replace(/ /g, "_");
let pay = window.history.state.name + '.' + listt + '.' + codee;
data.body.ServiceDefinitionCriteria.code.push(pay);
return data;
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,14 @@ module = "HCM";
code = `${prefix}.SN${index + 1}`; // Nested questions
}
codes[question.id] = code;

let checklistTypeTemp = checklistType.toUpperCase().replace(/ /g, "_");
let roleTemp = role.toUpperCase().replace(/ /g, "_");
let formattedString = `${campaignName}.${checklistTypeTemp}.${roleTemp}.${code}`;


const obj = {
"code": String(code),
"code": formattedString,
"message": String(question.title),
"module": module,
"locale": locale
Expand All @@ -175,8 +181,9 @@ module = "HCM";
const upperCaseString = optionval.toUpperCase();
const transformedString = upperCaseString.replace(/ /g, '_');
option.label = transformedString;
let formattedStringTemp = `${campaignName}.${checklistTypeTemp}.${roleTemp}.${option.label}`;
const obj = {
"code": String(option.label),
"code": formattedStringTemp,
"message": String(optionval),
"module": module, // to be dynamic
"locale": locale //to be dynamic
Expand Down Expand Up @@ -281,8 +288,9 @@ module = "HCM";
uniqueLocal = local.filter((value, index, self) =>
index === self.findIndex((t) => JSON.stringify(t) === JSON.stringify(value))
);

let code_of_checklist = `${campaignName}.${checklistType}.${role}`;
let checklistTypeTemp = checklistType.toUpperCase().replace(/ /g, "_");
let roleTemp = role.toUpperCase().replace(/ /g, "_");
let code_of_checklist = `${campaignName}.${checklistTypeTemp}.${roleTemp}`;
return {
tenantId: tenantId,
// code: role,
Expand Down

0 comments on commit 37c4629

Please sign in to comment.