@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
|
@@ -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 DataError('E_STUDENT_CONSENT', translateService.translate('The
|
|
52
|
+
throw new 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 DataError('E_STUDENT_CONSENT', translateService.translate('The
|
|
55
|
+
throw new 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 DataError('E_STUDENT_CONSENT', translateService.translate('The
|
|
99
|
+
throw new 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 DataError('E_STUDENT_CONSENT', translateService.translate('The
|
|
102
|
+
throw new 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
|
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
{
|
|
2
|
+
"The request cannot be submitted unless the student confirms that they have read and understood the Privacy and Personal Data Protection Policy.": "Η αίτηση δεν μπορεί να αποθηκευτεί χωρίς ο φοιτητής να δηλώσει ότι έχει λάβει γνώση της Πολιτικής Προστασίας της Ιδιωτικότητας και των Προσωπικών Δεδομένων."
|
|
3
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Accommodation.js","names":["_common","require","_data","_dec","_dec2","_dec3","_class","_class2","_applyDecoratedDescriptor","target","property","decorators","descriptor","context","desc","Object","keys","forEach","key","enumerable","configurable","initializer","writable","slice","reverse","reduce","decorator","value","call","undefined","defineProperty","AccommodationRequestEvent","EdmMapping","entityType","param","action","DataObject","constructor","remove","data","model","getModel","item","where","equal","getId","getItem","translateService","application","getStrategy","TranslateService","DataError","translate","hasRooms","id","count","silent","prototype","getOwnPropertyDescriptor","module","exports"],"sources":["../../src/models/Accommodation.js"],"sourcesContent":["/* eslint-disable no-unused-vars */\nimport { DataError } from \"@themost/common\";\nimport { DataObject, EdmMapping } from \"@themost/data\";\n\n\n@EdmMapping.entityType('Accommodation')\nclass AccommodationRequestEvent extends DataObject {\n /**\n * @constructor\n */\n constructor() {\n super();\n }\n\n /**\n * POST AccommodationRequestEvents/:id/Remove\n */\n\n //remove accommodation request event\n @EdmMapping.param('data', 'Object', false, true)\n @EdmMapping.action('remove', 'Accommodation')\n async remove(data) {\n /**\n * @type {import('@themost/data').DataModel}\n */\n\n const model = this.getModel();\n\n const item = await model.where('id')\n .equal(this.getId())\n .getItem();\n const translateService = this.context.application.getStrategy(function TranslateService() { });\n\n if (item == null) {\n throw new DataError('E_ACCOMMODATION', translateService.translate('The specified Accommodation cannot be found or is inaccessible.'));\n }\n\n const hasRooms = await this.context.model('AccommodationRooms')\n .where('containedInPlace').equal(item.id).count();\n\n if (hasRooms) {\n throw new DataError('E_ACCOMMODATION_ROOM', translateService.translate('Cannot remove accommodation. Accommodation is related to rooms.'), null, 'Accommodation');\n }\n\n return model.silent().remove(item);\n }\n\n\n \n}\n\nmodule.exports = AccommodationRequestEvent;\n"],"mappings":";AACA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA,kBAAuD,IAAAE,IAAA,EAAAC,KAAA,EAAAC,KAAA,EAAAC,MAAA,EAAAC,OAAA,EAFvD,4CAAAC,0BAAAC,MAAA,EAAAC,QAAA,EAAAC,UAAA,EAAAC,UAAA,EAAAC,OAAA,OAAAC,IAAA,MAAAC,MAAA,CAAAC,IAAA,CAAAJ,UAAA,EAAAK,OAAA,WAAAC,GAAA,GAAAJ,IAAA,CAAAI,GAAA,IAAAN,UAAA,CAAAM,GAAA,KAAAJ,IAAA,CAAAK,UAAA,KAAAL,IAAA,CAAAK,UAAA,CAAAL,IAAA,CAAAM,YAAA,KAAAN,IAAA,CAAAM,YAAA,gBAAAN,IAAA,IAAAA,IAAA,CAAAO,WAAA,GAAAP,IAAA,CAAAQ,QAAA,SAAAR,IAAA,GAAAH,UAAA,CAAAY,KAAA,GAAAC,OAAA,GAAAC,MAAA,WAAAX,IAAA,EAAAY,SAAA,UAAAA,SAAA,CAAAjB,MAAA,EAAAC,QAAA,EAAAI,IAAA,KAAAA,IAAA,IAAAA,IAAA,MAAAD,OAAA,IAAAC,IAAA,CAAAO,WAAA,cAAAP,IAAA,CAAAa,KAAA,GAAAb,IAAA,CAAAO,WAAA,GAAAP,IAAA,CAAAO,WAAA,CAAAO,IAAA,CAAAf,OAAA,WAAAC,IAAA,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