Skip to content

Commit

Permalink
feat: remember filters and copy-to-clipboard button (#146)
Browse files Browse the repository at this point in the history
* feat: email copy button
* feat: session based filter storage
* docs: update env in readme
* chore: update fixtures
* chore: update deps
  • Loading branch information
LiviaValenti authored Jan 18, 2023
1 parent 45219fd commit 75530ad
Show file tree
Hide file tree
Showing 15 changed files with 322 additions and 175 deletions.
3 changes: 2 additions & 1 deletion backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ MAIN_BOARD_ID = 9
ELECTION_COMMITTEE_ID = 10

## Optional ntnui-tools development variable
API_URI = "https://dev.api.ntnui.no"
NTNUI_TOOLS_API_URL = "https://dev.api.ntnui.no"

```

### ☁ Set up MongoDB Atlas
Expand Down
3 changes: 3 additions & 0 deletions backend/controllers/applicationController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,14 +296,17 @@ const getApplications = async (
applications: {
_id: 1,
name: 1,
email: 1,
submitted_date: 1,
committees: {
_id: 1,
name: 1,
slug: 1,
},
statuses: {
_id: 1,
committee: 1,
value: 1,
},
},
pagination: {
Expand Down
10 changes: 6 additions & 4 deletions backend/fixtures/development/admissionperiod.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"start_date": "2022-02-25",
"end_date": "2022-03-31"
}
[
{
"start_date": "2022-02-25",
"end_date": "2022-03-31"
}
]
8 changes: 6 additions & 2 deletions backend/fixtures/development/applications.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"phone_number": "+6969696969",
"email": "[email protected]",
"text": "Jeg forsøker å søke til Triatlon og Turn",
"main_board_text": "",
"committees": [2, 3],
"statuses": [
{
Expand All @@ -28,6 +29,7 @@
"phone_number": "+420420420",
"email": "[email protected]",
"text": "Jeg forsøker å søke til Ski og Fjellsport",
"main_board_text": "",
"committees": [4],
"statuses": [
{
Expand All @@ -45,7 +47,8 @@
"name": "Cris P Bacon",
"phone_number": "+123456789",
"email": "[email protected]",
"text": "Jeg forsøker å søke til Hovedstyret",
"text": "",
"main_board_text": "Søknad til Introstyret",
"committees": [9],
"statuses": [
{
Expand All @@ -63,7 +66,8 @@
"name": "Olle Bolle",
"phone_number": "+987654321",
"email": "[email protected]",
"text": "Jeg forsøker å søke til Hovedstyret og Sprint",
"text": "Søknadstekst til Sprint",
"main_board_text": "Søknadstekst til Introstyret",
"committees": [1, 9],
"statuses": [
{
Expand Down
2 changes: 1 addition & 1 deletion backend/fixtures/development/committees.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
},
{
"_id": 9,
"name": "Hovedstyret",
"name": "Introstyret",
"slug": "hovedstyret",
"access_roles": [
"deputy_leader",
Expand Down
3 changes: 2 additions & 1 deletion frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ Add environment variables to an `.env` file in the frontend folder to connect to

## Optional environment variables to use in development
REACT_APP_BACKEND_URI = 'http://localhost:8082'
# Set main board ID to 9 while using development environment dev.api.ntnui.no
# Set main board ID to 9 and election committee ID to 10 while using development environment dev.api.ntnui.no
REACT_APP_MAIN_BOARD_ID = 9
REACT_APP_ELECTION_COMMITTEE_ID = 10
```

## Scripts
Expand Down
Loading

0 comments on commit 75530ad

Please sign in to comment.