mirror of
https://github.com/penpot/penpot.git
synced 2026-09-18 18:06:14 +00:00
Merge pull request #8147 from penpot/niwinz-staging-file-menu-issue
✨ Use correct team-id on file-menu on dashboard
This commit is contained in:
commit
a3fdd8b691
@ -193,11 +193,11 @@
|
|||||||
restore-fn
|
restore-fn
|
||||||
(fn [_]
|
(fn [_]
|
||||||
(st/emit! (dd/restore-files-immediately
|
(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)}
|
:ids (into #{} d/xf:map-id files)}
|
||||||
{:on-success #(st/emit! (ntf/success (tr "dashboard.restore-success-notification" (:name file)))
|
{:on-success #(st/emit! (ntf/success (tr "dashboard.restore-success-notification" (:name file)))
|
||||||
(dd/fetch-projects (:id current-team))
|
(dd/fetch-projects current-team-id)
|
||||||
(dd/fetch-deleted-files (:id current-team)))
|
(dd/fetch-deleted-files current-team-id))
|
||||||
:on-error #(st/emit! (ntf/error (tr "dashboard.errors.error-on-restore-file" (:name file))))}))))
|
:on-error #(st/emit! (ntf/error (tr "dashboard.errors.error-on-restore-file" (:name file))))}))))
|
||||||
|
|
||||||
on-restore-immediately
|
on-restore-immediately
|
||||||
@ -214,7 +214,7 @@
|
|||||||
on-delete-immediately
|
on-delete-immediately
|
||||||
(fn []
|
(fn []
|
||||||
(let [accept-fn #(st/emit! (dd/delete-files-immediately
|
(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)}))]
|
:ids (into #{} d/xf:map-id files)}))]
|
||||||
(st/emit!
|
(st/emit!
|
||||||
(modal/show {:type :confirm
|
(modal/show {:type :confirm
|
||||||
@ -244,8 +244,7 @@
|
|||||||
(for [project current-projects]
|
(for [project current-projects]
|
||||||
{:name (get-project-name project)
|
{:name (get-project-name project)
|
||||||
:id (get-project-id project)
|
:id (get-project-id project)
|
||||||
:handler (on-move (:id current-team)
|
:handler (on-move current-team-id (:id project))})
|
||||||
(:id project))})
|
|
||||||
(when (seq other-teams)
|
(when (seq other-teams)
|
||||||
[{:name (tr "dashboard.move-to-other-team")
|
[{:name (tr "dashboard.move-to-other-team")
|
||||||
:id "move-to-other-team"
|
:id "move-to-other-team"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user