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

Rounded corner in the PDF template and adding margin for titles #3201

Merged
merged 5 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions src/components/drawer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ const Drawer: FC<DrawerProps & CustomDrawerProps> = ({
justifyContent={'space-between'}
alignItems={'center'}
mb={'24px'}
ml={'12px'}
>
<Typography className="h1">{title}</Typography>
<Stack direction={'row'} spacing={0.5}>
Expand Down
13 changes: 11 additions & 2 deletions src/views/meetings/midweek/S140/app_normal/S140PartTime.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@ import { Text, View } from '@react-pdf/renderer';
import { S140PartTimeType } from './index.types';
import styles from './index.styles';

const S140PartTime = ({ time, color, backgroundColor }: S140PartTimeType) => {
const S140PartTime = ({
time,
color,
backgroundColor,
isClosingSong,
}: S140PartTimeType) => {
const conditionalStyle = isClosingSong ? { borderBottomLeftRadius: 6 } : {};

return (
<View style={{ ...styles.timeContainer, backgroundColor }}>
<View
style={{ ...styles.timeContainer, backgroundColor, ...conditionalStyle }}
>
<Text style={{ ...styles.timeText, color }}>{time}</Text>
</View>
);
Expand Down
11 changes: 11 additions & 0 deletions src/views/meetings/midweek/S140/app_normal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ const TemplateS140AppNormal = ({
time={meetingData.timing.pgm_start}
color="#3B4CA3"
backgroundColor="#F2F5FF"
isClosingSong={false}
/>

<S140Source
Expand All @@ -87,6 +88,7 @@ const TemplateS140AppNormal = ({
time={meetingData.timing.opening_comments}
color="#3B4CA3"
backgroundColor="#F2F5FF"
isClosingSong={false}
/>

<S140Source
Expand Down Expand Up @@ -122,6 +124,7 @@ const TemplateS140AppNormal = ({
time={meetingData.timing.tgw_talk}
color="#2A6B77"
backgroundColor="rgba(60, 127, 139, 0.08)"
isClosingSong={false}
/>

<S140Source
Expand All @@ -144,6 +147,7 @@ const TemplateS140AppNormal = ({
time={meetingData.timing.tgw_gems}
color="#2A6B77"
backgroundColor="rgba(60, 127, 139, 0.08)"
isClosingSong={false}
/>

<S140Source
Expand All @@ -161,6 +165,7 @@ const TemplateS140AppNormal = ({
time={meetingData.timing.tgw_bible_reading}
color="#2A6B77"
backgroundColor="rgba(60, 127, 139, 0.08)"
isClosingSong={false}
/>

<S140Source
Expand Down Expand Up @@ -206,6 +211,7 @@ const TemplateS140AppNormal = ({
time={meetingData.timing.lc_middle_song}
color="#942926"
backgroundColor="rgba(184, 43, 16, 0.08)"
isClosingSong={false}
/>

<S140Source
Expand All @@ -225,6 +231,7 @@ const TemplateS140AppNormal = ({
time={meetingData.timing.concluding_comments}
color="#942926"
backgroundColor="rgba(184, 43, 16, 0.08)"
isClosingSong={false}
/>

<S140Source source={t('tr_concludingComments')} />
Expand All @@ -243,6 +250,7 @@ const TemplateS140AppNormal = ({
time={meetingData.timing.co_talk}
color="#942926"
backgroundColor="rgba(184, 43, 16, 0.08)"
isClosingSong={false}
/>

<S140Source source={meetingData.lc_co_talk} />
Expand All @@ -269,6 +277,7 @@ const TemplateS140AppNormal = ({
time={meetingData.timing.cbs}
color="#942926"
backgroundColor="rgba(184, 43, 16, 0.08)"
isClosingSong={false}
/>

<S140Source
Expand All @@ -291,6 +300,7 @@ const TemplateS140AppNormal = ({
time={meetingData.timing.concluding_comments}
color="#942926"
backgroundColor="rgba(184, 43, 16, 0.08)"
isClosingSong={false}
/>

<S140Source source={t('tr_concludingComments')} />
Expand All @@ -306,6 +316,7 @@ const TemplateS140AppNormal = ({
time={meetingData.timing.pgm_end}
color="#942926"
backgroundColor="rgba(184, 43, 16, 0.08)"
isClosingSong={true}
/>

<S140Source
Expand Down
1 change: 1 addition & 0 deletions src/views/meetings/midweek/S140/app_normal/index.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export type S140PartTimeType = {
time: string;
color: string;
backgroundColor: string;
isClosingSong: boolean;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mrtavor: for this case it would be great if we make the isClosingSong prop as optional: isClosingSong?: boolean. Then you can remove all the isClosingSong={false}, and only keep it for the one instance that needs it. Thanks.

};

export type S140SourceType = {
Expand Down
Loading