Merge branch 'features/feature-add-defunt-when-booking-appoitment' into staging

This commit is contained in:
Tiavina 2024-12-20 17:25:05 +03:00
commit 6efc14a764
67 changed files with 1755 additions and 80719 deletions

View File

@ -164570,7 +164570,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"compressed":true,"categories":[{"id"
/******/ // This function allow to reference async chunks
/******/ __webpack_require__.u = (chunkId) => {
/******/ // return url for filenames based on template
/******/ return "calendar-" + chunkId + ".js?v=" + {"vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981":"92154c70cff3075cb01f","vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8":"341ce16e320e3f55da7a","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"02eaeeab22bebc98f880","node_modules_nextcloud_dialogs_dist_legacy_mjs":"8be838e4c6e9aae56c87","vendors-node_modules_webdav_dist_web_index_js":"454da8f908d41b47c607","vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-8ibBgPg__mjs":"ea54a36450de178d1141"}[chunkId] + "";
/******/ return "calendar-" + chunkId + ".js?v=" + {"vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981":"3533c597c61a45709c85","vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8":"aa18371467d4d17269b3","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"6c303f18660c1428dc28","node_modules_nextcloud_dialogs_dist_legacy_mjs":"8be838e4c6e9aae56c87","vendors-node_modules_webdav_dist_web_index_js":"454da8f908d41b47c607","vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-8ibBgPg__mjs":"ea54a36450de178d1141"}[chunkId] + "";
/******/ };
/******/ })();
/******/
@ -164827,4 +164827,4 @@ const visitorInfo = (0,_nextcloud_initial_state__WEBPACK_IMPORTED_MODULE_1__.loa
/******/ })()
;
//# sourceMappingURL=calendar-appointments-booking.js.map?v=a1659bd4f15f5052556d
//# sourceMappingURL=calendar-appointments-booking.js.map?v=3b392047fd2d6b19f965

File diff suppressed because one or more lines are too long

View File

@ -37516,4 +37516,4 @@ const booking = (0,_nextcloud_initial_state__WEBPACK_IMPORTED_MODULE_1__.loadSta
/******/ })()
;
//# sourceMappingURL=calendar-appointments-confirmation.js.map?v=0547a35296ba1e6323ca
//# sourceMappingURL=calendar-appointments-confirmation.js.map?v=a568b091a90b74e53b2f

File diff suppressed because one or more lines are too long

View File

@ -37552,4 +37552,4 @@ const booking = (0,_nextcloud_initial_state__WEBPACK_IMPORTED_MODULE_1__.loadSta
/******/ })()
;
//# sourceMappingURL=calendar-appointments-conflict.js.map?v=b43150d900e71b07f959
//# sourceMappingURL=calendar-appointments-conflict.js.map?v=a4d9e55753dbd82cbb68

File diff suppressed because one or more lines are too long

View File

@ -160605,4 +160605,4 @@ vue__WEBPACK_IMPORTED_MODULE_5__["default"].prototype.$n = _nextcloud_l10n__WEBP
/******/ })()
;
//# sourceMappingURL=calendar-appointments-overview.js.map?v=7171571adabef852a24b
//# sourceMappingURL=calendar-appointments-overview.js.map?v=76965549ab6ab40d3988

File diff suppressed because one or more lines are too long

View File

@ -500,4 +500,4 @@ if(false) {}
/***/ })
}]);
//# sourceMappingURL=calendar-dashboard-lazy.js.map?v=5942bf96b1b7ba1885df
//# sourceMappingURL=calendar-dashboard-lazy.js.map?v=c10558ce90cd32800f78

File diff suppressed because one or more lines are too long

View File

@ -1322,7 +1322,7 @@ function b(n) {
/******/ // This function allow to reference async chunks
/******/ __webpack_require__.u = (chunkId) => {
/******/ // return url for filenames based on template
/******/ return "calendar-" + chunkId + ".js?v=" + {"vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981":"92154c70cff3075cb01f","vendors-node_modules_vue_dist_vue_runtime_esm_js":"7e3171593bdc0f62040b","vendors-node_modules_nextcloud_cdav-library_dist_dist_js-node_modules_nextcloud_logger_dist_i-36c16b":"c3b3db23da041c717fc1","vendors-node_modules_webdav_dist_web_index_js":"454da8f908d41b47c607","vendors-node_modules_vue-material-design-icons_CalendarBlankOutline_vue-node_modules_nextclou-4adead":"dca58e847aba1c77dbd7","vendors-node_modules_nextcloud_vue-dashboard_dist_vue-dashboard_js-node_modules_css-loader_di-9e6f3d":"cd8d1d9a89e2f5e5bceb","src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790":"24d60298b4163e544d21","src_store_index_js":"5afa6c72b504a3fc895b","src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258":"d8540d9b2a367cfc9993","dashboard-lazy":"5942bf96b1b7ba1885df","vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8":"341ce16e320e3f55da7a","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"02eaeeab22bebc98f880","node_modules_nextcloud_dialogs_dist_legacy_mjs":"8be838e4c6e9aae56c87","vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-8ibBgPg__mjs":"ea54a36450de178d1141","vendors-node_modules_moment_locale_af_js-node_modules_moment_locale_ar-dz_js-node_modules_mom-582c96":"ce1bed825f57dd1d117a","node_modules_moment_locale_sync_recursive_":"4bc2c39c5e0ff182c2e3"}[chunkId] + "";
/******/ return "calendar-" + chunkId + ".js?v=" + {"vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981":"3533c597c61a45709c85","vendors-node_modules_vue_dist_vue_runtime_esm_js":"7e3171593bdc0f62040b","vendors-node_modules_nextcloud_cdav-library_dist_dist_js-node_modules_nextcloud_logger_dist_i-36c16b":"c3b3db23da041c717fc1","vendors-node_modules_webdav_dist_web_index_js":"454da8f908d41b47c607","vendors-node_modules_vue-material-design-icons_CalendarBlankOutline_vue-node_modules_nextclou-4adead":"e4ffc04ac1c7ab0c5950","vendors-node_modules_nextcloud_vue-dashboard_dist_vue-dashboard_js-node_modules_css-loader_di-9e6f3d":"6717f0bb504201e731c9","src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790":"76fe084ed502c638c2e4","src_store_index_js":"35fe7fb5d199fb22a689","src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258":"740a2859d1f364b508c1","dashboard-lazy":"c10558ce90cd32800f78","vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8":"aa18371467d4d17269b3","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"6c303f18660c1428dc28","node_modules_nextcloud_dialogs_dist_legacy_mjs":"8be838e4c6e9aae56c87","vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-8ibBgPg__mjs":"ea54a36450de178d1141","vendors-node_modules_moment_locale_af_js-node_modules_moment_locale_ar-dz_js-node_modules_mom-582c96":"ce1bed825f57dd1d117a","node_modules_moment_locale_sync_recursive_":"4bc2c39c5e0ff182c2e3"}[chunkId] + "";
/******/ };
/******/ })();
/******/
@ -1580,4 +1580,4 @@ document.addEventListener('DOMContentLoaded', function () {
/******/ })()
;
//# sourceMappingURL=calendar-dashboard.js.map?v=b2138102515b13d3efde
//# sourceMappingURL=calendar-dashboard.js.map?v=7ca80985f24d1eef7d61

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -369,4 +369,4 @@ module.exports = /*#__PURE__*/JSON.parse('[{"country":"Algeria","filename":"Alge
/***/ })
}]);
//# sourceMappingURL=calendar-public-calendar-subscription-picker.js.map?v=87998b8179fde0514a2d
//# sourceMappingURL=calendar-public-calendar-subscription-picker.js.map?v=4c85129ecec907c712f8

File diff suppressed because one or more lines are too long

View File

