🐛 Fix move-files allowing same project as target when multiple files selected

The 'Move to' menu in the dashboard file context menu only filtered
out the first selected file's project from the available target list.
When multiple files from different projects were selected, the other
files' projects still appeared as valid targets, causing a 400
'cant-move-to-same-project' backend error.

Now all selected files' project IDs are collected and excluded from
the available target projects.
This commit is contained in:
Andrey Antukh 2026-04-13 12:43:13 +00:00 committed by Alonso Torres
parent 18f0ad246f
commit 6c90ba1582

View File

@ -78,7 +78,8 @@
current-team (get teams current-team-id)
other-teams (remove #(= (:id %) current-team-id) (vals teams))
current-projects (remove #(= (:id %) (:project-id file))
file-project-ids (into #{} (map :project-id) files)
current-projects (remove #(contains? file-project-ids (:id %))
(:projects current-team))
on-new-tab