Skip to content

Commit

Permalink
feat: improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
baptadn committed Jan 14, 2025
1 parent 844183c commit 55a791b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion web/components/pdfs/ApplicationInfos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const ApplicationInfo = ({ application }: { application: Application }) => {
<View style={styles.container}>
<ApplicationSection
// @ts-expect-error
label={`Avez-vous déjà été soutenu·e par ${application?.disponibility?.espace?.users_permissions_user.structureName}?`}
label={`Avez-vous déjà été soutenu·e par ${application?.disponibility?.espace?.users_permissions_user?.structureName}?`}
>
{Boolean(application?.already_supported) ? 'Oui' : 'Non'}
</ApplicationSection>
Expand Down
14 changes: 10 additions & 4 deletions web/pages/api/pdfs/selected/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,15 @@ const buildApplicationsSpreadsheet = async (applications: Application[]) => {
})

const websiteCell = row.getCell(11)
websiteCell.value = {
text: application.company.website,
hyperlink: application.company.website,

if (application.company.website) {
websiteCell.value = {
text: application.company.website,
hyperlink: application.company.website,
}
websiteCell.font = { color: { argb: 'FF0000FF' }, underline: true }
}
websiteCell.font = { color: { argb: 'FF0000FF' }, underline: true }

websiteCell.alignment = { vertical: 'top', horizontal: 'left' }
})

Expand Down Expand Up @@ -157,6 +161,7 @@ const buildSummarySpreadsheet = async (applications: Application[]) => {
).toLocaleString('fr-FR', { month: 'long' })}`,
applications: [
{
id: application.id,
title: application.creation_title,
name: `${application.creation_title} - ${application.company.choreographer} (${application.company.structureName})`,
email: application.company.email,
Expand All @@ -168,6 +173,7 @@ const buildSummarySpreadsheet = async (applications: Application[]) => {
placesMap[place.id].espaces[espace.id].disponibilities[
application.disponibility.id
].applications.push({
id: application.id,
title: application.creation_title,
name: `${application.creation_title} - ${application.company.choreographer} (${application.company.structureName})`,
email: application.company.email,
Expand Down

0 comments on commit 55a791b

Please sign in to comment.