mirror of
https://github.com/penpot/penpot.git
synced 2025-01-09 16:30:37 -05:00
Merge pull request #4405 from penpot/niwinz-staging-bugfix-7
🐛 Fix incorrect team features handling on onboarding team creation
This commit is contained in:
commit
7d4b2b1bb7
3 changed files with 13 additions and 8 deletions
|
@ -869,7 +869,12 @@
|
|||
::sm/params schema:create-team-with-invitations}
|
||||
[{:keys [::db/pool] :as cfg} {:keys [::rpc/profile-id emails role] :as params}]
|
||||
(db/with-atomic [conn pool]
|
||||
(let [params (assoc params :profile-id profile-id)
|
||||
|
||||
(let [features (-> (cfeat/get-enabled-features cf/flags)
|
||||
(cfeat/check-client-features! (:features params)))
|
||||
params (assoc params
|
||||
:profile-id profile-id
|
||||
:features features)
|
||||
cfg (assoc cfg ::db/conn conn)
|
||||
team (create-team cfg params)
|
||||
profile (db/get-by-id conn :profile profile-id)
|
||||
|
|
|
@ -425,11 +425,11 @@
|
|||
(let [{:keys [on-success on-error]
|
||||
:or {on-success identity
|
||||
on-error rx/throw}} (meta params)
|
||||
features (features/get-enabled-features state)]
|
||||
params {:name name
|
||||
:emails #{emails}
|
||||
:role role
|
||||
:features features}
|
||||
features (features/get-enabled-features state)
|
||||
params {:name name
|
||||
:emails emails
|
||||
:role role
|
||||
:features features}]
|
||||
(->> (rp/cmd! :create-team-with-invitations params)
|
||||
(rx/tap on-success)
|
||||
(rx/map team-created)
|
||||
|
|
|
@ -154,7 +154,7 @@
|
|||
params (:clean-data @form)
|
||||
emails (:emails params)
|
||||
|
||||
roles (mf/use-memo #(get-available-roles))
|
||||
roles (mf/use-memo get-available-roles)
|
||||
|
||||
on-success
|
||||
(mf/use-fn
|
||||
|
@ -168,7 +168,7 @@
|
|||
|
||||
on-error
|
||||
(mf/use-fn
|
||||
(fn [_form _response]
|
||||
(fn [_form _cause]
|
||||
(st/emit! (msg/error "Error on creating team."))))
|
||||
|
||||
;; The SKIP branch only creates the team, without invitations
|
||||
|
|
Loading…
Reference in a new issue