Add comment functionality to calendar events

This commit is contained in:
Tiavina 2025-03-26 11:04:19 +03:00
parent 5cd273b102
commit 6a3123f262
25 changed files with 788 additions and 458 deletions

View File

@ -1322,7 +1322,7 @@ function b(n) {
/******/ // This function allow to reference async chunks /******/ // This function allow to reference async chunks
/******/ __webpack_require__.u = (chunkId) => { /******/ __webpack_require__.u = (chunkId) => {
/******/ // return url for filenames based on template /******/ // 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":"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":"2c493e91e10998374f26","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] + ""; /******/ 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":"d2880e4c429713e99f7b","src_store_index_js":"ec20095566748d2f9a12","src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258":"4ec4f960e50da6a1f2cd","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=dd38cbbf6ed249c6c393 //# sourceMappingURL=calendar-dashboard.js.map?v=2371ba620d81923138d4

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

@ -8865,7 +8865,7 @@ window._registerCustomPickerElement = _;
/******/ // This function allow to reference async chunks /******/ // This function allow to reference async chunks
/******/ __webpack_require__.u = (chunkId) => { /******/ __webpack_require__.u = (chunkId) => {
/******/ // return url for filenames based on template /******/ // 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":"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":"925781d9db1ffc96ba17","vendors-node_modules_webdav_dist_web_index_js":"454da8f908d41b47c607","src_store_index_js":"2c493e91e10998374f26","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] + ""; /******/ 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":"d2880e4c429713e99f7b","src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258":"4ec4f960e50da6a1f2cd","src_views_Calendar_vue-data_image_svg_xml_3csvg_20xmlns_27http_www_w3_org_2000_svg_27_20heigh-4a4254":"cd8a0993186cf9d527b6","vendors-node_modules_webdav_dist_web_index_js":"454da8f908d41b47c607","src_store_index_js":"ec20095566748d2f9a12","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=4bcb22310f859b1ac0ab //# sourceMappingURL=calendar-reference.js.map?v=f439930f77db72082fe9

File diff suppressed because one or more lines are too long

View File

@ -123,6 +123,7 @@ function eventSourceFunction(calendarObjects, calendar, start, end, timezone) {
title += " (".concat(object.percent, "%)"); title += " (".concat(object.percent, "%)");
} }
} }
console.log(OC.currentUser.uid);
const fcEvent = { const fcEvent = {
id: [calendarObject.id, object.id].join('###'), id: [calendarObject.id, object.id].join('###'),
title, title,
@ -1032,4 +1033,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=740a2859d1f364b508c1 //# sourceMappingURL=calendar-src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258.js.map?v=4ec4f960e50da6a1f2cd

View File

@ -316,6 +316,15 @@ const getRFCProperties = () => {
placeholder: (0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_0__.translate)('calendar', 'Choisir les soins'), placeholder: (0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_0__.translate)('calendar', 'Choisir les soins'),
tagPlaceholder: (0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_0__.translate)('calendar', 'Choisir les soins'), tagPlaceholder: (0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_0__.translate)('calendar', 'Choisir les soins'),
options: [] options: []
},
comment: {
readableName: (0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_0__.translate)('calendar', 'Comment'),
icon: 'TextBoxOutline',
info: (0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_0__.translate)('calendar', 'Commentaires.'),
placeholder: (0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_0__.translate)('calendar', 'Commentaires'),
tagPlaceholder: (0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_0__.translate)('calendar', 'Commentaires'),
options: [],
defaultNumberOfRows: 4
} }
}; };
}; };
@ -1817,4 +1826,4 @@ function GenColors(steps) {
/***/ }) /***/ })
}]); }]);
//# sourceMappingURL=calendar-src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790.js.map?v=94fac30d128df46a89a6 //# sourceMappingURL=calendar-src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790.js.map?v=d2880e4c429713e99f7b

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -14371,6 +14371,16 @@ var render = function render() {
"add-single-value": _vm.addArticle, "add-single-value": _vm.addArticle,
"remove-single-value": _vm.removeArticle "remove-single-value": _vm.removeArticle
} }
}), _vm._v(" "), _c("PropertyText", {
attrs: {
"is-read-only": _vm.isReadOnly,
"prop-model": _vm.rfcProps.comment,
value: _vm.comment,
"linkify-links": false
},
on: {
"update:value": _vm.updateComment
}
}), _vm._v(" "), _c("InviteesList", { }), _vm._v(" "), _c("InviteesList", {
staticClass: "event-popover__invitees", staticClass: "event-popover__invitees",
attrs: { attrs: {
@ -16893,14 +16903,23 @@ __webpack_require__.r(__webpack_exports__);
var _this$calendarObjectI8, _this$calendarObjectI9; 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; 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 comment or null if the event is still loading
*
* @return {string|null}
*/
comment() {
var _this$calendarObjectI10, _this$calendarObjectI11;
return (_this$calendarObjectI10 = (_this$calendarObjectI11 = this.calendarObjectInstance) === null || _this$calendarObjectI11 === void 0 ? void 0 : _this$calendarObjectI11.comment) !== null && _this$calendarObjectI10 !== void 0 ? _this$calendarObjectI10 : null;
},
/** /**
* Returns the description or null if the event is still loading * Returns the description or null if the event is still loading
* *
* @return {string|null} * @return {string|null}
*/ */
description() { description() {
var _this$calendarObjectI10, _this$calendarObjectI11; var _this$calendarObjectI12, _this$calendarObjectI13;
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; return (_this$calendarObjectI12 = (_this$calendarObjectI13 = this.calendarObjectInstance) === null || _this$calendarObjectI13 === void 0 ? void 0 : _this$calendarObjectI13.description) !== null && _this$calendarObjectI12 !== void 0 ? _this$calendarObjectI12 : null;
}, },
/** /**
* Returns the start-date (without timezone) or null if the event is still loading * Returns the start-date (without timezone) or null if the event is still loading
@ -16908,8 +16927,8 @@ __webpack_require__.r(__webpack_exports__);
* @return {Date|null} * @return {Date|null}
*/ */
startDate() { startDate() {
var _this$calendarObjectI12, _this$calendarObjectI13; var _this$calendarObjectI14, _this$calendarObjectI15;
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; return (_this$calendarObjectI14 = (_this$calendarObjectI15 = this.calendarObjectInstance) === null || _this$calendarObjectI15 === void 0 ? void 0 : _this$calendarObjectI15.startDate) !== null && _this$calendarObjectI14 !== void 0 ? _this$calendarObjectI14 : null;
}, },
/** /**
* Returns the timezone of the event's start-date or null if the event is still loading * Returns the timezone of the event's start-date or null if the event is still loading
@ -16917,8 +16936,8 @@ __webpack_require__.r(__webpack_exports__);
* @return {string|null} * @return {string|null}
*/ */
startTimezone() { startTimezone() {
var _this$calendarObjectI14, _this$calendarObjectI15; var _this$calendarObjectI16, _this$calendarObjectI17;
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; return (_this$calendarObjectI16 = (_this$calendarObjectI17 = this.calendarObjectInstance) === null || _this$calendarObjectI17 === void 0 ? void 0 : _this$calendarObjectI17.startTimezoneId) !== null && _this$calendarObjectI16 !== void 0 ? _this$calendarObjectI16 : null;
}, },
/** /**
* Returns the end-date (without timezone) or null if the event is still loading * Returns the end-date (without timezone) or null if the event is still loading
@ -16926,8 +16945,8 @@ __webpack_require__.r(__webpack_exports__);
* @return {Date|null} * @return {Date|null}
*/ */
endDate() { endDate() {
var _this$calendarObjectI16, _this$calendarObjectI17; var _this$calendarObjectI18, _this$calendarObjectI19;
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; return (_this$calendarObjectI18 = (_this$calendarObjectI19 = this.calendarObjectInstance) === null || _this$calendarObjectI19 === void 0 ? void 0 : _this$calendarObjectI19.endDate) !== null && _this$calendarObjectI18 !== void 0 ? _this$calendarObjectI18 : null;
}, },
/** /**
* Returns the timezone of the event's end-date or null if the event is still loading * Returns the timezone of the event's end-date or null if the event is still loading
@ -16935,8 +16954,8 @@ __webpack_require__.r(__webpack_exports__);
* @return {string|null} * @return {string|null}
*/ */
endTimezone() { endTimezone() {
var _this$calendarObjectI18, _this$calendarObjectI19; var _this$calendarObjectI20, _this$calendarObjectI21;
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; return (_this$calendarObjectI20 = (_this$calendarObjectI21 = this.calendarObjectInstance) === null || _this$calendarObjectI21 === void 0 ? void 0 : _this$calendarObjectI21.endTimezoneId) !== null && _this$calendarObjectI20 !== void 0 ? _this$calendarObjectI20 : null;
}, },
/** /**
* Returns whether or not the event is all-day or null if the event is still loading * Returns whether or not the event is all-day or null if the event is still loading
@ -16944,8 +16963,8 @@ __webpack_require__.r(__webpack_exports__);
* @return {boolean} * @return {boolean}
*/ */
isAllDay() { isAllDay() {
var _this$calendarObjectI20, _this$calendarObjectI21; var _this$calendarObjectI22, _this$calendarObjectI23;
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; return (_this$calendarObjectI22 = (_this$calendarObjectI23 = this.calendarObjectInstance) === null || _this$calendarObjectI23 === void 0 ? void 0 : _this$calendarObjectI23.isAllDay) !== null && _this$calendarObjectI22 !== void 0 ? _this$calendarObjectI22 : false;
}, },
/** /**
* Returns whether or not the user is allowed to modify the all-day setting * Returns whether or not the user is allowed to modify the all-day setting
@ -16953,8 +16972,8 @@ __webpack_require__.r(__webpack_exports__);
* @return {boolean} * @return {boolean}
*/ */
canModifyAllDay() { canModifyAllDay() {
var _this$calendarObjectI22, _this$calendarObjectI23; var _this$calendarObjectI24, _this$calendarObjectI25;
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; return (_this$calendarObjectI24 = (_this$calendarObjectI25 = this.calendarObjectInstance) === null || _this$calendarObjectI25 === void 0 ? void 0 : _this$calendarObjectI25.canModifyAllDay) !== null && _this$calendarObjectI24 !== void 0 ? _this$calendarObjectI24 : false;
}, },
/** /**
* Returns the color the illustration should be colored in * Returns the color the illustration should be colored in
@ -16986,8 +17005,8 @@ __webpack_require__.r(__webpack_exports__);
* @return {null | string} * @return {null | string}
*/ */
color() { color() {
var _this$calendarObjectI24, _this$calendarObjectI25; var _this$calendarObjectI26, _this$calendarObjectI27;
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; return (_this$calendarObjectI26 = (_this$calendarObjectI27 = this.calendarObjectInstance) === null || _this$calendarObjectI27 === void 0 ? void 0 : _this$calendarObjectI27.customColor) !== null && _this$calendarObjectI26 !== void 0 ? _this$calendarObjectI26 : null;
}, },
/** /**
* Returns whether or not to display save buttons * Returns whether or not to display save buttons
@ -17110,7 +17129,7 @@ __webpack_require__.r(__webpack_exports__);
* Returns an object with properties from RFCs including * Returns an object with properties from RFCs including
* their displayName, a description, options, etc. * their displayName, a description, options, etc.
* *
* @return {{geo, color, timeTransparency, description, resources, location, client, categories, accessClass, priority, status, locations, articles, clients,embalmer,embalmers}} * @return {{comment, geo, color, timeTransparency, description, resources, location, client, categories, accessClass, priority, status, locations, articles, clients,embalmer,embalmers}}
*/ */
rfcProps() { rfcProps() {
return (0,_models_rfcProps_js__WEBPACK_IMPORTED_MODULE_0__.getRFCProperties)(); return (0,_models_rfcProps_js__WEBPACK_IMPORTED_MODULE_0__.getRFCProperties)();
@ -17372,6 +17391,17 @@ __webpack_require__.r(__webpack_exports__);
location location
}); });
}, },
/**
* Updates the comments of this event
*
* @param {string} comment New comments
*/
updateComment(comment) {
this.$store.commit('changeComment', {
calendarObjectInstance: this.calendarObjectInstance,
comment
});
},
/** /**
* Updates the client of the event * Updates the client of the event
* *
@ -27398,4 +27428,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=925781d9db1ffc96ba17 //# sourceMappingURL=calendar-src_views_Calendar_vue-data_image_svg_xml_3csvg_20xmlns_27http_www_w3_org_2000_svg_27_20heigh-4a4254.js.map?v=cd8a0993186cf9d527b6

View File

@ -119,6 +119,7 @@ export function eventSourceFunction(calendarObjects, calendar, start, end, timez
} }
} }
console.log(OC.currentUser.uid);
const fcEvent = { const fcEvent = {
id: [calendarObject.id, object.id].join('###'), id: [calendarObject.id, object.id].join('###'),
title, title,

View File

@ -118,6 +118,15 @@ export default {
return this.calendarObjectInstance?.embalmer ?? null return this.calendarObjectInstance?.embalmer ?? null
}, },
/**
* Returns the comment or null if the event is still loading
*
* @return {string|null}
*/
comment() {
return this.calendarObjectInstance?.comment ?? null
},
/** /**
* Returns the description or null if the event is still loading * Returns the description or null if the event is still loading
@ -342,7 +351,7 @@ export default {
* Returns an object with properties from RFCs including * Returns an object with properties from RFCs including
* their displayName, a description, options, etc. * their displayName, a description, options, etc.
* *
* @return {{geo, color, timeTransparency, description, resources, location, client, categories, accessClass, priority, status, locations, articles, clients,embalmer,embalmers}} * @return {{comment, geo, color, timeTransparency, description, resources, location, client, categories, accessClass, priority, status, locations, articles, clients,embalmer,embalmers}}
*/ */
rfcProps() { rfcProps() {
return getRFCProperties() return getRFCProperties()
@ -614,6 +623,18 @@ export default {
}) })
}, },
/**
* Updates the comments of this event
*
* @param {string} comment New comments
*/
updateComment(comment) {
this.$store.commit('changeComment', {
calendarObjectInstance: this.calendarObjectInstance,
comment,
})
},
/** /**
* Updates the client of the event * Updates the client of the event
* *

View File

@ -60,6 +60,8 @@ const getDefaultEventObject = (props = {}) => Object.assign({}, {
client : null, client : null,
//embalmer(Thanato) of the event //embalmer(Thanato) of the event
embalmer : null, embalmer : null,
//comment of the event
comment : null,
// description of the event // description of the event
description: null, description: null,
// Access class of the event (PUBLIC, PRIVATE, CONFIDENTIAL) // Access class of the event (PUBLIC, PRIVATE, CONFIDENTIAL)
@ -108,6 +110,7 @@ const mapEventComponentToEventObject = (eventComponent) => {
location: eventComponent.location, location: eventComponent.location,
client : "CLIENT", client : "CLIENT",
embalmer : "TEST", embalmer : "TEST",
comment : "",
description: eventComponent.description, description: eventComponent.description,
accessClass: eventComponent.accessClass, accessClass: eventComponent.accessClass,
status: eventComponent.status, status: eventComponent.status,
@ -201,6 +204,10 @@ const mapEventComponentToEventObject = (eventComponent) => {
eventObject.embalmer = eventComponent.getFirstPropertyFirstValue('EMBALMER'); eventObject.embalmer = eventComponent.getFirstPropertyFirstValue('EMBALMER');
} }
if(eventComponent.hasProperty('COMMENT')){
eventObject.comment = eventComponent.getFirstPropertyFirstValue('COMMENT');
}
return eventObject; return eventObject;
} }
@ -215,6 +222,7 @@ const copyCalendarObjectInstanceIntoEventComponent = (eventObject, eventComponen
eventComponent.location = eventObject.location eventComponent.location = eventObject.location
eventComponent.client = eventObject.client eventComponent.client = eventObject.client
eventComponent.embalmer = eventObject.embalmer eventComponent.embalmer = eventObject.embalmer
eventComponent.comment = eventObject.comment
eventComponent.description = eventObject.description eventComponent.description = eventObject.description
eventComponent.accessClass = eventObject.accessClass eventComponent.accessClass = eventObject.accessClass
eventComponent.status = eventObject.status eventComponent.status = eventObject.status

View File

@ -169,6 +169,15 @@ const getRFCProperties = () => {
tagPlaceholder: t('calendar', 'Choisir les soins'), tagPlaceholder: t('calendar', 'Choisir les soins'),
options: [], options: [],
}, },
comment: {
readableName: t('calendar', 'Comment'),
icon: 'TextBoxOutline',
info: t('calendar', 'Commentaires.'),
placeholder: t('calendar', 'Commentaires'),
tagPlaceholder: t('calendar', 'Commentaires'),
options: [],
defaultNumberOfRows: 4
},
} }
} }

View File

@ -321,6 +321,19 @@ const mutations = {
calendarObjectInstance.location = location calendarObjectInstance.location = location
}, },
/**
* Change the comment 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.comment New comment to set
*/
changeComment(state, { calendarObjectInstance, comment }) {
calendarObjectInstance.eventComponent.comment = comment
calendarObjectInstance.comment = comment
},
/** /**
* Change the client of an event * Change the client of an event
* *
@ -1688,7 +1701,8 @@ const actions = {
updateAlarms(eventComponent) updateAlarms(eventComponent)
updateTalkParticipants(eventComponent) updateTalkParticipants(eventComponent)
let additionalFieldWasUpdated = let additionalFieldWasUpdated =
eventComponent.client != null; eventComponent.client != null ||
eventComponent.comment != null ;
if (eventComponent.isDirty() || additionalFieldWasUpdated) { if (eventComponent.isDirty() || additionalFieldWasUpdated) {
const isForkedItem = eventComponent.primaryItem !== null const isForkedItem = eventComponent.primaryItem !== null
let original = null let original = null

View File

@ -230,7 +230,33 @@ const actions = {
if(eventComponent != null){ if(eventComponent != null){
if(eventComponent.client != null){ if(eventComponent.client != null){
let newClientKeyValue = "CLIENT:"+eventComponent.client; let newClientKeyValue = "CLIENT:"+eventComponent.client;
icsValue = icsValue.replace(/CLIENT:\d+/, newClientKeyValue); let regexEmptyClient = /CLIENT:(?!\d)(?=\s*[\r\n])/g;
if (regexEmptyClient.test(icsValue)) {
icsValue = icsValue.replace(regexEmptyClient, newClientKeyValue);
}
let regex = /CLIENT:\d+/;
if(regex.test(icsValue)){
icsValue = icsValue.replace(regex, newClientKeyValue);
}
else{
const customKeyValue = {
"CLIENT": eventComponent.client
};
icsValue = setCustomKeyValuesArrayToIcsAndReturnIcs(icsValue,customKeyValue);
}
}
if(eventComponent.comment != null){
let newCommentKeyValue = "COMMENT:"+eventComponent.comment;
let regex = /^COMMENT:.*$/m;
if(regex.test(icsValue)){
icsValue = icsValue.replace(regex, newCommentKeyValue);
}
else{
const customKeyValue = {
"COMMENT": eventComponent.comment
};
icsValue = setCustomKeyValuesArrayToIcsAndReturnIcs(icsValue,customKeyValue);
}
} }
} }
calendarObject.dav.data = icsValue; calendarObject.dav.data = icsValue;
@ -247,7 +273,11 @@ const actions = {
const calendar = context.getters.getCalendarById(calendarObject.calendarId) const calendar = context.getters.getCalendarById(calendarObject.calendarId)
let icsValue = calendarObject.calendarComponent.toICS(); let icsValue = calendarObject.calendarComponent.toICS();
if(eventComponent != null){ if(eventComponent != null){
const customKeyValue = {"CLIENT": eventComponent.client, "EMBALMER": eventComponent.embalmer}; const customKeyValue = {
"CLIENT": eventComponent.client,
"EMBALMER": eventComponent.embalmer,
"COMMENT": eventComponent.comment
};
icsValue = setCustomKeyValuesArrayToIcsAndReturnIcs(icsValue,customKeyValue); icsValue = setCustomKeyValuesArrayToIcsAndReturnIcs(icsValue,customKeyValue);
} }
calendarObject.dav = await calendar.dav.createVObject(icsValue); calendarObject.dav = await calendar.dav.createVObject(icsValue);

View File

@ -129,6 +129,13 @@
@add-single-value="addArticle" @add-single-value="addArticle"
@remove-single-value="removeArticle" /> @remove-single-value="removeArticle" />
<PropertyText
:is-read-only="isReadOnly"
:prop-model="rfcProps.comment"
:value="comment"
:linkify-links="false"
@update:value="updateComment" />
<InvitationResponseButtons v-if="isViewedByAttendee" <InvitationResponseButtons v-if="isViewedByAttendee"
:attendee="userAsAttendee" :attendee="userAsAttendee"
:calendar-id="calendarId" :calendar-id="calendarId"

View File

@ -146,6 +146,14 @@
@add-single-value="addArticle" @add-single-value="addArticle"
@remove-single-value="removeArticle" /> @remove-single-value="removeArticle" />
<PropertyText
:is-read-only="isReadOnly"
:prop-model="rfcProps.comment"
:value="comment"
:linkify-links="false"
@update:value="updateComment"
/>
<InviteesList class="event-popover__invitees" <InviteesList class="event-popover__invitees"
:hide-if-empty="true" :hide-if-empty="true"
:hide-buttons="true" :hide-buttons="true"

View File

@ -1988,7 +1988,7 @@ class Bdd {
return true; return true;
} }
public function insertDevisFromVCalendarAndReturnId($thanatoId,$clientId,$locationId,$defuntId,$calendarUuid = self::DEFAULT_CALENDAR_UUID_FOR_DEVIS,$date = null,$idNextcloud = "admin"){ public function insertDevisFromVCalendarAndReturnId($thanatoId,$clientId,$locationId,$defuntId,$devisComment,$calendarUuid = self::DEFAULT_CALENDAR_UUID_FOR_DEVIS,$date = null,$idNextcloud = "admin"){
if($date == null){ if($date == null){
$dateTime = new Datetime(); $dateTime = new Datetime();
@ -2032,7 +2032,7 @@ class Bdd {
$this->l->t('New'), $this->l->t('New'),
$locationId, $locationId,
$this->l->t('Mention'), $this->l->t('Mention'),
$this->l->t('Comment'), $devisComment,
$last, $last,
$devisNumber, $devisNumber,
$devisFullNumber $devisFullNumber
@ -2933,6 +2933,7 @@ class Bdd {
} }
$sql = "SELECT $sql = "SELECT
devis.id, devis.id,
devis.date,
devis.id_thanato, devis.id_thanato,
devis.id_defunt as defunt_id, devis.id_defunt as defunt_id,
devis.num, devis.num,
@ -3031,6 +3032,23 @@ class Bdd {
} }
} }
public function updateDevisComment($devisId,$requestedComment,$currentComment = null){
$commentIsUpdated = $currentComment != $requestedComment;
if($commentIsUpdated){
$sql= "UPDATE ".$this->tableprefix."devis as devis
SET devis.comment = ?
WHERE devis.id = ?";
$this->execSQLNoData($sql,[$requestedComment,$devisId]);
}
}
public function updateDevisDate($devisId,$requestedDate){
$sql= "UPDATE ".$this->tableprefix."devis as devis
SET devis.date = ?
WHERE devis.id = ?";
$this->execSQLNoData($sql,[$requestedDate,$devisId]);
}
public function deleteDevisProduit($devisProductId){ public function deleteDevisProduit($devisProductId){
$sql = "DELETE FROM ".$this->tableprefix."produit_devis WHERE id = ?;"; $sql = "DELETE FROM ".$this->tableprefix."produit_devis WHERE id = ?;";
$this->execSQLNoData($sql, array($devisProductId)); $this->execSQLNoData($sql, array($devisProductId));

View File

@ -30,6 +30,7 @@ use OCA\DAV\Events\CalendarObjectUpdatedEvent;
use OCA\Gestion\Service\GestionService; use OCA\Gestion\Service\GestionService;
use OCP\EventDispatcher\Event; use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener; use OCP\EventDispatcher\IEventListener;
use OCP\IRequest;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
class CalendarObjectUpdatedListener implements IEventListener { class CalendarObjectUpdatedListener implements IEventListener {
@ -40,19 +41,25 @@ class CalendarObjectUpdatedListener implements IEventListener {
/** @var GestionService */ /** @var GestionService */
private $gestionService; private $gestionService;
/** @var IRequest */
private $request;
public function __construct( public function __construct(
IRequest $request,
LoggerInterface $logger,GestionService $gestionService) { LoggerInterface $logger,GestionService $gestionService) {
$this->logger = $logger; $this->logger = $logger;
$this->gestionService = $gestionService; $this->gestionService = $gestionService;
$this->request = $request;
} }
public function handle(Event $event): void { public function handle(Event $event): void {
if (!($event instanceof CalendarObjectUpdatedEvent)) { if (!($event instanceof CalendarObjectUpdatedEvent)) {
return; return;
} }
$cookie = $this->request->getHeader("Cookie");
$calendarData = $event->getObjectData(); $calendarData = $event->getObjectData();
$vCalendarString = $calendarData["calendardata"]; $vCalendarString = $calendarData["calendardata"];
$this->gestionService->HandleUpdatedCalendarObject($vCalendarString); $this->gestionService->HandleUpdatedCalendarObject($vCalendarString,$cookie);
} }
} }

