Skip to content

Commit

Permalink
Go Back button and microplan name quotes fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ashish-egov committed Nov 17, 2024
1 parent c3a7bfc commit 42c3b70
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const ActivityHomeCard = ({onClickCard=()=>{},...props}) => {
<div >
<Header styles={{marginBottom:"1rem"}} className="pop-inbox-header">{t(props.title)}</Header>
<div className="summary-sub-heading" style={{marginBottom:"1.5rem"}}>
{`"${t("HCM_MICROPLAN_MICROPLAN_NAME_LABEL")}: ${props.microplanName || t("NO_NAME_AVAILABLE")}"`}
{`${t("HCM_MICROPLAN_MICROPLAN_NAME_LABEL")}: ${props.microplanName || t("NO_NAME_AVAILABLE")}`}
</div>
<div className="activity-grid"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,12 @@ const FacilityCatchmentMapping = () => {

const { isLoading, data, isFetching, refetch } = Digit.Hooks.useCustomAPIHook(reqCriteriaResource);


const { isLoading: isLoadingPlanObject, data: planObject, error: errorPlan, refetch: refetchPlan } = Digit.Hooks.microplanv1.useSearchPlanConfig(
const { isLoading: isLoadingPlanObject, data: planObject } = Digit.Hooks.microplanv1.useSearchPlanConfig(
{
PlanConfigurationSearchCriteria: {
tenantId,
id: url?.microplanId,
},
},
{
enabled: isRootApprover && data?.TotalCount === 0,
}
);

Expand Down Expand Up @@ -160,7 +156,7 @@ const FacilityCatchmentMapping = () => {
<div style={{ marginBottom: isRootApprover && data?.TotalCount === 0 && planObject?.status === "CENSUS_DATA_APPROVED" ?"2.5rem" :"0rem"}}>
<Header styles={{ marginBottom: "1rem" }}>{t("MICROPLAN_ASSIGN_CATCHMENT_VILLAGES")}</Header>
<div className="summary-sub-heading" style={{marginBottom:"1.5rem"}}>
{`"${t("HCM_MICROPLAN_MICROPLAN_NAME_LABEL")}: ${planObject?.name || t("NO_NAME_AVAILABLE")}"`}
{`${t("HCM_MICROPLAN_MICROPLAN_NAME_LABEL")}: ${planObject?.name || t("NO_NAME_AVAILABLE")}`}
</div>
<div className="inbox-search-wrapper">
<InboxSearchComposer
Expand All @@ -185,6 +181,15 @@ const FacilityCatchmentMapping = () => {
style={{}}
/>}

{!isRootApprover && data?.TotalCount === 0 && planObject?.status === "CENSUS_DATA_APPROVED" &&
<ActionBar
actionFields={[
<Button icon={"ArrowBack"} label={t(`GO_BACK_TO_HOME`)} onClick={() => history.push(`/${window.contextPath}/employee`)} type="button" variation="primary" />,
]}
setactionFieldsToRight
sortActionFields
/>}

{showPopup && currentRow && (
<FacilityPopUp
details={currentRow}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ const PlanInbox = () => {
<div>
<Header styles={{marginBottom:"1rem"}} className="pop-inbox-header">{t(`HCM_MICROPLAN_VALIDATE_AND_APPROVE_MICROPLAN_ESTIMATIONS`)}</Header>
<div className="summary-sub-heading">
{`"${t("HCM_MICROPLAN_MICROPLAN_NAME_LABEL")}: ${campaignObject?.campaignName || t("NO_NAME_AVAILABLE")}"`}
{`${t("HCM_MICROPLAN_MICROPLAN_NAME_LABEL")}: ${campaignObject?.campaignName || t("NO_NAME_AVAILABLE")}`}
</div>
</div>
<SearchJurisdiction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ const isStatusConditionMet = (statusCount) => {
<div>
<Header styles={{marginBottom:"1rem"}} className="pop-inbox-header">{t(`VALIDATE_APPROVE_POPULATIONDATA`)}</Header>
<div className="summary-sub-heading">
{`"${t("HCM_MICROPLAN_MICROPLAN_NAME_LABEL")}: ${planObject?.name || t("NO_NAME_AVAILABLE")}"`}
{`${t("HCM_MICROPLAN_MICROPLAN_NAME_LABEL")}: ${planObject?.name || t("NO_NAME_AVAILABLE")}`}
</div>
</div>
<SearchJurisdiction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ const VillageView = () => {
<div>
<Header styles={{marginBottom:"1rem"}} className="pop-inbox-header">{t(boundaryCode)}</Header>
<div className="summary-sub-heading" style={{marginBottom:"1.5rem"}}>
{`"${t("HCM_MICROPLAN_MICROPLAN_NAME_LABEL")}: ${campaignObject?.campaignName || t("NO_NAME_AVAILABLE")}"`}
{`${t("HCM_MICROPLAN_MICROPLAN_NAME_LABEL")}: ${campaignObject?.campaignName || t("NO_NAME_AVAILABLE")}`}
</div>
<Card type="primary" className="middle-child">
{hierarchy.map((node, index) => (
Expand Down

0 comments on commit 42c3b70

Please sign in to comment.