-
Notifications
You must be signed in to change notification settings - Fork 71
[Documents] Can now categorize documents when uploading #11065
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
Conversation
|
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. |
app/views/documents/index.html.erb
Outdated
| <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> |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
sampoder
left a comment
There was a problem hiding this 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
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.

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.
Wow look at these categories ^ 🤩

^ 😮 new sick dropdown to select categories when uploading a document (also seen in the edit page)
Fixes #10716