feat(grfn/bbbg): Add checks edit form styling
Change-Id: I2b965412434002c2739dfeaa733dab408916dba1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4634 Reviewed-by: grfn <grfn@gws.fyi> Autosubmit: grfn <grfn@gws.fyi> Tested-by: BuildkiteCI
This commit is contained in:
parent
f7d6ad1cea
commit
800eba4cca
3 changed files with 38 additions and 9 deletions
|
@ -12,15 +12,16 @@
|
||||||
|
|
||||||
(defn- edit-attendee-checks-page [{:keys [existing-check]
|
(defn- edit-attendee-checks-page [{:keys [existing-check]
|
||||||
attendee-id ::attendee/id}]
|
attendee-id ::attendee/id}]
|
||||||
[:div
|
[:div.page
|
||||||
(when existing-check
|
(when existing-check
|
||||||
[:p
|
[:p
|
||||||
"Already checked on "
|
"Already checked on "
|
||||||
(-> existing-check ::attendee-check/checked-at format-date)
|
(-> existing-check ::attendee-check/checked-at format-date)
|
||||||
" by "
|
" by "
|
||||||
(::user/username existing-check)])
|
(::user/username existing-check)])
|
||||||
[:form {:method :post
|
[:form.attendee-checks-form
|
||||||
:action (str "/attendees/" attendee-id "/checks")}
|
{:method :post
|
||||||
|
:action (str "/attendees/" attendee-id "/checks")}
|
||||||
[:div.form-group
|
[:div.form-group
|
||||||
[:label
|
[:label
|
||||||
"Last Dose"
|
"Last Dose"
|
||||||
|
|
|
@ -49,12 +49,15 @@
|
||||||
[:td (:events-attended attendee)]
|
[:td (:events-attended attendee)]
|
||||||
[:td (:no-shows attendee)]
|
[:td (:no-shows attendee)]
|
||||||
(if-let [last-check (:last-check attendee)]
|
(if-let [last-check (:last-check attendee)]
|
||||||
[:td (str (-> last-check
|
[:td (str "✔️ "(-> last-check
|
||||||
::attendee-check/checked-at
|
::attendee-check/checked-at
|
||||||
format-date)
|
format-date)
|
||||||
", by "
|
", by "
|
||||||
(get-in last-check [:user ::user/username]))]
|
(get-in last-check [:user ::user/username]))]
|
||||||
[:td "Not Checked"
|
[:td
|
||||||
|
[:span {:title "Not Checked"}
|
||||||
|
"❌"]
|
||||||
|
" "
|
||||||
[:a {:href (str "/attendees/" id "/checks/edit")}
|
[:a {:href (str "/attendees/" id "/checks/edit")}
|
||||||
"Edit"]])
|
"Edit"]])
|
||||||
(if (= edit-notes id)
|
(if (= edit-notes id)
|
||||||
|
|
|
@ -99,8 +99,7 @@
|
||||||
[:.search-form
|
[:.search-form
|
||||||
{:display :flex
|
{:display :flex
|
||||||
:flex-direction :row
|
:flex-direction :row
|
||||||
:width "100%"
|
:width "100%"}
|
||||||
:padding "0 1rem"}
|
|
||||||
|
|
||||||
[:>*+*
|
[:>*+*
|
||||||
{:margin-left "0.75rem"}]
|
{:margin-left "0.75rem"}]
|
||||||
|
@ -163,7 +162,24 @@
|
||||||
:color :white
|
:color :white
|
||||||
:box-shadow :none}
|
:box-shadow :none}
|
||||||
[(& :a)
|
[(& :a)
|
||||||
{:text-decoration :none}]]])
|
{:text-decoration :none}]]]
|
||||||
|
|
||||||
|
[:label
|
||||||
|
{:font-weight 600
|
||||||
|
:width "100%"}
|
||||||
|
|
||||||
|
[:input
|
||||||
|
{:font-weight "initial"
|
||||||
|
:margin-top "0.3rem"}]]
|
||||||
|
|
||||||
|
[:.form-group
|
||||||
|
{:display :flex
|
||||||
|
:margin-bottom "0.8rem"
|
||||||
|
:flex-direction :column}
|
||||||
|
|
||||||
|
[(attr= "type" "submit")
|
||||||
|
{:text-align :right
|
||||||
|
:align-self :flex-end}]])
|
||||||
|
|
||||||
(defstyles tables
|
(defstyles tables
|
||||||
[:table
|
[:table
|
||||||
|
@ -261,6 +277,12 @@
|
||||||
[:.hidden
|
[:.hidden
|
||||||
{:display :none}])
|
{:display :none}])
|
||||||
|
|
||||||
|
(defstyles attendees
|
||||||
|
[:.attendee-checks-form
|
||||||
|
{:max-width "340px"
|
||||||
|
:margin-left "auto"
|
||||||
|
:margin-right "auto"}])
|
||||||
|
|
||||||
(defstyles styles
|
(defstyles styles
|
||||||
forms
|
forms
|
||||||
tables
|
tables
|
||||||
|
@ -270,6 +292,7 @@
|
||||||
flash
|
flash
|
||||||
home-page
|
home-page
|
||||||
signup-page
|
signup-page
|
||||||
|
attendees
|
||||||
|
|
||||||
[:body
|
[:body
|
||||||
{:color black}]
|
{:color black}]
|
||||||
|
@ -281,7 +304,9 @@
|
||||||
:width "100%"}]
|
:width "100%"}]
|
||||||
|
|
||||||
[:.page
|
[:.page
|
||||||
{:margin-top "1rem"}
|
{:margin-top "1rem"
|
||||||
|
:margin-left "1rem"
|
||||||
|
:margin-right "1rem"}
|
||||||
|
|
||||||
(not-mobile
|
(not-mobile
|
||||||
{:width content-width
|
{:width content-width
|
||||||
|
|
Loading…
Reference in a new issue