make-upload-multiple-for-pj

This commit is contained in:
Narindra ezway 2025-03-26 18:21:19 +03:00
parent dd23d4ea7b
commit aaea3b1a92
40 changed files with 17415 additions and 102 deletions

View File

@ -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":"7bde6f386631234ba146","vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8":"2e0b0e8bc0e8488c397c","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"728c782d2751f8e6150a","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":"741d92f5ec54d0c1ff41","vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8":"0658eb6db50a09dd2afe","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"e0f3178442f3c9eb35e1","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=b7719d864afe6419c183
//# sourceMappingURL=calendar-appointments-booking.js.map?v=312d2cc5b7ca549a9366

File diff suppressed because one or more lines are too long

View File

@ -37516,4 +37516,4 @@ const booking = (0,_nextcloud_initial_state__WEBPACK_IMPORTED_MODULE_1__.loadSta
/******/ })()
;
//# sourceMappingURL=calendar-appointments-confirmation.js.map?v=e09415d738d19b735882
//# sourceMappingURL=calendar-appointments-confirmation.js.map?v=a2ee83495b163cb419ce

File diff suppressed because one or more lines are too long

View File

@ -37552,4 +37552,4 @@ const booking = (0,_nextcloud_initial_state__WEBPACK_IMPORTED_MODULE_1__.loadSta
/******/ })()
;
//# sourceMappingURL=calendar-appointments-conflict.js.map?v=203b5778e2275f51e478
//# sourceMappingURL=calendar-appointments-conflict.js.map?v=b617e2fd0c187cf8a3ef

File diff suppressed because one or more lines are too long

View File

@ -160605,4 +160605,4 @@ vue__WEBPACK_IMPORTED_MODULE_5__["default"].prototype.$n = _nextcloud_l10n__WEBP
/******/ })()
;
//# sourceMappingURL=calendar-appointments-overview.js.map?v=11949b799a3d070cc45a
//# sourceMappingURL=calendar-appointments-overview.js.map?v=f24398268fe4a78a6630

File diff suppressed because one or more lines are too long

View File

@ -500,4 +500,4 @@ if(false) {}
/***/ })
}]);
//# sourceMappingURL=calendar-dashboard-lazy.js.map?v=0dd354a2fd4b9e38ddcf
//# sourceMappingURL=calendar-dashboard-lazy.js.map?v=60b7f707e08fff04c7a1

File diff suppressed because one or more lines are too long

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":"7bde6f386631234ba146","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":"273df538e0dc19672feb","vendors-node_modules_nextcloud_vue-dashboard_dist_vue-dashboard_js-node_modules_css-loader_di-9e6f3d":"86eaa619747854c0da61","src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790":"7cf71b4f92d5bbc180b4","src_store_index_js":"1b6e430f087ec0dfaad7","src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258":"b5a1f8246e3d20bdaf6b","dashboard-lazy":"0dd354a2fd4b9e38ddcf","vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8":"2e0b0e8bc0e8488c397c","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"728c782d2751f8e6150a","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":"741d92f5ec54d0c1ff41","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":"01a7eb6779cc0e417f44","vendors-node_modules_nextcloud_vue-dashboard_dist_vue-dashboard_js-node_modules_css-loader_di-9e6f3d":"c2bd3081c493a88308a2","src_models_rfcProps_js-src_services_caldavService_js-src_services_talkService_js-src_services-8a2790":"7cf71b4f92d5bbc180b4","src_store_index_js":"b3c0e2be13c6c62873db","src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258":"a830e20d5af09d6855dc","dashboard-lazy":"60b7f707e08fff04c7a1","vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8":"0658eb6db50a09dd2afe","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"e0f3178442f3c9eb35e1","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=9f59da8ba9cf6ad77641
//# sourceMappingURL=calendar-dashboard.js.map?v=80c7149925c56bee9628

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

