Merge branch 'staging' into releases/release-hytha-prod
This commit is contained in:
commit
f509f5e988
@ -29,3 +29,18 @@
|
||||
overflow-x: hidden;
|
||||
}
|
||||
}
|
||||
|
||||
.pending-event {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.pending-event::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background: rgb(23, 23, 23);
|
||||
transform: scaleY(0.5);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@ -37436,7 +37436,7 @@ function b(n) {
|
||||
/******/
|
||||
/******/ /* webpack/runtime/publicPath */
|
||||
/******/ (() => {
|
||||
/******/ __webpack_require__.p = "/apps/calendar/js/";
|
||||
/******/ __webpack_require__.p = "\\apps\\calendar\\js\\";
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/nonce */
|
||||
@ -37516,4 +37516,4 @@ const booking = (0,_nextcloud_initial_state__WEBPACK_IMPORTED_MODULE_1__.loadSta
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=calendar-appointments-confirmation.js.map?v=63693119e9fcd0c9b284
|
||||
//# sourceMappingURL=calendar-appointments-confirmation.js.map?v=4a43baa099014d97ecc5
|
||||
File diff suppressed because one or more lines are too long
@ -37468,7 +37468,7 @@ function b(n) {
|
||||
/******/
|
||||
/******/ /* webpack/runtime/publicPath */
|
||||
/******/ (() => {
|
||||
/******/ __webpack_require__.p = "/apps/calendar/js/";
|
||||
/******/ __webpack_require__.p = "\\apps\\calendar\\js\\";
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/nonce */
|
||||
@ -37552,4 +37552,4 @@ const booking = (0,_nextcloud_initial_state__WEBPACK_IMPORTED_MODULE_1__.loadSta
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=calendar-appointments-conflict.js.map?v=803bcfae8888a9a6164c
|
||||
//# sourceMappingURL=calendar-appointments-conflict.js.map?v=84cfe3eb419f8e079c5a
|
||||
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
@ -500,4 +500,4 @@ if(false) {}
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
//# sourceMappingURL=calendar-dashboard-lazy.js.map?v=b6406f1ce7e581fd25b6
|
||||
//# sourceMappingURL=calendar-dashboard-lazy.js.map?v=a51e4becd0c10f90296c
|
||||
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":"bdd28dbe55827e26cea9","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_axios_index_js-node_modules_vue-material-design-icons_CalendarBlankOutli-1d3065":"8bef6f975133a8c4edd8","vendors-node_modules_nextcloud_vue-dashboard_dist_vue-dashboard_js-node_modules_css-loader_di-9e6f3d":"f0bb6d2e2475fb1d8ec6","src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790":"8e84597c896740c03d6c","src_store_index_js":"0998d8f0e8c86a67311f","src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258":"d8540d9b2a367cfc9993","dashboard-lazy":"b6406f1ce7e581fd25b6","vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8":"28880218870abee4b857","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"1f92a9e046dd68952989","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":"31a7d4ece3cdde2d67f1","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_axios_index_js-node_modules_vue-material-design-icons_CalendarBlankOutli-1d3065":"55e669bcb78e07cd54cc","vendors-node_modules_nextcloud_vue-dashboard_dist_vue-dashboard_js-node_modules_css-loader_di-9e6f3d":"56b7e44c1982f74f69ca","src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790":"7cf71b4f92d5bbc180b4","src_store_index_js":"c14c1012a0469c027742","src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258":"7910aecb675dcdfa620c","dashboard-lazy":"a51e4becd0c10f90296c","vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8":"1ec24b5ef07652c6dd39","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"7ec0cf6b65f5c745fa03","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] + "";
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
@ -1411,7 +1411,7 @@ function b(n) {
|
||||
/******/
|
||||
/******/ /* webpack/runtime/publicPath */
|
||||
/******/ (() => {
|
||||
/******/ __webpack_require__.p = "/apps/calendar/js/";
|
||||
/******/ __webpack_require__.p = "\\apps\\calendar\\js\\";
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/jsonp chunk loading */
|
||||
@ -1580,4 +1580,4 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=calendar-dashboard.js.map?v=f780280c831f3f7049ed
|
||||
//# sourceMappingURL=calendar-dashboard.js.map?v=49f5e18ccfb495936d13
|
||||
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
File diff suppressed because one or more lines are too long
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=28b92f22b2082a11ff97
|
||||
//# sourceMappingURL=calendar-public-calendar-subscription-picker.js.map?v=2315e24e67ebf6e4b6db
|
||||
File diff suppressed because one or more lines are too long
@ -2775,6 +2775,21 @@ ___CSS_LOADER_EXPORT___.push([module.id, `@charset "UTF-8";
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.pending-event {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.pending-event::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 1px;
|
||||
background: rgb(23, 23, 23);
|
||||
transform: scaleY(0.5);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calendar App
|
||||
*
|
||||
@ -8865,7 +8880,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":"bdd28dbe55827e26cea9","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":"28880218870abee4b857","vendors-node_modules_axios_index_js-node_modules_vue-material-design-icons_CalendarBlankOutli-1d3065":"8bef6f975133a8c4edd8","vendors-node_modules_autosize_dist_autosize_esm_js-node_modules_html-entities_lib_index_js-no-4072c5":"99f11830ab88b8e43c46","src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790":"8e84597c896740c03d6c","src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258":"d8540d9b2a367cfc9993","src_views_Calendar_vue-data_image_svg_xml_3csvg_20xmlns_27http_www_w3_org_2000_svg_27_20heigh-4a4254":"0c8bf313c8f88a9c37dc","vendors-node_modules_webdav_dist_web_index_js":"454da8f908d41b47c607","src_store_index_js":"0998d8f0e8c86a67311f","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"1f92a9e046dd68952989","node_modules_nextcloud_dialogs_dist_legacy_mjs":"8be838e4c6e9aae56c87","vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-8ibBgPg__mjs":"ea54a36450de178d1141","public-calendar-subscription-picker":"28b92f22b2082a11ff97","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":"31a7d4ece3cdde2d67f1","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":"1ec24b5ef07652c6dd39","vendors-node_modules_axios_index_js-node_modules_vue-material-design-icons_CalendarBlankOutli-1d3065":"55e669bcb78e07cd54cc","vendors-node_modules_autosize_dist_autosize_esm_js-node_modules_html-entities_lib_index_js-no-4072c5":"7212b31e059bc10c256e","src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790":"7cf71b4f92d5bbc180b4","src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258":"7910aecb675dcdfa620c","src_views_Calendar_vue-data_image_svg_xml_3csvg_20xmlns_27http_www_w3_org_2000_svg_27_20heigh-4a4254":"cb7912c432f0c01a7af2","vendors-node_modules_webdav_dist_web_index_js":"454da8f908d41b47c607","src_store_index_js":"c14c1012a0469c027742","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"7ec0cf6b65f5c745fa03","node_modules_nextcloud_dialogs_dist_legacy_mjs":"8be838e4c6e9aae56c87","vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-8ibBgPg__mjs":"ea54a36450de178d1141","public-calendar-subscription-picker":"2315e24e67ebf6e4b6db","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] + "";
|
||||
/******/ };
|
||||
/******/ })();
|
||||
/******/
|
||||
@ -8954,7 +8969,7 @@ window._registerCustomPickerElement = _;
|
||||
/******/
|
||||
/******/ /* webpack/runtime/publicPath */
|
||||
/******/ (() => {
|
||||
/******/ __webpack_require__.p = "/apps/calendar/js/";
|
||||
/******/ __webpack_require__.p = "\\apps\\calendar\\js\\";
|
||||
/******/ })();
|
||||
/******/
|
||||
/******/ /* webpack/runtime/jsonp chunk loading */
|
||||
@ -9115,4 +9130,4 @@ __webpack_require__.p = (0,_nextcloud_router__WEBPACK_IMPORTED_MODULE_1__.linkTo
|
||||
|
||||
/******/ })()
|
||||
;
|
||||
//# sourceMappingURL=calendar-reference.js.map?v=073a53f96df3b4d5b009
|
||||
//# sourceMappingURL=calendar-reference.js.map?v=7d7310f038ef0528d222
|
||||
File diff suppressed because one or more lines are too long
@ -123,6 +123,11 @@ function eventSourceFunction(calendarObjects, calendar, start, end, timezone) {
|
||||
title += " (".concat(object.percent, "%)");
|
||||
}
|
||||
}
|
||||
let isCalendarPending = false;
|
||||
let objectProperties = object._properties.get('ISCALENDARPENDING');
|
||||
if (objectProperties && objectProperties.length > 0) {
|
||||
isCalendarPending = objectProperties[0]._value == "1" ? true : false;
|
||||
}
|
||||
const fcEvent = {
|
||||
id: [calendarObject.id, object.id].join('###'),
|
||||
title,
|
||||
@ -144,9 +149,15 @@ function eventSourceFunction(calendarObjects, calendar, start, end, timezone) {
|
||||
percent: object.percent || null,
|
||||
davUrl: calendarObject.dav.url,
|
||||
location: object.location,
|
||||
description: object.description
|
||||
description: object.description,
|
||||
isCalendarPending: isCalendarPending
|
||||
}
|
||||
};
|
||||
if (isCalendarPending) {
|
||||
fcEvent.backgroundColor = calendar.color;
|
||||
fcEvent.borderColor = calendar.color;
|
||||
fcEvent.textColor = (0,_utils_color_js__WEBPACK_IMPORTED_MODULE_1__.generateTextColorForHex)(calendar.color);
|
||||
}
|
||||
if (object.color) {
|
||||
const customColor = (0,_utils_color_js__WEBPACK_IMPORTED_MODULE_1__.getHexForColorName)(object.color);
|
||||
if (customColor) {
|
||||
@ -1032,4 +1043,4 @@ module.exports = "data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/sv
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
//# sourceMappingURL=calendar-src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258.js.map?v=d8540d9b2a367cfc9993
|
||||
//# sourceMappingURL=calendar-src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258.js.map?v=7910aecb675dcdfa620c
|
||||
File diff suppressed because one or more lines are too long
@ -1826,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=8e84597c896740c03d6c
|
||||
//# sourceMappingURL=calendar-src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790.js.map?v=7cf71b4f92d5bbc180b4
|
||||
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
@ -4331,7 +4331,9 @@ __webpack_require__.r(__webpack_exports__);
|
||||
...(0,_fullcalendar_localization_localeProvider_js__WEBPACK_IMPORTED_MODULE_9__.getFullCalendarLocale)(),
|
||||
// Rendering
|
||||
dayHeaderDidMount: _fullcalendar_rendering_dayHeaderDidMount_js__WEBPACK_IMPORTED_MODULE_11__["default"],
|
||||
eventDidMount: _fullcalendar_rendering_eventDidMount_js__WEBPACK_IMPORTED_MODULE_12__["default"],
|
||||
eventDidMount: info => {
|
||||
this.addPendinEventClass(info);
|
||||
},
|
||||
noEventsDidMount: _fullcalendar_rendering_noEventsDidMount_js__WEBPACK_IMPORTED_MODULE_14__["default"],
|
||||
eventOrder: ['start', '-duration', 'allDay', _fullcalendar_rendering_eventOrder_js__WEBPACK_IMPORTED_MODULE_13__["default"]],
|
||||
forceEventDuration: false,
|
||||
@ -4350,7 +4352,14 @@ __webpack_require__.r(__webpack_exports__);
|
||||
// Timezones:
|
||||
timeZone: this.timezoneId,
|
||||
// Disable jumping in week view and day view when clicking on any event using the simple editor
|
||||
scrollTimeReset: false
|
||||
scrollTimeReset: false,
|
||||
eventClassNames: arg => {
|
||||
let classes = [];
|
||||
if (arg.event.extendedProps.isCalendarPending) {
|
||||
classes.push('pending-event');
|
||||
}
|
||||
return classes;
|
||||
}
|
||||
};
|
||||
},
|
||||
eventSources() {
|
||||
@ -4476,7 +4485,13 @@ __webpack_require__.r(__webpack_exports__);
|
||||
initialView
|
||||
});
|
||||
}
|
||||
}, 5000)
|
||||
}, 5000),
|
||||
addPendinEventClass(info) {
|
||||
if (info.event.extendedProps.isCalendarPending) {
|
||||
info.el.style.backgroundColor = info.event.backgroundColor;
|
||||
info.el.style.color = info.event.textColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -5925,6 +5940,41 @@ __webpack_require__.r(__webpack_exports__);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/Editor/Properties/PropertyIsCalendarPending.vue?vue&type=script&lang=js":
|
||||
/*!****************************************************************************************************************************************************************************************************!*\
|
||||
!*** ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/Editor/Properties/PropertyIsCalendarPending.vue?vue&type=script&lang=js ***!
|
||||
\****************************************************************************************************************************************************************************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _nextcloud_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @nextcloud/vue */ "./node_modules/@nextcloud/vue/dist/index.mjs");
|
||||
|
||||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
||||
name: "PropertyIsCalendarPending",
|
||||
components: {
|
||||
NcCheckboxRadioSwitch: _nextcloud_vue__WEBPACK_IMPORTED_MODULE_0__.NcCheckboxRadioSwitch
|
||||
},
|
||||
props: {
|
||||
isCalendarPending: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
toggleIsCalendarPending() {
|
||||
const newIsCalendarPendingState = !this.isCalendarPending;
|
||||
this.$emit('toggle-is-calendar-pending', newIsCalendarPendingState);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/Editor/Properties/PropertyIsLeave.vue?vue&type=script&lang=js":
|
||||
/*!******************************************************************************************************************************************************************************************!*\
|
||||
!*** ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/Editor/Properties/PropertyIsLeave.vue?vue&type=script&lang=js ***!
|
||||
@ -5939,7 +5989,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _nextcloud_vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @nextcloud/vue */ "./node_modules/@nextcloud/vue/dist/index.mjs");
|
||||
|
||||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
||||
name: "CheckboxComponent",
|
||||
name: "PropertyIsLeave",
|
||||
components: {
|
||||
NcCheckboxRadioSwitch: _nextcloud_vue__WEBPACK_IMPORTED_MODULE_0__.NcCheckboxRadioSwitch
|
||||
},
|
||||
@ -7102,6 +7152,10 @@ __webpack_require__.r(__webpack_exports__);
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
isCalendarPending: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -7122,6 +7176,9 @@ __webpack_require__.r(__webpack_exports__);
|
||||
saveThisOnly() {
|
||||
this.$emit('save-this-only');
|
||||
},
|
||||
saveAsPendingCalendarEvent() {
|
||||
this.$emit('save-pending-calendar-event');
|
||||
},
|
||||
saveThisAndAllFuture() {
|
||||
this.$emit('save-this-and-all-future');
|
||||
},
|
||||
@ -8059,7 +8116,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var vue_material_design_icons_Download_vue__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! vue-material-design-icons/Download.vue */ "./node_modules/vue-material-design-icons/Download.vue");
|
||||
/* harmony import */ var vue_material_design_icons_ContentDuplicate_vue__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! vue-material-design-icons/ContentDuplicate.vue */ "./node_modules/vue-material-design-icons/ContentDuplicate.vue");
|
||||
/* harmony import */ var vue_material_design_icons_Pencil_vue__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! vue-material-design-icons/Pencil.vue */ "./node_modules/vue-material-design-icons/Pencil.vue");
|
||||
/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! vuex */ "./node_modules/vuex/dist/vuex.esm.js");
|
||||
/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! vuex */ "./node_modules/vuex/dist/vuex.esm.js");
|
||||
/* harmony import */ var _nextcloud_dialogs__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @nextcloud/dialogs */ "./node_modules/@nextcloud/dialogs/dist/index.mjs");
|
||||
/* harmony import */ var _components_Editor_Properties_PropertySelect_vue__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../components/Editor/Properties/PropertySelect.vue */ "./src/components/Editor/Properties/PropertySelect.vue");
|
||||
/* harmony import */ var _components_Editor_Properties_PropertySelectAjax_vue__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../components/Editor/Properties/PropertySelectAjax.vue */ "./src/components/Editor/Properties/PropertySelectAjax.vue");
|
||||
@ -8068,6 +8125,8 @@ __webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _components_Editor_Properties_PropertySelectClient_vue__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../components/Editor/Properties/PropertySelectClient.vue */ "./src/components/Editor/Properties/PropertySelectClient.vue");
|
||||
/* harmony import */ var _components_Editor_Properties_PropertySelectArticle_vue__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../components/Editor/Properties/PropertySelectArticle.vue */ "./src/components/Editor/Properties/PropertySelectArticle.vue");
|
||||
/* harmony import */ var _components_Editor_Properties_PropertyIsLeave_vue__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../components/Editor/Properties/PropertyIsLeave.vue */ "./src/components/Editor/Properties/PropertyIsLeave.vue");
|
||||
/* harmony import */ var _components_Editor_Properties_PropertyIsCalendarPending__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../components/Editor/Properties/PropertyIsCalendarPending */ "./src/components/Editor/Properties/PropertyIsCalendarPending.vue");
|
||||
|
||||
|
||||
|
||||
|
||||
@ -8097,9 +8156,10 @@ __webpack_require__.r(__webpack_exports__);
|
||||
|
||||
|
||||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
||||
name: 'EditSimple',
|
||||
name: "EditSimple",
|
||||
components: {
|
||||
PropertyIsLeave: _components_Editor_Properties_PropertyIsLeave_vue__WEBPACK_IMPORTED_MODULE_26__["default"],
|
||||
PropertyIsCalendarPending: _components_Editor_Properties_PropertyIsCalendarPending__WEBPACK_IMPORTED_MODULE_27__["default"],
|
||||
PropertySelectAjaxMultiple: _components_Editor_Properties_PropertySelectAjaxMultiple_vue__WEBPACK_IMPORTED_MODULE_22__["default"],
|
||||
PropertySelectAjax: _components_Editor_Properties_PropertySelectAjax_vue__WEBPACK_IMPORTED_MODULE_21__["default"],
|
||||
PropertySelectLieu: _components_Editor_Properties_PropertySelectLieu_vue__WEBPACK_IMPORTED_MODULE_23__["default"],
|
||||
@ -8130,9 +8190,10 @@ __webpack_require__.r(__webpack_exports__);
|
||||
mixins: [_mixins_EditorMixin_js__WEBPACK_IMPORTED_MODULE_3__["default"]],
|
||||
data() {
|
||||
return {
|
||||
placement: 'auto',
|
||||
placement: "auto",
|
||||
hasLocation: false,
|
||||
hasDescription: false,
|
||||
isCalendarPending: false,
|
||||
boundaryElement: null,
|
||||
isVisible: true,
|
||||
isViewing: true,
|
||||
@ -8140,7 +8201,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...(0,vuex__WEBPACK_IMPORTED_MODULE_27__.mapState)({
|
||||
...(0,vuex__WEBPACK_IMPORTED_MODULE_28__.mapState)({
|
||||
hideEventExport: state => state.settings.hideEventExport,
|
||||
widgetEventDetailsOpen: state => state.calendars.widgetEventDetailsOpen,
|
||||
widgetEventDetails: state => state.calendars.widgetEventDetails,
|
||||
@ -8163,8 +8224,8 @@ __webpack_require__.r(__webpack_exports__);
|
||||
* @return {string}
|
||||
*/
|
||||
titleOrPlaceholder() {
|
||||
if (this.title === '' && this.isReadOnlyOrViewing && !this.isLoading) {
|
||||
return t('calendar', 'Untitled event');
|
||||
if (this.title === "" && this.isReadOnlyOrViewing && !this.isLoading) {
|
||||
return t("calendar", "Untitled event");
|
||||
}
|
||||
return this.title;
|
||||
}
|
||||
@ -8179,14 +8240,16 @@ __webpack_require__.r(__webpack_exports__);
|
||||
calendarObjectInstance() {
|
||||
this.hasLocation = false;
|
||||
this.hasDescription = false;
|
||||
if (typeof this.calendarObjectInstance.location === 'string' && this.calendarObjectInstance.location.trim() !== '') {
|
||||
if (typeof this.calendarObjectInstance.location === "string" && this.calendarObjectInstance.location.trim() !== "") {
|
||||
this.hasLocation = true;
|
||||
}
|
||||
if (typeof this.calendarObjectInstance.description === 'string' && this.calendarObjectInstance.description.trim() !== '') {
|
||||
if (typeof this.calendarObjectInstance.description === "string" && this.calendarObjectInstance.description.trim() !== "") {
|
||||
this.hasDescription = true;
|
||||
}
|
||||
if (this.calendarObjectInstance) {
|
||||
var _this$calendarObjectI;
|
||||
this.getDefuntUrl();
|
||||
this.isCalendarPending = (_this$calendarObjectI = this.calendarObjectInstance.isCalendarPending) !== null && _this$calendarObjectI !== void 0 ? _this$calendarObjectI : false;
|
||||
}
|
||||
},
|
||||
isNew: {
|
||||
@ -8201,27 +8264,27 @@ __webpack_require__.r(__webpack_exports__);
|
||||
if (this.isWidget) {
|
||||
const objectId = this.widgetEventDetails.object;
|
||||
const recurrenceId = this.widgetEventDetails.recurrenceId;
|
||||
await this.$store.dispatch('getCalendarObjectInstanceByObjectIdAndRecurrenceId', {
|
||||
await this.$store.dispatch("getCalendarObjectInstanceByObjectIdAndRecurrenceId", {
|
||||
objectId,
|
||||
recurrenceId
|
||||
});
|
||||
this.calendarId = this.calendarObject.calendarId;
|
||||
this.isLoading = false;
|
||||
}
|
||||
this.boundaryElement = this.isWidget ? document.querySelector('.fc') : document.querySelector('#app-content-vue > .fc');
|
||||
window.addEventListener('keydown', this.keyboardCloseEditor);
|
||||
window.addEventListener('keydown', this.keyboardSaveEvent);
|
||||
window.addEventListener('keydown', this.keyboardDeleteEvent);
|
||||
window.addEventListener('keydown', this.keyboardDuplicateEvent);
|
||||
this.boundaryElement = this.isWidget ? document.querySelector(".fc") : document.querySelector("#app-content-vue > .fc");
|
||||
window.addEventListener("keydown", this.keyboardCloseEditor);
|
||||
window.addEventListener("keydown", this.keyboardSaveEvent);
|
||||
window.addEventListener("keydown", this.keyboardDeleteEvent);
|
||||
window.addEventListener("keydown", this.keyboardDuplicateEvent);
|
||||
this.$nextTick(() => {
|
||||
this.repositionPopover();
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('keydown', this.keyboardCloseEditor);
|
||||
window.removeEventListener('keydown', this.keyboardSaveEvent);
|
||||
window.removeEventListener('keydown', this.keyboardDeleteEvent);
|
||||
window.removeEventListener('keydown', this.keyboardDuplicateEvent);
|
||||
window.removeEventListener("keydown", this.keyboardCloseEditor);
|
||||
window.removeEventListener("keydown", this.keyboardSaveEvent);
|
||||
window.removeEventListener("keydown", this.keyboardDeleteEvent);
|
||||
window.removeEventListener("keydown", this.keyboardDuplicateEvent);
|
||||
},
|
||||
methods: {
|
||||
showMore() {
|
||||
@ -8230,12 +8293,12 @@ __webpack_require__.r(__webpack_exports__);
|
||||
const params = Object.assign({}, this.$route.params);
|
||||
if (this.isNew) {
|
||||
this.$router.push({
|
||||
name: 'NewSidebarView',
|
||||
name: "NewSidebarView",
|
||||
params
|
||||
});
|
||||
} else {
|
||||
this.$router.push({
|
||||
name: (0,_utils_router_js__WEBPACK_IMPORTED_MODULE_9__.getPrefixedRoute)(this.$route.name, 'EditSidebarView'),
|
||||
name: (0,_utils_router_js__WEBPACK_IMPORTED_MODULE_9__.getPrefixedRoute)(this.$route.name, "EditSidebarView"),
|
||||
params
|
||||
});
|
||||
}
|
||||
@ -8246,10 +8309,10 @@ __webpack_require__.r(__webpack_exports__);
|
||||
const objectId = this.widgetEventDetails.object;
|
||||
const recurrenceId = this.widgetEventDetails.recurrenceId;
|
||||
matchingDomObject = this.widgetRef.querySelector(".fc-event[data-object-id=\"".concat(objectId, "\"][data-recurrence-id=\"").concat(recurrenceId, "\"]"));
|
||||
this.placement = 'auto';
|
||||
this.placement = "auto";
|
||||
} else if (isNew) {
|
||||
matchingDomObject = document.querySelector('.fc-highlight');
|
||||
this.placement = 'auto';
|
||||
matchingDomObject = document.querySelector(".fc-highlight");
|
||||
this.placement = "auto";
|
||||
if (!matchingDomObject) {
|
||||
matchingDomObject = document.querySelector('.fc-event[data-is-new="yes"]');
|
||||
}
|
||||
@ -8257,21 +8320,21 @@ __webpack_require__.r(__webpack_exports__);
|
||||
const objectId = route.params.object;
|
||||
const recurrenceId = route.params.recurrenceId;
|
||||
matchingDomObject = document.querySelector(".fc-event[data-object-id=\"".concat(objectId, "\"][data-recurrence-id=\"").concat(recurrenceId, "\"]"));
|
||||
this.placement = 'auto';
|
||||
this.placement = "auto";
|
||||
}
|
||||
if (!matchingDomObject) {
|
||||
matchingDomObject = document.querySelector('#app-navigation-vue');
|
||||
this.placement = 'right';
|
||||
matchingDomObject = document.querySelector("#app-navigation-vue");
|
||||
this.placement = "right";
|
||||
}
|
||||
if (!matchingDomObject) {
|
||||
matchingDomObject = document.querySelector('body');
|
||||
this.placement = 'auto';
|
||||
matchingDomObject = document.querySelector("body");
|
||||
this.placement = "auto";
|
||||
}
|
||||
console.info('getDomElementForPopover', matchingDomObject, this.placement);
|
||||
console.info("getDomElementForPopover", matchingDomObject, this.placement);
|
||||
return matchingDomObject;
|
||||
},
|
||||
repositionPopover() {
|
||||
const isNew = this.isWidget ? false : this.$route.name === 'NewPopoverView';
|
||||
const isNew = this.isWidget ? false : this.$route.name === "NewPopoverView";
|
||||
this.$refs.popover.$children[0].$refs.reference = this.getDomElementForPopover(isNew, this.$route);
|
||||
this.$refs.popover.$children[0].$refs.popper.dispose();
|
||||
this.$refs.popover.$children[0].$refs.popper.init();
|
||||
@ -8297,6 +8360,19 @@ __webpack_require__.r(__webpack_exports__);
|
||||
this.isViewing = false;
|
||||
}
|
||||
},
|
||||
async saveAsPendingCalendarEvent() {
|
||||
if (this.isNew) {
|
||||
await this.savePendingCalendar(false);
|
||||
return;
|
||||
}
|
||||
this.isViewing = true;
|
||||
try {
|
||||
await this.savePendingCalendar(false);
|
||||
this.requiresActionOnRouteLeave = false;
|
||||
} catch (error) {
|
||||
this.isViewing = false;
|
||||
}
|
||||
},
|
||||
addArticle(article) {
|
||||
if (this.description && this.description !== "") {
|
||||
this.updateDescription(this.description + ";" + article);
|
||||
@ -8307,7 +8383,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
removeArticle(article) {
|
||||
if (this.description && this.description !== "") {
|
||||
let values = [];
|
||||
let items = this.description.split(';');
|
||||
let items = this.description.split(";");
|
||||
items.forEach(item => {
|
||||
if (item !== article) {
|
||||
values.push(item);
|
||||
@ -8328,7 +8404,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
});
|
||||
},
|
||||
viewDefunt() {
|
||||
window.open(this.defuntUrl, '_blank');
|
||||
window.open(this.defuntUrl, "_blank");
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -12809,6 +12885,40 @@ var staticRenderFns = [];
|
||||
render._withStripped = true;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/Editor/Properties/PropertyIsCalendarPending.vue?vue&type=template&id=6aff0820&scoped=true":
|
||||
/*!***************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/Editor/Properties/PropertyIsCalendarPending.vue?vue&type=template&id=6aff0820&scoped=true ***!
|
||||
\***************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ render: () => (/* binding */ render),
|
||||
/* harmony export */ staticRenderFns: () => (/* binding */ staticRenderFns)
|
||||
/* harmony export */ });
|
||||
var render = function render() {
|
||||
var _vm = this,
|
||||
_c = _vm._self._c;
|
||||
return !_vm.isReadOnly ? _c("div", {
|
||||
staticClass: "property-title-time-picker"
|
||||
}, [_c("div", {
|
||||
staticClass: "property-title-time-picker__all-day"
|
||||
}, [_c("NcCheckboxRadioSwitch", {
|
||||
attrs: {
|
||||
checked: _vm.isCalendarPending
|
||||
},
|
||||
on: {
|
||||
"update:checked": _vm.toggleIsCalendarPending
|
||||
}
|
||||
}, [_vm._v("\n\t\t\tEn attente\n\t\t")])], 1)]) : _vm._e();
|
||||
};
|
||||
var staticRenderFns = [];
|
||||
render._withStripped = true;
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/Editor/Properties/PropertyIsLeave.vue?vue&type=template&id=56b63a1e&scoped=true":
|
||||
@ -13681,7 +13791,12 @@ var render = function render() {
|
||||
class: {
|
||||
"save-buttons--grow": _vm.growHorizontally
|
||||
}
|
||||
}, [_vm.showMoreButton ? _c("NcButton", {
|
||||
}, [!_vm.isCalendarPending && !_vm.isReadOnly ? _c("NcButton", {
|
||||
class: "d-flex w-max-content",
|
||||
on: {
|
||||
click: _vm.saveAsPendingCalendarEvent
|
||||
}
|
||||
}, [_vm._v("\n\t\tMettre en attente\n\t\t")]) : _vm._e(), _vm._v(" "), _vm.showMoreButton ? _c("NcButton", {
|
||||
attrs: {
|
||||
type: _vm.moreButtonType,
|
||||
disabled: _vm.disabled
|
||||
@ -14496,7 +14611,8 @@ var render = function render() {
|
||||
"show-more-button": true,
|
||||
"more-button-type": _vm.isViewing ? "tertiary" : undefined,
|
||||
"grow-horizontally": !_vm.isViewing && _vm.canCreateRecurrenceException,
|
||||
disabled: _vm.isSaving
|
||||
disabled: _vm.isSaving,
|
||||
"is-calendar-pending": _vm.isCalendarPending
|
||||
},
|
||||
on: {
|
||||
"save-this-only": function ($event) {
|
||||
@ -14505,7 +14621,8 @@ var render = function render() {
|
||||
"save-this-and-all-future": function ($event) {
|
||||
return _vm.saveAndView(true);
|
||||
},
|
||||
"show-more": _vm.showMore
|
||||
"show-more": _vm.showMore,
|
||||
"save-pending-calendar-event": _vm.saveAsPendingCalendarEvent
|
||||
}
|
||||
}, [_vm.defuntUrl ? _c("NcButton", {
|
||||
class: "d-flex w-max-content",
|
||||
@ -16996,7 +17113,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
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 embalmer(Thanato) or null if the event is still loading
|
||||
* Returns the isleave property
|
||||
*
|
||||
* @return {string|null}
|
||||
*/
|
||||
@ -17004,14 +17121,23 @@ __webpack_require__.r(__webpack_exports__);
|
||||
var _this$calendarObjectI10, _this$calendarObjectI11;
|
||||
return (_this$calendarObjectI10 = (_this$calendarObjectI11 = this.calendarObjectInstance) === null || _this$calendarObjectI11 === void 0 ? void 0 : _this$calendarObjectI11.isLeave) !== null && _this$calendarObjectI10 !== void 0 ? _this$calendarObjectI10 : false;
|
||||
},
|
||||
/**
|
||||
* Returns the iscalendarpending property
|
||||
*
|
||||
* @return {string|null}
|
||||
*/
|
||||
isCalendarPending() {
|
||||
var _this$calendarObjectI12, _this$calendarObjectI13;
|
||||
return (_this$calendarObjectI12 = (_this$calendarObjectI13 = this.calendarObjectInstance) === null || _this$calendarObjectI13 === void 0 ? void 0 : _this$calendarObjectI13.isCalendarPending) !== null && _this$calendarObjectI12 !== void 0 ? _this$calendarObjectI12 : false;
|
||||
},
|
||||
/**
|
||||
* Returns the comment or null if the event is still loading
|
||||
*
|
||||
* @return {string|null}
|
||||
*/
|
||||
comment() {
|
||||
var _this$calendarObjectI12, _this$calendarObjectI13;
|
||||
return (_this$calendarObjectI12 = (_this$calendarObjectI13 = this.calendarObjectInstance) === null || _this$calendarObjectI13 === void 0 ? void 0 : _this$calendarObjectI13.comment) !== 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.comment) !== null && _this$calendarObjectI14 !== void 0 ? _this$calendarObjectI14 : null;
|
||||
},
|
||||
/**
|
||||
* Returns the description or null if the event is still loading
|
||||
@ -17019,8 +17145,8 @@ __webpack_require__.r(__webpack_exports__);
|
||||
* @return {string|null}
|
||||
*/
|
||||
description() {
|
||||
var _this$calendarObjectI14, _this$calendarObjectI15;
|
||||
return (_this$calendarObjectI14 = (_this$calendarObjectI15 = this.calendarObjectInstance) === null || _this$calendarObjectI15 === void 0 ? void 0 : _this$calendarObjectI15.description) !== 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.description) !== null && _this$calendarObjectI16 !== void 0 ? _this$calendarObjectI16 : null;
|
||||
},
|
||||
/**
|
||||
* Returns the start-date (without timezone) or null if the event is still loading
|
||||
@ -17028,8 +17154,8 @@ __webpack_require__.r(__webpack_exports__);
|
||||
* @return {Date|null}
|
||||
*/
|
||||
startDate() {
|
||||
var _this$calendarObjectI16, _this$calendarObjectI17;
|
||||
return (_this$calendarObjectI16 = (_this$calendarObjectI17 = this.calendarObjectInstance) === null || _this$calendarObjectI17 === void 0 ? void 0 : _this$calendarObjectI17.startDate) !== 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.startDate) !== null && _this$calendarObjectI18 !== void 0 ? _this$calendarObjectI18 : null;
|
||||
},
|
||||
/**
|
||||
* Returns the timezone of the event's start-date or null if the event is still loading
|
||||
@ -17037,8 +17163,8 @@ __webpack_require__.r(__webpack_exports__);
|
||||
* @return {string|null}
|
||||
*/
|
||||
startTimezone() {
|
||||
var _this$calendarObjectI18, _this$calendarObjectI19;
|
||||
return (_this$calendarObjectI18 = (_this$calendarObjectI19 = this.calendarObjectInstance) === null || _this$calendarObjectI19 === void 0 ? void 0 : _this$calendarObjectI19.startTimezoneId) !== 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.startTimezoneId) !== null && _this$calendarObjectI20 !== void 0 ? _this$calendarObjectI20 : null;
|
||||
},
|
||||
/**
|
||||
* Returns the end-date (without timezone) or null if the event is still loading
|
||||
@ -17046,8 +17172,8 @@ __webpack_require__.r(__webpack_exports__);
|
||||
* @return {Date|null}
|
||||
*/
|
||||
endDate() {
|
||||
var _this$calendarObjectI20, _this$calendarObjectI21;
|
||||
return (_this$calendarObjectI20 = (_this$calendarObjectI21 = this.calendarObjectInstance) === null || _this$calendarObjectI21 === void 0 ? void 0 : _this$calendarObjectI21.endDate) !== null && _this$calendarObjectI20 !== void 0 ? _this$calendarObjectI20 : null;
|
||||
var _this$calendarObjectI22, _this$calendarObjectI23;
|
||||
return (_this$calendarObjectI22 = (_this$calendarObjectI23 = this.calendarObjectInstance) === null || _this$calendarObjectI23 === void 0 ? void 0 : _this$calendarObjectI23.endDate) !== null && _this$calendarObjectI22 !== void 0 ? _this$calendarObjectI22 : null;
|
||||
},
|
||||
/**
|
||||
* Returns the timezone of the event's end-date or null if the event is still loading
|
||||
@ -17055,8 +17181,8 @@ __webpack_require__.r(__webpack_exports__);
|
||||
* @return {string|null}
|
||||
*/
|
||||
endTimezone() {
|
||||
var _this$calendarObjectI22, _this$calendarObjectI23;
|
||||
return (_this$calendarObjectI22 = (_this$calendarObjectI23 = this.calendarObjectInstance) === null || _this$calendarObjectI23 === void 0 ? void 0 : _this$calendarObjectI23.endTimezoneId) !== null && _this$calendarObjectI22 !== void 0 ? _this$calendarObjectI22 : null;
|
||||
var _this$calendarObjectI24, _this$calendarObjectI25;
|
||||
return (_this$calendarObjectI24 = (_this$calendarObjectI25 = this.calendarObjectInstance) === null || _this$calendarObjectI25 === void 0 ? void 0 : _this$calendarObjectI25.endTimezoneId) !== null && _this$calendarObjectI24 !== void 0 ? _this$calendarObjectI24 : null;
|
||||
},
|
||||
/**
|
||||
* Returns whether or not the event is all-day or null if the event is still loading
|
||||
@ -17064,8 +17190,8 @@ __webpack_require__.r(__webpack_exports__);
|
||||
* @return {boolean}
|
||||
*/
|
||||
isAllDay() {
|
||||
var _this$calendarObjectI24, _this$calendarObjectI25;
|
||||
return (_this$calendarObjectI24 = (_this$calendarObjectI25 = this.calendarObjectInstance) === null || _this$calendarObjectI25 === void 0 ? void 0 : _this$calendarObjectI25.isAllDay) !== null && _this$calendarObjectI24 !== void 0 ? _this$calendarObjectI24 : false;
|
||||
var _this$calendarObjectI26, _this$calendarObjectI27;
|
||||
return (_this$calendarObjectI26 = (_this$calendarObjectI27 = this.calendarObjectInstance) === null || _this$calendarObjectI27 === void 0 ? void 0 : _this$calendarObjectI27.isAllDay) !== null && _this$calendarObjectI26 !== void 0 ? _this$calendarObjectI26 : false;
|
||||
},
|
||||
/**
|
||||
* Returns whether or not the event is a leave
|
||||
@ -17073,8 +17199,17 @@ __webpack_require__.r(__webpack_exports__);
|
||||
* @return {boolean}
|
||||
*/
|
||||
isLeave() {
|
||||
var _this$calendarObjectI26, _this$calendarObjectI27;
|
||||
return (_this$calendarObjectI26 = (_this$calendarObjectI27 = this.calendarObjectInstance) === null || _this$calendarObjectI27 === void 0 ? void 0 : _this$calendarObjectI27.isLeave) !== null && _this$calendarObjectI26 !== void 0 ? _this$calendarObjectI26 : false;
|
||||
var _this$calendarObjectI28, _this$calendarObjectI29;
|
||||
return (_this$calendarObjectI28 = (_this$calendarObjectI29 = this.calendarObjectInstance) === null || _this$calendarObjectI29 === void 0 ? void 0 : _this$calendarObjectI29.isLeave) !== null && _this$calendarObjectI28 !== void 0 ? _this$calendarObjectI28 : false;
|
||||
},
|
||||
/**
|
||||
* Returns whether or not the event is pending
|
||||
*
|
||||
* @return {boolean}
|
||||
*/
|
||||
isCalendarPending() {
|
||||
var _this$calendarObjectI30, _this$calendarObjectI31;
|
||||
return (_this$calendarObjectI30 = (_this$calendarObjectI31 = this.calendarObjectInstance) === null || _this$calendarObjectI31 === void 0 ? void 0 : _this$calendarObjectI31.isCalendarPending) !== null && _this$calendarObjectI30 !== void 0 ? _this$calendarObjectI30 : false;
|
||||
},
|
||||
/**
|
||||
* Returns whether or not the user is allowed to modify the all-day setting
|
||||
@ -17082,8 +17217,8 @@ __webpack_require__.r(__webpack_exports__);
|
||||
* @return {boolean}
|
||||
*/
|
||||
canModifyAllDay() {
|
||||
var _this$calendarObjectI28, _this$calendarObjectI29;
|
||||
return (_this$calendarObjectI28 = (_this$calendarObjectI29 = this.calendarObjectInstance) === null || _this$calendarObjectI29 === void 0 ? void 0 : _this$calendarObjectI29.canModifyAllDay) !== null && _this$calendarObjectI28 !== void 0 ? _this$calendarObjectI28 : false;
|
||||
var _this$calendarObjectI32, _this$calendarObjectI33;
|
||||
return (_this$calendarObjectI32 = (_this$calendarObjectI33 = this.calendarObjectInstance) === null || _this$calendarObjectI33 === void 0 ? void 0 : _this$calendarObjectI33.canModifyAllDay) !== null && _this$calendarObjectI32 !== void 0 ? _this$calendarObjectI32 : false;
|
||||
},
|
||||
/**
|
||||
* Returns the color the illustration should be colored in
|
||||
@ -17115,8 +17250,8 @@ __webpack_require__.r(__webpack_exports__);
|
||||
* @return {null | string}
|
||||
*/
|
||||
color() {
|
||||
var _this$calendarObjectI30, _this$calendarObjectI31;
|
||||
return (_this$calendarObjectI30 = (_this$calendarObjectI31 = this.calendarObjectInstance) === null || _this$calendarObjectI31 === void 0 ? void 0 : _this$calendarObjectI31.customColor) !== null && _this$calendarObjectI30 !== void 0 ? _this$calendarObjectI30 : null;
|
||||
var _this$calendarObjectI34, _this$calendarObjectI35;
|
||||
return (_this$calendarObjectI34 = (_this$calendarObjectI35 = this.calendarObjectInstance) === null || _this$calendarObjectI35 === void 0 ? void 0 : _this$calendarObjectI35.customColor) !== null && _this$calendarObjectI34 !== void 0 ? _this$calendarObjectI34 : null;
|
||||
},
|
||||
/**
|
||||
* Returns whether or not to display save buttons
|
||||
@ -17398,6 +17533,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
this.isLoading = true;
|
||||
this.isSaving = true;
|
||||
try {
|
||||
this.setPendingCalendar(false);
|
||||
await this.$store.dispatch('saveCalendarObjectInstance', {
|
||||
thisAndAllFuture,
|
||||
calendarId: this.calendarId
|
||||
@ -17412,6 +17548,43 @@ __webpack_require__.r(__webpack_exports__);
|
||||
this.isSaving = false;
|
||||
}
|
||||
},
|
||||
setPendingCalendar() {
|
||||
let isPending = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
||||
this.calendarObjectInstance.eventComponent.isCalendarPending = isPending;
|
||||
this.calendarObjectInstance.isCalendarPending = isPending;
|
||||
},
|
||||
async savePendingCalendar() {
|
||||
let thisAndAllFuture = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
||||
if (!this.calendarObject) {
|
||||
_utils_logger_js__WEBPACK_IMPORTED_MODULE_1__["default"].error('Calendar-object not found');
|
||||
return;
|
||||
}
|
||||
if (this.isReadOnly) {
|
||||
return;
|
||||
}
|
||||
if (this.forceThisAndAllFuture) {
|
||||
thisAndAllFuture = true;
|
||||
}
|
||||
this.isLoading = true;
|
||||
this.isSaving = true;
|
||||
try {
|
||||
this.setPendingCalendar();
|
||||
await this.$store.dispatch('saveCalendarObjectInstance', {
|
||||
thisAndAllFuture,
|
||||
calendarId: this.calendarId
|
||||
});
|
||||
this.requiresActionOnRouteLeave = false;
|
||||
} catch (error) {
|
||||
_utils_logger_js__WEBPACK_IMPORTED_MODULE_1__["default"].error("Failed to save event: ".concat(error));
|
||||
(0,_nextcloud_dialogs__WEBPACK_IMPORTED_MODULE_7__.showError)((0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_5__.translate)('calendar', 'Failed to save event'));
|
||||
this.calendarObjectInstance.eventComponent.markDirty();
|
||||
throw error;
|
||||
} finally {
|
||||
this.isLoading = false;
|
||||
this.isSaving = false;
|
||||
this.closeEditor();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Saves a calendar-object and closes the editor
|
||||
*
|
||||
@ -17601,6 +17774,15 @@ __webpack_require__.r(__webpack_exports__);
|
||||
isLeave
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Toggles the event pending
|
||||
*/
|
||||
toggleIsCalendarPending(isCalendarPending) {
|
||||
this.$store.commit('toggleIsCalendarPending', {
|
||||
calendarObjectInstance: this.calendarObjectInstance,
|
||||
isCalendarPending
|
||||
});
|
||||
},
|
||||
/**
|
||||
* Resets the internal state after changing the viewed calendar-object
|
||||
*/
|
||||
@ -20720,11 +20902,9 @@ var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBP
|
||||
// Module
|
||||
___CSS_LOADER_EXPORT___.push([module.id, `.save-buttons[data-v-8f0b8a9c] {
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
gap: 5px;
|
||||
}
|
||||
.save-buttons--grow[data-v-8f0b8a9c] {
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
}
|
||||
.save-buttons--grow button[data-v-8f0b8a9c] {
|
||||
flex: 1 fit-content;
|
||||
@ -20900,6 +21080,39 @@ ___CSS_LOADER_EXPORT___.push([module.id, `
|
||||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/Editor/Properties/PropertyIsCalendarPending.vue?vue&type=style&index=0&id=6aff0820&scoped=true&lang=css":
|
||||
/*!******************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/Editor/Properties/PropertyIsCalendarPending.vue?vue&type=style&index=0&id=6aff0820&scoped=true&lang=css ***!
|
||||
\******************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ "./node_modules/css-loader/dist/runtime/noSourceMaps.js");
|
||||
/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
|
||||
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
||||
// Imports
|
||||
|
||||
|
||||
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
||||
// Module
|
||||
___CSS_LOADER_EXPORT___.push([module.id, `
|
||||
.checkbox-container[data-v-6aff0820] {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
`, ""]);
|
||||
// Exports
|
||||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/Editor/Properties/PropertyIsLeave.vue?vue&type=style&index=0&id=56b63a1e&scoped=true&lang=css":
|
||||
@ -20988,6 +21201,61 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
|
||||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_AppNavigationHeaderNewEvent_vue_vue_type_style_index_0_id_673844b5_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_AppNavigationHeaderNewEvent_vue_vue_type_style_index_0_id_673844b5_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_AppNavigationHeaderNewEvent_vue_vue_type_style_index_0_id_673844b5_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/Editor/Properties/PropertyIsCalendarPending.vue?vue&type=style&index=0&id=6aff0820&scoped=true&lang=css":
|
||||
/*!**********************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
|
||||
!*** ./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/Editor/Properties/PropertyIsCalendarPending.vue?vue&type=style&index=0&id=6aff0820&scoped=true&lang=css ***!
|
||||
\**********************************************************************************************************************************************************************************************************************************************************************************************************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
|
||||
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
||||
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js");
|
||||
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
|
||||
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js");
|
||||
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
|
||||
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js");
|
||||
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
|
||||
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js");
|
||||
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
|
||||
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js");
|
||||
/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);
|
||||
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PropertyIsCalendarPending_vue_vue_type_style_index_0_id_6aff0820_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PropertyIsCalendarPending.vue?vue&type=style&index=0&id=6aff0820&scoped=true&lang=css */ "./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/Editor/Properties/PropertyIsCalendarPending.vue?vue&type=style&index=0&id=6aff0820&scoped=true&lang=css");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var options = {};
|
||||
|
||||
options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
|
||||
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
|
||||
|
||||
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
|
||||
|
||||
options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
|
||||
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
|
||||
|
||||
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PropertyIsCalendarPending_vue_vue_type_style_index_0_id_6aff0820_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);
|
||||
|
||||
|
||||
|
||||
|
||||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PropertyIsCalendarPending_vue_vue_type_style_index_0_id_6aff0820_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PropertyIsCalendarPending_vue_vue_type_style_index_0_id_6aff0820_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PropertyIsCalendarPending_vue_vue_type_style_index_0_id_6aff0820_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/Editor/Properties/PropertyIsLeave.vue?vue&type=style&index=0&id=56b63a1e&scoped=true&lang=css":
|
||||
@ -23090,6 +23358,47 @@ component.options.__file = "src/components/Editor/OrganizerNoEmailError.vue"
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/components/Editor/Properties/PropertyIsCalendarPending.vue":
|
||||
/*!************************************************************************!*\
|
||||
!*** ./src/components/Editor/Properties/PropertyIsCalendarPending.vue ***!
|
||||
\************************************************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _PropertyIsCalendarPending_vue_vue_type_template_id_6aff0820_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PropertyIsCalendarPending.vue?vue&type=template&id=6aff0820&scoped=true */ "./src/components/Editor/Properties/PropertyIsCalendarPending.vue?vue&type=template&id=6aff0820&scoped=true");
|
||||
/* harmony import */ var _PropertyIsCalendarPending_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PropertyIsCalendarPending.vue?vue&type=script&lang=js */ "./src/components/Editor/Properties/PropertyIsCalendarPending.vue?vue&type=script&lang=js");
|
||||
/* harmony import */ var _PropertyIsCalendarPending_vue_vue_type_style_index_0_id_6aff0820_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PropertyIsCalendarPending.vue?vue&type=style&index=0&id=6aff0820&scoped=true&lang=css */ "./src/components/Editor/Properties/PropertyIsCalendarPending.vue?vue&type=style&index=0&id=6aff0820&scoped=true&lang=css");
|
||||
/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ "./node_modules/vue-loader/lib/runtime/componentNormalizer.js");
|
||||
|
||||
|
||||
|
||||
;
|
||||
|
||||
|
||||
/* normalize component */
|
||||
|
||||
var component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_3__["default"])(
|
||||
_PropertyIsCalendarPending_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"],
|
||||
_PropertyIsCalendarPending_vue_vue_type_template_id_6aff0820_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render,
|
||||
_PropertyIsCalendarPending_vue_vue_type_template_id_6aff0820_scoped_true__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns,
|
||||
false,
|
||||
null,
|
||||
"6aff0820",
|
||||
null
|
||||
|
||||
)
|
||||
|
||||
/* hot reload */
|
||||
if (false) { var api; }
|
||||
component.options.__file = "src/components/Editor/Properties/PropertyIsCalendarPending.vue"
|
||||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/components/Editor/Properties/PropertyIsLeave.vue":
|
||||
/*!**************************************************************!*\
|
||||
!*** ./src/components/Editor/Properties/PropertyIsLeave.vue ***!
|
||||
@ -24745,6 +25054,22 @@ __webpack_require__.r(__webpack_exports__);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/components/Editor/Properties/PropertyIsCalendarPending.vue?vue&type=script&lang=js":
|
||||
/*!************************************************************************************************!*\
|
||||
!*** ./src/components/Editor/Properties/PropertyIsCalendarPending.vue?vue&type=script&lang=js ***!
|
||||
\************************************************************************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PropertyIsCalendarPending_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PropertyIsCalendarPending.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/Editor/Properties/PropertyIsCalendarPending.vue?vue&type=script&lang=js");
|
||||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PropertyIsCalendarPending_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"]);
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/components/Editor/Properties/PropertyIsLeave.vue?vue&type=script&lang=js":
|
||||
/*!**************************************************************************************!*\
|
||||
!*** ./src/components/Editor/Properties/PropertyIsLeave.vue?vue&type=script&lang=js ***!
|
||||
@ -25946,6 +26271,23 @@ __webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_3_node_modules_vue_loader_lib_index_js_vue_loader_options_OrganizerNoEmailError_vue_vue_type_template_id_af50adac__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./OrganizerNoEmailError.vue?vue&type=template&id=af50adac */ "./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/Editor/OrganizerNoEmailError.vue?vue&type=template&id=af50adac");
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/components/Editor/Properties/PropertyIsCalendarPending.vue?vue&type=template&id=6aff0820&scoped=true":
|
||||
/*!******************************************************************************************************************!*\
|
||||
!*** ./src/components/Editor/Properties/PropertyIsCalendarPending.vue?vue&type=template&id=6aff0820&scoped=true ***!
|
||||
\******************************************************************************************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
||||
/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_3_node_modules_vue_loader_lib_index_js_vue_loader_options_PropertyIsCalendarPending_vue_vue_type_template_id_6aff0820_scoped_true__WEBPACK_IMPORTED_MODULE_0__.render),
|
||||
/* harmony export */ staticRenderFns: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_3_node_modules_vue_loader_lib_index_js_vue_loader_options_PropertyIsCalendarPending_vue_vue_type_template_id_6aff0820_scoped_true__WEBPACK_IMPORTED_MODULE_0__.staticRenderFns)
|
||||
/* harmony export */ });
|
||||
/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_loaders_templateLoader_js_ruleSet_1_rules_3_node_modules_vue_loader_lib_index_js_vue_loader_options_PropertyIsCalendarPending_vue_vue_type_template_id_6aff0820_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PropertyIsCalendarPending.vue?vue&type=template&id=6aff0820&scoped=true */ "./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/Editor/Properties/PropertyIsCalendarPending.vue?vue&type=template&id=6aff0820&scoped=true");
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/components/Editor/Properties/PropertyIsLeave.vue?vue&type=template&id=56b63a1e&scoped=true":
|
||||
@ -26316,6 +26658,19 @@ __webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_AppNavigationHeaderNewEvent_vue_vue_type_style_index_0_id_673844b5_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/style-loader/dist/cjs.js!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./AppNavigationHeaderNewEvent.vue?vue&type=style&index=0&id=673844b5&scoped=true&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/AppNavigation/AppNavigationHeader/AppNavigationHeaderNewEvent.vue?vue&type=style&index=0&id=673844b5&scoped=true&lang=css");
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/components/Editor/Properties/PropertyIsCalendarPending.vue?vue&type=style&index=0&id=6aff0820&scoped=true&lang=css":
|
||||
/*!********************************************************************************************************************************!*\
|
||||
!*** ./src/components/Editor/Properties/PropertyIsCalendarPending.vue?vue&type=style&index=0&id=6aff0820&scoped=true&lang=css ***!
|
||||
\********************************************************************************************************************************/
|
||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _node_modules_style_loader_dist_cjs_js_node_modules_css_loader_dist_cjs_js_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_vue_loader_lib_index_js_vue_loader_options_PropertyIsCalendarPending_vue_vue_type_style_index_0_id_6aff0820_scoped_true_lang_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../node_modules/style-loader/dist/cjs.js!../../../../node_modules/css-loader/dist/cjs.js!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PropertyIsCalendarPending.vue?vue&type=style&index=0&id=6aff0820&scoped=true&lang=css */ "./node_modules/style-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./src/components/Editor/Properties/PropertyIsCalendarPending.vue?vue&type=style&index=0&id=6aff0820&scoped=true&lang=css");
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ "./src/components/Editor/Properties/PropertyIsLeave.vue?vue&type=style&index=0&id=56b63a1e&scoped=true&lang=css":
|
||||
@ -27722,4 +28077,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=0c8bf313c8f88a9c37dc
|
||||
//# sourceMappingURL=calendar-src_views_Calendar_vue-data_image_svg_xml_3csvg_20xmlns_27http_www_w3_org_2000_svg_27_20heigh-4a4254.js.map?v=cb7912c432f0c01a7af2
|
||||
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=99f11830ab88b8e43c46
|
||||
//# sourceMappingURL=calendar-vendors-node_modules_autosize_dist_autosize_esm_js-node_modules_html-entities_lib_index_js-no-4072c5.js.map?v=7212b31e059bc10c256e
|
||||
File diff suppressed because one or more lines are too long
@ -104883,4 +104883,4 @@ module.exports = /*#__PURE__*/JSON.parse('{"compressed":true,"categories":[{"id"
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
//# sourceMappingURL=calendar-vendors-node_modules_axios_index_js-node_modules_vue-material-design-icons_CalendarBlankOutli-1d3065.js.map?v=8bef6f975133a8c4edd8
|
||||
//# sourceMappingURL=calendar-vendors-node_modules_axios_index_js-node_modules_vue-material-design-icons_CalendarBlankOutli-1d3065.js.map?v=55e669bcb78e07cd54cc
|
||||
File diff suppressed because one or more lines are too long
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=bdd28dbe55827e26cea9
|
||||
//# sourceMappingURL=calendar-vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981.js.map?v=31a7d4ece3cdde2d67f1
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -24822,4 +24822,4 @@ window._registerCustomPickerElement = _;
|
||||
/***/ })
|
||||
|
||||
}]);
|
||||
//# sourceMappingURL=calendar-vendors-node_modules_nextcloud_vue-dashboard_dist_vue-dashboard_js-node_modules_css-loader_di-9e6f3d.js.map?v=f0bb6d2e2475fb1d8ec6
|
||||
//# sourceMappingURL=calendar-vendors-node_modules_nextcloud_vue-dashboard_dist_vue-dashboard_js-node_modules_css-loader_di-9e6f3d.js.map?v=56b7e44c1982f74f69ca
|
||||
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=1f92a9e046dd68952989
|
||||
//# sourceMappingURL=calendar-vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f.js.map?v=7ec0cf6b65f5c745fa03
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
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=28880218870abee4b857
|
||||
//# sourceMappingURL=calendar-vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8.js.map?v=1ec24b5ef07652c6dd39
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -139,7 +139,9 @@ export default {
|
||||
...getFullCalendarLocale(),
|
||||
// Rendering
|
||||
dayHeaderDidMount,
|
||||
eventDidMount,
|
||||
eventDidMount : (info) => {
|
||||
this.addPendinEventClass(info);
|
||||
},
|
||||
noEventsDidMount,
|
||||
eventOrder: ['start', '-duration', 'allDay', eventOrder],
|
||||
forceEventDuration: false,
|
||||
@ -159,6 +161,13 @@ export default {
|
||||
timeZone: this.timezoneId,
|
||||
// Disable jumping in week view and day view when clicking on any event using the simple editor
|
||||
scrollTimeReset: false,
|
||||
eventClassNames: (arg) => {
|
||||
let classes = [];
|
||||
if (arg.event.extendedProps.isCalendarPending) {
|
||||
classes.push('pending-event');
|
||||
}
|
||||
return classes;
|
||||
},
|
||||
}
|
||||
},
|
||||
eventSources() {
|
||||
@ -302,6 +311,12 @@ export default {
|
||||
this.$store.dispatch('setInitialView', { initialView })
|
||||
}
|
||||
}, 5000),
|
||||
addPendinEventClass(info){
|
||||
if (info.event.extendedProps.isCalendarPending) {
|
||||
info.el.style.backgroundColor = info.event.backgroundColor;
|
||||
info.el.style.color = info.event.textColor;
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -0,0 +1,43 @@
|
||||
<template>
|
||||
<div v-if="!isReadOnly" class="property-title-time-picker">
|
||||
<div class="property-title-time-picker__all-day">
|
||||
<NcCheckboxRadioSwitch :checked="isCalendarPending"
|
||||
@update:checked="toggleIsCalendarPending">
|
||||
En attente
|
||||
</NcCheckboxRadioSwitch>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { NcCheckboxRadioSwitch } from '@nextcloud/vue'
|
||||
export default {
|
||||
name: "PropertyIsCalendarPending",
|
||||
components: {
|
||||
NcCheckboxRadioSwitch,
|
||||
},
|
||||
props: {
|
||||
isCalendarPending: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
},
|
||||
methods: {
|
||||
toggleIsCalendarPending() {
|
||||
const newIsCalendarPendingState = !this.isCalendarPending;
|
||||
this.$emit('toggle-is-calendar-pending',newIsCalendarPendingState)
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.checkbox-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
<script>
|
||||
import { NcCheckboxRadioSwitch } from '@nextcloud/vue'
|
||||
export default {
|
||||
name: "CheckboxComponent",
|
||||
name: "PropertyIsLeave",
|
||||
components: {
|
||||
NcCheckboxRadioSwitch,
|
||||
},
|
||||
|
||||
@ -23,6 +23,13 @@
|
||||
|
||||
<template>
|
||||
<div class="save-buttons" :class="{ 'save-buttons--grow': growHorizontally }">
|
||||
<NcButton
|
||||
v-if="!isCalendarPending && !isReadOnly"
|
||||
@click="saveAsPendingCalendarEvent"
|
||||
:class="'d-flex w-max-content'"
|
||||
>
|
||||
Mettre en attente
|
||||
</NcButton>
|
||||
<NcButton v-if="showMoreButton"
|
||||
:type="moreButtonType"
|
||||
:disabled="disabled"
|
||||
@ -108,6 +115,10 @@ export default {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
isCalendarPending : {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
showSaveButton() {
|
||||
@ -127,6 +138,9 @@ export default {
|
||||
saveThisOnly() {
|
||||
this.$emit('save-this-only')
|
||||
},
|
||||
saveAsPendingCalendarEvent() {
|
||||
this.$emit('save-pending-calendar-event')
|
||||
},
|
||||
saveThisAndAllFuture() {
|
||||
this.$emit('save-this-and-all-future')
|
||||
},
|
||||
@ -138,17 +152,18 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.save-buttons {
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
gap: 5px;
|
||||
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
&--grow {
|
||||
flex-wrap: wrap;
|
||||
|
||||
button {
|
||||
flex: 1 fit-content;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -24,7 +24,7 @@ import {
|
||||
hexToRGB,
|
||||
isLight,
|
||||
generateTextColorForHex,
|
||||
getHexForColorName,
|
||||
getHexForColorName
|
||||
} from '../../utils/color.js'
|
||||
import logger from '../../utils/logger.js'
|
||||
import { getAllObjectsInTimeRange } from '../../utils/calendarObject.js'
|
||||
@ -119,6 +119,12 @@ export function eventSourceFunction(calendarObjects, calendar, start, end, timez
|
||||
}
|
||||
}
|
||||
|
||||
let isCalendarPending = false;
|
||||
let objectProperties = object._properties.get('ISCALENDARPENDING');
|
||||
if (objectProperties && objectProperties.length > 0) {
|
||||
isCalendarPending = objectProperties[0]._value == "1" ? true : false;
|
||||
}
|
||||
|
||||
const fcEvent = {
|
||||
id: [calendarObject.id, object.id].join('###'),
|
||||
title,
|
||||
@ -143,9 +149,16 @@ export function eventSourceFunction(calendarObjects, calendar, start, end, timez
|
||||
davUrl: calendarObject.dav.url,
|
||||
location: object.location,
|
||||
description: object.description,
|
||||
isCalendarPending: isCalendarPending
|
||||
},
|
||||
}
|
||||
|
||||
if(isCalendarPending){
|
||||
fcEvent.backgroundColor = calendar.color
|
||||
fcEvent.borderColor = calendar.color
|
||||
fcEvent.textColor = generateTextColorForHex(calendar.color)
|
||||
}
|
||||
|
||||
if (object.color) {
|
||||
const customColor = getHexForColorName(object.color)
|
||||
if (customColor) {
|
||||
|
||||
@ -119,7 +119,7 @@ export default {
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the embalmer(Thanato) or null if the event is still loading
|
||||
* Returns the isleave property
|
||||
*
|
||||
* @return {string|null}
|
||||
*/
|
||||
@ -127,6 +127,15 @@ export default {
|
||||
return this.calendarObjectInstance?.isLeave ?? false
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the iscalendarpending property
|
||||
*
|
||||
* @return {string|null}
|
||||
*/
|
||||
isCalendarPending() {
|
||||
return this.calendarObjectInstance?.isCalendarPending ?? false
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the comment or null if the event is still loading
|
||||
*
|
||||
@ -194,6 +203,15 @@ export default {
|
||||
isLeave() {
|
||||
return this.calendarObjectInstance?.isLeave ?? false
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns whether or not the event is pending
|
||||
*
|
||||
* @return {boolean}
|
||||
*/
|
||||
isCalendarPending() {
|
||||
return this.calendarObjectInstance?.isCalendarPending ?? false
|
||||
},
|
||||
/**
|
||||
* Returns whether or not the user is allowed to modify the all-day setting
|
||||
*
|
||||
@ -537,6 +555,7 @@ export default {
|
||||
this.isLoading = true
|
||||
this.isSaving = true
|
||||
try {
|
||||
this.setPendingCalendar(false);
|
||||
await this.$store.dispatch('saveCalendarObjectInstance', {
|
||||
thisAndAllFuture,
|
||||
calendarId: this.calendarId,
|
||||
@ -551,6 +570,44 @@ export default {
|
||||
this.isSaving = false
|
||||
}
|
||||
},
|
||||
setPendingCalendar(isPending = true) {
|
||||
this.calendarObjectInstance.eventComponent.isCalendarPending = isPending
|
||||
this.calendarObjectInstance.isCalendarPending = isPending
|
||||
|
||||
|
||||
},
|
||||
async savePendingCalendar(thisAndAllFuture = false) {
|
||||
if (!this.calendarObject) {
|
||||
logger.error('Calendar-object not found')
|
||||
return
|
||||
}
|
||||
if (this.isReadOnly) {
|
||||
return
|
||||
}
|
||||
if (this.forceThisAndAllFuture) {
|
||||
thisAndAllFuture = true
|
||||
}
|
||||
|
||||
this.isLoading = true
|
||||
this.isSaving = true
|
||||
try {
|
||||
this.setPendingCalendar();
|
||||
await this.$store.dispatch('saveCalendarObjectInstance', {
|
||||
thisAndAllFuture,
|
||||
calendarId: this.calendarId,
|
||||
})
|
||||
this.requiresActionOnRouteLeave = false
|
||||
} catch (error) {
|
||||
logger.error(`Failed to save event: ${error}`)
|
||||
showError(t('calendar', 'Failed to save event'))
|
||||
this.calendarObjectInstance.eventComponent.markDirty()
|
||||
throw error
|
||||
} finally {
|
||||
this.isLoading = false
|
||||
this.isSaving = false
|
||||
this.closeEditor()
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Saves a calendar-object and closes the editor
|
||||
@ -749,6 +806,16 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* Toggles the event pending
|
||||
*/
|
||||
toggleIsCalendarPending(isCalendarPending) {
|
||||
this.$store.commit('toggleIsCalendarPending', {
|
||||
calendarObjectInstance: this.calendarObjectInstance,
|
||||
isCalendarPending
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Resets the internal state after changing the viewed calendar-object
|
||||
|
||||
@ -54,6 +54,8 @@ const getDefaultEventObject = (props = {}) => Object.assign({}, {
|
||||
isAllDay: false,
|
||||
//leave
|
||||
isLeave: false,
|
||||
//calendarPending
|
||||
isCalendarPending: false,
|
||||
// Whether or not the user is allowed to toggle the all-day checkbox
|
||||
canModifyAllDay: true,
|
||||
// Location that the event takes places in
|
||||
@ -109,6 +111,7 @@ const mapEventComponentToEventObject = (eventComponent) => {
|
||||
title: eventComponent.title,
|
||||
isAllDay: eventComponent.isAllDay(),
|
||||
isLeave: false,
|
||||
isCalendarPending: false,
|
||||
canModifyAllDay: eventComponent.canModifyAllDay(),
|
||||
location: eventComponent.location,
|
||||
client : "CLIENT",
|
||||
@ -214,6 +217,9 @@ const mapEventComponentToEventObject = (eventComponent) => {
|
||||
if(eventComponent.hasProperty('ISLEAVE')){
|
||||
eventObject.isLeave = eventComponent.getFirstPropertyFirstValue('ISLEAVE') === '1' ? true : false;
|
||||
}
|
||||
if(eventComponent.hasProperty('ISCALENDARPENDING')){
|
||||
eventObject.isCalendarPending = eventComponent.getFirstPropertyFirstValue('ISCALENDARPENDING') === '1' ? true : false;
|
||||
}
|
||||
|
||||
return eventObject;
|
||||
}
|
||||
@ -230,6 +236,7 @@ const copyCalendarObjectInstanceIntoEventComponent = (eventObject, eventComponen
|
||||
eventComponent.client = eventObject.client
|
||||
eventComponent.embalmer = eventObject.embalmer
|
||||
eventComponent.isLeave = eventObject.isLeave
|
||||
eventComponent.isCalendarPending = eventObject.isCalendarPending
|
||||
eventComponent.comment = eventObject.comment
|
||||
eventComponent.description = eventObject.description
|
||||
eventComponent.accessClass = eventObject.accessClass
|
||||
|
||||
@ -302,6 +302,18 @@ const mutations = {
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Is Calendar Pending
|
||||
*
|
||||
* @param {object} state The Vuex state
|
||||
* @param {object} data The destructuring object
|
||||
* @param {object} data.calendarObjectInstance The calendarObjectInstance object
|
||||
*/
|
||||
toggleIsCalendarPending(state, { calendarObjectInstance, isCalendarPending }) {
|
||||
calendarObjectInstance.eventComponent.isCalendarPending = isCalendarPending
|
||||
calendarObjectInstance.isCalendarPending = isCalendarPending
|
||||
},
|
||||
|
||||
/**
|
||||
* Changes the time of a timed event to the default values
|
||||
*
|
||||
@ -1713,7 +1725,6 @@ const actions = {
|
||||
async saveCalendarObjectInstance({ state, dispatch, commit }, { thisAndAllFuture, calendarId }) {
|
||||
const eventComponent = state.calendarObjectInstance.eventComponent
|
||||
const calendarObject = state.calendarObject
|
||||
|
||||
updateAlarms(eventComponent)
|
||||
updateTalkParticipants(eventComponent)
|
||||
let client = eventComponent.client;
|
||||
@ -1721,19 +1732,18 @@ const actions = {
|
||||
let additionalFieldWasUpdated =
|
||||
eventComponent.client != null ||
|
||||
eventComponent.comment != null ||
|
||||
eventComponent.isLeave != null;
|
||||
eventComponent.isLeave != null ||
|
||||
eventComponent.isCalendarPending != null;
|
||||
if (eventComponent.isDirty() || additionalFieldWasUpdated) {
|
||||
const isForkedItem = eventComponent.primaryItem !== null
|
||||
let original = null
|
||||
let fork = null
|
||||
|
||||
// We check if two things apply:
|
||||
// - primaryItem !== null -> Is this a fork or not?
|
||||
// - eventComponent.canCreateRecurrenceExceptions() - Can we create a recurrence-exception for this item
|
||||
if (isForkedItem && eventComponent.canCreateRecurrenceExceptions()) {
|
||||
[original, fork] = eventComponent.createRecurrenceException(thisAndAllFuture)
|
||||
}
|
||||
|
||||
await dispatch('updateCalendarObject', { calendarObject })
|
||||
|
||||
if (original !== null && fork !== null && original.root !== fork.root) {
|
||||
|
||||
@ -230,16 +230,58 @@ const actions = {
|
||||
if(eventComponent != null){
|
||||
if(eventComponent.client != null){
|
||||
let newClientKeyValue = "CLIENT:"+eventComponent.client;
|
||||
icsValue = icsValue.replace(/CLIENT:\d+/, newClientKeyValue);
|
||||
let regex = /CLIENT:\d+/;
|
||||
if(regex.test(icsValue)){
|
||||
icsValue = icsValue.replace(regex, newClientKeyValue);
|
||||
}
|
||||
else{
|
||||
const customKeyValue = {
|
||||
"CLIENT": isCalendarPendingValue
|
||||
};
|
||||
icsValue = setCustomKeyValuesArrayToIcsAndReturnIcs(icsValue,customKeyValue);
|
||||
}
|
||||
}
|
||||
if(eventComponent.comment != null){
|
||||
let newCommentKeyValue = "COMMENT:"+eventComponent.comment;
|
||||
icsValue = icsValue.replace(/COMMENT:[^\s]+/, newCommentKeyValue);
|
||||
let regex = /COMMENT:[^\s]+/;
|
||||
if(regex.test(icsValue)){
|
||||
icsValue = icsValue.replace(regex, newCommentKeyValue);
|
||||
}
|
||||
else{
|
||||
const customKeyValue = {
|
||||
"COMMENT": eventComponent.comment
|
||||
};
|
||||
icsValue = setCustomKeyValuesArrayToIcsAndReturnIcs(icsValue,customKeyValue);
|
||||
}
|
||||
}
|
||||
if(eventComponent.isLeave != null){
|
||||
let isLeaveValue = eventComponent.isLeave ? "1" : "0";
|
||||
let newIsLeaveKeyValue = "ISLEAVE:"+isLeaveValue;
|
||||
icsValue = icsValue.replace(/ISLEAVE:\d+/, newIsLeaveKeyValue);
|
||||
let regex = /ISLEAVE:\d+/;
|
||||
if(regex.test(icsValue)){
|
||||
icsValue = icsValue.replace(regex, newIsLeaveKeyValue);
|
||||
}
|
||||
else{
|
||||
const customKeyValue = {
|
||||
"ISLEAVE": isLeaveValue
|
||||
};
|
||||
icsValue = setCustomKeyValuesArrayToIcsAndReturnIcs(icsValue,customKeyValue);
|
||||
}
|
||||
}
|
||||
if(eventComponent.isCalendarPending != null){
|
||||
debugger;
|
||||
let isCalendarPendingValue = eventComponent.isCalendarPending ? "1" : "0";
|
||||
let newIsCalendarPendingKeyValue = "ISCALENDARPENDING:"+isCalendarPendingValue;
|
||||
let regex = /ISCALENDARPENDING:\d+/;
|
||||
if(regex.test(icsValue)){
|
||||
icsValue = icsValue.replace(regex, newIsCalendarPendingKeyValue);
|
||||
}
|
||||
else{
|
||||
const customKeyValue = {
|
||||
"ISCALENDARPENDING": isCalendarPendingValue
|
||||
};
|
||||
icsValue = setCustomKeyValuesArrayToIcsAndReturnIcs(icsValue,customKeyValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
calendarObject.dav.data = icsValue;
|
||||
@ -261,6 +303,7 @@ const actions = {
|
||||
"EMBALMER": eventComponent.embalmer,
|
||||
"COMMENT": eventComponent.comment,
|
||||
"ISLEAVE": eventComponent.isLeave ? "1" : "0",
|
||||
"ISCALENDARPENDING": eventComponent.isCalendarPending ? "1" : "0",
|
||||
};
|
||||
icsValue = setCustomKeyValuesArrayToIcsAndReturnIcs(icsValue,customKeyValue);
|
||||
}
|
||||
|
||||
@ -108,6 +108,11 @@
|
||||
:is-leave="isLeave"
|
||||
@toggle-is-leave="toggleIsLeave" />
|
||||
|
||||
<!-- <PropertyIsCalendarPending
|
||||
:is-read-only="isReadOnly"
|
||||
:is-calendar-pending="isCalendarPending"
|
||||
@toggle-is-calendar-pending="toggleIsCalendarPending" /> -->
|
||||
|
||||
<PropertySelectClient class="property-location"
|
||||
url="/apps/gestion/ajaxGetClientsName"
|
||||
:is-read-only="isReadOnly"
|
||||
@ -262,10 +267,15 @@
|
||||
class="app-sidebar-tab__buttons"
|
||||
:can-create-recurrence-exception="canCreateRecurrenceException"
|
||||
:is-new="isNew"
|
||||
:is-calendar-pending="isCalendarPending"
|
||||
|
||||
:isReadOnly="false"
|
||||
:force-this-and-all-future="forceThisAndAllFuture"
|
||||
@save-this-only="prepareAccessForAttachments(false)"
|
||||
@save-this-and-all-future="prepareAccessForAttachments(true)" />
|
||||
@save-this-and-all-future="prepareAccessForAttachments(true)"
|
||||
@save-pending-calendar-event="saveAsPendingCalendarEvent"
|
||||
|
||||
/>
|
||||
</NcAppSidebarTab>
|
||||
<NcAppSidebarTab v-if="!isLoading && !isError"
|
||||
id="app-sidebar-tab-attendees"
|
||||
@ -287,10 +297,13 @@
|
||||
class="app-sidebar-tab__buttons"
|
||||
:can-create-recurrence-exception="canCreateRecurrenceException"
|
||||
:is-new="isNew"
|
||||
:is-calendar-pending="isCalendarPending"
|
||||
|
||||
:isReadOnly="false"
|
||||
:force-this-and-all-future="forceThisAndAllFuture"
|
||||
@save-this-only="prepareAccessForAttachments(false)"
|
||||
@save-this-and-all-future="prepareAccessForAttachments(true)" />
|
||||
@save-this-and-all-future="prepareAccessForAttachments(true)"
|
||||
@save-pending-calendar-event="saveAsPendingCalendarEvent"/>
|
||||
</NcAppSidebarTab>
|
||||
<NcAppSidebarTab v-if="!isLoading && !isError && showResources"
|
||||
id="app-sidebar-tab-resources"
|
||||
@ -309,10 +322,13 @@
|
||||
class="app-sidebar-tab__buttons"
|
||||
:can-create-recurrence-exception="canCreateRecurrenceException"
|
||||
:is-new="isNew"
|
||||
:is-calendar-pending="isCalendarPending"
|
||||
|
||||
:isReadOnly="false"
|
||||
:force-this-and-all-future="forceThisAndAllFuture"
|
||||
@save-this-only="prepareAccessForAttachments(false)"
|
||||
@save-this-and-all-future="prepareAccessForAttachments(true)" />
|
||||
@save-this-and-all-future="prepareAccessForAttachments(true)"
|
||||
@save-pending-calendar-event="saveAsPendingCalendarEvent"/>
|
||||
</NcAppSidebarTab>
|
||||
</NcAppSidebar>
|
||||
</template>
|
||||
@ -370,7 +386,8 @@ import PropertySelectAjaxMultiple from "../components/Editor/Properties/Property
|
||||
import PropertySelectLieu from "../components/Editor/Properties/PropertySelectLieu.vue";
|
||||
import PropertySelectClient from "../components/Editor/Properties/PropertySelectClient.vue";
|
||||
import PropertySelectArticle from "../components/Editor/Properties/PropertySelectArticle.vue";
|
||||
import PropertyIsLeave from '../components/Editor/Properties/PropertyIsLeave.vue'
|
||||
import PropertyIsLeave from '../components/Editor/Properties/PropertyIsLeave.vue';
|
||||
import PropertyIsCalendarPending from '../components/Editor/Properties/PropertyIsCalendarPending';
|
||||
|
||||
export default {
|
||||
name: 'EditSidebar',
|
||||
@ -380,6 +397,7 @@ export default {
|
||||
PropertySelectLieu,
|
||||
PropertySelectClient,
|
||||
PropertySelectArticle,
|
||||
PropertyIsCalendarPending,
|
||||
PropertyIsLeave,
|
||||
ResourceList,
|
||||
PropertyColor,
|
||||
@ -425,6 +443,8 @@ export default {
|
||||
sharedProgress: 0,
|
||||
showPreloader: false,
|
||||
defuntUrl: undefined,
|
||||
isCalendarPending: false,
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -487,12 +507,13 @@ export default {
|
||||
handler() {
|
||||
if(this.calendarObjectInstance) {
|
||||
this.getDefuntUrl()
|
||||
this.isCalendarPending = this.calendarObjectInstance.isCalendarPending ?? false;
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
methods: {
|
||||
/**
|
||||
* Update the start and end date of this event
|
||||
*
|
||||
@ -722,7 +743,21 @@ export default {
|
||||
},
|
||||
viewDefunt(){
|
||||
window.open(this.defuntUrl, '_blank')
|
||||
}
|
||||
},
|
||||
async saveAsPendingCalendarEvent() {
|
||||
if (this.isNew) {
|
||||
await this.savePendingCalendar(false);
|
||||
return;
|
||||
}
|
||||
|
||||
this.isViewing = true;
|
||||
try {
|
||||
await this.savePendingCalendar(false);
|
||||
this.requiresActionOnRouteLeave = false;
|
||||
} catch (error) {
|
||||
this.isViewing = false;
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -22,13 +22,15 @@
|
||||
-->
|
||||
|
||||
<template>
|
||||
<Popover ref="popover"
|
||||
<Popover
|
||||
ref="popover"
|
||||
:shown="showPopover"
|
||||
:auto-hide="false"
|
||||
:placement="placement"
|
||||
:boundary="boundaryElement"
|
||||
popover-base-class="event-popover"
|
||||
:triggers="[]">
|
||||
:triggers="[]"
|
||||
>
|
||||
<div class="event-popover__inner">
|
||||
<template v-if="isLoading && !isSaving">
|
||||
<PopoverLoadingIndicator />
|
||||
@ -41,12 +43,15 @@
|
||||
<template #icon>
|
||||
<Close :size="20" decorative />
|
||||
</template>
|
||||
{{ $t('calendar', 'Close') }}
|
||||
{{ $t("calendar", "Close") }}
|
||||
</ActionButton>
|
||||
</Actions>
|
||||
</div>
|
||||
|
||||
<EmptyContent :name="$t('calendar', 'Event does not exist')" :description="error">
|
||||
<EmptyContent
|
||||
:name="$t('calendar', 'Event does not exist')"
|
||||
:description="error"
|
||||
>
|
||||
<template #icon>
|
||||
<CalendarBlank :size="20" decorative />
|
||||
</template>
|
||||
@ -56,36 +61,50 @@
|
||||
<template v-else>
|
||||
<div class="event-popover__top-right-actions">
|
||||
<Actions v-if="!isLoading && !isError && !isNew" :force-menu="true">
|
||||
<ActionLink v-if="!hideEventExport && hasDownloadURL"
|
||||
:href="downloadURL">
|
||||
<ActionLink
|
||||
v-if="!hideEventExport && hasDownloadURL"
|
||||
:href="downloadURL"
|
||||
>
|
||||
<template #icon>
|
||||
<Download :size="20" decorative />
|
||||
</template>
|
||||
{{ $t('calendar', 'Export') }}
|
||||
{{ $t("calendar", "Export") }}
|
||||
</ActionLink>
|
||||
<ActionButton v-if="!canCreateRecurrenceException && !isReadOnly" @click="duplicateEvent()">
|
||||
<ActionButton
|
||||
v-if="!canCreateRecurrenceException && !isReadOnly"
|
||||
@click="duplicateEvent()"
|
||||
>
|
||||
<template #icon>
|
||||
<ContentDuplicate :size="20" decorative />
|
||||
</template>
|
||||
{{ $t('calendar', 'Duplicate') }}
|
||||
{{ $t("calendar", "Duplicate") }}
|
||||
</ActionButton>
|
||||
<ActionButton v-if="canDelete && !canCreateRecurrenceException" @click="deleteAndLeave(false)">
|
||||
<ActionButton
|
||||
v-if="canDelete && !canCreateRecurrenceException"
|
||||
@click="deleteAndLeave(false)"
|
||||
>
|
||||
<template #icon>
|
||||
<Delete :size="20" decorative />
|
||||
</template>
|
||||
{{ $t('calendar', 'Delete') }}
|
||||
{{ $t("calendar", "Delete") }}
|
||||
</ActionButton>
|
||||
<ActionButton v-if="canDelete && canCreateRecurrenceException" @click="deleteAndLeave(false)">
|
||||
<ActionButton
|
||||
v-if="canDelete && canCreateRecurrenceException"
|
||||
@click="deleteAndLeave(false)"
|
||||
>
|
||||
<template #icon>
|
||||
<Delete :size="20" decorative />
|
||||
</template>
|
||||
{{ $t('calendar', 'Delete this occurrence') }}
|
||||
{{ $t("calendar", "Delete this occurrence") }}
|
||||
</ActionButton>
|
||||
<ActionButton v-if="canDelete && canCreateRecurrenceException" @click="deleteAndLeave(true)">
|
||||
<ActionButton
|
||||
v-if="canDelete && canCreateRecurrenceException"
|
||||
@click="deleteAndLeave(true)"
|
||||
>
|
||||
<template #icon>
|
||||
<Delete :size="20" decorative />
|
||||
</template>
|
||||
{{ $t('calendar', 'Delete this and all future') }}
|
||||
{{ $t("calendar", "Delete this and all future") }}
|
||||
</ActionButton>
|
||||
</Actions>
|
||||
<Actions>
|
||||
@ -93,21 +112,26 @@
|
||||
<template #icon>
|
||||
<Close :size="20" decorative />
|
||||
</template>
|
||||
{{ $t('calendar', 'Close') }}
|
||||
{{ $t("calendar", "Close") }}
|
||||
</ActionButton>
|
||||
</Actions>
|
||||
</div>
|
||||
|
||||
<CalendarPickerHeader :value="selectedCalendar"
|
||||
<CalendarPickerHeader
|
||||
:value="selectedCalendar"
|
||||
:calendars="calendars"
|
||||
:is-read-only="isReadOnlyOrViewing || !canModifyCalendar"
|
||||
@update:value="changeCalendar" />
|
||||
@update:value="changeCalendar"
|
||||
/>
|
||||
|
||||
<PropertyTitle :value="titleOrPlaceholder"
|
||||
<PropertyTitle
|
||||
:value="titleOrPlaceholder"
|
||||
:is-read-only="isReadOnlyOrViewing"
|
||||
@update:value="updateTitle" />
|
||||
@update:value="updateTitle"
|
||||
/>
|
||||
|
||||
<PropertyTitleTimePicker :start-date="startDate"
|
||||
<PropertyTitleTimePicker
|
||||
:start-date="startDate"
|
||||
:start-timezone="startTimezone"
|
||||
:end-date="endDate"
|
||||
:end-timezone="endTimezone"
|
||||
@ -119,28 +143,39 @@
|
||||
@update-start-timezone="updateStartTimezone"
|
||||
@update-end-date="updateEndDate"
|
||||
@update-end-timezone="updateEndTimezone"
|
||||
@toggle-all-day="toggleAllDay"/>
|
||||
@toggle-all-day="toggleAllDay"
|
||||
/>
|
||||
|
||||
<PropertyIsLeave
|
||||
:is-read-only="isReadOnlyOrViewing"
|
||||
:is-leave="isLeave"
|
||||
@toggle-is-leave="toggleIsLeave" />
|
||||
@toggle-is-leave="toggleIsLeave"
|
||||
/>
|
||||
|
||||
<PropertySelectClient class="property-location"
|
||||
url="/apps/gestion/ajaxGetClientsName"
|
||||
:is-read-only="isReadOnly"
|
||||
:prop-model="rfcProps.clients"
|
||||
:value="client"
|
||||
:linkify-links="true"
|
||||
@update:value="updateClient" />
|
||||
<!-- <PropertyIsCalendarPending
|
||||
:is-read-only="isReadOnlyOrViewing"
|
||||
:is-calendar-pending="isCalendarPending"
|
||||
@toggle-is-calendar-pending="toggleIsCalendarPending" /> -->
|
||||
|
||||
<PropertySelectLieu class="property-location"
|
||||
url="/apps/gestion/ajaxGetLieux"
|
||||
:is-read-only="isReadOnly"
|
||||
:prop-model="rfcProps.locations"
|
||||
:value="location"
|
||||
:linkify-links="true"
|
||||
@update:value="updateLocation" />
|
||||
<PropertySelectClient
|
||||
class="property-location"
|
||||
url="/apps/gestion/ajaxGetClientsName"
|
||||
:is-read-only="isReadOnly"
|
||||
:prop-model="rfcProps.clients"
|
||||
:value="client"
|
||||
:linkify-links="true"
|
||||
@update:value="updateClient"
|
||||
/>
|
||||
|
||||
<PropertySelectLieu
|
||||
class="property-location"
|
||||
url="/apps/gestion/ajaxGetLieux"
|
||||
:is-read-only="isReadOnly"
|
||||
:prop-model="rfcProps.locations"
|
||||
:value="location"
|
||||
:linkify-links="true"
|
||||
@update:value="updateLocation"
|
||||
/>
|
||||
|
||||
<PropertySelectArticle
|
||||
:is-read-only="isReadOnlyOrViewing"
|
||||
@ -149,17 +184,19 @@
|
||||
:value="description"
|
||||
:linkify-links="true"
|
||||
@add-single-value="addArticle"
|
||||
@remove-single-value="removeArticle" />
|
||||
@remove-single-value="removeArticle"
|
||||
/>
|
||||
|
||||
<PropertyText
|
||||
:is-read-only="isReadOnly"
|
||||
:prop-model="rfcProps.comment"
|
||||
:value="comment"
|
||||
:value="comment"
|
||||
:linkify-links="false"
|
||||
@update:value="updateComment"
|
||||
/>
|
||||
|
||||
<InviteesList class="event-popover__invitees"
|
||||
<InviteesList
|
||||
class="event-popover__invitees"
|
||||
:hide-if-empty="true"
|
||||
:hide-buttons="true"
|
||||
:hide-errors="true"
|
||||
@ -167,15 +204,20 @@
|
||||
:is-read-only="isReadOnlyOrViewing"
|
||||
:is-shared-with-me="isSharedWithMe"
|
||||
:calendar-object-instance="calendarObjectInstance"
|
||||
:limit="3" />
|
||||
:limit="3"
|
||||
/>
|
||||
|
||||
<InvitationResponseButtons v-if="isViewedByAttendee && isViewing"
|
||||
<InvitationResponseButtons
|
||||
v-if="isViewedByAttendee && isViewing"
|
||||
class="event-popover__response-buttons"
|
||||
:attendee="userAsAttendee"
|
||||
:calendar-id="calendarId"
|
||||
@close="closeEditorAndSkipAction" />
|
||||
@close="closeEditorAndSkipAction"
|
||||
/>
|
||||
|
||||
|
||||
<SaveButtons v-if="!isWidget"
|
||||
<SaveButtons
|
||||
v-if="!isWidget"
|
||||
class="event-popover__buttons"
|
||||
:can-create-recurrence-exception="canCreateRecurrenceException"
|
||||
:is-new="isNew"
|
||||
@ -185,24 +227,29 @@
|
||||
:more-button-type="isViewing ? 'tertiary' : undefined"
|
||||
:grow-horizontally="!isViewing && canCreateRecurrenceException"
|
||||
:disabled="isSaving"
|
||||
:is-calendar-pending="isCalendarPending"
|
||||
@save-this-only="saveAndView(false)"
|
||||
@save-this-and-all-future="saveAndView(true)"
|
||||
@show-more="showMore">
|
||||
<NcButton
|
||||
@click="viewDefunt"
|
||||
v-if="defuntUrl"
|
||||
:type="undefined"
|
||||
@show-more="showMore"
|
||||
@save-pending-calendar-event="saveAsPendingCalendarEvent"
|
||||
>
|
||||
<NcButton
|
||||
@click="viewDefunt"
|
||||
v-if="defuntUrl"
|
||||
:type="undefined"
|
||||
:class="'d-flex w-max-content'"
|
||||
>
|
||||
Voir le defunt
|
||||
</NcButton>
|
||||
<NcButton v-if="!isReadOnly && isViewing"
|
||||
<NcButton
|
||||
v-if="!isReadOnly && isViewing"
|
||||
:type="isViewedByAttendee ? 'tertiary' : undefined"
|
||||
@click="isViewing = false">
|
||||
@click="isViewing = false"
|
||||
>
|
||||
<template #icon>
|
||||
<EditIcon :size="20" />
|
||||
</template>
|
||||
{{ $t('calendar', 'Edit') }}
|
||||
{{ $t("calendar", "Edit") }}
|
||||
</NcButton>
|
||||
</SaveButtons>
|
||||
</template>
|
||||
@ -217,43 +264,42 @@ import {
|
||||
NcEmptyContent as EmptyContent,
|
||||
NcPopover as Popover,
|
||||
NcButton,
|
||||
} from '@nextcloud/vue'
|
||||
import axios from 'axios'
|
||||
import { generateUrl } from '@nextcloud/router'
|
||||
import EditorMixin from '../mixins/EditorMixin.js'
|
||||
import PropertyTitle from '../components/Editor/Properties/PropertyTitle.vue'
|
||||
import PropertyTitleTimePicker
|
||||
from '../components/Editor/Properties/PropertyTitleTimePicker.vue'
|
||||
import PropertyText from '../components/Editor/Properties/PropertyText.vue'
|
||||
import SaveButtons from '../components/Editor/SaveButtons.vue'
|
||||
import PopoverLoadingIndicator
|
||||
from '../components/Popover/PopoverLoadingIndicator.vue'
|
||||
import { getPrefixedRoute } from '../utils/router.js'
|
||||
import InvitationResponseButtons
|
||||
from '../components/Editor/InvitationResponseButtons.vue'
|
||||
import CalendarPickerHeader from '../components/Editor/CalendarPickerHeader.vue'
|
||||
import InviteesList from '../components/Editor/Invitees/InviteesList.vue'
|
||||
} from "@nextcloud/vue";
|
||||
import axios from "axios";
|
||||
import { generateUrl } from "@nextcloud/router";
|
||||
import EditorMixin from "../mixins/EditorMixin.js";
|
||||
import PropertyTitle from "../components/Editor/Properties/PropertyTitle.vue";
|
||||
import PropertyTitleTimePicker from "../components/Editor/Properties/PropertyTitleTimePicker.vue";
|
||||
import PropertyText from "../components/Editor/Properties/PropertyText.vue";
|
||||
import SaveButtons from "../components/Editor/SaveButtons.vue";
|
||||
import PopoverLoadingIndicator from "../components/Popover/PopoverLoadingIndicator.vue";
|
||||
import { getPrefixedRoute } from "../utils/router.js";
|
||||
import InvitationResponseButtons from "../components/Editor/InvitationResponseButtons.vue";
|
||||
import CalendarPickerHeader from "../components/Editor/CalendarPickerHeader.vue";
|
||||
import InviteesList from "../components/Editor/Invitees/InviteesList.vue";
|
||||
|
||||
import CalendarBlank from 'vue-material-design-icons/CalendarBlank.vue'
|
||||
import Close from 'vue-material-design-icons/Close.vue'
|
||||
import Delete from 'vue-material-design-icons/Delete.vue'
|
||||
import Download from 'vue-material-design-icons/Download.vue'
|
||||
import ContentDuplicate from 'vue-material-design-icons/ContentDuplicate.vue'
|
||||
import EditIcon from 'vue-material-design-icons/Pencil.vue'
|
||||
import { mapState } from 'vuex'
|
||||
import {showError} from "@nextcloud/dialogs";
|
||||
import CalendarBlank from "vue-material-design-icons/CalendarBlank.vue";
|
||||
import Close from "vue-material-design-icons/Close.vue";
|
||||
import Delete from "vue-material-design-icons/Delete.vue";
|
||||
import Download from "vue-material-design-icons/Download.vue";
|
||||
import ContentDuplicate from "vue-material-design-icons/ContentDuplicate.vue";
|
||||
import EditIcon from "vue-material-design-icons/Pencil.vue";
|
||||
import { mapState } from "vuex";
|
||||
import { showError } from "@nextcloud/dialogs";
|
||||
import PropertySelect from "../components/Editor/Properties/PropertySelect.vue";
|
||||
import PropertySelectAjax from "../components/Editor/Properties/PropertySelectAjax.vue";
|
||||
import PropertySelectAjaxMultiple from "../components/Editor/Properties/PropertySelectAjaxMultiple.vue";
|
||||
import PropertySelectLieu from "../components/Editor/Properties/PropertySelectLieu.vue";
|
||||
import PropertySelectClient from "../components/Editor/Properties/PropertySelectClient.vue";
|
||||
import PropertySelectArticle from "../components/Editor/Properties/PropertySelectArticle.vue";
|
||||
import PropertyIsLeave from '../components/Editor/Properties/PropertyIsLeave.vue'
|
||||
import PropertyIsLeave from "../components/Editor/Properties/PropertyIsLeave.vue";
|
||||
import PropertyIsCalendarPending from "../components/Editor/Properties/PropertyIsCalendarPending";
|
||||
|
||||
export default {
|
||||
name: 'EditSimple',
|
||||
name: "EditSimple",
|
||||
components: {
|
||||
PropertyIsLeave,
|
||||
PropertyIsCalendarPending,
|
||||
PropertySelectAjaxMultiple,
|
||||
PropertySelectAjax,
|
||||
PropertySelectLieu,
|
||||
@ -281,19 +327,18 @@ export default {
|
||||
NcButton,
|
||||
EditIcon,
|
||||
},
|
||||
mixins: [
|
||||
EditorMixin,
|
||||
],
|
||||
mixins: [EditorMixin],
|
||||
data() {
|
||||
return {
|
||||
placement: 'auto',
|
||||
placement: "auto",
|
||||
hasLocation: false,
|
||||
hasDescription: false,
|
||||
isCalendarPending: false,
|
||||
boundaryElement: null,
|
||||
isVisible: true,
|
||||
isViewing: true,
|
||||
defuntUrl: undefined,
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
@ -304,7 +349,7 @@ export default {
|
||||
}),
|
||||
|
||||
showPopover() {
|
||||
return this.isVisible || this.widgetEventDetailsOpen
|
||||
return this.isVisible || this.widgetEventDetailsOpen;
|
||||
},
|
||||
|
||||
/**
|
||||
@ -313,7 +358,7 @@ export default {
|
||||
* @return {boolean}
|
||||
*/
|
||||
isReadOnlyOrViewing() {
|
||||
return this.isReadOnly || this.isViewing || this.isWidget
|
||||
return this.isReadOnly || this.isViewing || this.isWidget;
|
||||
},
|
||||
|
||||
/**
|
||||
@ -322,123 +367,148 @@ export default {
|
||||
* @return {string}
|
||||
*/
|
||||
titleOrPlaceholder() {
|
||||
if (this.title === '' && this.isReadOnlyOrViewing && !this.isLoading) {
|
||||
return t('calendar', 'Untitled event')
|
||||
if (this.title === "" && this.isReadOnlyOrViewing && !this.isLoading) {
|
||||
return t("calendar", "Untitled event");
|
||||
}
|
||||
|
||||
return this.title
|
||||
return this.title;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
$route(to, from) {
|
||||
this.repositionPopover()
|
||||
this.repositionPopover();
|
||||
|
||||
// Hide popover when changing the view until the user selects a slot again
|
||||
this.isVisible = to?.params.view === from?.params.view
|
||||
this.isVisible = to?.params.view === from?.params.view;
|
||||
},
|
||||
calendarObjectInstance() {
|
||||
this.hasLocation = false
|
||||
this.hasDescription = false
|
||||
this.hasLocation = false;
|
||||
this.hasDescription = false;
|
||||
|
||||
if (typeof this.calendarObjectInstance.location === 'string' && this.calendarObjectInstance.location.trim() !== '') {
|
||||
this.hasLocation = true
|
||||
}
|
||||
if (typeof this.calendarObjectInstance.description === 'string' && this.calendarObjectInstance.description.trim() !== '') {
|
||||
this.hasDescription = true
|
||||
}
|
||||
if(this.calendarObjectInstance) {
|
||||
this.getDefuntUrl()
|
||||
}
|
||||
},
|
||||
if (
|
||||
typeof this.calendarObjectInstance.location === "string" &&
|
||||
this.calendarObjectInstance.location.trim() !== ""
|
||||
) {
|
||||
this.hasLocation = true;
|
||||
}
|
||||
if (
|
||||
typeof this.calendarObjectInstance.description === "string" &&
|
||||
this.calendarObjectInstance.description.trim() !== ""
|
||||
) {
|
||||
this.hasDescription = true;
|
||||
}
|
||||
if (this.calendarObjectInstance) {
|
||||
this.getDefuntUrl();
|
||||
this.isCalendarPending = this.calendarObjectInstance.isCalendarPending ?? false;
|
||||
}
|
||||
|
||||
},
|
||||
isNew: {
|
||||
immediate: true,
|
||||
handler(isNew) {
|
||||
// New events should be editable from the start
|
||||
this.isViewing = !isNew
|
||||
this.isViewing = !isNew;
|
||||
},
|
||||
},
|
||||
},
|
||||
async mounted() {
|
||||
if (this.isWidget) {
|
||||
const objectId = this.widgetEventDetails.object
|
||||
const recurrenceId = this.widgetEventDetails.recurrenceId
|
||||
await this.$store.dispatch('getCalendarObjectInstanceByObjectIdAndRecurrenceId', { objectId, recurrenceId })
|
||||
this.calendarId = this.calendarObject.calendarId
|
||||
this.isLoading = false
|
||||
const objectId = this.widgetEventDetails.object;
|
||||
const recurrenceId = this.widgetEventDetails.recurrenceId;
|
||||
await this.$store.dispatch(
|
||||
"getCalendarObjectInstanceByObjectIdAndRecurrenceId",
|
||||
{ objectId, recurrenceId }
|
||||
);
|
||||
this.calendarId = this.calendarObject.calendarId;
|
||||
this.isLoading = false;
|
||||
}
|
||||
this.boundaryElement = this.isWidget ? document.querySelector('.fc') : document.querySelector('#app-content-vue > .fc')
|
||||
window.addEventListener('keydown', this.keyboardCloseEditor)
|
||||
window.addEventListener('keydown', this.keyboardSaveEvent)
|
||||
window.addEventListener('keydown', this.keyboardDeleteEvent)
|
||||
window.addEventListener('keydown', this.keyboardDuplicateEvent)
|
||||
this.boundaryElement = this.isWidget
|
||||
? document.querySelector(".fc")
|
||||
: document.querySelector("#app-content-vue > .fc");
|
||||
window.addEventListener("keydown", this.keyboardCloseEditor);
|
||||
window.addEventListener("keydown", this.keyboardSaveEvent);
|
||||
window.addEventListener("keydown", this.keyboardDeleteEvent);
|
||||
window.addEventListener("keydown", this.keyboardDuplicateEvent);
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.repositionPopover()
|
||||
})
|
||||
this.repositionPopover();
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('keydown', this.keyboardCloseEditor)
|
||||
window.removeEventListener('keydown', this.keyboardSaveEvent)
|
||||
window.removeEventListener('keydown', this.keyboardDeleteEvent)
|
||||
window.removeEventListener('keydown', this.keyboardDuplicateEvent)
|
||||
window.removeEventListener("keydown", this.keyboardCloseEditor);
|
||||
window.removeEventListener("keydown", this.keyboardSaveEvent);
|
||||
window.removeEventListener("keydown", this.keyboardDeleteEvent);
|
||||
window.removeEventListener("keydown", this.keyboardDuplicateEvent);
|
||||
},
|
||||
methods: {
|
||||
|
||||
showMore() {
|
||||
// Do not save yet
|
||||
this.requiresActionOnRouteLeave = false
|
||||
this.requiresActionOnRouteLeave = false;
|
||||
|
||||
const params = Object.assign({}, this.$route.params)
|
||||
const params = Object.assign({}, this.$route.params);
|
||||
if (this.isNew) {
|
||||
this.$router.push({ name: 'NewSidebarView', params })
|
||||
this.$router.push({ name: "NewSidebarView", params });
|
||||
} else {
|
||||
this.$router.push({
|
||||
name: getPrefixedRoute(this.$route.name, 'EditSidebarView'),
|
||||
name: getPrefixedRoute(this.$route.name, "EditSidebarView"),
|
||||
params,
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
getDomElementForPopover(isNew, route) {
|
||||
let matchingDomObject
|
||||
let matchingDomObject;
|
||||
if (this.isWidget) {
|
||||
const objectId = this.widgetEventDetails.object
|
||||
const recurrenceId = this.widgetEventDetails.recurrenceId
|
||||
const objectId = this.widgetEventDetails.object;
|
||||
const recurrenceId = this.widgetEventDetails.recurrenceId;
|
||||
|
||||
matchingDomObject = this.widgetRef.querySelector(`.fc-event[data-object-id="${objectId}"][data-recurrence-id="${recurrenceId}"]`)
|
||||
this.placement = 'auto'
|
||||
matchingDomObject = this.widgetRef.querySelector(
|
||||
`.fc-event[data-object-id="${objectId}"][data-recurrence-id="${recurrenceId}"]`
|
||||
);
|
||||
this.placement = "auto";
|
||||
} else if (isNew) {
|
||||
matchingDomObject = document.querySelector('.fc-highlight')
|
||||
this.placement = 'auto'
|
||||
matchingDomObject = document.querySelector(".fc-highlight");
|
||||
this.placement = "auto";
|
||||
|
||||
if (!matchingDomObject) {
|
||||
matchingDomObject = document.querySelector('.fc-event[data-is-new="yes"]')
|
||||
matchingDomObject = document.querySelector(
|
||||
'.fc-event[data-is-new="yes"]'
|
||||
);
|
||||
}
|
||||
} else {
|
||||
const objectId = route.params.object
|
||||
const recurrenceId = route.params.recurrenceId
|
||||
const objectId = route.params.object;
|
||||
const recurrenceId = route.params.recurrenceId;
|
||||
|
||||
matchingDomObject = document.querySelector(`.fc-event[data-object-id="${objectId}"][data-recurrence-id="${recurrenceId}"]`)
|
||||
this.placement = 'auto'
|
||||
matchingDomObject = document.querySelector(
|
||||
`.fc-event[data-object-id="${objectId}"][data-recurrence-id="${recurrenceId}"]`
|
||||
);
|
||||
this.placement = "auto";
|
||||
}
|
||||
|
||||
if (!matchingDomObject) {
|
||||
matchingDomObject = document.querySelector('#app-navigation-vue')
|
||||
this.placement = 'right'
|
||||
matchingDomObject = document.querySelector("#app-navigation-vue");
|
||||
this.placement = "right";
|
||||
}
|
||||
|
||||
if (!matchingDomObject) {
|
||||
matchingDomObject = document.querySelector('body')
|
||||
this.placement = 'auto'
|
||||
matchingDomObject = document.querySelector("body");
|
||||
this.placement = "auto";
|
||||
}
|
||||
|
||||
console.info('getDomElementForPopover', matchingDomObject, this.placement)
|
||||
return matchingDomObject
|
||||
console.info(
|
||||
"getDomElementForPopover",
|
||||
matchingDomObject,
|
||||
this.placement
|
||||
);
|
||||
return matchingDomObject;
|
||||
},
|
||||
repositionPopover() {
|
||||
const isNew = this.isWidget ? false : this.$route.name === 'NewPopoverView'
|
||||
this.$refs.popover.$children[0].$refs.reference = this.getDomElementForPopover(isNew, this.$route)
|
||||
this.$refs.popover.$children[0].$refs.popper.dispose()
|
||||
this.$refs.popover.$children[0].$refs.popper.init()
|
||||
const isNew = this.isWidget
|
||||
? false
|
||||
: this.$route.name === "NewPopoverView";
|
||||
this.$refs.popover.$children[0].$refs.reference =
|
||||
this.getDomElementForPopover(isNew, this.$route);
|
||||
this.$refs.popover.$children[0].$refs.popper.dispose();
|
||||
this.$refs.popover.$children[0].$refs.popper.init();
|
||||
},
|
||||
/**
|
||||
* Save changes and leave when creating a new event or return to viewing mode when editing
|
||||
@ -450,32 +520,46 @@ export default {
|
||||
async saveAndView(thisAndAllFuture) {
|
||||
// Transitioning from new to edit routes is not implemented for now
|
||||
if (this.isNew) {
|
||||
await this.saveAndLeave(thisAndAllFuture)
|
||||
return
|
||||
await this.saveAndLeave(thisAndAllFuture);
|
||||
return;
|
||||
}
|
||||
|
||||
this.isViewing = true
|
||||
this.isViewing = true;
|
||||
try {
|
||||
await this.save(thisAndAllFuture)
|
||||
this.requiresActionOnRouteLeave = false
|
||||
await this.save(thisAndAllFuture);
|
||||
this.requiresActionOnRouteLeave = false;
|
||||
} catch (error) {
|
||||
this.isViewing = false
|
||||
this.isViewing = false;
|
||||
}
|
||||
},
|
||||
async saveAsPendingCalendarEvent() {
|
||||
if (this.isNew) {
|
||||
await this.savePendingCalendar(false);
|
||||
return;
|
||||
}
|
||||
|
||||
this.isViewing = true;
|
||||
try {
|
||||
await this.savePendingCalendar(false);
|
||||
this.requiresActionOnRouteLeave = false;
|
||||
} catch (error) {
|
||||
this.isViewing = false;
|
||||
}
|
||||
},
|
||||
|
||||
addArticle(article) {
|
||||
if(this.description && this.description !== "") {
|
||||
if (this.description && this.description !== "") {
|
||||
this.updateDescription(this.description + ";" + article);
|
||||
} else {
|
||||
this.updateDescription(article);
|
||||
}
|
||||
},
|
||||
removeArticle(article) {
|
||||
if(this.description && this.description !== "") {
|
||||
if (this.description && this.description !== "") {
|
||||
let values = [];
|
||||
let items = this.description.split(';');
|
||||
let items = this.description.split(";");
|
||||
items.forEach((item) => {
|
||||
if(item !== article) {
|
||||
if (item !== article) {
|
||||
values.push(item);
|
||||
}
|
||||
});
|
||||
@ -484,19 +568,22 @@ export default {
|
||||
this.updateDescription(null);
|
||||
}
|
||||
},
|
||||
getDefuntUrl(){
|
||||
const url = generateUrl(`/apps/gestion/api/getDefundIdByCalendarUuid/${this.calendarObjectInstance.eventComponent.uid}`)
|
||||
getDefuntUrl() {
|
||||
const url = generateUrl(
|
||||
`/apps/gestion/api/getDefundIdByCalendarUuid/${this.calendarObjectInstance.eventComponent.uid}`
|
||||
);
|
||||
axios.get(url).then((response) => {
|
||||
console.log(this.calendarObjectInstance)
|
||||
if(response.data.id){
|
||||
this.defuntUrl = generateUrl(`/apps/gestion/defunt/${response.data.id}/show`)
|
||||
console.log(this.calendarObjectInstance);
|
||||
if (response.data.id) {
|
||||
this.defuntUrl = generateUrl(
|
||||
`/apps/gestion/defunt/${response.data.id}/show`
|
||||
);
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
},
|
||||
viewDefunt() {
|
||||
window.open(this.defuntUrl, "_blank");
|
||||
},
|
||||
viewDefunt(){
|
||||
window.open(this.defuntUrl, '_blank')
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -177,5 +177,9 @@ return [
|
||||
|
||||
// API
|
||||
['name' => 'api#getDefundIdByCalendarUuid', 'url' => '/api/getDefundIdByCalendarUuid/{uuid}', 'verb' => 'GET'],
|
||||
|
||||
//invoice controller
|
||||
['name' => 'invoice#sendInvoicePdfViaMail', 'url' => '/invoice/{factureId}/sendInvoicePdfViaMail', 'verb' => 'POST'],
|
||||
['name' => 'invoice#getInvoicePdfContent', 'url' => '/invoice/{factureId}/getInvoicePdfContent', 'verb' => 'GET'],
|
||||
]
|
||||
];
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,3 +1,75 @@
|
||||
/*!
|
||||
* Bootstrap backdrop.js v5.2.3 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap base-component.js v5.2.3 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap component-functions.js v5.2.3 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap config.js v5.2.3 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap data.js v5.2.3 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap event-handler.js v5.2.3 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap focustrap.js v5.2.3 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap index.js v5.2.3 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap manipulator.js v5.2.3 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap modal.js v5.2.3 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap scrollbar.js v5.2.3 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap selector-engine.js v5.2.3 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Sizzle CSS Selector Engine v2.3.9
|
||||
* https://sizzlejs.com/
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
9
gestion/lib/Constants/VCalendarPropertyConstant.php
Normal file
9
gestion/lib/Constants/VCalendarPropertyConstant.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace OCA\Gestion\Constants;
|
||||
abstract class VCalendarPropertyConstant
|
||||
{
|
||||
const PROPERTY_IS_LEAVE = "ISLEAVE";
|
||||
const PROPERTY_IS_CALENDAR_PENDING = "ISCALENDARPENDING";
|
||||
}
|
||||
99
gestion/lib/Controller/InvoiceController.php
Normal file
99
gestion/lib/Controller/InvoiceController.php
Normal file
@ -0,0 +1,99 @@
|
||||
<?php
|
||||
namespace OCA\Gestion\Controller;
|
||||
|
||||
use OCA\Gestion\Db\Bdd;
|
||||
use OCA\Gestion\Service\InvoicePdfService;
|
||||
use OCP\AppFramework\Controller;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
use OCP\DB\Exception;
|
||||
use OCP\Files\IRootFolder;
|
||||
use OCP\IRequest;
|
||||
use OCP\Mail\IMailer;
|
||||
|
||||
class InvoiceController extends Controller
|
||||
{
|
||||
private Bdd $gestionRepository;
|
||||
private InvoicePdfService $invoicePdfService;
|
||||
private $rootFolder;
|
||||
private $mailer;
|
||||
private $currentUserIdNextcloud;
|
||||
private $storage;
|
||||
public function __construct(
|
||||
$UserId,
|
||||
$AppName,
|
||||
IRequest $request,
|
||||
Bdd $bdd,
|
||||
InvoicePdfService $invoicePdfService,
|
||||
IRootFolder $rootFolder,
|
||||
IMailer $mailer
|
||||
)
|
||||
{
|
||||
$this->currentUserIdNextcloud = $UserId;
|
||||
$this->invoicePdfService = $invoicePdfService;
|
||||
$this->rootFolder = $rootFolder;
|
||||
$this->mailer = $mailer;
|
||||
$this->gestionRepository = $bdd;
|
||||
try{
|
||||
$this->storage = $rootFolder->getUserFolder($this->currentUserIdNextcloud);
|
||||
}catch(\OC\User\NoUserException $e){
|
||||
|
||||
}
|
||||
parent::__construct($AppName, request: $request);
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*/
|
||||
|
||||
public function getInvoicePdfContent($factureId){
|
||||
$facture = $this->gestionRepository->getFactureByFactureId($factureId);
|
||||
if($facture == null)
|
||||
{
|
||||
return new DataResponse("La facture n'existe pas", 404, ['Content-Type' => 'application/json']);
|
||||
}
|
||||
$factureGeneratedResponse = $this->invoicePdfService->generateFacturePdfByFactureId($factureId,$this->currentUserIdNextcloud);
|
||||
if($factureGeneratedResponse == null){
|
||||
return new DataResponse("La facture n'a pas été générée correctement", 404, ['Content-Type' => 'application/json']);
|
||||
}
|
||||
$factureContent = base64_encode($factureGeneratedResponse['content']);
|
||||
return new DataResponse([
|
||||
"content" => $factureContent
|
||||
], 200, ['Content-Type' => 'application/json']);
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
*/
|
||||
public function sendInvoicePdfViaMail($factureId, $email = '')
|
||||
{
|
||||
$facture = $this->gestionRepository->getFactureByFactureId($factureId);
|
||||
if($facture == null)
|
||||
{
|
||||
return new DataResponse("La facture n'existe pas", 404, ['Content-Type' => 'application/json']);
|
||||
}
|
||||
$factureClientMail = $this->gestionRepository->getFactureClientMailByFactureId($factureId);
|
||||
if($factureClientMail == null){
|
||||
return new DataResponse("Le mail de la facture n'existe pas", 404, ['Content-Type' => 'application/json']);
|
||||
}
|
||||
$factureGeneratedResponse = $this->invoicePdfService->generateFacturePdfByFactureId($factureId,$this->currentUserIdNextcloud);
|
||||
if($factureGeneratedResponse == null){
|
||||
return new DataResponse("La facture n'a pas été générée correctement", 404, ['Content-Type' => 'application/json']);
|
||||
}
|
||||
$factureContent = $factureGeneratedResponse["content"];
|
||||
try {
|
||||
$message = $this->mailer->createMessage();
|
||||
$message->setTo(recipients: [$email => "Facture"]);
|
||||
$content = $this->mailer->createAttachment($factureContent, "Facture.pdf", "application/pdf");
|
||||
$message->attach($content);
|
||||
$message->setSubject("Facture");
|
||||
$message->setPlainBody("Veuiller trouver ci-joint votre facture");
|
||||
$this->mailer->send($message);
|
||||
$this->gestionRepository->setFactureSentDate($factureId);
|
||||
} catch (Exception $e) {
|
||||
return new DataResponse("Veuillez configurer le serveur SMTP sur nextcloud ?", 500, ['Content-Type' => 'application/json']);
|
||||
}
|
||||
return new DataResponse("E-mail envoyé avec succès à ".$email.".", 200, ['Content-Type' => 'application/json']);
|
||||
}
|
||||
}
|
||||
@ -36,7 +36,7 @@ date_default_timezone_set('Europe/Paris');
|
||||
|
||||
class PageController extends Controller {
|
||||
private $idNextcloud;
|
||||
private $myDb;
|
||||
private Bdd $myDb;
|
||||
// private $src_path = "/var/www/html/apps/gestion/img/";
|
||||
private $src_path = "/var/www/html/custom_apps/gestion/img/";
|
||||
|
||||
@ -1580,6 +1580,29 @@ class PageController extends Controller {
|
||||
|
||||
}
|
||||
|
||||
public function sendAttachmentToClientByDefunt($defuntId, $ff_pdf, $to,$subject, $body, $addName = false){
|
||||
$devis = $this->myDb->getDevisOfDefunt($defuntId);
|
||||
if($devis != null){
|
||||
// try {
|
||||
$client_email = $to;
|
||||
$client_nom = $devis['client_nom'];
|
||||
$data = $this->storage->get($ff_pdf)->getContent();
|
||||
$message = $this->mailer->createMessage();
|
||||
$message->setTo(recipients: [$client_email => $client_nom]);
|
||||
// $message->setFrom([$client_email => $client_nom]);
|
||||
$content = $this->mailer->createAttachment($data, basename($ff_pdf), "application/pdf");
|
||||
$message->attach($content);
|
||||
$message->setSubject($subject);
|
||||
$body_text = $addName ? $body." de ".$devis['defunt_nom']: $body;
|
||||
$message->setPlainBody("Bonjour.\n\n".$body_text."!\n\nCordialement.");
|
||||
$this->mailer->send($message);
|
||||
return new DataResponse("", 200, ['Content-Type' => 'application/json']);
|
||||
// } catch (Exception $e) {
|
||||
// return new DataResponse("Is your global mail server configured in Nextcloud ?", 500, ['Content-Type' => 'application/json']);
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
* @NoCSRFRequired
|
||||
@ -1861,7 +1884,7 @@ class PageController extends Controller {
|
||||
* @NoCSRFRequired
|
||||
*/
|
||||
public function getAnnualTurnoverPerMonthNoVat(){
|
||||
return $this->myDb->getAnnualTurnoverPerMonthNoVat($this->idNextcloud);
|
||||
return $this->myDb->retrieveTotalInvoicesForTheYear();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -2005,7 +2028,7 @@ class PageController extends Controller {
|
||||
* @NoCSRFRequired
|
||||
* @param string $numdefunt
|
||||
*/
|
||||
public function saveRapportSoin($numdefunt){
|
||||
public function saveRapportSoin($numdefunt, $email = ''){
|
||||
$defaultConfig = json_decode($this->myDb->getConfiguration(BddConstant::DEFAULT_ADMIN_ID_NEXTCLOUD));
|
||||
$defunt = json_decode($this->myDb->getOneDefunt($numdefunt, $this->idNextcloud))[0];
|
||||
$observations = json_decode($this->myDb->getListObservations($numdefunt, $this->idNextcloud));
|
||||
@ -2251,6 +2274,11 @@ class PageController extends Controller {
|
||||
|
||||
$file_pdf = $this->storage->get($ff_pdf);
|
||||
$file_pdf->putContent($pdfContent);
|
||||
|
||||
if($ff_pdf != null && trim($email) != ''){
|
||||
//send email
|
||||
$this->sendAttachmentToClientByDefunt($defunt->id, $ff_pdf, $email,"Rapport soins", "Veuillez trouver ci-joint le rapport de soins de ".$nomDefunt.".");
|
||||
}
|
||||
|
||||
$res = array();
|
||||
$res['path'] = $folderDestination;
|
||||
@ -2291,7 +2319,7 @@ class PageController extends Controller {
|
||||
* @NoCSRFRequired
|
||||
* @param string $numdefunt
|
||||
*/
|
||||
public function saveRapportBijoux($numdefunt,$withPhotos = false){
|
||||
public function saveRapportBijoux($numdefunt,$withPhotos = false, $email = ''){
|
||||
if($withPhotos != null && $withPhotos == 1){
|
||||
$withPhotos = true;
|
||||
}
|
||||
@ -2428,6 +2456,11 @@ class PageController extends Controller {
|
||||
$file_pdf = $this->storage->get($ff_pdf);
|
||||
$file_pdf->putContent($pdfContent);
|
||||
|
||||
if($ff_pdf != null && trim($email) != ''){
|
||||
//send email
|
||||
$this->sendAttachmentToClientByDefunt($defunt->id, $ff_pdf, $email,"Rapport des bijoux", "Veuillez trouver ci-joint le rapport des bijoux de ".$nomDefunt.".");
|
||||
}
|
||||
|
||||
$res = array();
|
||||
$res['path'] = $folderDestination;
|
||||
return json_encode($res);
|
||||
@ -2504,8 +2537,8 @@ class PageController extends Controller {
|
||||
|
||||
public function exportFactureToPdf($factureId){
|
||||
try{
|
||||
$factureFilenames = $this->invoicePdfService->generateFacturePdfByFactureId($factureId,$this->idNextcloud);
|
||||
return json_encode($factureFilenames);
|
||||
$factureGeneratedResponse = $this->invoicePdfService->generateFacturePdfByFactureId($factureId,$this->idNextcloud);
|
||||
return json_encode($factureGeneratedResponse["filenames"]);
|
||||
}
|
||||
catch(\OCP\Files\NotFoundException $e) { }
|
||||
|
||||
@ -2636,9 +2669,13 @@ class PageController extends Controller {
|
||||
* @param int $defuntId
|
||||
*/
|
||||
|
||||
public function exportCareCertificate($defuntId){
|
||||
public function exportCareCertificate($defuntId, $email = ''){
|
||||
try{
|
||||
$careCertificateFilename = $this->certificateService->generateCareCertificate($defuntId,$this->idNextcloud);
|
||||
if($careCertificateFilename != null && trim($email) != '' ){
|
||||
//send email
|
||||
$this->sendAttachmentToClientByDefunt($defuntId, $careCertificateFilename, $email,"Attestation de soins", " Veuillez trouver ci-joint l'attestation de soins ", true);
|
||||
}
|
||||
return $careCertificateFilename;
|
||||
}
|
||||
catch(\OCP\Files\NotFoundException $e) { }
|
||||
@ -2781,9 +2818,14 @@ class PageController extends Controller {
|
||||
* @param int $defuntId
|
||||
*/
|
||||
|
||||
public function saveAttestationPacemaker($defuntId){
|
||||
public function saveAttestationPacemaker($defuntId, $email = ''){
|
||||
try{
|
||||
$careCertificateFilename = $this->certificateService->generatePacemakerCertificate($defuntId,$this->idNextcloud);
|
||||
if($careCertificateFilename != null && trim($email) != ''){
|
||||
//send email
|
||||
$this->sendAttachmentToClientByDefunt($defuntId, $careCertificateFilename, $email,"Attestation pacemaker", "Veuillez trouver ci-joint l'attestation de pacemaker ", true);
|
||||
|
||||
}
|
||||
return $careCertificateFilename;
|
||||
}
|
||||
catch(\OCP\Files\NotFoundException $e) { }
|
||||
@ -2983,6 +3025,11 @@ class PageController extends Controller {
|
||||
public function factureGroupDetails($numfacture){
|
||||
$this->denyIfNotAdmin();
|
||||
$facture = $this->myDb->getFactureGroupByFactureIdWithDetails($numfacture);
|
||||
$facture["path_to_file"] = $this->idNextcloud.'/'.FileExportHelpers::GetFactureGroupFileFullPath(
|
||||
clientName:$facture['group_name'],
|
||||
factureNum: $facture['num'],
|
||||
facturationDate: $facture['date_paiement']
|
||||
);
|
||||
return new TemplateResponse('gestion', 'factureGroupDetails', array('groups' => $this->groups, 'user' => $this->user, 'path' => $this->idNextcloud,
|
||||
'configuration'=> $this->getConfiguration(),
|
||||
'facture'=>json_decode(json_encode($facture)),
|
||||
|
||||
@ -370,6 +370,8 @@ class Bdd {
|
||||
facture.status_paiement,
|
||||
facture_client.nom as facture_client_name,
|
||||
facture_client_group_facturation.group_facturation_name as facture_group_name,
|
||||
facture.document_generated_date as facture_document_generated_date,
|
||||
facture.document_sent_date as facture_document_sent_date,
|
||||
devis.num as dnum,
|
||||
devis.comment as dcomment,
|
||||
client.entreprise,
|
||||
@ -408,6 +410,8 @@ class Bdd {
|
||||
.$this->tableprefix."facture.facture_type, "
|
||||
.$this->tableprefix."facture.fk_client_id as facture_client_id, "
|
||||
.$this->tableprefix."facture.fk_client_group_facturation_id as facture_client_group_facturation_id, "
|
||||
.$this->tableprefix."facture.document_generated_date as facture_document_generated_date, "
|
||||
.$this->tableprefix."facture.document_sent_date as facture_document_sent_date, "
|
||||
.$this->tableprefix."devis.num as dnum, ".$this->tableprefix."devis.comment as dcomment, date_paiement, type_paiement, id_devis, entreprise, "
|
||||
.$this->tableprefix."facture.version, status_paiement,"
|
||||
.$this->tableprefix."client.nom, ".$this->tableprefix."client.prenom, "
|
||||
@ -597,18 +601,22 @@ class Bdd {
|
||||
}
|
||||
|
||||
public function getOneFacture($numfacture, $idNextcloud){
|
||||
// $sql = "SELECT ".$this->tableprefix."facture.id," . $this->tableprefix . "facture.version," . $this->tableprefix . "facture.num, ".$this->tableprefix."facture.date, ".$this->tableprefix."devis.num as dnum, comment, date_paiement, type_paiement, id_devis, nom, prenom, entreprise FROM (".$this->tableprefix."facture LEFT JOIN ".$this->tableprefix."devis on ".$this->tableprefix."facture.id_devis = ".$this->tableprefix."devis.id AND ".$this->tableprefix."facture.id_nextcloud = ".$this->tableprefix."devis.id_nextcloud) LEFT JOIN ".$this->tableprefix."client on ".$this->tableprefix."devis.id_client = ".$this->tableprefix."client.id AND ".$this->tableprefix."devis.id_nextcloud = ".$this->tableprefix."client.id_nextcloud WHERE ".$this->tableprefix."facture.id = ? AND ".$this->tableprefix."facture.id_nextcloud = ?";
|
||||
$sql = "SELECT ".$this->tableprefix."facture.id," . $this->tableprefix . "facture.version," . $this->tableprefix . "facture.num, "
|
||||
.$this->tableprefix."facture.date, ".$this->tableprefix."devis.num as dnum, comment, date_paiement, type_paiement, id_devis, ".$this->tableprefix."client.nom, prenom, entreprise,"
|
||||
.$this->tableprefix."devis.comment as dcomment,".$this->tableprefix."lieu.nom as lieu, ".$this->tableprefix."lieu.adresse as adresse_soin,"
|
||||
.$this->tableprefix."defunt.nom as nom_defunt, "
|
||||
.$this->tableprefix."devis.order_number as order_number, "
|
||||
.$this->tableprefix."devis.case_number as case_number, "
|
||||
.$this->tableprefix."client.id as client_id, "
|
||||
.$this->tableprefix."client.mail as client_mail, "
|
||||
.$this->tableprefix."client_group_facturation.id as group_client_id, "
|
||||
.$this->tableprefix."client_group_facturation.email as group_client_mail, "
|
||||
.$this->tableprefix."facture_payment_type.facture_payment_type_label as facture_payment_type_label
|
||||
FROM (".$this->tableprefix."facture
|
||||
LEFT JOIN ".$this->tableprefix."devis on ".$this->tableprefix."facture.id_devis = ".$this->tableprefix."devis.id
|
||||
LEFT JOIN ".$this->tableprefix."lieu on ".$this->tableprefix."devis.id_lieu = ".$this->tableprefix."lieu.id)
|
||||
LEFT JOIN ".$this->tableprefix."client on ".$this->tableprefix."devis.id_client = ".$this->tableprefix."client.id
|
||||
LEFT JOIN ".$this->tableprefix."client_group_facturation on ".$this->tableprefix."client.fk_client_group_facturation_id = ".$this->tableprefix."client_group_facturation.id
|
||||
LEFT JOIN ".$this->tableprefix."defunt on ".$this->tableprefix."devis.id_defunt = ".$this->tableprefix."defunt.id
|
||||
LEFT JOIN ".$this->tableprefix."facture_payment_type on ".$this->tableprefix."facture.fk_facture_payment_type_id = ".$this->tableprefix."facture_payment_type.id
|
||||
WHERE ".$this->tableprefix."facture.id = ?";
|
||||
@ -787,10 +795,13 @@ class Bdd {
|
||||
.$this->tableprefix."thanato.date_habilitation, "
|
||||
.$this->tableprefix."thanato.reference as reference_habilitation, "
|
||||
.$this->tableprefix."lieu.adresse as adresse_lieu, "
|
||||
.$this->tableprefix."client.mail as client_mail, "
|
||||
.$this->tableprefix."client_group_facturation.email as client_group_mail, "
|
||||
.$this->tableprefix."lieu.nom as nom_lieu
|
||||
FROM ".$this->tableprefix."defunt
|
||||
LEFT JOIN ".$this->tableprefix."devis on ".$this->tableprefix."devis.id_defunt = ".$this->tableprefix."defunt.id
|
||||
LEFT JOIN ".$this->tableprefix."client on ".$this->tableprefix."devis.id_client = ".$this->tableprefix."client.id
|
||||
LEFT JOIN ".$this->tableprefix."client_group_facturation on ".$this->tableprefix."client.fk_client_group_facturation_id = ".$this->tableprefix."client_group_facturation.id
|
||||
LEFT JOIN ".$this->tableprefix."lieu on ".$this->tableprefix."devis.id_lieu = ".$this->tableprefix."lieu.id
|
||||
LEFT JOIN ".$this->tableprefix."thanato on ".$this->tableprefix."devis.id_thanato = ".$this->tableprefix."thanato.id
|
||||
WHERE ".$this->tableprefix."defunt.id = ?";
|
||||
@ -2051,6 +2062,43 @@ class Bdd {
|
||||
return $this->execSQL($sql, array());
|
||||
}
|
||||
|
||||
public function retrieveTotalInvoicesForTheYear(){
|
||||
$sql = "SELECT
|
||||
EXTRACT(YEAR FROM facture.date_paiement) AS y,
|
||||
EXTRACT(MONTH FROM facture.date_paiement) AS m,
|
||||
SUM(
|
||||
COALESCE(client_group_discount.ht_amount,produit.prix_unitaire)
|
||||
* produit_devis.quantite
|
||||
) AS total
|
||||
FROM ".$this->tableprefix."facture AS facture
|
||||
JOIN ".$this->tableprefix."devis AS devis
|
||||
ON MONTH(facture.date_paiement) = MONTH(devis.date) AND
|
||||
YEAR(facture.date_paiement) = YEAR(devis.date)
|
||||
JOIN ".$this->tableprefix."produit_devis AS produit_devis
|
||||
ON devis.id = produit_devis.devis_id
|
||||
JOIN ".$this->tableprefix."produit AS produit
|
||||
ON produit_devis.produit_id = produit.id
|
||||
JOIN ".$this->tableprefix."client AS client
|
||||
ON devis.id_client = client.id
|
||||
LEFT JOIN ".$this->tableprefix."client_group AS client_group
|
||||
ON client.fk_client_group_id = client_group.id
|
||||
LEFT JOIN ".$this->tableprefix."client_group_discount AS client_group_discount
|
||||
ON client_group.id = client_group_discount.fk_client_group_id
|
||||
AND produit.id = client_group_discount.fk_produit_id
|
||||
WHERE
|
||||
(devis.mentions = ? OR devis.mentions = ?)
|
||||
GROUP BY
|
||||
EXTRACT(YEAR FROM facture.date_paiement),
|
||||
EXTRACT(MONTH FROM facture.date_paiement)
|
||||
ORDER BY
|
||||
EXTRACT(YEAR FROM facture.date_paiement) DESC,
|
||||
EXTRACT(MONTH FROM facture.date_paiement);";
|
||||
return $this->execSQL($sql, [
|
||||
DevisMentionConstant::FACTURED,
|
||||
DevisMentionConstant::FACTURED_FORMATTED
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Annual turnover per month without VAT
|
||||
*/
|
||||
@ -2082,7 +2130,7 @@ class Bdd {
|
||||
ORDER BY
|
||||
EXTRACT(YEAR FROM facture.date_paiement) DESC,
|
||||
EXTRACT(MONTH FROM facture.date_paiement);";
|
||||
return $this->execSQL($sql, array());
|
||||
return $this->execSQLNoJsonReturn($sql, array());
|
||||
}
|
||||
|
||||
public function getStatArticleAnnuel($idNextcloud, $annee) {
|
||||
@ -2102,10 +2150,16 @@ class Bdd {
|
||||
FROM ".$this->tableprefix."produit p
|
||||
LEFT JOIN ".$this->tableprefix."produit_devis pd ON p.id = pd.produit_id
|
||||
LEFT JOIN ".$this->tableprefix."devis d ON pd.devis_id = d.id
|
||||
LEFT JOIN ".$this->tableprefix."facture f ON f.id_devis = d.id
|
||||
WHERE YEAR(f.date_paiement) = ".$annee." AND pd.devis_id IS NOT NULL
|
||||
LEFT JOIN ".$this->tableprefix."facture f
|
||||
ON MONTH(f.date_paiement) = MONTH(d.date) AND
|
||||
YEAR(f.date_paiement) = YEAR(f.date)
|
||||
WHERE YEAR(f.date_paiement) = ".$annee." AND pd.devis_id IS NOT NULL AND
|
||||
(d.mentions = ? or d.mentions = ?)
|
||||
GROUP BY p.id, p.reference;";
|
||||
return $this->execSQL($sql, array());
|
||||
return $this->execSQL($sql, [
|
||||
DevisMentionConstant::FACTURED,
|
||||
DevisMentionConstant::FACTURED_FORMATTED
|
||||
]);
|
||||
}
|
||||
|
||||
public function getStatSoinsThanatoAnnuel($idNextcloud, $annee) {
|
||||
@ -2125,13 +2179,19 @@ class Bdd {
|
||||
COALESCE(SUM(CASE WHEN MONTH(d.date) = 11 THEN 1 ELSE 0 END), 0) AS novembre,
|
||||
COALESCE(SUM(CASE WHEN MONTH(d.date) = 12 THEN 1 ELSE 0 END), 0) AS decembre
|
||||
FROM ".$this->tableprefix."devis d
|
||||
LEFT JOIN ".$this->tableprefix."facture f ON f.id_devis = d.id
|
||||
LEFT JOIN ".$this->tableprefix."facture f
|
||||
ON MONTH(f.date_paiement) = MONTH(d.date) AND
|
||||
YEAR(f.date_paiement) = YEAR(f.date)
|
||||
LEFT JOIN ".$this->tableprefix."thanato thanato ON d.id_thanato = thanato.id
|
||||
WHERE YEAR(d.date) = ".$annee." AND d.id_thanato IS NOT NULL
|
||||
WHERE YEAR(d.date) = ".$annee." AND d.id_thanato IS NOT NULL AND
|
||||
(d.mentions = ? or d.mentions = ?)
|
||||
AND thanato.id IS NOT NULL
|
||||
GROUP BY nom_thanato, prenom_thanato
|
||||
ORDER BY nom_thanato;";
|
||||
return $this->execSQL($sql, array());
|
||||
return $this->execSQL($sql, [
|
||||
DevisMentionConstant::FACTURED,
|
||||
DevisMentionConstant::FACTURED_FORMATTED
|
||||
]);
|
||||
}
|
||||
|
||||
public function getStatSoinsThanatoWeekend($idNextcloud, $annee, $mois) {
|
||||
@ -2165,10 +2225,14 @@ class Bdd {
|
||||
WHERE
|
||||
MONTH(devis.date) = ".$mois."
|
||||
AND YEAR(devis.date) = ".$annee."
|
||||
AND DAYOFWEEK(devis.date) IN (1, 7)
|
||||
AND DAYOFWEEK(devis.date) IN (1, 7) AND
|
||||
(devis.mentions = ? or devis.mentions = ?)
|
||||
GROUP BY
|
||||
thanato.id, nom_thanato, prenom_thanato;";
|
||||
return $this->execSQL($sql, array());
|
||||
return $this->execSQL($sql, [
|
||||
DevisMentionConstant::FACTURED,
|
||||
DevisMentionConstant::FACTURED_FORMATTED
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3496,6 +3560,8 @@ class Bdd {
|
||||
defunt.product_reference as defunt_product_reference,
|
||||
client.nom as client_nom,
|
||||
client.prenom as client_prenom,
|
||||
client.mail as client_mail,
|
||||
client_group_facturation.email as client_group_mail,
|
||||
client.entreprise as client_entreprise,
|
||||
client.adresse as client_adresse,
|
||||
thanato.nom as thanato_nom,
|
||||
@ -3506,6 +3572,7 @@ class Bdd {
|
||||
LEFT JOIN ".$this->tableprefix."lieu as lieu on devis.id_lieu = lieu.id
|
||||
LEFT JOIN ".$this->tableprefix."defunt as defunt on devis.id_defunt = defunt.id
|
||||
LEFT JOIN ".$this->tableprefix."client as client on devis.id_client = client.id
|
||||
LEFT JOIN ".$this->tableprefix."client_group_facturation as client_group_facturation on client.fk_client_group_facturation_id = client_group_facturation.id
|
||||
LEFT JOIN ".$this->tableprefix."thanato as thanato on devis.id_thanato = thanato.id
|
||||
WHERE devis.id_defunt = ? ;";
|
||||
|
||||
@ -3720,7 +3787,7 @@ class Bdd {
|
||||
if(empty($devisProducts)){
|
||||
return "";
|
||||
}
|
||||
$productMessage = ". ACTE A FAIRE : ";
|
||||
$productMessage = "ACTE A FAIRE : ";
|
||||
foreach($devisProducts as $product){
|
||||
$productMessage.= html_entity_decode($product->produit_reference).", ";
|
||||
}
|
||||
@ -3730,7 +3797,7 @@ class Bdd {
|
||||
}
|
||||
|
||||
private function getDevisTalkRoomClientContent($clientPrenom){
|
||||
$message = ". Pour PF: ";
|
||||
$message = "Pour PF: ";
|
||||
$clientNameContent = "aucun";
|
||||
$clientPrenomIsSet = $clientPrenom != null && $clientPrenom != "" && $clientPrenom != "-";
|
||||
if($clientPrenomIsSet){
|
||||
@ -3749,20 +3816,25 @@ class Bdd {
|
||||
$devisDate = new Datetime($devis->date);
|
||||
$devisDate = $devisDate->format('d/m/Y');
|
||||
$message = "NOUVELLE INTERVENTION: ";
|
||||
$message .= html_entity_decode($devis->nom_defunt) . ' ';
|
||||
$message .= 'le '.$devisDate. ' ';
|
||||
$message .= html_entity_decode($devis->nom_defunt);
|
||||
$message .= '
|
||||
le '.$devisDate;
|
||||
$message .= 'à '.$devis->startTime. ' ';
|
||||
$message .= 'à '.html_entity_decode($devis->lieu). ' '. html_entity_decode($devis->adresse_soin);
|
||||
$message .= '
|
||||
à '.html_entity_decode($devis->lieu). ' '. html_entity_decode($devis->adresse_soin);
|
||||
|
||||
$clientMessageContent = $this->getDevisTalkRoomClientContent($devis->prenom);
|
||||
$message .= $clientMessageContent;
|
||||
$message .= '
|
||||
'.$clientMessageContent;
|
||||
$productMessage = $this->getDevisTalkRoomProductSectionMessage($devis->products);
|
||||
$message .= $productMessage;
|
||||
$message .= '
|
||||
'.$productMessage;
|
||||
$comment = "aucun";
|
||||
if(strtolower($devis->comment) != "commentaire" && $devis->comment != ""){
|
||||
$comment = html_entity_decode($devis->comment);
|
||||
}
|
||||
$message .= ". COMMENTAIRES: ".$comment.". ";
|
||||
$message .= "
|
||||
COMMENTAIRES: ".$comment;
|
||||
$locationCodes = [
|
||||
"Code portail" => $devis->portal_code,
|
||||
"Code alarme" => $devis->alarm_code,
|
||||
@ -3777,7 +3849,8 @@ class Bdd {
|
||||
$locationCodeMessageContent .= $label. ": ".$value.". ";
|
||||
}
|
||||
$locationCodeMessageContent = trim($locationCodeMessageContent);
|
||||
$message .= $locationCodeMessageContent;
|
||||
$message .= '
|
||||
'.$locationCodeMessageContent;
|
||||
return $message;
|
||||
}
|
||||
|
||||
@ -3791,6 +3864,8 @@ class Bdd {
|
||||
devis.id_defunt as defunt_id,
|
||||
devis.num,
|
||||
devis.comment,
|
||||
devis.mentions,
|
||||
devis.date,
|
||||
devis.id_lieu as lieu_id,
|
||||
devis.id_client as client_id,
|
||||
defunt.nom as defunt_nom
|
||||
@ -3882,6 +3957,13 @@ class Bdd {
|
||||
}
|
||||
}
|
||||
|
||||
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));
|
||||
@ -4557,4 +4639,71 @@ class Bdd {
|
||||
$facture["isFactureClientGroup"] = !$isFactureSingleClient;
|
||||
return $facture;
|
||||
}
|
||||
|
||||
public function setFactureGeneratedDate($factureId){
|
||||
$datetimeNow = new Datetime();
|
||||
$dateNow = $datetimeNow->format("Y-m-d");
|
||||
$sql = "UPDATE ".$this->tableprefix."facture set document_generated_date = ? WHERE id = ?";
|
||||
$this->execSQLNoData($sql,[
|
||||
$dateNow,
|
||||
$factureId
|
||||
]);
|
||||
}
|
||||
|
||||
public function setFactureSentDate($factureId){
|
||||
$datetimeNow = new Datetime();
|
||||
$dateNow = $datetimeNow->format("Y-m-d");
|
||||
$sql = "UPDATE ".$this->tableprefix."facture set document_sent_date = ? WHERE id = ?";
|
||||
$this->execSQLNoData($sql,[
|
||||
$dateNow,
|
||||
$factureId
|
||||
]);
|
||||
}
|
||||
|
||||
public function getFactureClientMailByFactureId($factureId){
|
||||
$sql = "SELECT
|
||||
facture.id,
|
||||
facture.facture_type,
|
||||
facture_client.mail as facture_client_mail,
|
||||
facture_client_group_facturation.email as facture_client_group_mail,
|
||||
facture.fk_client_id as facture_client_id,
|
||||
facture.fk_client_group_facturation_id as facture_client_group_facturation_id,
|
||||
client.id as client_id,
|
||||
client.fk_client_group_facturation_id as devis_client_group_facturation_id,
|
||||
client.mail as devis_client_mail,
|
||||
client_group_facturation.email as devis_client_group_mail
|
||||
FROM ".$this->tableprefix."facture as facture
|
||||
LEFT JOIN ".$this->tableprefix."devis as devis
|
||||
on facture.id_devis = devis.id
|
||||
LEFT JOIN ".$this->tableprefix."client as client
|
||||
on devis.id_client = client.id
|
||||
LEFT JOIN ".$this->tableprefix."client_group_facturation as client_group_facturation
|
||||
on client.fk_client_group_facturation_id = client_group_facturation.id
|
||||
LEFT JOIN ".$this->tableprefix."client as facture_client
|
||||
on facture.fk_client_id = facture_client.id
|
||||
LEFT JOIN ".$this->tableprefix."client_group_facturation as facture_client_group_facturation
|
||||
on facture.fk_client_group_facturation_id = facture_client_group_facturation.id
|
||||
WHERE facture.id = ?
|
||||
LIMIT 1;";
|
||||
|
||||
$mail = null;
|
||||
$result = $this->execSQLNoJsonReturn($sql,[$factureId]);
|
||||
if(!empty($result)){
|
||||
$facture = $result[0];
|
||||
$factureIsSingle = $facture["facture_type"] == FactureTypeConstant::TYPE_SINGLE;
|
||||
if($factureIsSingle){
|
||||
$mail = $facture["fk_client_group_facturation_id"] != null ?
|
||||
$facture["devis_client_group_mail"] :
|
||||
$facture["devis_client_mail"];
|
||||
}
|
||||
else{
|
||||
$factureIsClientWithoutGroup = $facture["facture_client_id"] != null && $facture["facture_client_id"] != 0;
|
||||
$mail = $factureIsClientWithoutGroup ?
|
||||
$facture["facture_client_mail"] :
|
||||
$facture["facture_client_group_mail"];
|
||||
}
|
||||
}
|
||||
|
||||
return $mail;
|
||||
}
|
||||
}
|
||||
|
||||
@ -153,7 +153,7 @@ class TalkDb {
|
||||
|
||||
$rooms = $this->execSQLNoJsonReturn(
|
||||
$sql,
|
||||
[$names['createdByUser'],$names['createdByAdmin']]);
|
||||
[$names['target'],$names['sender']]);
|
||||
|
||||
if(!empty($rooms)){
|
||||
return $rooms[0];
|
||||
@ -161,13 +161,13 @@ class TalkDb {
|
||||
return null;
|
||||
}
|
||||
|
||||
public function createDevisTalkRoomAndReturnDevisTalkRoom($idNextCloud,$token){
|
||||
$roomName = '["'.$idNextCloud.'","'.BddConstant::DEFAULT_ADMIN_APP_ID_NEXTCLOUD.'"]';
|
||||
public function createDevisTalkRoomAndReturnDevisTalkRoom($targetUser,$senderUser,$token){
|
||||
$roomName = '["'.$targetUser.'","'.$senderUser.'"]';
|
||||
$this->createDevisTalkRoom($roomName,$token);
|
||||
$room = $this->getDevisTalkRoomByName($roomName);
|
||||
$attendees = [
|
||||
$idNextCloud,
|
||||
BddConstant::DEFAULT_ADMIN_APP_ID_NEXTCLOUD
|
||||
$targetUser,
|
||||
$senderUser
|
||||
];
|
||||
$this->createDevisTalkRoomAttendeesByActors($attendees,$room['id']);
|
||||
return $room;
|
||||
|
||||
@ -2,6 +2,8 @@
|
||||
|
||||
namespace OCA\Gestion\Helpers;
|
||||
|
||||
use DateTime;
|
||||
|
||||
class FileExportHelpers
|
||||
{
|
||||
|
||||
@ -53,6 +55,27 @@ class FileExportHelpers
|
||||
return $racinePath.'CLIENTS/'.mb_strtoupper($clientName,'UTF-8').'/';
|
||||
}
|
||||
|
||||
public static function GetFactureGroupFilename($factureNum,$clientName){
|
||||
$factureNum = str_replace('/','-',$factureNum);
|
||||
$clientName = str_replace(' ',' ',$clientName ?? '');
|
||||
return 'FACTURE'.'_'.$factureNum.'_'.mb_strtoupper($clientName,'UTF-8').'.pdf';
|
||||
}
|
||||
|
||||
public static function GetFactureGroupFolder($clientName,$facturationDate){
|
||||
$clientRacineFolder = 'CLIENTS/'.mb_strtoupper($clientName,'UTF-8').'/';
|
||||
$factureDatetime = new DateTime($facturationDate);
|
||||
$factureDateYear = $factureDatetime->format('Y');
|
||||
$factureMonth = DateHelpers::GetDateWithFormatDayAndMonthPlainString($facturationDate);
|
||||
$factureByYearFolder = $clientRacineFolder."$factureDateYear".'/'.$factureMonth.'/'.'FACTURES'.'/';
|
||||
return $factureByYearFolder;
|
||||
}
|
||||
|
||||
public static function GetFactureGroupFileFullPath($clientName,$factureNum,$facturationDate){
|
||||
$factureFolder = self::GetFactureGroupFolder($clientName,$facturationDate);
|
||||
$factureFilename = self::GetFactureGroupFilename($factureNum,$clientName);
|
||||
return $factureFolder.$factureFilename;
|
||||
}
|
||||
|
||||
public static function GetDefuntsFolder($clientName,$defuntName,$racinePath){
|
||||
$clientsFolder = self::GetClientsFolder($clientName,$racinePath);
|
||||
return $clientsFolder.'DEFUNTS/'.mb_strtoupper($defuntName,'UTF-8').'/';
|
||||
|
||||
@ -26,8 +26,11 @@ declare(strict_types=1);
|
||||
|
||||
namespace OCA\Gestion\Service;
|
||||
|
||||
use OCA\Gestion\Constants\BddConstant;
|
||||
use OCA\Gestion\Constants\DevisMentionConstant;
|
||||
use OCA\Gestion\Constants\VCalendarPropertyConstant;
|
||||
use OCA\Gestion\Db\Bdd;
|
||||
use OCP\IUserSession;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use OCA\Gestion\Helpers\VCalendarHelpers;
|
||||
|
||||
@ -41,18 +44,36 @@ class GestionService {
|
||||
/** @var TalkService */
|
||||
private $talkService;
|
||||
|
||||
private $userConnectedUuid;
|
||||
|
||||
public function __construct(
|
||||
Bdd $gestionBdd,
|
||||
LoggerInterface $logger,
|
||||
TalkService $talkService) {
|
||||
TalkService $talkService,
|
||||
IUserSession $userSession) {
|
||||
$this->logger = $logger;
|
||||
$this->gestionBdd = $gestionBdd;
|
||||
$this->talkService = $talkService;
|
||||
try{
|
||||
$this->userConnectedUuid = $userSession->getUser()->getUID();
|
||||
}
|
||||
catch(Exception){
|
||||
$this->userConnectedUuid = BddConstant::DEFAULT_ADMIN_APP_ID_NEXTCLOUD;
|
||||
}
|
||||
}
|
||||
|
||||
private function GetIsCalendarPendingFromVCalendarString(string $vCalendarString): bool{
|
||||
$isCalendarPending = false;
|
||||
$isCalendarPendingValue = VCalendarHelpers::GetValueFromKeyInVCalendarString(VCalendarPropertyConstant::PROPERTY_IS_CALENDAR_PENDING, $vCalendarString);
|
||||
if($isCalendarPendingValue == "1"){
|
||||
$isCalendarPending = true;
|
||||
}
|
||||
return $isCalendarPending;
|
||||
}
|
||||
|
||||
private function GetIsLeaveFromVCalendarString(string $vCalendarString): bool{
|
||||
$isLeave = false;
|
||||
$isLeaveValue = VCalendarHelpers::GetValueFromKeyInVCalendarString("ISLEAVE", $vCalendarString);
|
||||
$isLeaveValue = VCalendarHelpers::GetValueFromKeyInVCalendarString(VCalendarPropertyConstant::PROPERTY_IS_LEAVE, $vCalendarString);
|
||||
if($isLeaveValue == "1"){
|
||||
$isLeave = true;
|
||||
}
|
||||
@ -72,24 +93,13 @@ class GestionService {
|
||||
private function GetThanatoIdFromVCalendarString(string $vCalendarString)
|
||||
{
|
||||
$thanatoId = 0;
|
||||
$thanatoNames = $this->GetAttendeesNameFromVCalendarString($vCalendarString);
|
||||
if(count($thanatoNames) > 0){
|
||||
$thanatoName = $thanatoNames[0];
|
||||
$thanatoIdFromDb = $this->gestionBdd->getThanatoIdByUserUuid($thanatoName);
|
||||
$organizerName = $this->getPrincipalUsernameFromVCalendarString($vCalendarString);
|
||||
if($organizerName != null){
|
||||
$thanatoIdFromDb = $this->gestionBdd->getThanatoIdByUserUuid($organizerName);
|
||||
if($thanatoIdFromDb != null){
|
||||
$thanatoId = $thanatoIdFromDb;
|
||||
}
|
||||
}
|
||||
else{
|
||||
//get from calendar object
|
||||
$organizerName = $this->getPrincipalUsernameFromVCalendarString($vCalendarString);
|
||||
if($organizerName != null){
|
||||
$thanatoIdFromDb = $this->gestionBdd->getThanatoIdByUserUuid($organizerName);
|
||||
if($thanatoIdFromDb != null){
|
||||
$thanatoId = $thanatoIdFromDb;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $thanatoId;
|
||||
}
|
||||
|
||||
@ -160,6 +170,8 @@ class GestionService {
|
||||
$requestedDevisComment = $this->GetDevisCommentFromVCalendarString($vCalendarString);
|
||||
$this->gestionBdd->updateDevisComment($devis['id'],$requestedDevisComment,$devis['comment']);
|
||||
|
||||
$requestedDevisDate = $this->GetCalendarDateFromVCalendarString($vCalendarString);
|
||||
$this->gestionBdd->updateDevisDate($devis['id'],$requestedDevisDate);
|
||||
$articlesValue = $this->GetArticlesNameFromVCalendarString($vCalendarString);
|
||||
if(!empty($articlesValue)){
|
||||
$articleIds = $this->gestionBdd->getArticleIdsByArticleReferences($articlesValue);
|
||||
@ -174,6 +186,7 @@ class GestionService {
|
||||
$requestedDevisComment = $this->GetDevisCommentFromVCalendarString($vCalendarString);
|
||||
$requestedArticleReferences = $this->GetArticlesNameFromVCalendarString($vCalendarString);
|
||||
$requestedArticleIds = $this->gestionBdd->getArticleIdsByArticleReferences($requestedArticleReferences);
|
||||
$requestedDevisDate = $this->GetCalendarDateFromVCalendarString($vCalendarString);
|
||||
$articleDevis = $this->gestionBdd->getProduitDevisByDevisId($devis['id']);
|
||||
$articleDevisIds = [];
|
||||
foreach($articleDevis as $currentArticleDevis){
|
||||
@ -187,7 +200,8 @@ class GestionService {
|
||||
$devis['client_id'] == $requestedClientId &&
|
||||
$devis['lieu_id'] == $requestLocationId &&
|
||||
$devis['comment'] == $requestedDevisComment &&
|
||||
$requestedArticleIds == $articleDevisIds;
|
||||
$requestedArticleIds == $articleDevisIds &&
|
||||
$devis['date'] == $requestedDevisDate;
|
||||
}
|
||||
|
||||
public function HandleUpdatedCalendarObject(string $vCalendarString){
|
||||
@ -204,18 +218,20 @@ 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);
|
||||
if($devisIsAlreadyFactured == false){
|
||||
$userName = $this->GetThanatoNameFromVCalendarString($vCalendarString);
|
||||
$devisTalkMessage = $this->gestionBdd->getDevisTalkRoomMessage($devis['id'],$userName);
|
||||
$this->talkService->sendDevisTalkNotifications($devisTalkMessage,$userName,$this->userConnectedUuid);
|
||||
}
|
||||
}
|
||||
else{
|
||||
//update from calendar leave to calendar devis
|
||||
//update from calendar leave or calendar pending to calendar devis
|
||||
$this->HandleCreatedCalendarObject($vCalendarString);
|
||||
}
|
||||
return true;
|
||||
@ -247,6 +263,10 @@ class GestionService {
|
||||
if($isCalendarForLeave){
|
||||
return;
|
||||
}
|
||||
$isCalendarPending = $this->GetIsCalendarPendingFromVCalendarString($vCalendarString);
|
||||
if($isCalendarPending){
|
||||
return;
|
||||
}
|
||||
$calendarSummary = $this->GetCalendarSummaryFromVCalendarString($vCalendarString);
|
||||
$clientId = $this->GetClientIdFromVCalendarString($vCalendarString);
|
||||
$locationId = $this->GetLocationIdFromVCalendarString($vCalendarString);
|
||||
@ -266,22 +286,14 @@ class GestionService {
|
||||
$articleIds = $this->gestionBdd->getArticleIdsByArticleReferences($articlesValue);
|
||||
$this->gestionBdd->insertDevisArticleFromDevisIdAndArticlesIdArray($devisId, $articleIds);
|
||||
}
|
||||
$this->gestionBdd->createDevisTrajetFromVCalendar($devisId,$userName);
|
||||
$devisTalkMessage = $this->gestionBdd->getDevisTalkRoomMessage($devisId,$userName);
|
||||
$this->talkService->sendDevisTalkNotifications($devisTalkMessage,$userName);
|
||||
$this->talkService->sendDevisTalkNotifications($devisTalkMessage,$userName,$this->userConnectedUuid);
|
||||
$this->gestionBdd->createDevisTrajetFromVCalendar($devisId,$userName);
|
||||
}
|
||||
|
||||
private function GetThanatoNameFromVCalendarString($vCalendarString){
|
||||
$thanatoName = null;
|
||||
$thanatoNames = $this->GetAttendeesNameFromVCalendarString($vCalendarString);
|
||||
if(count($thanatoNames) > 0){
|
||||
$thanatoName = $thanatoNames[0];
|
||||
}
|
||||
else{
|
||||
//get from calendar object
|
||||
$thanatoName = $this->getPrincipalUsernameFromVCalendarString($vCalendarString);
|
||||
}
|
||||
return $thanatoName;
|
||||
$thanatoName = $this->getPrincipalUsernameFromVCalendarString($vCalendarString);
|
||||
return $thanatoName ?? BddConstant::DEFAULT_ADMIN_APP_ID_NEXTCLOUD;
|
||||
}
|
||||
|
||||
private function GetClientIdFromVCalendarString(string $vCalendarString){
|
||||
|
||||
@ -54,7 +54,7 @@ class InvoiceGroupPdfHandler extends FPDF {
|
||||
function Header()
|
||||
{
|
||||
if($this->logo != "nothing"){
|
||||
$this->Image($this->logoPath."logo.png", 2, 2, 75,25);
|
||||
$this->Image($this->logoPath."logo.png", 2, 2, 75, 25);
|
||||
}
|
||||
else{
|
||||
$this->Cell(55,30,'');
|
||||
@ -91,7 +91,7 @@ class InvoiceGroupPdfHandler extends FPDF {
|
||||
$factureNum = $this->factureData['num'];
|
||||
$factureNum = str_replace('/','-',$factureNum);
|
||||
$clientName = str_replace(' ',' ',$this->factureData['group_name'] ?? '');
|
||||
return $this->factureData['configuration']->facture_prefixe.'_'.$factureNum.'_'.mb_strtoupper($clientName,'UTF-8');
|
||||
return 'FACTURE'.'_'.$factureNum.'_'.mb_strtoupper($clientName,'UTF-8');
|
||||
}
|
||||
|
||||
public function DrawPageNumbersText($pageNumber,$pageCount){
|
||||
|
||||
@ -88,7 +88,7 @@ class InvoicePdfService {
|
||||
$logo = $this->getLogo();
|
||||
$invoicePdfData = $this->gestionBdd->getInvoicePdfData($factureId,$currentConfig);
|
||||
if($invoicePdfData == null){
|
||||
return "";
|
||||
return null;
|
||||
}
|
||||
$clean_folder = html_entity_decode(string: $currentConfig->path).'/';
|
||||
$factureFolders = $this->getFacturesFolder($invoicePdfData,$clean_folder);
|
||||
@ -112,7 +112,11 @@ class InvoicePdfService {
|
||||
$file_pdf->putContent($pdfContent);
|
||||
$filenames[] = $ff_pdf;
|
||||
}
|
||||
return $filenames;
|
||||
$this->gestionBdd->setFactureGeneratedDate($factureId);
|
||||
return [
|
||||
"content" => $pdfContent,
|
||||
"filenames" => $filenames
|
||||
];
|
||||
}
|
||||
|
||||
public function generateFacturePdfByFactureId($factureId,$idNextCloud){
|
||||
@ -195,7 +199,11 @@ class InvoicePdfService {
|
||||
$file_pdf->putContent($pdfContent);
|
||||
$filenames[] = $ff_pdf;
|
||||
}
|
||||
return $filenames;
|
||||
$this->gestionBdd->setFactureGeneratedDate($factureId);
|
||||
return [
|
||||
"content" => $pdfContent,
|
||||
"filenames" => $filenames
|
||||
];
|
||||
}
|
||||
|
||||
public function generateFacturePdfByFactureIds(array $factureIds,$idNextCloud){
|
||||
@ -279,8 +287,8 @@ class InvoicePdfService {
|
||||
}
|
||||
|
||||
$this->gestionBdd->invoiceListOfDevisIds($devisIds);
|
||||
$filenames = $this->generateFactureGroupPdfByFactureId($factureId,$idNextcloud);
|
||||
return $filenames;
|
||||
$factureGeneratedResponse = $this->generateFactureGroupPdfByFactureId($factureId,$idNextcloud);
|
||||
return $factureGeneratedResponse["filenames"];
|
||||
}
|
||||
catch(Exception){
|
||||
return null;
|
||||
|
||||
@ -48,12 +48,12 @@ class TalkService {
|
||||
$this->talkDb = $talkDb;
|
||||
}
|
||||
|
||||
private function getUserDevisTalkRoomNames($idNextCloud){
|
||||
$roomNamesCreatedByUser = '["'.$idNextCloud.'","'.BddConstant::DEFAULT_ADMIN_APP_ID_NEXTCLOUD.'"]';
|
||||
$roomNamesCreatedByAdmin = '["'.BddConstant::DEFAULT_ADMIN_APP_ID_NEXTCLOUD.'","'.$idNextCloud.'"]';
|
||||
private function getUserDevisTalkRoomNames($target ,$senderUser){
|
||||
$roomNamesCreatedBytargetUser = '["'.$target.'","'.$senderUser.'"]';
|
||||
$roomNamesCreatedBySenderUser = '["'.$senderUser.'","'.$target.'"]';
|
||||
return [
|
||||
"createdByUser" => $roomNamesCreatedByUser,
|
||||
"createdByAdmin" => $roomNamesCreatedByAdmin
|
||||
"target" => $roomNamesCreatedBytargetUser,
|
||||
"sender" => $roomNamesCreatedBySenderUser
|
||||
];
|
||||
}
|
||||
|
||||
@ -68,36 +68,39 @@ class TalkService {
|
||||
return $randomToken;
|
||||
}
|
||||
|
||||
private function getNotificationsSubjectsParameters(){
|
||||
return '{"userType":"users","userId":"'.BddConstant::DEFAULT_ADMIN_APP_ID_NEXTCLOUD.'"}';
|
||||
private function getNotificationsSubjectsParameters(string $senderUser){
|
||||
return '{"userType":"users","userId":"'.$senderUser.'"}';
|
||||
}
|
||||
|
||||
private function getNotificationsMessageParameters($commentId){
|
||||
return '{"commentId":"'.$commentId.'"}';
|
||||
}
|
||||
|
||||
public function sendDevisTalkNotifications(string $message,string $idNextcloud){
|
||||
if($idNextcloud === BddConstant::DEFAULT_ADMIN_ID_NEXTCLOUD || $idNextcloud === BddConstant::DEFAULT_ADMIN_APP_ID_NEXTCLOUD){
|
||||
return true;
|
||||
|
||||
|
||||
public function sendDevisTalkNotifications(string $message,string $targetUser ,string $senderUser){
|
||||
$senderAndTargetIsTheSameUser = $targetUser == $senderUser;
|
||||
$senderUser = $senderAndTargetIsTheSameUser ? BddConstant::DEFAULT_ADMIN_ID_NEXTCLOUD : $senderUser;
|
||||
if( $targetUser == BddConstant::DEFAULT_ADMIN_ID_NEXTCLOUD && $senderUser == BddConstant::DEFAULT_ADMIN_ID_NEXTCLOUD){
|
||||
return;
|
||||
}
|
||||
$roomNames = $this->getUserDevisTalkRoomNames($idNextcloud);
|
||||
$roomNames = $this->getUserDevisTalkRoomNames($targetUser , $senderUser);
|
||||
$room = $this->talkDb->getDevisTalkRoomByNames($roomNames);
|
||||
if($room == null){
|
||||
$roomToken = $this->generateTalkRandomToken();
|
||||
$room = $this->talkDb->createDevisTalkRoomAndReturnDevisTalkRoom($idNextcloud,$roomToken);
|
||||
$initialMessage = $this->talkDb->setDevisTalkRoomInitialMessageAndReturnMessage($room['id'],$idNextcloud);
|
||||
$room = $this->talkDb->createDevisTalkRoomAndReturnDevisTalkRoom($targetUser,$senderUser, $roomToken);
|
||||
$this->talkDb->setDevisTalkRoomInitialMessageAndReturnMessage($room['id'],$targetUser);
|
||||
}
|
||||
else{
|
||||
$roomToken = $room['token'];
|
||||
}
|
||||
$devisMessage = $this->talkDb->createDevisTalkRoomMessageAndReturnMessage($room['id'],$message);
|
||||
$this->talkDb->updateRoomLastMessage($room['id'],$devisMessage['id']);
|
||||
$this->talkDb->setAttendeeLastReadMessage($room['id'],$devisMessage['id'],BddConstant::DEFAULT_ADMIN_APP_ID_NEXTCLOUD);
|
||||
$this->talkDb->setAttendeeLastReadMessage($room['id'],$devisMessage['id'],$senderUser);
|
||||
//send notifications
|
||||
$notificationsSubjectsParameters = $this->getNotificationsSubjectsParameters();
|
||||
$notificationsSubjectsParameters = $this->getNotificationsSubjectsParameters($senderUser);
|
||||
$notificationsMessageParameters = $this->getNotificationsMessageParameters($devisMessage['id']);
|
||||
$this->talkDb->sendAttendeeNotifications($idNextcloud,$roomToken,$notificationsSubjectsParameters,$notificationsMessageParameters);
|
||||
return true;
|
||||
$this->talkDb->sendAttendeeNotifications($targetUser,$roomToken,$notificationsSubjectsParameters,$notificationsMessageParameters);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -1,10 +1,11 @@
|
||||
import "@nextcloud/dialogs/dist/index.css";
|
||||
import Modal from 'bootstrap/js/dist/modal';
|
||||
import "datatables.net-dt/css/jquery.dataTables.css";
|
||||
import "../css/mycss.css";
|
||||
|
||||
import { globalConfiguration } from "./modules/mainFunction.mjs";
|
||||
import "./listener/main_listener";
|
||||
import { setDefuntCover, setDefuntPacemakerPhoto,setBijouxPhoto,getBibliotheques, getBijouxById, getHypodermiquesyId, getObservationsById, getproduits, saveAttestationPacemaker,exportCareCertificate, saveRapportBijoux, saveRapportSoin, updateDB } from "./modules/ajaxRequest.mjs";
|
||||
import { getBibliotheques, exportCareCertificate,getBijouxById, getHypodermiquesyId, getObservationsById, getproduits, saveAttestationPacemaker, saveRapportBijoux, saveRapportSoin, setBijouxPhoto, setDefuntCover, setDefuntPacemakerPhoto, updateDB } from "./modules/ajaxRequest.mjs";
|
||||
import { globalConfiguration } from "./modules/mainFunction.mjs";
|
||||
|
||||
let bibliotheques = [];
|
||||
let sortedBibliotheques = [];
|
||||
@ -99,14 +100,17 @@ window.addEventListener("DOMContentLoaded", function () {
|
||||
break;
|
||||
}
|
||||
}
|
||||
saveRapportBijoux({
|
||||
numdefunt: defuntid,
|
||||
withPhotos: selectedValue
|
||||
});
|
||||
$('#saveRapportBijouxModal').hide();
|
||||
modalTitle.text('Générer le rapport des bijoux')
|
||||
modalElement.data('export-type', 'rapport-bijoux')
|
||||
modalElement.data('export-with-photos', selectedValue)
|
||||
modalElement.modal('show')
|
||||
// saveRapportBijoux({
|
||||
// numdefunt: defuntid,
|
||||
// withPhotos: selectedValue
|
||||
// });
|
||||
});
|
||||
|
||||
|
||||
|
||||
setDefuntCoverButton.addEventListener("click",function(){
|
||||
const productCoverRadios = document.getElementsByName('coverProductsRadioButton');
|
||||
@ -123,15 +127,67 @@ window.addEventListener("DOMContentLoaded", function () {
|
||||
});
|
||||
})
|
||||
|
||||
const modalElement = $('#confirmSendEmailModal')
|
||||
const modalTitle = $('#titleSendEmailModal')
|
||||
const _ = new Modal(modalElement[0],{
|
||||
backdrop: false
|
||||
})
|
||||
$('#validateSendEmailModal').on('click', function(){
|
||||
const type = modalElement.data('export-type')
|
||||
const isSendEmail = $('#checkSendEmailModal').is(':checked')
|
||||
const email = $('#valueSendEmailModal').val()
|
||||
const initEmail = $('#valueSendEmailModal').data('init-value')
|
||||
switch(type){
|
||||
case 'care-certificate':
|
||||
exportCareCertificate({defuntId : defuntid, email: isSendEmail ? email: ''})
|
||||
break;
|
||||
case 'pacemaker':
|
||||
saveAttestationPacemaker({ defuntId: defuntid ,email: isSendEmail ? email: ''});
|
||||
break;
|
||||
case 'rapport-soin':
|
||||
saveRapportSoin({ numdefunt: defuntid ,email: isSendEmail ? email: ''});
|
||||
break;
|
||||
case 'rapport-bijoux':
|
||||
const selectedValue = modalElement.data('export-with-photos')
|
||||
saveRapportBijoux({
|
||||
numdefunt: defuntid,
|
||||
withPhotos: selectedValue ,
|
||||
email: isSendEmail ? email: ''
|
||||
});
|
||||
default:
|
||||
break;
|
||||
}
|
||||
modalElement.modal('hide')
|
||||
$('#checkSendEmailModal').prop('checked', false);
|
||||
$('#checkSendEmailModal').prop('checked', false);
|
||||
$('#valueSendEmailModal').val(initEmail);
|
||||
})
|
||||
$('#closeSendEmailModal').on('click', function(){
|
||||
modalElement.data('export-type', null)
|
||||
const initEmail = $('#valueSendEmailModal').data('init-value')
|
||||
modalElement.modal('hide')
|
||||
$('#checkSendEmailModal').prop('checked', false);
|
||||
$('#valueSendEmailModal').val(initEmail);
|
||||
})
|
||||
|
||||
exportCareCertificateButton.addEventListener("click",function(){
|
||||
exportCareCertificate({defuntId : defuntid});
|
||||
modalTitle.text("Générer l'attestation de soins")
|
||||
modalElement.data('export-type', 'care-certificate')
|
||||
modalElement.modal('show')
|
||||
// exportCareCertificate({defuntId : defuntid});
|
||||
})
|
||||
pacemakerBtn.addEventListener("click", function(){
|
||||
saveAttestationPacemaker({ defuntId: defuntid });
|
||||
modalTitle.text("Générer l'attestation pacemaker")
|
||||
modalElement.data('export-type', 'pacemaker')
|
||||
modalElement.modal('show')
|
||||
// saveAttestationPacemaker({ defuntId: defuntid });
|
||||
});
|
||||
|
||||
rapportSoinBtn.addEventListener("click", function(){
|
||||
saveRapportSoin({ numdefunt: defuntid });
|
||||
modalElement.data('export-type', 'rapport-soin')
|
||||
modalElement.modal('show')
|
||||
modalTitle.text('Générer le rapport de soins')
|
||||
// saveRapportSoin({ numdefunt: defuntid });
|
||||
});
|
||||
|
||||
$(document).on("change", ".photoBijouUpload", function () {
|
||||
|
||||
@ -4,9 +4,9 @@ import "../css/mycss.css";
|
||||
import { globalConfiguration } from "./modules/mainFunction.mjs";
|
||||
import "./listener/main_listener";
|
||||
import "./listener/invoiceListener";
|
||||
import "./listener/factureSendMailListener";
|
||||
import { generateUrl } from "@nextcloud/router";
|
||||
|
||||
window.addEventListener("DOMContentLoaded", function () {
|
||||
globalConfiguration();
|
||||
});
|
||||
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@ import "../css/mycss.css";
|
||||
import { getArticlesById, getMailServerFrom, getProduitsById, saveNextcloud, savePdfToNextcloud} from "./modules/ajaxRequest.mjs";
|
||||
import { globalConfiguration } from "./modules/mainFunction.mjs";
|
||||
import "./listener/main_listener";
|
||||
import "./listener/factureSendMailListener";
|
||||
import { Client } from "./objects/client.mjs";
|
||||
import { capture, captureDevisFacture, sendMail } from "./pdf";
|
||||
|
||||
|
||||
75
gestion/src/js/listener/factureSendMailListener.js
Normal file
75
gestion/src/js/listener/factureSendMailListener.js
Normal file
@ -0,0 +1,75 @@
|
||||
import {showError, showSuccess } from "@nextcloud/dialogs";
|
||||
import {baseUrl, hideLoader, showLoader} from "../modules/mainFunction.mjs";
|
||||
import { Facture } from "../objects/facture.mjs";
|
||||
import DataTable from "datatables.net";
|
||||
import { generateUrl } from "@nextcloud/router";
|
||||
|
||||
$('body').on('click', '#showSendFacturePdfMailModal', function () {
|
||||
$('#sendFacturePdfMail').show();
|
||||
});
|
||||
|
||||
$('body').on('click', '#closeSendFacturePdfMail', function () {
|
||||
$('#sendFacturePdfMail').hide();
|
||||
});
|
||||
|
||||
$('body').on('click', '#showPdfPreview', function () {
|
||||
const factureId = $('#factureIdentifier').data('id');
|
||||
if(factureId){
|
||||
showLoader();
|
||||
$.ajax({
|
||||
url: baseUrl + '/invoice/'+factureId+'/getInvoicePdfContent',
|
||||
type: 'GET',
|
||||
contentType: 'application/json'
|
||||
}).done(function (response, textStatus, xhr) {
|
||||
if (xhr.status === 200) {
|
||||
var base64PDF = response.content;
|
||||
var byteCharacters = atob(base64PDF);
|
||||
var byteNumbers = new Array(byteCharacters.length);
|
||||
for (var i = 0; i < byteCharacters.length; i++) {
|
||||
byteNumbers[i] = byteCharacters.charCodeAt(i);
|
||||
}
|
||||
var byteArray = new Uint8Array(byteNumbers);
|
||||
var fileBlob = new Blob([byteArray], { type: "application/pdf" });
|
||||
|
||||
var fileURL = URL.createObjectURL(fileBlob);
|
||||
window.open(fileURL, "_blank");
|
||||
} else {
|
||||
showError(t('gestion', "Erreur dans la récupération du document de la facture"));
|
||||
}
|
||||
}).fail(function (response, code) {
|
||||
showError(response);
|
||||
}).always(function () {
|
||||
hideLoader();
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
$('body').on('click','#sendFacturePdf',function(){
|
||||
const factureId = $('#factureIdentifier').data('id');
|
||||
const previousMail = $('#valueFacturePdfMail').data('init-value')
|
||||
const email = $('#valueFacturePdfMail').val()
|
||||
if(factureId){
|
||||
showLoader();
|
||||
$.ajax({
|
||||
url: baseUrl + '/invoice/'+factureId+'/sendInvoicePdfViaMail',
|
||||
type: 'POST',
|
||||
contentType: 'application/json',
|
||||
data: JSON.stringify({
|
||||
email
|
||||
})
|
||||
}).done(function (response, textStatus, xhr) {
|
||||
if (xhr.status === 200) {
|
||||
showSuccess(response);
|
||||
} else {
|
||||
showError(t('gestion', "Erreur dans l'envoi du mail chez le client"));
|
||||
}
|
||||
$('#sendFacturePdfMail').hide();
|
||||
}).fail(function (response, code) {
|
||||
$('#sendFacturePdfMail').hide();
|
||||
showError(response);
|
||||
}).always(function () {
|
||||
hideLoader();
|
||||
$('#valueFacturePdfMail').val(previousMail)
|
||||
});
|
||||
}
|
||||
})
|
||||
@ -41,6 +41,13 @@ export class Facture {
|
||||
else{
|
||||
this.baseUrl = generateUrl(`/apps/gestion/facture/${this.id}/groupDetails`);
|
||||
}
|
||||
const isDocumentAlreadyGenerated = myresp.facture_document_generated_date != null;
|
||||
const isDocumentAlreadySent = myresp.facture_document_sent_date != null;
|
||||
this.isDocumentAlreadyGeneratedLabel = this.getDocumentStateLabel(isDocumentAlreadyGenerated);
|
||||
this.isDocumentAlreadySentLabel = this.getDocumentStateLabel(isDocumentAlreadySent);
|
||||
this.isDocumentAlreadyGeneratedClass = this.getDocumentStateClass(isDocumentAlreadyGenerated);
|
||||
this.isDocumentAlreadySentClass = this.getDocumentStateClass(isDocumentAlreadySent);
|
||||
|
||||
this.clientName = this.nom;
|
||||
if(isFactureSingle == false){
|
||||
const isFactureClientWithoutGroup = myresp.facture_client_id != null && myresp.facture_client_id != 0;
|
||||
@ -53,6 +60,14 @@ export class Facture {
|
||||
}
|
||||
}
|
||||
|
||||
getDocumentStateLabel(documentState){
|
||||
return documentState ? "Oui" : "Non";
|
||||
}
|
||||
|
||||
getDocumentStateClass(documentState){
|
||||
return documentState ? "text-bg-success" : "text-bg-warning";
|
||||
}
|
||||
|
||||
/**
|
||||
* Get datatable row for a devis
|
||||
*/
|
||||
@ -69,6 +84,8 @@ export class Facture {
|
||||
'<div>' + this.factureProduits + '</div>',
|
||||
'<div>' + this.status_paiement + '</div>',
|
||||
'<div>' + this.payment_date + '</div>',
|
||||
'<div><span class="badge '+this.isDocumentAlreadyGeneratedClass+'">' + this.isDocumentAlreadyGeneratedLabel + '</span></div>',
|
||||
'<div><span class="badge '+this.isDocumentAlreadySentClass+'">' + this.isDocumentAlreadySentLabel + '</span></div>',
|
||||
'<div style="display:inline-block;margin-right:0px;width:80%;"><a href="' + this.baseUrl +'"><button>' + t('gestion', 'Open') + '</button></a></div><div data-modifier="facture" data-id=' + this.id + ' data-table="facture" style="display:inline-block;margin-right:0px;" class="deleteItem icon-delete"></div>',
|
||||
];
|
||||
return myrow;
|
||||
|
||||
@ -1,23 +1,23 @@
|
||||
<?php
|
||||
$quantiteOptions = [0];
|
||||
for ($i = 1; $i <= 10; $i++) {
|
||||
$quantiteOptions[] = $i / 10;
|
||||
}
|
||||
for($i=1; $i<=15; $i++) {
|
||||
if($i>1) $quantiteOptions[] = $i;
|
||||
if($i<15) $quantiteOptions[] = $i + 0.5;
|
||||
}
|
||||
$coverProducts = $_['coverProducts'];
|
||||
$quantiteOptions = [0];
|
||||
for ($i = 1; $i <= 10; $i++) {
|
||||
$quantiteOptions[] = $i / 10;
|
||||
}
|
||||
for ($i = 1; $i <= 15; $i++) {
|
||||
if ($i > 1) $quantiteOptions[] = $i;
|
||||
if ($i < 15) $quantiteOptions[] = $i + 0.5;
|
||||
}
|
||||
$coverProducts = $_['coverProducts'];
|
||||
?>
|
||||
<div id="contentTable">
|
||||
<div id="defuntid" data-table="defunt" data-id="<?php echo $_['defunt'][0]->id; ?>"></div>
|
||||
<div class="breadcrumb" data-html2canvas-ignore>
|
||||
<div class="crumb svg crumbhome">
|
||||
<a href="<?php echo($_['url']['index']); ?>" class="icon-home"></a>
|
||||
<span style="display: none;"></span>
|
||||
<a href="<?php echo ($_['url']['index']); ?>" class="icon-home"></a>
|
||||
<span style="display: none;"></span>
|
||||
</div>
|
||||
<div class="crumb svg crumbhome">
|
||||
<span>Défunt</span>
|
||||
<span>Défunt</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
@ -39,7 +39,7 @@
|
||||
<div class="d-flex flex-row align-items-center col-12" style="margin-bottom: 8px">
|
||||
<div class="col-3">Date de décès</div>
|
||||
<div class="col-9">
|
||||
<input class="gestion-input inputDate w-100" type="date" value="<?php echo $_['defunt'][0]->date_defunt ?>" data-table="defunt" data-column="date" data-id="<?php echo $_['defunt'][0]->id ?>"/>
|
||||
<input class="gestion-input inputDate w-100" type="date" value="<?php echo $_['defunt'][0]->date_defunt ?>" data-table="defunt" data-column="date" data-id="<?php echo $_['defunt'][0]->id ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- Heure -->
|
||||
@ -48,11 +48,11 @@
|
||||
<div class="col-9">
|
||||
<div class="d-flex flex-row col-12 align-items-center">
|
||||
<div class="col-5">
|
||||
<input class="gestion-input w-100" type="time" value="<?php echo $_['defunt'][0]->heure_debut ?>" data-table="defunt" data-column="heure_debut" data-id="<?php echo $_['defunt'][0]->id ?>"/>
|
||||
<input class="gestion-input w-100" type="time" value="<?php echo $_['defunt'][0]->heure_debut ?>" data-table="defunt" data-column="heure_debut" data-id="<?php echo $_['defunt'][0]->id ?>" />
|
||||
</div>
|
||||
<div class="d-flex col-2 justify-content-center align-items-center">à</div>
|
||||
<div class="col-5">
|
||||
<input class="gestion-input w-100" type="time" value="<?php echo $_['defunt'][0]->heure_fin ?>" data-table="defunt" data-column="heure_fin" data-id="<?php echo $_['defunt'][0]->id ?>"/>
|
||||
<input class="gestion-input w-100" type="time" value="<?php echo $_['defunt'][0]->heure_fin ?>" data-table="defunt" data-column="heure_fin" data-id="<?php echo $_['defunt'][0]->id ?>" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -61,58 +61,58 @@
|
||||
<div class="d-flex flex-row align-items-center col-12" style="margin-bottom: 8px">
|
||||
<div class="col-3">Nom</div>
|
||||
<div class="col-9">
|
||||
<input class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->nom_defunt ?>" data-table="defunt" data-column="nom" data-id="<?php echo $_['defunt'][0]->id ?>"/>
|
||||
<input class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->nom_defunt ?>" data-table="defunt" data-column="nom" data-id="<?php echo $_['defunt'][0]->id ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- Date de naissance -->
|
||||
<div class="d-flex flex-row align-items-center col-12" style="margin-bottom: 8px">
|
||||
<div class="col-3">Date de naissance</div>
|
||||
<div class="col-9">
|
||||
<input class="gestion-input w-100" type="date" value="<?php echo $_['defunt'][0]->date_naissance ?>" data-table="defunt" data-column="date_naissance" data-id="<?php echo $_['defunt'][0]->id ?>"/>
|
||||
<input class="gestion-input w-100" type="date" value="<?php echo $_['defunt'][0]->date_naissance ?>" data-table="defunt" data-column="date_naissance" data-id="<?php echo $_['defunt'][0]->id ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- Sexe -->
|
||||
<div class="d-flex flex-row align-items-center col-12" style="margin-bottom: 8px">
|
||||
<div class="col-3">Sexe</div>
|
||||
<div class="col-9">
|
||||
<select class="gestion-select w-100" data-table="defunt" data-column="sexe" data-id="<?php echo $_['defunt'][0]->id ?>">
|
||||
<option value="m" <?php if(strcmp($_['defunt'][0]->sexe, 'm')==0) echo 'selected' ?>>Masculin</option>
|
||||
<option value="f" <?php if(strcmp($_['defunt'][0]->sexe, 'f')==0) echo 'selected' ?>>Féminin</option>
|
||||
</select>
|
||||
<select class="gestion-select w-100" data-table="defunt" data-column="sexe" data-id="<?php echo $_['defunt'][0]->id ?>">
|
||||
<option value="m" <?php if (strcmp($_['defunt'][0]->sexe, 'm') == 0) echo 'selected' ?>>Masculin</option>
|
||||
<option value="f" <?php if (strcmp($_['defunt'][0]->sexe, 'f') == 0) echo 'selected' ?>>Féminin</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Référence pacemaker -->
|
||||
<div class="d-flex flex-row align-items-center col-12" style="margin-bottom: 16px">
|
||||
<div class="col-3">Référence pacemaker</div>
|
||||
<div class="col-9">
|
||||
<input class="gestion-input w-100" type="text" value="<?php echo ($_['defunt'][0]->ref_pacemaker ?? "") ?>" data-table="defunt" data-column="ref_pacemaker" data-id="<?php echo $_['defunt'][0]->id ?>"/>
|
||||
<input class="gestion-input w-100" type="text" value="<?php echo ($_['defunt'][0]->ref_pacemaker ?? "") ?>" data-table="defunt" data-column="ref_pacemaker" data-id="<?php echo $_['defunt'][0]->id ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- Product reference -->
|
||||
<div class="d-flex flex-row align-items-center col-12" style="margin-bottom: 16px">
|
||||
<div class="col-3">Référence du produit</div>
|
||||
<div class="col-9">
|
||||
<input class="gestion-input w-100" type="text" value="<?php echo ($_['defunt'][0]->product_reference ?? "") ?>" data-table="defunt" data-column="product_reference" data-id="<?php echo $_['defunt'][0]->id ?>"/>
|
||||
<input class="gestion-input w-100" type="text" value="<?php echo ($_['defunt'][0]->product_reference ?? "") ?>" data-table="defunt" data-column="product_reference" data-id="<?php echo $_['defunt'][0]->id ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- Product brand -->
|
||||
<div class="d-flex flex-row align-items-center col-12" style="margin-bottom: 16px">
|
||||
<div class="col-3">Marque du produit</div>
|
||||
<div class="col-9">
|
||||
<input class="gestion-input w-100" type="text" value="<?php echo ($_['defunt'][0]->product_brand ?? "") ?>" data-table="defunt" data-column="product_brand" data-id="<?php echo $_['defunt'][0]->id ?>"/>
|
||||
<input class="gestion-input w-100" type="text" value="<?php echo ($_['defunt'][0]->product_brand ?? "") ?>" data-table="defunt" data-column="product_brand" data-id="<?php echo $_['defunt'][0]->id ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- Product photo -->
|
||||
<div class="d-flex flex-row align-items-center col-12" style="margin-bottom: 16px">
|
||||
<div class="col-3">Photo du produit</div>
|
||||
<div class="col-9">
|
||||
<input class="w-100 uploadDefuntPacemakerPhoto" accept="image/*" type="file" data-id="<?php echo $_['defunt'][0]->id ?>"/>
|
||||
<input class="w-100 uploadDefuntPacemakerPhoto" accept="image/*" type="file" data-id="<?php echo $_['defunt'][0]->id ?>" />
|
||||
<?php
|
||||
if($_['defunt'][0]->product_photo != null){
|
||||
?>
|
||||
<label id="pacemakerPhotoLabel" for=""><?php echo ($_['defunt'][0]->product_photo_name ?? "") ?></label>
|
||||
<?php
|
||||
}
|
||||
if ($_['defunt'][0]->product_photo != null) {
|
||||
?>
|
||||
<label id="pacemakerPhotoLabel" for=""><?php echo ($_['defunt'][0]->product_photo_name ?? "") ?></label>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
@ -121,15 +121,15 @@
|
||||
<h6>Housse</h6>
|
||||
<hr>
|
||||
<?php foreach ($coverProducts as $currentCoverProduct): ?>
|
||||
<div class="row">
|
||||
<div class="d-flex align-items-center mb-2">
|
||||
<input type="radio"
|
||||
name="coverProductsRadioButton"
|
||||
value="<?= $currentCoverProduct->id; ?>"
|
||||
<?= $currentCoverProduct->id == $_['defunt'][0]->product_cover_id ? 'checked' : ''; ?>>
|
||||
<label class="form-check-label"><?= $currentCoverProduct->description; ?></label>
|
||||
<div class="row">
|
||||
<div class="d-flex align-items-center mb-2">
|
||||
<input type="radio"
|
||||
name="coverProductsRadioButton"
|
||||
value="<?= $currentCoverProduct->id; ?>"
|
||||
<?= $currentCoverProduct->id == $_['defunt'][0]->product_cover_id ? 'checked' : ''; ?>>
|
||||
<label class="form-check-label"><?= $currentCoverProduct->description; ?></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<div class="row p-2">
|
||||
<button class="btn btn-secondary" id="coverProductsRadioButton"> Valider le choix </button>
|
||||
@ -138,7 +138,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<button id="buttonEditCareRapport" class="btn btn-secondary" type="button">
|
||||
Editer rapport de soin
|
||||
Editer rapport de soin
|
||||
</button>
|
||||
</div>
|
||||
<div id="additionalDefuntData" class="hiddenContent pt-2">
|
||||
@ -149,7 +149,7 @@
|
||||
<div class="d-flex flex-row col-12" style="margin-bottom: 8px">
|
||||
<div class="col-3">Corpulence</div>
|
||||
<div class="col-9">
|
||||
<input id="corpulence-input" class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->corpulence ?>" data-table="defunt" data-column="corpulence" data-id="<?php echo $_['defunt'][0]->id ?>"/>
|
||||
<input id="corpulence-input" class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->corpulence ?>" data-table="defunt" data-column="corpulence" data-id="<?php echo $_['defunt'][0]->id ?>" />
|
||||
<ul class="corpulence-list"></ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -157,7 +157,7 @@
|
||||
<div class="d-flex flex-row col-12" style="margin-bottom: 8px">
|
||||
<div class="col-3">Rigidité</div>
|
||||
<div class="col-9">
|
||||
<input id="rigidite-input" class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->rigidite ?>" data-table="defunt" data-column="rigidite" data-id="<?php echo $_['defunt'][0]->id ?>"/>
|
||||
<input id="rigidite-input" class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->rigidite ?>" data-table="defunt" data-column="rigidite" data-id="<?php echo $_['defunt'][0]->id ?>" />
|
||||
<ul class="rigidite-list"></ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -165,7 +165,7 @@
|
||||
<div class="d-flex flex-row col-12" style="margin-bottom: 16px">
|
||||
<div class="col-3">Lividités</div>
|
||||
<div class="col-9">
|
||||
<input id="lividite-input" class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->lividite ?>" data-table="defunt" data-column="lividite" data-id="<?php echo $_['defunt'][0]->id ?>"/>
|
||||
<input id="lividite-input" class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->lividite ?>" data-table="defunt" data-column="lividite" data-id="<?php echo $_['defunt'][0]->id ?>" />
|
||||
<ul class="lividite-list"></ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -184,7 +184,7 @@
|
||||
<div class="d-flex flex-row align-items-center col-12" style="margin-bottom: 8px">
|
||||
<div class="col-3">Désignation</div>
|
||||
<div class="col-9">
|
||||
<input id="acces-input" class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->acces ?>" data-table="defunt" data-column="acces" data-id="<?php echo $_['defunt'][0]->id ?>"/>
|
||||
<input id="acces-input" class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->acces ?>" data-table="defunt" data-column="acces" data-id="<?php echo $_['defunt'][0]->id ?>" />
|
||||
<ul class="acces-list"></ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -192,18 +192,18 @@
|
||||
<div class="d-flex flex-row align-items-center col-12" style="margin-bottom: 8px">
|
||||
<div class="col-3">Recherche</div>
|
||||
<div class="col-9">
|
||||
<input class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->acces_recherche ?>" data-table="defunt" data-column="acces_recherche" data-id="<?php echo $_['defunt'][0]->id ?>"/>
|
||||
<input class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->acces_recherche ?>" data-table="defunt" data-column="acces_recherche" data-id="<?php echo $_['defunt'][0]->id ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<!-- Etat -->
|
||||
<div class="d-flex flex-row align-items-center col-12" style="margin-bottom: 16px">
|
||||
<div class="col-3">État</div>
|
||||
<div class="col-9">
|
||||
<select class="gestion-select w-100" data-table="defunt" data-column="acces_etat" data-id="<?php echo $_['defunt'][0]->id ?>">
|
||||
<option>Selectionner un état</option>
|
||||
<option value="mauvais" <?php if(strcmp($_['defunt'][0]->acces_etat, 'mauvais')==0) echo 'selected' ?>>Mauvais</option>
|
||||
<option value="bon" <?php if(strcmp($_['defunt'][0]->acces_etat, 'bon')==0) echo 'selected' ?>>Bon</option>
|
||||
</select>
|
||||
<select class="gestion-select w-100" data-table="defunt" data-column="acces_etat" data-id="<?php echo $_['defunt'][0]->id ?>">
|
||||
<option>Selectionner un état</option>
|
||||
<option value="mauvais" <?php if (strcmp($_['defunt'][0]->acces_etat, 'mauvais') == 0) echo 'selected' ?>>Mauvais</option>
|
||||
<option value="bon" <?php if (strcmp($_['defunt'][0]->acces_etat, 'bon') == 0) echo 'selected' ?>>Bon</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -214,7 +214,7 @@
|
||||
<div class="d-flex flex-row col-12" style="margin-bottom: 8px">
|
||||
<div class="col-3">Désignation</div>
|
||||
<div class="col-9">
|
||||
<input id="preinjection-input" class="gestion-input w-100" autocomplete="off" type="text" value="<?php echo $_['defunt'][0]->preinjection ?>" data-table="defunt" data-column="preinjection" data-id="<?php echo $_['defunt'][0]->id ?>"/>
|
||||
<input id="preinjection-input" class="gestion-input w-100" autocomplete="off" type="text" value="<?php echo $_['defunt'][0]->preinjection ?>" data-table="defunt" data-column="preinjection" data-id="<?php echo $_['defunt'][0]->id ?>" />
|
||||
<ul class="preinjection-list"></ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -222,11 +222,11 @@
|
||||
<div class="d-flex flex-row align-items-center col-12" style="margin-bottom: 16px">
|
||||
<div class="col-3">Quantité(l)</div>
|
||||
<div class="col-9">
|
||||
<select class="gestion-select w-100" data-table="defunt" data-column="preinjection_qte" data-id="<?php echo $_['defunt'][0]->id ?>">
|
||||
<?php for($i=0; $i<sizeof($quantiteOptions); $i++) { ?>
|
||||
<option value="<?php echo $quantiteOptions[$i] ?>" <?php if($_['defunt'][0]->preinjection_qte == $quantiteOptions[$i]) echo 'selected' ?>><?php echo $quantiteOptions[$i] ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<select class="gestion-select w-100" data-table="defunt" data-column="preinjection_qte" data-id="<?php echo $_['defunt'][0]->id ?>">
|
||||
<?php for ($i = 0; $i < sizeof($quantiteOptions); $i++) { ?>
|
||||
<option value="<?php echo $quantiteOptions[$i] ?>" <?php if ($_['defunt'][0]->preinjection_qte == $quantiteOptions[$i]) echo 'selected' ?>><?php echo $quantiteOptions[$i] ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -237,7 +237,7 @@
|
||||
<div class="d-flex flex-row col-12" style="margin-bottom: 8px">
|
||||
<div class="col-3">Désignation</div>
|
||||
<div class="col-9">
|
||||
<input id="injection-input" class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->injection ?>" data-table="defunt" data-column="injection" data-id="<?php echo $_['defunt'][0]->id ?>"/>
|
||||
<input id="injection-input" class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->injection ?>" data-table="defunt" data-column="injection" data-id="<?php echo $_['defunt'][0]->id ?>" />
|
||||
<ul class="injection-list"></ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -245,11 +245,11 @@
|
||||
<div class="d-flex flex-row align-items-center col-12" style="margin-bottom: 8px">
|
||||
<div class="col-3">Diffusion</div>
|
||||
<div class="col-9">
|
||||
<select class="gestion-select w-100" data-table="defunt" data-column="injection_diffusion" data-id="<?php echo $_['defunt'][0]->id ?>">
|
||||
<option>Selectionner un état</option>
|
||||
<option value="mauvaise" <?php if(strcmp($_['defunt'][0]->injection_diffusion, 'mauvaise')==0) echo 'selected' ?>>Mauvaise</option>
|
||||
<option value="bonne" <?php if(strcmp($_['defunt'][0]->injection_diffusion, 'bonne')==0) echo 'selected' ?>>Bonne</option>
|
||||
</select>
|
||||
<select class="gestion-select w-100" data-table="defunt" data-column="injection_diffusion" data-id="<?php echo $_['defunt'][0]->id ?>">
|
||||
<option>Selectionner un état</option>
|
||||
<option value="mauvaise" <?php if (strcmp($_['defunt'][0]->injection_diffusion, 'mauvaise') == 0) echo 'selected' ?>>Mauvaise</option>
|
||||
<option value="bonne" <?php if (strcmp($_['defunt'][0]->injection_diffusion, 'bonne') == 0) echo 'selected' ?>>Bonne</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Quantité injection -->
|
||||
@ -257,9 +257,9 @@
|
||||
<div class="col-3">Quantité(l)</div>
|
||||
<div class="col-9">
|
||||
<select class="gestion-select w-100" data-table="defunt" data-column="injection_qte" data-id="<?php echo $_['defunt'][0]->id ?>">
|
||||
<?php for($i=0; $i<sizeof($quantiteOptions); $i++) { ?>
|
||||
<option value="<?php echo $quantiteOptions[$i] ?>" <?php if($_['defunt'][0]->injection_qte == $quantiteOptions[$i]) echo 'selected' ?>><?php echo $quantiteOptions[$i] ?></option>
|
||||
<?php } ?>
|
||||
<?php for ($i = 0; $i < sizeof($quantiteOptions); $i++) { ?>
|
||||
<option value="<?php echo $quantiteOptions[$i] ?>" <?php if ($_['defunt'][0]->injection_qte == $quantiteOptions[$i]) echo 'selected' ?>><?php echo $quantiteOptions[$i] ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -271,7 +271,7 @@
|
||||
<div class="d-flex flex-row col-12" style="margin-bottom: 8px">
|
||||
<div class="col-3">Désignation</div>
|
||||
<div class="col-9">
|
||||
<input id="coinjection-input" class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->coinjection ?>" data-table="defunt" data-column="coinjection" data-id="<?php echo $_['defunt'][0]->id ?>"/>
|
||||
<input id="coinjection-input" class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->coinjection ?>" data-table="defunt" data-column="coinjection" data-id="<?php echo $_['defunt'][0]->id ?>" />
|
||||
<ul class="coinjection-list"></ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -279,11 +279,11 @@
|
||||
<div class="d-flex flex-row align-items-center col-12" style="margin-bottom: 8px">
|
||||
<div class="col-3">Quantité(l)</div>
|
||||
<div class="col-9">
|
||||
<select class="gestion-select w-100" data-table="defunt" data-column="coinjection_qte" data-id="<?php echo $_['defunt'][0]->id ?>">
|
||||
<?php for($i=0; $i<sizeof($quantiteOptions); $i++) { ?>
|
||||
<option value="<?php echo $quantiteOptions[$i] ?>" <?php if($_['defunt'][0]->coinjection_qte == $quantiteOptions[$i]) echo 'selected' ?>><?php echo $quantiteOptions[$i] ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<select class="gestion-select w-100" data-table="defunt" data-column="coinjection_qte" data-id="<?php echo $_['defunt'][0]->id ?>">
|
||||
<?php for ($i = 0; $i < sizeof($quantiteOptions); $i++) { ?>
|
||||
<option value="<?php echo $quantiteOptions[$i] ?>" <?php if ($_['defunt'][0]->coinjection_qte == $quantiteOptions[$i]) echo 'selected' ?>><?php echo $quantiteOptions[$i] ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -294,7 +294,7 @@
|
||||
<div class="d-flex flex-row col-12" style="margin-bottom: 8px">
|
||||
<div class="col-3">Désignation</div>
|
||||
<div class="col-9">
|
||||
<input id="drainage-input" class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->drainage ?>" data-table="defunt" data-column="drainage" data-id="<?php echo $_['defunt'][0]->id ?>"/>
|
||||
<input id="drainage-input" class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->drainage ?>" data-table="defunt" data-column="drainage" data-id="<?php echo $_['defunt'][0]->id ?>" />
|
||||
<ul class="drainage-list"></ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -302,11 +302,11 @@
|
||||
<div class="d-flex flex-row align-items-center col-12" style="margin-bottom: 8px">
|
||||
<div class="col-3">État</div>
|
||||
<div class="col-9">
|
||||
<select class="gestion-select w-100" data-table="defunt" data-column="drainage_etat" data-id="<?php echo $_['defunt'][0]->id ?>">
|
||||
<option>Selectionner un état</option>
|
||||
<option value="mauvaise" <?php if(strcmp($_['defunt'][0]->drainage_etat, 'mauvaise')==0) echo 'selected' ?>>Mauvaise</option>
|
||||
<option value="bonne" <?php if(strcmp($_['defunt'][0]->drainage_etat, 'bonne')==0) echo 'selected' ?>>Bonne</option>
|
||||
</select>
|
||||
<select class="gestion-select w-100" data-table="defunt" data-column="drainage_etat" data-id="<?php echo $_['defunt'][0]->id ?>">
|
||||
<option>Selectionner un état</option>
|
||||
<option value="mauvaise" <?php if (strcmp($_['defunt'][0]->drainage_etat, 'mauvaise') == 0) echo 'selected' ?>>Mauvaise</option>
|
||||
<option value="bonne" <?php if (strcmp($_['defunt'][0]->drainage_etat, 'bonne') == 0) echo 'selected' ?>>Bonne</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Quantité drainage -->
|
||||
@ -314,9 +314,9 @@
|
||||
<div class="col-3">Quantité(l)</div>
|
||||
<div class="col-9">
|
||||
<select class="gestion-select w-100" data-table="defunt" data-column="drainage_qte" data-id="<?php echo $_['defunt'][0]->id ?>">
|
||||
<?php for($i=0; $i<sizeof($quantiteOptions); $i++) { ?>
|
||||
<option value="<?php echo $quantiteOptions[$i] ?>" <?php if($_['defunt'][0]->drainage_qte == $quantiteOptions[$i]) echo 'selected' ?>><?php echo $quantiteOptions[$i] ?></option>
|
||||
<?php } ?>
|
||||
<?php for ($i = 0; $i < sizeof($quantiteOptions); $i++) { ?>
|
||||
<option value="<?php echo $quantiteOptions[$i] ?>" <?php if ($_['defunt'][0]->drainage_qte == $quantiteOptions[$i]) echo 'selected' ?>><?php echo $quantiteOptions[$i] ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -328,7 +328,7 @@
|
||||
<div class="d-flex flex-row col-12" style="margin-bottom: 8px">
|
||||
<div class="col-3">Désignation</div>
|
||||
<div id="ponction-input" class="col-9">
|
||||
<input class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->ponction ?>" data-table="defunt" data-column="ponction" data-id="<?php echo $_['defunt'][0]->id ?>"/>
|
||||
<input class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->ponction ?>" data-table="defunt" data-column="ponction" data-id="<?php echo $_['defunt'][0]->id ?>" />
|
||||
<ul class="ponction-list"></ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -337,9 +337,9 @@
|
||||
<div class="col-3">Quantité(l)</div>
|
||||
<div class="col-9">
|
||||
<select class="gestion-select w-100" data-table="defunt" data-column="ponction_qte" data-id="<?php echo $_['defunt'][0]->id ?>">
|
||||
<?php for($i=0; $i<sizeof($quantiteOptions); $i++) { ?>
|
||||
<option value="<?php echo $quantiteOptions[$i] ?>" <?php if($_['defunt'][0]->ponction_qte == $quantiteOptions[$i]) echo 'selected' ?>><?php echo $quantiteOptions[$i] ?></option>
|
||||
<?php } ?>
|
||||
<?php for ($i = 0; $i < sizeof($quantiteOptions); $i++) { ?>
|
||||
<option value="<?php echo $quantiteOptions[$i] ?>" <?php if ($_['defunt'][0]->ponction_qte == $quantiteOptions[$i]) echo 'selected' ?>><?php echo $quantiteOptions[$i] ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -351,7 +351,7 @@
|
||||
<div class="d-flex flex-row col-12" style="margin-bottom: 8px">
|
||||
<div class="col-3">Désignation</div>
|
||||
<div class="col-9">
|
||||
<input id="cavite-input" class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->cavite ?>" data-table="defunt" data-column="cavite" data-id="<?php echo $_['defunt'][0]->id ?>"/>
|
||||
<input id="cavite-input" class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->cavite ?>" data-table="defunt" data-column="cavite" data-id="<?php echo $_['defunt'][0]->id ?>" />
|
||||
<ul class="cavite-list"></ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -360,9 +360,9 @@
|
||||
<div class="col-3">Quantité(l)</div>
|
||||
<div class="col-9">
|
||||
<select class="gestion-select w-100" data-table="defunt" data-column="cavite_qte" data-id="<?php echo $_['defunt'][0]->id ?>">
|
||||
<?php for($i=0; $i<sizeof($quantiteOptions); $i++) { ?>
|
||||
<option value="<?php echo $quantiteOptions[$i] ?>" <?php if($_['defunt'][0]->cavite_qte == $quantiteOptions[$i]) echo 'selected' ?>><?php echo $quantiteOptions[$i] ?></option>
|
||||
<?php } ?>
|
||||
<?php for ($i = 0; $i < sizeof($quantiteOptions); $i++) { ?>
|
||||
<option value="<?php echo $quantiteOptions[$i] ?>" <?php if ($_['defunt'][0]->cavite_qte == $quantiteOptions[$i]) echo 'selected' ?>><?php echo $quantiteOptions[$i] ?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@ -380,12 +380,12 @@
|
||||
<div class="table-responsive col-12">
|
||||
<table id="hypodermiques" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Quantité</th>
|
||||
<th>Désignation</th>
|
||||
<th>Endroit</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Quantité</th>
|
||||
<th>Désignation</th>
|
||||
<th>Endroit</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
@ -400,7 +400,7 @@
|
||||
<div class="d-flex flex-row col-12" style="margin-bottom: 8px">
|
||||
<div class="col-3">Désinfection</div>
|
||||
<div class="col-9">
|
||||
<input id="desinfection-input" class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->desinfection ?>" data-table="defunt" data-column="desinfection" data-id="<?php echo $_['defunt'][0]->id ?>"/>
|
||||
<input id="desinfection-input" class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->desinfection ?>" data-table="defunt" data-column="desinfection" data-id="<?php echo $_['defunt'][0]->id ?>" />
|
||||
<ul class="desinfection-list"></ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -408,7 +408,7 @@
|
||||
<div class="d-flex flex-row col-12" style="margin-bottom: 8px">
|
||||
<div class="col-3">Lavage</div>
|
||||
<div class="col-9">
|
||||
<input id="lavage-input" class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->lavage ?>" data-table="defunt" data-column="lavage" data-id="<?php echo $_['defunt'][0]->id ?>"/>
|
||||
<input id="lavage-input" class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->lavage ?>" data-table="defunt" data-column="lavage" data-id="<?php echo $_['defunt'][0]->id ?>" />
|
||||
<ul class="lavage-list"></ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -416,7 +416,7 @@
|
||||
<div class="d-flex flex-row col-12 align-items-center" style="margin-bottom: 8px">
|
||||
<div class="col-3">Rasage</div>
|
||||
<div class="d-flex col-9 justify-content-start align-items-start">
|
||||
<input class="gestion-checkbox" type="checkbox" <?php if($_['defunt'][0]->rasage==1) echo 'checked' ?> data-table="defunt" data-column="rasage" data-id="<?php echo $_['defunt'][0]->id ?>"/>
|
||||
<input class="gestion-checkbox" type="checkbox" <?php if ($_['defunt'][0]->rasage == 1) echo 'checked' ?> data-table="defunt" data-column="rasage" data-id="<?php echo $_['defunt'][0]->id ?>" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -427,7 +427,7 @@
|
||||
<div class="d-flex flex-row col-12" style="margin-bottom: 8px">
|
||||
<div class="col-3">Cosmétiques</div>
|
||||
<div class="col-9">
|
||||
<input id="cosmetiques-input" class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->presentation_cosmetique ?>" data-table="defunt" data-column="presentation_cosmetique" data-id="<?php echo $_['defunt'][0]->id ?>"/>
|
||||
<input id="cosmetiques-input" class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->presentation_cosmetique ?>" data-table="defunt" data-column="presentation_cosmetique" data-id="<?php echo $_['defunt'][0]->id ?>" />
|
||||
<ul class="cosmetiques-list"></ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -435,7 +435,7 @@
|
||||
<div class="d-flex flex-row col-12" style="margin-bottom: 8px">
|
||||
<div class="col-3">Sur</div>
|
||||
<div class="col-9">
|
||||
<input id="sur-input" class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->presentation_sur ?>" data-table="defunt" data-column="presentation_sur" data-id="<?php echo $_['defunt'][0]->id ?>"/>
|
||||
<input id="sur-input" class="gestion-input w-100" type="text" value="<?php echo $_['defunt'][0]->presentation_sur ?>" data-table="defunt" data-column="presentation_sur" data-id="<?php echo $_['defunt'][0]->id ?>" />
|
||||
<ul class="sur-list"></ul>
|
||||
</div>
|
||||
</div>
|
||||
@ -454,18 +454,20 @@
|
||||
</div>
|
||||
<div class="col-12" style="margin-bottom: 32px">
|
||||
<div class="d-flex flex-row justify-content-between">
|
||||
<div><h6>OBSERVATIONS</h6></div>
|
||||
<div>
|
||||
<h6>OBSERVATIONS</h6>
|
||||
</div>
|
||||
<button id="defuntAddObservation" class="btn btn-secondary" type="button">Ajouter une observation</button>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="table-responsive">
|
||||
<table id="observations" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Observation</th>
|
||||
<th><?php p($l->t('Comment'));?></th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Observation</th>
|
||||
<th><?php p($l->t('Comment')); ?></th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
@ -474,20 +476,22 @@
|
||||
</div>
|
||||
<div class="col-12" style="margin-bottom: 32px">
|
||||
<div class="d-flex flex-row justify-content-between">
|
||||
<div><h6>BIJOU(X)</h6></div>
|
||||
<div>
|
||||
<h6>BIJOU(X)</h6>
|
||||
</div>
|
||||
<button id="defuntAddBijou" class="btn btn-secondary" type="button">Ajouter un bijou</button>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="table-responsive">
|
||||
<table id="bijoux" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Désignation</th>
|
||||
<th><?php p($l->t('Comment'));?></th>
|
||||
<th><?php p($l->t('Photo'));?></th>
|
||||
<th><?php p($l->t('Nom de la personne qui a récupéré ces bijoux'));?></th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Désignation</th>
|
||||
<th><?php p($l->t('Comment')); ?></th>
|
||||
<th><?php p($l->t('Photo')); ?></th>
|
||||
<th><?php p($l->t('Nom de la personne qui a récupéré ces bijoux')); ?></th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
@ -497,26 +501,56 @@
|
||||
</div>
|
||||
<hr>
|
||||
<div class="modal" id="saveRapportBijouxModal" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Générer le rapport de bijoux</h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="radio-group">
|
||||
<label>
|
||||
<input type="radio" name="withPhotos" value="1"> Avec photos
|
||||
</label>
|
||||
<label>
|
||||
<input type="radio" name="withPhotos" value="0"> Sans photos
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="closeRapportBijouxModal" type="button" class="btn btn-secondary">Annuler</button>
|
||||
<button id="exportBijouxRapport" type="button" class="btn btn-primary">Sauvegarder</button>
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Générer le rapport de bijoux</h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="radio-group">
|
||||
<label>
|
||||
<input type="radio" name="withPhotos" value="1"> Avec photos
|
||||
</label>
|
||||
<label>
|
||||
<input type="radio" name="withPhotos" value="0"> Sans photos
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="closeRapportBijouxModal" type="button" class="btn btn-secondary">Annuler</button>
|
||||
<button id="exportBijouxRapport" type="button" class="btn btn-primary">Sauvegarder</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal" id="confirmSendEmailModal" data-backdrop="false" tabindex="-1">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="titleSendEmailModal">Confirmation de l'envoi par email</h5>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group form-check d-flex justify-items-start align-items-center ">
|
||||
<input type="checkbox" style="cursor:pointer;margin-right:8px;" id="checkSendEmailModal">
|
||||
<label class="form-check-label" for="checkSendEmailModal">Voulez-vous envoyer par email le fichier ? </label>
|
||||
</div>
|
||||
<div class="form-group px-4">
|
||||
<input
|
||||
class="form-control rounded-sm"
|
||||
placeholder="adresse email"
|
||||
type="text"
|
||||
value="<?= $_['defunt'][0]->client_group_mail ?? $_['defunt'][0]->client_mail; ?>"
|
||||
style="cursor:pointer;margin-right:8px;"
|
||||
id="valueSendEmailModal"
|
||||
data-init-value="<?= $_['defunt'][0]->client_group_mail ?? $_['defunt'][0]->client_mail; ?>"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="closeSendEmailModal" type="button" class="btn btn-secondary">Fermer</button>
|
||||
<button id="validateSendEmailModal" type="button" class="btn btn-primary">Valider</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user