From b6a9579c98121898a823e4f96c9bb96630d59f93 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 21 Jan 2026 12:23:44 +0100 Subject: [PATCH] :sparkles: Use correct team-id on file-menu on dashboard Before the changes on this commit, the team object is used for retrieve the id, where we already have team-id. Additionally, the team object resolution is async operation and is not available on the first render which causes strange issues on automated flows (playwright) where an option is clicked when the async flow is still pending and we have no team object loaded. --- frontend/src/app/main/ui/dashboard/file_menu.cljs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/frontend/src/app/main/ui/dashboard/file_menu.cljs b/frontend/src/app/main/ui/dashboard/file_menu.cljs index 85b3dc2ac8..c2e825c2a5 100644 --- a/frontend/src/app/main/ui/dashboard/file_menu.cljs +++ b/frontend/src/app/main/ui/dashboard/file_menu.cljs @@ -193,11 +193,11 @@ restore-fn (fn [_] (st/emit! (dd/restore-files-immediately - (with-meta {:team-id (:id current-team) + (with-meta {:team-id current-team-id :ids (into #{} d/xf:map-id files)} {:on-success #(st/emit! (ntf/success (tr "dashboard.restore-success-notification" (:name file))) - (dd/fetch-projects (:id current-team)) - (dd/fetch-deleted-files (:id current-team))) + (dd/fetch-projects current-team-id) + (dd/fetch-deleted-files current-team-id)) :on-error #(st/emit! (ntf/error (tr "dashboard.errors.error-on-restore-file" (:name file))))})))) on-restore-immediately @@ -214,7 +214,7 @@ on-delete-immediately (fn [] (let [accept-fn #(st/emit! (dd/delete-files-immediately - {:team-id (:id current-team) + {:team-id current-team-id :ids (into #{} d/xf:map-id files)}))] (st/emit! (modal/show {:type :confirm @@ -244,8 +244,7 @@ (for [project current-projects] {:name (get-project-name project) :id (get-project-id project) - :handler (on-move (:id current-team) - (:id project))}) + :handler (on-move current-team-id (:id project))}) (when (seq other-teams) [{:name (tr "dashboard.move-to-other-team") :id "move-to-other-team"