@ -369,4 +369,4 @@ module.exports = /*#__PURE__*/JSON.parse('[{"country":"Algeria","filename":"Alge
/***/ })
}]);
//# sourceMappingURL=calendar-public-calendar-subscription-picker.js.map?v=9168fca99a878d4c37e3
//# sourceMappingURL=calendar-public-calendar-subscription-picker.js.map?v=0c8b5b050db3beb63d49

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":"7bde6f386631234ba146","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":"2e0b0e8bc0e8488c397c","vendors-node_modules_vue-material-design-icons_CalendarBlankOutline_vue-node_modules_nextclou-4adead":"273df538e0dc19672feb","vendors-node_modules_autosize_dist_autosize_esm_js-node_modules_html-entities_lib_index_js-no-4072c5":"56373f2063898525e8de","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":"b5a1f8246e3d20bdaf6b","src_views_Calendar_vue-data_image_svg_xml_3csvg_20xmlns_27http_www_w3_org_2000_svg_27_20heigh-4a4254":"43b155c96a21c7810d4f","vendors-node_modules_webdav_dist_web_index_js":"454da8f908d41b47c607","src_store_index_js":"1b6e430f087ec0dfaad7","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"728c782d2751f8e6150a","node_modules_nextcloud_dialogs_dist_legacy_mjs":"8be838e4c6e9aae56c87","vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-8ibBgPg__mjs":"ea54a36450de178d1141","public-calendar-subscription-picker":"9168fca99a878d4c37e3","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":"741d92f5ec54d0c1ff41","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":"0658eb6db50a09dd2afe","vendors-node_modules_vue-material-design-icons_CalendarBlankOutline_vue-node_modules_nextclou-4adead":"01a7eb6779cc0e417f44","vendors-node_modules_autosize_dist_autosize_esm_js-node_modules_html-entities_lib_index_js-no-4072c5":"c3527b981de24f56109b","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":"a830e20d5af09d6855dc","src_views_Calendar_vue-data_image_svg_xml_3csvg_20xmlns_27http_www_w3_org_2000_svg_27_20heigh-4a4254":"4f448dc8e72eb96579fb","vendors-node_modules_webdav_dist_web_index_js":"454da8f908d41b47c607","src_store_index_js":"b3c0e2be13c6c62873db","vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f":"e0f3178442f3c9eb35e1","node_modules_nextcloud_dialogs_dist_legacy_mjs":"8be838e4c6e9aae56c87","vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-8ibBgPg__mjs":"ea54a36450de178d1141","public-calendar-subscription-picker":"0c8b5b050db3beb63d49","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=e31f7d3eba4de64ebe51
//# sourceMappingURL=calendar-reference.js.map?v=14fd5c4d36919b458223

File diff suppressed because one or more lines are too long

View File

@ -1054,4 +1054,4 @@ module.exports = "data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/sv
/***/ })
}]);
//# sourceMappingURL=calendar-src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258.js.map?v=b5a1f8246e3d20bdaf6b
//# sourceMappingURL=calendar-src_fullcalendar_eventSources_eventSourceFunction_js-src_utils_moment_js-data_image_svg_xml_3-b73258.js.map?v=a830e20d5af09d6855dc

View File

@ -8307,4 +8307,4 @@ function getLinkToConfig(key) {
/***/ })
}]);
//# sourceMappingURL=calendar-src_store_index_js.js.map?v=1b6e430f087ec0dfaad7
//# sourceMappingURL=calendar-src_store_index_js.js.map?v=b3c0e2be13c6c62873db

File diff suppressed because one or more lines are too long

View File

@ -27707,4 +27707,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=43b155c96a21c7810d4f
//# sourceMappingURL=calendar-src_views_Calendar_vue-data_image_svg_xml_3csvg_20xmlns_27http_www_w3_org_2000_svg_27_20heigh-4a4254.js.map?v=4f448dc8e72eb96579fb

View File

@ -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=56373f2063898525e8de
//# sourceMappingURL=calendar-vendors-node_modules_autosize_dist_autosize_esm_js-node_modules_html-entities_lib_index_js-no-4072c5.js.map?v=c3527b981de24f56109b

View File

@ -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=7bde6f386631234ba146
//# sourceMappingURL=calendar-vendors-node_modules_nextcloud_capabilities_dist_index_js-node_modules_nextcloud_vue-select_d-877981.js.map?v=741d92f5ec54d0c1ff41

View File

@ -27285,4 +27285,4 @@ window._registerCustomPickerElement = _;
/***/ })
}]);
//# sourceMappingURL=calendar-vendors-node_modules_nextcloud_vue-dashboard_dist_vue-dashboard_js-node_modules_css-loader_di-9e6f3d.js.map?v=86eaa619747854c0da61
//# sourceMappingURL=calendar-vendors-node_modules_nextcloud_vue-dashboard_dist_vue-dashboard_js-node_modules_css-loader_di-9e6f3d.js.map?v=c2bd3081c493a88308a2

View File

@ -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=728c782d2751f8e6150a
//# sourceMappingURL=calendar-vendors-node_modules_path-browserify_index_js-node_modules_nextcloud_dialogs_dist_chunks_Dial-e0595f.js.map?v=e0f3178442f3c9eb35e1

View File