@ -8865,7 +8865,7 @@ window._registerCustomPickerElement = _;
/******/ // This function allow to reference async chunks
/******/ __webpack_require__.u = (chunkId) => {
/******/ // return url for filenames based on template
/******/ return "calendar-" + chunkId + ".js?v=" + {"vendors-node_modules_vue_dist_vue_runtime_esm_js":"7e3171593bdc0f62040b","vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981":"92154c70cff3075cb01f","vendors-node_modules_nextcloud_cdav-library_dist_dist_js-node_modules_nextcloud_logger_dist_i-36c16b":"c3b3db23da041c717fc1","vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8":"341ce16e320e3f55da7a","vendors-node_modules_vue-material-design-icons_CalendarBlankOutline_vue-node_modules_nextclou-4adead":"dca58e847aba1c77dbd7","vendors-node_modules_autosize_dist_autosize_esm_js-node_modules_html-entities_lib_index_js-no-d95c0c":"13a3e827075c7aa2453f","src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790":"24d60298b4163e544d21","src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258":"d8540d9b2a367cfc9993","src_views_Calendar_vue-data_image_svg_xml_3csvg_20xmlns_27http_www_w3_org_2000_svg_27_20heigh-4a4254":"f3843e5aba3157566f3d","vendors-node_modules_webdav_dist_web_index_js":"454da8f908d41b47c607","src_store_index_js":"5afa6c72b504a3fc895b","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"02eaeeab22bebc98f880","node_modules_nextcloud_dialogs_dist_legacy_mjs":"8be838e4c6e9aae56c87","vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-8ibBgPg__mjs":"ea54a36450de178d1141","public-calendar-subscription-picker":"87998b8179fde0514a2d","vendors-node_modules_moment_locale_af_js-node_modules_moment_locale_ar-dz_js-node_modules_mom-582c96":"ce1bed825f57dd1d117a","node_modules_moment_locale_sync_recursive_":"4bc2c39c5e0ff182c2e3"}[chunkId] + "";
/******/ return "calendar-" + chunkId + ".js?v=" + {"vendors-node_modules_vue_dist_vue_runtime_esm_js":"7e3171593bdc0f62040b","vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981":"3533c597c61a45709c85","vendors-node_modules_nextcloud_cdav-library_dist_dist_js-node_modules_nextcloud_logger_dist_i-36c16b":"c3b3db23da041c717fc1","vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8":"aa18371467d4d17269b3","vendors-node_modules_vue-material-design-icons_CalendarBlankOutline_vue-node_modules_nextclou-4adead":"e4ffc04ac1c7ab0c5950","vendors-node_modules_autosize_dist_autosize_esm_js-node_modules_html-entities_lib_index_js-no-4072c5":"60939d15b29e9da9693b","src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790":"76fe084ed502c638c2e4","src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258":"740a2859d1f364b508c1","src_views_Calendar_vue-data_image_svg_xml_3csvg_20xmlns_27http_www_w3_org_2000_svg_27_20heigh-4a4254":"b4a69bdf0232507d4ac9","vendors-node_modules_webdav_dist_web_index_js":"454da8f908d41b47c607","src_store_index_js":"35fe7fb5d199fb22a689","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"6c303f18660c1428dc28","node_modules_nextcloud_dialogs_dist_legacy_mjs":"8be838e4c6e9aae56c87","vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-8ibBgPg__mjs":"ea54a36450de178d1141","public-calendar-subscription-picker":"4c85129ecec907c712f8","vendors-node_modules_moment_locale_af_js-node_modules_moment_locale_ar-dz_js-node_modules_mom-582c96":"ce1bed825f57dd1d117a","node_modules_moment_locale_sync_recursive_":"4bc2c39c5e0ff182c2e3"}[chunkId] + "";
/******/ };
/******/ })();
/******/
@ -9087,7 +9087,7 @@ __webpack_require__.p = (0,_nextcloud_router__WEBPACK_IMPORTED_MODULE_1__.linkTo
} = await __webpack_require__.e(/*! import() */ "vendors-node_modules_vue_dist_vue_runtime_esm_js").then(__webpack_require__.bind(__webpack_require__, /*! vue */ "./node_modules/vue/dist/vue.runtime.esm.js"));
const {
default: Calendar
} = await Promise.all(/*! import() */[__webpack_require__.e("vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981"), __webpack_require__.e("vendors-node_modules_vue_dist_vue_runtime_esm_js"), __webpack_require__.e("vendors-node_modules_nextcloud_cdav-library_dist_dist_js-node_modules_nextcloud_logger_dist_i-36c16b"), __webpack_require__.e("vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8"), __webpack_require__.e("vendors-node_modules_vue-material-design-icons_CalendarBlankOutline_vue-node_modules_nextclou-4adead"), __webpack_require__.e("vendors-node_modules_autosize_dist_autosize_esm_js-node_modules_html-entities_lib_index_js-no-d95c0c"), __webpack_require__.e("src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790"), __webpack_require__.e("src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258"), __webpack_require__.e("src_views_Calendar_vue-data_image_svg_xml_3csvg_20xmlns_27http_www_w3_org_2000_svg_27_20heigh-4a4254")]).then(__webpack_require__.bind(__webpack_require__, /*! ./views/Calendar.vue */ "./src/views/Calendar.vue"));
} = await Promise.all(/*! import() */[__webpack_require__.e("vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981"), __webpack_require__.e("vendors-node_modules_vue_dist_vue_runtime_esm_js"), __webpack_require__.e("vendors-node_modules_nextcloud_cdav-library_dist_dist_js-node_modules_nextcloud_logger_dist_i-36c16b"), __webpack_require__.e("vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8"), __webpack_require__.e("vendors-node_modules_vue-material-design-icons_CalendarBlankOutline_vue-node_modules_nextclou-4adead"), __webpack_require__.e("vendors-node_modules_autosize_dist_autosize_esm_js-node_modules_html-entities_lib_index_js-no-4072c5"), __webpack_require__.e("src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790"), __webpack_require__.e("src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258"), __webpack_require__.e("src_views_Calendar_vue-data_image_svg_xml_3csvg_20xmlns_27http_www_w3_org_2000_svg_27_20heigh-4a4254")]).then(__webpack_require__.bind(__webpack_require__, /*! ./views/Calendar.vue */ "./src/views/Calendar.vue"));
const {
default: store
} = await Promise.all(/*! import() */[__webpack_require__.e("vendors-node_modules_vue_dist_vue_runtime_esm_js"), __webpack_require__.e("vendors-node_modules_nextcloud_cdav-library_dist_dist_js-node_modules_nextcloud_logger_dist_i-36c16b"), __webpack_require__.e("vendors-node_modules_webdav_dist_web_index_js"), __webpack_require__.e("src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790"), __webpack_require__.e("src_store_index_js")]).then(__webpack_require__.bind(__webpack_require__, /*! ./store/index.js */ "./src/store/index.js"));
@ -9115,4 +9115,4 @@ __webpack_require__.p = (0,_nextcloud_router__WEBPACK_IMPORTED_MODULE_1__.linkTo
/******/ })()
;
//# sourceMappingURL=calendar-reference.js.map?v=a3f6dc6f89fbabe17105
//# sourceMappingURL=calendar-reference.js.map?v=9b936095e031c963bf76

File diff suppressed because one or more lines are too long

View File

@ -1032,4 +1032,4 @@ module.exports = "data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/sv
/***/ })
}]);
//# sourceMappingURL=calendar-src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258.js.map?v=d8540d9b2a367cfc9993
//# sourceMappingURL=calendar-src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258.js.map?v=740a2859d1f364b508c1

View File

