Skip to content

Conversation

@Sarvesh-Mk
Copy link
Contributor

@Sarvesh-Mk Sarvesh-Mk commented Jul 23, 2025

Summary of the problem

Currently, there is no way to categorize documents on the documents tab and it makes the documents tab look very messy. Orgs are finding it hard to determine what document is used for what so it might be useful to have categories for them.
image
ew its so disorganized ^ 🤮

Describe your changes

Added an enum to store what category a document is part of. Also created a DB migration file to create a column on the table for this. Also added scopes to filter out by category.

image

Wow look at these categories ^ 🤩
image
^ 😮 new sick dropdown to select categories when uploading a document (also seen in the edit page)

Fixes #10716

@Sarvesh-Mk Sarvesh-Mk requested review from a team as code owners July 23, 2025 03:01
@Sarvesh-Mk
Copy link
Contributor Author

I know you might be thinking "What about preexisting documents?". Well almost every document on the documents tab is a common document which can be modified in the common documents section. In terms of organization specific documents, the only one that comes to my mind is fiscal sponsorship documents which are defaulted to general and are supposed to be general according to the attached issue.

Comment on lines 25 to 42
<h3> General documents </h3>
<div class="grid grid-cols-3 gap-4">
<%= render partial: "document", collection: @active_common_documents.general %>
<%= link_to event_fiscal_sponsorship_letter_path(event_id: @event.slug, format: "pdf") do %>
<li class="card card--hover h-100 w-fit">
<div class="overflow-hidden" style="max-height: 250px;">
<%= image_tag event_fiscal_sponsorship_letter_url(event_id: @event.slug, format: "png"), width: 330, style: "max-width: 100%;" %>
</div>
<strong class="h3 block mt1 line-height-2">Fiscal Sponsorship Confirmation</strong>
<%= user_mention @event.point_of_contact %>
</li>
<% end %>
</div>

<h3> Nonprofit documents </h3>
<div class="grid grid-cols-3 gap-4">
<%= render partial: "document", collection: @active_common_documents.nonprofit_status %>
</div>
Copy link
Member

Choose a reason for hiding this comment

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

What differentiates a general document from a nonprofit document?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Its described in #10716 but I would assume documents like the statement of lost receipt is not a directly related to a non-profit document?

@Sarvesh-Mk Sarvesh-Mk requested a review from YodaLightsabr July 23, 2025 20:47
Copy link
Member

@sampoder sampoder left a comment

Choose a reason for hiding this comment

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

code lgtm! thank you Sarvesh

@sampoder sampoder dismissed YodaLightsabr’s stale review July 26, 2025 16:55

Fixed by Sarvesh

@sampoder sampoder merged commit 43a41cd into hackclub:main Jul 26, 2025
8 of 9 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.

[Document] Add category

3 participants