Changes
Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
co-authored by
renee-png
parent
b821dd6256
commit
5ddf8f6d78
@@ -389,8 +389,9 @@ export function CaseDocumentsTab({ caseId }: { caseId: string }) {
|
||||
);
|
||||
})();
|
||||
|
||||
const performMove = async () => {
|
||||
const dest = moveDest; // "" = root
|
||||
const performMove = async (destArg?: string) => {
|
||||
const raw = destArg ?? moveDest;
|
||||
const dest = raw === "__root__" ? "" : raw; // "" = root
|
||||
// Move folders
|
||||
for (const full of selectedFolders) {
|
||||
const name = full.split("/").pop() || full;
|
||||
@@ -648,11 +649,7 @@ export function CaseDocumentsTab({ caseId }: { caseId: string }) {
|
||||
<div className="flex justify-end gap-2 pt-2">
|
||||
<Button variant="ghost" onClick={() => setMoveOpen(false)}>Cancel</Button>
|
||||
<Button
|
||||
onClick={() => {
|
||||
// SelectItem cannot have empty value; map sentinel back to ""
|
||||
if (moveDest === "__root__") setMoveDest("");
|
||||
performMove();
|
||||
}}
|
||||
onClick={() => performMove(moveDest)}
|
||||
disabled={!moveDest}
|
||||
>
|
||||
Move
|
||||
|
||||
Reference in New Issue
Block a user