@ -277,6 +277,36 @@ const getRFCProperties = () => {
tagPlaceholder: (0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_0__.translate)('calendar', 'Add this as a new location'),
options: []
},
clients: {
readableName: (0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_0__.translate)('calendar', 'Clients'),
icon: 'Human',
searchable: true,
multiple: false,
info: (0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_0__.translate)('calendar', 'Client from Gestion'),
placeholder: (0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_0__.translate)('calendar', 'Add client'),
tagPlaceholder: (0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_0__.translate)('calendar', 'Add client'),
options: []
},
client: {
readableName: (0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_0__.translate)('calendar', 'client'),
placeholder: (0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_0__.translate)('calendar', 'Add a client'),
icon: 'Human'
},
embalmers: {
readableName: (0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_0__.translate)('calendar', 'Embalmers'),
icon: 'Human',
searchable: true,
multiple: false,
info: (0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_0__.translate)('calendar', 'Thanatopracteur from Gestion'),
placeholder: (0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_0__.translate)('calendar', 'Choose thanatopracteur'),
tagPlaceholder: (0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_0__.translate)('calendar', 'Choose thanatopracteur'),
options: []
},
embalmer: {
readableName: (0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_0__.translate)('calendar', 'Embalmer'),
placeholder: (0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_0__.translate)('calendar', 'Add a thanatopracteur'),
icon: 'Human'
},
articles: {
readableName: (0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_0__.translate)('calendar', 'Articles'),
icon: 'TextBoxOutline',
@ -1787,4 +1817,4 @@ function GenColors(steps) {
/***/ })
}]);
//# sourceMappingURL=calendar-src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790.js.map?v=24d60298b4163e544d21
//# sourceMappingURL=calendar-src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790.js.map?v=76fe084ed502c638c2e4

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -6013,8 +6013,6 @@ __webpack_require__.r(__webpack_exports__);
});
} else if (result.description) {
let v = (0,html_entities__WEBPACK_IMPORTED_MODULE_5__.decode)(result.description);
console.log('description orig', result.description);
console.log('description dest', v);
values.push({
value: v,
label: v
@ -13407,6 +13405,16 @@ var render = function render() {
"is-widget": true,
locations: _vm.locations
}
}) : _vm._e(), _vm._v(" "), _vm.showWidgetEventDetails ? _c("EditSimple", {
attrs: {
"is-widget": true,
clients: _vm.clients
}
}) : _vm._e(), _vm._v(" "), _vm.showWidgetEventDetails ? _c("EditSimple", {
attrs: {
"is-widget": true,
embalmers: _vm.embalmers
}
}) : _vm._e()], 1) : _c("NcContent", {
class: _vm.classNames,
attrs: {
@ -13662,6 +13670,18 @@ var render = function render() {
"update-end-timezone": _vm.updateEndTimezone,
"toggle-all-day": _vm.toggleAllDay
}
}), _vm._v(" "), _c("PropertySelectAjax", {
staticClass: "property-location",
attrs: {
url: "/apps/gestion/ajaxGetClientsName",
"is-read-only": _vm.isReadOnly,
"prop-model": _vm.rfcProps.clients,
value: _vm.client,
"linkify-links": true
},
on: {
"update:value": _vm.updateClient
}
}), _vm._v(" "), _c("PropertySelectAjax", {
staticClass: "property-location",
attrs: {
@ -16190,14 +16210,32 @@ __webpack_require__.r(__webpack_exports__);
var _this$calendarObjectI4, _this$calendarObjectI5;
return (_this$calendarObjectI4 = (_this$calendarObjectI5 = this.calendarObjectInstance) === null || _this$calendarObjectI5 === void 0 ? void 0 : _this$calendarObjectI5.location) !== null && _this$calendarObjectI4 !== void 0 ? _this$calendarObjectI4 : null;
},
/**
* Returns the client or null if the event is still loading
*
* @return {string|null}
*/
client() {
var _this$calendarObjectI6, _this$calendarObjectI7;
return (_this$calendarObjectI6 = (_this$calendarObjectI7 = this.calendarObjectInstance) === null || _this$calendarObjectI7 === void 0 ? void 0 : _this$calendarObjectI7.client) !== null && _this$calendarObjectI6 !== void 0 ? _this$calendarObjectI6 : null;
},
/**
* Returns the embalmer(Thanato) or null if the event is still loading
*
* @return {string|null}
*/
embalmer() {
var _this$calendarObjectI8, _this$calendarObjectI9;
return (_this$calendarObjectI8 = (_this$calendarObjectI9 = this.calendarObjectInstance) === null || _this$calendarObjectI9 === void 0 ? void 0 : _this$calendarObjectI9.embalmer) !== null && _this$calendarObjectI8 !== void 0 ? _this$calendarObjectI8 : null;
},
/**
* Returns the description or null if the event is still loading
*
* @return {string|null}
*/
description() {
var _this$calendarObjectI6, _this$calendarObjectI7;
return (_this$calendarObjectI6 = (_this$calendarObjectI7 = this.calendarObjectInstance) === null || _this$calendarObjectI7 === void 0 ? void 0 : _this$calendarObjectI7.description) !== null && _this$calendarObjectI6 !== void 0 ? _this$calendarObjectI6 : null;
var _this$calendarObjectI10, _this$calendarObjectI11;
return (_this$calendarObjectI10 = (_this$calendarObjectI11 = this.calendarObjectInstance) === null || _this$calendarObjectI11 === void 0 ? void 0 : _this$calendarObjectI11.description) !== null && _this$calendarObjectI10 !== void 0 ? _this$calendarObjectI10 : null;
},
/**
* Returns the start-date (without timezone) or null if the event is still loading
@ -16205,8 +16243,8 @@ __webpack_require__.r(__webpack_exports__);
* @return {Date|null}
*/
startDate() {
var _this$calendarObjectI8, _this$calendarObjectI9;
return (_this$calendarObjectI8 = (_this$calendarObjectI9 = this.calendarObjectInstance) === null || _this$calendarObjectI9 === void 0 ? void 0 : _this$calendarObjectI9.startDate) !== null && _this$calendarObjectI8 !== void 0 ? _this$calendarObjectI8 : null;
var _this$calendarObjectI12, _this$calendarObjectI13;
return (_this$calendarObjectI12 = (_this$calendarObjectI13 = this.calendarObjectInstance) === null || _this$calendarObjectI13 === void 0 ? void 0 : _this$calendarObjectI13.startDate) !== null && _this$calendarObjectI12 !== void 0 ? _this$calendarObjectI12 : null;
},
/**
* Returns the timezone of the event's start-date or null if the event is still loading
@ -16214,8 +16252,8 @@ __webpack_require__.r(__webpack_exports__);
* @return {string|null}
*/
startTimezone() {
var _this$calendarObjectI10, _this$calendarObjectI11;
return (_this$calendarObjectI10 = (_this$calendarObjectI11 = this.calendarObjectInstance) === null || _this$calendarObjectI11 === void 0 ? void 0 : _this$calendarObjectI11.startTimezoneId) !== null && _this$calendarObjectI10 !== void 0 ? _this$calendarObjectI10 : null;
var _this$calendarObjectI14, _this$calendarObjectI15;
return (_this$calendarObjectI14 = (_this$calendarObjectI15 = this.calendarObjectInstance) === null || _this$calendarObjectI15 === void 0 ? void 0 : _this$calendarObjectI15.startTimezoneId) !== null && _this$calendarObjectI14 !== void 0 ? _this$calendarObjectI14 : null;
},
/**
* Returns the end-date (without timezone) or null if the event is still loading
@ -16223,8 +16261,8 @@ __webpack_require__.r(__webpack_exports__);
* @return {Date|null}
*/
endDate() {
var _this$calendarObjectI12, _this$calendarObjectI13;
return (_this$calendarObjectI12 = (_this$calendarObjectI13 = this.calendarObjectInstance) === null || _this$calendarObjectI13 === void 0 ? void 0 : _this$calendarObjectI13.endDate) !== null && _this$calendarObjectI12 !== void 0 ? _this$calendarObjectI12 : null;
var _this$calendarObjectI16, _this$calendarObjectI17;
return (_this$calendarObjectI16 = (_this$calendarObjectI17 = this.calendarObjectInstance) === null || _this$calendarObjectI17 === void 0 ? void 0 : _this$calendarObjectI17.endDate) !== null && _this$calendarObjectI16 !== void 0 ? _this$calendarObjectI16 : null;
},
/**
* Returns the timezone of the event's end-date or null if the event is still loading
@ -16232,8 +16270,8 @@ __webpack_require__.r(__webpack_exports__);
* @return {string|null}
*/
endTimezone() {
var _this$calendarObjectI14, _this$calendarObjectI15;
return (_this$calendarObjectI14 = (_this$calendarObjectI15 = this.calendarObjectInstance) === null || _this$calendarObjectI15 === void 0 ? void 0 : _this$calendarObjectI15.endTimezoneId) !== null && _this$calendarObjectI14 !== void 0 ? _this$calendarObjectI14 : null;
var _this$calendarObjectI18, _this$calendarObjectI19;
return (_this$calendarObjectI18 = (_this$calendarObjectI19 = this.calendarObjectInstance) === null || _this$calendarObjectI19 === void 0 ? void 0 : _this$calendarObjectI19.endTimezoneId) !== null && _this$calendarObjectI18 !== void 0 ? _this$calendarObjectI18 : null;
},
/**
* Returns whether or not the event is all-day or null if the event is still loading
@ -16241,8 +16279,8 @@ __webpack_require__.r(__webpack_exports__);
* @return {boolean}
*/
isAllDay() {
var _this$calendarObjectI16, _this$calendarObjectI17;
return (_this$calendarObjectI16 = (_this$calendarObjectI17 = this.calendarObjectInstance) === null || _this$calendarObjectI17 === void 0 ? void 0 : _this$calendarObjectI17.isAllDay) !== null && _this$calendarObjectI16 !== void 0 ? _this$calendarObjectI16 : false;
var _this$calendarObjectI20, _this$calendarObjectI21;
return (_this$calendarObjectI20 = (_this$calendarObjectI21 = this.calendarObjectInstance) === null || _this$calendarObjectI21 === void 0 ? void 0 : _this$calendarObjectI21.isAllDay) !== null && _this$calendarObjectI20 !== void 0 ? _this$calendarObjectI20 : false;
},
/**
* Returns whether or not the user is allowed to modify the all-day setting
@ -16250,8 +16288,8 @@ __webpack_require__.r(__webpack_exports__);
* @return {boolean}
*/
canModifyAllDay() {
var _this$calendarObjectI18, _this$calendarObjectI19;
return (_this$calendarObjectI18 = (_this$calendarObjectI19 = this.calendarObjectInstance) === null || _this$calendarObjectI19 === void 0 ? void 0 : _this$calendarObjectI19.canModifyAllDay) !== null && _this$calendarObjectI18 !== void 0 ? _this$calendarObjectI18 : false;
var _this$calendarObjectI22, _this$calendarObjectI23;
return (_this$calendarObjectI22 = (_this$calendarObjectI23 = this.calendarObjectInstance) === null || _this$calendarObjectI23 === void 0 ? void 0 : _this$calendarObjectI23.canModifyAllDay) !== null && _this$calendarObjectI22 !== void 0 ? _this$calendarObjectI22 : false;
},
/**
* Returns the color the illustration should be colored in
@ -16283,8 +16321,8 @@ __webpack_require__.r(__webpack_exports__);
* @return {null | string}
*/
color() {
var _this$calendarObjectI20, _this$calendarObjectI21;
return (_this$calendarObjectI20 = (_this$calendarObjectI21 = this.calendarObjectInstance) === null || _this$calendarObjectI21 === void 0 ? void 0 : _this$calendarObjectI21.customColor) !== null && _this$calendarObjectI20 !== void 0 ? _this$calendarObjectI20 : null;
var _this$calendarObjectI24, _this$calendarObjectI25;
return (_this$calendarObjectI24 = (_this$calendarObjectI25 = this.calendarObjectInstance) === null || _this$calendarObjectI25 === void 0 ? void 0 : _this$calendarObjectI25.customColor) !== null && _this$calendarObjectI24 !== void 0 ? _this$calendarObjectI24 : null;
},
/**
* Returns whether or not to display save buttons
@ -16407,7 +16445,7 @@ __webpack_require__.r(__webpack_exports__);
* Returns an object with properties from RFCs including
* their displayName, a description, options, etc.
*
* @return {{geo, color, timeTransparency, description, resources, location, categories, accessClass, priority, status, locations, articles}}
* @return {{geo, color, timeTransparency, description, resources, location, client, categories, accessClass, priority, status, locations, articles, clients,embalmer,embalmers}}
*/
rfcProps() {
return (0,_models_rfcProps_js__WEBPACK_IMPORTED_MODULE_0__.getRFCProperties)();
@ -16664,12 +16702,33 @@ __webpack_require__.r(__webpack_exports__);
* @param {string} location New location
*/
updateLocation(location) {
console.log("updateLocation", location);
this.$store.commit('changeLocation', {
calendarObjectInstance: this.calendarObjectInstance,
location
});
},
/**
* Updates the client of the event
*
* @param {string} client New client
*/
updateClient(client) {
this.$store.commit('changeClient', {
calendarObjectInstance: this.calendarObjectInstance,
client
});
},
/**
* Updates the embalmer(Thanatopracteur) of the event
*
* @param {string} embalmer New embalmer
*/
updateEmbalmer(embalmer) {
this.$store.commit('changeEmbalmer', {
calendarObjectInstance: this.calendarObjectInstance,
embalmer
});
},
/**
* Updates the start date of this event
*
@ -17051,6 +17110,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var vue_material_design_icons_Tag_vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! vue-material-design-icons/Tag.vue */ "./node_modules/vue-material-design-icons/Tag.vue");
/* harmony import */ var vue_material_design_icons_TextBoxOutline_vue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! vue-material-design-icons/TextBoxOutline.vue */ "./node_modules/vue-material-design-icons/TextBoxOutline.vue");
/* harmony import */ var vue_material_design_icons_Bell_vue__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! vue-material-design-icons/Bell.vue */ "./node_modules/vue-material-design-icons/Bell.vue");
/* harmony import */ var vue_material_design_icons_Human_vue__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! vue-material-design-icons/Human.vue */ "./node_modules/vue-material-design-icons/Human.vue");
/**
* @copyright Copyright (c) 2019 Georg Ehrke
*
@ -17090,6 +17150,7 @@ __webpack_require__.r(__webpack_exports__);
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
components: {
Briefcase: vue_material_design_icons_Briefcase_vue__WEBPACK_IMPORTED_MODULE_0__["default"],
@ -17099,7 +17160,8 @@ __webpack_require__.r(__webpack_exports__);
MapMarker: vue_material_design_icons_MapMarker_vue__WEBPACK_IMPORTED_MODULE_4__["default"],
Tag: vue_material_design_icons_Tag_vue__WEBPACK_IMPORTED_MODULE_5__["default"],
TextBoxOutline: vue_material_design_icons_TextBoxOutline_vue__WEBPACK_IMPORTED_MODULE_6__["default"],
Bell: vue_material_design_icons_Bell_vue__WEBPACK_IMPORTED_MODULE_7__["default"]
Bell: vue_material_design_icons_Bell_vue__WEBPACK_IMPORTED_MODULE_7__["default"],
Human: vue_material_design_icons_Human_vue__WEBPACK_IMPORTED_MODULE_8__["default"]
},
props: {
/**
@ -26317,4 +26379,4 @@ module.exports = "data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/sv
/***/ })
}]);
//# sourceMappingURL=calendar-src_views_Calendar_vue-data_image_svg_xml_3csvg_20xmlns_27http_www_w3_org_2000_svg_27_20heigh-4a4254.js.map?v=f3843e5aba3157566f3d
//# sourceMappingURL=calendar-src_views_Calendar_vue-data_image_svg_xml_3csvg_20xmlns_27http_www_w3_org_2000_svg_27_20heigh-4a4254.js.map?v=b4a69bdf0232507d4ac9

