refactor: rename isPrivate to checkIsPrivate for clarity
This commit is contained in:
parent
1df4ebcc53
commit
3ec7a8f401
@ -14021,7 +14021,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
*
|
||||
* @return {boolean}
|
||||
*/
|
||||
isPrivate() {
|
||||
checkIsPrivate() {
|
||||
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())) {
|
||||
return attendee;
|
||||
@ -14039,7 +14039,7 @@ __webpack_require__.r(__webpack_exports__);
|
||||
if (!this.doNotShare) {
|
||||
const total = this.showModalNewAttachments.length;
|
||||
this.showPreloader = true;
|
||||
if (!this.isPrivate()) {
|
||||
if (!this.checkIsPrivate()) {
|
||||
this.showModalNewAttachments.map(async (attachment, i) => {
|
||||
// console.log('Add share', attachment)
|
||||
this.sharedProgress = Math.ceil(100 * (i + 1) / total);
|
||||
@ -14100,10 +14100,10 @@ __webpack_require__.r(__webpack_exports__);
|
||||
const newAttachments = this.calendarObjectInstance.attachments.filter(attachment => {
|
||||
// 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
|
||||
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 (newAttachments.length > 0 && !this.isPrivate()) {
|
||||
if (newAttachments.length > 0 && !this.checkIsPrivate()) {
|
||||
// and is event NOT private,
|
||||
// then add share to each attachment
|
||||
// only if attachment['share-types'] is null or empty
|
||||
@ -22530,7 +22530,7 @@ var render = function render() {
|
||||
"calendar-object-instance": _vm.calendarObjectInstance,
|
||||
"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: {
|
||||
name: _vm.t("calendar", "Managing shared access")
|
||||
},
|
||||
@ -22575,7 +22575,7 @@ var render = function render() {
|
||||
staticClass: "modal-footer"
|
||||
}, [_c("div", {
|
||||
staticClass: "modal-footer-checkbox"
|
||||
}, [!_vm.isPrivate() ? _c("NcCheckboxRadioSwitch", {
|
||||
}, [!_vm.checkIsPrivate() ? _c("NcCheckboxRadioSwitch", {
|
||||
attrs: {
|
||||
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
@ -201,7 +201,7 @@
|
||||
:calendar-object-instance="calendarObjectInstance"
|
||||
:is-read-only="isReadOnly" />
|
||||
|
||||
<NcModal v-if="showModal && !isPrivate()"
|
||||
<NcModal v-if="showModal && !checkIsPrivate()"
|
||||
:name="t('calendar', 'Managing shared access')"
|
||||
@close="closeAttachmentsModal">
|
||||
<div class="modal-content">
|
||||
@ -232,7 +232,7 @@
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="modal-footer-checkbox">
|
||||
<NcCheckboxRadioSwitch v-if="!isPrivate()" :checked.sync="doNotShare">
|
||||
<NcCheckboxRadioSwitch v-if="!checkIsPrivate()" :checked.sync="doNotShare">
|
||||
{{ t('calendar', 'Deny access') }}
|
||||
</NcCheckboxRadioSwitch>
|
||||
</div>
|
||||
@ -552,7 +552,7 @@ export default {
|
||||
*
|
||||
* @return {boolean}
|
||||
*/
|
||||
isPrivate() {
|
||||
checkIsPrivate() {
|
||||
return this.calendarObjectInstance.attendees.filter((attendee) => {
|
||||
if (this.currentUser.emailAddress.toLowerCase() !== (
|
||||
attendee.uri.split('mailto:').length === 2
|
||||
@ -576,7 +576,7 @@ export default {
|
||||
if (!this.doNotShare) {
|
||||
const total = this.showModalNewAttachments.length
|
||||
this.showPreloader = true
|
||||
if (!this.isPrivate()) {
|
||||
if (!this.checkIsPrivate()) {
|
||||
this.showModalNewAttachments.map(async (attachment, i) => {
|
||||
// console.log('Add share', attachment)
|
||||
this.sharedProgress = Math.ceil(100 * (i + 1) / total)
|
||||
@ -638,10 +638,10 @@ export default {
|
||||
const newAttachments = this.calendarObjectInstance.attachments.filter(attachment => {
|
||||
// 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
|
||||
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 (newAttachments.length > 0 && !this.isPrivate()) {
|
||||
if (newAttachments.length > 0 && !this.checkIsPrivate()) {
|
||||
// and is event NOT private,
|
||||
// then add share to each attachment
|
||||
// only if attachment['share-types'] is null or empty
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user