finish frontend send the isleaveproperty,wip catch it from the backend

This commit is contained in:
Tiavina 2025-01-24 13:44:33 +03:00
parent f7564e2b41
commit 0156848a2f
16 changed files with 692 additions and 455 deletions

View File

@ -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_vue-material-design-icons_CalendarBlankOutline_vue-node_modules_nextclou-4adead":"702892edfb255629754c","vendors-node_modules_nextcloud_vue-dashboard_dist_vue-dashboard_js-node_modules_css-loader_di-9e6f3d":"bab844a8fb43e3701945","src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790":"7cf71b4f92d5bbc180b4","src_store_index_js":"e380346f21f6daf64ba8","src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258":"740a2859d1f364b508c1","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":"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_vue-material-design-icons_CalendarBlankOutline_vue-node_modules_nextclou-4adead":"702892edfb255629754c","vendors-node_modules_nextcloud_vue-dashboard_dist_vue-dashboard_js-node_modules_css-loader_di-9e6f3d":"bab844a8fb43e3701945","src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790":"7cf71b4f92d5bbc180b4","src_store_index_js":"6efedd2fc6c141c7c1cb","src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258":"740a2859d1f364b508c1","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] + "";
/******/ };
/******/ })();
/******/
@ -1580,4 +1580,4 @@ document.addEventListener('DOMContentLoaded', function () {
/******/ })()
;
//# sourceMappingURL=calendar-dashboard.js.map?v=0eeccaf4496c7c132733
//# sourceMappingURL=calendar-dashboard.js.map?v=9463468c4bca6983342f

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -8865,7 +8865,7 @@ window._registerCustomPickerElement = _;
/******/ // This function allow to reference async chunks
/******/ __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_vue-material-design-icons_CalendarBlankOutline_vue-node_modules_nextclou-4adead":"702892edfb255629754c","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":"740a2859d1f364b508c1","src_views_Calendar_vue-data_image_svg_xml_3csvg_20xmlns_27http_www_w3_org_2000_svg_27_20heigh-4a4254":"f59d0f97f0675fd9c321","vendors-node_modules_webdav_dist_web_index_js":"454da8f908d41b47c607","src_store_index_js":"e380346f21f6daf64ba8","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":"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_vue-material-design-icons_CalendarBlankOutline_vue-node_modules_nextclou-4adead":"702892edfb255629754c","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":"740a2859d1f364b508c1","src_views_Calendar_vue-data_image_svg_xml_3csvg_20xmlns_27http_www_w3_org_2000_svg_27_20heigh-4a4254":"c045649f88ded9ef28f8","vendors-node_modules_webdav_dist_web_index_js":"454da8f908d41b47c607","src_store_index_js":"6efedd2fc6c141c7c1cb","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] + "";
/******/ };
/******/ })();
/******/
@ -9115,4 +9115,4 @@ __webpack_require__.p = (0,_nextcloud_router__WEBPACK_IMPORTED_MODULE_1__.linkTo
/******/ })()
;
//# sourceMappingURL=calendar-reference.js.map?v=6458b3ad533e25b1d187
//# sourceMappingURL=calendar-reference.js.map?v=31d9df5451d123f8f2c9

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -6859,6 +6859,13 @@ __webpack_require__.r(__webpack_exports__);
type: Boolean,
required: true
},
/**
* Whether or not the event is leave
*/
isLeave: {
type: Boolean,
default: false
},
/**
* Whether or not the user can toggle the all-day property
* This is set to false, whenever this event is part of a recurrence-set
@ -7001,6 +7008,14 @@ __webpack_require__.r(__webpack_exports__);
return;
}
this.$emit('toggle-all-day');
},
/**
* Toggles the all-day state of an event
*/
toggleIsLeave() {
debugger;
const newLeaveState = !this.isLeave;
this.$emit('toggle-is-leave', newLeaveState);
}
}
});
@ -13563,7 +13578,16 @@ var render = function render() {
on: {
"update:checked": _vm.toggleAllDay
}
}, [_vm._v("\n\t\t\t" + _vm._s(_vm.$t("calendar", "All day")) + "\n\t\t")])], 1) : _vm._e()], 1);
}, [_vm._v("\n\t\t\t" + _vm._s(_vm.$t("calendar", "All day")) + "\n\t\t")])], 1) : _vm._e(), _vm._v(" "), !_vm.isReadOnly ? _c("div", {
staticClass: "property-title-time-picker__all-day"
}, [_c("NcCheckboxRadioSwitch", {
attrs: {
checked: _vm.isLeave
},
on: {
"update:checked": _vm.toggleIsLeave
}
}, [_vm._v("\n\t\t\t" + _vm._s(_vm.$t("calendar", "Leave")) + "\n\t\t")])], 1) : _vm._e()], 1);
};
var staticRenderFns = [];
render._withStripped = true;
@ -16889,14 +16913,23 @@ __webpack_require__.r(__webpack_exports__);
var _this$calendarObjectI8, _this$calendarObjectI9;
return (_this$calendarObjectI8 = (_this$calendarObjectI9 = this.calendarObjectInstance) === null || _this$calendarObjectI9 === void 0 ? void 0 : _this$calendarObjectI9.embalmer) !== null && _this$calendarObjectI8 !== void 0 ? _this$calendarObjectI8 : null;
},
/**
* Returns the embalmer(Thanato) or null if the event is still loading
*
* @return {string|null}
*/
isLeave() {
var _this$calendarObjectI10, _this$calendarObjectI11;
return (_this$calendarObjectI10 = (_this$calendarObjectI11 = this.calendarObjectInstance) === null || _this$calendarObjectI11 === void 0 ? void 0 : _this$calendarObjectI11.isLeave) !== null && _this$calendarObjectI10 !== void 0 ? _this$calendarObjectI10 : false;
},
/**
* Returns the comment or null if the event is still loading
*
* @return {string|null}
*/
comment() {
var _this$calendarObjectI10, _this$calendarObjectI11;
return (_this$calendarObjectI10 = (_this$calendarObjectI11 = this.calendarObjectInstance) === null || _this$calendarObjectI11 === void 0 ? void 0 : _this$calendarObjectI11.comment) !== null && _this$calendarObjectI10 !== void 0 ? _this$calendarObjectI10 : null;
var _this$calendarObjectI12, _this$calendarObjectI13;
return (_this$calendarObjectI12 = (_this$calendarObjectI13 = this.calendarObjectInstance) === null || _this$calendarObjectI13 === void 0 ? void 0 : _this$calendarObjectI13.comment) !== null && _this$calendarObjectI12 !== void 0 ? _this$calendarObjectI12 : null;
},
/**
* Returns the description or null if the event is still loading
@ -16904,8 +16937,8 @@ __webpack_require__.r(__webpack_exports__);
* @return {string|null}
*/
description() {
var _this$calendarObjectI12, _this$calendarObjectI13;
return (_this$calendarObjectI12 = (_this$calendarObjectI13 = this.calendarObjectInstance) === null || _this$calendarObjectI13 === void 0 ? void 0 : _this$calendarObjectI13.description) !== null && _this$calendarObjectI12 !== void 0 ? _this$calendarObjectI12 : null;
var _this$calendarObjectI14, _this$calendarObjectI15;
return (_this$calendarObjectI14 = (_this$calendarObjectI15 = this.calendarObjectInstance) === null || _this$calendarObjectI15 === void 0 ? void 0 : _this$calendarObjectI15.description) !== null && _this$calendarObjectI14 !== void 0 ? _this$calendarObjectI14 : null;
},
/**
* Returns the start-date (without timezone) or null if the event is still loading
@ -16913,8 +16946,8 @@ __webpack_require__.r(__webpack_exports__);
* @return {Date|null}
*/
startDate() {
var _this$calendarObjectI14, _this$calendarObjectI15;
return (_this$calendarObjectI14 = (_this$calendarObjectI15 = this.calendarObjectInstance) === null || _this$calendarObjectI15 === void 0 ? void 0 : _this$calendarObjectI15.startDate) !== null && _this$calendarObjectI14 !== void 0 ? _this$calendarObjectI14 : null;
var _this$calendarObjectI16, _this$calendarObjectI17;
return (_this$calendarObjectI16 = (_this$calendarObjectI17 = this.calendarObjectInstance) === null || _this$calendarObjectI17 === void 0 ? void 0 : _this$calendarObjectI17.startDate) !== null && _this$calendarObjectI16 !== void 0 ? _this$calendarObjectI16 : null;
},
/**
* Returns the timezone of the event's start-date or null if the event is still loading
@ -16922,8 +16955,8 @@ __webpack_require__.r(__webpack_exports__);
* @return {string|null}
*/
startTimezone() {
var _this$calendarObjectI16, _this$calendarObjectI17;
return (_this$calendarObjectI16 = (_this$calendarObjectI17 = this.calendarObjectInstance) === null || _this$calendarObjectI17 === void 0 ? void 0 : _this$calendarObjectI17.startTimezoneId) !== null && _this$calendarObjectI16 !== void 0 ? _this$calendarObjectI16 : null;
var _this$calendarObjectI18, _this$calendarObjectI19;
return (_this$calendarObjectI18 = (_this$calendarObjectI19 = this.calendarObjectInstance) === null || _this$calendarObjectI19 === void 0 ? void 0 : _this$calendarObjectI19.startTimezoneId) !== null && _this$calendarObjectI18 !== void 0 ? _this$calendarObjectI18 : null;
},
/**
* Returns the end-date (without timezone) or null if the event is still loading
@ -16931,8 +16964,8 @@ __webpack_require__.r(__webpack_exports__);
* @return {Date|null}
*/
endDate() {
var _this$calendarObjectI18, _this$calendarObjectI19;
return (_this$calendarObjectI18 = (_this$calendarObjectI19 = this.calendarObjectInstance) === null || _this$calendarObjectI19 === void 0 ? void 0 : _this$calendarObjectI19.endDate) !== null && _this$calendarObjectI18 !== void 0 ? _this$calendarObjectI18 : null;
var _this$calendarObjectI20, _this$calendarObjectI21;
return (_this$calendarObjectI20 = (_this$calendarObjectI21 = this.calendarObjectInstance) === null || _this$calendarObjectI21 === void 0 ? void 0 : _this$calendarObjectI21.endDate) !== null && _this$calendarObjectI20 !== void 0 ? _this$calendarObjectI20 : null;
},
/**
* Returns the timezone of the event's end-date or null if the event is still loading
@ -16940,8 +16973,8 @@ __webpack_require__.r(__webpack_exports__);
* @return {string|null}
*/
endTimezone() {
var _this$calendarObjectI20, _this$calendarObjectI21;
return (_this$calendarObjectI20 = (_this$calendarObjectI21 = this.calendarObjectInstance) === null || _this$calendarObjectI21 === void 0 ? void 0 : _this$calendarObjectI21.endTimezoneId) !== null && _this$calendarObjectI20 !== void 0 ? _this$calendarObjectI20 : null;
var _this$calendarObjectI22, _this$calendarObjectI23;
return (_this$calendarObjectI22 = (_this$calendarObjectI23 = this.calendarObjectInstance) === null || _this$calendarObjectI23 === void 0 ? void 0 : _this$calendarObjectI23.endTimezoneId) !== null && _this$calendarObjectI22 !== void 0 ? _this$calendarObjectI22 : null;
},
/**
* Returns whether or not the event is all-day or null if the event is still loading
@ -16949,8 +16982,17 @@ __webpack_require__.r(__webpack_exports__);
* @return {boolean}
*/
isAllDay() {
var _this$calendarObjectI22, _this$calendarObjectI23;
return (_this$calendarObjectI22 = (_this$calendarObjectI23 = this.calendarObjectInstance) === null || _this$calendarObjectI23 === void 0 ? void 0 : _this$calendarObjectI23.isAllDay) !== null && _this$calendarObjectI22 !== void 0 ? _this$calendarObjectI22 : false;
var _this$calendarObjectI24, _this$calendarObjectI25;
return (_this$calendarObjectI24 = (_this$calendarObjectI25 = this.calendarObjectInstance) === null || _this$calendarObjectI25 === void 0 ? void 0 : _this$calendarObjectI25.isAllDay) !== null && _this$calendarObjectI24 !== void 0 ? _this$calendarObjectI24 : false;
},
/**
* Returns whether or not the event is a leave
*
* @return {boolean}
*/
isLeave() {
var _this$calendarObjectI26, _this$calendarObjectI27;
return (_this$calendarObjectI26 = (_this$calendarObjectI27 = this.calendarObjectInstance) === null || _this$calendarObjectI27 === void 0 ? void 0 : _this$calendarObjectI27.isLeave) !== null && _this$calendarObjectI26 !== void 0 ? _this$calendarObjectI26 : false;
},
/**
* Returns whether or not the user is allowed to modify the all-day setting
@ -16958,8 +17000,8 @@ __webpack_require__.r(__webpack_exports__);
* @return {boolean}
*/
canModifyAllDay() {
var _this$calendarObjectI24, _this$calendarObjectI25;
return (_this$calendarObjectI24 = (_this$calendarObjectI25 = this.calendarObjectInstance) === null || _this$calendarObjectI25 === void 0 ? void 0 : _this$calendarObjectI25.canModifyAllDay) !== null && _this$calendarObjectI24 !== void 0 ? _this$calendarObjectI24 : false;
var _this$calendarObjectI28, _this$calendarObjectI29;
return (_this$calendarObjectI28 = (_this$calendarObjectI29 = this.calendarObjectInstance) === null || _this$calendarObjectI29 === void 0 ? void 0 : _this$calendarObjectI29.canModifyAllDay) !== null && _this$calendarObjectI28 !== void 0 ? _this$calendarObjectI28 : false;
},
/**
* Returns the color the illustration should be colored in
@ -16991,8 +17033,8 @@ __webpack_require__.r(__webpack_exports__);
* @return {null | string}
*/
color() {
var _this$calendarObjectI26, _this$calendarObjectI27;
return (_this$calendarObjectI26 = (_this$calendarObjectI27 = this.calendarObjectInstance) === null || _this$calendarObjectI27 === void 0 ? void 0 : _this$calendarObjectI27.customColor) !== null && _this$calendarObjectI26 !== void 0 ? _this$calendarObjectI26 : null;
var _this$calendarObjectI30, _this$calendarObjectI31;
return (_this$calendarObjectI30 = (_this$calendarObjectI31 = this.calendarObjectInstance) === null || _this$calendarObjectI31 === void 0 ? void 0 : _this$calendarObjectI31.customColor) !== null && _this$calendarObjectI30 !== void 0 ? _this$calendarObjectI30 : null;
},
/**
* Returns whether or not to display save buttons
@ -17468,6 +17510,16 @@ __webpack_require__.r(__webpack_exports__);
calendarObjectInstance: this.calendarObjectInstance
});
},
/**
* Toggles the event between all-day and timed
*/
toggleIsLeave(isLeave) {
debugger;
this.$store.commit('toggleIsLeave', {
calendarObjectInstance: this.calendarObjectInstance,
isLeave
});
},
/**
* Resets the internal state after changing the viewed calendar-object
*/
@ -27414,4 +27466,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=f59d0f97f0675fd9c321
//# sourceMappingURL=calendar-src_views_Calendar_vue-data_image_svg_xml_3csvg_20xmlns_27http_www_w3_org_2000_svg_27_20heigh-4a4254.js.map?v=c045649f88ded9ef28f8

