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

adhoc changes #1621

Merged
merged 1 commit into from
Oct 22, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ const defaultSearchValues = {
type: "text",
populators: {
name: "microplanName",
error: "Required",
validation: { pattern: /^[A-Za-z]+$/i },
// error: "Required",
// validation: { pattern: /^[A-Za-z]+$/i },
},
},
// {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,15 @@ const createUpdatePlanProject = async (req) => {
})
const formulasToUpdate = totalFormData?.FORMULA_CONFIGURATION?.formulaConfiguration?.formulaConfigValues?.filter(row => {
return (row.category && row.output && row.input && row.operatorName && row.assumptionValue)
})?.map((row)=>{
const updatedRow = {...row}
const operatorName = row?.operatorName
delete updatedRow?.operatorName
updatedRow.operator = state?.RuleConfigureOperators?.find(operation => operation.
operatorName === operatorName)?.operatorCode
return updatedRow;
})

const updatedPlanObjFormula = {
...fetchedPlanForFormula,
operations:[
Expand All @@ -382,9 +390,7 @@ const createUpdatePlanProject = async (req) => {
}else {
setShowToast({ key: "error", label: "ERR_ASSUMPTIONS_FORM_UPDATE" });
}




case "UPLOADBOUNDARYDATA":
const fetchedPlanForBoundary = await searchPlanConfig({
PlanConfigurationSearchCriteria: {
Expand Down Expand Up @@ -515,6 +521,14 @@ const createUpdatePlanProject = async (req) => {
} else {
setShowToast({ key: "error", label: "ERR_FAILED_TO_COMPLETE_SETUP" });
}

case "ROLE_ACCESS_CONFIGURATION":
//run any api validations if any/
setCurrentKey((prev) => prev + 1);
setCurrentStep((prev) => prev + 1);
return {
triggeredFrom,
};
default:
setShowToast({ key: "error", label: "ERROR_UNHANDLED_NEXT_OPERATION" });
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ const SearchSavedPlansWithCampaign = async (body) => {
});

const listOfPlans = planEmployeeSearch?.PlanEmployeeAssignment?.map((i) => i.planConfigurationId);
if(listOfPlans.length===0){
return []
}

//here get response from both apis and process data and return
const responsePlan = await Digit.CustomService.getResponse({
Expand All @@ -55,7 +58,7 @@ const SearchSavedPlansWithCampaign = async (body) => {
status: body?.PlanConfigurationSearchCriteria?.status,
limit: body?.PlanConfigurationSearchCriteria?.limit,
offset: body?.PlanConfigurationSearchCriteria?.offset,
id: listOfPlans?.[0],
ids: listOfPlans,
},
},
});
Expand Down