@ -102420,4 +102420,4 @@ module.exports = /*#__PURE__*/JSON.parse('{"compressed":true,"categories":[{"id"
/***/ })
}]);
//# sourceMappingURL=calendar-vendors-node_modules_vue-material-design-icons_CalendarBlankOutline_vue-node_modules_nextclou-4adead.js.map?v=273df538e0dc19672feb
//# sourceMappingURL=calendar-vendors-node_modules_vue-material-design-icons_CalendarBlankOutline_vue-node_modules_nextclou-4adead.js.map?v=01a7eb6779cc0e417f44

View File

@ -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=2e0b0e8bc0e8488c397c
//# sourceMappingURL=calendar-vendors-node_modules_vue-material-design-icons_CalendarBlank_vue-node_modules_vue-material-de-e2c1f8.js.map?v=0658eb6db50a09dd2afe

View File

@ -119,7 +119,7 @@ class EmailBoxController extends Controller {
$order,
null,
null,
400,
100,
)
);
}
@ -130,14 +130,17 @@ class EmailBoxController extends Controller {
*
*/
public function loadEmailboxAttachement(int $messageId = 0): Response {
$data = [];
try {
$message = $this->mailManager->getMessage($this->currentUserId, $messageId);
$mailbox = $this->mailManager->getMailbox($this->currentUserId, $message->getMailboxId());
$account = $this->accountService->find($this->currentUserId, $mailbox->getAccountId());
// $data["messageObject"] = $message ?? null;
} catch (DoesNotExistException $e) {
return new JSONResponse([], Http::STATUS_FORBIDDEN);
}
$data = [];
$client = $this->clientFactory->getClient($account);
try {
$imapMessage = $this->mailManager->getImapMessage(
@ -150,7 +153,6 @@ class EmailBoxController extends Controller {
} finally {
$client->logout();
}
$data['attachments'] = array_map(function ($a) use ($messageId) {
return $this->enrichDownloadUrl(
$messageId,

View File

@ -64,14 +64,14 @@
</ul>
</div>
<NcDialog :open.sync="showOpenConfirmation"
<NcDialog :open.sync="showOpenConfirmation"
:name="t('calendar', 'Confirmation')"
:buttons="openConfirmationButtons">
<p class="external-link-message">
{{ openConfirmationMessage }}
</p>
</NcDialog>
<NcModal v-if="showModal" name="" @close="resetMailBoxModal">
<NcModal v-if="showModal" name="" size='large' @close="resetMailBoxModal">
<div class="modal__content" v-if="!showAttachmentsSection && !showAttachmentsSection">
<NcButton style="text-align: center;" @click="syncEmailBox()" v-if="!loadingDataEmailBox">
@ -84,7 +84,7 @@
<ul>
<NcListItem
@click="getAttachments(mail)"
:name="getLabelEmailBox(mail.from) + ' : ' + getSubstringText(mail.subject, 30) "
:name="getLabelEmailBox(mail.from) + ' : ' + mail.subject"
:bold="false"
counterType="outlined">
<template #subname>
@ -117,23 +117,32 @@
<div class="mailHeader">
Pièces jointes :
</div>
<div class="image-list-attachement " v-if="!loadingDataEmailBox && mailAttachments.length > 0" v-for="attachment in mailAttachments">
<div v-if="attachment.isImage" class="image-item-attachement " @click="pickEmailAttachement(attachment)">
<div class="image-list-attachement " v-if="!loadingDataEmailBox && mailAttachmentData.length > 0" v-for="attachment in mailAttachmentData">
<div v-if="attachment.isImage" class="image-item-attachement " @click="selectAttachement(attachment.id)">
<img :src="attachment.downloadUrl" :alt="attachment.fileName ">
<label>{{ attachment.fileName }}</label>
<label>{{ attachment.fileName }} <span v-if="isInSelectedAttachment(attachment.id)"> </span> </label>
</div>
<div v-else-if="! attachment.isImage && !attachment.isCalendarEvent" class="image-item-attachement " @click="pickEmailAttachement(attachment)">
<label>{{ attachment.fileName }}</label>
<div v-else-if="! attachment.isImage && !attachment.isCalendarEvent" class="image-item-attachement " @click="selectAttachement(attachment.id)">
<label>{{ attachment.fileName }}
<span v-if="isInSelectedAttachment(attachment.id)"> </span>
</label>
</div>
<div v-else-if="attachment.isCalendarEvent" class="image-item-attachement " >
<label>{{ attachment.fileName }} ( Non allouée)</label>
</div>
</div>
<template v-if="!mailAttachments.length && !loadingDataEmailBox" >
<template v-if="!mailAttachmentData.length && !loadingDataEmailBox" >
<p> Pas d'attachements</p>
</template>
</ul>
</div>
<div class="modal__content" v-if="selectedAttachements.length && !loadingDataEmailBox" >
<NcButton style="text-align: center;" @click="pickEmailAttachement()" >
Ajouter ({{ selectedAttachements.length }})
</NcButton>
</div>
<div class="modal__content" v-if="loadingDataEmailBox" >
<div >
@ -155,6 +164,7 @@ import {
NcButton,
NcAvatar,
NcLoadingIcon,
NcCheckboxRadioSwitch
} from '@nextcloud/vue'
import axios from "@nextcloud/axios";
@ -177,6 +187,7 @@ import {
uploadRemoteFile
} from '../../../services/attachmentService.js'
import { parseXML } from 'webdav'
import { size } from 'lodash';
export default {
name: 'AttachmentsList',
@ -196,7 +207,8 @@ export default {
ArrowLeft,
Reload,
NcAvatar,
NcLoadingIcon
NcLoadingIcon,
NcCheckboxRadioSwitch
},
props: {
calendarObjectInstance: {
@ -218,7 +230,8 @@ export default {
showAttachmentsSection: false,
loadingDataEmailBox: false,
mailBoxData: [],
mailAttachments: [],
mailAttachmentData: [],
selectedAttachements: [],
loadingText: 'Chargement ...',
selectedMail: null
}
@ -375,20 +388,41 @@ export default {
this.selectedMail = mail
this.loadingDataEmailBox = true
this.showAttachmentsSection = true
this.mailAttachments = [] ;
this.mailAttachmentData = [] ;
await this.loadAttachments(mail)
this.loadingDataEmailBox = false
},
async pickEmailAttachement(attachement){
selectAttachement(attachementId){
if(this.isInSelectedAttachment(attachementId)){
console.log("remove")
this.selectedAttachements = this.selectedAttachements.filter(id => id !== attachementId)
}else{
console.log("add")
this.selectedAttachements.push(attachementId)
}
},
isInSelectedAttachment(attachementId){
return this.selectedAttachements.find(id => id === attachementId)
},
async pickEmailAttachement(){
this.loadingText = 'Ajout de l\'attachement encours ...'
this.loadingDataEmailBox = true
await this.pickEmailAttachementTodavFile(attachement)
//upload only attachmen if id is in selectedAttachements
const selectedAttachements = this.selectedAttachements.map(id => this.mailAttachmentData.find(attachement => attachement.id === id))
await this.uploadAttachment(selectedAttachements)
this.closeMailBoxModal()
this.resetMailBoxModal()
},
async uploadAttachment(attachements = []){
await Promise.all(attachements.map(async attachement => {
await this.uploadEmailAttachementTodavFile(attachement)
}))
},
resetMailBoxModal() {
this.mailBoxData = []
this.mailAttachments = []
this.mailAttachmentData = []
this.showModal = false
this.showAttachmentsSection = false
this.loadingDataEmailBox = false
@ -424,23 +458,34 @@ export default {
})
},
async loadAttachments(mail) {
if (!this.hasAttachements(mail)) {
this.mailAttachments = [] ;
this.loadingDataEmailBox = false
return;
}
// if (!this.hasAttachements(mail)) {
// this.mailAttachmentData = [] ;
// this.loadingDataEmailBox = false
// return;
// }
const ajaxUrl = generateUrl('/apps/calendar/load-email-attachement/' + mail.databaseId)
await axios.get(ajaxUrl)
.then(response => {
console.log(response.data)
this.mailAttachments = response.data.attachments
// response.data.attachments.forEach(attachement => {
// this.mailAttachmentData.push({
// id : attachement.id,
// fileName : attachement.fileName,
// downloadUrl : attachement.downloadUrl,
// id : attachement.id,
// isImage : attachement.isImage,
// isCalendarEvent : attachement.isCalendarEvent,
// size : attachement.size,
// })
// })
this.mailAttachmentData = response.data.attachments
})
.catch(error => {
console.log(error)
})
},
async pickEmailAttachementTodavFile(attachement) {
async uploadEmailAttachementTodavFile(attachement) {
const attachmentsFolder = await this.$store.dispatch('createAttachmentsFolder')
const attachment = await uploadRemoteFile(attachmentsFolder, attachement.downloadUrl, attachement.fileName ,this.currentUser.dav)
// TODO do not share file, move to PHP

View File

@ -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

View File

@ -2904,7 +2904,7 @@ class PageController extends Controller {
return $this->myDb->getClientGroupFacturations();
}
/**
/**
* @NoAdminRequired
* @NoCSRFRequired
*
@ -2913,6 +2913,11 @@ class PageController extends Controller {
return $this->myDb->createDefaultGroupFacturation();
}
/**
* @NoAdminRequired
* @NoCSRFRequired
*
*/
public function getUserTypeByUserUuid($userUuid){
try{
return json_encode(value: $this->myDb->getUserTypeByUserUuid($userUuid));