View File

@ -1,4 +1,4 @@
(self["webpackChunkcalendar"] = self["webpackChunkcalendar"] || []).push([["vendors-node_modules_autosize_dist_autosize_esm_js-node_modules_html-entities_lib_index_js-no-d95c0c"],{
(self["webpackChunkcalendar"] = self["webpackChunkcalendar"] || []).push([["vendors-node_modules_autosize_dist_autosize_esm_js-node_modules_html-entities_lib_index_js-no-4072c5"],{
/***/ "./node_modules/@vue/devtools-api/lib/esm/const.js":
/*!*********************************************************!*\
@ -12988,6 +12988,78 @@ __webpack_require__.r(__webpack_exports__);
});
/***/ }),
/***/ "./node_modules/vue-material-design-icons/Human.vue":
/*!**********************************************************!*\
!*** ./node_modules/vue-material-design-icons/Human.vue ***!
\**********************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _Human_vue_vue_type_template_id_40fe5431__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Human.vue?vue&type=template&id=40fe5431 */ "./node_modules/vue-material-design-icons/Human.vue?vue&type=template&id=40fe5431");
/* harmony import */ var _Human_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Human.vue?vue&type=script&lang=js */ "./node_modules/vue-material-design-icons/Human.vue?vue&type=script&lang=js");
/* harmony import */ var _vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
/* normalize component */
;
var component = (0,_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__["default"])(
_Human_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"],
_Human_vue_vue_type_template_id_40fe5431__WEBPACK_IMPORTED_MODULE_0__.render,
_Human_vue_vue_type_template_id_40fe5431__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns,
false,
null,
null,
null
)
/* hot reload */
if (false) { var api; }
component.options.__file = "node_modules/vue-material-design-icons/Human.vue"
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports);
/***/ }),
/***/ "./node_modules/vue-loader/lib/index.js??vue-loader-options!./node_modules/vue-material-design-icons/Human.vue?vue&type=script&lang=js":
/*!*********************************************************************************************************************************************!*\
!*** ./node_modules/vue-loader/lib/index.js??vue-loader-options!./node_modules/vue-material-design-icons/Human.vue?vue&type=script&lang=js ***!
\*********************************************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
name: "HumanIcon",
emits: ['click'],
props: {
title: {
type: String,
},
fillColor: {
type: String,
default: "currentColor"
},
size: {
type: Number,
default: 24
}
}
});
/***/ }),
/***/ "./node_modules/vue-material-design-icons/InformationVariant.vue":
@ -14246,6 +14318,22 @@ __webpack_require__.r(__webpack_exports__);
/***/ }),
/***/ "./node_modules/vue-material-design-icons/Human.vue?vue&type=script&lang=js":
/*!**********************************************************************************!*\
!*** ./node_modules/vue-material-design-icons/Human.vue?vue&type=script&lang=js ***!
\**********************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _vue_loader_lib_index_js_vue_loader_options_Human_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../vue-loader/lib/index.js??vue-loader-options!./Human.vue?vue&type=script&lang=js */ "./node_modules/vue-loader/lib/index.js??vue-loader-options!./node_modules/vue-material-design-icons/Human.vue?vue&type=script&lang=js");
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_vue_loader_lib_index_js_vue_loader_options_Human_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
/***/ }),
/***/ "./node_modules/vue-material-design-icons/InformationVariant.vue?vue&type=script&lang=js":
/*!***********************************************************************************************!*\
!*** ./node_modules/vue-material-design-icons/InformationVariant.vue?vue&type=script&lang=js ***!
@ -14792,6 +14880,23 @@ __webpack_require__.r(__webpack_exports__);
/* harmony import */ var _vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_3_vue_loader_lib_index_js_vue_loader_options_GoogleCirclesCommunities_vue_vue_type_template_id_401d4c69__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!../vue-loader/lib/index.js??vue-loader-options!./GoogleCirclesCommunities.vue?vue&type=template&id=401d4c69 */ "./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./node_modules/vue-material-design-icons/GoogleCirclesCommunities.vue?vue&type=template&id=401d4c69");
/***/ }),
/***/ "./node_modules/vue-material-design-icons/Human.vue?vue&type=template&id=40fe5431":
/*!****************************************************************************************!*\
!*** ./node_modules/vue-material-design-icons/Human.vue?vue&type=template&id=40fe5431 ***!
\****************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ render: () => (/* reexport safe */ _vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_3_vue_loader_lib_index_js_vue_loader_options_Human_vue_vue_type_template_id_40fe5431__WEBPACK_IMPORTED_MODULE_0__.render),
/* harmony export */ staticRenderFns: () => (/* reexport safe */ _vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_3_vue_loader_lib_index_js_vue_loader_options_Human_vue_vue_type_template_id_40fe5431__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns)
/* harmony export */ });
/* harmony import */ var _vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_3_vue_loader_lib_index_js_vue_loader_options_Human_vue_vue_type_template_id_40fe5431__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!../vue-loader/lib/index.js??vue-loader-options!./Human.vue?vue&type=template&id=40fe5431 */ "./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./node_modules/vue-material-design-icons/Human.vue?vue&type=template&id=40fe5431");
/***/ }),
/***/ "./node_modules/vue-material-design-icons/InformationVariant.vue?vue&type=template&id=3b5f7865":
@ -16385,6 +16490,75 @@ render._withStripped = true
/***/ }),
/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./node_modules/vue-material-design-icons/Human.vue?vue&type=template&id=40fe5431":
/*!********************************************************************************************************************************************************************************************************************************!*\
!*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./node_modules/vue-material-design-icons/Human.vue?vue&type=template&id=40fe5431 ***!
\********************************************************************************************************************************************************************************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ render: () => (/* binding */ render),
/* harmony export */ staticRenderFns: () => (/* binding */ staticRenderFns)
/* harmony export */ });
var render = function render() {
var _vm = this,
_c = _vm._self._c
return _c(
"span",
_vm._b(
{
staticClass: "material-design-icon human-icon",
attrs: {
"aria-hidden": _vm.title ? null : true,
"aria-label": _vm.title,
role: "img",
},
on: {
click: function ($event) {
return _vm.$emit("click", $event)
},
},
},
"span",
_vm.$attrs,
false
),
[
_c(
"svg",
{
staticClass: "material-design-icon__svg",
attrs: {
fill: _vm.fillColor,
width: _vm.size,
height: _vm.size,
viewBox: "0 0 24 24",
},
},
[
_c(
"path",
{
attrs: {
d: "M21,9H15V22H13V16H11V22H9V9H3V7H21M12,2A2,2 0 0,1 14,4A2,2 0 0,1 12,6C10.89,6 10,5.1 10,4C10,2.89 10.89,2 12,2Z",
},
},
[_vm.title ? _c("title", [_vm._v(_vm._s(_vm.title))]) : _vm._e()]
),
]
),
]
)
}
var staticRenderFns = []
render._withStripped = true
/***/ }),
/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./node_modules/vue-material-design-icons/InformationVariant.vue?vue&type=template&id=3b5f7865":
@ -42380,4 +42554,4 @@ function hasInjectionContext() {
/***/ })
}]);
//# sourceMappingURL=calendar-vendors-node_modules_autosize_dist_autosize_esm_js-node_modules_html-entities_lib_index_js-no-d95c0c.js.map?v=13a3e827075c7aa2453f
//# sourceMappingURL=calendar-vendors-node_modules_autosize_dist_autosize_esm_js-node_modules_html-entities_lib_index_js-no-4072c5.js.map?v=60939d15b29e9da9693b