View File

@ -82,6 +82,13 @@
{{ $t('calendar', 'All day') }}
</NcCheckboxRadioSwitch>
</div>
<div v-if="!isReadOnly" class="property-title-time-picker__all-day">
<NcCheckboxRadioSwitch :checked="isLeave"
@update:checked="toggleIsLeave">
{{ $t('calendar', 'Leave') }}
</NcCheckboxRadioSwitch>
</div>
</div>
</template>
@ -144,6 +151,15 @@ export default {
type: Boolean,
required: true,
},
/**
* Whether or not the event is leave
*/
isLeave: {
type: Boolean,
default: false
},
/**
* Whether or not the user can toggle the all-day property
* This is set to false, whenever this event is part of a recurrence-set
@ -296,6 +312,14 @@ export default {
this.$emit('toggle-all-day')
},
/**
* Toggles the all-day state of an event
*/
toggleIsLeave() {
debugger;
const newLeaveState = !this.isLeave;
this.$emit('toggle-is-leave',newLeaveState)
},
},
}
</script>

View File

@ -118,6 +118,15 @@ export default {
return this.calendarObjectInstance?.embalmer ?? null
},
/**
* Returns the embalmer(Thanato) or null if the event is still loading
*
* @return {string|null}
*/
isLeave() {
return this.calendarObjectInstance?.isLeave ?? false
},
/**
* Returns the comment or null if the event is still loading
*
@ -176,6 +185,15 @@ export default {
isAllDay() {
return this.calendarObjectInstance?.isAllDay ?? false
},
/**
* Returns whether or not the event is a leave
*
* @return {boolean}
*/
isLeave() {
return this.calendarObjectInstance?.isLeave ?? false
},
/**
* Returns whether or not the user is allowed to modify the all-day setting
*
@ -658,6 +676,7 @@ export default {
embalmer,
})
},
/**
* Updates the start date of this event
@ -719,6 +738,19 @@ export default {
calendarObjectInstance: this.calendarObjectInstance,
})
},
/**
* Toggles the event between all-day and timed
*/
toggleIsLeave(isLeave) {
debugger;
this.$store.commit('toggleIsLeave', {
calendarObjectInstance: this.calendarObjectInstance,
isLeave
})
},
/**
* Resets the internal state after changing the viewed calendar-object
*/

