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

Prod back merge #4523

Merged
merged 9 commits into from
Dec 12, 2024
Merged
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 @@ -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
Loading