Merge branch 'fixes/fix-is-private-error' into releases/release-h2f

This commit is contained in:
Tiavina 2025-03-26 15:41:25 +03:00
commit 79c2a1f423
3 changed files with 14 additions and 14 deletions

View File

@ -14021,7 +14021,7 @@ __webpack_require__.r(__webpack_exports__);
* *
* @return {boolean} * @return {boolean}
*/ */
isPrivate() { checkIsPrivate() {
return this.calendarObjectInstance.attendees.filter(attendee => { return this.calendarObjectInstance.attendees.filter(attendee => {
if (this.currentUser.emailAddress.toLowerCase() !== (attendee.uri.split('mailto:').length === 2 ? attendee.uri.split('mailto:')[1].toLowerCase() : attendee.uri.toLowerCase())) { if (this.currentUser.emailAddress.toLowerCase() !== (attendee.uri.split('mailto:').length === 2 ? attendee.uri.split('mailto:')[1].toLowerCase() : attendee.uri.toLowerCase())) {
return attendee; return attendee;
@ -14039,7 +14039,7 @@ __webpack_require__.r(__webpack_exports__);
if (!this.doNotShare) { if (!this.doNotShare) {
const total = this.showModalNewAttachments.length; const total = this.showModalNewAttachments.length;
this.showPreloader = true; this.showPreloader = true;
if (!this.isPrivate()) { if (!this.checkIsPrivate()) {
this.showModalNewAttachments.map(async (attachment, i) => { this.showModalNewAttachments.map(async (attachment, i) => {
// console.log('Add share', attachment) // console.log('Add share', attachment)
this.sharedProgress = Math.ceil(100 * (i + 1) / total); this.sharedProgress = Math.ceil(100 * (i + 1) / total);
@ -14100,10 +14100,10 @@ __webpack_require__.r(__webpack_exports__);
const newAttachments = this.calendarObjectInstance.attachments.filter(attachment => { const newAttachments = this.calendarObjectInstance.attachments.filter(attachment => {
// get only new attachments // get only new attachments
// TODO get NOT only new attachments =) Maybe we should filter all attachments without share-type, 'cause event can be private and AFTER save owner could add new participant // TODO get NOT only new attachments =) Maybe we should filter all attachments without share-type, 'cause event can be private and AFTER save owner could add new participant
return !this.isPrivate() ? attachment.isNew && attachment.shareTypes === null : attachment.isNew && attachment.shareTypes !== null; return !this.checkIsPrivate() ? attachment.isNew && attachment.shareTypes === null : attachment.isNew && attachment.shareTypes !== null;
}); });
// if there are new attachment and event not saved // if there are new attachment and event not saved
if (newAttachments.length > 0 && !this.isPrivate()) { if (newAttachments.length > 0 && !this.checkIsPrivate()) {
// and is event NOT private, // and is event NOT private,
// then add share to each attachment // then add share to each attachment
// only if attachment['share-types'] is null or empty // only if attachment['share-types'] is null or empty
@ -22530,7 +22530,7 @@ var render = function render() {
"calendar-object-instance": _vm.calendarObjectInstance, "calendar-object-instance": _vm.calendarObjectInstance,
"is-read-only": _vm.isReadOnly "is-read-only": _vm.isReadOnly
} }
}) : _vm._e(), _vm._v(" "), _vm.showModal && !_vm.isPrivate() ? _c("NcModal", { }) : _vm._e(), _vm._v(" "), _vm.showModal && !_vm.checkIsPrivate() ? _c("NcModal", {
attrs: { attrs: {
name: _vm.t("calendar", "Managing shared access") name: _vm.t("calendar", "Managing shared access")
}, },
@ -22575,7 +22575,7 @@ var render = function render() {
staticClass: "modal-footer" staticClass: "modal-footer"
}, [_c("div", { }, [_c("div", {
staticClass: "modal-footer-checkbox" staticClass: "modal-footer-checkbox"
}, [!_vm.isPrivate() ? _c("NcCheckboxRadioSwitch", { }, [!_vm.checkIsPrivate() ? _c("NcCheckboxRadioSwitch", {
attrs: { attrs: {
checked: _vm.doNotShare checked: _vm.doNotShare
}, },
@ -311355,4 +311355,4 @@ appointmentsConfigsStore.addInitialConfigs((0,_nextcloud_initial_state__WEBPACK_
/******/ })() /******/ })()
; ;
//# sourceMappingURL=calendar-main.js.map?v=37f16ab51a09537987f3 //# sourceMappingURL=calendar-main.js.map?v=7c42e923244c0d5df51c

File diff suppressed because one or more lines are too long

View File

@ -201,7 +201,7 @@
:calendar-object-instance="calendarObjectInstance" :calendar-object-instance="calendarObjectInstance"
:is-read-only="isReadOnly" /> :is-read-only="isReadOnly" />
<NcModal v-if="showModal && !isPrivate()" <NcModal v-if="showModal && !checkIsPrivate()"
:name="t('calendar', 'Managing shared access')" :name="t('calendar', 'Managing shared access')"
@close="closeAttachmentsModal"> @close="closeAttachmentsModal">
<div class="modal-content"> <div class="modal-content">
@ -232,7 +232,7 @@
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<div class="modal-footer-checkbox"> <div class="modal-footer-checkbox">
<NcCheckboxRadioSwitch v-if="!isPrivate()" :checked.sync="doNotShare"> <NcCheckboxRadioSwitch v-if="!checkIsPrivate()" :checked.sync="doNotShare">
{{ t('calendar', 'Deny access') }} {{ t('calendar', 'Deny access') }}
</NcCheckboxRadioSwitch> </NcCheckboxRadioSwitch>
</div> </div>
@ -552,7 +552,7 @@ export default {
* *
* @return {boolean} * @return {boolean}
*/ */
isPrivate() { checkIsPrivate() {
return this.calendarObjectInstance.attendees.filter((attendee) => { return this.calendarObjectInstance.attendees.filter((attendee) => {
if (this.currentUser.emailAddress.toLowerCase() !== ( if (this.currentUser.emailAddress.toLowerCase() !== (
attendee.uri.split('mailto:').length === 2 attendee.uri.split('mailto:').length === 2
@ -576,7 +576,7 @@ export default {
if (!this.doNotShare) { if (!this.doNotShare) {
const total = this.showModalNewAttachments.length const total = this.showModalNewAttachments.length
this.showPreloader = true this.showPreloader = true
if (!this.isPrivate()) { if (!this.checkIsPrivate()) {
this.showModalNewAttachments.map(async (attachment, i) => { this.showModalNewAttachments.map(async (attachment, i) => {
// console.log('Add share', attachment) // console.log('Add share', attachment)
this.sharedProgress = Math.ceil(100 * (i + 1) / total) this.sharedProgress = Math.ceil(100 * (i + 1) / total)
@ -638,10 +638,10 @@ export default {
const newAttachments = this.calendarObjectInstance.attachments.filter(attachment => { const newAttachments = this.calendarObjectInstance.attachments.filter(attachment => {
// get only new attachments // get only new attachments
// TODO get NOT only new attachments =) Maybe we should filter all attachments without share-type, 'cause event can be private and AFTER save owner could add new participant // TODO get NOT only new attachments =) Maybe we should filter all attachments without share-type, 'cause event can be private and AFTER save owner could add new participant
return !this.isPrivate() ? attachment.isNew && attachment.shareTypes === null : attachment.isNew && attachment.shareTypes !== null return !this.checkIsPrivate() ? attachment.isNew && attachment.shareTypes === null : attachment.isNew && attachment.shareTypes !== null
}) })
// if there are new attachment and event not saved // if there are new attachment and event not saved
if (newAttachments.length > 0 && !this.isPrivate()) { if (newAttachments.length > 0 && !this.checkIsPrivate()) {
// and is event NOT private, // and is event NOT private,
// then add share to each attachment // then add share to each attachment
// only if attachment['share-types'] is null or empty // only if attachment['share-types'] is null or empty