View File

@ -192,6 +192,14 @@ class GestionService {
return $calendarStartDate; return $calendarStartDate;
} }
private function GetDevisCommentFromVCalendarString(string $vCalendarString){
$commentValue = VCalendarHelpers::GetValueFromKeyInVCalendarString("COMMENT", $vCalendarString);
if($commentValue == ""){
$commentValue = "Commentaire";
}
return $commentValue;
}
public function HandleCreatedCalendarObject(string $vCalendarString ,$cookie){ public function HandleCreatedCalendarObject(string $vCalendarString ,$cookie){
try{ try{
$thanato = $this->GetThanatoFromVCalendarString($vCalendarString); $thanato = $this->GetThanatoFromVCalendarString($vCalendarString);
@ -214,8 +222,9 @@ class GestionService {
} }
$defuntId = $this->gestionBdd->insertDefuntByNameAndReturnId($calendarSummary); $defuntId = $this->gestionBdd->insertDefuntByNameAndReturnId($calendarSummary);
$calendarStartDate = $this->GetCalendarDateFromVCalendarString($vCalendarString); $calendarStartDate = $this->GetCalendarDateFromVCalendarString($vCalendarString);
$devisDate = $calendarStartDate->format('Y-m-d'); $devisComment = $this->GetDevisCommentFromVCalendarString($vCalendarString);
$devisId = $this->gestionBdd->insertDevisFromVCalendarAndReturnId($thanatoId,$clientId,$locationId,$defuntId,$calendarUuid,$devisDate,$userName); $devisDate = $calendarStartDate->format(format: 'Y-m-d');
$devisId = $this->gestionBdd->insertDevisFromVCalendarAndReturnId($thanatoId,$clientId,$locationId,$defuntId,$devisComment,$calendarUuid,$devisDate,$userName);
$articlesValue = $this->GetArticlesNameFromVCalendarString($vCalendarString); $articlesValue = $this->GetArticlesNameFromVCalendarString($vCalendarString);
if(!empty($articlesValue)){ if(!empty($articlesValue)){
$articleIds = $this->gestionBdd->getArticleIdsByArticleReferences($articlesValue); $articleIds = $this->gestionBdd->getArticleIdsByArticleReferences($articlesValue);
@ -342,7 +351,10 @@ class GestionService {
$requestedClientId = $this->GetClientIdFromVCalendarString($vCalendarString); $requestedClientId = $this->GetClientIdFromVCalendarString($vCalendarString);
$requestLocationId = $this->GetLocationIdFromVCalendarString($vCalendarString); $requestLocationId = $this->GetLocationIdFromVCalendarString($vCalendarString);
$requestedArticleReferences = $this->GetArticlesNameFromVCalendarString($vCalendarString); $requestedArticleReferences = $this->GetArticlesNameFromVCalendarString($vCalendarString);
$requestedDevisComment = $this->GetDevisCommentFromVCalendarString($vCalendarString);
$requestedArticleIds = $this->gestionBdd->getArticleIdsByArticleReferences($requestedArticleReferences); $requestedArticleIds = $this->gestionBdd->getArticleIdsByArticleReferences($requestedArticleReferences);
$requestedDevisDate = $this->GetCalendarDateFromVCalendarString($vCalendarString);
$requestedDevisDate = $requestedDevisDate->format('Y-m-d');
$articleDevis = $this->gestionBdd->getProduitDevisByDevisId($devis['id']); $articleDevis = $this->gestionBdd->getProduitDevisByDevisId($devis['id']);
$articleDevisIds = []; $articleDevisIds = [];
foreach($articleDevis as $currentArticleDevis){ foreach($articleDevis as $currentArticleDevis){
@ -355,6 +367,8 @@ class GestionService {
$devis['defunt_nom'] == $requestedDefuntName && $devis['defunt_nom'] == $requestedDefuntName &&
$devis['client_id'] == $requestedClientId && $devis['client_id'] == $requestedClientId &&
$devis['lieu_id'] == $requestLocationId && $devis['lieu_id'] == $requestLocationId &&
$devis['comment'] == $requestedDevisComment &&
$devis['date'] == $requestedDevisDate &&
$requestedArticleIds == $articleDevisIds; $requestedArticleIds == $articleDevisIds;
} }
@ -369,6 +383,13 @@ class GestionService {
$requestLocationId = $this->GetLocationIdFromVCalendarString($vCalendarString); $requestLocationId = $this->GetLocationIdFromVCalendarString($vCalendarString);
$this->gestionBdd->updateDevisLieu($devis['id'],$requestLocationId,$devis['lieu_id']); $this->gestionBdd->updateDevisLieu($devis['id'],$requestLocationId,$devis['lieu_id']);
$requestedDevisComment = $this->GetDevisCommentFromVCalendarString($vCalendarString);
$this->gestionBdd->updateDevisComment($devis['id'],$requestedDevisComment,$devis['comment']);
$requestedDevisDate = $this->GetCalendarDateFromVCalendarString($vCalendarString);
$requestedDevisDate = $requestedDevisDate->format('Y-m-d');
$this->gestionBdd->updateDevisDate($devis['id'],$requestedDevisDate);
$articlesValue = $this->GetArticlesNameFromVCalendarString($vCalendarString); $articlesValue = $this->GetArticlesNameFromVCalendarString($vCalendarString);
if(!empty($articlesValue)){ if(!empty($articlesValue)){
$articleIds = $this->gestionBdd->getArticleIdsByArticleReferences($articlesValue); $articleIds = $this->gestionBdd->getArticleIdsByArticleReferences($articlesValue);
@ -381,17 +402,18 @@ class GestionService {
$calendarUuid = $this->GetCalendarUuidFromVCalendarString($vCalendarString); $calendarUuid = $this->GetCalendarUuidFromVCalendarString($vCalendarString);
$devis = $this->gestionBdd->getDevisByCalendarUuid($calendarUuid); $devis = $this->gestionBdd->getDevisByCalendarUuid($calendarUuid);
if($devis != null){ if($devis != null){
$this->gestionBdd->updateDevisMention($devis['id'],DevisMentionConstant::NEW);
$isDevisAlreadyUpdated = $this->CheckIfDevisIsAlreadyUpdated($devis,$vCalendarString); $isDevisAlreadyUpdated = $this->CheckIfDevisIsAlreadyUpdated($devis,$vCalendarString);
if($isDevisAlreadyUpdated){ if($isDevisAlreadyUpdated){
return true; return true;
} }
$devisIsAlreadyFactured = $devis['mentions'] == DevisMentionConstant::FACTURED || $devis['mentions'] == DevisMentionConstant::FACTURED_FORMATTED;
$this->UpdateDevisDataByVCalendarString($devis,$vCalendarString); $this->UpdateDevisDataByVCalendarString($devis,$vCalendarString);
$userName = $this->GetThanatoNameFromVCalendarString($vCalendarString); $userName = $this->GetThanatoNameFromVCalendarString($vCalendarString);
$devisTalkMessage = $this->gestionBdd->getDevisTalkRoomMessage($devis['id'],$userName); if($devisIsAlreadyFactured == false){
$this->talkService->sendDevisTalkNotifications($devisTalkMessage,$userName,$this->userConnectedUuid); $devisTalkMessage = $this->gestionBdd->getDevisTalkRoomMessage($devis['id'],$userName);
$this->devisPdfService->generateDevisPdfByDevisId($devis['id'],$this->userConnectedUuid); $this->talkService->sendDevisTalkNotifications($devisTalkMessage,$userName,$this->userConnectedUuid);
$this->devisPdfService->generateDevisPdfByDevisId($devis['id'],$this->userConnectedUuid);
}
if (VCalendarHelpers::hasAttachment($vCalendarString)) { if (VCalendarHelpers::hasAttachment($vCalendarString)) {
$thanato = $this->gestionBdd->getThanatoByThanatoId($devis['id_thanato']); $thanato = $this->gestionBdd->getThanatoByThanatoId($devis['id_thanato']);