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 3 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
10 changes: 10 additions & 0 deletions src/assets/img/illustration_no_assigments.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
3 changes: 2 additions & 1 deletion src/features/app_notification/container/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ const NotificationContainer = ({
{notifications.length === 0 && (
<Box
sx={{
height: '318px',
height: '100%',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
gap: '24px',
}}
>
Expand Down
28 changes: 28 additions & 0 deletions src/features/meetings/my_assignments/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import MenuItem from '@components/menuitem';
import MonthContainer from './month_container';
import Select from '@components/select';
import Typography from '@components/typography';
import NoAssigmentsImg from '@assets/img/illustration_no_assigments.svg?component';

const MyAssignments = () => {
const { t } = useAppTranslation();
Expand Down Expand Up @@ -70,6 +71,33 @@ const MyAssignments = () => {
},
}}
>
{personAssignments.length === 0 && (
<Box
sx={{
height: '100%',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
gap: '24px',
}}
>
<NoAssigmentsImg viewBox="0 0 128 128" />
<Stack spacing="8px">
<Typography className="h2">
{t('tr_noAssignmentsYet')}
</Typography>
<Typography
color="var(--grey-400)"
sx={{
maxWidth: '350px',
}}
>
{t('tr_noAssignmentsYetDesc')}
</Typography>
</Stack>
</Box>
)}

<Stack spacing={2.3}>
{personAssignments.map((month) => (
<MonthContainer key={month.month} monthData={month} />
Expand Down
1 change: 1 addition & 0 deletions src/locales/en/congregation.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"tr_ministerialServants": "Ministerial servants",
"tr_studentAssignments": "Student assignments",
"tr_noAssignmentsYet": "No assignments yet",
"tr_noAssignmentsYetDesc": "You don’t have any upcoming assignments, or none that match your current display filter.",
"tr_withTerritory": "With territory",
"tr_withoutTerritory": "Without territory",
"tr_overdue": "Overdue",
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