feature: add pending calendar event button
This commit is contained in:
parent
63d6a6952b
commit
1a931c5027
@ -164570,7 +164570,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"compressed":true,"categories":[{"id"
|
|||||||
/******/ // This function allow to reference async chunks
|
/******/ // This function allow to reference async chunks
|
||||||
/******/ __webpack_require__.u = (chunkId) => {
|
/******/ __webpack_require__.u = (chunkId) => {
|
||||||
/******/ // return url for filenames based on template
|
/******/ // return url for filenames based on template
|
||||||
/******/ return "calendar-" + chunkId + ".js?v=" + {"vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981":"31a7d4ece3cdde2d67f1","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_webdav_dist_web_index_js":"454da8f908d41b47c607","vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-8ibBgPg__mjs":"ea54a36450de178d1141"}[chunkId] + "";
|
/******/ return "calendar-" + chunkId + ".js?v=" + {"vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981":"3a2ab5c12f0771c82ad1","vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8":"b90524c103590fa7a133","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"214ba50739254b654bf4","node_modules_nextcloud_dialogs_dist_legacy_mjs":"8be838e4c6e9aae56c87","vendors-node_modules_webdav_dist_web_index_js":"454da8f908d41b47c607","vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-8ibBgPg__mjs":"ea54a36450de178d1141"}[chunkId] + "";
|
||||||
/******/ };
|
/******/ };
|
||||||
/******/ })();
|
/******/ })();
|
||||||
/******/
|
/******/
|
||||||
@ -164827,4 +164827,4 @@ const visitorInfo = (0,_nextcloud_initial_state__WEBPACK_IMPORTED_MODULE_1__.loa
|
|||||||
|
|
||||||
/******/ })()
|
/******/ })()
|
||||||
;
|
;
|
||||||
//# sourceMappingURL=calendar-appointments-booking.js.map?v=5367dc1bf840d0667b28
|
//# sourceMappingURL=calendar-appointments-booking.js.map?v=dffd8c57917781498f5a
|
||||||
File diff suppressed because one or more lines are too long
@ -37516,4 +37516,4 @@ const booking = (0,_nextcloud_initial_state__WEBPACK_IMPORTED_MODULE_1__.loadSta
|
|||||||
|
|
||||||
/******/ })()
|
/******/ })()
|
||||||
;
|
;
|
||||||
//# sourceMappingURL=calendar-appointments-confirmation.js.map?v=4a43baa099014d97ecc5
|
//# sourceMappingURL=calendar-appointments-confirmation.js.map?v=89b4f5ac684ec7582afa
|
||||||
File diff suppressed because one or more lines are too long
@ -37552,4 +37552,4 @@ const booking = (0,_nextcloud_initial_state__WEBPACK_IMPORTED_MODULE_1__.loadSta
|
|||||||
|
|
||||||
/******/ })()
|
/******/ })()
|
||||||
;
|
;
|
||||||
//# sourceMappingURL=calendar-appointments-conflict.js.map?v=84cfe3eb419f8e079c5a
|
//# sourceMappingURL=calendar-appointments-conflict.js.map?v=ffe5d99519c2fe6180c2
|
||||||
File diff suppressed because one or more lines are too long
@ -160605,4 +160605,4 @@ vue__WEBPACK_IMPORTED_MODULE_5__["default"].prototype.$n = _nextcloud_l10n__WEBP
|
|||||||
|
|
||||||
/******/ })()
|
/******/ })()
|
||||||
;
|
;
|
||||||
//# sourceMappingURL=calendar-appointments-overview.js.map?v=bc10bc435203d6603a01
|
//# sourceMappingURL=calendar-appointments-overview.js.map?v=54666134d56afd918df4
|
||||||
File diff suppressed because one or more lines are too long
@ -500,4 +500,4 @@ if(false) {}
|
|||||||
/***/ })
|
/***/ })
|
||||||
|
|
||||||
}]);
|
}]);
|
||||||
//# sourceMappingURL=calendar-dashboard-lazy.js.map?v=a51e4becd0c10f90296c
|
//# sourceMappingURL=calendar-dashboard-lazy.js.map?v=41ca77d834f6e319b2e6
|
||||||
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
|
/******/ // This function allow to reference async chunks
|
||||||
/******/ __webpack_require__.u = (chunkId) => {
|
/******/ __webpack_require__.u = (chunkId) => {
|
||||||
/******/ // return url for filenames based on template
|
/******/ // return url for filenames based on template
|
||||||
/******/ return "calendar-" + chunkId + ".js?v=" + {"vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981":"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":"fffe12f1a96465df6298","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] + "";
|
/******/ return "calendar-" + chunkId + ".js?v=" + {"vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981":"3a2ab5c12f0771c82ad1","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":"88354dc01b19c1f3f2fe","vendors-node_modules_nextcloud_vue-dashboard_dist_vue-dashboard_js-node_modules_css-loader_di-9e6f3d":"94406568c4140a6ddece","src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790":"7cf71b4f92d5bbc180b4","src_store_index_js":"c76e0bb3f18bedbee8e9","src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258":"7910aecb675dcdfa620c","dashboard-lazy":"41ca77d834f6e319b2e6","vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8":"b90524c103590fa7a133","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"214ba50739254b654bf4","node_modules_nextcloud_dialogs_dist_legacy_mjs":"8be838e4c6e9aae56c87","vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-8ibBgPg__mjs":"ea54a36450de178d1141","vendors-node_modules_moment_locale_af_js-node_modules_moment_locale_ar-dz_js-node_modules_mom-582c96":"ce1bed825f57dd1d117a","node_modules_moment_locale_sync_recursive_":"4bc2c39c5e0ff182c2e3"}[chunkId] + "";
|
||||||
/******/ };
|
/******/ };
|
||||||
/******/ })();
|
/******/ })();
|
||||||
/******/
|
/******/
|
||||||
@ -1580,4 +1580,4 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
|
|
||||||
/******/ })()
|
/******/ })()
|
||||||
;
|
;
|
||||||
//# sourceMappingURL=calendar-dashboard.js.map?v=6d3d8dd9d1db05fad766
|
//# sourceMappingURL=calendar-dashboard.js.map?v=2420fbe1a3aaf3cde750
|
||||||
File diff suppressed because one or more lines are too long
@ -15078,6 +15078,10 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
disabled: {
|
disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
isCalendarPending: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -15098,6 +15102,9 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
saveThisOnly() {
|
saveThisOnly() {
|
||||||
this.$emit('save-this-only');
|
this.$emit('save-this-only');
|
||||||
},
|
},
|
||||||
|
saveAsPendingCalendarEvent() {
|
||||||
|
this.$emit('save-pending-calendar-event');
|
||||||
|
},
|
||||||
saveThisAndAllFuture() {
|
saveThisAndAllFuture() {
|
||||||
this.$emit('save-this-and-all-future');
|
this.$emit('save-this-and-all-future');
|
||||||
},
|
},
|
||||||
@ -16239,7 +16246,8 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
showModalUsers: [],
|
showModalUsers: [],
|
||||||
sharedProgress: 0,
|
sharedProgress: 0,
|
||||||
showPreloader: false,
|
showPreloader: false,
|
||||||
defuntUrl: undefined
|
defuntUrl: undefined,
|
||||||
|
isCalendarPending: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -16302,7 +16310,9 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
immediate: true,
|
immediate: true,
|
||||||
handler() {
|
handler() {
|
||||||
if (this.calendarObjectInstance) {
|
if (this.calendarObjectInstance) {
|
||||||
|
var _this$calendarObjectI6;
|
||||||
this.getDefuntUrl();
|
this.getDefuntUrl();
|
||||||
|
this.isCalendarPending = (_this$calendarObjectI6 = this.calendarObjectInstance.isCalendarPending) !== null && _this$calendarObjectI6 !== void 0 ? _this$calendarObjectI6 : false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deep: true
|
deep: true
|
||||||
@ -16530,6 +16540,19 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
},
|
},
|
||||||
viewDefunt() {
|
viewDefunt() {
|
||||||
window.open(this.defuntUrl, '_blank');
|
window.open(this.defuntUrl, '_blank');
|
||||||
|
},
|
||||||
|
async saveAsPendingCalendarEvent() {
|
||||||
|
if (this.isNew) {
|
||||||
|
await this.savePendingCalendar(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.isViewing = true;
|
||||||
|
try {
|
||||||
|
await this.save(false);
|
||||||
|
this.requiresActionOnRouteLeave = false;
|
||||||
|
} catch (error) {
|
||||||
|
this.isViewing = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -16607,7 +16630,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
|
|
||||||
|
|
||||||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
||||||
name: 'EditSimple',
|
name: "EditSimple",
|
||||||
components: {
|
components: {
|
||||||
PropertyIsLeave: _components_Editor_Properties_PropertyIsLeave_vue__WEBPACK_IMPORTED_MODULE_26__["default"],
|
PropertyIsLeave: _components_Editor_Properties_PropertyIsLeave_vue__WEBPACK_IMPORTED_MODULE_26__["default"],
|
||||||
PropertyIsCalendarPending: _components_Editor_Properties_PropertyIsCalendarPending__WEBPACK_IMPORTED_MODULE_27__["default"],
|
PropertyIsCalendarPending: _components_Editor_Properties_PropertyIsCalendarPending__WEBPACK_IMPORTED_MODULE_27__["default"],
|
||||||
@ -16641,9 +16664,10 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
mixins: [_mixins_EditorMixin_js__WEBPACK_IMPORTED_MODULE_3__["default"]],
|
mixins: [_mixins_EditorMixin_js__WEBPACK_IMPORTED_MODULE_3__["default"]],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
placement: 'auto',
|
placement: "auto",
|
||||||
hasLocation: false,
|
hasLocation: false,
|
||||||
hasDescription: false,
|
hasDescription: false,
|
||||||
|
isCalendarPending: false,
|
||||||
boundaryElement: null,
|
boundaryElement: null,
|
||||||
isVisible: true,
|
isVisible: true,
|
||||||
isViewing: true,
|
isViewing: true,
|
||||||
@ -16674,8 +16698,8 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
* @return {string}
|
* @return {string}
|
||||||
*/
|
*/
|
||||||
titleOrPlaceholder() {
|
titleOrPlaceholder() {
|
||||||
if (this.title === '' && this.isReadOnlyOrViewing && !this.isLoading) {
|
if (this.title === "" && this.isReadOnlyOrViewing && !this.isLoading) {
|
||||||
return t('calendar', 'Untitled event');
|
return t("calendar", "Untitled event");
|
||||||
}
|
}
|
||||||
return this.title;
|
return this.title;
|
||||||
}
|
}
|
||||||
@ -16690,14 +16714,16 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
calendarObjectInstance() {
|
calendarObjectInstance() {
|
||||||
this.hasLocation = false;
|
this.hasLocation = false;
|
||||||
this.hasDescription = 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;
|
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;
|
this.hasDescription = true;
|
||||||
}
|
}
|
||||||
if (this.calendarObjectInstance) {
|
if (this.calendarObjectInstance) {
|
||||||
|
var _this$calendarObjectI;
|
||||||
this.getDefuntUrl();
|
this.getDefuntUrl();
|
||||||
|
this.isCalendarPending = (_this$calendarObjectI = this.calendarObjectInstance.isCalendarPending) !== null && _this$calendarObjectI !== void 0 ? _this$calendarObjectI : false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isNew: {
|
isNew: {
|
||||||
@ -16712,27 +16738,27 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
if (this.isWidget) {
|
if (this.isWidget) {
|
||||||
const objectId = this.widgetEventDetails.object;
|
const objectId = this.widgetEventDetails.object;
|
||||||
const recurrenceId = this.widgetEventDetails.recurrenceId;
|
const recurrenceId = this.widgetEventDetails.recurrenceId;
|
||||||
await this.$store.dispatch('getCalendarObjectInstanceByObjectIdAndRecurrenceId', {
|
await this.$store.dispatch("getCalendarObjectInstanceByObjectIdAndRecurrenceId", {
|
||||||
objectId,
|
objectId,
|
||||||
recurrenceId
|
recurrenceId
|
||||||
});
|
});
|
||||||
this.calendarId = this.calendarObject.calendarId;
|
this.calendarId = this.calendarObject.calendarId;
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
}
|
}
|
||||||
this.boundaryElement = this.isWidget ? document.querySelector('.fc') : document.querySelector('#app-content-vue > .fc');
|
this.boundaryElement = this.isWidget ? document.querySelector(".fc") : document.querySelector("#app-content-vue > .fc");
|
||||||
window.addEventListener('keydown', this.keyboardCloseEditor);
|
window.addEventListener("keydown", this.keyboardCloseEditor);
|
||||||
window.addEventListener('keydown', this.keyboardSaveEvent);
|
window.addEventListener("keydown", this.keyboardSaveEvent);
|
||||||
window.addEventListener('keydown', this.keyboardDeleteEvent);
|
window.addEventListener("keydown", this.keyboardDeleteEvent);
|
||||||
window.addEventListener('keydown', this.keyboardDuplicateEvent);
|
window.addEventListener("keydown", this.keyboardDuplicateEvent);
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.repositionPopover();
|
this.repositionPopover();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
window.removeEventListener('keydown', this.keyboardCloseEditor);
|
window.removeEventListener("keydown", this.keyboardCloseEditor);
|
||||||
window.removeEventListener('keydown', this.keyboardSaveEvent);
|
window.removeEventListener("keydown", this.keyboardSaveEvent);
|
||||||
window.removeEventListener('keydown', this.keyboardDeleteEvent);
|
window.removeEventListener("keydown", this.keyboardDeleteEvent);
|
||||||
window.removeEventListener('keydown', this.keyboardDuplicateEvent);
|
window.removeEventListener("keydown", this.keyboardDuplicateEvent);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showMore() {
|
showMore() {
|
||||||
@ -16741,12 +16767,12 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
const params = Object.assign({}, this.$route.params);
|
const params = Object.assign({}, this.$route.params);
|
||||||
if (this.isNew) {
|
if (this.isNew) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: 'NewSidebarView',
|
name: "NewSidebarView",
|
||||||
params
|
params
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$router.push({
|
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
|
params
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -16757,10 +16783,10 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
const objectId = this.widgetEventDetails.object;
|
const objectId = this.widgetEventDetails.object;
|
||||||
const recurrenceId = this.widgetEventDetails.recurrenceId;
|
const recurrenceId = this.widgetEventDetails.recurrenceId;
|
||||||
matchingDomObject = this.widgetRef.querySelector(".fc-event[data-object-id=\"".concat(objectId, "\"][data-recurrence-id=\"").concat(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) {
|
} else if (isNew) {
|
||||||
matchingDomObject = document.querySelector('.fc-highlight');
|
matchingDomObject = document.querySelector(".fc-highlight");
|
||||||
this.placement = 'auto';
|
this.placement = "auto";
|
||||||
if (!matchingDomObject) {
|
if (!matchingDomObject) {
|
||||||
matchingDomObject = document.querySelector('.fc-event[data-is-new="yes"]');
|
matchingDomObject = document.querySelector('.fc-event[data-is-new="yes"]');
|
||||||
}
|
}
|
||||||
@ -16768,21 +16794,21 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
const objectId = route.params.object;
|
const objectId = route.params.object;
|
||||||
const recurrenceId = route.params.recurrenceId;
|
const recurrenceId = route.params.recurrenceId;
|
||||||
matchingDomObject = document.querySelector(".fc-event[data-object-id=\"".concat(objectId, "\"][data-recurrence-id=\"").concat(recurrenceId, "\"]"));
|
matchingDomObject = document.querySelector(".fc-event[data-object-id=\"".concat(objectId, "\"][data-recurrence-id=\"").concat(recurrenceId, "\"]"));
|
||||||
this.placement = 'auto';
|
this.placement = "auto";
|
||||||
}
|
}
|
||||||
if (!matchingDomObject) {
|
if (!matchingDomObject) {
|
||||||
matchingDomObject = document.querySelector('#app-navigation-vue');
|
matchingDomObject = document.querySelector("#app-navigation-vue");
|
||||||
this.placement = 'right';
|
this.placement = "right";
|
||||||
}
|
}
|
||||||
if (!matchingDomObject) {
|
if (!matchingDomObject) {
|
||||||
matchingDomObject = document.querySelector('body');
|
matchingDomObject = document.querySelector("body");
|
||||||
this.placement = 'auto';
|
this.placement = "auto";
|
||||||
}
|
}
|
||||||
console.info('getDomElementForPopover', matchingDomObject, this.placement);
|
console.info("getDomElementForPopover", matchingDomObject, this.placement);
|
||||||
return matchingDomObject;
|
return matchingDomObject;
|
||||||
},
|
},
|
||||||
repositionPopover() {
|
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.reference = this.getDomElementForPopover(isNew, this.$route);
|
||||||
this.$refs.popover.$children[0].$refs.popper.dispose();
|
this.$refs.popover.$children[0].$refs.popper.dispose();
|
||||||
this.$refs.popover.$children[0].$refs.popper.init();
|
this.$refs.popover.$children[0].$refs.popper.init();
|
||||||
@ -16808,6 +16834,19 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
this.isViewing = false;
|
this.isViewing = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async saveAsPendingCalendarEvent() {
|
||||||
|
if (this.isNew) {
|
||||||
|
await this.savePendingCalendar(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.isViewing = true;
|
||||||
|
try {
|
||||||
|
await this.save(false);
|
||||||
|
this.requiresActionOnRouteLeave = false;
|
||||||
|
} catch (error) {
|
||||||
|
this.isViewing = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
addArticle(article) {
|
addArticle(article) {
|
||||||
if (this.description && this.description !== "") {
|
if (this.description && this.description !== "") {
|
||||||
this.updateDescription(this.description + ";" + article);
|
this.updateDescription(this.description + ";" + article);
|
||||||
@ -16818,7 +16857,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
removeArticle(article) {
|
removeArticle(article) {
|
||||||
if (this.description && this.description !== "") {
|
if (this.description && this.description !== "") {
|
||||||
let values = [];
|
let values = [];
|
||||||
let items = this.description.split(';');
|
let items = this.description.split(";");
|
||||||
items.forEach(item => {
|
items.forEach(item => {
|
||||||
if (item !== article) {
|
if (item !== article) {
|
||||||
values.push(item);
|
values.push(item);
|
||||||
@ -16839,7 +16878,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
viewDefunt() {
|
viewDefunt() {
|
||||||
window.open(this.defuntUrl, '_blank');
|
window.open(this.defuntUrl, "_blank");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -23928,7 +23967,12 @@ var render = function render() {
|
|||||||
class: {
|
class: {
|
||||||
"save-buttons--grow": _vm.growHorizontally
|
"save-buttons--grow": _vm.growHorizontally
|
||||||
}
|
}
|
||||||
}, [_vm.showMoreButton ? _c("NcButton", {
|
}, [!_vm.isCalendarPending ? _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: {
|
attrs: {
|
||||||
type: _vm.moreButtonType,
|
type: _vm.moreButtonType,
|
||||||
disabled: _vm.disabled
|
disabled: _vm.disabled
|
||||||
@ -24654,14 +24698,6 @@ var render = function render() {
|
|||||||
on: {
|
on: {
|
||||||
"toggle-is-leave": _vm.toggleIsLeave
|
"toggle-is-leave": _vm.toggleIsLeave
|
||||||
}
|
}
|
||||||
}), _vm._v(" "), _c("PropertyIsCalendarPending", {
|
|
||||||
attrs: {
|
|
||||||
"is-read-only": _vm.isReadOnly,
|
|
||||||
"is-calendar-pending": _vm.isCalendarPending
|
|
||||||
},
|
|
||||||
on: {
|
|
||||||
"toggle-is-calendar-pending": _vm.toggleIsCalendarPending
|
|
||||||
}
|
|
||||||
}), _vm._v(" "), _c("PropertySelectClient", {
|
}), _vm._v(" "), _c("PropertySelectClient", {
|
||||||
staticClass: "property-location",
|
staticClass: "property-location",
|
||||||
attrs: {
|
attrs: {
|
||||||
@ -24917,6 +24953,7 @@ var render = function render() {
|
|||||||
attrs: {
|
attrs: {
|
||||||
"can-create-recurrence-exception": _vm.canCreateRecurrenceException,
|
"can-create-recurrence-exception": _vm.canCreateRecurrenceException,
|
||||||
"is-new": _vm.isNew,
|
"is-new": _vm.isNew,
|
||||||
|
"is-calendar-pending": _vm.isCalendarPending,
|
||||||
isReadOnly: false,
|
isReadOnly: false,
|
||||||
"force-this-and-all-future": _vm.forceThisAndAllFuture
|
"force-this-and-all-future": _vm.forceThisAndAllFuture
|
||||||
},
|
},
|
||||||
@ -24926,7 +24963,8 @@ var render = function render() {
|
|||||||
},
|
},
|
||||||
"save-this-and-all-future": function ($event) {
|
"save-this-and-all-future": function ($event) {
|
||||||
return _vm.prepareAccessForAttachments(true);
|
return _vm.prepareAccessForAttachments(true);
|
||||||
}
|
},
|
||||||
|
"save-pending-calendar-event": _vm.saveAsPendingCalendarEvent
|
||||||
}
|
}
|
||||||
}) : _vm._e()], 1) : _vm._e(), _vm._v(" "), !_vm.isLoading && !_vm.isError ? _c("NcAppSidebarTab", {
|
}) : _vm._e()], 1) : _vm._e(), _vm._v(" "), !_vm.isLoading && !_vm.isError ? _c("NcAppSidebarTab", {
|
||||||
staticClass: "app-sidebar-tab",
|
staticClass: "app-sidebar-tab",
|
||||||
@ -24964,6 +25002,7 @@ var render = function render() {
|
|||||||
attrs: {
|
attrs: {
|
||||||
"can-create-recurrence-exception": _vm.canCreateRecurrenceException,
|
"can-create-recurrence-exception": _vm.canCreateRecurrenceException,
|
||||||
"is-new": _vm.isNew,
|
"is-new": _vm.isNew,
|
||||||
|
"is-calendar-pending": _vm.isCalendarPending,
|
||||||
isReadOnly: false,
|
isReadOnly: false,
|
||||||
"force-this-and-all-future": _vm.forceThisAndAllFuture
|
"force-this-and-all-future": _vm.forceThisAndAllFuture
|
||||||
},
|
},
|
||||||
@ -24973,7 +25012,8 @@ var render = function render() {
|
|||||||
},
|
},
|
||||||
"save-this-and-all-future": function ($event) {
|
"save-this-and-all-future": function ($event) {
|
||||||
return _vm.prepareAccessForAttachments(true);
|
return _vm.prepareAccessForAttachments(true);
|
||||||
}
|
},
|
||||||
|
"save-pending-calendar-event": _vm.saveAsPendingCalendarEvent
|
||||||
}
|
}
|
||||||
}) : _vm._e()], 1) : _vm._e(), _vm._v(" "), !_vm.isLoading && !_vm.isError && _vm.showResources ? _c("NcAppSidebarTab", {
|
}) : _vm._e()], 1) : _vm._e(), _vm._v(" "), !_vm.isLoading && !_vm.isError && _vm.showResources ? _c("NcAppSidebarTab", {
|
||||||
staticClass: "app-sidebar-tab",
|
staticClass: "app-sidebar-tab",
|
||||||
@ -25006,6 +25046,7 @@ var render = function render() {
|
|||||||
attrs: {
|
attrs: {
|
||||||
"can-create-recurrence-exception": _vm.canCreateRecurrenceException,
|
"can-create-recurrence-exception": _vm.canCreateRecurrenceException,
|
||||||
"is-new": _vm.isNew,
|
"is-new": _vm.isNew,
|
||||||
|
"is-calendar-pending": _vm.isCalendarPending,
|
||||||
isReadOnly: false,
|
isReadOnly: false,
|
||||||
"force-this-and-all-future": _vm.forceThisAndAllFuture
|
"force-this-and-all-future": _vm.forceThisAndAllFuture
|
||||||
},
|
},
|
||||||
@ -25015,7 +25056,8 @@ var render = function render() {
|
|||||||
},
|
},
|
||||||
"save-this-and-all-future": function ($event) {
|
"save-this-and-all-future": function ($event) {
|
||||||
return _vm.prepareAccessForAttachments(true);
|
return _vm.prepareAccessForAttachments(true);
|
||||||
}
|
},
|
||||||
|
"save-pending-calendar-event": _vm.saveAsPendingCalendarEvent
|
||||||
}
|
}
|
||||||
}) : _vm._e()], 1) : _vm._e()], 2);
|
}) : _vm._e()], 1) : _vm._e()], 2);
|
||||||
};
|
};
|
||||||
@ -25240,14 +25282,6 @@ var render = function render() {
|
|||||||
on: {
|
on: {
|
||||||
"toggle-is-leave": _vm.toggleIsLeave
|
"toggle-is-leave": _vm.toggleIsLeave
|
||||||
}
|
}
|
||||||
}), _vm._v(" "), _c("PropertyIsCalendarPending", {
|
|
||||||
attrs: {
|
|
||||||
"is-read-only": _vm.isReadOnlyOrViewing,
|
|
||||||
"is-calendar-pending": _vm.isCalendarPending
|
|
||||||
},
|
|
||||||
on: {
|
|
||||||
"toggle-is-calendar-pending": _vm.toggleIsCalendarPending
|
|
||||||
}
|
|
||||||
}), _vm._v(" "), _c("PropertySelectClient", {
|
}), _vm._v(" "), _c("PropertySelectClient", {
|
||||||
staticClass: "property-location",
|
staticClass: "property-location",
|
||||||
attrs: {
|
attrs: {
|
||||||
@ -25325,7 +25359,8 @@ var render = function render() {
|
|||||||
"show-more-button": true,
|
"show-more-button": true,
|
||||||
"more-button-type": _vm.isViewing ? "tertiary" : undefined,
|
"more-button-type": _vm.isViewing ? "tertiary" : undefined,
|
||||||
"grow-horizontally": !_vm.isViewing && _vm.canCreateRecurrenceException,
|
"grow-horizontally": !_vm.isViewing && _vm.canCreateRecurrenceException,
|
||||||
disabled: _vm.isSaving
|
disabled: _vm.isSaving,
|
||||||
|
"is-calendar-pending": _vm.isCalendarPending
|
||||||
},
|
},
|
||||||
on: {
|
on: {
|
||||||
"save-this-only": function ($event) {
|
"save-this-only": function ($event) {
|
||||||
@ -25334,7 +25369,8 @@ var render = function render() {
|
|||||||
"save-this-and-all-future": function ($event) {
|
"save-this-and-all-future": function ($event) {
|
||||||
return _vm.saveAndView(true);
|
return _vm.saveAndView(true);
|
||||||
},
|
},
|
||||||
"show-more": _vm.showMore
|
"show-more": _vm.showMore,
|
||||||
|
"save-pending-calendar-event": _vm.saveAsPendingCalendarEvent
|
||||||
}
|
}
|
||||||
}, [_vm.defuntUrl ? _c("NcButton", {
|
}, [_vm.defuntUrl ? _c("NcButton", {
|
||||||
class: "d-flex w-max-content",
|
class: "d-flex w-max-content",
|
||||||
@ -28810,6 +28846,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
this.isSaving = true;
|
this.isSaving = true;
|
||||||
try {
|
try {
|
||||||
|
this.setPendingCalendar(false);
|
||||||
await this.$store.dispatch('saveCalendarObjectInstance', {
|
await this.$store.dispatch('saveCalendarObjectInstance', {
|
||||||
thisAndAllFuture,
|
thisAndAllFuture,
|
||||||
calendarId: this.calendarId
|
calendarId: this.calendarId
|
||||||
@ -28824,6 +28861,43 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
this.isSaving = false;
|
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
|
* Saves a calendar-object and closes the editor
|
||||||
*
|
*
|
||||||
@ -35469,7 +35543,6 @@ const actions = {
|
|||||||
const isForkedItem = eventComponent.primaryItem !== null;
|
const isForkedItem = eventComponent.primaryItem !== null;
|
||||||
let original = null;
|
let original = null;
|
||||||
let fork = null;
|
let fork = null;
|
||||||
|
|
||||||
// We check if two things apply:
|
// We check if two things apply:
|
||||||
// - primaryItem !== null -> Is this a fork or not?
|
// - primaryItem !== null -> Is this a fork or not?
|
||||||
// - eventComponent.canCreateRecurrenceExceptions() - Can we create a recurrence-exception for this item
|
// - eventComponent.canCreateRecurrenceExceptions() - Can we create a recurrence-exception for this item
|
||||||
@ -313169,7 +313242,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"compressed":true,"categories":[{"id"
|
|||||||
/******/ // This function allow to reference async chunks
|
/******/ // This function allow to reference async chunks
|
||||||
/******/ __webpack_require__.u = (chunkId) => {
|
/******/ __webpack_require__.u = (chunkId) => {
|
||||||
/******/ // return url for filenames based on template
|
/******/ // return url for filenames based on template
|
||||||
/******/ return "calendar-" + chunkId + ".js?v=" + {"vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981":"31a7d4ece3cdde2d67f1","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_webdav_dist_web_index_js":"454da8f908d41b47c607","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] + "";
|
/******/ return "calendar-" + chunkId + ".js?v=" + {"vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981":"3a2ab5c12f0771c82ad1","vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8":"b90524c103590fa7a133","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"214ba50739254b654bf4","node_modules_nextcloud_dialogs_dist_legacy_mjs":"8be838e4c6e9aae56c87","vendors-node_modules_webdav_dist_web_index_js":"454da8f908d41b47c607","vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-8ibBgPg__mjs":"ea54a36450de178d1141","public-calendar-subscription-picker":"5cfd324844c891720a08","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] + "";
|
||||||
/******/ };
|
/******/ };
|
||||||
/******/ })();
|
/******/ })();
|
||||||
/******/
|
/******/
|
||||||
@ -313474,4 +313547,4 @@ appointmentsConfigsStore.addInitialConfigs((0,_nextcloud_initial_state__WEBPACK_
|
|||||||
|
|
||||||
/******/ })()
|
/******/ })()
|
||||||
;
|
;
|
||||||
//# sourceMappingURL=calendar-main.js.map?v=0411a9d5bcdd383c9bae
|
//# sourceMappingURL=calendar-main.js.map?v=98b4c8819348b5baa60e
|
||||||
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=2315e24e67ebf6e4b6db
|
//# sourceMappingURL=calendar-public-calendar-subscription-picker.js.map?v=5cfd324844c891720a08
|
||||||
File diff suppressed because one or more lines are too long
@ -8880,7 +8880,7 @@ window._registerCustomPickerElement = _;
|
|||||||
/******/ // This function allow to reference async chunks
|
/******/ // This function allow to reference async chunks
|
||||||
/******/ __webpack_require__.u = (chunkId) => {
|
/******/ __webpack_require__.u = (chunkId) => {
|
||||||
/******/ // return url for filenames based on template
|
/******/ // return url for filenames based on template
|
||||||
/******/ return "calendar-" + chunkId + ".js?v=" + {"vendors-node_modules_vue_dist_vue_runtime_esm_js":"7e3171593bdc0f62040b","vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981":"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":"066041579b0cce7180da","vendors-node_modules_webdav_dist_web_index_js":"454da8f908d41b47c607","src_store_index_js":"fffe12f1a96465df6298","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] + "";
|
/******/ 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":"3a2ab5c12f0771c82ad1","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":"b90524c103590fa7a133","vendors-node_modules_axios_index_js-node_modules_vue-material-design-icons_CalendarBlankOutli-1d3065":"88354dc01b19c1f3f2fe","vendors-node_modules_autosize_dist_autosize_esm_js-node_modules_html-entities_lib_index_js-no-4072c5":"1d12f5e341e36b0fcd1d","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":"f57febcc535950e12864","vendors-node_modules_webdav_dist_web_index_js":"454da8f908d41b47c607","src_store_index_js":"c76e0bb3f18bedbee8e9","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"214ba50739254b654bf4","node_modules_nextcloud_dialogs_dist_legacy_mjs":"8be838e4c6e9aae56c87","vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-8ibBgPg__mjs":"ea54a36450de178d1141","public-calendar-subscription-picker":"5cfd324844c891720a08","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] + "";
|
||||||
/******/ };
|
/******/ };
|
||||||
/******/ })();
|
/******/ })();
|
||||||
/******/
|
/******/
|
||||||
@ -9130,4 +9130,4 @@ __webpack_require__.p = (0,_nextcloud_router__WEBPACK_IMPORTED_MODULE_1__.linkTo
|
|||||||
|
|
||||||
/******/ })()
|
/******/ })()
|
||||||
;
|
;
|
||||||
//# sourceMappingURL=calendar-reference.js.map?v=4a5d416dfd37421b2ee1
|
//# sourceMappingURL=calendar-reference.js.map?v=c4f747bcdada7fc35f37
|
||||||
File diff suppressed because one or more lines are too long
@ -3756,7 +3756,6 @@ const actions = {
|
|||||||
const isForkedItem = eventComponent.primaryItem !== null;
|
const isForkedItem = eventComponent.primaryItem !== null;
|
||||||
let original = null;
|
let original = null;
|
||||||
let fork = null;
|
let fork = null;
|
||||||
|
|
||||||
// We check if two things apply:
|
// We check if two things apply:
|
||||||
// - primaryItem !== null -> Is this a fork or not?
|
// - primaryItem !== null -> Is this a fork or not?
|
||||||
// - eventComponent.canCreateRecurrenceExceptions() - Can we create a recurrence-exception for this item
|
// - eventComponent.canCreateRecurrenceExceptions() - Can we create a recurrence-exception for this item
|
||||||
@ -8279,4 +8278,4 @@ function getLinkToConfig(key) {
|
|||||||
/***/ })
|
/***/ })
|
||||||
|
|
||||||
}]);
|
}]);
|
||||||
//# sourceMappingURL=calendar-src_store_index_js.js.map?v=fffe12f1a96465df6298
|
//# sourceMappingURL=calendar-src_store_index_js.js.map?v=c76e0bb3f18bedbee8e9
|
||||||
File diff suppressed because one or more lines are too long
@ -7143,6 +7143,10 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
disabled: {
|
disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
isCalendarPending: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -7163,6 +7167,9 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
saveThisOnly() {
|
saveThisOnly() {
|
||||||
this.$emit('save-this-only');
|
this.$emit('save-this-only');
|
||||||
},
|
},
|
||||||
|
saveAsPendingCalendarEvent() {
|
||||||
|
this.$emit('save-pending-calendar-event');
|
||||||
|
},
|
||||||
saveThisAndAllFuture() {
|
saveThisAndAllFuture() {
|
||||||
this.$emit('save-this-and-all-future');
|
this.$emit('save-this-and-all-future');
|
||||||
},
|
},
|
||||||
@ -8140,7 +8147,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
|
|
||||||
|
|
||||||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
||||||
name: 'EditSimple',
|
name: "EditSimple",
|
||||||
components: {
|
components: {
|
||||||
PropertyIsLeave: _components_Editor_Properties_PropertyIsLeave_vue__WEBPACK_IMPORTED_MODULE_26__["default"],
|
PropertyIsLeave: _components_Editor_Properties_PropertyIsLeave_vue__WEBPACK_IMPORTED_MODULE_26__["default"],
|
||||||
PropertyIsCalendarPending: _components_Editor_Properties_PropertyIsCalendarPending__WEBPACK_IMPORTED_MODULE_27__["default"],
|
PropertyIsCalendarPending: _components_Editor_Properties_PropertyIsCalendarPending__WEBPACK_IMPORTED_MODULE_27__["default"],
|
||||||
@ -8174,9 +8181,10 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
mixins: [_mixins_EditorMixin_js__WEBPACK_IMPORTED_MODULE_3__["default"]],
|
mixins: [_mixins_EditorMixin_js__WEBPACK_IMPORTED_MODULE_3__["default"]],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
placement: 'auto',
|
placement: "auto",
|
||||||
hasLocation: false,
|
hasLocation: false,
|
||||||
hasDescription: false,
|
hasDescription: false,
|
||||||
|
isCalendarPending: false,
|
||||||
boundaryElement: null,
|
boundaryElement: null,
|
||||||
isVisible: true,
|
isVisible: true,
|
||||||
isViewing: true,
|
isViewing: true,
|
||||||
@ -8207,8 +8215,8 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
* @return {string}
|
* @return {string}
|
||||||
*/
|
*/
|
||||||
titleOrPlaceholder() {
|
titleOrPlaceholder() {
|
||||||
if (this.title === '' && this.isReadOnlyOrViewing && !this.isLoading) {
|
if (this.title === "" && this.isReadOnlyOrViewing && !this.isLoading) {
|
||||||
return t('calendar', 'Untitled event');
|
return t("calendar", "Untitled event");
|
||||||
}
|
}
|
||||||
return this.title;
|
return this.title;
|
||||||
}
|
}
|
||||||
@ -8223,14 +8231,16 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
calendarObjectInstance() {
|
calendarObjectInstance() {
|
||||||
this.hasLocation = false;
|
this.hasLocation = false;
|
||||||
this.hasDescription = 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;
|
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;
|
this.hasDescription = true;
|
||||||
}
|
}
|
||||||
if (this.calendarObjectInstance) {
|
if (this.calendarObjectInstance) {
|
||||||
|
var _this$calendarObjectI;
|
||||||
this.getDefuntUrl();
|
this.getDefuntUrl();
|
||||||
|
this.isCalendarPending = (_this$calendarObjectI = this.calendarObjectInstance.isCalendarPending) !== null && _this$calendarObjectI !== void 0 ? _this$calendarObjectI : false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isNew: {
|
isNew: {
|
||||||
@ -8245,27 +8255,27 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
if (this.isWidget) {
|
if (this.isWidget) {
|
||||||
const objectId = this.widgetEventDetails.object;
|
const objectId = this.widgetEventDetails.object;
|
||||||
const recurrenceId = this.widgetEventDetails.recurrenceId;
|
const recurrenceId = this.widgetEventDetails.recurrenceId;
|
||||||
await this.$store.dispatch('getCalendarObjectInstanceByObjectIdAndRecurrenceId', {
|
await this.$store.dispatch("getCalendarObjectInstanceByObjectIdAndRecurrenceId", {
|
||||||
objectId,
|
objectId,
|
||||||
recurrenceId
|
recurrenceId
|
||||||
});
|
});
|
||||||
this.calendarId = this.calendarObject.calendarId;
|
this.calendarId = this.calendarObject.calendarId;
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
}
|
}
|
||||||
this.boundaryElement = this.isWidget ? document.querySelector('.fc') : document.querySelector('#app-content-vue > .fc');
|
this.boundaryElement = this.isWidget ? document.querySelector(".fc") : document.querySelector("#app-content-vue > .fc");
|
||||||
window.addEventListener('keydown', this.keyboardCloseEditor);
|
window.addEventListener("keydown", this.keyboardCloseEditor);
|
||||||
window.addEventListener('keydown', this.keyboardSaveEvent);
|
window.addEventListener("keydown", this.keyboardSaveEvent);
|
||||||
window.addEventListener('keydown', this.keyboardDeleteEvent);
|
window.addEventListener("keydown", this.keyboardDeleteEvent);
|
||||||
window.addEventListener('keydown', this.keyboardDuplicateEvent);
|
window.addEventListener("keydown", this.keyboardDuplicateEvent);
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.repositionPopover();
|
this.repositionPopover();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
window.removeEventListener('keydown', this.keyboardCloseEditor);
|
window.removeEventListener("keydown", this.keyboardCloseEditor);
|
||||||
window.removeEventListener('keydown', this.keyboardSaveEvent);
|
window.removeEventListener("keydown", this.keyboardSaveEvent);
|
||||||
window.removeEventListener('keydown', this.keyboardDeleteEvent);
|
window.removeEventListener("keydown", this.keyboardDeleteEvent);
|
||||||
window.removeEventListener('keydown', this.keyboardDuplicateEvent);
|
window.removeEventListener("keydown", this.keyboardDuplicateEvent);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showMore() {
|
showMore() {
|
||||||
@ -8274,12 +8284,12 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
const params = Object.assign({}, this.$route.params);
|
const params = Object.assign({}, this.$route.params);
|
||||||
if (this.isNew) {
|
if (this.isNew) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: 'NewSidebarView',
|
name: "NewSidebarView",
|
||||||
params
|
params
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$router.push({
|
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
|
params
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -8290,10 +8300,10 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
const objectId = this.widgetEventDetails.object;
|
const objectId = this.widgetEventDetails.object;
|
||||||
const recurrenceId = this.widgetEventDetails.recurrenceId;
|
const recurrenceId = this.widgetEventDetails.recurrenceId;
|
||||||
matchingDomObject = this.widgetRef.querySelector(".fc-event[data-object-id=\"".concat(objectId, "\"][data-recurrence-id=\"").concat(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) {
|
} else if (isNew) {
|
||||||
matchingDomObject = document.querySelector('.fc-highlight');
|
matchingDomObject = document.querySelector(".fc-highlight");
|
||||||
this.placement = 'auto';
|
this.placement = "auto";
|
||||||
if (!matchingDomObject) {
|
if (!matchingDomObject) {
|
||||||
matchingDomObject = document.querySelector('.fc-event[data-is-new="yes"]');
|
matchingDomObject = document.querySelector('.fc-event[data-is-new="yes"]');
|
||||||
}
|
}
|
||||||
@ -8301,21 +8311,21 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
const objectId = route.params.object;
|
const objectId = route.params.object;
|
||||||
const recurrenceId = route.params.recurrenceId;
|
const recurrenceId = route.params.recurrenceId;
|
||||||
matchingDomObject = document.querySelector(".fc-event[data-object-id=\"".concat(objectId, "\"][data-recurrence-id=\"").concat(recurrenceId, "\"]"));
|
matchingDomObject = document.querySelector(".fc-event[data-object-id=\"".concat(objectId, "\"][data-recurrence-id=\"").concat(recurrenceId, "\"]"));
|
||||||
this.placement = 'auto';
|
this.placement = "auto";
|
||||||
}
|
}
|
||||||
if (!matchingDomObject) {
|
if (!matchingDomObject) {
|
||||||
matchingDomObject = document.querySelector('#app-navigation-vue');
|
matchingDomObject = document.querySelector("#app-navigation-vue");
|
||||||
this.placement = 'right';
|
this.placement = "right";
|
||||||
}
|
}
|
||||||
if (!matchingDomObject) {
|
if (!matchingDomObject) {
|
||||||
matchingDomObject = document.querySelector('body');
|
matchingDomObject = document.querySelector("body");
|
||||||
this.placement = 'auto';
|
this.placement = "auto";
|
||||||
}
|
}
|
||||||
console.info('getDomElementForPopover', matchingDomObject, this.placement);
|
console.info("getDomElementForPopover", matchingDomObject, this.placement);
|
||||||
return matchingDomObject;
|
return matchingDomObject;
|
||||||
},
|
},
|
||||||
repositionPopover() {
|
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.reference = this.getDomElementForPopover(isNew, this.$route);
|
||||||
this.$refs.popover.$children[0].$refs.popper.dispose();
|
this.$refs.popover.$children[0].$refs.popper.dispose();
|
||||||
this.$refs.popover.$children[0].$refs.popper.init();
|
this.$refs.popover.$children[0].$refs.popper.init();
|
||||||
@ -8341,6 +8351,19 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
this.isViewing = false;
|
this.isViewing = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async saveAsPendingCalendarEvent() {
|
||||||
|
if (this.isNew) {
|
||||||
|
await this.savePendingCalendar(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.isViewing = true;
|
||||||
|
try {
|
||||||
|
await this.save(false);
|
||||||
|
this.requiresActionOnRouteLeave = false;
|
||||||
|
} catch (error) {
|
||||||
|
this.isViewing = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
addArticle(article) {
|
addArticle(article) {
|
||||||
if (this.description && this.description !== "") {
|
if (this.description && this.description !== "") {
|
||||||
this.updateDescription(this.description + ";" + article);
|
this.updateDescription(this.description + ";" + article);
|
||||||
@ -8351,7 +8374,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
removeArticle(article) {
|
removeArticle(article) {
|
||||||
if (this.description && this.description !== "") {
|
if (this.description && this.description !== "") {
|
||||||
let values = [];
|
let values = [];
|
||||||
let items = this.description.split(';');
|
let items = this.description.split(";");
|
||||||
items.forEach(item => {
|
items.forEach(item => {
|
||||||
if (item !== article) {
|
if (item !== article) {
|
||||||
values.push(item);
|
values.push(item);
|
||||||
@ -8372,7 +8395,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
viewDefunt() {
|
viewDefunt() {
|
||||||
window.open(this.defuntUrl, '_blank');
|
window.open(this.defuntUrl, "_blank");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -13759,7 +13782,12 @@ var render = function render() {
|
|||||||
class: {
|
class: {
|
||||||
"save-buttons--grow": _vm.growHorizontally
|
"save-buttons--grow": _vm.growHorizontally
|
||||||
}
|
}
|
||||||
}, [_vm.showMoreButton ? _c("NcButton", {
|
}, [!_vm.isCalendarPending ? _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: {
|
attrs: {
|
||||||
type: _vm.moreButtonType,
|
type: _vm.moreButtonType,
|
||||||
disabled: _vm.disabled
|
disabled: _vm.disabled
|
||||||
@ -14497,14 +14525,6 @@ var render = function render() {
|
|||||||
on: {
|
on: {
|
||||||
"toggle-is-leave": _vm.toggleIsLeave
|
"toggle-is-leave": _vm.toggleIsLeave
|
||||||
}
|
}
|
||||||
}), _vm._v(" "), _c("PropertyIsCalendarPending", {
|
|
||||||
attrs: {
|
|
||||||
"is-read-only": _vm.isReadOnlyOrViewing,
|
|
||||||
"is-calendar-pending": _vm.isCalendarPending
|
|
||||||
},
|
|
||||||
on: {
|
|
||||||
"toggle-is-calendar-pending": _vm.toggleIsCalendarPending
|
|
||||||
}
|
|
||||||
}), _vm._v(" "), _c("PropertySelectClient", {
|
}), _vm._v(" "), _c("PropertySelectClient", {
|
||||||
staticClass: "property-location",
|
staticClass: "property-location",
|
||||||
attrs: {
|
attrs: {
|
||||||
@ -14582,7 +14602,8 @@ var render = function render() {
|
|||||||
"show-more-button": true,
|
"show-more-button": true,
|
||||||
"more-button-type": _vm.isViewing ? "tertiary" : undefined,
|
"more-button-type": _vm.isViewing ? "tertiary" : undefined,
|
||||||
"grow-horizontally": !_vm.isViewing && _vm.canCreateRecurrenceException,
|
"grow-horizontally": !_vm.isViewing && _vm.canCreateRecurrenceException,
|
||||||
disabled: _vm.isSaving
|
disabled: _vm.isSaving,
|
||||||
|
"is-calendar-pending": _vm.isCalendarPending
|
||||||
},
|
},
|
||||||
on: {
|
on: {
|
||||||
"save-this-only": function ($event) {
|
"save-this-only": function ($event) {
|
||||||
@ -14591,7 +14612,8 @@ var render = function render() {
|
|||||||
"save-this-and-all-future": function ($event) {
|
"save-this-and-all-future": function ($event) {
|
||||||
return _vm.saveAndView(true);
|
return _vm.saveAndView(true);
|
||||||
},
|
},
|
||||||
"show-more": _vm.showMore
|
"show-more": _vm.showMore,
|
||||||
|
"save-pending-calendar-event": _vm.saveAsPendingCalendarEvent
|
||||||
}
|
}
|
||||||
}, [_vm.defuntUrl ? _c("NcButton", {
|
}, [_vm.defuntUrl ? _c("NcButton", {
|
||||||
class: "d-flex w-max-content",
|
class: "d-flex w-max-content",
|
||||||
@ -17502,6 +17524,7 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
this.isSaving = true;
|
this.isSaving = true;
|
||||||
try {
|
try {
|
||||||
|
this.setPendingCalendar(false);
|
||||||
await this.$store.dispatch('saveCalendarObjectInstance', {
|
await this.$store.dispatch('saveCalendarObjectInstance', {
|
||||||
thisAndAllFuture,
|
thisAndAllFuture,
|
||||||
calendarId: this.calendarId
|
calendarId: this.calendarId
|
||||||
@ -17516,6 +17539,43 @@ __webpack_require__.r(__webpack_exports__);
|
|||||||
this.isSaving = false;
|
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
|
* Saves a calendar-object and closes the editor
|
||||||
*
|
*
|
||||||
@ -28010,4 +28070,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=066041579b0cce7180da
|
//# sourceMappingURL=calendar-src_views_Calendar_vue-data_image_svg_xml_3csvg_20xmlns_27http_www_w3_org_2000_svg_27_20heigh-4a4254.js.map?v=f57febcc535950e12864
|
||||||
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=7212b31e059bc10c256e
|
//# sourceMappingURL=calendar-vendors-node_modules_autosize_dist_autosize_esm_js-node_modules_html-entities_lib_index_js-no-4072c5.js.map?v=1d12f5e341e36b0fcd1d
|
||||||
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=55e669bcb78e07cd54cc
|
//# sourceMappingURL=calendar-vendors-node_modules_axios_index_js-node_modules_vue-material-design-icons_CalendarBlankOutli-1d3065.js.map?v=88354dc01b19c1f3f2fe
|
||||||
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=31a7d4ece3cdde2d67f1
|
//# sourceMappingURL=calendar-vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981.js.map?v=3a2ab5c12f0771c82ad1
|
||||||
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=56b7e44c1982f74f69ca
|
//# sourceMappingURL=calendar-vendors-node_modules_nextcloud_vue-dashboard_dist_vue-dashboard_js-node_modules_css-loader_di-9e6f3d.js.map?v=94406568c4140a6ddece
|
||||||
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=7ec0cf6b65f5c745fa03
|
//# sourceMappingURL=calendar-vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f.js.map?v=214ba50739254b654bf4
|
||||||
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=1ec24b5ef07652c6dd39
|
//# sourceMappingURL=calendar-vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8.js.map?v=b90524c103590fa7a133
|
||||||
File diff suppressed because one or more lines are too long
@ -23,6 +23,13 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="save-buttons" :class="{ 'save-buttons--grow': growHorizontally }">
|
<div class="save-buttons" :class="{ 'save-buttons--grow': growHorizontally }">
|
||||||
|
<NcButton
|
||||||
|
v-if="!isCalendarPending"
|
||||||
|
@click="saveAsPendingCalendarEvent"
|
||||||
|
:class="'d-flex w-max-content'"
|
||||||
|
>
|
||||||
|
Mettre en attente
|
||||||
|
</NcButton>
|
||||||
<NcButton v-if="showMoreButton"
|
<NcButton v-if="showMoreButton"
|
||||||
:type="moreButtonType"
|
:type="moreButtonType"
|
||||||
:disabled="disabled"
|
:disabled="disabled"
|
||||||
@ -108,6 +115,10 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
isCalendarPending : {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
showSaveButton() {
|
showSaveButton() {
|
||||||
@ -127,6 +138,9 @@ export default {
|
|||||||
saveThisOnly() {
|
saveThisOnly() {
|
||||||
this.$emit('save-this-only')
|
this.$emit('save-this-only')
|
||||||
},
|
},
|
||||||
|
saveAsPendingCalendarEvent() {
|
||||||
|
this.$emit('save-pending-calendar-event')
|
||||||
|
},
|
||||||
saveThisAndAllFuture() {
|
saveThisAndAllFuture() {
|
||||||
this.$emit('save-this-and-all-future')
|
this.$emit('save-this-and-all-future')
|
||||||
},
|
},
|
||||||
|
|||||||
@ -555,6 +555,7 @@ export default {
|
|||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
this.isSaving = true
|
this.isSaving = true
|
||||||
try {
|
try {
|
||||||
|
this.setPendingCalendar(false);
|
||||||
await this.$store.dispatch('saveCalendarObjectInstance', {
|
await this.$store.dispatch('saveCalendarObjectInstance', {
|
||||||
thisAndAllFuture,
|
thisAndAllFuture,
|
||||||
calendarId: this.calendarId,
|
calendarId: this.calendarId,
|
||||||
@ -569,6 +570,42 @@ export default {
|
|||||||
this.isSaving = false
|
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
|
* Saves a calendar-object and closes the editor
|
||||||
|
|||||||
@ -1725,7 +1725,6 @@ const actions = {
|
|||||||
async saveCalendarObjectInstance({ state, dispatch, commit }, { thisAndAllFuture, calendarId }) {
|
async saveCalendarObjectInstance({ state, dispatch, commit }, { thisAndAllFuture, calendarId }) {
|
||||||
const eventComponent = state.calendarObjectInstance.eventComponent
|
const eventComponent = state.calendarObjectInstance.eventComponent
|
||||||
const calendarObject = state.calendarObject
|
const calendarObject = state.calendarObject
|
||||||
|
|
||||||
updateAlarms(eventComponent)
|
updateAlarms(eventComponent)
|
||||||
updateTalkParticipants(eventComponent)
|
updateTalkParticipants(eventComponent)
|
||||||
let client = eventComponent.client;
|
let client = eventComponent.client;
|
||||||
@ -1739,7 +1738,6 @@ const actions = {
|
|||||||
const isForkedItem = eventComponent.primaryItem !== null
|
const isForkedItem = eventComponent.primaryItem !== null
|
||||||
let original = null
|
let original = null
|
||||||
let fork = null
|
let fork = null
|
||||||
|
|
||||||
// We check if two things apply:
|
// We check if two things apply:
|
||||||
// - primaryItem !== null -> Is this a fork or not?
|
// - primaryItem !== null -> Is this a fork or not?
|
||||||
// - eventComponent.canCreateRecurrenceExceptions() - Can we create a recurrence-exception for this item
|
// - eventComponent.canCreateRecurrenceExceptions() - Can we create a recurrence-exception for this item
|
||||||
|
|||||||
@ -108,10 +108,10 @@
|
|||||||
:is-leave="isLeave"
|
:is-leave="isLeave"
|
||||||
@toggle-is-leave="toggleIsLeave" />
|
@toggle-is-leave="toggleIsLeave" />
|
||||||
|
|
||||||
<PropertyIsCalendarPending
|
<!-- <PropertyIsCalendarPending
|
||||||
:is-read-only="isReadOnly"
|
:is-read-only="isReadOnly"
|
||||||
:is-calendar-pending="isCalendarPending"
|
:is-calendar-pending="isCalendarPending"
|
||||||
@toggle-is-calendar-pending="toggleIsCalendarPending" />
|
@toggle-is-calendar-pending="toggleIsCalendarPending" /> -->
|
||||||
|
|
||||||
<PropertySelectClient class="property-location"
|
<PropertySelectClient class="property-location"
|
||||||
url="/apps/gestion/ajaxGetClientsName"
|
url="/apps/gestion/ajaxGetClientsName"
|
||||||
@ -267,10 +267,15 @@
|
|||||||
class="app-sidebar-tab__buttons"
|
class="app-sidebar-tab__buttons"
|
||||||
:can-create-recurrence-exception="canCreateRecurrenceException"
|
:can-create-recurrence-exception="canCreateRecurrenceException"
|
||||||
:is-new="isNew"
|
:is-new="isNew"
|
||||||
|
:is-calendar-pending="isCalendarPending"
|
||||||
|
|
||||||
:isReadOnly="false"
|
:isReadOnly="false"
|
||||||
:force-this-and-all-future="forceThisAndAllFuture"
|
:force-this-and-all-future="forceThisAndAllFuture"
|
||||||
@save-this-only="prepareAccessForAttachments(false)"
|
@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>
|
||||||
<NcAppSidebarTab v-if="!isLoading && !isError"
|
<NcAppSidebarTab v-if="!isLoading && !isError"
|
||||||
id="app-sidebar-tab-attendees"
|
id="app-sidebar-tab-attendees"
|
||||||
@ -292,10 +297,13 @@
|
|||||||
class="app-sidebar-tab__buttons"
|
class="app-sidebar-tab__buttons"
|
||||||
:can-create-recurrence-exception="canCreateRecurrenceException"
|
:can-create-recurrence-exception="canCreateRecurrenceException"
|
||||||
:is-new="isNew"
|
:is-new="isNew"
|
||||||
|
:is-calendar-pending="isCalendarPending"
|
||||||
|
|
||||||
:isReadOnly="false"
|
:isReadOnly="false"
|
||||||
:force-this-and-all-future="forceThisAndAllFuture"
|
:force-this-and-all-future="forceThisAndAllFuture"
|
||||||
@save-this-only="prepareAccessForAttachments(false)"
|
@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>
|
||||||
<NcAppSidebarTab v-if="!isLoading && !isError && showResources"
|
<NcAppSidebarTab v-if="!isLoading && !isError && showResources"
|
||||||
id="app-sidebar-tab-resources"
|
id="app-sidebar-tab-resources"
|
||||||
@ -314,10 +322,13 @@
|
|||||||
class="app-sidebar-tab__buttons"
|
class="app-sidebar-tab__buttons"
|
||||||
:can-create-recurrence-exception="canCreateRecurrenceException"
|
:can-create-recurrence-exception="canCreateRecurrenceException"
|
||||||
:is-new="isNew"
|
:is-new="isNew"
|
||||||
|
:is-calendar-pending="isCalendarPending"
|
||||||
|
|
||||||
:isReadOnly="false"
|
:isReadOnly="false"
|
||||||
:force-this-and-all-future="forceThisAndAllFuture"
|
:force-this-and-all-future="forceThisAndAllFuture"
|
||||||
@save-this-only="prepareAccessForAttachments(false)"
|
@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>
|
||||||
</NcAppSidebar>
|
</NcAppSidebar>
|
||||||
</template>
|
</template>
|
||||||
@ -432,6 +443,8 @@ export default {
|
|||||||
sharedProgress: 0,
|
sharedProgress: 0,
|
||||||
showPreloader: false,
|
showPreloader: false,
|
||||||
defuntUrl: undefined,
|
defuntUrl: undefined,
|
||||||
|
isCalendarPending: false,
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -494,12 +507,13 @@ export default {
|
|||||||
handler() {
|
handler() {
|
||||||
if(this.calendarObjectInstance) {
|
if(this.calendarObjectInstance) {
|
||||||
this.getDefuntUrl()
|
this.getDefuntUrl()
|
||||||
|
this.isCalendarPending = this.calendarObjectInstance.isCalendarPending ?? false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
* Update the start and end date of this event
|
* Update the start and end date of this event
|
||||||
*
|
*
|
||||||
@ -729,7 +743,21 @@ export default {
|
|||||||
},
|
},
|
||||||
viewDefunt(){
|
viewDefunt(){
|
||||||
window.open(this.defuntUrl, '_blank')
|
window.open(this.defuntUrl, '_blank')
|
||||||
}
|
},
|
||||||
|
async saveAsPendingCalendarEvent() {
|
||||||
|
if (this.isNew) {
|
||||||
|
await this.savePendingCalendar(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.isViewing = true;
|
||||||
|
try {
|
||||||
|
await this.save(false);
|
||||||
|
this.requiresActionOnRouteLeave = false;
|
||||||
|
} catch (error) {
|
||||||
|
this.isViewing = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -22,13 +22,15 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Popover ref="popover"
|
<Popover
|
||||||
|
ref="popover"
|
||||||
:shown="showPopover"
|
:shown="showPopover"
|
||||||
:auto-hide="false"
|
:auto-hide="false"
|
||||||
:placement="placement"
|
:placement="placement"
|
||||||
:boundary="boundaryElement"
|
:boundary="boundaryElement"
|
||||||
popover-base-class="event-popover"
|
popover-base-class="event-popover"
|
||||||
:triggers="[]">
|
:triggers="[]"
|
||||||
|
>
|
||||||
<div class="event-popover__inner">
|
<div class="event-popover__inner">
|
||||||
<template v-if="isLoading && !isSaving">
|
<template v-if="isLoading && !isSaving">
|
||||||
<PopoverLoadingIndicator />
|
<PopoverLoadingIndicator />
|
||||||
@ -41,12 +43,15 @@
|
|||||||
<template #icon>
|
<template #icon>
|
||||||
<Close :size="20" decorative />
|
<Close :size="20" decorative />
|
||||||
</template>
|
</template>
|
||||||
{{ $t('calendar', 'Close') }}
|
{{ $t("calendar", "Close") }}
|
||||||
</ActionButton>
|
</ActionButton>
|
||||||
</Actions>
|
</Actions>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<EmptyContent :name="$t('calendar', 'Event does not exist')" :description="error">
|
<EmptyContent
|
||||||
|
:name="$t('calendar', 'Event does not exist')"
|
||||||
|
:description="error"
|
||||||
|
>
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<CalendarBlank :size="20" decorative />
|
<CalendarBlank :size="20" decorative />
|
||||||
</template>
|
</template>
|
||||||
@ -56,36 +61,50 @@
|
|||||||
<template v-else>
|
<template v-else>
|
||||||
<div class="event-popover__top-right-actions">
|
<div class="event-popover__top-right-actions">
|
||||||
<Actions v-if="!isLoading && !isError && !isNew" :force-menu="true">
|
<Actions v-if="!isLoading && !isError && !isNew" :force-menu="true">
|
||||||
<ActionLink v-if="!hideEventExport && hasDownloadURL"
|
<ActionLink
|
||||||
:href="downloadURL">
|
v-if="!hideEventExport && hasDownloadURL"
|
||||||
|
:href="downloadURL"
|
||||||
|
>
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<Download :size="20" decorative />
|
<Download :size="20" decorative />
|
||||||
</template>
|
</template>
|
||||||
{{ $t('calendar', 'Export') }}
|
{{ $t("calendar", "Export") }}
|
||||||
</ActionLink>
|
</ActionLink>
|
||||||
<ActionButton v-if="!canCreateRecurrenceException && !isReadOnly" @click="duplicateEvent()">
|
<ActionButton
|
||||||
|
v-if="!canCreateRecurrenceException && !isReadOnly"
|
||||||
|
@click="duplicateEvent()"
|
||||||
|
>
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<ContentDuplicate :size="20" decorative />
|
<ContentDuplicate :size="20" decorative />
|
||||||
</template>
|
</template>
|
||||||
{{ $t('calendar', 'Duplicate') }}
|
{{ $t("calendar", "Duplicate") }}
|
||||||
</ActionButton>
|
</ActionButton>
|
||||||
<ActionButton v-if="canDelete && !canCreateRecurrenceException" @click="deleteAndLeave(false)">
|
<ActionButton
|
||||||
|
v-if="canDelete && !canCreateRecurrenceException"
|
||||||
|
@click="deleteAndLeave(false)"
|
||||||
|
>
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<Delete :size="20" decorative />
|
<Delete :size="20" decorative />
|
||||||
</template>
|
</template>
|
||||||
{{ $t('calendar', 'Delete') }}
|
{{ $t("calendar", "Delete") }}
|
||||||
</ActionButton>
|
</ActionButton>
|
||||||
<ActionButton v-if="canDelete && canCreateRecurrenceException" @click="deleteAndLeave(false)">
|
<ActionButton
|
||||||
|
v-if="canDelete && canCreateRecurrenceException"
|
||||||
|
@click="deleteAndLeave(false)"
|
||||||
|
>
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<Delete :size="20" decorative />
|
<Delete :size="20" decorative />
|
||||||
</template>
|
</template>
|
||||||
{{ $t('calendar', 'Delete this occurrence') }}
|
{{ $t("calendar", "Delete this occurrence") }}
|
||||||
</ActionButton>
|
</ActionButton>
|
||||||
<ActionButton v-if="canDelete && canCreateRecurrenceException" @click="deleteAndLeave(true)">
|
<ActionButton
|
||||||
|
v-if="canDelete && canCreateRecurrenceException"
|
||||||
|
@click="deleteAndLeave(true)"
|
||||||
|
>
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<Delete :size="20" decorative />
|
<Delete :size="20" decorative />
|
||||||
</template>
|
</template>
|
||||||
{{ $t('calendar', 'Delete this and all future') }}
|
{{ $t("calendar", "Delete this and all future") }}
|
||||||
</ActionButton>
|
</ActionButton>
|
||||||
</Actions>
|
</Actions>
|
||||||
<Actions>
|
<Actions>
|
||||||
@ -93,21 +112,26 @@
|
|||||||
<template #icon>
|
<template #icon>
|
||||||
<Close :size="20" decorative />
|
<Close :size="20" decorative />
|
||||||
</template>
|
</template>
|
||||||
{{ $t('calendar', 'Close') }}
|
{{ $t("calendar", "Close") }}
|
||||||
</ActionButton>
|
</ActionButton>
|
||||||
</Actions>
|
</Actions>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<CalendarPickerHeader :value="selectedCalendar"
|
<CalendarPickerHeader
|
||||||
|
:value="selectedCalendar"
|
||||||
:calendars="calendars"
|
:calendars="calendars"
|
||||||
:is-read-only="isReadOnlyOrViewing || !canModifyCalendar"
|
:is-read-only="isReadOnlyOrViewing || !canModifyCalendar"
|
||||||
@update:value="changeCalendar" />
|
@update:value="changeCalendar"
|
||||||
|
/>
|
||||||
|
|
||||||
<PropertyTitle :value="titleOrPlaceholder"
|
<PropertyTitle
|
||||||
|
:value="titleOrPlaceholder"
|
||||||
:is-read-only="isReadOnlyOrViewing"
|
:is-read-only="isReadOnlyOrViewing"
|
||||||
@update:value="updateTitle" />
|
@update:value="updateTitle"
|
||||||
|
/>
|
||||||
|
|
||||||
<PropertyTitleTimePicker :start-date="startDate"
|
<PropertyTitleTimePicker
|
||||||
|
:start-date="startDate"
|
||||||
:start-timezone="startTimezone"
|
:start-timezone="startTimezone"
|
||||||
:end-date="endDate"
|
:end-date="endDate"
|
||||||
:end-timezone="endTimezone"
|
:end-timezone="endTimezone"
|
||||||
@ -119,33 +143,39 @@
|
|||||||
@update-start-timezone="updateStartTimezone"
|
@update-start-timezone="updateStartTimezone"
|
||||||
@update-end-date="updateEndDate"
|
@update-end-date="updateEndDate"
|
||||||
@update-end-timezone="updateEndTimezone"
|
@update-end-timezone="updateEndTimezone"
|
||||||
@toggle-all-day="toggleAllDay"/>
|
@toggle-all-day="toggleAllDay"
|
||||||
|
/>
|
||||||
|
|
||||||
<PropertyIsLeave
|
<PropertyIsLeave
|
||||||
:is-read-only="isReadOnlyOrViewing"
|
:is-read-only="isReadOnlyOrViewing"
|
||||||
:is-leave="isLeave"
|
:is-leave="isLeave"
|
||||||
@toggle-is-leave="toggleIsLeave" />
|
@toggle-is-leave="toggleIsLeave"
|
||||||
|
/>
|
||||||
|
|
||||||
<PropertyIsCalendarPending
|
<!-- <PropertyIsCalendarPending
|
||||||
:is-read-only="isReadOnlyOrViewing"
|
:is-read-only="isReadOnlyOrViewing"
|
||||||
:is-calendar-pending="isCalendarPending"
|
:is-calendar-pending="isCalendarPending"
|
||||||
@toggle-is-calendar-pending="toggleIsCalendarPending" />
|
@toggle-is-calendar-pending="toggleIsCalendarPending" /> -->
|
||||||
|
|
||||||
<PropertySelectClient class="property-location"
|
<PropertySelectClient
|
||||||
url="/apps/gestion/ajaxGetClientsName"
|
class="property-location"
|
||||||
:is-read-only="isReadOnly"
|
url="/apps/gestion/ajaxGetClientsName"
|
||||||
:prop-model="rfcProps.clients"
|
:is-read-only="isReadOnly"
|
||||||
:value="client"
|
:prop-model="rfcProps.clients"
|
||||||
:linkify-links="true"
|
:value="client"
|
||||||
@update:value="updateClient" />
|
:linkify-links="true"
|
||||||
|
@update:value="updateClient"
|
||||||
|
/>
|
||||||
|
|
||||||
<PropertySelectLieu class="property-location"
|
<PropertySelectLieu
|
||||||
url="/apps/gestion/ajaxGetLieux"
|
class="property-location"
|
||||||
:is-read-only="isReadOnly"
|
url="/apps/gestion/ajaxGetLieux"
|
||||||
:prop-model="rfcProps.locations"
|
:is-read-only="isReadOnly"
|
||||||
:value="location"
|
:prop-model="rfcProps.locations"
|
||||||
:linkify-links="true"
|
:value="location"
|
||||||
@update:value="updateLocation" />
|
:linkify-links="true"
|
||||||
|
@update:value="updateLocation"
|
||||||
|
/>
|
||||||
|
|
||||||
<PropertySelectArticle
|
<PropertySelectArticle
|
||||||
:is-read-only="isReadOnlyOrViewing"
|
:is-read-only="isReadOnlyOrViewing"
|
||||||
@ -154,17 +184,19 @@
|
|||||||
:value="description"
|
:value="description"
|
||||||
:linkify-links="true"
|
:linkify-links="true"
|
||||||
@add-single-value="addArticle"
|
@add-single-value="addArticle"
|
||||||
@remove-single-value="removeArticle" />
|
@remove-single-value="removeArticle"
|
||||||
|
/>
|
||||||
|
|
||||||
<PropertyText
|
<PropertyText
|
||||||
:is-read-only="isReadOnly"
|
:is-read-only="isReadOnly"
|
||||||
:prop-model="rfcProps.comment"
|
:prop-model="rfcProps.comment"
|
||||||
:value="comment"
|
:value="comment"
|
||||||
:linkify-links="false"
|
:linkify-links="false"
|
||||||
@update:value="updateComment"
|
@update:value="updateComment"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<InviteesList class="event-popover__invitees"
|
<InviteesList
|
||||||
|
class="event-popover__invitees"
|
||||||
:hide-if-empty="true"
|
:hide-if-empty="true"
|
||||||
:hide-buttons="true"
|
:hide-buttons="true"
|
||||||
:hide-errors="true"
|
:hide-errors="true"
|
||||||
@ -172,15 +204,20 @@
|
|||||||
:is-read-only="isReadOnlyOrViewing"
|
:is-read-only="isReadOnlyOrViewing"
|
||||||
:is-shared-with-me="isSharedWithMe"
|
:is-shared-with-me="isSharedWithMe"
|
||||||
:calendar-object-instance="calendarObjectInstance"
|
:calendar-object-instance="calendarObjectInstance"
|
||||||
:limit="3" />
|
:limit="3"
|
||||||
|
/>
|
||||||
|
|
||||||
<InvitationResponseButtons v-if="isViewedByAttendee && isViewing"
|
<InvitationResponseButtons
|
||||||
|
v-if="isViewedByAttendee && isViewing"
|
||||||
class="event-popover__response-buttons"
|
class="event-popover__response-buttons"
|
||||||
:attendee="userAsAttendee"
|
:attendee="userAsAttendee"
|
||||||
:calendar-id="calendarId"
|
:calendar-id="calendarId"
|
||||||
@close="closeEditorAndSkipAction" />
|
@close="closeEditorAndSkipAction"
|
||||||
|
/>
|
||||||
|
|
||||||
|
|
||||||
<SaveButtons v-if="!isWidget"
|
<SaveButtons
|
||||||
|
v-if="!isWidget"
|
||||||
class="event-popover__buttons"
|
class="event-popover__buttons"
|
||||||
:can-create-recurrence-exception="canCreateRecurrenceException"
|
:can-create-recurrence-exception="canCreateRecurrenceException"
|
||||||
:is-new="isNew"
|
:is-new="isNew"
|
||||||
@ -190,24 +227,29 @@
|
|||||||
:more-button-type="isViewing ? 'tertiary' : undefined"
|
:more-button-type="isViewing ? 'tertiary' : undefined"
|
||||||
:grow-horizontally="!isViewing && canCreateRecurrenceException"
|
:grow-horizontally="!isViewing && canCreateRecurrenceException"
|
||||||
:disabled="isSaving"
|
:disabled="isSaving"
|
||||||
|
:is-calendar-pending="isCalendarPending"
|
||||||
@save-this-only="saveAndView(false)"
|
@save-this-only="saveAndView(false)"
|
||||||
@save-this-and-all-future="saveAndView(true)"
|
@save-this-and-all-future="saveAndView(true)"
|
||||||
@show-more="showMore">
|
@show-more="showMore"
|
||||||
<NcButton
|
@save-pending-calendar-event="saveAsPendingCalendarEvent"
|
||||||
@click="viewDefunt"
|
>
|
||||||
v-if="defuntUrl"
|
<NcButton
|
||||||
:type="undefined"
|
@click="viewDefunt"
|
||||||
|
v-if="defuntUrl"
|
||||||
|
:type="undefined"
|
||||||
:class="'d-flex w-max-content'"
|
:class="'d-flex w-max-content'"
|
||||||
>
|
>
|
||||||
Voir le defunt
|
Voir le defunt
|
||||||
</NcButton>
|
</NcButton>
|
||||||
<NcButton v-if="!isReadOnly && isViewing"
|
<NcButton
|
||||||
|
v-if="!isReadOnly && isViewing"
|
||||||
:type="isViewedByAttendee ? 'tertiary' : undefined"
|
:type="isViewedByAttendee ? 'tertiary' : undefined"
|
||||||
@click="isViewing = false">
|
@click="isViewing = false"
|
||||||
|
>
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<EditIcon :size="20" />
|
<EditIcon :size="20" />
|
||||||
</template>
|
</template>
|
||||||
{{ $t('calendar', 'Edit') }}
|
{{ $t("calendar", "Edit") }}
|
||||||
</NcButton>
|
</NcButton>
|
||||||
</SaveButtons>
|
</SaveButtons>
|
||||||
</template>
|
</template>
|
||||||
@ -222,42 +264,39 @@ import {
|
|||||||
NcEmptyContent as EmptyContent,
|
NcEmptyContent as EmptyContent,
|
||||||
NcPopover as Popover,
|
NcPopover as Popover,
|
||||||
NcButton,
|
NcButton,
|
||||||
} from '@nextcloud/vue'
|
} from "@nextcloud/vue";
|
||||||
import axios from 'axios'
|
import axios from "axios";
|
||||||
import { generateUrl } from '@nextcloud/router'
|
import { generateUrl } from "@nextcloud/router";
|
||||||
import EditorMixin from '../mixins/EditorMixin.js'
|
import EditorMixin from "../mixins/EditorMixin.js";
|
||||||
import PropertyTitle from '../components/Editor/Properties/PropertyTitle.vue'
|
import PropertyTitle from "../components/Editor/Properties/PropertyTitle.vue";
|
||||||
import PropertyTitleTimePicker
|
import PropertyTitleTimePicker from "../components/Editor/Properties/PropertyTitleTimePicker.vue";
|
||||||
from '../components/Editor/Properties/PropertyTitleTimePicker.vue'
|
import PropertyText from "../components/Editor/Properties/PropertyText.vue";
|
||||||
import PropertyText from '../components/Editor/Properties/PropertyText.vue'
|
import SaveButtons from "../components/Editor/SaveButtons.vue";
|
||||||
import SaveButtons from '../components/Editor/SaveButtons.vue'
|
import PopoverLoadingIndicator from "../components/Popover/PopoverLoadingIndicator.vue";
|
||||||
import PopoverLoadingIndicator
|
import { getPrefixedRoute } from "../utils/router.js";
|
||||||
from '../components/Popover/PopoverLoadingIndicator.vue'
|
import InvitationResponseButtons from "../components/Editor/InvitationResponseButtons.vue";
|
||||||
import { getPrefixedRoute } from '../utils/router.js'
|
import CalendarPickerHeader from "../components/Editor/CalendarPickerHeader.vue";
|
||||||
import InvitationResponseButtons
|
import InviteesList from "../components/Editor/Invitees/InviteesList.vue";
|
||||||
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 CalendarBlank from "vue-material-design-icons/CalendarBlank.vue";
|
||||||
import Close from 'vue-material-design-icons/Close.vue'
|
import Close from "vue-material-design-icons/Close.vue";
|
||||||
import Delete from 'vue-material-design-icons/Delete.vue'
|
import Delete from "vue-material-design-icons/Delete.vue";
|
||||||
import Download from 'vue-material-design-icons/Download.vue'
|
import Download from "vue-material-design-icons/Download.vue";
|
||||||
import ContentDuplicate from 'vue-material-design-icons/ContentDuplicate.vue'
|
import ContentDuplicate from "vue-material-design-icons/ContentDuplicate.vue";
|
||||||
import EditIcon from 'vue-material-design-icons/Pencil.vue'
|
import EditIcon from "vue-material-design-icons/Pencil.vue";
|
||||||
import { mapState } from 'vuex'
|
import { mapState } from "vuex";
|
||||||
import {showError} from "@nextcloud/dialogs";
|
import { showError } from "@nextcloud/dialogs";
|
||||||
import PropertySelect from "../components/Editor/Properties/PropertySelect.vue";
|
import PropertySelect from "../components/Editor/Properties/PropertySelect.vue";
|
||||||
import PropertySelectAjax from "../components/Editor/Properties/PropertySelectAjax.vue";
|
import PropertySelectAjax from "../components/Editor/Properties/PropertySelectAjax.vue";
|
||||||
import PropertySelectAjaxMultiple from "../components/Editor/Properties/PropertySelectAjaxMultiple.vue";
|
import PropertySelectAjaxMultiple from "../components/Editor/Properties/PropertySelectAjaxMultiple.vue";
|
||||||
import PropertySelectLieu from "../components/Editor/Properties/PropertySelectLieu.vue";
|
import PropertySelectLieu from "../components/Editor/Properties/PropertySelectLieu.vue";
|
||||||
import PropertySelectClient from "../components/Editor/Properties/PropertySelectClient.vue";
|
import PropertySelectClient from "../components/Editor/Properties/PropertySelectClient.vue";
|
||||||
import PropertySelectArticle from "../components/Editor/Properties/PropertySelectArticle.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';
|
import PropertyIsCalendarPending from "../components/Editor/Properties/PropertyIsCalendarPending";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'EditSimple',
|
name: "EditSimple",
|
||||||
components: {
|
components: {
|
||||||
PropertyIsLeave,
|
PropertyIsLeave,
|
||||||
PropertyIsCalendarPending,
|
PropertyIsCalendarPending,
|
||||||
@ -288,19 +327,18 @@ export default {
|
|||||||
NcButton,
|
NcButton,
|
||||||
EditIcon,
|
EditIcon,
|
||||||
},
|
},
|
||||||
mixins: [
|
mixins: [EditorMixin],
|
||||||
EditorMixin,
|
|
||||||
],
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
placement: 'auto',
|
placement: "auto",
|
||||||
hasLocation: false,
|
hasLocation: false,
|
||||||
hasDescription: false,
|
hasDescription: false,
|
||||||
|
isCalendarPending: false,
|
||||||
boundaryElement: null,
|
boundaryElement: null,
|
||||||
isVisible: true,
|
isVisible: true,
|
||||||
isViewing: true,
|
isViewing: true,
|
||||||
defuntUrl: undefined,
|
defuntUrl: undefined,
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState({
|
...mapState({
|
||||||
@ -311,7 +349,7 @@ export default {
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
showPopover() {
|
showPopover() {
|
||||||
return this.isVisible || this.widgetEventDetailsOpen
|
return this.isVisible || this.widgetEventDetailsOpen;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -320,7 +358,7 @@ export default {
|
|||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
*/
|
*/
|
||||||
isReadOnlyOrViewing() {
|
isReadOnlyOrViewing() {
|
||||||
return this.isReadOnly || this.isViewing || this.isWidget
|
return this.isReadOnly || this.isViewing || this.isWidget;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -329,123 +367,148 @@ export default {
|
|||||||
* @return {string}
|
* @return {string}
|
||||||
*/
|
*/
|
||||||
titleOrPlaceholder() {
|
titleOrPlaceholder() {
|
||||||
if (this.title === '' && this.isReadOnlyOrViewing && !this.isLoading) {
|
if (this.title === "" && this.isReadOnlyOrViewing && !this.isLoading) {
|
||||||
return t('calendar', 'Untitled event')
|
return t("calendar", "Untitled event");
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.title
|
return this.title;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
$route(to, from) {
|
$route(to, from) {
|
||||||
this.repositionPopover()
|
this.repositionPopover();
|
||||||
|
|
||||||
// Hide popover when changing the view until the user selects a slot again
|
// 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() {
|
calendarObjectInstance() {
|
||||||
this.hasLocation = false
|
this.hasLocation = false;
|
||||||
this.hasDescription = false
|
this.hasDescription = false;
|
||||||
|
|
||||||
if (typeof this.calendarObjectInstance.location === 'string' && this.calendarObjectInstance.location.trim() !== '') {
|
if (
|
||||||
this.hasLocation = true
|
typeof this.calendarObjectInstance.location === "string" &&
|
||||||
}
|
this.calendarObjectInstance.location.trim() !== ""
|
||||||
if (typeof this.calendarObjectInstance.description === 'string' && this.calendarObjectInstance.description.trim() !== '') {
|
) {
|
||||||
this.hasDescription = true
|
this.hasLocation = true;
|
||||||
}
|
}
|
||||||
if(this.calendarObjectInstance) {
|
if (
|
||||||
this.getDefuntUrl()
|
typeof this.calendarObjectInstance.description === "string" &&
|
||||||
}
|
this.calendarObjectInstance.description.trim() !== ""
|
||||||
},
|
) {
|
||||||
|
this.hasDescription = true;
|
||||||
|
}
|
||||||
|
if (this.calendarObjectInstance) {
|
||||||
|
this.getDefuntUrl();
|
||||||
|
this.isCalendarPending = this.calendarObjectInstance.isCalendarPending ?? false;
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
isNew: {
|
isNew: {
|
||||||
immediate: true,
|
immediate: true,
|
||||||
handler(isNew) {
|
handler(isNew) {
|
||||||
// New events should be editable from the start
|
// New events should be editable from the start
|
||||||
this.isViewing = !isNew
|
this.isViewing = !isNew;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
if (this.isWidget) {
|
if (this.isWidget) {
|
||||||
const objectId = this.widgetEventDetails.object
|
const objectId = this.widgetEventDetails.object;
|
||||||
const recurrenceId = this.widgetEventDetails.recurrenceId
|
const recurrenceId = this.widgetEventDetails.recurrenceId;
|
||||||
await this.$store.dispatch('getCalendarObjectInstanceByObjectIdAndRecurrenceId', { objectId, recurrenceId })
|
await this.$store.dispatch(
|
||||||
this.calendarId = this.calendarObject.calendarId
|
"getCalendarObjectInstanceByObjectIdAndRecurrenceId",
|
||||||
this.isLoading = false
|
{ objectId, recurrenceId }
|
||||||
|
);
|
||||||
|
this.calendarId = this.calendarObject.calendarId;
|
||||||
|
this.isLoading = false;
|
||||||
}
|
}
|
||||||
this.boundaryElement = this.isWidget ? document.querySelector('.fc') : document.querySelector('#app-content-vue > .fc')
|
this.boundaryElement = this.isWidget
|
||||||
window.addEventListener('keydown', this.keyboardCloseEditor)
|
? document.querySelector(".fc")
|
||||||
window.addEventListener('keydown', this.keyboardSaveEvent)
|
: document.querySelector("#app-content-vue > .fc");
|
||||||
window.addEventListener('keydown', this.keyboardDeleteEvent)
|
window.addEventListener("keydown", this.keyboardCloseEditor);
|
||||||
window.addEventListener('keydown', this.keyboardDuplicateEvent)
|
window.addEventListener("keydown", this.keyboardSaveEvent);
|
||||||
|
window.addEventListener("keydown", this.keyboardDeleteEvent);
|
||||||
|
window.addEventListener("keydown", this.keyboardDuplicateEvent);
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.repositionPopover()
|
this.repositionPopover();
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
window.removeEventListener('keydown', this.keyboardCloseEditor)
|
window.removeEventListener("keydown", this.keyboardCloseEditor);
|
||||||
window.removeEventListener('keydown', this.keyboardSaveEvent)
|
window.removeEventListener("keydown", this.keyboardSaveEvent);
|
||||||
window.removeEventListener('keydown', this.keyboardDeleteEvent)
|
window.removeEventListener("keydown", this.keyboardDeleteEvent);
|
||||||
window.removeEventListener('keydown', this.keyboardDuplicateEvent)
|
window.removeEventListener("keydown", this.keyboardDuplicateEvent);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
showMore() {
|
showMore() {
|
||||||
// Do not save yet
|
// 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) {
|
if (this.isNew) {
|
||||||
this.$router.push({ name: 'NewSidebarView', params })
|
this.$router.push({ name: "NewSidebarView", params });
|
||||||
} else {
|
} else {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
name: getPrefixedRoute(this.$route.name, 'EditSidebarView'),
|
name: getPrefixedRoute(this.$route.name, "EditSidebarView"),
|
||||||
params,
|
params,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getDomElementForPopover(isNew, route) {
|
getDomElementForPopover(isNew, route) {
|
||||||
let matchingDomObject
|
let matchingDomObject;
|
||||||
if (this.isWidget) {
|
if (this.isWidget) {
|
||||||
const objectId = this.widgetEventDetails.object
|
const objectId = this.widgetEventDetails.object;
|
||||||
const recurrenceId = this.widgetEventDetails.recurrenceId
|
const recurrenceId = this.widgetEventDetails.recurrenceId;
|
||||||
|
|
||||||
matchingDomObject = this.widgetRef.querySelector(`.fc-event[data-object-id="${objectId}"][data-recurrence-id="${recurrenceId}"]`)
|
matchingDomObject = this.widgetRef.querySelector(
|
||||||
this.placement = 'auto'
|
`.fc-event[data-object-id="${objectId}"][data-recurrence-id="${recurrenceId}"]`
|
||||||
|
);
|
||||||
|
this.placement = "auto";
|
||||||
} else if (isNew) {
|
} else if (isNew) {
|
||||||
matchingDomObject = document.querySelector('.fc-highlight')
|
matchingDomObject = document.querySelector(".fc-highlight");
|
||||||
this.placement = 'auto'
|
this.placement = "auto";
|
||||||
|
|
||||||
if (!matchingDomObject) {
|
if (!matchingDomObject) {
|
||||||
matchingDomObject = document.querySelector('.fc-event[data-is-new="yes"]')
|
matchingDomObject = document.querySelector(
|
||||||
|
'.fc-event[data-is-new="yes"]'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
const objectId = route.params.object
|
const objectId = route.params.object;
|
||||||
const recurrenceId = route.params.recurrenceId
|
const recurrenceId = route.params.recurrenceId;
|
||||||
|
|
||||||
matchingDomObject = document.querySelector(`.fc-event[data-object-id="${objectId}"][data-recurrence-id="${recurrenceId}"]`)
|
matchingDomObject = document.querySelector(
|
||||||
this.placement = 'auto'
|
`.fc-event[data-object-id="${objectId}"][data-recurrence-id="${recurrenceId}"]`
|
||||||
|
);
|
||||||
|
this.placement = "auto";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!matchingDomObject) {
|
if (!matchingDomObject) {
|
||||||
matchingDomObject = document.querySelector('#app-navigation-vue')
|
matchingDomObject = document.querySelector("#app-navigation-vue");
|
||||||
this.placement = 'right'
|
this.placement = "right";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!matchingDomObject) {
|
if (!matchingDomObject) {
|
||||||
matchingDomObject = document.querySelector('body')
|
matchingDomObject = document.querySelector("body");
|
||||||
this.placement = 'auto'
|
this.placement = "auto";
|
||||||
}
|
}
|
||||||
|
|
||||||
console.info('getDomElementForPopover', matchingDomObject, this.placement)
|
console.info(
|
||||||
return matchingDomObject
|
"getDomElementForPopover",
|
||||||
|
matchingDomObject,
|
||||||
|
this.placement
|
||||||
|
);
|
||||||
|
return matchingDomObject;
|
||||||
},
|
},
|
||||||
repositionPopover() {
|
repositionPopover() {
|
||||||
const isNew = this.isWidget ? false : this.$route.name === 'NewPopoverView'
|
const isNew = this.isWidget
|
||||||
this.$refs.popover.$children[0].$refs.reference = this.getDomElementForPopover(isNew, this.$route)
|
? false
|
||||||
this.$refs.popover.$children[0].$refs.popper.dispose()
|
: this.$route.name === "NewPopoverView";
|
||||||
this.$refs.popover.$children[0].$refs.popper.init()
|
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
|
* Save changes and leave when creating a new event or return to viewing mode when editing
|
||||||
@ -457,32 +520,46 @@ export default {
|
|||||||
async saveAndView(thisAndAllFuture) {
|
async saveAndView(thisAndAllFuture) {
|
||||||
// Transitioning from new to edit routes is not implemented for now
|
// Transitioning from new to edit routes is not implemented for now
|
||||||
if (this.isNew) {
|
if (this.isNew) {
|
||||||
await this.saveAndLeave(thisAndAllFuture)
|
await this.saveAndLeave(thisAndAllFuture);
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.isViewing = true
|
this.isViewing = true;
|
||||||
try {
|
try {
|
||||||
await this.save(thisAndAllFuture)
|
await this.save(thisAndAllFuture);
|
||||||
this.requiresActionOnRouteLeave = false
|
this.requiresActionOnRouteLeave = false;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.isViewing = false
|
this.isViewing = false;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async saveAsPendingCalendarEvent() {
|
||||||
|
if (this.isNew) {
|
||||||
|
await this.savePendingCalendar(false);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.isViewing = true;
|
||||||
|
try {
|
||||||
|
await this.save(false);
|
||||||
|
this.requiresActionOnRouteLeave = false;
|
||||||
|
} catch (error) {
|
||||||
|
this.isViewing = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
addArticle(article) {
|
addArticle(article) {
|
||||||
if(this.description && this.description !== "") {
|
if (this.description && this.description !== "") {
|
||||||
this.updateDescription(this.description + ";" + article);
|
this.updateDescription(this.description + ";" + article);
|
||||||
} else {
|
} else {
|
||||||
this.updateDescription(article);
|
this.updateDescription(article);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
removeArticle(article) {
|
removeArticle(article) {
|
||||||
if(this.description && this.description !== "") {
|
if (this.description && this.description !== "") {
|
||||||
let values = [];
|
let values = [];
|
||||||
let items = this.description.split(';');
|
let items = this.description.split(";");
|
||||||
items.forEach((item) => {
|
items.forEach((item) => {
|
||||||
if(item !== article) {
|
if (item !== article) {
|
||||||
values.push(item);
|
values.push(item);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -491,19 +568,22 @@ export default {
|
|||||||
this.updateDescription(null);
|
this.updateDescription(null);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getDefuntUrl(){
|
getDefuntUrl() {
|
||||||
const url = generateUrl(`/apps/gestion/api/getDefundIdByCalendarUuid/${this.calendarObjectInstance.eventComponent.uid}`)
|
const url = generateUrl(
|
||||||
|
`/apps/gestion/api/getDefundIdByCalendarUuid/${this.calendarObjectInstance.eventComponent.uid}`
|
||||||
|
);
|
||||||
axios.get(url).then((response) => {
|
axios.get(url).then((response) => {
|
||||||
console.log(this.calendarObjectInstance)
|
console.log(this.calendarObjectInstance);
|
||||||
if(response.data.id){
|
if (response.data.id) {
|
||||||
this.defuntUrl = generateUrl(`/apps/gestion/defunt/${response.data.id}/show`)
|
this.defuntUrl = generateUrl(
|
||||||
|
`/apps/gestion/defunt/${response.data.id}/show`
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
})
|
},
|
||||||
|
viewDefunt() {
|
||||||
|
window.open(this.defuntUrl, "_blank");
|
||||||
},
|
},
|
||||||
viewDefunt(){
|
|
||||||
window.open(this.defuntUrl, '_blank')
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user