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
|
||||
/******/ __webpack_require__.u = (chunkId) => {
|
||||
/******/ // return url for filenames based on template
|
||||
/******/ return "calendar-" + chunkId + ".js?v=" + {"vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981":"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
|
||||
/******/ __webpack_require__.u = (chunkId) => {
|
||||
/******/ // return url for filenames based on template
|
||||
/******/ return "calendar-" + chunkId + ".js?v=" + {"vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981":"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: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
isCalendarPending: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -15098,6 +15102,9 @@ __webpack_require__.r(__webpack_exports__);
|
||||
saveThisOnly() {
|
||||
this.$emit('save-this-only');
|
||||
},
|
||||
saveAsPendingCalendarEvent() {
|
||||
this.$emit('save-pending-calendar-event');
|
||||
},
|
||||
saveThisAndAllFuture() {
|
||||
this.$emit('save-this-and-all-future');
|
||||
},
|
||||
@ -16239,7 +16246,8 @@ __webpack_require__.r(__webpack_exports__);
|
||||
showModalUsers: [],
|
||||
sharedProgress: 0,
|
||||
showPreloader: false,
|
||||
defuntUrl: undefined
|
||||
defuntUrl: undefined,
|
||||
isCalendarPending: false
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@ -16302,7 +16310,9 @@ __webpack_require__.r(__webpack_exports__);
|
||||
immediate: true,
|
||||
handler() {
|
||||
if (this.calendarObjectInstance) {
|
||||
var _this$calendarObjectI6;
|
||||
this.getDefuntUrl();
|
||||
this.isCalendarPending = (_this$calendarObjectI6 = this.calendarObjectInstance.isCalendarPending) !== null && _this$calendarObjectI6 !== void 0 ? _this$calendarObjectI6 : false;
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
@ -16530,6 +16540,19 @@ __webpack_require__.r(__webpack_exports__);
|
||||
},
|
||||
viewDefunt() {
|
||||
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__ = ({
|
||||
name: 'EditSimple',
|
||||
name: "EditSimple",
|
||||
components: {
|
||||
PropertyIsLeave: _components_Editor_Properties_PropertyIsLeave_vue__WEBPACK_IMPORTED_MODULE_26__["default"],
|
||||
PropertyIsCalendarPending: _components_Editor_Properties_PropertyIsCalendarPending__WEBPACK_IMPORTED_MODULE_27__["default"],
|
||||
@ -16641,9 +16664,10 @@ __webpack_require__.r(__webpack_exports__);
|
||||
mixins: [_mixins_EditorMixin_js__WEBPACK_IMPORTED_MODULE_3__["default"]],
|
||||
data() {
|
||||
return {
|
||||
placement: 'auto',
|
||||
placement: "auto",
|
||||
hasLocation: false,
|
||||
hasDescription: false,
|
||||
isCalendarPending: false,
|
||||
boundaryElement: null,
|
||||
isVisible: true,
|
||||
isViewing: true,
|
||||
@ -16674,8 +16698,8 @@ __webpack_require__.r(__webpack_exports__);
|
||||
* @return {string}
|
||||
*/
|
||||
titleOrPlaceholder() {
|
||||
if (this.title === '' && this.isReadOnlyOrViewing && !this.isLoading) {
|
||||
return t('calendar', 'Untitled event');
|
||||
if (this.title === "" && this.isReadOnlyOrViewing && !this.isLoading) {
|
||||
return t("calendar", "Untitled event");
|
||||
}
|
||||
return this.title;
|
||||
}
|
||||
@ -16690,14 +16714,16 @@ __webpack_require__.r(__webpack_exports__);
|
||||
calendarObjectInstance() {
|
||||
this.hasLocation = false;
|
||||
this.hasDescription = false;
|
||||
if (typeof this.calendarObjectInstance.location === 'string' && this.calendarObjectInstance.location.trim() !== '') {
|
||||
if (typeof this.calendarObjectInstance.location === "string" && this.calendarObjectInstance.location.trim() !== "") {
|
||||
this.hasLocation = true;
|
||||
}
|
||||
if (typeof this.calendarObjectInstance.description === 'string' && this.calendarObjectInstance.description.trim() !== '') {
|
||||
if (typeof this.calendarObjectInstance.description === "string" && this.calendarObjectInstance.description.trim() !== "") {
|
||||
this.hasDescription = true;
|
||||
}
|
||||
if (this.calendarObjectInstance) {
|
||||
var _this$calendarObjectI;
|
||||
this.getDefuntUrl();
|
||||
this.isCalendarPending = (_this$calendarObjectI = this.calendarObjectInstance.isCalendarPending) !== null && _this$calendarObjectI !== void 0 ? _this$calendarObjectI : false;
|
||||
}
|
||||
},
|
||||
isNew: {
|
||||
@ -16712,27 +16738,27 @@ __webpack_require__.r(__webpack_exports__);
|
||||
if (this.isWidget) {
|
||||
const objectId = this.widgetEventDetails.object;
|
||||
const recurrenceId = this.widgetEventDetails.recurrenceId;
|
||||
await this.$store.dispatch('getCalendarObjectInstanceByObjectIdAndRecurrenceId', {
|
||||
await this.$store.dispatch("getCalendarObjectInstanceByObjectIdAndRecurrenceId", {
|
||||
objectId,
|
||||
recurrenceId
|
||||
});
|
||||
this.calendarId = this.calendarObject.calendarId;
|
||||
this.isLoading = false;
|
||||
}
|
||||
this.boundaryElement = this.isWidget ? document.querySelector('.fc') : document.querySelector('#app-content-vue > .fc');
|
||||
window.addEventListener('keydown', this.keyboardCloseEditor);
|
||||
window.addEventListener('keydown', this.keyboardSaveEvent);
|
||||
window.addEventListener('keydown', this.keyboardDeleteEvent);
|
||||
window.addEventListener('keydown', this.keyboardDuplicateEvent);
|
||||
this.boundaryElement = this.isWidget ? document.querySelector(".fc") : document.querySelector("#app-content-vue > .fc");
|
||||
window.addEventListener("keydown", this.keyboardCloseEditor);
|
||||
window.addEventListener("keydown", this.keyboardSaveEvent);
|
||||
window.addEventListener("keydown", this.keyboardDeleteEvent);
|
||||
window.addEventListener("keydown", this.keyboardDuplicateEvent);
|
||||
this.$nextTick(() => {
|
||||
this.repositionPopover();
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('keydown', this.keyboardCloseEditor);
|
||||
window.removeEventListener('keydown', this.keyboardSaveEvent);
|
||||
window.removeEventListener('keydown', this.keyboardDeleteEvent);
|
||||
window.removeEventListener('keydown', this.keyboardDuplicateEvent);
|
||||
window.removeEventListener("keydown", this.keyboardCloseEditor);
|
||||
window.removeEventListener("keydown", this.keyboardSaveEvent);
|
||||
window.removeEventListener("keydown", this.keyboardDeleteEvent);
|
||||
window.removeEventListener("keydown", this.keyboardDuplicateEvent);
|
||||
},
|
||||
methods: {
|
||||
showMore() {
|
||||
@ -16741,12 +16767,12 @@ __webpack_require__.r(__webpack_exports__);
|
||||
const params = Object.assign({}, this.$route.params);
|
||||
if (this.isNew) {
|
||||
this.$router.push({
|
||||
name: 'NewSidebarView',
|
||||
name: "NewSidebarView",
|
||||
params
|
||||
});
|
||||
} else {
|
||||
this.$router.push({
|
||||
name: (0,_utils_router_js__WEBPACK_IMPORTED_MODULE_9__.getPrefixedRoute)(this.$route.name, 'EditSidebarView'),
|
||||
name: (0,_utils_router_js__WEBPACK_IMPORTED_MODULE_9__.getPrefixedRoute)(this.$route.name, "EditSidebarView"),
|
||||
params
|
||||
});
|
||||
}
|
||||
@ -16757,10 +16783,10 @@ __webpack_require__.r(__webpack_exports__);
|
||||
const objectId = this.widgetEventDetails.object;
|
||||
const recurrenceId = this.widgetEventDetails.recurrenceId;
|
||||
matchingDomObject = this.widgetRef.querySelector(".fc-event[data-object-id=\"".concat(objectId, "\"][data-recurrence-id=\"").concat(recurrenceId, "\"]"));
|
||||
this.placement = 'auto';
|
||||
this.placement = "auto";
|
||||
} else if (isNew) {
|
||||
matchingDomObject = document.querySelector('.fc-highlight');
|
||||
this.placement = 'auto';
|
||||
matchingDomObject = document.querySelector(".fc-highlight");
|
||||
this.placement = "auto";
|
||||
if (!matchingDomObject) {
|
||||
matchingDomObject = document.querySelector('.fc-event[data-is-new="yes"]');
|
||||
}
|
||||
@ -16768,21 +16794,21 @@ __webpack_require__.r(__webpack_exports__);
|
||||
const objectId = route.params.object;
|
||||
const recurrenceId = route.params.recurrenceId;
|
||||
matchingDomObject = document.querySelector(".fc-event[data-object-id=\"".concat(objectId, "\"][data-recurrence-id=\"").concat(recurrenceId, "\"]"));
|
||||
this.placement = 'auto';
|
||||
this.placement = "auto";
|
||||
}
|
||||
if (!matchingDomObject) {
|
||||
matchingDomObject = document.querySelector('#app-navigation-vue');
|
||||
this.placement = 'right';
|
||||
matchingDomObject = document.querySelector("#app-navigation-vue");
|
||||
this.placement = "right";
|
||||
}
|
||||
if (!matchingDomObject) {
|
||||
matchingDomObject = document.querySelector('body');
|
||||
this.placement = 'auto';
|
||||
matchingDomObject = document.querySelector("body");
|
||||
this.placement = "auto";
|
||||
}
|
||||
console.info('getDomElementForPopover', matchingDomObject, this.placement);
|
||||
console.info("getDomElementForPopover", matchingDomObject, this.placement);
|
||||
return matchingDomObject;
|
||||
},
|
||||
repositionPopover() {
|
||||
const isNew = this.isWidget ? false : this.$route.name === 'NewPopoverView';
|
||||
const isNew = this.isWidget ? false : this.$route.name === "NewPopoverView";
|
||||
this.$refs.popover.$children[0].$refs.reference = this.getDomElementForPopover(isNew, this.$route);
|
||||
this.$refs.popover.$children[0].$refs.popper.dispose();
|
||||
this.$refs.popover.$children[0].$refs.popper.init();
|
||||
@ -16808,6 +16834,19 @@ __webpack_require__.r(__webpack_exports__);
|
||||
this.isViewing = false;
|
||||
}
|
||||
},
|
||||
async saveAsPendingCalendarEvent() {
|
||||
if (this.isNew) {
|
||||
await this.savePendingCalendar(false);
|
||||
return;
|
||||
}
|
||||
this.isViewing = true;
|
||||
try {
|
||||
await this.save(false);
|
||||
this.requiresActionOnRouteLeave = false;
|
||||
} catch (error) {
|
||||
this.isViewing = false;
|
||||
}
|
||||
},
|
||||
addArticle(article) {
|
||||
if (this.description && this.description !== "") {
|
||||
this.updateDescription(this.description + ";" + article);
|
||||
@ -16818,7 +16857,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
removeArticle(article) {
|
||||
if (this.description && this.description !== "") {
|
||||
let values = [];
|
||||
let items = this.description.split(';');
|
||||
let items = this.description.split(";");
|
||||
items.forEach(item => {
|
||||
if (item !== article) {
|
||||
values.push(item);
|
||||
@ -16839,7 +16878,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
});
|
||||
},
|
||||
viewDefunt() {
|
||||
window.open(this.defuntUrl, '_blank');
|
||||
window.open(this.defuntUrl, "_blank");
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -23928,7 +23967,12 @@ var render = function render() {
|
||||
class: {
|
||||
"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: {
|
||||
type: _vm.moreButtonType,
|
||||
disabled: _vm.disabled
|
||||
@ -24654,14 +24698,6 @@ var render = function render() {
|
||||
on: {
|
||||
"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", {
|
||||
staticClass: "property-location",
|
||||
attrs: {
|
||||
@ -24917,6 +24953,7 @@ var render = function render() {
|
||||
attrs: {
|
||||
"can-create-recurrence-exception": _vm.canCreateRecurrenceException,
|
||||
"is-new": _vm.isNew,
|
||||
"is-calendar-pending": _vm.isCalendarPending,
|
||||
isReadOnly: false,
|
||||
"force-this-and-all-future": _vm.forceThisAndAllFuture
|
||||
},
|
||||
@ -24926,7 +24963,8 @@ var render = function render() {
|
||||
},
|
||||
"save-this-and-all-future": function ($event) {
|
||||
return _vm.prepareAccessForAttachments(true);
|
||||
}
|
||||
},
|
||||
"save-pending-calendar-event": _vm.saveAsPendingCalendarEvent
|
||||
}
|
||||
}) : _vm._e()], 1) : _vm._e(), _vm._v(" "), !_vm.isLoading && !_vm.isError ? _c("NcAppSidebarTab", {
|
||||
staticClass: "app-sidebar-tab",
|
||||
@ -24964,6 +25002,7 @@ var render = function render() {
|
||||
attrs: {
|
||||
"can-create-recurrence-exception": _vm.canCreateRecurrenceException,
|
||||
"is-new": _vm.isNew,
|
||||
"is-calendar-pending": _vm.isCalendarPending,
|
||||
isReadOnly: false,
|
||||
"force-this-and-all-future": _vm.forceThisAndAllFuture
|
||||
},
|
||||
@ -24973,7 +25012,8 @@ var render = function render() {
|
||||
},
|
||||
"save-this-and-all-future": function ($event) {
|
||||
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", {
|
||||
staticClass: "app-sidebar-tab",
|
||||
@ -25006,6 +25046,7 @@ var render = function render() {
|
||||
attrs: {
|
||||
"can-create-recurrence-exception": _vm.canCreateRecurrenceException,
|
||||
"is-new": _vm.isNew,
|
||||
"is-calendar-pending": _vm.isCalendarPending,
|
||||
isReadOnly: false,
|
||||
"force-this-and-all-future": _vm.forceThisAndAllFuture
|
||||
},
|
||||
@ -25015,7 +25056,8 @@ var render = function render() {
|
||||
},
|
||||
"save-this-and-all-future": function ($event) {
|
||||
return _vm.prepareAccessForAttachments(true);
|
||||
}
|
||||
},
|
||||
"save-pending-calendar-event": _vm.saveAsPendingCalendarEvent
|
||||
}
|
||||
}) : _vm._e()], 1) : _vm._e()], 2);
|
||||
};
|
||||
@ -25240,14 +25282,6 @@ var render = function render() {
|
||||
on: {
|
||||
"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", {
|
||||
staticClass: "property-location",
|
||||
attrs: {
|
||||
@ -25325,7 +25359,8 @@ var render = function render() {
|
||||
"show-more-button": true,
|
||||
"more-button-type": _vm.isViewing ? "tertiary" : undefined,
|
||||
"grow-horizontally": !_vm.isViewing && _vm.canCreateRecurrenceException,
|
||||
disabled: _vm.isSaving
|
||||
disabled: _vm.isSaving,
|
||||
"is-calendar-pending": _vm.isCalendarPending
|
||||
},
|
||||
on: {
|
||||
"save-this-only": function ($event) {
|
||||
@ -25334,7 +25369,8 @@ var render = function render() {
|
||||
"save-this-and-all-future": function ($event) {
|
||||
return _vm.saveAndView(true);
|
||||
},
|
||||
"show-more": _vm.showMore
|
||||
"show-more": _vm.showMore,
|
||||
"save-pending-calendar-event": _vm.saveAsPendingCalendarEvent
|
||||
}
|
||||
}, [_vm.defuntUrl ? _c("NcButton", {
|
||||
class: "d-flex w-max-content",
|
||||
@ -28810,6 +28846,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
this.isLoading = true;
|
||||
this.isSaving = true;
|
||||
try {
|
||||
this.setPendingCalendar(false);
|
||||
await this.$store.dispatch('saveCalendarObjectInstance', {
|
||||
thisAndAllFuture,
|
||||
calendarId: this.calendarId
|
||||
@ -28824,6 +28861,43 @@ __webpack_require__.r(__webpack_exports__);
|
||||
this.isSaving = false;
|
||||
}
|
||||
},
|
||||
setPendingCalendar() {
|
||||
let isPending = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
||||
this.calendarObjectInstance.eventComponent.isCalendarPending = isPending;
|
||||
this.calendarObjectInstance.isCalendarPending = isPending;
|
||||
},
|
||||
async savePendingCalendar() {
|
||||
let thisAndAllFuture = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
||||
if (!this.calendarObject) {
|
||||
_utils_logger_js__WEBPACK_IMPORTED_MODULE_1__["default"].error('Calendar-object not found');
|
||||
return;
|
||||
}
|
||||
if (this.isReadOnly) {
|
||||
return;
|
||||
}
|
||||
if (this.forceThisAndAllFuture) {
|
||||
thisAndAllFuture = true;
|
||||
}
|
||||
this.isLoading = true;
|
||||
this.isSaving = true;
|
||||
try {
|
||||
this.setPendingCalendar();
|
||||
await this.$store.dispatch('saveCalendarObjectInstance', {
|
||||
thisAndAllFuture,
|
||||
calendarId: this.calendarId
|
||||
});
|
||||
this.requiresActionOnRouteLeave = false;
|
||||
} catch (error) {
|
||||
_utils_logger_js__WEBPACK_IMPORTED_MODULE_1__["default"].error("Failed to save event: ".concat(error));
|
||||
(0,_nextcloud_dialogs__WEBPACK_IMPORTED_MODULE_7__.showError)((0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_5__.translate)('calendar', 'Failed to save event'));
|
||||
this.calendarObjectInstance.eventComponent.markDirty();
|
||||
throw error;
|
||||
} finally {
|
||||
this.isLoading = false;
|
||||
this.isSaving = false;
|
||||
this.closeEditor();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Saves a calendar-object and closes the editor
|
||||
*
|
||||
@ -35469,7 +35543,6 @@ const actions = {
|
||||
const isForkedItem = eventComponent.primaryItem !== null;
|
||||
let original = null;
|
||||
let fork = null;
|
||||
|
||||
// We check if two things apply:
|
||||
// - primaryItem !== null -> Is this a fork or not?
|
||||
// - eventComponent.canCreateRecurrenceExceptions() - Can we create a recurrence-exception for this item
|
||||
@ -313169,7 +313242,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"compressed":true,"categories":[{"id"
|
||||
/******/ // This function allow to reference async chunks
|
||||
/******/ __webpack_require__.u = (chunkId) => {
|
||||
/******/ // return url for filenames based on template
|
||||
/******/ return "calendar-" + chunkId + ".js?v=" + {"vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981":"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
|
||||
/******/ __webpack_require__.u = (chunkId) => {
|
||||
/******/ // return url for filenames based on template
|
||||
/******/ return "calendar-" + chunkId + ".js?v=" + {"vendors-node_modules_vue_dist_vue_runtime_esm_js":"7e3171593bdc0f62040b","vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981":"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;
|
||||
let original = null;
|
||||
let fork = null;
|
||||
|
||||
// We check if two things apply:
|
||||
// - primaryItem !== null -> Is this a fork or not?
|
||||
// - eventComponent.canCreateRecurrenceExceptions() - Can we create a recurrence-exception for this item
|
||||
@ -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: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
isCalendarPending: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -7163,6 +7167,9 @@ __webpack_require__.r(__webpack_exports__);
|
||||
saveThisOnly() {
|
||||
this.$emit('save-this-only');
|
||||
},
|
||||
saveAsPendingCalendarEvent() {
|
||||
this.$emit('save-pending-calendar-event');
|
||||
},
|
||||
saveThisAndAllFuture() {
|
||||
this.$emit('save-this-and-all-future');
|
||||
},
|
||||
@ -8140,7 +8147,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
|
||||
|
||||
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
||||
name: 'EditSimple',
|
||||
name: "EditSimple",
|
||||
components: {
|
||||
PropertyIsLeave: _components_Editor_Properties_PropertyIsLeave_vue__WEBPACK_IMPORTED_MODULE_26__["default"],
|
||||
PropertyIsCalendarPending: _components_Editor_Properties_PropertyIsCalendarPending__WEBPACK_IMPORTED_MODULE_27__["default"],
|
||||
@ -8174,9 +8181,10 @@ __webpack_require__.r(__webpack_exports__);
|
||||
mixins: [_mixins_EditorMixin_js__WEBPACK_IMPORTED_MODULE_3__["default"]],
|
||||
data() {
|
||||
return {
|
||||
placement: 'auto',
|
||||
placement: "auto",
|
||||
hasLocation: false,
|
||||
hasDescription: false,
|
||||
isCalendarPending: false,
|
||||
boundaryElement: null,
|
||||
isVisible: true,
|
||||
isViewing: true,
|
||||
@ -8207,8 +8215,8 @@ __webpack_require__.r(__webpack_exports__);
|
||||
* @return {string}
|
||||
*/
|
||||
titleOrPlaceholder() {
|
||||
if (this.title === '' && this.isReadOnlyOrViewing && !this.isLoading) {
|
||||
return t('calendar', 'Untitled event');
|
||||
if (this.title === "" && this.isReadOnlyOrViewing && !this.isLoading) {
|
||||
return t("calendar", "Untitled event");
|
||||
}
|
||||
return this.title;
|
||||
}
|
||||
@ -8223,14 +8231,16 @@ __webpack_require__.r(__webpack_exports__);
|
||||
calendarObjectInstance() {
|
||||
this.hasLocation = false;
|
||||
this.hasDescription = false;
|
||||
if (typeof this.calendarObjectInstance.location === 'string' && this.calendarObjectInstance.location.trim() !== '') {
|
||||
if (typeof this.calendarObjectInstance.location === "string" && this.calendarObjectInstance.location.trim() !== "") {
|
||||
this.hasLocation = true;
|
||||
}
|
||||
if (typeof this.calendarObjectInstance.description === 'string' && this.calendarObjectInstance.description.trim() !== '') {
|
||||
if (typeof this.calendarObjectInstance.description === "string" && this.calendarObjectInstance.description.trim() !== "") {
|
||||
this.hasDescription = true;
|
||||
}
|
||||
if (this.calendarObjectInstance) {
|
||||
var _this$calendarObjectI;
|
||||
this.getDefuntUrl();
|
||||
this.isCalendarPending = (_this$calendarObjectI = this.calendarObjectInstance.isCalendarPending) !== null && _this$calendarObjectI !== void 0 ? _this$calendarObjectI : false;
|
||||
}
|
||||
},
|
||||
isNew: {
|
||||
@ -8245,27 +8255,27 @@ __webpack_require__.r(__webpack_exports__);
|
||||
if (this.isWidget) {
|
||||
const objectId = this.widgetEventDetails.object;
|
||||
const recurrenceId = this.widgetEventDetails.recurrenceId;
|
||||
await this.$store.dispatch('getCalendarObjectInstanceByObjectIdAndRecurrenceId', {
|
||||
await this.$store.dispatch("getCalendarObjectInstanceByObjectIdAndRecurrenceId", {
|
||||
objectId,
|
||||
recurrenceId
|
||||
});
|
||||
this.calendarId = this.calendarObject.calendarId;
|
||||
this.isLoading = false;
|
||||
}
|
||||
this.boundaryElement = this.isWidget ? document.querySelector('.fc') : document.querySelector('#app-content-vue > .fc');
|
||||
window.addEventListener('keydown', this.keyboardCloseEditor);
|
||||
window.addEventListener('keydown', this.keyboardSaveEvent);
|
||||
window.addEventListener('keydown', this.keyboardDeleteEvent);
|
||||
window.addEventListener('keydown', this.keyboardDuplicateEvent);
|
||||
this.boundaryElement = this.isWidget ? document.querySelector(".fc") : document.querySelector("#app-content-vue > .fc");
|
||||
window.addEventListener("keydown", this.keyboardCloseEditor);
|
||||
window.addEventListener("keydown", this.keyboardSaveEvent);
|
||||
window.addEventListener("keydown", this.keyboardDeleteEvent);
|
||||
window.addEventListener("keydown", this.keyboardDuplicateEvent);
|
||||
this.$nextTick(() => {
|
||||
this.repositionPopover();
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('keydown', this.keyboardCloseEditor);
|
||||
window.removeEventListener('keydown', this.keyboardSaveEvent);
|
||||
window.removeEventListener('keydown', this.keyboardDeleteEvent);
|
||||
window.removeEventListener('keydown', this.keyboardDuplicateEvent);
|
||||
window.removeEventListener("keydown", this.keyboardCloseEditor);
|
||||
window.removeEventListener("keydown", this.keyboardSaveEvent);
|
||||
window.removeEventListener("keydown", this.keyboardDeleteEvent);
|
||||
window.removeEventListener("keydown", this.keyboardDuplicateEvent);
|
||||
},
|
||||
methods: {
|
||||
showMore() {
|
||||
@ -8274,12 +8284,12 @@ __webpack_require__.r(__webpack_exports__);
|
||||
const params = Object.assign({}, this.$route.params);
|
||||
if (this.isNew) {
|
||||
this.$router.push({
|
||||
name: 'NewSidebarView',
|
||||
name: "NewSidebarView",
|
||||
params
|
||||
});
|
||||
} else {
|
||||
this.$router.push({
|
||||
name: (0,_utils_router_js__WEBPACK_IMPORTED_MODULE_9__.getPrefixedRoute)(this.$route.name, 'EditSidebarView'),
|
||||
name: (0,_utils_router_js__WEBPACK_IMPORTED_MODULE_9__.getPrefixedRoute)(this.$route.name, "EditSidebarView"),
|
||||
params
|
||||
});
|
||||
}
|
||||
@ -8290,10 +8300,10 @@ __webpack_require__.r(__webpack_exports__);
|
||||
const objectId = this.widgetEventDetails.object;
|
||||
const recurrenceId = this.widgetEventDetails.recurrenceId;
|
||||
matchingDomObject = this.widgetRef.querySelector(".fc-event[data-object-id=\"".concat(objectId, "\"][data-recurrence-id=\"").concat(recurrenceId, "\"]"));
|
||||
this.placement = 'auto';
|
||||
this.placement = "auto";
|
||||
} else if (isNew) {
|
||||
matchingDomObject = document.querySelector('.fc-highlight');
|
||||
this.placement = 'auto';
|
||||
matchingDomObject = document.querySelector(".fc-highlight");
|
||||
this.placement = "auto";
|
||||
if (!matchingDomObject) {
|
||||
matchingDomObject = document.querySelector('.fc-event[data-is-new="yes"]');
|
||||
}
|
||||
@ -8301,21 +8311,21 @@ __webpack_require__.r(__webpack_exports__);
|
||||
const objectId = route.params.object;
|
||||
const recurrenceId = route.params.recurrenceId;
|
||||
matchingDomObject = document.querySelector(".fc-event[data-object-id=\"".concat(objectId, "\"][data-recurrence-id=\"").concat(recurrenceId, "\"]"));
|
||||
this.placement = 'auto';
|
||||
this.placement = "auto";
|
||||
}
|
||||
if (!matchingDomObject) {
|
||||
matchingDomObject = document.querySelector('#app-navigation-vue');
|
||||
this.placement = 'right';
|
||||
matchingDomObject = document.querySelector("#app-navigation-vue");
|
||||
this.placement = "right";
|
||||
}
|
||||
if (!matchingDomObject) {
|
||||
matchingDomObject = document.querySelector('body');
|
||||
this.placement = 'auto';
|
||||
matchingDomObject = document.querySelector("body");
|
||||
this.placement = "auto";
|
||||
}
|
||||
console.info('getDomElementForPopover', matchingDomObject, this.placement);
|
||||
console.info("getDomElementForPopover", matchingDomObject, this.placement);
|
||||
return matchingDomObject;
|
||||
},
|
||||
repositionPopover() {
|
||||
const isNew = this.isWidget ? false : this.$route.name === 'NewPopoverView';
|
||||
const isNew = this.isWidget ? false : this.$route.name === "NewPopoverView";
|
||||
this.$refs.popover.$children[0].$refs.reference = this.getDomElementForPopover(isNew, this.$route);
|
||||
this.$refs.popover.$children[0].$refs.popper.dispose();
|
||||
this.$refs.popover.$children[0].$refs.popper.init();
|
||||
@ -8341,6 +8351,19 @@ __webpack_require__.r(__webpack_exports__);
|
||||
this.isViewing = false;
|
||||
}
|
||||
},
|
||||
async saveAsPendingCalendarEvent() {
|
||||
if (this.isNew) {
|
||||
await this.savePendingCalendar(false);
|
||||
return;
|
||||
}
|
||||
this.isViewing = true;
|
||||
try {
|
||||
await this.save(false);
|
||||
this.requiresActionOnRouteLeave = false;
|
||||
} catch (error) {
|
||||
this.isViewing = false;
|
||||
}
|
||||
},
|
||||
addArticle(article) {
|
||||
if (this.description && this.description !== "") {
|
||||
this.updateDescription(this.description + ";" + article);
|
||||
@ -8351,7 +8374,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
removeArticle(article) {
|
||||
if (this.description && this.description !== "") {
|
||||
let values = [];
|
||||
let items = this.description.split(';');
|
||||
let items = this.description.split(";");
|
||||
items.forEach(item => {
|
||||
if (item !== article) {
|
||||
values.push(item);
|
||||
@ -8372,7 +8395,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
});
|
||||
},
|
||||
viewDefunt() {
|
||||
window.open(this.defuntUrl, '_blank');
|
||||
window.open(this.defuntUrl, "_blank");
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -13759,7 +13782,12 @@ var render = function render() {
|
||||
class: {
|
||||
"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: {
|
||||
type: _vm.moreButtonType,
|
||||
disabled: _vm.disabled
|
||||
@ -14497,14 +14525,6 @@ var render = function render() {
|
||||
on: {
|
||||
"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", {
|
||||
staticClass: "property-location",
|
||||
attrs: {
|
||||
@ -14582,7 +14602,8 @@ var render = function render() {
|
||||
"show-more-button": true,
|
||||
"more-button-type": _vm.isViewing ? "tertiary" : undefined,
|
||||
"grow-horizontally": !_vm.isViewing && _vm.canCreateRecurrenceException,
|
||||
disabled: _vm.isSaving
|
||||
disabled: _vm.isSaving,
|
||||
"is-calendar-pending": _vm.isCalendarPending
|
||||
},
|
||||
on: {
|
||||
"save-this-only": function ($event) {
|
||||
@ -14591,7 +14612,8 @@ var render = function render() {
|
||||
"save-this-and-all-future": function ($event) {
|
||||
return _vm.saveAndView(true);
|
||||
},
|
||||
"show-more": _vm.showMore
|
||||
"show-more": _vm.showMore,
|
||||
"save-pending-calendar-event": _vm.saveAsPendingCalendarEvent
|
||||
}
|
||||
}, [_vm.defuntUrl ? _c("NcButton", {
|
||||
class: "d-flex w-max-content",
|
||||
@ -17502,6 +17524,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
this.isLoading = true;
|
||||
this.isSaving = true;
|
||||
try {
|
||||
this.setPendingCalendar(false);
|
||||
await this.$store.dispatch('saveCalendarObjectInstance', {
|
||||
thisAndAllFuture,
|
||||
calendarId: this.calendarId
|
||||
@ -17516,6 +17539,43 @@ __webpack_require__.r(__webpack_exports__);
|
||||
this.isSaving = false;
|
||||
}
|
||||
},
|
||||
setPendingCalendar() {
|
||||
let isPending = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
||||
this.calendarObjectInstance.eventComponent.isCalendarPending = isPending;
|
||||
this.calendarObjectInstance.isCalendarPending = isPending;
|
||||
},
|
||||
async savePendingCalendar() {
|
||||
let thisAndAllFuture = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
||||
if (!this.calendarObject) {
|
||||
_utils_logger_js__WEBPACK_IMPORTED_MODULE_1__["default"].error('Calendar-object not found');
|
||||
return;
|
||||
}
|
||||
if (this.isReadOnly) {
|
||||
return;
|
||||
}
|
||||
if (this.forceThisAndAllFuture) {
|
||||
thisAndAllFuture = true;
|
||||
}
|
||||
this.isLoading = true;
|
||||
this.isSaving = true;
|
||||
try {
|
||||
this.setPendingCalendar();
|
||||
await this.$store.dispatch('saveCalendarObjectInstance', {
|
||||
thisAndAllFuture,
|
||||
calendarId: this.calendarId
|
||||
});
|
||||
this.requiresActionOnRouteLeave = false;
|
||||
} catch (error) {
|
||||
_utils_logger_js__WEBPACK_IMPORTED_MODULE_1__["default"].error("Failed to save event: ".concat(error));
|
||||
(0,_nextcloud_dialogs__WEBPACK_IMPORTED_MODULE_7__.showError)((0,_nextcloud_l10n__WEBPACK_IMPORTED_MODULE_5__.translate)('calendar', 'Failed to save event'));
|
||||
this.calendarObjectInstance.eventComponent.markDirty();
|
||||
throw error;
|
||||
} finally {
|
||||
this.isLoading = false;
|
||||
this.isSaving = false;
|
||||
this.closeEditor();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Saves a calendar-object and closes the editor
|
||||
*
|
||||
@ -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>
|
||||
<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"
|
||||
:type="moreButtonType"
|
||||
:disabled="disabled"
|
||||
@ -108,6 +115,10 @@ export default {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
isCalendarPending : {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
showSaveButton() {
|
||||
@ -127,6 +138,9 @@ export default {
|
||||
saveThisOnly() {
|
||||
this.$emit('save-this-only')
|
||||
},
|
||||
saveAsPendingCalendarEvent() {
|
||||
this.$emit('save-pending-calendar-event')
|
||||
},
|
||||
saveThisAndAllFuture() {
|
||||
this.$emit('save-this-and-all-future')
|
||||
},
|
||||
|
||||
@ -555,6 +555,7 @@ export default {
|
||||
this.isLoading = true
|
||||
this.isSaving = true
|
||||
try {
|
||||
this.setPendingCalendar(false);
|
||||
await this.$store.dispatch('saveCalendarObjectInstance', {
|
||||
thisAndAllFuture,
|
||||
calendarId: this.calendarId,
|
||||
@ -569,6 +570,42 @@ export default {
|
||||
this.isSaving = false
|
||||
}
|
||||
},
|
||||
setPendingCalendar(isPending = true) {
|
||||
this.calendarObjectInstance.eventComponent.isCalendarPending = isPending
|
||||
this.calendarObjectInstance.isCalendarPending = isPending
|
||||
},
|
||||
async savePendingCalendar(thisAndAllFuture = false) {
|
||||
if (!this.calendarObject) {
|
||||
logger.error('Calendar-object not found')
|
||||
return
|
||||
}
|
||||
if (this.isReadOnly) {
|
||||
return
|
||||
}
|
||||
if (this.forceThisAndAllFuture) {
|
||||
thisAndAllFuture = true
|
||||
}
|
||||
|
||||
this.isLoading = true
|
||||
this.isSaving = true
|
||||
try {
|
||||
this.setPendingCalendar();
|
||||
await this.$store.dispatch('saveCalendarObjectInstance', {
|
||||
thisAndAllFuture,
|
||||
calendarId: this.calendarId,
|
||||
})
|
||||
this.requiresActionOnRouteLeave = false
|
||||
} catch (error) {
|
||||
logger.error(`Failed to save event: ${error}`)
|
||||
showError(t('calendar', 'Failed to save event'))
|
||||
this.calendarObjectInstance.eventComponent.markDirty()
|
||||
throw error
|
||||
} finally {
|
||||
this.isLoading = false
|
||||
this.isSaving = false
|
||||
this.closeEditor()
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Saves a calendar-object and closes the editor
|
||||
|
||||
@ -1725,7 +1725,6 @@ const actions = {
|
||||
async saveCalendarObjectInstance({ state, dispatch, commit }, { thisAndAllFuture, calendarId }) {
|
||||
const eventComponent = state.calendarObjectInstance.eventComponent
|
||||
const calendarObject = state.calendarObject
|
||||
|
||||
updateAlarms(eventComponent)
|
||||
updateTalkParticipants(eventComponent)
|
||||
let client = eventComponent.client;
|
||||
@ -1739,7 +1738,6 @@ const actions = {
|
||||
const isForkedItem = eventComponent.primaryItem !== null
|
||||
let original = null
|
||||
let fork = null
|
||||
|
||||
// We check if two things apply:
|
||||
// - primaryItem !== null -> Is this a fork or not?
|
||||
// - eventComponent.canCreateRecurrenceExceptions() - Can we create a recurrence-exception for this item
|
||||
|
||||
@ -108,10 +108,10 @@
|
||||
:is-leave="isLeave"
|
||||
@toggle-is-leave="toggleIsLeave" />
|
||||
|
||||
<PropertyIsCalendarPending
|
||||
<!-- <PropertyIsCalendarPending
|
||||
:is-read-only="isReadOnly"
|
||||
:is-calendar-pending="isCalendarPending"
|
||||
@toggle-is-calendar-pending="toggleIsCalendarPending" />
|
||||
@toggle-is-calendar-pending="toggleIsCalendarPending" /> -->
|
||||
|
||||
<PropertySelectClient class="property-location"
|
||||
url="/apps/gestion/ajaxGetClientsName"
|
||||
@ -267,10 +267,15 @@
|
||||
class="app-sidebar-tab__buttons"
|
||||
:can-create-recurrence-exception="canCreateRecurrenceException"
|
||||
:is-new="isNew"
|
||||
:is-calendar-pending="isCalendarPending"
|
||||
|
||||
:isReadOnly="false"
|
||||
:force-this-and-all-future="forceThisAndAllFuture"
|
||||
@save-this-only="prepareAccessForAttachments(false)"
|
||||
@save-this-and-all-future="prepareAccessForAttachments(true)" />
|
||||
@save-this-and-all-future="prepareAccessForAttachments(true)"
|
||||
@save-pending-calendar-event="saveAsPendingCalendarEvent"
|
||||
|
||||
/>
|
||||
</NcAppSidebarTab>
|
||||
<NcAppSidebarTab v-if="!isLoading && !isError"
|
||||
id="app-sidebar-tab-attendees"
|
||||
@ -292,10 +297,13 @@
|
||||
class="app-sidebar-tab__buttons"
|
||||
:can-create-recurrence-exception="canCreateRecurrenceException"
|
||||
:is-new="isNew"
|
||||
:is-calendar-pending="isCalendarPending"
|
||||
|
||||
:isReadOnly="false"
|
||||
:force-this-and-all-future="forceThisAndAllFuture"
|
||||
@save-this-only="prepareAccessForAttachments(false)"
|
||||
@save-this-and-all-future="prepareAccessForAttachments(true)" />
|
||||
@save-this-and-all-future="prepareAccessForAttachments(true)"
|
||||
@save-pending-calendar-event="saveAsPendingCalendarEvent"/>
|
||||
</NcAppSidebarTab>
|
||||
<NcAppSidebarTab v-if="!isLoading && !isError && showResources"
|
||||
id="app-sidebar-tab-resources"
|
||||
@ -314,10 +322,13 @@
|
||||
class="app-sidebar-tab__buttons"
|
||||
:can-create-recurrence-exception="canCreateRecurrenceException"
|
||||
:is-new="isNew"
|
||||
:is-calendar-pending="isCalendarPending"
|
||||
|
||||
:isReadOnly="false"
|
||||
:force-this-and-all-future="forceThisAndAllFuture"
|
||||
@save-this-only="prepareAccessForAttachments(false)"
|
||||
@save-this-and-all-future="prepareAccessForAttachments(true)" />
|
||||
@save-this-and-all-future="prepareAccessForAttachments(true)"
|
||||
@save-pending-calendar-event="saveAsPendingCalendarEvent"/>
|
||||
</NcAppSidebarTab>
|
||||
</NcAppSidebar>
|
||||
</template>
|
||||
@ -432,6 +443,8 @@ export default {
|
||||
sharedProgress: 0,
|
||||
showPreloader: false,
|
||||
defuntUrl: undefined,
|
||||
isCalendarPending: false,
|
||||
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -494,12 +507,13 @@ export default {
|
||||
handler() {
|
||||
if(this.calendarObjectInstance) {
|
||||
this.getDefuntUrl()
|
||||
this.isCalendarPending = this.calendarObjectInstance.isCalendarPending ?? false;
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
methods: {
|
||||
/**
|
||||
* Update the start and end date of this event
|
||||
*
|
||||
@ -729,7 +743,21 @@ export default {
|
||||
},
|
||||
viewDefunt(){
|
||||
window.open(this.defuntUrl, '_blank')
|
||||
}
|
||||
},
|
||||
async saveAsPendingCalendarEvent() {
|
||||
if (this.isNew) {
|
||||
await this.savePendingCalendar(false);
|
||||
return;
|
||||
}
|
||||
|
||||
this.isViewing = true;
|
||||
try {
|
||||
await this.save(false);
|
||||
this.requiresActionOnRouteLeave = false;
|
||||
} catch (error) {
|
||||
this.isViewing = false;
|
||||
}
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -22,13 +22,15 @@
|
||||
-->
|
||||
|
||||
<template>
|
||||
<Popover ref="popover"
|
||||
<Popover
|
||||
ref="popover"
|
||||
:shown="showPopover"
|
||||
:auto-hide="false"
|
||||
:placement="placement"
|
||||
:boundary="boundaryElement"
|
||||
popover-base-class="event-popover"
|
||||
:triggers="[]">
|
||||
:triggers="[]"
|
||||
>
|
||||
<div class="event-popover__inner">
|
||||
<template v-if="isLoading && !isSaving">
|
||||
<PopoverLoadingIndicator />
|
||||
@ -41,12 +43,15 @@
|
||||
<template #icon>
|
||||
<Close :size="20" decorative />
|
||||
</template>
|
||||
{{ $t('calendar', 'Close') }}
|
||||
{{ $t("calendar", "Close") }}
|
||||
</ActionButton>
|
||||
</Actions>
|
||||
</div>
|
||||
|
||||
<EmptyContent :name="$t('calendar', 'Event does not exist')" :description="error">
|
||||
<EmptyContent
|
||||
:name="$t('calendar', 'Event does not exist')"
|
||||
:description="error"
|
||||
>
|
||||
<template #icon>
|
||||
<CalendarBlank :size="20" decorative />
|
||||
</template>
|
||||
@ -56,36 +61,50 @@
|
||||
<template v-else>
|
||||
<div class="event-popover__top-right-actions">
|
||||
<Actions v-if="!isLoading && !isError && !isNew" :force-menu="true">
|
||||
<ActionLink v-if="!hideEventExport && hasDownloadURL"
|
||||
:href="downloadURL">
|
||||
<ActionLink
|
||||
v-if="!hideEventExport && hasDownloadURL"
|
||||
:href="downloadURL"
|
||||
>
|
||||
<template #icon>
|
||||
<Download :size="20" decorative />
|
||||
</template>
|
||||
{{ $t('calendar', 'Export') }}
|
||||
{{ $t("calendar", "Export") }}
|
||||
</ActionLink>
|
||||
<ActionButton v-if="!canCreateRecurrenceException && !isReadOnly" @click="duplicateEvent()">
|
||||
<ActionButton
|
||||
v-if="!canCreateRecurrenceException && !isReadOnly"
|
||||
@click="duplicateEvent()"
|
||||
>
|
||||
<template #icon>
|
||||
<ContentDuplicate :size="20" decorative />
|
||||
</template>
|
||||
{{ $t('calendar', 'Duplicate') }}
|
||||
{{ $t("calendar", "Duplicate") }}
|
||||
</ActionButton>
|
||||
<ActionButton v-if="canDelete && !canCreateRecurrenceException" @click="deleteAndLeave(false)">
|
||||
<ActionButton
|
||||
v-if="canDelete && !canCreateRecurrenceException"
|
||||
@click="deleteAndLeave(false)"
|
||||
>
|
||||
<template #icon>
|
||||
<Delete :size="20" decorative />
|
||||
</template>
|
||||
{{ $t('calendar', 'Delete') }}
|
||||
{{ $t("calendar", "Delete") }}
|
||||
</ActionButton>
|
||||
<ActionButton v-if="canDelete && canCreateRecurrenceException" @click="deleteAndLeave(false)">
|
||||
<ActionButton
|
||||
v-if="canDelete && canCreateRecurrenceException"
|
||||
@click="deleteAndLeave(false)"
|
||||
>
|
||||
<template #icon>
|
||||
<Delete :size="20" decorative />
|
||||
</template>
|
||||
{{ $t('calendar', 'Delete this occurrence') }}
|
||||
{{ $t("calendar", "Delete this occurrence") }}
|
||||
</ActionButton>
|
||||
<ActionButton v-if="canDelete && canCreateRecurrenceException" @click="deleteAndLeave(true)">
|
||||
<ActionButton
|
||||
v-if="canDelete && canCreateRecurrenceException"
|
||||
@click="deleteAndLeave(true)"
|
||||
>
|
||||
<template #icon>
|
||||
<Delete :size="20" decorative />
|
||||
</template>
|
||||
{{ $t('calendar', 'Delete this and all future') }}
|
||||
{{ $t("calendar", "Delete this and all future") }}
|
||||
</ActionButton>
|
||||
</Actions>
|
||||
<Actions>
|
||||
@ -93,21 +112,26 @@
|
||||
<template #icon>
|
||||
<Close :size="20" decorative />
|
||||
</template>
|
||||
{{ $t('calendar', 'Close') }}
|
||||
{{ $t("calendar", "Close") }}
|
||||
</ActionButton>
|
||||
</Actions>
|
||||
</div>
|
||||
|
||||
<CalendarPickerHeader :value="selectedCalendar"
|
||||
<CalendarPickerHeader
|
||||
:value="selectedCalendar"
|
||||
:calendars="calendars"
|
||||
:is-read-only="isReadOnlyOrViewing || !canModifyCalendar"
|
||||
@update:value="changeCalendar" />
|
||||
@update:value="changeCalendar"
|
||||
/>
|
||||
|
||||
<PropertyTitle :value="titleOrPlaceholder"
|
||||
<PropertyTitle
|
||||
:value="titleOrPlaceholder"
|
||||
:is-read-only="isReadOnlyOrViewing"
|
||||
@update:value="updateTitle" />
|
||||
@update:value="updateTitle"
|
||||
/>
|
||||
|
||||
<PropertyTitleTimePicker :start-date="startDate"
|
||||
<PropertyTitleTimePicker
|
||||
:start-date="startDate"
|
||||
:start-timezone="startTimezone"
|
||||
:end-date="endDate"
|
||||
:end-timezone="endTimezone"
|
||||
@ -119,33 +143,39 @@
|
||||
@update-start-timezone="updateStartTimezone"
|
||||
@update-end-date="updateEndDate"
|
||||
@update-end-timezone="updateEndTimezone"
|
||||
@toggle-all-day="toggleAllDay"/>
|
||||
@toggle-all-day="toggleAllDay"
|
||||
/>
|
||||
|
||||
<PropertyIsLeave
|
||||
:is-read-only="isReadOnlyOrViewing"
|
||||
:is-leave="isLeave"
|
||||
@toggle-is-leave="toggleIsLeave" />
|
||||
@toggle-is-leave="toggleIsLeave"
|
||||
/>
|
||||
|
||||
<PropertyIsCalendarPending
|
||||
<!-- <PropertyIsCalendarPending
|
||||
:is-read-only="isReadOnlyOrViewing"
|
||||
:is-calendar-pending="isCalendarPending"
|
||||
@toggle-is-calendar-pending="toggleIsCalendarPending" />
|
||||
@toggle-is-calendar-pending="toggleIsCalendarPending" /> -->
|
||||
|
||||
<PropertySelectClient class="property-location"
|
||||
url="/apps/gestion/ajaxGetClientsName"
|
||||
:is-read-only="isReadOnly"
|
||||
:prop-model="rfcProps.clients"
|
||||
:value="client"
|
||||
:linkify-links="true"
|
||||
@update:value="updateClient" />
|
||||
<PropertySelectClient
|
||||
class="property-location"
|
||||
url="/apps/gestion/ajaxGetClientsName"
|
||||
:is-read-only="isReadOnly"
|
||||
:prop-model="rfcProps.clients"
|
||||
:value="client"
|
||||
:linkify-links="true"
|
||||
@update:value="updateClient"
|
||||
/>
|
||||
|
||||
<PropertySelectLieu class="property-location"
|
||||
url="/apps/gestion/ajaxGetLieux"
|
||||
:is-read-only="isReadOnly"
|
||||
:prop-model="rfcProps.locations"
|
||||
:value="location"
|
||||
:linkify-links="true"
|
||||
@update:value="updateLocation" />
|
||||
<PropertySelectLieu
|
||||
class="property-location"
|
||||
url="/apps/gestion/ajaxGetLieux"
|
||||
:is-read-only="isReadOnly"
|
||||
:prop-model="rfcProps.locations"
|
||||
:value="location"
|
||||
:linkify-links="true"
|
||||
@update:value="updateLocation"
|
||||
/>
|
||||
|
||||
<PropertySelectArticle
|
||||
:is-read-only="isReadOnlyOrViewing"
|
||||
@ -154,7 +184,8 @@
|
||||
:value="description"
|
||||
:linkify-links="true"
|
||||
@add-single-value="addArticle"
|
||||
@remove-single-value="removeArticle" />
|
||||
@remove-single-value="removeArticle"
|
||||
/>
|
||||
|
||||
<PropertyText
|
||||
:is-read-only="isReadOnly"
|
||||
@ -164,7 +195,8 @@
|
||||
@update:value="updateComment"
|
||||
/>
|
||||
|
||||
<InviteesList class="event-popover__invitees"
|
||||
<InviteesList
|
||||
class="event-popover__invitees"
|
||||
:hide-if-empty="true"
|
||||
:hide-buttons="true"
|
||||
:hide-errors="true"
|
||||
@ -172,15 +204,20 @@
|
||||
:is-read-only="isReadOnlyOrViewing"
|
||||
:is-shared-with-me="isSharedWithMe"
|
||||
:calendar-object-instance="calendarObjectInstance"
|
||||
:limit="3" />
|
||||
:limit="3"
|
||||
/>
|
||||
|
||||
<InvitationResponseButtons v-if="isViewedByAttendee && isViewing"
|
||||
<InvitationResponseButtons
|
||||
v-if="isViewedByAttendee && isViewing"
|
||||
class="event-popover__response-buttons"
|
||||
:attendee="userAsAttendee"
|
||||
:calendar-id="calendarId"
|
||||
@close="closeEditorAndSkipAction" />
|
||||
@close="closeEditorAndSkipAction"
|
||||
/>
|
||||
|
||||
<SaveButtons v-if="!isWidget"
|
||||
|
||||
<SaveButtons
|
||||
v-if="!isWidget"
|
||||
class="event-popover__buttons"
|
||||
:can-create-recurrence-exception="canCreateRecurrenceException"
|
||||
:is-new="isNew"
|
||||
@ -190,9 +227,12 @@
|
||||
:more-button-type="isViewing ? 'tertiary' : undefined"
|
||||
:grow-horizontally="!isViewing && canCreateRecurrenceException"
|
||||
:disabled="isSaving"
|
||||
:is-calendar-pending="isCalendarPending"
|
||||
@save-this-only="saveAndView(false)"
|
||||
@save-this-and-all-future="saveAndView(true)"
|
||||
@show-more="showMore">
|
||||
@show-more="showMore"
|
||||
@save-pending-calendar-event="saveAsPendingCalendarEvent"
|
||||
>
|
||||
<NcButton
|
||||
@click="viewDefunt"
|
||||
v-if="defuntUrl"
|
||||
@ -201,13 +241,15 @@
|
||||
>
|
||||
Voir le defunt
|
||||
</NcButton>
|
||||
<NcButton v-if="!isReadOnly && isViewing"
|
||||
<NcButton
|
||||
v-if="!isReadOnly && isViewing"
|
||||
:type="isViewedByAttendee ? 'tertiary' : undefined"
|
||||
@click="isViewing = false">
|
||||
@click="isViewing = false"
|
||||
>
|
||||
<template #icon>
|
||||
<EditIcon :size="20" />
|
||||
</template>
|
||||
{{ $t('calendar', 'Edit') }}
|
||||
{{ $t("calendar", "Edit") }}
|
||||
</NcButton>
|
||||
</SaveButtons>
|
||||
</template>
|
||||
@ -222,42 +264,39 @@ import {
|
||||
NcEmptyContent as EmptyContent,
|
||||
NcPopover as Popover,
|
||||
NcButton,
|
||||
} from '@nextcloud/vue'
|
||||
import axios from 'axios'
|
||||
import { generateUrl } from '@nextcloud/router'
|
||||
import EditorMixin from '../mixins/EditorMixin.js'
|
||||
import PropertyTitle from '../components/Editor/Properties/PropertyTitle.vue'
|
||||
import PropertyTitleTimePicker
|
||||
from '../components/Editor/Properties/PropertyTitleTimePicker.vue'
|
||||
import PropertyText from '../components/Editor/Properties/PropertyText.vue'
|
||||
import SaveButtons from '../components/Editor/SaveButtons.vue'
|
||||
import PopoverLoadingIndicator
|
||||
from '../components/Popover/PopoverLoadingIndicator.vue'
|
||||
import { getPrefixedRoute } from '../utils/router.js'
|
||||
import InvitationResponseButtons
|
||||
from '../components/Editor/InvitationResponseButtons.vue'
|
||||
import CalendarPickerHeader from '../components/Editor/CalendarPickerHeader.vue'
|
||||
import InviteesList from '../components/Editor/Invitees/InviteesList.vue'
|
||||
} from "@nextcloud/vue";
|
||||
import axios from "axios";
|
||||
import { generateUrl } from "@nextcloud/router";
|
||||
import EditorMixin from "../mixins/EditorMixin.js";
|
||||
import PropertyTitle from "../components/Editor/Properties/PropertyTitle.vue";
|
||||
import PropertyTitleTimePicker from "../components/Editor/Properties/PropertyTitleTimePicker.vue";
|
||||
import PropertyText from "../components/Editor/Properties/PropertyText.vue";
|
||||
import SaveButtons from "../components/Editor/SaveButtons.vue";
|
||||
import PopoverLoadingIndicator from "../components/Popover/PopoverLoadingIndicator.vue";
|
||||
import { getPrefixedRoute } from "../utils/router.js";
|
||||
import InvitationResponseButtons from "../components/Editor/InvitationResponseButtons.vue";
|
||||
import CalendarPickerHeader from "../components/Editor/CalendarPickerHeader.vue";
|
||||
import InviteesList from "../components/Editor/Invitees/InviteesList.vue";
|
||||
|
||||
import CalendarBlank from 'vue-material-design-icons/CalendarBlank.vue'
|
||||
import Close from 'vue-material-design-icons/Close.vue'
|
||||
import Delete from 'vue-material-design-icons/Delete.vue'
|
||||
import Download from 'vue-material-design-icons/Download.vue'
|
||||
import ContentDuplicate from 'vue-material-design-icons/ContentDuplicate.vue'
|
||||
import EditIcon from 'vue-material-design-icons/Pencil.vue'
|
||||
import { mapState } from 'vuex'
|
||||
import {showError} from "@nextcloud/dialogs";
|
||||
import CalendarBlank from "vue-material-design-icons/CalendarBlank.vue";
|
||||
import Close from "vue-material-design-icons/Close.vue";
|
||||
import Delete from "vue-material-design-icons/Delete.vue";
|
||||
import Download from "vue-material-design-icons/Download.vue";
|
||||
import ContentDuplicate from "vue-material-design-icons/ContentDuplicate.vue";
|
||||
import EditIcon from "vue-material-design-icons/Pencil.vue";
|
||||
import { mapState } from "vuex";
|
||||
import { showError } from "@nextcloud/dialogs";
|
||||
import PropertySelect from "../components/Editor/Properties/PropertySelect.vue";
|
||||
import PropertySelectAjax from "../components/Editor/Properties/PropertySelectAjax.vue";
|
||||
import PropertySelectAjaxMultiple from "../components/Editor/Properties/PropertySelectAjaxMultiple.vue";
|
||||
import PropertySelectLieu from "../components/Editor/Properties/PropertySelectLieu.vue";
|
||||
import PropertySelectClient from "../components/Editor/Properties/PropertySelectClient.vue";
|
||||
import PropertySelectArticle from "../components/Editor/Properties/PropertySelectArticle.vue";
|
||||
import PropertyIsLeave from '../components/Editor/Properties/PropertyIsLeave.vue'
|
||||
import PropertyIsCalendarPending from '../components/Editor/Properties/PropertyIsCalendarPending';
|
||||
import PropertyIsLeave from "../components/Editor/Properties/PropertyIsLeave.vue";
|
||||
import PropertyIsCalendarPending from "../components/Editor/Properties/PropertyIsCalendarPending";
|
||||
|
||||
export default {
|
||||
name: 'EditSimple',
|
||||
name: "EditSimple",
|
||||
components: {
|
||||
PropertyIsLeave,
|
||||
PropertyIsCalendarPending,
|
||||
@ -288,19 +327,18 @@ export default {
|
||||
NcButton,
|
||||
EditIcon,
|
||||
},
|
||||
mixins: [
|
||||
EditorMixin,
|
||||
],
|
||||
mixins: [EditorMixin],
|
||||
data() {
|
||||
return {
|
||||
placement: 'auto',
|
||||
placement: "auto",
|
||||
hasLocation: false,
|
||||
hasDescription: false,
|
||||
isCalendarPending: false,
|
||||
boundaryElement: null,
|
||||
isVisible: true,
|
||||
isViewing: true,
|
||||
defuntUrl: undefined,
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
@ -311,7 +349,7 @@ export default {
|
||||
}),
|
||||
|
||||
showPopover() {
|
||||
return this.isVisible || this.widgetEventDetailsOpen
|
||||
return this.isVisible || this.widgetEventDetailsOpen;
|
||||
},
|
||||
|
||||
/**
|
||||
@ -320,7 +358,7 @@ export default {
|
||||
* @return {boolean}
|
||||
*/
|
||||
isReadOnlyOrViewing() {
|
||||
return this.isReadOnly || this.isViewing || this.isWidget
|
||||
return this.isReadOnly || this.isViewing || this.isWidget;
|
||||
},
|
||||
|
||||
/**
|
||||
@ -329,123 +367,148 @@ export default {
|
||||
* @return {string}
|
||||
*/
|
||||
titleOrPlaceholder() {
|
||||
if (this.title === '' && this.isReadOnlyOrViewing && !this.isLoading) {
|
||||
return t('calendar', 'Untitled event')
|
||||
if (this.title === "" && this.isReadOnlyOrViewing && !this.isLoading) {
|
||||
return t("calendar", "Untitled event");
|
||||
}
|
||||
|
||||
return this.title
|
||||
return this.title;
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
$route(to, from) {
|
||||
this.repositionPopover()
|
||||
this.repositionPopover();
|
||||
|
||||
// Hide popover when changing the view until the user selects a slot again
|
||||
this.isVisible = to?.params.view === from?.params.view
|
||||
this.isVisible = to?.params.view === from?.params.view;
|
||||
},
|
||||
calendarObjectInstance() {
|
||||
this.hasLocation = false
|
||||
this.hasDescription = false
|
||||
this.hasLocation = false;
|
||||
this.hasDescription = false;
|
||||
|
||||
if (typeof this.calendarObjectInstance.location === 'string' && this.calendarObjectInstance.location.trim() !== '') {
|
||||
this.hasLocation = true
|
||||
}
|
||||
if (typeof this.calendarObjectInstance.description === 'string' && this.calendarObjectInstance.description.trim() !== '') {
|
||||
this.hasDescription = true
|
||||
}
|
||||
if(this.calendarObjectInstance) {
|
||||
this.getDefuntUrl()
|
||||
}
|
||||
},
|
||||
if (
|
||||
typeof this.calendarObjectInstance.location === "string" &&
|
||||
this.calendarObjectInstance.location.trim() !== ""
|
||||
) {
|
||||
this.hasLocation = true;
|
||||
}
|
||||
if (
|
||||
typeof this.calendarObjectInstance.description === "string" &&
|
||||
this.calendarObjectInstance.description.trim() !== ""
|
||||
) {
|
||||
this.hasDescription = true;
|
||||
}
|
||||
if (this.calendarObjectInstance) {
|
||||
this.getDefuntUrl();
|
||||
this.isCalendarPending = this.calendarObjectInstance.isCalendarPending ?? false;
|
||||
}
|
||||
|
||||
},
|
||||
isNew: {
|
||||
immediate: true,
|
||||
handler(isNew) {
|
||||
// New events should be editable from the start
|
||||
this.isViewing = !isNew
|
||||
this.isViewing = !isNew;
|
||||
},
|
||||
},
|
||||
},
|
||||
async mounted() {
|
||||
if (this.isWidget) {
|
||||
const objectId = this.widgetEventDetails.object
|
||||
const recurrenceId = this.widgetEventDetails.recurrenceId
|
||||
await this.$store.dispatch('getCalendarObjectInstanceByObjectIdAndRecurrenceId', { objectId, recurrenceId })
|
||||
this.calendarId = this.calendarObject.calendarId
|
||||
this.isLoading = false
|
||||
const objectId = this.widgetEventDetails.object;
|
||||
const recurrenceId = this.widgetEventDetails.recurrenceId;
|
||||
await this.$store.dispatch(
|
||||
"getCalendarObjectInstanceByObjectIdAndRecurrenceId",
|
||||
{ objectId, recurrenceId }
|
||||
);
|
||||
this.calendarId = this.calendarObject.calendarId;
|
||||
this.isLoading = false;
|
||||
}
|
||||
this.boundaryElement = this.isWidget ? document.querySelector('.fc') : document.querySelector('#app-content-vue > .fc')
|
||||
window.addEventListener('keydown', this.keyboardCloseEditor)
|
||||
window.addEventListener('keydown', this.keyboardSaveEvent)
|
||||
window.addEventListener('keydown', this.keyboardDeleteEvent)
|
||||
window.addEventListener('keydown', this.keyboardDuplicateEvent)
|
||||
this.boundaryElement = this.isWidget
|
||||
? document.querySelector(".fc")
|
||||
: document.querySelector("#app-content-vue > .fc");
|
||||
window.addEventListener("keydown", this.keyboardCloseEditor);
|
||||
window.addEventListener("keydown", this.keyboardSaveEvent);
|
||||
window.addEventListener("keydown", this.keyboardDeleteEvent);
|
||||
window.addEventListener("keydown", this.keyboardDuplicateEvent);
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.repositionPopover()
|
||||
})
|
||||
this.repositionPopover();
|
||||
});
|
||||
},
|
||||
beforeDestroy() {
|
||||
window.removeEventListener('keydown', this.keyboardCloseEditor)
|
||||
window.removeEventListener('keydown', this.keyboardSaveEvent)
|
||||
window.removeEventListener('keydown', this.keyboardDeleteEvent)
|
||||
window.removeEventListener('keydown', this.keyboardDuplicateEvent)
|
||||
window.removeEventListener("keydown", this.keyboardCloseEditor);
|
||||
window.removeEventListener("keydown", this.keyboardSaveEvent);
|
||||
window.removeEventListener("keydown", this.keyboardDeleteEvent);
|
||||
window.removeEventListener("keydown", this.keyboardDuplicateEvent);
|
||||
},
|
||||
methods: {
|
||||
|
||||
showMore() {
|
||||
// Do not save yet
|
||||
this.requiresActionOnRouteLeave = false
|
||||
this.requiresActionOnRouteLeave = false;
|
||||
|
||||
const params = Object.assign({}, this.$route.params)
|
||||
const params = Object.assign({}, this.$route.params);
|
||||
if (this.isNew) {
|
||||
this.$router.push({ name: 'NewSidebarView', params })
|
||||
this.$router.push({ name: "NewSidebarView", params });
|
||||
} else {
|
||||
this.$router.push({
|
||||
name: getPrefixedRoute(this.$route.name, 'EditSidebarView'),
|
||||
name: getPrefixedRoute(this.$route.name, "EditSidebarView"),
|
||||
params,
|
||||
})
|
||||
});
|
||||
}
|
||||
},
|
||||
getDomElementForPopover(isNew, route) {
|
||||
let matchingDomObject
|
||||
let matchingDomObject;
|
||||
if (this.isWidget) {
|
||||
const objectId = this.widgetEventDetails.object
|
||||
const recurrenceId = this.widgetEventDetails.recurrenceId
|
||||
const objectId = this.widgetEventDetails.object;
|
||||
const recurrenceId = this.widgetEventDetails.recurrenceId;
|
||||
|
||||
matchingDomObject = this.widgetRef.querySelector(`.fc-event[data-object-id="${objectId}"][data-recurrence-id="${recurrenceId}"]`)
|
||||
this.placement = 'auto'
|
||||
matchingDomObject = this.widgetRef.querySelector(
|
||||
`.fc-event[data-object-id="${objectId}"][data-recurrence-id="${recurrenceId}"]`
|
||||
);
|
||||
this.placement = "auto";
|
||||
} else if (isNew) {
|
||||
matchingDomObject = document.querySelector('.fc-highlight')
|
||||
this.placement = 'auto'
|
||||
matchingDomObject = document.querySelector(".fc-highlight");
|
||||
this.placement = "auto";
|
||||
|
||||
if (!matchingDomObject) {
|
||||
matchingDomObject = document.querySelector('.fc-event[data-is-new="yes"]')
|
||||
matchingDomObject = document.querySelector(
|
||||
'.fc-event[data-is-new="yes"]'
|
||||
);
|
||||
}
|
||||
} else {
|
||||
const objectId = route.params.object
|
||||
const recurrenceId = route.params.recurrenceId
|
||||
const objectId = route.params.object;
|
||||
const recurrenceId = route.params.recurrenceId;
|
||||
|
||||
matchingDomObject = document.querySelector(`.fc-event[data-object-id="${objectId}"][data-recurrence-id="${recurrenceId}"]`)
|
||||
this.placement = 'auto'
|
||||
matchingDomObject = document.querySelector(
|
||||
`.fc-event[data-object-id="${objectId}"][data-recurrence-id="${recurrenceId}"]`
|
||||
);
|
||||
this.placement = "auto";
|
||||
}
|
||||
|
||||
if (!matchingDomObject) {
|
||||
matchingDomObject = document.querySelector('#app-navigation-vue')
|
||||
this.placement = 'right'
|
||||
matchingDomObject = document.querySelector("#app-navigation-vue");
|
||||
this.placement = "right";
|
||||
}
|
||||
|
||||
if (!matchingDomObject) {
|
||||
matchingDomObject = document.querySelector('body')
|
||||
this.placement = 'auto'
|
||||
matchingDomObject = document.querySelector("body");
|
||||
this.placement = "auto";
|
||||
}
|
||||
|
||||
console.info('getDomElementForPopover', matchingDomObject, this.placement)
|
||||
return matchingDomObject
|
||||
console.info(
|
||||
"getDomElementForPopover",
|
||||
matchingDomObject,
|
||||
this.placement
|
||||
);
|
||||
return matchingDomObject;
|
||||
},
|
||||
repositionPopover() {
|
||||
const isNew = this.isWidget ? false : this.$route.name === 'NewPopoverView'
|
||||
this.$refs.popover.$children[0].$refs.reference = this.getDomElementForPopover(isNew, this.$route)
|
||||
this.$refs.popover.$children[0].$refs.popper.dispose()
|
||||
this.$refs.popover.$children[0].$refs.popper.init()
|
||||
const isNew = this.isWidget
|
||||
? false
|
||||
: this.$route.name === "NewPopoverView";
|
||||
this.$refs.popover.$children[0].$refs.reference =
|
||||
this.getDomElementForPopover(isNew, this.$route);
|
||||
this.$refs.popover.$children[0].$refs.popper.dispose();
|
||||
this.$refs.popover.$children[0].$refs.popper.init();
|
||||
},
|
||||
/**
|
||||
* Save changes and leave when creating a new event or return to viewing mode when editing
|
||||
@ -457,32 +520,46 @@ export default {
|
||||
async saveAndView(thisAndAllFuture) {
|
||||
// Transitioning from new to edit routes is not implemented for now
|
||||
if (this.isNew) {
|
||||
await this.saveAndLeave(thisAndAllFuture)
|
||||
return
|
||||
await this.saveAndLeave(thisAndAllFuture);
|
||||
return;
|
||||
}
|
||||
|
||||
this.isViewing = true
|
||||
this.isViewing = true;
|
||||
try {
|
||||
await this.save(thisAndAllFuture)
|
||||
this.requiresActionOnRouteLeave = false
|
||||
await this.save(thisAndAllFuture);
|
||||
this.requiresActionOnRouteLeave = false;
|
||||
} catch (error) {
|
||||
this.isViewing = false
|
||||
this.isViewing = false;
|
||||
}
|
||||
},
|
||||
async saveAsPendingCalendarEvent() {
|
||||
if (this.isNew) {
|
||||
await this.savePendingCalendar(false);
|
||||
return;
|
||||
}
|
||||
|
||||
this.isViewing = true;
|
||||
try {
|
||||
await this.save(false);
|
||||
this.requiresActionOnRouteLeave = false;
|
||||
} catch (error) {
|
||||
this.isViewing = false;
|
||||
}
|
||||
},
|
||||
|
||||
addArticle(article) {
|
||||
if(this.description && this.description !== "") {
|
||||
if (this.description && this.description !== "") {
|
||||
this.updateDescription(this.description + ";" + article);
|
||||
} else {
|
||||
this.updateDescription(article);
|
||||
}
|
||||
},
|
||||
removeArticle(article) {
|
||||
if(this.description && this.description !== "") {
|
||||
if (this.description && this.description !== "") {
|
||||
let values = [];
|
||||
let items = this.description.split(';');
|
||||
let items = this.description.split(";");
|
||||
items.forEach((item) => {
|
||||
if(item !== article) {
|
||||
if (item !== article) {
|
||||
values.push(item);
|
||||
}
|
||||
});
|
||||
@ -491,19 +568,22 @@ export default {
|
||||
this.updateDescription(null);
|
||||
}
|
||||
},
|
||||
getDefuntUrl(){
|
||||
const url = generateUrl(`/apps/gestion/api/getDefundIdByCalendarUuid/${this.calendarObjectInstance.eventComponent.uid}`)
|
||||
getDefuntUrl() {
|
||||
const url = generateUrl(
|
||||
`/apps/gestion/api/getDefundIdByCalendarUuid/${this.calendarObjectInstance.eventComponent.uid}`
|
||||
);
|
||||
axios.get(url).then((response) => {
|
||||
console.log(this.calendarObjectInstance)
|
||||
if(response.data.id){
|
||||
this.defuntUrl = generateUrl(`/apps/gestion/defunt/${response.data.id}/show`)
|
||||
console.log(this.calendarObjectInstance);
|
||||
if (response.data.id) {
|
||||
this.defuntUrl = generateUrl(
|
||||
`/apps/gestion/defunt/${response.data.id}/show`
|
||||
);
|
||||
}
|
||||
|
||||
})
|
||||
});
|
||||
},
|
||||
viewDefunt() {
|
||||
window.open(this.defuntUrl, "_blank");
|
||||
},
|
||||
viewDefunt(){
|
||||
window.open(this.defuntUrl, '_blank')
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user