Skip to content

Commit 39956e6

Browse files
authored
Merge pull request #83 from City-of-Helsinki/release/1.3.0
[master] Release 1.3.0
2 parents 27867b2 + 0bf81c3 commit 39956e6

13 files changed

Lines changed: 434 additions & 119 deletions

File tree

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# Change Log
22

3+
## [1.3.0] - 2020-10-15
4+
5+
### Added
6+
7+
- Occurrence enrollments with no guardians now have placeholder values
8+
- Number of people in queue and enrolled to event occurrence
9+
- Number of people in queue to event page
10+
11+
### Fixed
12+
13+
- Reloading occurrence show field no longer returns a blank page
14+
315
# 1.2.0
416

517
- Add occurrence `capacityOverride` field handling in create, edit and show occurrence views

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "kukkuu-admin",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"private": true,
55
"dependencies": {
66
"@sentry/browser": "^5.20.0",
@@ -38,7 +38,7 @@
3838
"ra-language-finnish": "^3.6.0",
3939
"ra-language-swedish": "^1.0.0",
4040
"react": "^16.13.1",
41-
"react-admin": "^3.6.0",
41+
"react-admin": "^3.8.5",
4242
"react-apollo": "^3.1.5",
4343
"react-dom": "^16.13.1",
4444
"react-scripts": "^3.4.1",

src/api/generatedTypes/Occurrence.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,27 @@ export interface Occurrence_occurrence_enrolments {
9393
edges: (Occurrence_occurrence_enrolments_edges | null)[];
9494
}
9595

96+
export interface Occurrence_occurrence_freeSpotNotificationSubscriptions_edges_node {
97+
/**
98+
* The ID of the object.
99+
*/
100+
id: string;
101+
}
102+
103+
export interface Occurrence_occurrence_freeSpotNotificationSubscriptions_edges {
104+
/**
105+
* The item at the end of the edge
106+
*/
107+
node: Occurrence_occurrence_freeSpotNotificationSubscriptions_edges_node | null;
108+
}
109+
110+
export interface Occurrence_occurrence_freeSpotNotificationSubscriptions {
111+
/**
112+
* Contains the nodes in this connection.
113+
*/
114+
edges: (Occurrence_occurrence_freeSpotNotificationSubscriptions_edges | null)[];
115+
}
116+
96117
export interface Occurrence_occurrence {
97118
/**
98119
* The ID of the object.
@@ -108,6 +129,7 @@ export interface Occurrence_occurrence {
108129
capacityOverride: number | null;
109130
venue: Occurrence_occurrence_venue;
110131
enrolments: Occurrence_occurrence_enrolments;
132+
freeSpotNotificationSubscriptions: Occurrence_occurrence_freeSpotNotificationSubscriptions;
111133
}
112134

113135
export interface Occurrence {
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
// @generated
4+
// This file was automatically generated and should not be edited.
5+
6+
import { Language } from "./globalTypes";
7+
8+
// ====================================================
9+
// GraphQL fragment: OccurrenceFragment
10+
// ====================================================
11+
12+
export interface OccurrenceFragment_event {
13+
/**
14+
* The ID of the object.
15+
*/
16+
id: string;
17+
capacityPerOccurrence: number;
18+
/**
19+
* In minutes
20+
*/
21+
duration: number | null;
22+
publishedAt: any | null;
23+
}
24+
25+
export interface OccurrenceFragment_venue_translations {
26+
languageCode: Language;
27+
name: string;
28+
}
29+
30+
export interface OccurrenceFragment_venue {
31+
/**
32+
* The ID of the object.
33+
*/
34+
id: string;
35+
translations: OccurrenceFragment_venue_translations[];
36+
}
37+
38+
export interface OccurrenceFragment_enrolments_edges_node_child_guardians_edges_node {
39+
/**
40+
* The ID of the object.
41+
*/
42+
id: string;
43+
/**
44+
* If left blank, will be populated with the user's email.
45+
*/
46+
email: string;
47+
firstName: string;
48+
lastName: string;
49+
language: Language;
50+
}
51+
52+
export interface OccurrenceFragment_enrolments_edges_node_child_guardians_edges {
53+
/**
54+
* The item at the end of the edge
55+
*/
56+
node: OccurrenceFragment_enrolments_edges_node_child_guardians_edges_node | null;
57+
}
58+
59+
export interface OccurrenceFragment_enrolments_edges_node_child_guardians {
60+
/**
61+
* Contains the nodes in this connection.
62+
*/
63+
edges: (OccurrenceFragment_enrolments_edges_node_child_guardians_edges | null)[];
64+
}
65+
66+
export interface OccurrenceFragment_enrolments_edges_node_child {
67+
firstName: string;
68+
lastName: string;
69+
birthdate: any;
70+
guardians: OccurrenceFragment_enrolments_edges_node_child_guardians;
71+
}
72+
73+
export interface OccurrenceFragment_enrolments_edges_node {
74+
/**
75+
* The ID of the object.
76+
*/
77+
id: string;
78+
attended: boolean | null;
79+
child: OccurrenceFragment_enrolments_edges_node_child;
80+
}
81+
82+
export interface OccurrenceFragment_enrolments_edges {
83+
/**
84+
* The item at the end of the edge
85+
*/
86+
node: OccurrenceFragment_enrolments_edges_node | null;
87+
}
88+
89+
export interface OccurrenceFragment_enrolments {
90+
/**
91+
* Contains the nodes in this connection.
92+
*/
93+
edges: (OccurrenceFragment_enrolments_edges | null)[];
94+
}
95+
96+
export interface OccurrenceFragment_freeSpotNotificationSubscriptions_edges_node {
97+
/**
98+
* The ID of the object.
99+
*/
100+
id: string;
101+
}
102+
103+
export interface OccurrenceFragment_freeSpotNotificationSubscriptions_edges {
104+
/**
105+
* The item at the end of the edge
106+
*/
107+
node: OccurrenceFragment_freeSpotNotificationSubscriptions_edges_node | null;
108+
}
109+
110+
export interface OccurrenceFragment_freeSpotNotificationSubscriptions {
111+
/**
112+
* Contains the nodes in this connection.
113+
*/
114+
edges: (OccurrenceFragment_freeSpotNotificationSubscriptions_edges | null)[];
115+
}
116+
117+
export interface OccurrenceFragment {
118+
/**
119+
* The ID of the object.
120+
*/
121+
id: string;
122+
time: any;
123+
event: OccurrenceFragment_event;
124+
enrolmentCount: number;
125+
capacity: number | null;
126+
/**
127+
* When set will be used as the capacity of this occurrence instead of the value coming from the event.
128+
*/
129+
capacityOverride: number | null;
130+
venue: OccurrenceFragment_venue;
131+
enrolments: OccurrenceFragment_enrolments;
132+
freeSpotNotificationSubscriptions: OccurrenceFragment_freeSpotNotificationSubscriptions;
133+
}

src/api/generatedTypes/Occurrences.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,27 @@ export interface Occurrences_occurrences_edges_node_enrolments {
9393
edges: (Occurrences_occurrences_edges_node_enrolments_edges | null)[];
9494
}
9595

96+
export interface Occurrences_occurrences_edges_node_freeSpotNotificationSubscriptions_edges_node {
97+
/**
98+
* The ID of the object.
99+
*/
100+
id: string;
101+
}
102+
103+
export interface Occurrences_occurrences_edges_node_freeSpotNotificationSubscriptions_edges {
104+
/**
105+
* The item at the end of the edge
106+
*/
107+
node: Occurrences_occurrences_edges_node_freeSpotNotificationSubscriptions_edges_node | null;
108+
}
109+
110+
export interface Occurrences_occurrences_edges_node_freeSpotNotificationSubscriptions {
111+
/**
112+
* Contains the nodes in this connection.
113+
*/
114+
edges: (Occurrences_occurrences_edges_node_freeSpotNotificationSubscriptions_edges | null)[];
115+
}
116+
96117
export interface Occurrences_occurrences_edges_node {
97118
/**
98119
* The ID of the object.
@@ -108,6 +129,7 @@ export interface Occurrences_occurrences_edges_node {
108129
capacityOverride: number | null;
109130
venue: Occurrences_occurrences_edges_node_venue;
110131
enrolments: Occurrences_occurrences_edges_node_enrolments;
132+
freeSpotNotificationSubscriptions: Occurrences_occurrences_edges_node_freeSpotNotificationSubscriptions;
111133
}
112134

113135
export interface Occurrences_occurrences_edges {

src/api/generatedTypes/updateOccurrence.ts

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,64 @@ export interface updateOccurrence_updateOccurrence_occurrence_venue {
3434
translations: updateOccurrence_updateOccurrence_occurrence_venue_translations[];
3535
}
3636

37+
export interface updateOccurrence_updateOccurrence_occurrence_enrolments_edges_node_child_guardians_edges_node {
38+
/**
39+
* The ID of the object.
40+
*/
41+
id: string;
42+
/**
43+
* If left blank, will be populated with the user's email.
44+
*/
45+
email: string;
46+
firstName: string;
47+
lastName: string;
48+
language: Language;
49+
}
50+
51+
export interface updateOccurrence_updateOccurrence_occurrence_enrolments_edges_node_child_guardians_edges {
52+
/**
53+
* The item at the end of the edge
54+
*/
55+
node: updateOccurrence_updateOccurrence_occurrence_enrolments_edges_node_child_guardians_edges_node | null;
56+
}
57+
58+
export interface updateOccurrence_updateOccurrence_occurrence_enrolments_edges_node_child_guardians {
59+
/**
60+
* Contains the nodes in this connection.
61+
*/
62+
edges: (updateOccurrence_updateOccurrence_occurrence_enrolments_edges_node_child_guardians_edges | null)[];
63+
}
64+
65+
export interface updateOccurrence_updateOccurrence_occurrence_enrolments_edges_node_child {
66+
firstName: string;
67+
lastName: string;
68+
birthdate: any;
69+
guardians: updateOccurrence_updateOccurrence_occurrence_enrolments_edges_node_child_guardians;
70+
}
71+
72+
export interface updateOccurrence_updateOccurrence_occurrence_enrolments_edges_node {
73+
/**
74+
* The ID of the object.
75+
*/
76+
id: string;
77+
attended: boolean | null;
78+
child: updateOccurrence_updateOccurrence_occurrence_enrolments_edges_node_child;
79+
}
80+
81+
export interface updateOccurrence_updateOccurrence_occurrence_enrolments_edges {
82+
/**
83+
* The item at the end of the edge
84+
*/
85+
node: updateOccurrence_updateOccurrence_occurrence_enrolments_edges_node | null;
86+
}
87+
88+
export interface updateOccurrence_updateOccurrence_occurrence_enrolments {
89+
/**
90+
* Contains the nodes in this connection.
91+
*/
92+
edges: (updateOccurrence_updateOccurrence_occurrence_enrolments_edges | null)[];
93+
}
94+
3795
export interface updateOccurrence_updateOccurrence_occurrence {
3896
/**
3997
* The ID of the object.
@@ -48,6 +106,7 @@ export interface updateOccurrence_updateOccurrence_occurrence {
48106
* When set will be used as the capacity of this occurrence instead of the value coming from the event.
49107
*/
50108
capacityOverride: number | null;
109+
enrolments: updateOccurrence_updateOccurrence_occurrence_enrolments;
51110
}
52111

53112
export interface updateOccurrence_updateOccurrence {

src/common/translation/en.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@
156156
}
157157
},
158158
"guardian": {
159-
"name": "Guardian's name"
159+
"name": "Guardian's name",
160+
"doesNotExist": "<No guardian>"
160161
},
161162
"languages": {
162163
"EN": "English",
@@ -206,6 +207,9 @@
206207
"event": {
207208
"label": "Event"
208209
},
210+
"freeSpotNotificationSubscriptions": {
211+
"label": "In Queue"
212+
},
209213
"time": {
210214
"fields": {
211215
"date": {
@@ -267,7 +271,7 @@
267271
"label": "Name"
268272
},
269273
"wcAndFacilities": {
270-
"label": "WCs and child care facilities"
274+
"label": "Toilets and child care facilities"
271275
}
272276
},
273277
"list": {

src/common/translation/fi.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@
156156
}
157157
},
158158
"guardian": {
159-
"name": "Huoltajan nimi"
159+
"name": "Huoltajan nimi",
160+
"doesNotExist": "<Ei huoltajaa>"
160161
},
161162
"languages": {
162163
"EN": "englanti",
@@ -206,6 +207,9 @@
206207
"event": {
207208
"label": "Tapahtuma"
208209
},
210+
"freeSpotNotificationSubscriptions": {
211+
"label": "Jonossa"
212+
},
209213
"time": {
210214
"fields": {
211215
"date": {

src/domain/events/detail/EventShow.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import {
1919
useNotify,
2020
useRefresh,
2121
Confirm,
22+
FunctionField,
2223
} from 'react-admin';
2324
import { withStyles, WithStyles, createStyles } from '@material-ui/core/styles';
2425
import { Link } from 'react-router-dom';
@@ -214,6 +215,13 @@ const EventShow: FunctionComponent = (props: any) => {
214215
source="enrolmentCount"
215216
label="occurrences.fields.enrolmentsCount.label"
216217
/>
218+
<FunctionField
219+
render={(record: Occurrence) =>
220+
record.freeSpotNotificationSubscriptions.edges.length || '0'
221+
}
222+
label="occurrences.fields.freeSpotNotificationSubscriptions.label"
223+
textAlign="right"
224+
/>
217225
</Datagrid>
218226
</ReferenceManyField>
219227
<AddOccurrenceButton />

0 commit comments

Comments
 (0)