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

Deltagerlisten vist for aktiviteten (i Admin) indeholder nu også besked til arrangør, fototilladelse og betalingsinfo #920

Conversation

mhewel
Copy link
Contributor

@mhewel mhewel commented Jun 21, 2023

eksempel:
Screenshot_20230621_103308

…ed til arrangør, fototilladelse og betalingsinfo
Comment on lines 63 to 66
try:
return self.payment_info(False)
except Exception:
return "Andet er aftalt"
Copy link
Contributor

Choose a reason for hiding this comment

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

Vi bør ikke bruge en exception til at returnere en tekst - exceptions bør være håndtering af deciderede fejl.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

payment_info() er ændret, og de steder hvor payment_info() bliver kaldt er også ændret.

@lakridserne
Copy link
Contributor

Det vil være lækkert hvis man ikke kan slette deltagere, samt aktiviteter der er deltagere på.

@mhewel
Copy link
Contributor Author

mhewel commented Jul 12, 2023

Det vil være lækkert hvis man ikke kan slette deltagere, samt aktiviteter der er deltagere på.

Slet checkbox for deltagere er fjernet.
Hvis man trykker på Slet knappen vil den check om der er deltagere / betalinger, og blokere sletning af aktivitet hvis der findes deltager/betalinger

@what-the-diff
Copy link

what-the-diff bot commented Aug 20, 2023

PR Summary

  • Enhancements to ActivityParticipantInline Class in members/admin/activity_admin.py

    • Additional fields: note, photo_permission, and payment_info_text, were introduced to the ActivityParticipantInline class.
    • The raw_id_fields attribute was swapped for can_delete attribute.
  • Updates in members/admin/activityparticipant_admin.py

    • An optimization was performed to remove unused imports.
    • The activity_payment_info_txt and activity_payment_info_html methods were modified to return values based on the payment_info status of the item.
  • Changes in members/models/activityparticipant.py

    • A new payment_info_text method is added as a short description for payment_info.
    • The payment_info method was modified to ensure the activity.price_in_dkk is 0 before checking for payment details offering a more efficient payment info processing.
  • Introduction of members/static/members/css/custom_admin.css

    • A new css file, custom_admin.css, has been added to enhance the web interface design and user experience.

Copy link
Contributor

@rasmusselsmark rasmusselsmark left a comment

Choose a reason for hiding this comment

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

Gennemgået på Mikaels PC her til fysisk udviklerdag

Comment on lines 91 to 93
# Checking for price = 0 before checking for payment
if self.activity.price_in_dkk == 0:
result_string = f"{html_good_pre}Gratis.{html_post} "
Copy link
Contributor

Choose a reason for hiding this comment

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

Flyt disse linjer op over try/except (linje 77).

Husk at returnere det, ellers udfører den fortsat det i try/except!

@rasmusselsmark rasmusselsmark merged commit e284328 into master Aug 20, 2023
2 checks passed
@rasmusselsmark rasmusselsmark deleted the 908-feature-overblik-over-betalingsinfo-under-selve-aktivitetens-info branch August 31, 2024 09:29
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.

[Feature] Overblik over betalingsinfo under selve aktivitetens info
3 participants