View File

@ -21864,4 +21864,4 @@ const webNamespaces = {
/***/ })
}]);
//# sourceMappingURL=calendar-vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981.js.map?v=92154c70cff3075cb01f
//# sourceMappingURL=calendar-vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981.js.map?v=3533c597c61a45709c85

View File

@ -27285,4 +27285,4 @@ window._registerCustomPickerElement = _;
/***/ })
}]);
//# sourceMappingURL=calendar-vendors-node_modules_nextcloud_vue-dashboard_dist_vue-dashboard_js-node_modules_css-loader_di-9e6f3d.js.map?v=cd8d1d9a89e2f5e5bceb
//# sourceMappingURL=calendar-vendors-node_modules_nextcloud_vue-dashboard_dist_vue-dashboard_js-node_modules_css-loader_di-9e6f3d.js.map?v=6717f0bb504201e731c9

View File

@ -80146,4 +80146,4 @@ module.exports = /*#__PURE__*/JSON.parse('{"compressed":true,"categories":[{"id"
/***/ })
}]);
//# sourceMappingURL=calendar-vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f.js.map?v=02eaeeab22bebc98f880
//# sourceMappingURL=calendar-vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f.js.map?v=6c303f18660c1428dc28

View File

@ -102420,4 +102420,4 @@ module.exports = /*#__PURE__*/JSON.parse('{"compressed":true,"categories":[{"id"
/***/ })
}]);
//# sourceMappingURL=calendar-vendors-node_modules_vue-material-design-icons_CalendarBlankOutline_vue-node_modules_nextclou-4adead.js.map?v=dca58e847aba1c77dbd7
//# sourceMappingURL=calendar-vendors-node_modules_vue-material-design-icons_CalendarBlankOutline_vue-node_modules_nextclou-4adead.js.map?v=e4ffc04ac1c7ab0c5950

View File

@ -2030,4 +2030,4 @@ render._withStripped = true
/***/ })
}]);
//# sourceMappingURL=calendar-vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8.js.map?v=341ce16e320e3f55da7a
//# sourceMappingURL=calendar-vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8.js.map?v=aa18371467d4d17269b3

View File

@ -28,11 +28,13 @@ use OCA\Calendar\Dashboard\CalendarWidget;
use OCA\Calendar\Dashboard\CalendarWidgetV2;
use OCA\Calendar\Events\BeforeAppointmentBookedEvent;
use OCA\Calendar\Listener\AppointmentBookedListener;
use OCA\Calendar\Listener\CalendarObjectCreatedListener;
use OCA\Calendar\Listener\CalendarReferenceListener;
use OCA\Calendar\Listener\UserDeletedListener;
use OCA\Calendar\Notification\Notifier;
use OCA\Calendar\Profile\AppointmentsAction;
use OCA\Calendar\Reference\ReferenceProvider;
use OCA\DAV\Events\CalendarObjectCreatedEvent;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
@ -73,7 +75,6 @@ class Application extends App implements IBootstrap {
$context->registerEventListener(BeforeAppointmentBookedEvent::class, AppointmentBookedListener::class);
$context->registerEventListener(UserDeletedEvent::class, UserDeletedListener::class);
$context->registerEventListener(RenderReferenceEvent::class, CalendarReferenceListener::class);
$context->registerNotifierService(Notifier::class);
}

View File

