update calendar features to H2F
This commit is contained in:
parent
0d5dba82fb
commit
4d0b220a11
@ -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":"b70c315d43924cf28e02","vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8":"290f7a6dcecead54b4db","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"57f3e24b6f63561c43e0","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":"7bde6f386631234ba146","vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8":"2e0b0e8bc0e8488c397c","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"728c782d2751f8e6150a","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=33645c11c83fb0efebcb
|
||||
//# sourceMappingURL=calendar-appointments-booking.js.map?v=b7719d864afe6419c183
|
||||
File diff suppressed because one or more lines are too long
@ -37516,4 +37516,4 @@ const booking = (0,_nextcloud_initial_state__WEBPACK_IMPORTED_MODULE_1__.loadSta
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=calendar-appointments-confirmation.js.map?v=7972917bd202ca1f10b9
|
||||
//# sourceMappingURL=calendar-appointments-confirmation.js.map?v=e09415d738d19b735882
|
||||
File diff suppressed because one or more lines are too long
@ -37552,4 +37552,4 @@ const booking = (0,_nextcloud_initial_state__WEBPACK_IMPORTED_MODULE_1__.loadSta
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=calendar-appointments-conflict.js.map?v=5598f906629cead96b94
|
||||
//# sourceMappingURL=calendar-appointments-conflict.js.map?v=203b5778e2275f51e478
|
||||
File diff suppressed because one or more lines are too long
@ -160605,4 +160605,4 @@ vue__WEBPACK_IMPORTED_MODULE_5__["default"].prototype.$n = _nextcloud_l10n__WEBP
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=calendar-appointments-overview.js.map?v=083cf88f751169dcba78
|
||||
//# sourceMappingURL=calendar-appointments-overview.js.map?v=11949b799a3d070cc45a
|
||||
File diff suppressed because one or more lines are too long
@ -500,4 +500,4 @@ if(false) {}
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
//# sourceMappingURL=calendar-dashboard-lazy.js.map?v=173cc8b933d97acb8d15
|
||||
//# sourceMappingURL=calendar-dashboard-lazy.js.map?v=0dd354a2fd4b9e38ddcf
|
||||
File diff suppressed because one or more lines are too long
@ -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":"b70c315d43924cf28e02","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":"a05d4be7db8074129155","vendors-node_modules_nextcloud_vue-dashboard_dist_vue-dashboard_js-node_modules_css-loader_di-9e6f3d":"ce406a3daa36b3f00bbd","src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790":"94fac30d128df46a89a6","src_store_index_js":"35fe7fb5d199fb22a689","src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258":"740a2859d1f364b508c1","dashboard-lazy":"173cc8b933d97acb8d15","vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8":"290f7a6dcecead54b4db","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"57f3e24b6f63561c43e0","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":"7bde6f386631234ba146","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":"273df538e0dc19672feb","vendors-node_modules_nextcloud_vue-dashboard_dist_vue-dashboard_js-node_modules_css-loader_di-9e6f3d":"86eaa619747854c0da61","src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790":"94fac30d128df46a89a6","src_store_index_js":"8e651e1007c1cc1d62d0","src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258":"740a2859d1f364b508c1","dashboard-lazy":"0dd354a2fd4b9e38ddcf","vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8":"2e0b0e8bc0e8488c397c","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"728c782d2751f8e6150a","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=0b685ac8c33d924cbf7b
|
||||
//# sourceMappingURL=calendar-dashboard.js.map?v=561bba8d5d28f5eebd8f
|
||||
File diff suppressed because one or more lines are too long
@ -32474,7 +32474,8 @@ const actions = {
|
||||
const calendarObject = state.calendarObject;
|
||||
(0,_utils_alarms_js__WEBPACK_IMPORTED_MODULE_5__.updateAlarms)(eventComponent);
|
||||
(0,_services_talkService_js__WEBPACK_IMPORTED_MODULE_13__.updateTalkParticipants)(eventComponent);
|
||||
if (eventComponent.isDirty()) {
|
||||
let additionalFieldWasUpdated = eventComponent.client != null;
|
||||
if (eventComponent.isDirty() || additionalFieldWasUpdated) {
|
||||
const isForkedItem = eventComponent.primaryItem !== null;
|
||||
let original = null;
|
||||
let fork = null;
|
||||
@ -33376,12 +33377,22 @@ const actions = {
|
||||
} = _ref8;
|
||||
let eventComponent = calendarObject.calendarComponent.getFirstComponent('VEVENT');
|
||||
if (calendarObject.existsOnServer) {
|
||||
calendarObject.dav.data = calendarObject.calendarComponent.toICS();
|
||||
let icsValue = calendarObject.calendarComponent.toICS();
|
||||
if (eventComponent != null) {
|
||||
if (eventComponent.client != null) {
|
||||
let newClientKeyValue = "CLIENT:" + eventComponent.client;
|
||||
icsValue = icsValue.replace(/CLIENT:\d+/, newClientKeyValue);
|
||||
}
|
||||
}
|
||||
calendarObject.dav.data = icsValue;
|
||||
await calendarObject.dav.update();
|
||||
context.commit('addCalendarObjectIdToAllTimeRangesOfCalendar', {
|
||||
calendarId: calendarObject.calendarId,
|
||||
calendarObjectId: calendarObject.id
|
||||
});
|
||||
context.commit('resetCalendarObjectToDav', {
|
||||
calendarObject
|
||||
});
|
||||
context.commit('incrementModificationCount');
|
||||
return;
|
||||
// TODO - catch conflicts
|
||||
@ -309737,7 +309748,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":"b70c315d43924cf28e02","vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8":"290f7a6dcecead54b4db","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"57f3e24b6f63561c43e0","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","public-calendar-subscription-picker":"3abddc6cf2aada41095d","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":"7bde6f386631234ba146","vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8":"2e0b0e8bc0e8488c397c","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"728c782d2751f8e6150a","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","public-calendar-subscription-picker":"9168fca99a878d4c37e3","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] + "";
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
@ -310042,4 +310053,4 @@ appointmentsConfigsStore.addInitialConfigs((0,_nextcloud_initial_state__WEBPACK_
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=calendar-main.js.map?v=aee16081822c9ddf30f9
|
||||
//# sourceMappingURL=calendar-main.js.map?v=8a26d47f5b506167ce1b
|
||||
File diff suppressed because one or more lines are too long
@ -369,4 +369,4 @@ module.exports = /*#__PURE__*/JSON.parse('[{"country":"Algeria","filename":"Alge
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
//# sourceMappingURL=calendar-public-calendar-subscription-picker.js.map?v=3abddc6cf2aada41095d
|
||||
//# sourceMappingURL=calendar-public-calendar-subscription-picker.js.map?v=9168fca99a878d4c37e3
|
||||
File diff suppressed because one or more lines are too long
@ -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":"b70c315d43924cf28e02","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":"290f7a6dcecead54b4db","vendors-node_modules_vue-material-design-icons_CalendarBlankOutline_vue-node_modules_nextclou-4adead":"a05d4be7db8074129155","vendors-node_modules_autosize_dist_autosize_esm_js-node_modules_html-entities_lib_index_js-no-4072c5":"2d0f50875cdbabc38e4b","src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790":"94fac30d128df46a89a6","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":"832bad2f91d7bbf297e5","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":"57f3e24b6f63561c43e0","node_modules_nextcloud_dialogs_dist_legacy_mjs":"8be838e4c6e9aae56c87","vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-8ibBgPg__mjs":"ea54a36450de178d1141","public-calendar-subscription-picker":"3abddc6cf2aada41095d","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":"7bde6f386631234ba146","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":"2e0b0e8bc0e8488c397c","vendors-node_modules_vue-material-design-icons_CalendarBlankOutline_vue-node_modules_nextclou-4adead":"273df538e0dc19672feb","vendors-node_modules_autosize_dist_autosize_esm_js-node_modules_html-entities_lib_index_js-no-4072c5":"56373f2063898525e8de","src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790":"94fac30d128df46a89a6","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":"70f973572631ebf61374","vendors-node_modules_webdav_dist_web_index_js":"454da8f908d41b47c607","src_store_index_js":"8e651e1007c1cc1d62d0","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"728c782d2751f8e6150a","node_modules_nextcloud_dialogs_dist_legacy_mjs":"8be838e4c6e9aae56c87","vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-8ibBgPg__mjs":"ea54a36450de178d1141","public-calendar-subscription-picker":"9168fca99a878d4c37e3","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] + "";
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
@ -9115,4 +9115,4 @@ __webpack_require__.p = (0,_nextcloud_router__WEBPACK_IMPORTED_MODULE_1__.linkTo
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=calendar-reference.js.map?v=fe9ebb278e638101a795
|
||||
//# sourceMappingURL=calendar-reference.js.map?v=f0917e7f93f4ffd7ea47
|
||||
File diff suppressed because one or more lines are too long
@ -3650,7 +3650,8 @@ const actions = {
|
||||
const calendarObject = state.calendarObject;
|
||||
(0,_utils_alarms_js__WEBPACK_IMPORTED_MODULE_5__.updateAlarms)(eventComponent);
|
||||
(0,_services_talkService_js__WEBPACK_IMPORTED_MODULE_13__.updateTalkParticipants)(eventComponent);
|
||||
if (eventComponent.isDirty()) {
|
||||
let additionalFieldWasUpdated = eventComponent.client != null;
|
||||
if (eventComponent.isDirty() || additionalFieldWasUpdated) {
|
||||
const isForkedItem = eventComponent.primaryItem !== null;
|
||||
let original = null;
|
||||
let fork = null;
|
||||
@ -4551,12 +4552,22 @@ const actions = {
|
||||
} = _ref8;
|
||||
let eventComponent = calendarObject.calendarComponent.getFirstComponent('VEVENT');
|
||||
if (calendarObject.existsOnServer) {
|
||||
calendarObject.dav.data = calendarObject.calendarComponent.toICS();
|
||||
let icsValue = calendarObject.calendarComponent.toICS();
|
||||
if (eventComponent != null) {
|
||||
if (eventComponent.client != null) {
|
||||
let newClientKeyValue = "CLIENT:" + eventComponent.client;
|
||||
icsValue = icsValue.replace(/CLIENT:\d+/, newClientKeyValue);
|
||||
}
|
||||
}
|
||||
calendarObject.dav.data = icsValue;
|
||||
await calendarObject.dav.update();
|
||||
context.commit('addCalendarObjectIdToAllTimeRangesOfCalendar', {
|
||||
calendarId: calendarObject.calendarId,
|
||||
calendarObjectId: calendarObject.id
|
||||
});
|
||||
context.commit('resetCalendarObjectToDav', {
|
||||
calendarObject
|
||||
});
|
||||
context.commit('incrementModificationCount');
|
||||
return;
|
||||
// TODO - catch conflicts
|
||||
@ -8102,4 +8113,4 @@ function getLinkToConfig(key) {
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
//# sourceMappingURL=calendar-src_store_index_js.js.map?v=35fe7fb5d199fb22a689
|
||||
//# sourceMappingURL=calendar-src_store_index_js.js.map?v=8e651e1007c1cc1d62d0
|
||||
File diff suppressed because one or more lines are too long
@ -27321,4 +27321,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=832bad2f91d7bbf297e5
|
||||
//# sourceMappingURL=calendar-src_views_Calendar_vue-data_image_svg_xml_3csvg_20xmlns_27http_www_w3_org_2000_svg_27_20heigh-4a4254.js.map?v=70f973572631ebf61374
|
||||
File diff suppressed because one or more lines are too long
@ -42554,4 +42554,4 @@ function hasInjectionContext() {
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
//# sourceMappingURL=calendar-vendors-node_modules_autosize_dist_autosize_esm_js-node_modules_html-entities_lib_index_js-no-4072c5.js.map?v=2d0f50875cdbabc38e4b
|
||||
//# sourceMappingURL=calendar-vendors-node_modules_autosize_dist_autosize_esm_js-node_modules_html-entities_lib_index_js-no-4072c5.js.map?v=56373f2063898525e8de
|
||||
File diff suppressed because one or more lines are too long
@ -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=b70c315d43924cf28e02
|
||||
//# sourceMappingURL=calendar-vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981.js.map?v=7bde6f386631234ba146
|
||||
File diff suppressed because one or more lines are too long
@ -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=ce406a3daa36b3f00bbd
|
||||
//# sourceMappingURL=calendar-vendors-node_modules_nextcloud_vue-dashboard_dist_vue-dashboard_js-node_modules_css-loader_di-9e6f3d.js.map?v=86eaa619747854c0da61
|
||||
File diff suppressed because one or more lines are too long
@ -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=57f3e24b6f63561c43e0
|
||||
//# sourceMappingURL=calendar-vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f.js.map?v=728c782d2751f8e6150a
|
||||
File diff suppressed because one or more lines are too long
@ -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=a05d4be7db8074129155
|
||||
//# sourceMappingURL=calendar-vendors-node_modules_vue-material-design-icons_CalendarBlankOutline_vue-node_modules_nextclou-4adead.js.map?v=273df538e0dc19672feb
|
||||
File diff suppressed because one or more lines are too long
@ -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=290f7a6dcecead54b4db
|
||||
//# sourceMappingURL=calendar-vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8.js.map?v=2e0b0e8bc0e8488c397c
|
||||
File diff suppressed because one or more lines are too long
@ -1687,8 +1687,9 @@ const actions = {
|
||||
|
||||
updateAlarms(eventComponent)
|
||||
updateTalkParticipants(eventComponent)
|
||||
|
||||
if (eventComponent.isDirty()) {
|
||||
let additionalFieldWasUpdated =
|
||||
eventComponent.client != null;
|
||||
if (eventComponent.isDirty() || additionalFieldWasUpdated) {
|
||||
const isForkedItem = eventComponent.primaryItem !== null
|
||||
let original = null
|
||||
let fork = null
|
||||
|
||||
@ -226,12 +226,20 @@ const actions = {
|
||||
async updateCalendarObject(context, { calendarObject }) {
|
||||
let eventComponent = calendarObject.calendarComponent.getFirstComponent('VEVENT');
|
||||
if (calendarObject.existsOnServer) {
|
||||
calendarObject.dav.data = calendarObject.calendarComponent.toICS()
|
||||
let icsValue = calendarObject.calendarComponent.toICS();
|
||||
if(eventComponent != null){
|
||||
if(eventComponent.client != null){
|
||||
let newClientKeyValue = "CLIENT:"+eventComponent.client;
|
||||
icsValue = icsValue.replace(/CLIENT:\d+/, newClientKeyValue);
|
||||
}
|
||||
}
|
||||
calendarObject.dav.data = icsValue;
|
||||
await calendarObject.dav.update()
|
||||
context.commit('addCalendarObjectIdToAllTimeRangesOfCalendar', {
|
||||
calendarId: calendarObject.calendarId,
|
||||
calendarObjectId: calendarObject.id,
|
||||
})
|
||||
context.commit('resetCalendarObjectToDav', { calendarObject })
|
||||
context.commit('incrementModificationCount')
|
||||
return
|
||||
// TODO - catch conflicts
|
||||
|
||||
@ -6,8 +6,10 @@ namespace OCA\Gestion\AppInfo;
|
||||
|
||||
use OCA\DAV\Events\CalendarObjectCreatedEvent;
|
||||
use OCA\DAV\Events\CalendarObjectMovedToTrashEvent;
|
||||
use OCA\DAV\Events\CalendarObjectUpdatedEvent;
|
||||
use OCA\Gestion\Listener\CalendarObjectCreatedListener;
|
||||
use OCA\Gestion\Listener\CalendarObjectMovedToTrashListener;
|
||||
use OCA\Gestion\Listener\CalendarObjectUpdatedListener;
|
||||
use OCP\AppFramework\App;
|
||||
use OCP\AppFramework\Bootstrap\IBootstrap;
|
||||
use OCP\AppFramework\Bootstrap\IRegistrationContext;
|
||||
@ -24,6 +26,7 @@ class Application extends App implements IBootstrap {
|
||||
public function register(IRegistrationContext $context): void {
|
||||
$context->registerEventListener(CalendarObjectCreatedEvent::class, CalendarObjectCreatedListener::class);
|
||||
$context->registerEventListener(CalendarObjectMovedToTrashEvent::class, CalendarObjectMovedToTrashListener::class);
|
||||
$context->registerEventListener(CalendarObjectUpdatedEvent::class, CalendarObjectUpdatedListener::class);
|
||||
}
|
||||
|
||||
public function boot(IBootContext $context): void {
|
||||
|
||||
@ -2709,4 +2709,101 @@ class Bdd {
|
||||
$this->execSQLNoData($sql,[DevisMentionConstant::CANCELED,$devisId]);
|
||||
}
|
||||
|
||||
public function updateDevisMention(int $devisId,string $mention){
|
||||
$sql = "UPDATE ".$this->tableprefix."devis as devis
|
||||
SET devis.mentions = ?
|
||||
WHERE devis.id = ?;";
|
||||
$this->execSQLNoData($sql,[$mention,$devisId]);
|
||||
}
|
||||
|
||||
public function getProduitDevisByDevisId($devisId){
|
||||
$sql = "SELECT *
|
||||
FROM ".$this->tableprefix ."produit_devis as produit_devis
|
||||
WHERE produit_devis.devis_id = ?;";
|
||||
|
||||
$produitDevisList = $this->execSQLNoJsonReturn(
|
||||
$sql,
|
||||
[$devisId]);
|
||||
|
||||
|
||||
return $produitDevisList;
|
||||
}
|
||||
|
||||
private function updateDefuntByName($defuntId,$requestedDefuntName){
|
||||
$sql= "UPDATE ".$this->tableprefix."defunt as defunt
|
||||
SET defunt.nom = ?
|
||||
WHERE defunt.id = ?";
|
||||
$this->execSQLNoData($sql,[$requestedDefuntName,$defuntId]);
|
||||
}
|
||||
|
||||
public function createOrUpdateDefuntByNameAndReturnDefuntId($defuntId,$currentDefuntName,$requestedDefuntName){
|
||||
if($defuntId != null){
|
||||
$defuntNameIsUpdated = $currentDefuntName != $requestedDefuntName;
|
||||
if($defuntNameIsUpdated){
|
||||
$this->updateDefuntByName($defuntId,$requestedDefuntName);
|
||||
}
|
||||
}
|
||||
else{
|
||||
$this->insertDefuntByName($requestedDefuntName);
|
||||
$defunt = $this->getLastDefuntIdByName($requestedDefuntName);
|
||||
$defuntId = $defunt['id'];
|
||||
}
|
||||
return $defuntId;
|
||||
}
|
||||
|
||||
public function updateDevisDefunt($devisId,$requestedDefuntId,$currentDefuntId = null){
|
||||
$defuntIsUpdated = $currentDefuntId != $requestedDefuntId;
|
||||
if($defuntIsUpdated){
|
||||
$sql= "UPDATE ".$this->tableprefix."devis as devis
|
||||
SET devis.id_defunt = ?
|
||||
WHERE devis.id = ?";
|
||||
$this->execSQLNoData($sql,[$requestedDefuntId,$devisId]);
|
||||
}
|
||||
}
|
||||
|
||||
public function updateDevisClient($devisId,$requestedClientId,$currentClientId = null){
|
||||
$clientIsUpdated = $currentClientId != $requestedClientId;
|
||||
if($clientIsUpdated){
|
||||
$sql= "UPDATE ".$this->tableprefix."devis as devis
|
||||
SET devis.id_client = ?
|
||||
WHERE devis.id = ?";
|
||||
$this->execSQLNoData($sql,[$requestedClientId,$devisId]);
|
||||
}
|
||||
}
|
||||
|
||||
public function updateDevisLieu($devisId,$requestedLieuId,$currentLieuId = null){
|
||||
$lieuIsUpdated = $currentLieuId != $requestedLieuId;
|
||||
if($lieuIsUpdated){
|
||||
$sql= "UPDATE ".$this->tableprefix."devis as devis
|
||||
SET devis.id_lieu = ?
|
||||
WHERE devis.id = ?";
|
||||
$this->execSQLNoData($sql,[$requestedLieuId,$devisId]);
|
||||
}
|
||||
}
|
||||
|
||||
public function deleteDevisProduit($devisProductId){
|
||||
$sql = "DELETE FROM ".$this->tableprefix."produit_devis WHERE id = ?;";
|
||||
$this->execSQLNoData($sql, array($devisProductId));
|
||||
}
|
||||
|
||||
public function updateDevisArticles($devisId,$requestedArticlesIds){
|
||||
$currentDevisProducts = $this->getDevisProduits($devisId);
|
||||
$currentDevisProduitIds = [];
|
||||
//delete old product
|
||||
foreach($currentDevisProducts as $devisProduct){
|
||||
$currentDevisProduitIds[] = $devisProduct['produit_id'];
|
||||
$currentProductIsNotPartOfRequestedDevisProduct = !in_array($devisProduct['produit_id'],$requestedArticlesIds);
|
||||
if($currentProductIsNotPartOfRequestedDevisProduct){
|
||||
$this->deleteDevisProduit($devisProduct['id']);
|
||||
}
|
||||
}
|
||||
//add new requested product
|
||||
foreach($requestedArticlesIds as $requestedArticleId){
|
||||
$currentRequestedArticleIsNewArticleForDevis = !in_array($requestedArticleId,$currentDevisProduitIds);
|
||||
if($currentRequestedArticleIsNewArticleForDevis){
|
||||
$this->insertDevisArticle(devisId: $devisId, articleId: $requestedArticleId,idNextcloud: BddConstant::DEFAULT_ADMIN_ID_NEXTCLOUD);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
58
gestion/lib/Listener/CalendarObjectUpdatedListener.php
Normal file
58
gestion/lib/Listener/CalendarObjectUpdatedListener.php
Normal file
@ -0,0 +1,58 @@
|
||||
<?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\DAV\Events\CalendarObjectUpdatedEvent;
|
||||
use OCA\Gestion\Service\GestionService;
|
||||
use OCP\EventDispatcher\Event;
|
||||
use OCP\EventDispatcher\IEventListener;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class CalendarObjectUpdatedListener 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 CalendarObjectUpdatedEvent)) {
|
||||
return;
|
||||
}
|
||||
$calendarData = $event->getObjectData();
|
||||
$vCalendarString = $calendarData["calendardata"];
|
||||
$this->gestionService->HandleUpdatedCalendarObject($vCalendarString);
|
||||
}
|
||||
|
||||
}
|
||||
@ -26,6 +26,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace OCA\Gestion\Service;
|
||||
|
||||
use OCA\Gestion\Constants\DevisMentionConstant;
|
||||
use OCA\Gestion\Constants\ThanatoTypeConstant;
|
||||
use OCA\Gestion\Db\Bdd;
|
||||
use OCA\Gestion\Db\OrderBdd;
|
||||
@ -255,4 +256,57 @@ class GestionService {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private function CheckIfDevisIsAlreadyUpdated($devis,$vCalendarString){
|
||||
$requestedDefuntName = $this->GetCalendarSummaryFromVCalendarString($vCalendarString);
|
||||
$requestedClientId = $this->GetClientIdFromVCalendarString($vCalendarString);
|
||||
$requestLocationId = $this->GetLocationIdFromVCalendarString($vCalendarString);
|
||||
$requestedArticleReferences = $this->GetArticlesNameFromVCalendarString($vCalendarString);
|
||||
$requestedArticleIds = $this->gestionBdd->getArticleIdsByArticleReferences($requestedArticleReferences);
|
||||
$articleDevis = $this->gestionBdd->getProduitDevisByDevisId($devis['id']);
|
||||
$articleDevisIds = [];
|
||||
foreach($articleDevis as $currentArticleDevis){
|
||||
$articleDevisIds[] = $currentArticleDevis['produit_id'];
|
||||
}
|
||||
sort($requestedArticleIds);
|
||||
sort($articleDevisIds);
|
||||
|
||||
return
|
||||
$devis['defunt_nom'] == $requestedDefuntName &&
|
||||
$devis['client_id'] == $requestedClientId &&
|
||||
$devis['lieu_id'] == $requestLocationId &&
|
||||
$requestedArticleIds == $articleDevisIds;
|
||||
}
|
||||
|
||||
private function UpdateDevisDataByVCalendarString($devis,$vCalendarString){
|
||||
$requestedDefuntName = $this->GetCalendarSummaryFromVCalendarString($vCalendarString);
|
||||
$defuntId = $this->gestionBdd->createOrUpdateDefuntByNameAndReturnDefuntId($devis['defunt_id'],$devis['defunt_nom'],$requestedDefuntName);
|
||||
$this->gestionBdd->updateDevisDefunt($devis['id'],$defuntId,$devis['defunt_id']);
|
||||
|
||||
$requestedClientId = $this->GetClientIdFromVCalendarString($vCalendarString);
|
||||
$this->gestionBdd->updateDevisClient($devis['id'],$requestedClientId,$devis['client_id']);
|
||||
|
||||
$requestLocationId = $this->GetLocationIdFromVCalendarString($vCalendarString);
|
||||
$this->gestionBdd->updateDevisLieu($devis['id'],$requestLocationId,$devis['lieu_id']);
|
||||
|
||||
$articlesValue = $this->GetArticlesNameFromVCalendarString($vCalendarString);
|
||||
if(!empty($articlesValue)){
|
||||
$articleIds = $this->gestionBdd->getArticleIdsByArticleReferences($articlesValue);
|
||||
$this->gestionBdd->updateDevisArticles($devis['id'],$articleIds);
|
||||
}
|
||||
}
|
||||
|
||||
public function HandleUpdatedCalendarObject(string $vCalendarString){
|
||||
$calendarUuid = $this->GetCalendarUuidFromVCalendarString($vCalendarString);
|
||||
$devis = $this->gestionBdd->getDevisByCalendarUuid($calendarUuid);
|
||||
if($devis != null){
|
||||
$this->gestionBdd->updateDevisMention($devis['id'],DevisMentionConstant::NEW);
|
||||
$isDevisAlreadyUpdated = $this->CheckIfDevisIsAlreadyUpdated($devis,$vCalendarString);
|
||||
if($isDevisAlreadyUpdated){
|
||||
return true;
|
||||
}
|
||||
$this->UpdateDevisDataByVCalendarString($devis,$vCalendarString);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user