Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bhavya-egov committed Nov 15, 2024
1 parent f076ed0 commit 978884b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const CampaignCard = () => {
},
{
label: t("ACTION_TEST_SETUP_CAMPAIGN_FROM_MICROPLAN"),
link: `/${window?.contextPath}/employee/campaign/setup-microplan&userId=${userId}&status=${microplanStatus}`,
link: `/${window?.contextPath}/employee/campaign/setup-from-microplan&userId=${userId}&status=${microplanStatus}`,
roles: ROLES.CAMPAIGN_MANAGER
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const CampaignSelection = ({ onSelect, formData, formState, ...props }) => {
<div
className="campaign-type-wrapper"
onClick={(e) => {
if (props?.props?.sessionData?.HCM_CAMPAIGN_TYPE?.projectType && !canUpdate && productType!=="microplan") {
if (props?.props?.sessionData?.HCM_CAMPAIGN_TYPE?.projectType && !canUpdate && source!=="microplan") {
setShowPopUp(true);
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,24 @@ import { useTranslation } from "react-i18next";
import { useHistory } from "react-router-dom";
import { MicroplanCampaignSearchConfig } from "../../configs/myMicroplanConfig";

// export const updateUrlParams=(params) =>{
// const url = new URL(window.location.href);
// Object.entries(params).forEach(([key, value]) => {
// url.searchParams.set(key, value);
// });
// window.history.replaceState({}, "", url);
// }

const MyMicroplans = () => {
const { t } = useTranslation();
const history = useHistory();
// const userId = Digit.UserService.getUser().info.uuid;
// const microplanStatus = "RESOURCE_ESTIMATIONS_APPROVED"

// useEffect(() =>{
// updateUrlParams({ userId: userId, status: microplanStatus });
// },[])
const onClickRow = ({ original: row }) => {
console.log("row" , row);
const updatedName = row.name.replace(/&/g, "and");
history.push(`/${window.contextPath}/employee/campaign/setup-campaign?id=${row.campaignId}&draft=true&fetchBoundary=true&draftBoundary=true&source=microplan&microName=${updatedName}`);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ const App = ({ path, BOUNDARY_HIERARCHY_TYPE, hierarchyData }) => {
<PrivateRoute path={`${path}/boundary/view-all-hierarchy`} component={()=> <ViewBoundary />} />
<PrivateRoute path={`${path}/boundary/data`} component={()=> <ViewHierarchy />} />
<PrivateRoute path={`${path}/update-campaign`} component={() => <UpdateCampaign />} />
<PrivateRoute path={`${path}/setup-microplan&userId=${userId}&status=${microplanStatus}`} component={() => <MyMicroplans />} />
<PrivateRoute path={`${path}/setup-from-microplan`} component={() => <MyMicroplans />} />
</AppContainer>
</Switch>
</React.Fragment>
Expand Down

0 comments on commit 978884b

Please sign in to comment.