@ -0,0 +1,59 @@
<?php
declare(strict_types=1);
/**
* Calendar App
*
* @copyright 2021 Anna Larch <anna.larch@gmx.net>
*
* @author Anna Larch <anna.larch@gmx.net>
* @author Richard Steinmetz <richard@steinmetz.cloud>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCA\Calendar\Service\Calendar;
use OCA\Gestion\Db\Bdd;
use Psr\Log\LoggerInterface;
class CalendarService {
/** @var Bdd */
private $gestionMapper;
/** @var LoggerInterface */
private $logger;
public function __construct(
Bdd $gestionMapper,
LoggerInterface $logger) {
$this->logger = $logger;
$this->gestionMapper = $gestionMapper;
}
public function createDefuntFromCalendarSummary($calendarSummary): bool{
return $this->gestionMapper->insertDefuntByName($calendarSummary);
}
public function GetCalendarSummaryFromVCalendarString(string $vCalendarString): string
{
$summaryValue = "Nom du défunt";
preg_match('/SUMMARY:(.*)\r\n/', $vCalendarString, $matches);
if (isset($matches[1])) {
$summaryValue = trim($matches[1]);
}
return $summaryValue;
}
}

View File

@ -95,8 +95,6 @@ export default {
values.push({ value: v, label: v })
} else if (result.description) {
let v = decode(result.description)
console.log('description orig', result.description)
console.log('description dest', v)
values.push({ value: v, label: v })
} else if (result.reference) {
let v = decode(result.reference)

View File

@ -99,6 +99,26 @@ export default {
location() {
return this.calendarObjectInstance?.location ?? null
},
/**
* Returns the client or null if the event is still loading
*
* @return {string|null}
*/
client() {
return this.calendarObjectInstance?.client ?? null
},
/**
* Returns the embalmer(Thanato) or null if the event is still loading
*
* @return {string|null}
*/
embalmer() {
return this.calendarObjectInstance?.embalmer ?? null
},
/**
* Returns the description or null if the event is still loading
*
@ -322,7 +342,7 @@ export default {
* Returns an object with properties from RFCs including
* their displayName, a description, options, etc.
*
* @return {{geo, color, timeTransparency, description, resources, location, categories, accessClass, priority, status, locations, articles}}
* @return {{geo, color, timeTransparency, description, resources, location, client, categories, accessClass, priority, status, locations, articles, clients,embalmer,embalmers}}
*/
rfcProps() {
return getRFCProperties()
@ -588,12 +608,36 @@ export default {
* @param {string} location New location
*/
updateLocation(location) {
console.log("updateLocation", location)
this.$store.commit('changeLocation', {
calendarObjectInstance: this.calendarObjectInstance,
location,
})
},
/**
* Updates the client of the event
*
* @param {string} client New client
*/
updateClient(client) {
this.$store.commit('changeClient', {
calendarObjectInstance: this.calendarObjectInstance,
client,
})
},
/**
* Updates the embalmer(Thanatopracteur) of the event
*
* @param {string} embalmer New embalmer
*/
updateEmbalmer(embalmer) {
this.$store.commit('changeEmbalmer', {
calendarObjectInstance: this.calendarObjectInstance,
embalmer,
})
},
/**
* Updates the start date of this event
*

View File

@ -37,6 +37,7 @@ import MapMarker from 'vue-material-design-icons/MapMarker.vue'
import Tag from 'vue-material-design-icons/Tag.vue'
import TextBoxOutline from 'vue-material-design-icons/TextBoxOutline.vue'
import Bell from 'vue-material-design-icons/Bell.vue'
import Human from 'vue-material-design-icons/Human.vue'
export default {
components: {
@ -48,6 +49,7 @@ export default {
Tag,
TextBoxOutline,
Bell,
Human
},
props: {
/**

View File

@ -123,8 +123,29 @@ const mapCalendarJsToCalendarObject = (calendarComponent, calendarId = null) =>
})
}
const getKeyValueIcsProperty = (key,value) => {
return `${key}:${value}\r\n`;
}
const setCustomKeyValueToIcsAndReturnIcs = (ics, key,value) => {
const property = getKeyValueIcsProperty(key,value);
ics = ics.replace('END:VEVENT', `${property}END:VEVENT`);
return ics;
}
const setCustomKeyValuesArrayToIcsAndReturnIcs = (ics, keyValueArray) => {
for (var key in keyValueArray) {
const value = keyValueArray[key] ? keyValueArray[key] : '';
ics = setCustomKeyValueToIcsAndReturnIcs(ics, key, value);
}
return ics;
}
export {
getDefaultCalendarObjectObject,
mapCDavObjectToCalendarObject,
mapCalendarJsToCalendarObject,
setCustomKeyValuesArrayToIcsAndReturnIcs,
getKeyValueIcsProperty,
setCustomKeyValueToIcsAndReturnIcs
}

View File

@ -56,6 +56,10 @@ const getDefaultEventObject = (props = {}) => Object.assign({}, {
canModifyAllDay: true,
// Location that the event takes places in
location: null,
//client of the event
client : null,
//embalmer(Thanato) of the event
embalmer : null,
// description of the event
description: null,
// Access class of the event (PUBLIC, PRIVATE, CONFIDENTIAL)
@ -102,6 +106,8 @@ const mapEventComponentToEventObject = (eventComponent) => {
isAllDay: eventComponent.isAllDay(),
canModifyAllDay: eventComponent.canModifyAllDay(),
location: eventComponent.location,
client : "CLIENT",
embalmer : "TEST",
description: eventComponent.description,
accessClass: eventComponent.accessClass,
status: eventComponent.status,
@ -187,7 +193,15 @@ const mapEventComponentToEventObject = (eventComponent) => {
}
}
return eventObject
if(eventComponent.hasProperty('CLIENT')){
eventObject.client = eventComponent.getFirstPropertyFirstValue('CLIENT');
}
if(eventComponent.hasProperty('EMBALMER')){
eventObject.embalmer = eventComponent.getFirstPropertyFirstValue('EMBALMER');
}
return eventObject;
}
/**
@ -199,6 +213,8 @@ const mapEventComponentToEventObject = (eventComponent) => {
const copyCalendarObjectInstanceIntoEventComponent = (eventObject, eventComponent) => {
eventComponent.title = eventObject.title
eventComponent.location = eventObject.location
eventComponent.client = eventObject.client
eventComponent.embalmer = eventObject.embalmer
eventComponent.description = eventObject.description
eventComponent.accessClass = eventObject.accessClass
eventComponent.status = eventObject.status

View File

@ -125,6 +125,40 @@ const getRFCProperties = () => {
options: [],
},
clients: {
readableName: t('calendar', 'Clients'),
icon: 'Human',
searchable: true,
multiple: false,
info: t('calendar', 'Client from Gestion'),
placeholder: t('calendar', 'Add client'),
tagPlaceholder: t('calendar', 'Add client'),
options: [],
},
client: {
readableName: t('calendar', 'client'),
placeholder: t('calendar', 'Add a client'),
icon: 'Human',
},
embalmers: {
readableName: t('calendar', 'Embalmers'),
icon: 'Human',
searchable: true,
multiple: false,
info: t('calendar', 'Thanatopracteur from Gestion'),
placeholder: t('calendar', 'Choose thanatopracteur'),
tagPlaceholder: t('calendar', 'Choose thanatopracteur'),
options: [],
},
embalmer: {
readableName: t('calendar', 'Embalmer'),
placeholder: t('calendar', 'Add a thanatopracteur'),
icon: 'Human',
},
articles: {
readableName: t('calendar', 'Articles'),
icon: 'TextBoxOutline',

View File

@ -321,6 +321,34 @@ const mutations = {
calendarObjectInstance.location = location
},
/**
* Change the client of an event
*
* @param {object} state The Vuex state
* @param {object} data The destructuring object
* @param {object} data.calendarObjectInstance The calendarObjectInstance object
* @param {string} data.client New client to set
*/
changeClient(state, { calendarObjectInstance, client }) {
calendarObjectInstance.eventComponent.client = client
calendarObjectInstance.client = client
},
/**
* Change the embalmer (Thanato) of an event
*
* @param {object} state The Vuex state
* @param {object} data The destructuring object
* @param {object} data.calendarObjectInstance The calendarObjectInstance object
* @param {string} data.embalmer New embalmer to set
*/
changeEmbalmer(state, { calendarObjectInstance, embalmer }) {
calendarObjectInstance.eventComponent.embalmer = embalmer
calendarObjectInstance.embalmer = embalmer
},
/**
* Change the description of an event
*

View File

@ -24,7 +24,7 @@
*
*/
import Vue from 'vue'
import { mapCalendarJsToCalendarObject } from '../models/calendarObject.js'
import { mapCalendarJsToCalendarObject, setClientValueToIcsAndReturnIcs, setCustomKeyValuesArrayToIcsAndReturnIcs } from '../models/calendarObject.js'
import logger from '../utils/logger.js'
import {
createEvent,
@ -224,23 +224,25 @@ const actions = {
* @return {Promise<void>}
*/
async updateCalendarObject(context, { calendarObject }) {
let eventComponent = calendarObject.calendarComponent.getFirstComponent('VEVENT');
if (calendarObject.existsOnServer) {
calendarObject.dav.data = calendarObject.calendarComponent.toICS()
await calendarObject.dav.update()
context.commit('addCalendarObjectIdToAllTimeRangesOfCalendar', {
calendarId: calendarObject.calendarId,
calendarObjectId: calendarObject.id,
})
context.commit('incrementModificationCount')
return
// TODO - catch conflicts
}
const calendar = context.getters.getCalendarById(calendarObject.calendarId)
calendarObject.dav = await calendar.dav.createVObject(calendarObject.calendarComponent.toICS())
let icsValue = calendarObject.calendarComponent.toICS();
if(eventComponent != null){
const customKeyValue = {"CLIENT": eventComponent.client, "EMBALMER": eventComponent.embalmer};
icsValue = setCustomKeyValuesArrayToIcsAndReturnIcs(icsValue,customKeyValue);
}
calendarObject.dav = await calendar.dav.createVObject(icsValue);
calendarObject.existsOnServer = true
context.commit('updateCalendarObjectId', { calendarObject })

View File

@ -505,6 +505,7 @@ const actions = {
'SUMMARY',
'LOCATION',
'DESCRIPTION',
'CLIENT'
])
},
}

View File

@ -31,6 +31,8 @@
<EmptyCalendar v-else />
<EditSimple v-if="showWidgetEventDetails" :is-widget="true" :locations="locations" />
<EditSimple v-if="showWidgetEventDetails" :is-widget="true" :clients="clients" />
<EditSimple v-if="showWidgetEventDetails" :is-widget="true" :embalmers="embalmers" />
</div>
<NcContent v-else app-name="calendar calendar-custom" :class="classNames">

View File

@ -103,6 +103,14 @@
@update-end-timezone="updateEndTimezone"
@toggle-all-day="toggleAllDay" />
<PropertySelectAjax class="property-location"
url="/apps/gestion/ajaxGetClientsName"
:is-read-only="isReadOnly"
:prop-model="rfcProps.clients"
:value="client"
:linkify-links="true"
@update:value="updateClient" />
<PropertySelectAjax class="property-location"
url="/apps/gestion/ajaxGetLieux"
:is-read-only="isReadOnly"
@ -246,22 +254,13 @@
<template #icon>
<AccountMultiple :size="20" decorative />
</template>
<div class="app-sidebar-tab__content">
<InviteesList v-if="!isLoading"
:calendar-object-instance="calendarObjectInstance"
<PropertySelectAjax class="property-embalmer"
url="/apps/gestion/ajaxGetThanatopracteurs"
:is-read-only="isReadOnly"
:is-shared-with-me="isSharedWithMe"
:show-header="false"
@update-dates="updateDates" />
</div>
<SaveButtons v-if="showSaveButtons"
class="app-sidebar-tab__buttons"
:can-create-recurrence-exception="canCreateRecurrenceException"
:is-new="isNew"
:isReadOnly="false"
:force-this-and-all-future="forceThisAndAllFuture"
@save-this-only="prepareAccessForAttachments(false)"
@save-this-and-all-future="prepareAccessForAttachments(true)" />
:prop-model="rfcProps.embalmers"
:value="embalmer"
:linkify-links="true"
@update:value="updateEmbalmer" />
</NcAppSidebarTab>
<NcAppSidebarTab v-if="!isLoading && !isError && showResources"
id="app-sidebar-tab-resources"

View File

@ -121,6 +121,14 @@
@update-end-timezone="updateEndTimezone"
@toggle-all-day="toggleAllDay" />
<PropertySelectAjax class="property-location"
url="/apps/gestion/ajaxGetClientsName"
:is-read-only="isReadOnly"
:prop-model="rfcProps.clients"
:value="client"
:linkify-links="true"
@update:value="updateClient" />
<PropertySelectAjax class="property-location"
url="/apps/gestion/ajaxGetLieux"
:is-read-only="isReadOnly"

View File

@ -49,6 +49,9 @@ return [
['name' => 'page#ajaxGetLieux', 'url' => '/ajaxGetLieux', 'verb' => 'GET'],
['name' => 'page#ajaxGetArticles', 'url' => '/ajaxGetArticles', 'verb' => 'GET'],
['name' => 'page#ajaxGetProduits', 'url' => '/ajaxGetProduits', 'verb' => 'GET'],
['name' => 'page#ajaxGetClientsName', 'url' => '/ajaxGetClientsName', 'verb' => 'GET'],
['name' => 'page#ajaxGetThanatopracteurs', 'url' => '/ajaxGetThanatopracteurs', 'verb' => 'GET'],
['name' => 'page#getLieux', 'url' => '/getLieux', 'verb' => 'PROPFIND'],
['name' => 'page#insertLieu', 'url' => '/lieu/insert', 'verb' => 'POST'],

View File

@ -4,6 +4,8 @@
namespace OCA\Gestion\AppInfo;
use OCA\DAV\Events\CalendarObjectCreatedEvent;
use OCA\Gestion\Listener\CalendarObjectCreatedListener;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
@ -18,7 +20,7 @@ class Application extends App implements IBootstrap {
}
public function register(IRegistrationContext $context): void {
$context->registerEventListener(CalendarObjectCreatedEvent::class, CalendarObjectCreatedListener::class);
}
public function boot(IBootContext $context): void {

View File

@ -379,6 +379,14 @@ class PageController extends Controller {
return $this->myDb->getThanatopracteurs($this->idNextcloud);
}
/**
* @NoAdminRequired
* @NoCSRFRequired
*/
public function ajaxGetThanatopracteurs() {
return $this->myDb->getThanatopracteurs($this->idNextcloud);
}
/**
* @NoAdminRequired
* @NoCSRFRequired
@ -1257,6 +1265,14 @@ class PageController extends Controller {
return $this->myDb->getLieux($this->idNextcloud);
}
/**
* @NoAdminRequired
* @NoCSRFRequired
*/
public function ajaxGetClientsName() {
return $this->myDb->getClientsName();
}
/**
* @NoAdminRequired
* @NoCSRFRequired

View File

@ -53,6 +53,13 @@ class Bdd {
return $this->execSQL($sql, array());
}
public function getClientsName(){
$sql = "SELECT client.nom, client.prenom, client.id
FROM ".$this->tableprefix."client as client
ORDER BY client.id DESC";
return $this->execSQL($sql, array());
}
public function getClient($id,$idNextcloud){
$sql = "SELECT * FROM ".$this->tableprefix."client WHERE id = ?";
return $this->execSQL($sql, array($id));
@ -653,6 +660,63 @@ class Bdd {
return true;
}
/**
* Insert Defunt
*/
public function insertDefuntByName($name) {
$sql = "INSERT INTO `".$this->tableprefix."defunt` (
`id_nextcloud`, `nom`, `sexe`, `date_naissance`, `ref_pacemaker`, `date`,
`corpulence`, `observations_corps`, `observations_generales`
) VALUES (?,?,?,?,?,NOW(),?,?,?);";
$this->execSQLNoData($sql, array('admin',$name, 'm', '1973-11-11', 'Référence pacemaker', '', '', ''));
return true;
}
public function insertDefuntByNameAndReturnId($name) {
$this->insertDefuntByName($name);
$sql = "SELECT max(id) as LAST_INSERT_ID
FROM ".$this->tableprefix."defunt
WHERE nom = ?";
$res = $this->execSQLNoJsonReturn($sql,array($name));
if($res){
return $res[0]['LAST_INSERT_ID'];
}
return null;
}
public function getLastClientIdByName($name) {
$sql = "SELECT max(id) as LAST_INSERT_ID
FROM ".$this->tableprefix."client
WHERE nom = ?";
$res = $this->execSQLNoJsonReturn($sql,array($name));
if($res){
return $res[0]['LAST_INSERT_ID'];
}
return null;
}
public function getLastLocationIdByName($name) {
$sql = "SELECT max(id) as LAST_INSERT_ID
FROM ".$this->tableprefix."lieu
WHERE nom = ?";
$res = $this->execSQLNoJsonReturn($sql,array($name));
if($res){
return $res[0]['LAST_INSERT_ID'];
}
return null;
}
public function getLastThanatoIdByName($name) {
$sql = "SELECT max(id) as LAST_INSERT_ID
FROM ".$this->tableprefix."thanato
WHERE nom = ?";
$res = $this->execSQLNoJsonReturn($sql,array($name));
if($res){
return $res[0]['LAST_INSERT_ID'];
}
return null;
}
/**
* Insert lieu
*/
@ -709,6 +773,83 @@ class Bdd {
return true;
}
public function insertDevisFromVCalendarAndReturnId($thanatoId,$clientId,$locationId,$defuntId){
$idNextcloud = "admin";
$last=0;
$last = $this->lastinsertid("devis", "admin") + 1;
$sql = "INSERT INTO `".$this->tableprefix."devis` ( `date`,
`id_nextcloud`,
`num`,
`id_defunt`,
`id_client`,
`id_thanato`,
`version`,
`id_lieu`,
`mentions`,
`comment`,
`user_id`
)
VALUES (NOW(),?,?,?,?,?,?,?,?,?,?);";
$this->execSQLNoData($sql, array(
$idNextcloud,
"Nom du defunt",
$defuntId,
$clientId,
$thanatoId,
$this->l->t('New'),
$locationId,
$this->l->t('Mention'),
$this->l->t('Comment'),
$last));
return $this->getLastDevisIdFromVCalendarProperty($thanatoId,$clientId,$locationId,$defuntId);
}
private function getLastDevisIdFromVCalendarProperty($thanatoId,$clientId,$locationId,$defuntId){
$sql = "SELECT max(id) as LAST_INSERT_ID
FROM ".$this->tableprefix."devis
WHERE id_defunt = ? AND id_lieu = ? AND id_client = ? AND id_thanato = ?";
$res = $this->execSQLNoJsonReturn($sql,array(
$defuntId,
$locationId,
$clientId,
$thanatoId
));
if($res){
return $res[0]['LAST_INSERT_ID'];
}
return null;
}
public function getArticlesIdFromArticlesNameArray(array $articles): array {
$articleIds = [];
foreach ($articles as $article) {
$sql = "SELECT id FROM ".$this->tableprefix."article WHERE description = ?";
$res = $this->execSQLNoJsonReturn($sql, array($article));
if ($res) {
$articleIds[] = $res[0]['id'];
}
}
return $articleIds;
}
public function insertDevisArticleFromDevisIdAndArticlesIdArray($devisId, $articleIds) {
if (!empty($articleIds)) {
$idNextcloud = "admin";
foreach ($articleIds as $articleId) {
$this->insertDevisArticle(devisId: $devisId, articleId: $articleId,idNextcloud: $idNextcloud);
}
}
return true;
}
private function insertDevisArticle($devisId,$articleId,$idNextcloud){
$sql = "INSERT INTO ".$this->tableprefix."article_devis (devis_id, article_id, quantite, discount, comment,id_nextcloud) VALUES (?, ?, 1, 0, '-',?)";
$this->execSQLNoData($sql, array($devisId, $articleId,$idNextcloud));
return true;
}
/**
* Insert invoice
*/
@ -859,6 +1000,15 @@ class Bdd {
}
}
public function createDevisTrajetFromVCalendar($devisId){
$idNextcloud = 'admin';
$devis = json_decode($this->getOneDevis($devisId, $idNextcloud))[0];
$this->generate_ligneTrajet($devis, $idNextcloud);
$ligne_trajet = json_decode($this->getOneTrajetdetails_byIdDevis($devis->devisid, $idNextcloud))[0];
$this->range_ligneTrajet($ligne_trajet->id_trajet, $idNextcloud);
$this->calculer_distance_trajet($ligne_trajet->id_trajet, $idNextcloud);
}
/**
* update lieu et date devis
*/

View File

@ -0,0 +1,57 @@
<?php
declare(strict_types=1);
/*
* @copyright 2022 Christoph Wurst <christoph@winzerhof-wurst.at>
*
* @author 2022 Christoph Wurst <christoph@winzerhof-wurst.at>
*
* @license GNU AGPL version 3 or any later version
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace OCA\Gestion\Listener;
use OCA\DAV\Events\CalendarObjectCreatedEvent;
use OCA\Gestion\Service\GestionService;
use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
use Psr\Log\LoggerInterface;
class CalendarObjectCreatedListener implements IEventListener {
/** @var LoggerInterface */
private $logger;
/** @var GestionService */
private $gestionService;
public function __construct(
LoggerInterface $logger,GestionService $gestionService) {
$this->logger = $logger;
$this->gestionService = $gestionService;
}
public function handle(Event $event): void {
if (!($event instanceof CalendarObjectCreatedEvent)) {
return;
}
$calendarData = $event->getObjectData();
$vCalendarString = $calendarData["calendardata"];
$this->gestionService->HandleCreatedCalendarObject($vCalendarString);
}
}

View File

@ -0,0 +1,109 @@
<?php
declare(strict_types=1);
/**
* Calendar App
*
* @copyright 2021 Anna Larch <anna.larch@gmx.net>
*
* @author Anna Larch <anna.larch@gmx.net>
* @author Richard Steinmetz <richard@steinmetz.cloud>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
* License as published by the Free Software Foundation; either
* version 3 of the License, or any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU Affero General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
*/
namespace OCA\Gestion\Service;
use OCA\Gestion\Db\Bdd;
use Psr\Log\LoggerInterface;
class GestionService {
/** @var Bdd */
private $gestionBdd;
/** @var LoggerInterface */
private $logger;
public function __construct(
Bdd $gestionBdd,
LoggerInterface $logger) {
$this->logger = $logger;
$this->gestionBdd = $gestionBdd;
}
private function GetValueFromKeyInVCalendarString(string $key, string $vCalendarString): string
{
$value = "";
preg_match("/$key:(.*)\r\n/", $vCalendarString, $matches);
if (isset($matches[1])) {
$value = trim($matches[1]);
}
return $value;
}
private function GetCalendarSummaryFromVCalendarString(string $vCalendarString): string
{
$summaryValue = "Nom du défunt";
$value = $this->GetValueFromKeyInVCalendarString("SUMMARY", $vCalendarString);
if($value !== ""){
$summaryValue = trim($value);
}
return $summaryValue;
}
public function HandleCreatedCalendarObject(string $vCalendarString){
$calendarSummary = $this->GetCalendarSummaryFromVCalendarString($vCalendarString);
$defuntId = $this->gestionBdd->insertDefuntByNameAndReturnId($calendarSummary);
$clientId = $this->GetClientIdFromVCalendarString($vCalendarString);
$locationId = $this->GetLocationIdFromVCalendarString($vCalendarString);
$thanatoId = $this->GetThanatoIdFromVCalendarString($vCalendarString);key:
$devisId = $this->gestionBdd->insertDevisFromVCalendarAndReturnId($thanatoId,$clientId,$locationId,$defuntId);
$articlesValue = $this->GetArticlesNameFromVCalendarString($vCalendarString);
if(!empty($articlesValue)){
$articlesId = $this->gestionBdd->getArticlesIdFromArticlesNameArray($articlesValue);
$this->gestionBdd->insertDevisArticleFromDevisIdAndArticlesIdArray($devisId, $articlesId);
$this->gestionBdd->createDevisTrajetFromVCalendar($devisId);
}
}
private function GetClientIdFromVCalendarString(string $vCalendarString){
$clientValue = $this->GetValueFromKeyInVCalendarString("CLIENT", $vCalendarString);
$clientId = $this->gestionBdd->getLastClientIdByName(name: $clientValue) ?? 0;
return $clientId;
}
private function GetLocationIdFromVCalendarString(string $vCalendarString){
$locationValue = $this->GetValueFromKeyInVCalendarString("LOCATION", $vCalendarString);
$locationId = $this->gestionBdd->getLastLocationIdByName($locationValue)?? 0;
return $locationId;
}
private function GetThanatoIdFromVCalendarString(string $vCalendarString){
$thanatoValue = $this->GetValueFromKeyInVCalendarString("EMBALMER", $vCalendarString);
$thanatoId = $this->gestionBdd->getLastThanatoIdByName($thanatoValue) ?? 0;
return $thanatoId;
}
private function GetArticlesNameFromVCalendarString(string $vCalendarString): array {
$devisArticleValue = $this->GetValueFromKeyInVCalendarString("DESCRIPTION", $vCalendarString);
$this->logger->debug('LIST OF ARTICLES',["" => $devisArticleValue]);
$articles = explode('\;', $devisArticleValue);
$mapped = array_map('trim', $articles);
$this->logger->debug('LIST OF ARTICLES',$mapped);
return $mapped;
}
}