Web: Files: fixed sharing panel selected options
This commit is contained in:
parent
bcd8e1915e
commit
4b89f35538
@ -104,12 +104,20 @@ class SharingPanelComponent extends React.Component {
|
|||||||
share.push({ shareTo: item.id, access: 0});
|
share.push({ shareTo: item.id, access: 0});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let item of selectedItems) {
|
if (!selectedItems.length) {
|
||||||
if (item.fileExst) {
|
if (selectedItems.fileExst) {
|
||||||
fileIds.push(item.id);
|
fileIds.push(selectedItems.id);
|
||||||
} else {
|
} else {
|
||||||
folderIds.push(item.id);
|
folderIds.push(selectedItems.id);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (let item of selectedItems) {
|
||||||
|
if (item.fileExst) {
|
||||||
|
fileIds.push(item.id);
|
||||||
|
} else {
|
||||||
|
folderIds.push(item.id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -310,7 +310,6 @@ export function setShareFolder(folderId, share, notify, sharingMessage) {
|
|||||||
|
|
||||||
export function setShareFiles(fileId, share, notify, sharingMessage) {
|
export function setShareFiles(fileId, share, notify, sharingMessage) {
|
||||||
const data = { share, notify, sharingMessage };
|
const data = { share, notify, sharingMessage };
|
||||||
console.log("data", data);
|
|
||||||
return request({ method: "put", url: `/files/file/${fileId}/share`, data });
|
return request({ method: "put", url: `/files/file/${fileId}/share`, data });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user