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

updated workflow error message to generic code #2004

Open
wants to merge 1 commit into
base: console
Choose a base branch
from
Open
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 @@ -65,6 +65,14 @@ const MicroplanDetails = ({ onSelect, props: customProps, ...props }) => {
}
});

useEffect(() => {
setMicroplan(
customProps?.sessionData?.MICROPLAN_DETAILS?.microplanDetails?.microplanName
? customProps?.sessionData?.MICROPLAN_DETAILS?.microplanDetails?.microplanName
: Digit.Utils.microplanv1.generateCampaignString(customProps.sessionData, t)
);
}, [customProps?.sessionData]);
Swathi-eGov marked this conversation as resolved.
Show resolved Hide resolved

return (
<>
<ViewCard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ const SetupMicroplan = ({ hierarchyType, hierarchyData }) => {
// Display error toast if update fails
setShowToast({
key: "error",
label: error?.message ? error.message : t("FAILED_TO_UPDATE_RESOURCE"),
label: error?.message ? t("SETUP_COMPLETE_FAILED_DUE_TO_API_INTEGRATION") : t("FAILED_TO_UPDATE_RESOURCE"),
Swathi-eGov marked this conversation as resolved.
Show resolved Hide resolved
});
},
});
Swathi-eGov marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,9 @@ const updateUrlParams = (params) => {
function generateCampaignString(sessionData, t) {

// Extract details from sessionData
const diseaseCode = sessionData.CAMPAIGN_DETAILS.campaignDetails.disease.code;
const campaignTypeCode = sessionData.CAMPAIGN_DETAILS.campaignDetails.campaignType.i18nKey;
const resourceDistributionStrategy = sessionData.CAMPAIGN_DETAILS.campaignDetails.distributionStrat.resourceDistributionStrategyCode;
const diseaseCode = sessionData?.CAMPAIGN_DETAILS?.campaignDetails.disease.code;
const campaignTypeCode = sessionData?.CAMPAIGN_DETAILS?.campaignDetails.campaignType.i18nKey;
const resourceDistributionStrategy = sessionData?.CAMPAIGN_DETAILS?.campaignDetails.distributionStrat.resourceDistributionStrategyCode;
Swathi-eGov marked this conversation as resolved.
Show resolved Hide resolved

// Get current date details
const currentDate = new Date();
Expand Down