View File

@ -52,6 +52,8 @@ const getDefaultEventObject = (props = {}) => Object.assign({}, {
endTimezoneId: null,
// Indicator whether or not event is all-day
isAllDay: false,
//leave
isLeave: false,
// Whether or not the user is allowed to toggle the all-day checkbox
canModifyAllDay: true,
// Location that the event takes places in
@ -106,6 +108,7 @@ const mapEventComponentToEventObject = (eventComponent) => {
eventComponent,
title: eventComponent.title,
isAllDay: eventComponent.isAllDay(),
isLeave: false,
canModifyAllDay: eventComponent.canModifyAllDay(),
location: eventComponent.location,
client : "CLIENT",
@ -208,6 +211,10 @@ const mapEventComponentToEventObject = (eventComponent) => {
eventObject.comment = eventComponent.getFirstPropertyFirstValue('COMMENT');
}
if(eventComponent.hasProperty('ISLEAVE')){
eventObject.isLeave = eventComponent.getFirstPropertyFirstValue('ISLEAVE');
}
return eventObject;
}
@ -222,6 +229,7 @@ const copyCalendarObjectInstanceIntoEventComponent = (eventObject, eventComponen
eventComponent.location = eventObject.location
eventComponent.client = eventObject.client
eventComponent.embalmer = eventObject.embalmer
eventComponent.isLeave = eventObject.isLeave
eventComponent.comment = eventObject.comment
eventComponent.description = eventObject.description
eventComponent.accessClass = eventObject.accessClass

View File

@ -286,6 +286,19 @@ const mutations = {
}
},
/**
* Is leave
*
* @param {object} state The Vuex state
* @param {object} data The destructuring object
* @param {object} data.calendarObjectInstance The calendarObjectInstance object
*/
toggleIsLeave(state, { calendarObjectInstance, isLeave }) {
debugger;
calendarObjectInstance.eventComponent.isLeave = isLeave
calendarObjectInstance.isLeave = isLeave
},
/**
* Changes the time of a timed event to the default values
*

View File

@ -224,6 +224,7 @@ const actions = {
* @return {Promise<void>}
*/
async updateCalendarObject(context, { calendarObject }) {
debugger;
let eventComponent = calendarObject.calendarComponent.getFirstComponent('VEVENT');
if (calendarObject.existsOnServer) {
let icsValue = calendarObject.calendarComponent.toICS();
@ -254,7 +255,8 @@ const actions = {
const customKeyValue = {
"CLIENT": eventComponent.client,
"EMBALMER": eventComponent.embalmer,
"COMMENT": eventComponent.comment
"COMMENT": eventComponent.comment,
"ISLEAVE": eventComponent.isLeave ? "1" : "0",
};
icsValue = setCustomKeyValuesArrayToIcsAndReturnIcs(icsValue,customKeyValue);
}

View File

@ -93,6 +93,7 @@
:end-date="endDate"
:end-timezone="endTimezone"
:is-all-day="isAllDay"
:is-leave="isLeave"
:is-read-only="isReadOnly"
:can-modify-all-day="canModifyAllDay"
:user-timezone="currentUserTimezone"
@ -101,7 +102,8 @@
@update-start-timezone="updateStartTimezone"
@update-end-date="updateEndDate"
@update-end-timezone="updateEndTimezone"
@toggle-all-day="toggleAllDay" />
@toggle-all-day="toggleAllDay"
@toggle-is-leave="toggleIsLeave" />
<PropertySelectClient class="property-location"
url="/apps/gestion/ajaxGetClientsName"