Add comment functionality to calendar events
This commit is contained in:
parent
5cd273b102
commit
6a3123f262
@ -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":"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
@ -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":"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
@ -123,6 +123,7 @@ function eventSourceFunction(calendarObjects, calendar, start, end, timezone) {
|
||||
title += " (".concat(object.percent, "%)");
|
||||
}
|
||||
}
|
||||
console.log(OC.currentUser.uid);
|
||||
const fcEvent = {
|
||||
id: [calendarObject.id, object.id].join('###'),
|
||||
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
|
||||
File diff suppressed because one or more lines are too long
@ -316,6 +316,15 @@ const getRFCProperties = () => {
|
||||
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'),
|
||||
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 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
@ -14371,6 +14371,16 @@ var render = function render() {
|
||||
"add-single-value": _vm.addArticle,
|
||||
"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", {
|
||||
staticClass: "event-popover__invitees",
|
||||
attrs: {
|
||||
@ -16893,14 +16903,23 @@ __webpack_require__.r(__webpack_exports__);
|
||||
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 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
|
||||
*
|
||||
* @return {string|null}
|
||||
*/
|
||||
description() {
|
||||
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;
|
||||
var _this$calendarObjectI12, _this$calendarObjectI13;
|
||||
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
|
||||
@ -16908,8 +16927,8 @@ __webpack_require__.r(__webpack_exports__);
|
||||
* @return {Date|null}
|
||||
*/
|
||||
startDate() {
|
||||
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;
|
||||
var _this$calendarObjectI14, _this$calendarObjectI15;
|
||||
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
|
||||
@ -16917,8 +16936,8 @@ __webpack_require__.r(__webpack_exports__);
|
||||
* @return {string|null}
|
||||
*/
|
||||
startTimezone() {
|
||||
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;
|
||||
var _this$calendarObjectI16, _this$calendarObjectI17;
|
||||
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
|
||||
@ -16926,8 +16945,8 @@ __webpack_require__.r(__webpack_exports__);
|
||||
* @return {Date|null}
|
||||
*/
|
||||
endDate() {
|
||||
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;
|
||||
var _this$calendarObjectI18, _this$calendarObjectI19;
|
||||
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
|
||||
@ -16935,8 +16954,8 @@ __webpack_require__.r(__webpack_exports__);
|
||||
* @return {string|null}
|
||||
*/
|
||||
endTimezone() {
|
||||
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;
|
||||
var _this$calendarObjectI20, _this$calendarObjectI21;
|
||||
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
|
||||
@ -16944,8 +16963,8 @@ __webpack_require__.r(__webpack_exports__);
|
||||
* @return {boolean}
|
||||
*/
|
||||
isAllDay() {
|
||||
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;
|
||||
var _this$calendarObjectI22, _this$calendarObjectI23;
|
||||
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
|
||||
@ -16953,8 +16972,8 @@ __webpack_require__.r(__webpack_exports__);
|
||||
* @return {boolean}
|
||||
*/
|
||||
canModifyAllDay() {
|
||||
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;
|
||||
var _this$calendarObjectI24, _this$calendarObjectI25;
|
||||
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
|
||||
@ -16986,8 +17005,8 @@ __webpack_require__.r(__webpack_exports__);
|
||||
* @return {null | string}
|
||||
*/
|
||||
color() {
|
||||
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;
|
||||
var _this$calendarObjectI26, _this$calendarObjectI27;
|
||||
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
|
||||
@ -17110,7 +17129,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, 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() {
|
||||
return (0,_models_rfcProps_js__WEBPACK_IMPORTED_MODULE_0__.getRFCProperties)();
|
||||
@ -17372,6 +17391,17 @@ __webpack_require__.r(__webpack_exports__);
|
||||
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
|
||||
*
|
||||
@ -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
|
||||
File diff suppressed because one or more lines are too long
@ -119,6 +119,7 @@ export function eventSourceFunction(calendarObjects, calendar, start, end, timez
|
||||
}
|
||||
}
|
||||
|
||||
console.log(OC.currentUser.uid);
|
||||
const fcEvent = {
|
||||
id: [calendarObject.id, object.id].join('###'),
|
||||
title,
|
||||
|
||||
@ -118,6 +118,15 @@ export default {
|
||||
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
|
||||
@ -342,7 +351,7 @@ export default {
|
||||
* Returns an object with properties from RFCs including
|
||||
* 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() {
|
||||
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
|
||||
*
|
||||
|
||||
@ -60,6 +60,8 @@ const getDefaultEventObject = (props = {}) => Object.assign({}, {
|
||||
client : null,
|
||||
//embalmer(Thanato) of the event
|
||||
embalmer : null,
|
||||
//comment of the event
|
||||
comment : null,
|
||||
// description of the event
|
||||
description: null,
|
||||
// Access class of the event (PUBLIC, PRIVATE, CONFIDENTIAL)
|
||||
@ -108,6 +110,7 @@ const mapEventComponentToEventObject = (eventComponent) => {
|
||||
location: eventComponent.location,
|
||||
client : "CLIENT",
|
||||
embalmer : "TEST",
|
||||
comment : "",
|
||||
description: eventComponent.description,
|
||||
accessClass: eventComponent.accessClass,
|
||||
status: eventComponent.status,
|
||||
@ -201,6 +204,10 @@ const mapEventComponentToEventObject = (eventComponent) => {
|
||||
eventObject.embalmer = eventComponent.getFirstPropertyFirstValue('EMBALMER');
|
||||
}
|
||||
|
||||
if(eventComponent.hasProperty('COMMENT')){
|
||||
eventObject.comment = eventComponent.getFirstPropertyFirstValue('COMMENT');
|
||||
}
|
||||
|
||||
return eventObject;
|
||||
}
|
||||
|
||||
@ -215,6 +222,7 @@ const copyCalendarObjectInstanceIntoEventComponent = (eventObject, eventComponen
|
||||
eventComponent.location = eventObject.location
|
||||
eventComponent.client = eventObject.client
|
||||
eventComponent.embalmer = eventObject.embalmer
|
||||
eventComponent.comment = eventObject.comment
|
||||
eventComponent.description = eventObject.description
|
||||
eventComponent.accessClass = eventObject.accessClass
|
||||
eventComponent.status = eventObject.status
|
||||
|
||||
@ -169,6 +169,15 @@ const getRFCProperties = () => {
|
||||
tagPlaceholder: t('calendar', 'Choisir les soins'),
|
||||
options: [],
|
||||
},
|
||||
comment: {
|
||||
readableName: t('calendar', 'Comment'),
|
||||
icon: 'TextBoxOutline',
|
||||
info: t('calendar', 'Commentaires.'),
|
||||
placeholder: t('calendar', 'Commentaires'),
|
||||
tagPlaceholder: t('calendar', 'Commentaires'),
|
||||
options: [],
|
||||
defaultNumberOfRows: 4
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -321,6 +321,19 @@ const mutations = {
|
||||
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
|
||||
*
|
||||
@ -1688,7 +1701,8 @@ const actions = {
|
||||
updateAlarms(eventComponent)
|
||||
updateTalkParticipants(eventComponent)
|
||||
let additionalFieldWasUpdated =
|
||||
eventComponent.client != null;
|
||||
eventComponent.client != null ||
|
||||
eventComponent.comment != null ;
|
||||
if (eventComponent.isDirty() || additionalFieldWasUpdated) {
|
||||
const isForkedItem = eventComponent.primaryItem !== null
|
||||
let original = null
|
||||
|
||||
@ -230,7 +230,33 @@ const actions = {
|
||||
if(eventComponent != null){
|
||||
if(eventComponent.client != null){
|
||||
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;
|
||||
@ -247,7 +273,11 @@ const actions = {
|
||||
const calendar = context.getters.getCalendarById(calendarObject.calendarId)
|
||||
let icsValue = calendarObject.calendarComponent.toICS();
|
||||
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);
|
||||
}
|
||||
calendarObject.dav = await calendar.dav.createVObject(icsValue);
|
||||
|
||||
@ -129,6 +129,13 @@
|
||||
@add-single-value="addArticle"
|
||||
@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"
|
||||
:attendee="userAsAttendee"
|
||||
:calendar-id="calendarId"
|
||||
|
||||
@ -146,6 +146,14 @@
|
||||
@add-single-value="addArticle"
|
||||
@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"
|
||||
:hide-if-empty="true"
|
||||
:hide-buttons="true"
|
||||
|
||||
@ -1988,7 +1988,7 @@ class Bdd {
|
||||
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){
|
||||
$dateTime = new Datetime();
|
||||
@ -2032,7 +2032,7 @@ class Bdd {
|
||||
$this->l->t('New'),
|
||||
$locationId,
|
||||
$this->l->t('Mention'),
|
||||
$this->l->t('Comment'),
|
||||
$devisComment,
|
||||
$last,
|
||||
$devisNumber,
|
||||
$devisFullNumber
|
||||
@ -2933,6 +2933,7 @@ class Bdd {
|
||||
}
|
||||
$sql = "SELECT
|
||||
devis.id,
|
||||
devis.date,
|
||||
devis.id_thanato,
|
||||
devis.id_defunt as defunt_id,
|
||||
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){
|
||||
$sql = "DELETE FROM ".$this->tableprefix."produit_devis WHERE id = ?;";
|
||||
$this->execSQLNoData($sql, array($devisProductId));
|
||||
|
||||
@ -30,6 +30,7 @@ use OCA\DAV\Events\CalendarObjectUpdatedEvent;
|
||||
use OCA\Gestion\Service\GestionService;
|
||||
use OCP\EventDispatcher\Event;
|
||||
use OCP\EventDispatcher\IEventListener;
|
||||
use OCP\IRequest;
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
class CalendarObjectUpdatedListener implements IEventListener {
|
||||
@ -40,19 +41,25 @@ class CalendarObjectUpdatedListener implements IEventListener {
|
||||
/** @var GestionService */
|
||||
private $gestionService;
|
||||
|
||||
/** @var IRequest */
|
||||
private $request;
|
||||
|
||||
public function __construct(
|
||||
IRequest $request,
|
||||
LoggerInterface $logger,GestionService $gestionService) {
|
||||
$this->logger = $logger;
|
||||
$this->gestionService = $gestionService;
|
||||
$this->request = $request;
|
||||
}
|
||||
|
||||
public function handle(Event $event): void {
|
||||
if (!($event instanceof CalendarObjectUpdatedEvent)) {
|
||||
return;
|
||||
}
|
||||
$cookie = $this->request->getHeader("Cookie");
|
||||
$calendarData = $event->getObjectData();
|
||||
$vCalendarString = $calendarData["calendardata"];
|
||||
$this->gestionService->HandleUpdatedCalendarObject($vCalendarString);
|
||||
$this->gestionService->HandleUpdatedCalendarObject($vCalendarString,$cookie);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -192,6 +192,14 @@ class GestionService {
|
||||
return $calendarStartDate;
|
||||
}
|
||||
|
||||
private function GetDevisCommentFromVCalendarString(string $vCalendarString){
|
||||
$commentValue = VCalendarHelpers::GetValueFromKeyInVCalendarString("COMMENT", $vCalendarString);
|
||||
if($commentValue == ""){
|
||||
$commentValue = "Commentaire";
|
||||
}
|
||||
return $commentValue;
|
||||
}
|
||||
|
||||
public function HandleCreatedCalendarObject(string $vCalendarString ,$cookie){
|
||||
try{
|
||||
$thanato = $this->GetThanatoFromVCalendarString($vCalendarString);
|
||||
@ -214,8 +222,9 @@ class GestionService {
|
||||
}
|
||||
$defuntId = $this->gestionBdd->insertDefuntByNameAndReturnId($calendarSummary);
|
||||
$calendarStartDate = $this->GetCalendarDateFromVCalendarString($vCalendarString);
|
||||
$devisDate = $calendarStartDate->format('Y-m-d');
|
||||
$devisId = $this->gestionBdd->insertDevisFromVCalendarAndReturnId($thanatoId,$clientId,$locationId,$defuntId,$calendarUuid,$devisDate,$userName);
|
||||
$devisComment = $this->GetDevisCommentFromVCalendarString($vCalendarString);
|
||||
$devisDate = $calendarStartDate->format(format: 'Y-m-d');
|
||||
$devisId = $this->gestionBdd->insertDevisFromVCalendarAndReturnId($thanatoId,$clientId,$locationId,$defuntId,$devisComment,$calendarUuid,$devisDate,$userName);
|
||||
$articlesValue = $this->GetArticlesNameFromVCalendarString($vCalendarString);
|
||||
if(!empty($articlesValue)){
|
||||
$articleIds = $this->gestionBdd->getArticleIdsByArticleReferences($articlesValue);
|
||||
@ -342,7 +351,10 @@ class GestionService {
|
||||
$requestedClientId = $this->GetClientIdFromVCalendarString($vCalendarString);
|
||||
$requestLocationId = $this->GetLocationIdFromVCalendarString($vCalendarString);
|
||||
$requestedArticleReferences = $this->GetArticlesNameFromVCalendarString($vCalendarString);
|
||||
$requestedDevisComment = $this->GetDevisCommentFromVCalendarString($vCalendarString);
|
||||
$requestedArticleIds = $this->gestionBdd->getArticleIdsByArticleReferences($requestedArticleReferences);
|
||||
$requestedDevisDate = $this->GetCalendarDateFromVCalendarString($vCalendarString);
|
||||
$requestedDevisDate = $requestedDevisDate->format('Y-m-d');
|
||||
$articleDevis = $this->gestionBdd->getProduitDevisByDevisId($devis['id']);
|
||||
$articleDevisIds = [];
|
||||
foreach($articleDevis as $currentArticleDevis){
|
||||
@ -355,6 +367,8 @@ class GestionService {
|
||||
$devis['defunt_nom'] == $requestedDefuntName &&
|
||||
$devis['client_id'] == $requestedClientId &&
|
||||
$devis['lieu_id'] == $requestLocationId &&
|
||||
$devis['comment'] == $requestedDevisComment &&
|
||||
$devis['date'] == $requestedDevisDate &&
|
||||
$requestedArticleIds == $articleDevisIds;
|
||||
}
|
||||
|
||||
@ -369,6 +383,13 @@ class GestionService {
|
||||
$requestLocationId = $this->GetLocationIdFromVCalendarString($vCalendarString);
|
||||
$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);
|
||||
if(!empty($articlesValue)){
|
||||
$articleIds = $this->gestionBdd->getArticleIdsByArticleReferences($articlesValue);
|
||||
@ -381,17 +402,18 @@ class GestionService {
|
||||
$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;
|
||||
}
|
||||
$devisIsAlreadyFactured = $devis['mentions'] == DevisMentionConstant::FACTURED || $devis['mentions'] == DevisMentionConstant::FACTURED_FORMATTED;
|
||||
$this->UpdateDevisDataByVCalendarString($devis,$vCalendarString);
|
||||
$userName = $this->GetThanatoNameFromVCalendarString($vCalendarString);
|
||||
$devisTalkMessage = $this->gestionBdd->getDevisTalkRoomMessage($devis['id'],$userName);
|
||||
$this->talkService->sendDevisTalkNotifications($devisTalkMessage,$userName,$this->userConnectedUuid);
|
||||
$this->devisPdfService->generateDevisPdfByDevisId($devis['id'],$this->userConnectedUuid);
|
||||
|
||||
if($devisIsAlreadyFactured == false){
|
||||
$devisTalkMessage = $this->gestionBdd->getDevisTalkRoomMessage($devis['id'],$userName);
|
||||
$this->talkService->sendDevisTalkNotifications($devisTalkMessage,$userName,$this->userConnectedUuid);
|
||||
$this->devisPdfService->generateDevisPdfByDevisId($devis['id'],$this->userConnectedUuid);
|
||||
}
|
||||
|
||||
if (VCalendarHelpers::hasAttachment($vCalendarString)) {
|
||||
$thanato = $this->gestionBdd->getThanatoByThanatoId($devis['id_thanato']);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user