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

Allow deletion of admissions from GUI #1343

Merged
merged 1 commit into from Jan 8, 2024
Merged

Allow deletion of admissions from GUI #1343

merged 1 commit into from Jan 8, 2024

Conversation

norbye
Copy link
Member

@norbye norbye commented Jan 8, 2024

Admissions can be deleted by any member of Webkom or by the creator of the admission if the creator is staff (revue boss, hs big boss, backup boss) AFTER the admission has closed. (aka the same people that have permission to edit the admission)

Changes;

  • Write tests to cover deletion
  • Add button in admin "manage admission" view
  • Add backend functionality to delete

Minor stuff that bugged me along the way;

  • Admissions created using python manage.py create_admission were missing slugs, now they don't
  • The modal component had no way to customize the action buttons, now it does

Before;
image

After;

When it's not possible to delete it
image

When it is possible
image

Confirmation dialog
image

Resolves ABA-410

@norbye norbye added new-feature Pull requests that introduce or issues that suggest a new feature review-needed Pull requests that need review labels Jan 8, 2024
Copy link

linear bot commented Jan 8, 2024

@norbye norbye requested a review from a team January 8, 2024 08:05
Copy link
Member

@ivarnakken ivarnakken left a comment

Choose a reason for hiding this comment

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

Also much needed!

I much like the safeguard of not being able to delete until it has closed

frontend/src/components/ConfirmModal/index.tsx Outdated Show resolved Hide resolved
admissions/admissions/models.py Outdated Show resolved Hide resolved
@norbye norbye added approved Pull requests that have been approved and removed review-needed Pull requests that need review labels Jan 8, 2024
@norbye norbye merged commit c847c1a into master Jan 8, 2024
3 checks passed
@norbye norbye deleted the delete-admissions branch January 8, 2024 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Pull requests that have been approved new-feature Pull requests that introduce or issues that suggest a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants