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

✨ Feature :- Download Conference contract #212

Merged
merged 33 commits into from
Mar 27, 2025

Conversation

ahsanfarooq210
Copy link
Contributor

@ahsanfarooq210 ahsanfarooq210 commented Feb 24, 2025

  • [✨ Feature](Ability for the user to be able to download the contract on the postal registration page)
    This pull request introduces a feature that enables users to download conference contracts directly from the application. The implementation includes generating PDF documents for conference contracts, allowing users to easily access and download them as needed.

Key Changes:

PDF Generation: Integrated functionality to create PDF versions of conference contracts.
Download Capability: Added a feature that allows users to download the generated PDF contracts.
These enhancements aim to improve user experience by providing a straightforward method for obtaining official conference documentation.

…and update PDF page generation to utilize the new structure
@ahsanfarooq210 ahsanfarooq210 changed the title Download Conference contract ✨ Feature :- Download Conference contract Feb 24, 2025
Copy link
Member

@Strehk Strehk left a comment

Choose a reason for hiding this comment

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

Hey @ahsanfarooq210,
thanks for the great work. It looks like the perfect scaffolding we needed to tailor this precisely to our needs while saving us a ton of time – and its just in time as well, because the postal registration for our second conference this year is about to start.

I think one little bug is that the wrong page is being cut out if the user is of age? In my PDF with an adult user I get Page 1, 2 and 4, but if I oversee it correctly, it should be 1, 3 and 4 right?

Also the page index skips the page, which is not ideal for legal documents since it gives the impression of a page missing. If it is too much effort determaining the page indices dynamically, I'd suggest to just index the 3rd and 4th page as 1 and 2 and omit the index from the other pages, since they are not necessarily connected documents.

@ahsanfarooq210
Copy link
Contributor Author

Hi @Strehk. I have made the changes, Please review.

});

yPosition -= 25;
this.page.drawText('Schleswig-Holstein', {
Copy link
Member

Choose a reason for hiding this comment

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

We probably should make this configurable


// Add form title
yPosition -= 60;
this.page.drawText('Postalische Anmeldung MUN-SH 2025', {
Copy link
Member

Choose a reason for hiding this comment

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

Same for this. We at least should consider using paraglide strings for this


// Add recipient address section
yPosition -= 30;
this.page.drawText('per Post zu senden an:', {
Copy link
Member

Choose a reason for hiding this comment

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

And this

// Add consent text
yPosition -= 35;
const consentText =
'im folgenden "Teilnehmende*r", das 18. Lebensjahr am 6. März 2025 noch nicht vollendet hat, erkläre(n) wir/ich uns/mich in meiner Funktion als Erziehungsberechtigte*r mit der Teilnahme des*der Teilnehmenden an MUN-SH 2025 einverstanden und akzeptiere(n) die beigefügten Vertragsbedingungen und die Datenschutzerklärung und in Vertretung von des*der Teilnehmenden.';
Copy link
Member

Choose a reason for hiding this comment

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

here we additionally need variables for the Dates and the conference name

@m1212e
Copy link
Member

m1212e commented Mar 12, 2025

Looks very nice! Normally I don't really use classes in TS but I totally see why it makes sense here.

I have a strange paraglide error on my dev machine right now and will continue the review once I get that fixed.

Thanks a lot for yout work ahsan!

@Strehk
Copy link
Member

Strehk commented Mar 27, 2025

Hey @ahsanfarooq210 we just spoke about this PR and how we want to finalize it and we came to the conclusion, that it might be a lot easier if we just tailor it to our specific needs from here on. That should be less overhead for you and we can directly integrate feedback that we get from our stakeholders. I hope that is okay for you?
Your work is the perfect basis for that and we are VERY grateful for you work on this PR especially. I'll merge it now to get it into the upstream repo. Thanks again!

@Strehk Strehk merged commit f519694 into DeutscheModelUnitedNations:main Mar 27, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants