From 4a602b845132bc595ceb348a6ab4087f5e417da6 Mon Sep 17 00:00:00 2001 From: Harshana Srimal Date: Sat, 23 Aug 2025 15:27:10 +0530 Subject: [PATCH 1/9] visible whole content when print trigger --- public/styles.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/styles.css b/public/styles.css index f6c61c0abd..cdaeb8fc23 100644 --- a/public/styles.css +++ b/public/styles.css @@ -12,3 +12,9 @@ body { flex-direction: column; height: 100%; } + +@media print { + * { + overflow: visible !important; + } +} \ No newline at end of file From b3015baa322926ec78ed6abdef25f696b5ae2612 Mon Sep 17 00:00:00 2001 From: Harshana Srimal Date: Sat, 23 Aug 2025 15:28:11 +0530 Subject: [PATCH 2/9] hide button menu when print trigger --- src/common/components/SplitButton.jsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/common/components/SplitButton.jsx b/src/common/components/SplitButton.jsx index dc11b3f8f3..d9ff368764 100644 --- a/src/common/components/SplitButton.jsx +++ b/src/common/components/SplitButton.jsx @@ -2,13 +2,23 @@ import { useRef, useState } from 'react'; import { Button, ButtonGroup, Menu, MenuItem, Typography, } from '@mui/material'; +import { makeStyles } from 'tss-react/mui'; import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown'; +const useStyles = makeStyles()(() => ({ + buttonMenu: { + '@media print': { + display: 'none !important', + }, + }, +})); + const SplitButton = ({ fullWidth, variant, color, disabled, onClick, options, selected, setSelected, }) => { const anchorRef = useRef(); const [menuAnchorEl, setMenuAnchorEl] = useState(null); + const { classes } = useStyles(); return ( <> @@ -21,6 +31,7 @@ const SplitButton = ({ setMenuAnchorEl(null)} From 27f4fa785c4de665420773a75f9472f997fb211a Mon Sep 17 00:00:00 2001 From: Harshana Srimal Date: Sun, 24 Aug 2025 14:26:52 +0530 Subject: [PATCH 3/9] revert to original style file --- public/styles.css | 6 ------ 1 file changed, 6 deletions(-) diff --git a/public/styles.css b/public/styles.css index cdaeb8fc23..3253438773 100644 --- a/public/styles.css +++ b/public/styles.css @@ -11,10 +11,4 @@ body { display: flex; flex-direction: column; height: 100%; -} - -@media print { - * { - overflow: visible !important; - } } \ No newline at end of file From 19eb9592fa1325777059994a33e1e11e2f9fb869 Mon Sep 17 00:00:00 2001 From: Harshana Srimal Date: Sun, 24 Aug 2025 14:29:56 +0530 Subject: [PATCH 4/9] css override - set height of primary root element to auto --- src/common/theme/components.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/common/theme/components.js b/src/common/theme/components.js index 56a2ac75f1..6131108748 100644 --- a/src/common/theme/components.js +++ b/src/common/theme/components.js @@ -4,6 +4,15 @@ export default { noSsr: true, }, }, + MuiCssBaseline: { + styleOverrides: () => ({ + '#root': { + '@media print': { + height: 'auto', + }, + }, + }), + }, MuiOutlinedInput: { styleOverrides: { root: ({ theme }) => ({ From 7ff8351be9047e329671100e79768a1c8d94ef57 Mon Sep 17 00:00:00 2001 From: Harshana Srimal Date: Tue, 26 Aug 2025 13:30:55 +0530 Subject: [PATCH 5/9] revert style.css to original --- public/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/styles.css b/public/styles.css index 3253438773..f6c61c0abd 100644 --- a/public/styles.css +++ b/public/styles.css @@ -11,4 +11,4 @@ body { display: flex; flex-direction: column; height: 100%; -} \ No newline at end of file +} From 93053b9dd117442ffa6a1617f8beac9e89ea3e75 Mon Sep 17 00:00:00 2001 From: Harshana Srimal Date: Tue, 26 Aug 2025 21:28:37 +0530 Subject: [PATCH 6/9] revert component.js to original --- src/common/theme/components.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/common/theme/components.js b/src/common/theme/components.js index 26a7f48408..f318aecb09 100644 --- a/src/common/theme/components.js +++ b/src/common/theme/components.js @@ -4,15 +4,6 @@ export default { noSsr: true, }, }, - MuiCssBaseline: { - styleOverrides: () => ({ - '#root': { - '@media print': { - height: 'auto', - }, - }, - }), - }, MuiOutlinedInput: { styleOverrides: { root: ({ theme }) => ({ From 83da67236edbc9b941b0042b97ac9519ed904046 Mon Sep 17 00:00:00 2001 From: Harshana Srimal Date: Tue, 26 Aug 2025 21:29:06 +0530 Subject: [PATCH 7/9] set height auto when print trigger --- public/styles.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/styles.css b/public/styles.css index f6c61c0abd..fa23bf0928 100644 --- a/public/styles.css +++ b/public/styles.css @@ -12,3 +12,9 @@ body { flex-direction: column; height: 100%; } + +@media print { + body, .root { + height: auto; + } +} From 547d0d1cad99aeec4ccde709a3f8809cc843cf35 Mon Sep 17 00:00:00 2001 From: Harshana Srimal Date: Wed, 27 Aug 2025 20:13:33 +0530 Subject: [PATCH 8/9] revert split button to original --- src/common/components/SplitButton.jsx | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/common/components/SplitButton.jsx b/src/common/components/SplitButton.jsx index d9ff368764..dc11b3f8f3 100644 --- a/src/common/components/SplitButton.jsx +++ b/src/common/components/SplitButton.jsx @@ -2,23 +2,13 @@ import { useRef, useState } from 'react'; import { Button, ButtonGroup, Menu, MenuItem, Typography, } from '@mui/material'; -import { makeStyles } from 'tss-react/mui'; import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown'; -const useStyles = makeStyles()(() => ({ - buttonMenu: { - '@media print': { - display: 'none !important', - }, - }, -})); - const SplitButton = ({ fullWidth, variant, color, disabled, onClick, options, selected, setSelected, }) => { const anchorRef = useRef(); const [menuAnchorEl, setMenuAnchorEl] = useState(null); - const { classes } = useStyles(); return ( <> @@ -31,7 +21,6 @@ const SplitButton = ({ setMenuAnchorEl(null)} From b19447f02d1d5fded4b4a131d85ab5210293595c Mon Sep 17 00:00:00 2001 From: Harshana Srimal Date: Wed, 27 Aug 2025 20:14:03 +0530 Subject: [PATCH 9/9] add styles only for root --- public/styles.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/styles.css b/public/styles.css index fa23bf0928..076e2d77ec 100644 --- a/public/styles.css +++ b/public/styles.css @@ -14,7 +14,7 @@ body { } @media print { - body, .root { + .root { height: auto; } }