-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Financial reports and expenses list for a campaign (#1383)
* 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.
- Loading branch information
Showing
34 changed files
with
1,101 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/components/client/campaign-expenses/CampaignExpenseCreate.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import Form from 'components/client/campaign-expenses/Form' | ||
import Layout from 'components/client/layout/Layout' | ||
|
||
export default function CreateCampaignExpensePage() { | ||
return ( | ||
<Layout maxWidth={false}> | ||
<Form /> | ||
</Layout> | ||
) | ||
} |
11 changes: 11 additions & 0 deletions
11
src/components/client/campaign-expenses/CampaignExpenseEdit.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import Layout from 'components/client/layout/Layout' | ||
|
||
import Form from './Form' | ||
|
||
export default function ExpensesEditPage() { | ||
return ( | ||
<Layout maxWidth={false}> | ||
<Form /> | ||
</Layout> | ||
) | ||
} |
Oops, something went wrong.