0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 08:50:57 -05:00

Integrate workspace and dashboard pages with backend (initial data loading).

This does not includes any crud methods.
This commit is contained in:
Andrey Antukh 2016-03-15 20:59:33 +02:00
parent 7494d4936d
commit 5a49b88c60
2 changed files with 8 additions and 2 deletions

View file

@ -7,6 +7,7 @@
[uxbox.ui.mixins :as mx]
[uxbox.util.dom :as dom]
[uxbox.data.dashboard :as dd]
[uxbox.data.projects :as dp]
[uxbox.ui.messages :as uum]
[uxbox.ui.library-bar :as ui.library-bar]
[uxbox.ui.dashboard.header :refer (header)]
@ -31,7 +32,9 @@
(defn projects-page-will-mount
[own]
(rs/emit! (dd/initialize :dashboard/projects))
(rs/emit! (dd/initialize :dashboard/projects)
(dp/load-projects)
(dp/load-pages))
own)
(defn projects-page-transfer-state

View file

@ -6,6 +6,7 @@
[uxbox.rstore :as rs]
[uxbox.state :as st]
[uxbox.data.workspace :as dw]
[uxbox.data.projects :as dp]
[uxbox.util.geom.point :as gpt]
[uxbox.util.data :refer (classnames)]
[uxbox.ui.core :as uuc]
@ -66,7 +67,9 @@
(defn- workspace-will-mount
[own]
(let [[projectid pageid] (:rum/props own)]
(rs/emit! (dw/initialize projectid pageid))
(rs/emit! (dw/initialize projectid pageid)
(dp/load-projects)
(dp/load-pages))
own))
(defn- workspace-did-mount