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

FIX : Formatting of Approval Letter #9327

Closed
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
17 changes: 14 additions & 3 deletions src/CAREUI/misc/PrintPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,23 @@ type Props = {
disabled?: boolean;
className?: string;
title: string;
backUrl?: string;
crumbsReplacements?: Record<
string,
{ name?: string; uri?: string; style?: string }
>;
};

export default function PrintPreview(props: Props) {
const PrintPreview: React.FC<Props> = (props) => {
const normalScale = useBreakpoints({ default: 0.44, md: 1 });
const { t } = useTranslation();

return (
<Page title={props.title}>
<Page
title={props.title}
backUrl={props.backUrl}
crumbsReplacements={props.crumbsReplacements}
>
<div className="mx-auto my-8 w-[50rem]">
<div className="top-0 z-20 flex gap-2 bg-secondary-100 px-2 py-4 xl:absolute xl:right-6 xl:top-8 xl:justify-end">
<Button variant="primary" disabled={props.disabled} onClick={print}>
Expand All @@ -52,4 +61,6 @@ export default function PrintPreview(props: Props) {
</div>
</Page>
);
}
};

export default PrintPreview;
2 changes: 2 additions & 0 deletions src/Routers/routes/ResourceRoutes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import BoardView from "@/components/Resource/ResourceBoard";
import ResourceDetails from "@/components/Resource/ResourceDetails";
import { ResourceDetailsUpdate } from "@/components/Resource/ResourceDetailsUpdate";
import ListView from "@/components/Resource/ResourceList";
import ResourcePrintPreview from "@/components/Resource/ResourcePrintPreview";

import { AppRoutes } from "@/Routers/AppRouter";

Expand All @@ -16,6 +17,7 @@ const ResourceRoutes: AppRoutes = {
"/resource/list": () => <ListView />,
"/resource/:id": ({ id }) => <ResourceDetails id={id} />,
"/resource/:id/update": ({ id }) => <ResourceDetailsUpdate id={id} />,
"/resource/:id/print": ({ id }) => <ResourcePrintPreview id={id} />,
};

export default ResourceRoutes;
Loading
Loading