Skip to content

Instantly share code, notes, and snippets.

@dark4eg
Last active December 30, 2015 17:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dark4eg/d7dc2364606fae3fb435 to your computer and use it in GitHub Desktop.
Save dark4eg/d7dc2364606fae3fb435 to your computer and use it in GitHub Desktop.
(defui B
static om/IQueryParams
(params [this]
{:paging-skip 0
:paging-take 5
:sort-keys [:promo/name :inspection/promo]
:sort-type :asc})
static om/IQuery
(query [this]
'[:inspection.list/outlet {:paging {:skip ?paging-skip
:take ?paging-take}
:filters {}
:sorting {:keys ?sort-keys
:type ?sort-type}}]))
(defui A
static om/IQueryParams
(params [this]
{:page (:index route->url)
:paging-skip 0
:paging-take 5
:filter-unverified true
:filter-partials true
:filter-full true
:filter-distributor []
:filter-employeer []
:filter-outlet []
:filter-promo []
:sort-keys [:promo/name :inspection/promo]
:sort-type :asc})
static om/IQuery
(query [this]
`[:app/title
:user/current
:route/current
:route/list
:view/state
:user/children
:inspection.target/current
(:employee/list {:paging {:skip 0
:take 0}})
(:outlet/list {:paging {:skip 0
:take 0}})
(:inspection.list/outlet ~(om/get-query B)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment