@universis/accommodation 1.0.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config/models/AccommodationInscriptionModeTag.json +2 -2
- package/dist/config/models/{Accommodation.json → AccommodationPlace.json} +55 -8
- package/dist/config/models/AccommodationPlaceLocale.json +86 -0
- package/dist/config/models/AccommodationRequestEffectiveStatusType.json +3 -3
- package/dist/config/models/AccommodationRoom.json +43 -4
- package/dist/config/models/AccommodationRoomLocale.json +86 -0
- package/dist/config/scope.access.js +0 -10
- package/dist/config/scope.access.js.map +1 -1
- package/dist/listeners/OnActionCompleteListener.js +2 -2
- package/dist/listeners/OnActionCompleteListener.js.map +1 -1
- package/dist/listeners/SendEmailAfterCardStatusChangeListener.js +8 -8
- package/dist/listeners/SendEmailAfterCardStatusChangeListener.js.map +1 -1
- package/dist/listeners/ValidateActionListener.js +4 -4
- package/dist/listeners/ValidateActionListener.js.map +1 -1
- package/dist/locales/el.json +3 -0
- package/dist/locales/en.json +3 -0
- package/dist/models/{Accommodation.js → AccommodationPlace.js} +1 -1
- package/dist/models/AccommodationPlace.js.map +1 -0
- package/package.json +1 -1
- package/src/config/models/AccommodationInscriptionModeTag.json +2 -2
- package/src/config/models/{Accommodation.json → AccommodationPlace.json} +55 -8
- package/src/config/models/AccommodationPlaceLocale.json +86 -0
- package/src/config/models/AccommodationRequestEffectiveStatusType.json +3 -3
- package/src/config/models/AccommodationRoom.json +43 -4
- package/src/config/models/AccommodationRoomLocale.json +86 -0
- package/src/config/scope.access.js +0 -10
- package/src/listeners/OnActionCompleteListener.js +2 -2
- package/src/listeners/SendEmailAfterCardStatusChangeListener.js +8 -8
- package/src/listeners/ValidateActionListener.js +4 -4
- package/src/locales/el.json +3 -0
- package/src/locales/en.json +3 -0
- package/dist/models/Accommodation.js.map +0 -1
- /package/dist/templates/{mail-after-dining-request-status-change → mail-after-accommodation-request-status-change}/html.ejs +0 -0
- /package/src/models/{Accommodation.js → AccommodationPlace.js} +0 -0
- /package/src/templates/{mail-after-dining-request-status-change → mail-after-accommodation-request-status-change}/html.ejs +0 -0
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
{
|
|
48
48
|
"mask": 15,
|
|
49
49
|
"type": "global",
|
|
50
|
-
"account": "
|
|
50
|
+
"account": "AccommodationAdministrators"
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
"mask": 15,
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
{
|
|
77
77
|
"mask": 15,
|
|
78
78
|
"type": "global",
|
|
79
|
-
"account": "
|
|
79
|
+
"account": "AccommodationAdministrators"
|
|
80
80
|
}
|
|
81
81
|
],
|
|
82
82
|
"constraints": [
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://themost-framework.github.io/themost/models/2018/2/schema.json",
|
|
3
|
-
"@id": "http://schema.org/
|
|
4
|
-
"name": "
|
|
3
|
+
"@id": "http://schema.org/AccommodationPlace",
|
|
4
|
+
"name": "AccommodationPlace",
|
|
5
5
|
"description": "An accommodation is a place that can accommodate human beings, e.g. a hotel room, a camping pitch, or a meeting room.",
|
|
6
|
-
"title": "
|
|
6
|
+
"title": "AccommodationPlace",
|
|
7
7
|
"abstract": false,
|
|
8
8
|
"sealed": false,
|
|
9
9
|
"implements": "Place",
|
|
10
|
-
"classPath": "./models/
|
|
11
|
-
"version": "1.
|
|
10
|
+
"classPath": "./models/AccommodationPlace",
|
|
11
|
+
"version": "1.0",
|
|
12
12
|
"fields": [
|
|
13
13
|
{
|
|
14
14
|
"@id": "http://schema.org/identifier",
|
|
@@ -56,8 +56,15 @@
|
|
|
56
56
|
"name": "address",
|
|
57
57
|
"title": "address",
|
|
58
58
|
"description": "Physical address of the item.",
|
|
59
|
-
"type": "
|
|
60
|
-
"
|
|
59
|
+
"type": "PostalAddress",
|
|
60
|
+
"mapping": {
|
|
61
|
+
"parentModel": "AccommodationPlace",
|
|
62
|
+
"childModel": "PostalAddress",
|
|
63
|
+
"parentField": "identifier",
|
|
64
|
+
"childField": "identifier",
|
|
65
|
+
"cascade": "delete",
|
|
66
|
+
"associationType": "association"
|
|
67
|
+
}
|
|
61
68
|
},
|
|
62
69
|
{
|
|
63
70
|
"@id": "http://schema.org/geo",
|
|
@@ -66,9 +73,49 @@
|
|
|
66
73
|
"description": "The geo coordinates of the accommodation.",
|
|
67
74
|
"type": "Json",
|
|
68
75
|
"additionalType": "GeoCoordinates"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"name": "locales",
|
|
79
|
+
"type": "AccommodationPlaceLocale",
|
|
80
|
+
"mapping": {
|
|
81
|
+
"associationType": "association",
|
|
82
|
+
"cascade": "delete",
|
|
83
|
+
"parentModel": "AccommodationPlace",
|
|
84
|
+
"parentField": "id",
|
|
85
|
+
"childModel": "AccommodationPlaceLocale",
|
|
86
|
+
"childField": "object"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"name": "locale",
|
|
91
|
+
"type": "AccommodationPlaceLocale",
|
|
92
|
+
"readonly": true,
|
|
93
|
+
"editable": false,
|
|
94
|
+
"many": true,
|
|
95
|
+
"expandable": true,
|
|
96
|
+
"multiplicity": "ZeroOrOne",
|
|
97
|
+
"mapping": {
|
|
98
|
+
"associationType": "association",
|
|
99
|
+
"cascade": "delete",
|
|
100
|
+
"parentModel": "AccommodationPlace",
|
|
101
|
+
"parentField": "id",
|
|
102
|
+
"childModel": "AccommodationPlaceLocale",
|
|
103
|
+
"childField": "object",
|
|
104
|
+
"options": {
|
|
105
|
+
"$filter": "inLanguage eq lang()",
|
|
106
|
+
"$first": true
|
|
107
|
+
}
|
|
108
|
+
}
|
|
69
109
|
}
|
|
70
110
|
],
|
|
71
|
-
"eventListeners": [
|
|
111
|
+
"eventListeners": [
|
|
112
|
+
{
|
|
113
|
+
"type": "@themost/data/previous-state-listener"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"type": "./listeners/data-localization"
|
|
117
|
+
}
|
|
118
|
+
],
|
|
72
119
|
"constraints": [
|
|
73
120
|
{
|
|
74
121
|
"type": "unique",
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://themost-framework.github.io/themost/models/2018/2/schema.json",
|
|
3
|
+
"@id": "https://universis.io/entities/AccommodationLocale",
|
|
4
|
+
"name": "AccommodationPlaceLocale",
|
|
5
|
+
"description": "Contains a collection of extra field required for accommodation.",
|
|
6
|
+
"title": "AccommodationPlaceLocale",
|
|
7
|
+
"abstract": false,
|
|
8
|
+
"contains": "AccommodationPlace",
|
|
9
|
+
"hidden": true,
|
|
10
|
+
"sealed": false,
|
|
11
|
+
"version": "1.0",
|
|
12
|
+
"fields": [
|
|
13
|
+
{
|
|
14
|
+
"@id": "https://themost.io/schemas/id",
|
|
15
|
+
"name": "id",
|
|
16
|
+
"title": "ID",
|
|
17
|
+
"description": "The identifier of the item.",
|
|
18
|
+
"type": "Counter",
|
|
19
|
+
"primary": true,
|
|
20
|
+
"nullable": false
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"@id": "https://themost.io/schemas/object",
|
|
24
|
+
"name": "object",
|
|
25
|
+
"title": "object",
|
|
26
|
+
"description": "The parent item.",
|
|
27
|
+
"type": "Accommodation"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"@id": "http://schema.org/inLanguage",
|
|
31
|
+
"name": "inLanguage",
|
|
32
|
+
"title": "inLanguage",
|
|
33
|
+
"description": "The language of this item.",
|
|
34
|
+
"type": "Text",
|
|
35
|
+
"size": 5
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "name",
|
|
39
|
+
"title": "Ονομασία",
|
|
40
|
+
"description": "Η ονομασία του αντικειμένου",
|
|
41
|
+
"type": "Text",
|
|
42
|
+
"nullable": true,
|
|
43
|
+
"size": 100
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "description",
|
|
47
|
+
"title": "Περιγραφή",
|
|
48
|
+
"description": "Περιγραφή του τύπου εργασίας",
|
|
49
|
+
"type": "Text",
|
|
50
|
+
"nullable": true,
|
|
51
|
+
"size": 80
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "displayCode",
|
|
55
|
+
"title": "Display code",
|
|
56
|
+
"description": "The display code of the place",
|
|
57
|
+
"type": "Text",
|
|
58
|
+
"size": 15
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"constraints": [
|
|
62
|
+
{
|
|
63
|
+
"type": "unique",
|
|
64
|
+
"fields": [
|
|
65
|
+
"object",
|
|
66
|
+
"inLanguage"
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"privileges": [
|
|
71
|
+
{
|
|
72
|
+
"mask": 1,
|
|
73
|
+
"type": "global",
|
|
74
|
+
"account": "*"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"mask": 15,
|
|
78
|
+
"type": "global"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"mask": 15,
|
|
82
|
+
"type": "global",
|
|
83
|
+
"account": "Administrators"
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
}
|
|
@@ -196,15 +196,15 @@
|
|
|
196
196
|
]
|
|
197
197
|
},
|
|
198
198
|
{
|
|
199
|
-
"alternateName": "
|
|
199
|
+
"alternateName": "RejectionUniversityAccommodationEffectiveStatus",
|
|
200
200
|
"activatesAccommodationCard": false,
|
|
201
201
|
"name": "Απόρριψη λόγω Στέγασης σε Εστία",
|
|
202
202
|
"description": "Απόρριψη λόγω Στέγασης σε Εστία",
|
|
203
203
|
"locales": [
|
|
204
204
|
{
|
|
205
205
|
"inLanguage": "en",
|
|
206
|
-
"name": "Rejection due to University
|
|
207
|
-
"description": "Rejection due to University
|
|
206
|
+
"name": "Rejection due to University Accommodation",
|
|
207
|
+
"description": "Rejection due to University Accommodation"
|
|
208
208
|
}
|
|
209
209
|
]
|
|
210
210
|
}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"title": "AccommodationRoom",
|
|
7
7
|
"abstract": false,
|
|
8
8
|
"sealed": false,
|
|
9
|
-
"implements": "
|
|
10
|
-
"version": "
|
|
9
|
+
"implements": "AccommodationPlace",
|
|
10
|
+
"version": "2.0.1",
|
|
11
11
|
"fields": [
|
|
12
12
|
{
|
|
13
13
|
"name": "bed",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"size": 500
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
|
-
"name": "
|
|
18
|
+
"name": "floor",
|
|
19
19
|
"type": "Text",
|
|
20
20
|
"size": 500
|
|
21
21
|
},
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
{
|
|
113
113
|
"name": "containedInPlace",
|
|
114
114
|
"description": "Το κτήριο στο οποίο βρίσκεται το δωμάτιο",
|
|
115
|
-
"type": "
|
|
115
|
+
"type": "AccommodationPlace"
|
|
116
116
|
},
|
|
117
117
|
{
|
|
118
118
|
"name": "accessibleForDisabled",
|
|
@@ -128,9 +128,48 @@
|
|
|
128
128
|
"name": "reasonOutOfService",
|
|
129
129
|
"type": "Text",
|
|
130
130
|
"size": 500
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"name": "locales",
|
|
134
|
+
"type": "AccommodationRoomLocale",
|
|
135
|
+
"mapping": {
|
|
136
|
+
"associationType": "association",
|
|
137
|
+
"cascade": "delete",
|
|
138
|
+
"parentModel": "AccommodationRoom",
|
|
139
|
+
"parentField": "id",
|
|
140
|
+
"childModel": "AccommodationRoomLocale",
|
|
141
|
+
"childField": "object"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"name": "locale",
|
|
146
|
+
"type": "AccommodationRoomLocale",
|
|
147
|
+
"readonly": true,
|
|
148
|
+
"editable": false,
|
|
149
|
+
"many": true,
|
|
150
|
+
"expandable": true,
|
|
151
|
+
"multiplicity": "ZeroOrOne",
|
|
152
|
+
"mapping": {
|
|
153
|
+
"associationType": "association",
|
|
154
|
+
"cascade": "delete",
|
|
155
|
+
"parentModel": "AccommodationRoom",
|
|
156
|
+
"parentField": "id",
|
|
157
|
+
"childModel": "AccommodationRoomLocale",
|
|
158
|
+
"childField": "object",
|
|
159
|
+
"options": {
|
|
160
|
+
"$filter": "inLanguage eq lang()",
|
|
161
|
+
"$first": true
|
|
162
|
+
}
|
|
163
|
+
}
|
|
131
164
|
}
|
|
132
165
|
],
|
|
133
166
|
"eventListeners": [
|
|
167
|
+
{
|
|
168
|
+
"type": "@themost/data/previous-state-listener"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"type": "./listeners/data-localization"
|
|
172
|
+
}
|
|
134
173
|
],
|
|
135
174
|
"privileges": [
|
|
136
175
|
{
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://themost-framework.github.io/themost/models/2018/2/schema.json",
|
|
3
|
+
"@id": "https://universis.io/entities/AccommodationRoomLocale",
|
|
4
|
+
"name": "AccommodationRoomLocale",
|
|
5
|
+
"description": "Contains a collection of extra field required for accommodation room.",
|
|
6
|
+
"title": "AccommodationRoomLocale",
|
|
7
|
+
"abstract": false,
|
|
8
|
+
"contains": "AccommodationRoom",
|
|
9
|
+
"hidden": true,
|
|
10
|
+
"sealed": false,
|
|
11
|
+
"version": "1.0",
|
|
12
|
+
"fields": [
|
|
13
|
+
{
|
|
14
|
+
"@id": "https://themost.io/schemas/id",
|
|
15
|
+
"name": "id",
|
|
16
|
+
"title": "ID",
|
|
17
|
+
"description": "The identifier of the item.",
|
|
18
|
+
"type": "Counter",
|
|
19
|
+
"primary": true,
|
|
20
|
+
"nullable": false
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"@id": "https://themost.io/schemas/object",
|
|
24
|
+
"name": "object",
|
|
25
|
+
"title": "object",
|
|
26
|
+
"description": "The parent item.",
|
|
27
|
+
"type": "AccommodationRoom"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"@id": "http://schema.org/inLanguage",
|
|
31
|
+
"name": "inLanguage",
|
|
32
|
+
"title": "inLanguage",
|
|
33
|
+
"description": "The language of this item.",
|
|
34
|
+
"type": "Text",
|
|
35
|
+
"size": 5
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "name",
|
|
39
|
+
"title": "Ονομασία",
|
|
40
|
+
"description": "Η ονομασία του αντικειμένου",
|
|
41
|
+
"type": "Text",
|
|
42
|
+
"nullable": true,
|
|
43
|
+
"size": 100
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "description",
|
|
47
|
+
"title": "Περιγραφή",
|
|
48
|
+
"description": "Περιγραφή του τύπου εργασίας",
|
|
49
|
+
"type": "Text",
|
|
50
|
+
"nullable": true,
|
|
51
|
+
"size": 80
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"name": "displayCode",
|
|
55
|
+
"title": "Display code",
|
|
56
|
+
"description": "The display code of the place",
|
|
57
|
+
"type": "Text",
|
|
58
|
+
"size": 15
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"constraints": [
|
|
62
|
+
{
|
|
63
|
+
"type": "unique",
|
|
64
|
+
"fields": [
|
|
65
|
+
"object",
|
|
66
|
+
"inLanguage"
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"privileges": [
|
|
71
|
+
{
|
|
72
|
+
"mask": 1,
|
|
73
|
+
"type": "global",
|
|
74
|
+
"account": "*"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"mask": 15,
|
|
78
|
+
"type": "global"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"mask": 15,
|
|
82
|
+
"type": "global",
|
|
83
|
+
"account": "Administrators"
|
|
84
|
+
}
|
|
85
|
+
]
|
|
86
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope.access.js","names":["exports","default","_default"],"sources":["../../src/config/scope.access.js"],"sourcesContent":["export default [\n {\n \"scope\": [\n \"registrar\"\n ],\n \"resource\": \"/api/TestActions/?$\",\n \"access\": [\n \"read\",\n \"write\"\n ]\n },\n {\n \"scope\": [\n \"registrar\"\n ],\n \"resource\": \"/api/
|
|
1
|
+
{"version":3,"file":"scope.access.js","names":["exports","default","_default"],"sources":["../../src/config/scope.access.js"],"sourcesContent":["export default [\n {\n \"scope\": [\n \"registrar\"\n ],\n \"resource\": \"/api/TestActions/?$\",\n \"access\": [\n \"read\",\n \"write\"\n ]\n },\n {\n \"scope\": [\n \"registrar\"\n ],\n \"resource\": \"/api/AccommodationPlaces/?$\",\n \"access\": [\n \"read\",\n \"write\"\n ]\n },\n {\n \"scope\": [\n \"students\"\n ],\n \"resource\": \"/api/TestActions/?$\",\n \"access\": [\n \"read\",\n \"write\"\n ]\n },\n {\n \"scope\": [\n \"students\"\n ],\n \"resource\": \"/api/Accommodations/?$\",\n \"access\": [\n \"read\"\n ]\n },\n {\n \"scope\": [\n \"students\"\n ],\n \"resource\": \"/api/AccommodationRequestActions\",\n \"access\": [\n \"read\",\n \"write\"\n ]\n },\n {\n \"scope\": [\n \"students\"\n ],\n \"resource\": \"/api/AccommodationRequestEvents\",\n \"access\": [\n \"read\"\n ]\n },\n {\n \"scope\": [\n \"students\"\n ],\n \"resource\": \"/api/AccommodationRequestCategories\",\n \"access\": [\n \"read\"\n ]\n },\n {\n \"scope\": [\n \"students\"\n ],\n \"resource\": \"/api/StudentAccommodationCards\",\n \"access\": [\n \"read\"\n ]\n },\n {\n \"scope\": [\n \"registrar\"\n ],\n \"resource\": \"/api/AccommodationRequestActions\",\n \"access\": [\n \"read\",\n \"write\"\n ]\n },\n {\n \"scope\": [\n \"registrar\"\n ],\n \"resource\": \"/api/AccommodationRequestEvents\",\n \"access\": [\n \"read\",\n \"write\"\n ]\n },\n {\n \"scope\": [\n \"registrar\"\n ],\n \"resource\": \"/api/AccommodationRequestEffectiveStatusTypes\",\n \"access\": [\n \"read\",\n \"write\"\n ]\n },\n {\n \"scope\": [\n \"registrar\"\n ],\n \"resource\": \"/api/AccommodationCardEffectiveStatusTypes\",\n \"access\": [\n \"read\",\n \"write\"\n ]\n },\n {\n \"scope\": [\n \"registrar\"\n ],\n \"resource\": \"/api/AccommodationRequestCategories\",\n \"access\": [\n \"read\",\n \"write\"\n ]\n },\n {\n \"scope\": [\n \"registrar\"\n ],\n \"resource\": \"/api/StudentAccommodationCards/?$\",\n \"access\": [\n \"read\",\n \"write\"\n ]\n }\n]\n"],"mappings":"mHAAe;AACX;EACI,OAAO,EAAE;EACL,WAAW,CACd;;EACD,UAAU,EAAE,qBAAqB;EACjC,QAAQ,EAAE;EACN,MAAM;EACN,OAAO;;AAEf,CAAC;AACD;EACI,OAAO,EAAE;EACL,WAAW,CACd;;EACD,UAAU,EAAE,6BAA6B;EACzC,QAAQ,EAAE;EACN,MAAM;EACN,OAAO;;AAEf,CAAC;AACD;EACI,OAAO,EAAE;EACL,UAAU,CACb;;EACD,UAAU,EAAE,qBAAqB;EACjC,QAAQ,EAAE;EACN,MAAM;EACN,OAAO;;AAEf,CAAC;AACD;EACI,OAAO,EAAE;EACL,UAAU,CACb;;EACD,UAAU,EAAE,wBAAwB;EACpC,QAAQ,EAAE;EACN,MAAM;;AAEd,CAAC;AACD;EACI,OAAO,EAAE;EACL,UAAU,CACb;;EACD,UAAU,EAAE,kCAAkC;EAC9C,QAAQ,EAAE;EACN,MAAM;EACN,OAAO;;AAEf,CAAC;AACD;EACI,OAAO,EAAE;EACL,UAAU,CACb;;EACD,UAAU,EAAE,iCAAiC;EAC7C,QAAQ,EAAE;EACN,MAAM;;AAEd,CAAC;AACD;EACI,OAAO,EAAE;EACL,UAAU,CACb;;EACD,UAAU,EAAE,qCAAqC;EACjD,QAAQ,EAAE;EACN,MAAM;;AAEd,CAAC;AACD;EACI,OAAO,EAAE;EACL,UAAU,CACb;;EACD,UAAU,EAAE,gCAAgC;EAC5C,QAAQ,EAAE;EACN,MAAM;;AAEd,CAAC;AACD;EACI,OAAO,EAAE;EACL,WAAW,CACd;;EACD,UAAU,EAAE,kCAAkC;EAC9C,QAAQ,EAAE;EACN,MAAM;EACN,OAAO;;AAEf,CAAC;AACD;EACI,OAAO,EAAE;EACL,WAAW,CACd;;EACD,UAAU,EAAE,iCAAiC;EAC7C,QAAQ,EAAE;EACN,MAAM;EACN,OAAO;;AAEf,CAAC;AACD;EACI,OAAO,EAAE;EACL,WAAW,CACd;;EACD,UAAU,EAAE,+CAA+C;EAC3D,QAAQ,EAAE;EACN,MAAM;EACN,OAAO;;AAEf,CAAC;AACD;EACI,OAAO,EAAE;EACL,WAAW,CACd;;EACD,UAAU,EAAE,4CAA4C;EACxD,QAAQ,EAAE;EACN,MAAM;EACN,OAAO;;AAEf,CAAC;AACD;EACI,OAAO,EAAE;EACL,WAAW,CACd;;EACD,UAAU,EAAE,qCAAqC;EACjD,QAAQ,EAAE;EACN,MAAM;EACN,OAAO;;AAEf,CAAC;AACD;EACI,OAAO,EAAE;EACL,WAAW,CACd;;EACD,UAAU,EAAE,mCAAmC;EAC/C,QAAQ,EAAE;EACN,MAAM;EACN,OAAO;;AAEf,CAAC,CACJ,CAAAA,OAAA,CAAAC,OAAA,GAAAC,QAAA"}
|
|
@@ -47,9 +47,9 @@ async function afterSaveAsync(event) {
|
|
|
47
47
|
academicPeriod = student && student.department && student.department.currentPeriod ? student.department.currentPeriod : null;
|
|
48
48
|
}
|
|
49
49
|
let cardActionStatus = {};
|
|
50
|
-
if (event.target.accommodation
|
|
50
|
+
if (!event.target.accommodation) {
|
|
51
51
|
// get accommodation valid through date
|
|
52
|
-
cardActionStatus = { alternateName: '
|
|
52
|
+
cardActionStatus = { alternateName: 'ActiveActionStatus' };
|
|
53
53
|
|
|
54
54
|
} else {
|
|
55
55
|
cardActionStatus = { alternateName: 'CompletedActionStatus' };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OnActionCompleteListener.js","names":["beforeSaveAsync","event","context","model","afterSaveAsync","request","where","equal","target","id","expand","name","options","$expand","getItem","actionStatus","alternateName","now","Date","academicYear","accommodationRequestEvent","academicPeriod","validThrough","student","Error","department","currentYear","currentPeriod","cardActionStatus","accommodation","
|
|
1
|
+
{"version":3,"file":"OnActionCompleteListener.js","names":["beforeSaveAsync","event","context","model","afterSaveAsync","request","where","equal","target","id","expand","name","options","$expand","getItem","actionStatus","alternateName","now","Date","academicYear","accommodationRequestEvent","academicPeriod","validThrough","student","Error","department","currentYear","currentPeriod","cardActionStatus","accommodation","StudentAccommodationCard","action","validFrom","cardStatus","accommodationRoom","room","silent","save","beforeSave","callback","then","catch","err","afterSave"],"sources":["../../src/listeners/OnActionCompleteListener.js"],"sourcesContent":["// eslint-disable-next-line no-unused-vars\nasync function beforeSaveAsync(event) {\n const context = event.model.context;\n}\n\nasync function afterSaveAsync(event) {\n // get context\n // eslint-disable-next-line no-unused-vars\n const context = event.model.context;\n // get current status\n const request = await event.model.where('id').equal(event.target.id)\n .expand({\n name: 'accommodationRequestEvent',\n options: {\n $expand: 'academicYear,academicPeriod',\n }\n }).getItem();\n const actionStatus = request && request.actionStatus && request.actionStatus.alternateName ? request.actionStatus.alternateName : null;\n if ((actionStatus || actionStatus.alternateName) === 'CompletedActionStatus') {\n // set student accommodation card\n const now = new Date();\n\n // const now = new Date(); \n let academicYear = request && request.accommodationRequestEvent && request.accommodationRequestEvent.academicYear ? request.accommodationRequestEvent.academicYear : null;\n let academicPeriod = request && request.accommodationRequestEvent && request.accommodationRequestEvent.academicPeriod ? request.accommodationRequestEvent.academicPeriod : null;\n let validThrough = request && request.accommodationRequestEvent && request.accommodationRequestEvent.validThrough ? request.accommodationRequestEvent.validThrough : null;\n // get original student\n const student = await context.model('Student').where('id').equal(request.student.id || request.student)\n .expand({\n name: 'department',\n options: {\n $expand: 'currentYear,currentPeriod',\n }\n }).getItem();\n if (student == null) {\n throw new Error(`Student with id ${request.student.id || request.student} not found.`);\n }\n\n if (academicYear == null) {\n // get student current academic year\n\n academicYear = student && student.department && student.department.currentYear ? student.department.currentYear : null;\n // await event.model.where('id').equal(event.target.id).select('student/department/currentYear').value();\n }\n if (academicPeriod == null) {\n // get student current academic period\n academicPeriod = student && student.department && student.department.currentPeriod ? student.department.currentPeriod : null;\n }\n let cardActionStatus = {};\n if (!event.target.accommodation ){\n // get accommodation valid through date\n cardActionStatus = { alternateName: 'ActiveActionStatus' }\n\n } else {\n cardActionStatus = { alternateName: 'CompletedActionStatus' }\n }\n\n const StudentAccommodationCard = {\n action: event.target.id,\n student: student,\n academicYear: academicYear,\n academicPeriod: academicPeriod,\n validFrom: now,\n validThrough: validThrough,\n cardStatus: cardActionStatus,\n accommodationRoom: event.target.room || null\n };\n // save student accommodation card \n await context.model('StudentAccommodationCard').silent().save(StudentAccommodationCard);\n }\n}\n\n/**\n * @param {DataEventArgs} event\n * @param {Function} callback\n */\nexport function beforeSave(event, callback) {\n return beforeSaveAsync(event).then(() => {\n return callback();\n }).catch((err) => {\n return callback(err);\n });\n}\n\n/**\n * @param {DataEventArgs} event\n * @param {Function} callback\n */\nexport function afterSave(event, callback) {\n return afterSaveAsync(event).then(() => {\n return callback();\n }).catch((err) => {\n return callback(err);\n });\n}"],"mappings":"0IAAA;AACA,eAAeA,eAAeA,CAACC,KAAK,EAAE;EAClC,MAAMC,OAAO,GAAGD,KAAK,CAACE,KAAK,CAACD,OAAO;AACvC;;AAEA,eAAeE,cAAcA,CAACH,KAAK,EAAE;EACjC;EACA;EACA,MAAMC,OAAO,GAAGD,KAAK,CAACE,KAAK,CAACD,OAAO;EACnC;EACA,MAAMG,OAAO,GAAG,MAAMJ,KAAK,CAACE,KAAK,CAACG,KAAK,CAAC,IAAI,CAAC,CAACC,KAAK,CAACN,KAAK,CAACO,MAAM,CAACC,EAAE,CAAC;EAC/DC,MAAM,CAAC;IACJC,IAAI,EAAE,2BAA2B;IACjCC,OAAO,EAAE;MACLC,OAAO,EAAE;IACb;EACJ,CAAC,CAA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AAE;EACrB,CAAC,CAAC,CAACE,KAAK,CAAC,CAACC,GAAG,KAAK;IACd,OAAOH,QAAQ,CAACG,GAAG,CAAC;EACxB,CAAC,CAAC;AACN;;AAEA;AACA;AACA;AACA;AACO,SAASC,SAASA,CAAC1C,KAAK,EAAEsC,QAAQ,EAAE;EACvC,OAAOnC,cAAc,CAACH,KAAK,CAAC,CAACuC,IAAI,CAAC,MAAM;IACpC,OAAOD,QAAQ,EAAE;EACrB,CAAC,CAAC,CAACE,KAAK,CAAC,CAACC,GAAG,KAAK;IACd,OAAOH,QAAQ,CAACG,GAAG,CAAC;EACxB,CAAC,CAAC;AACN"}
|
|
@@ -13,16 +13,16 @@ async function afterSaveAsync(event) {
|
|
|
13
13
|
const mailer = (0, _mailer.getMailer)(context);
|
|
14
14
|
|
|
15
15
|
const currentCardStatus = await context.
|
|
16
|
-
model('
|
|
16
|
+
model('StudentAccommodationCard').
|
|
17
17
|
where('id').
|
|
18
18
|
equal(event.target.id).
|
|
19
|
-
select('
|
|
19
|
+
select('cardStatus').
|
|
20
20
|
value();
|
|
21
21
|
let previousCardStatus = 'UnknownStatus';
|
|
22
22
|
if (event.previous) {
|
|
23
|
-
previousCardStatus = event.previous.
|
|
23
|
+
previousCardStatus = event.previous.cardStatus;
|
|
24
24
|
} else {
|
|
25
|
-
throw new _data.DataError('E_STATE', 'The previous state of an object cannot be determined', null, '
|
|
25
|
+
throw new _data.DataError('E_STATE', 'The previous state of an object cannot be determined', null, 'StudentAccommodationCard');
|
|
26
26
|
}
|
|
27
27
|
if (currentCardStatus === previousCardStatus) {
|
|
28
28
|
return;
|
|
@@ -32,7 +32,7 @@ async function afterSaveAsync(event) {
|
|
|
32
32
|
const mailTemplate = await context.
|
|
33
33
|
model('MailConfigurations').
|
|
34
34
|
where('target').
|
|
35
|
-
equal('
|
|
35
|
+
equal('AccommodationCardActiveStatusChange').
|
|
36
36
|
silent().
|
|
37
37
|
getItem();
|
|
38
38
|
if (mailTemplate == null) {
|
|
@@ -44,7 +44,7 @@ async function afterSaveAsync(event) {
|
|
|
44
44
|
let item;
|
|
45
45
|
if (typeof event.target.action === 'object' && typeof event.target.action.id === 'number' && Number.isInteger(event.target.action.id) && event.target.action.id > 0) {
|
|
46
46
|
item = await context.
|
|
47
|
-
model('
|
|
47
|
+
model('AccommodationRequestAction').
|
|
48
48
|
where('id').
|
|
49
49
|
equal(event.target.action.id).
|
|
50
50
|
expand({
|
|
@@ -58,7 +58,7 @@ async function afterSaveAsync(event) {
|
|
|
58
58
|
|
|
59
59
|
} else if (typeof event.target.action === 'number' && Number.isInteger(event.target.action) && event.target.action > 0) {
|
|
60
60
|
item = await context.
|
|
61
|
-
model('
|
|
61
|
+
model('AccommodationRequestAction').
|
|
62
62
|
where('id').
|
|
63
63
|
equal(event.target.action).
|
|
64
64
|
expand({
|
|
@@ -83,7 +83,7 @@ async function afterSaveAsync(event) {
|
|
|
83
83
|
const config = await context.
|
|
84
84
|
model('StudentRequestConfiguration').
|
|
85
85
|
where('additionalType').
|
|
86
|
-
equal('
|
|
86
|
+
equal('AccommodationRequestAction').
|
|
87
87
|
and('inLanguage').
|
|
88
88
|
equal(event.target.inLanguage || context.locale).
|
|
89
89
|
silent().
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SendEmailAfterCardStatusChangeListener.js","names":["_mailer","require","_data","_common","afterSaveAsync","event","state","context","model","mailer","getMailer","currentCardStatus","where","equal","target","id","select","value","previousCardStatus","previous","
|
|
1
|
+
{"version":3,"file":"SendEmailAfterCardStatusChangeListener.js","names":["_mailer","require","_data","_common","afterSaveAsync","event","state","context","model","mailer","getMailer","currentCardStatus","where","equal","target","id","select","value","previousCardStatus","previous","cardStatus","DataError","mailTemplate","silent","getItem","item","action","Number","isInteger","expand","name","options","$expand","application","and","config","inLanguage","locale","email","student","person","TraceUtils","warn","familyName","givenName","Promise","resolve","template","subject","bcc","to","send","configuration","err","error","err1","afterSave","callback","then","catch"],"sources":["../../src/listeners/SendEmailAfterCardStatusChangeListener.js"],"sourcesContent":["import { getMailer } from '@themost/mailer';\nimport { DataError } from '@themost/data';\nimport { TraceUtils } from \"@themost/common\";\n/**\n * @param {DataEventArgs} event\n */\nasync function afterSaveAsync(event) {\n if (event.state === 2) {\n const context = event.model.context;\n /**\n * @type {import('@themost/mailer').MailerHelper}\n */\n const mailer = getMailer(context);\n\n const currentCardStatus = await context\n .model('StudentAccommodationCard')\n .where('id')\n .equal(event.target.id)\n .select('cardStatus')\n .value();\n let previousCardStatus = 'UnknownStatus';\n if (event.previous) {\n previousCardStatus = event.previous.cardStatus;\n } else {\n throw new DataError('E_STATE', 'The previous state of an object cannot be determined', null, 'StudentAccommodationCard');\n }\n if (currentCardStatus === previousCardStatus) {\n return;\n }\n\n // get mail template\n const mailTemplate = await context\n .model('MailConfigurations')\n .where('target')\n .equal('AccommodationCardActiveStatusChange')\n .silent()\n .getItem();\n if (mailTemplate == null) {\n //\n return;\n }\n\n //get parent action data\n let item;\n if (typeof event.target.action === 'object' && typeof event.target.action.id === 'number' && Number.isInteger(event.target.action.id) && event.target.action.id > 0) {\n item = await context\n .model('AccommodationRequestAction')\n .where('id')\n .equal(event.target.action.id)\n .expand({\n name: 'student',\n options: {\n $expand: 'person'\n }\n })\n .silent()\n .getItem();\n\n } else if (typeof event.target.action === 'number' && Number.isInteger(event.target.action) && event.target.action > 0) {\n item = await context\n .model('AccommodationRequestAction')\n .where('id')\n .equal(event.target.action)\n .expand({\n name: 'student',\n options: {\n $expand: 'person'\n }\n })\n .silent()\n .getItem();\n }\n\n const application = await context\n .model('WebApplication')\n .where('alternateName')\n .equal('students')\n .and('applicationSuite')\n .equal('universis')\n .silent()\n .getItem();\n\n const config = await context\n .model('StudentRequestConfiguration')\n .where('additionalType')\n .equal('AccommodationRequestAction')\n .and('inLanguage')\n .equal(event.target.inLanguage || context.locale)\n .silent()\n .getItem();\n\n if (item && application && config) {\n\n const email = item.student.person.email;\n\n if (email == null || typeof email !== 'string') {\n TraceUtils.warn(`Cannot send email for ${item.student.person.familyName} ${item.student.person.givenName}. Student [${item.student.id}] email does not exist.`);\n return;\n }\n await new Promise((resolve) => {\n mailer.template(mailTemplate.template)\n .subject(mailTemplate.subject)\n .bcc(mailTemplate.bcc || '')\n .to(email)\n .send({\n model: item,\n application: application,\n configuration: config\n }, (err) => {\n if (err) {\n try {\n TraceUtils.error('An error occurred while trying to send an email notification after status change.');\n TraceUtils.error(`Student=${item.student.id}, template=${mailTemplate.template}`);\n TraceUtils.error(err);\n } catch (err1) {\n // do nothing\n }\n return resolve();\n }\n\n return resolve();\n })\n });\n\n }\n }\n}\n/**\n * @param {DataEventArgs} event\n * @param {Function} callback\n */\nexport function afterSave(event, callback) {\n return afterSaveAsync(event).then(() => {\n return callback();\n }).catch((err) => {\n return callback(err);\n });\n}"],"mappings":"yGAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA;AACA;AACA;AACA,eAAeG,cAAcA,CAACC,KAAK,EAAE;EACjC,IAAIA,KAAK,CAACC,KAAK,KAAK,CAAC,EAAE;IACnB,MAAMC,OAAO,GAAGF,KAAK,CAACG,KAAK,CAACD,OAAO;IACnC;AACR;AACA;IACQ,MAAME,MAAM,GAAG,IAAAC,iBAAS,EAACH,OAAO,CAAC;;IAEjC,MAAMI,iBAAiB,GAAG,MAAMJ,OAAO;IAClCC,KAAK,CAAC,0BAA0B,CAAC;IACjCI,KAAK,CAAC,IAAI,CAAC;IACXC,KAAK,CAACR,KAAK,CAACS,MAAM,CAACC,EAAE,CAAC;IACtBC,MAAM,CAAC,YAAY,CAAC;IACpBC,KAAK,EAAE;IACZ,IAAIC,kBAAkB,GAAG,eAAe;IACxC,IAAIb,KAAK,CAACc,QAAQ,EAAE;MAChBD,kBAAkB,GAAGb,KAAK,CAACc,QAAQ,CAACC,UAAU;IAClD,CAAC,MAAM;MACH,MAAM,IAAIC,eAAS,CAAC,SAAS,EAAE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,QAAQ,CAACzB,YAAY,CAACyB,QAAQ,CAAC;QACjCC,OAAO,CAAC1B,YAAY,CAAC0B,OAAO,CAAC;QAC7BC,GAAG,CAAC3B,YAAY,CAAC2B,GAAG,IAAI,EAAE,CAAC;QAC3BC,EAAE,CAACZ,KAAK,CAAC;QACTa,IAAI,CAAC;UACF3C,KAAK,EAAEiB,IAAI;UACXQ,WAAW,EAAEA,WAAW;UACxBmB,aAAa,EAAEjB;QACnB,CAAC,EAAE,CAACkB,GAAG,KAAK;UACR,IAAIA,GAAG,EAAE;YACL,IAAI;cACAZ,kBAAU,CAACa,KAAK,CAAC,mFAAmF,CAAC;cACrGb,kBAAU,CAACa,KAAK,CAAE,WAAU7B,IAAI,CAACc,OAAO,CAACxB,EAAG,cAAaO,YAAY,CAACyB,QAAS,EAAC,CAAC;cACjFN,kBAAU,CAACa,KAAK,CAACD,GAAG,CAAC;YACzB,CAAC,CAAC,OAAOE,IAAI,EAAE;;cACX;YAAA,CAEJ,OAAOT,OAAO,EAAE;UACpB;;UAEA,OAAOA,OAAO,EAAE;QACpB,CAAC,CAAC;MACV,CAAC,CAAC;;IAEN;EACJ;AACJ;AACA;AACA;AACA;AACA;AACO,SAASU,SAASA,CAACnD,KAAK,EAAEoD,QAAQ,EAAE;EACvC,OAAOrD,cAAc,CAACC,KAAK,CAAC,CAACqD,IAAI,CAAC,MAAM;IACpC,OAAOD,QAAQ,EAAE;EACrB,CAAC,CAAC,CAACE,KAAK,CAAC,CAACN,GAAG,KAAK;IACd,OAAOI,QAAQ,CAACJ,GAAG,CAAC;EACxB,CAAC,CAAC;AACN"}
|
|
@@ -49,10 +49,10 @@ async function beforeSaveAsync(event) {
|
|
|
49
49
|
//check studentConsent
|
|
50
50
|
if (event.target && eventHasConsent === true && Object.prototype.hasOwnProperty.call(target, 'studentConsent') === false) {
|
|
51
51
|
const translateService = context.application.getStrategy(function TranslateService() {});
|
|
52
|
-
throw new _common.DataError('E_STUDENT_CONSENT', translateService.translate('The
|
|
52
|
+
throw new _common.DataError('E_STUDENT_CONSENT', translateService.translate('The request cannot be submitted unless the student confirms that they have read and understood the Privacy and Personal Data Protection Policy.'), null, 'AccommodationRequestAction', 'studentConsent');
|
|
53
53
|
} else if (event.target && eventHasConsent === true && Object.prototype.hasOwnProperty.call(target, 'studentConsent') === true && target.studentConsent === false) {
|
|
54
54
|
const translateService = context.application.getStrategy(function TranslateService() {});
|
|
55
|
-
throw new _common.DataError('E_STUDENT_CONSENT', translateService.translate('The
|
|
55
|
+
throw new _common.DataError('E_STUDENT_CONSENT', translateService.translate('The request cannot be submitted unless the student confirms that they have read and understood the Privacy and Personal Data Protection Policy.'), null, 'AccommodationRequestAction', 'studentConsent');
|
|
56
56
|
}
|
|
57
57
|
//check category
|
|
58
58
|
if (target && Object.prototype.hasOwnProperty.call(target, 'category') && target.category == null) {
|
|
@@ -96,10 +96,10 @@ async function beforeSaveAsync(event) {
|
|
|
96
96
|
if (isMe === true && eventHasConsent === true) {
|
|
97
97
|
if (Object.prototype.hasOwnProperty.call(target, 'studentConsent') === false) {
|
|
98
98
|
const translateService = context.application.getStrategy(function TranslateService() {});
|
|
99
|
-
throw new _common.DataError('E_STUDENT_CONSENT', translateService.translate('The
|
|
99
|
+
throw new _common.DataError('E_STUDENT_CONSENT', translateService.translate('The request cannot be submitted unless the student confirms that they have read and understood the Privacy and Personal Data Protection Policy.'), null, 'AccommodationRequestAction', 'studentConsent');
|
|
100
100
|
} else if (eventHasConsent === true && target.studentConsent === false) {
|
|
101
101
|
const translateService = context.application.getStrategy(function TranslateService() {});
|
|
102
|
-
throw new _common.DataError('E_STUDENT_CONSENT', translateService.translate('The
|
|
102
|
+
throw new _common.DataError('E_STUDENT_CONSENT', translateService.translate('The request cannot be submitted unless the student confirms that they have read and understood the Privacy and Personal Data Protection Policy.'), null, 'AccommodationRequestAction', 'studentConsent');
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
|