This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns ucv.models.user | |
(:require #?@(:clj [[datomic.api :as d] | |
[ucv.util :as util :refer [spy when-clj]]] | |
:cljs [[ucv.auth :as auth] | |
[ucv.util :as util :refer-macros [spy when-clj]]]) | |
[clojure.spec.alpha :as s] | |
[taoensso.timbre :as log] | |
[fulcro.client.primitives :as prim :refer [defsc]] | |
[ucv.util :as util] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns ucv.ui.pos-config.tax-master-detail | |
(:require | |
[fulcro-css.css :as css] | |
[fulcro.client.dom :as dom :refer [div]] | |
[fulcro.client.mutations :as m] | |
[fulcro.client.primitives :as prim :refer [defsc]] | |
[fulcro.client.routing :as r :refer [defsc-router]] | |
[fulcro.incubator.ui-state-machines :as uism :refer-macros [defstatemachine]] | |
[fulcro.ui.form-state :as fs] | |
[taoensso.timbre :as log] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Setup | |
(defmulti resolver-fn pc/resolver-dispatch) | |
(defmulti mutation-fn pc/mutation-dispatch) | |
(defonce indexes (atom {})) | |
(defonce defresolver (pc/resolver-factory resolver-fn indexes)) | |
(defonce defmutation (pc/mutation-factory mutation-fn indexes)) | |
(defn rest-parser | |
"Create a REST parser. Make sure you've required all nses that define rest resolvers. The given app-atom will be available |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn ref->ident | |
"Sometimes references on the client are actual idents and sometimes they are | |
nested maps, this function attempts to return an ident regardless." | |
[x] | |
(cond | |
(eql/ident? x) x | |
(map? x) (some #(and (= "id" (name (first %))) (into [] %)) x) | |
:else nil)) | |
(defn delta->datomic-txn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{:clojure.main/message | |
"Execution error at shadow.build/eval16057$loading (build.clj:1).\nUnable to resolve spec: :clojure.core.specs.alpha/args+body\n", | |
:clojure.main/triage | |
{:clojure.error/class java.lang.Exception, | |
:clojure.error/line 1, | |
:clojure.error/cause | |
"Unable to resolve spec: :clojure.core.specs.alpha/args+body", | |
:clojure.error/symbol shadow.build/eval16057$loading, | |
:clojure.error/source "build.clj", | |
:clojure.error/phase :execution}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns ucv.controller.parser | |
(:require | |
[cljs.core.async :as async] | |
[com.wsscode.common.async-cljs :refer [go-catch]] | |
[com.wsscode.pathom.connect :as pc] | |
[com.wsscode.pathom.core :as p] | |
[edn-query-language.core :as eql] | |
[mount.core :refer [defstate]] | |
[ucv.lib.parser :as parser-lib] | |
[taoensso.timbre :as log] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns ucv.mobile-apps.base | |
(:refer-clojure :exclude [list]) | |
(:require | |
[clojure.spec.alpha :as s] | |
["native-base" :as nb :refer [Container Header Footer FooterTab Item Input Icon Button Content | |
List ListItem CheckBox Left Body Right Label Card CardItem Segment | |
H1 H2 H3 Form Spinner Separator Picker Text Title Subtitle TextArea]] | |
["react-native-modal-datetime-picker" :default DateTimePicker] | |
["react-native" :as rn] | |
[clojure.string :as str] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns ucv.models.vehicle-capture | |
(:require | |
[cljs.core.async :as async] | |
[cljs-http.client :as http] | |
[clojure.string :as str] | |
[com.wsscode.pathom.connect :as pc] | |
[com.wsscode.common.async-cljs :refer [go-catch]] | |
[com.fulcrologic.fulcro.ui-state-machines :as uism :refer [defstatemachine]] | |
[ucv.rest-networking :refer [defresolver]] | |
[ucv.util :as util] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns ucv.lib.use-case | |
#?(:cljs (:require-macros [ucv.lib.use-case])) | |
(:require | |
[clojure.spec.alpha :as s] | |
[com.fulcrologic.fulcro.algorithms.do-not-use :as futil] | |
[taoensso.timbre :as log] | |
[com.wsscode.pathom.connect :as pc] | |
[ucv.util])) | |
(defonce pathom-registry (atom {})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmutation fill-schedule-cells | |
"Mutation: For every employee in the global list of all employees: create a row on the work schedule whose cells | |
reflect the currently-scheduled shifts, or placeholder nodes if nothing is scheduled in that cell. | |
params can include: | |
`:gc` - A list of old schedule IDs to GC before filling out the current schedule." | |
[params] | |
(action [{:keys [state]}] | |
(let [query [{:ucv.models.employee/all-employees |