Skip to content

Commit

Permalink
Added boundary manager access to the home card
Browse files Browse the repository at this point in the history
  • Loading branch information
jagankumar-egov committed Nov 14, 2024
1 parent a6da672 commit aa672b1
Showing 1 changed file with 11 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import React from "react";
import { useTranslation } from "react-i18next";

const ROLES = {
CAMPAIGN_MANAGER:["CAMPAIGN_MANAGER"],
CAMPAIGN_MANAGER:["CAMPAIGN_MANAGER","MICROPLAN_CAMPAIGN_INTEGRATOR"],
BOUNDARY_MANAGER:["BOUNDARY_MANAGER"],
CAMPAIGN_MANAGER_ONLY:["CAMPAIGN_MANAGER"],
NATIONAL_SUPERVISOR:["NATIONAL_SUPERVISOR"]
};

Expand All @@ -20,41 +22,24 @@ const CampaignCard = () => {
}

const { t } = useTranslation();
const tenantId = Digit.ULBService.getCurrentTenantId();
// const reqCriteria = {
// url: "/project-factory/v1/project-type/search",
// params: {},
// body: { CampaignDetails:{
// tenantId,
// createdBy: Digit.UserService.getUser().info.uuid,
// pagination: {
// "sortBy": "createdTime",
// "sortOrder": "desc",
// "limit": 1,
// "offset": 0
// }
// } },
// config: {
// select: (data) => {
// return data?.totalCount;
// },
// },
// };
// const { isLoading, data } = Digit.Hooks.useCustomAPIHook(
// reqCriteria
// );

let links = [

{
label: t("ACTION_TEST_SETUP_CAMPAIGN"),
link: `/${window?.contextPath}/employee/campaign/setup-campaign`,
roles: ROLES.CAMPAIGN_MANAGER
roles: ROLES.CAMPAIGN_MANAGER_ONLY
},
{
label: t("ACTION_TEST_MY_CAMPAIGN"),
link: `/${window?.contextPath}/employee/campaign/my-campaign`,
roles: ROLES.CAMPAIGN_MANAGER,
// count: isLoading?"-":data
},
{ //@Bhavya put the new url and remove the comment
label: t("ACTION_TEST_SETUP_CAMPAIGN_FROM_MICROPLAN"),
link: `/${window?.contextPath}/employee/campaign/setup-campaign`,
roles: ROLES.CAMPAIGN_MANAGER
},
{
label: t("NATIONAL_DASHBOARD"),
Expand All @@ -71,7 +56,7 @@ const CampaignCard = () => {
{
label: t("BOUNDARY_MANAGEMENT"),
link: `/${window?.contextPath}/employee/campaign/boundary/home`,
roles: ROLES.CAMPAIGN_MANAGER,
roles: ROLES.BOUNDARY_MANAGER,
// count: isLoading?"-":data
},
];
Expand Down

0 comments on commit aa672b1

Please sign in to comment.