Skip to content

Feat: Add edit button for user hours on event detail#662

Open
benjamin-antupit wants to merge 1 commit into
masterfrom
582-single-add-button-redirects-to-bulk-add
Open

Feat: Add edit button for user hours on event detail#662
benjamin-antupit wants to merge 1 commit into
masterfrom
582-single-add-button-redirects-to-bulk-add

Conversation

@benjamin-antupit

Copy link
Copy Markdown
Contributor

Adds an edit button (and page) to the event detail mega page (currently under the Reports tab). Edit page shows all user hour instances for event and allow editor to add additional instances or delete instance(s).
image
image

@benjamin-antupit benjamin-antupit added this to the Summer 2022 milestone Jun 4, 2022
@benjamin-antupit benjamin-antupit requested a review from Muirrum June 4, 2022 03:19
@benjamin-antupit benjamin-antupit self-assigned this Jun 4, 2022
@benjamin-antupit benjamin-antupit linked an issue Jun 4, 2022 that may be closed by this pull request
@benjamin-antupit benjamin-antupit force-pushed the 582-single-add-button-redirects-to-bulk-add branch from 30e69a9 to 952f4b4 Compare June 4, 2022 04:00
Adds an edit button (and page) to the event detail mega page. Edit page shows all user hour instances for event and allow editor to add additional instances or delete instance(s).
@benjamin-antupit benjamin-antupit force-pushed the 582-single-add-button-redirects-to-bulk-add branch from b6af4e0 to d0eecf0 Compare June 4, 2022 04:01
Comment thread events/forms.py
category = ModelChoiceField(queryset=Category.objects.all(), required=False)
service = ModelChoiceField(queryset=Service.objects.all(), required=False) # queryset gets changed in constructor

class MKSingleHoursForm(forms.ModelForm):

@tnurse18 tnurse18 Jun 4, 2022

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If I remember correctly, there was already a view for this so creating this form may be redundant. The more forms we can reuse, the better.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The only single-instance hour form that I could find is tied to an individual user and based on Event2012. I based this one off of the bulk hours one and I could combine them, but I figured this would be easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Single Add button redirects to bulk add

2 participants