Skip to content

Commit

Permalink
back merge
Browse files Browse the repository at this point in the history
  • Loading branch information
pavlo-mk committed Dec 12, 2024
2 parents 6c66922 + f466892 commit ac4bc8f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const PaymentPlanDetailsHeader = ({
const { t } = useTranslation();
const { businessArea, programId } = useBaseUrl();
const programCycleId = paymentPlan.programCycle?.id;
const { data: programCycleData, isLoading: isLoadingProgramCycle } = useQuery(
const { data: programCycleData } = useQuery(
{
queryKey: [
'programCyclesDetails',
Expand All @@ -54,12 +54,6 @@ export const PaymentPlanDetailsHeader = ({
},
);

if (isLoadingProgramCycle) {
return null;
}

if (!programCycleData) return null;

const breadCrumbsItems: BreadCrumbsItem[] = [];

if (programCycleId) {
Expand All @@ -68,7 +62,7 @@ export const PaymentPlanDetailsHeader = ({
to: '../../..',
});
breadCrumbsItems.push({
title: `${programCycleData.title}`,
title: `${programCycleData?.title || ''}`,
to: '../..',
});
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const ProgramCyclePage = (): ReactElement => {

if (permissions === null) return null;
if (!selectedProgram) return null;
if (!hasPermissions(PERMISSIONS.PM_VIEW_LIST, permissions))
if (!hasPermissions(PERMISSIONS.PM_PROGRAMME_CYCLE_VIEW_LIST, permissions))
return <PermissionDenied />;

return (
Expand Down

0 comments on commit ac4bc8f

Please sign in to comment.