Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix admin access to the campaign expneses (#1400)
* Expenses for campaigns: 1. The users can report how spent the money from a campaign. 2. They can upload files to justify those expenses. * Add the layout of the portal to the expenses form. * Allow for expenses files to be downloaded and delete. Make sure the expenses edit button and UI is only visible for the coordinator and the admin user. * Add the expenses list to the campaigns page if there are any. The coordinator can edit them, the rest can download them. * Fix the build of the frontend. Remove unused elements. * Stop using the can-edit endpoint. We can use the useCurrentUser to get the current user id and compare it to the organizer. * Refactor the endpoints for the expenses lists. In order to make the more REST like - we are going via the campaign. * Fix a bug - isAdmin does not seems to be working in this context. * We should not allow any expenses to be saved without an attachment. * Add an on error handler when uploading an expense file. * Use isAdmin function for production. podkrepi-admin role is not available on other environments.
- Loading branch information