fix: Cannot edit deadline/schedule using date picking panel

This commit is contained in:
Tienson Qin
2021-11-12 11:38:40 +08:00
parent e0ec9c6567
commit 917daf00d7

View File

@@ -1678,22 +1678,22 @@
[:div.opacity-50.font-medium.timestamp-label
(str typ ": ")]
[:a.opacity-80.hover:opacity-100
{:on-click (fn []
(if @show?
(do
(reset! show? false)
(reset! commands/*current-command nil)
(state/set-editor-show-date-picker! false)
(state/set-timestamp-block! nil))
(do
(reset! show? true)
(reset! commands/*current-command typ)
(state/set-editor-show-date-picker! true)
(state/set-timestamp-block! {:block block
:typ typ
:show? show?}))))}
[:span.time-start "<"] [:time (repeated/timestamp->text ast)] [:span.time-stop ">"]
]]
{:on-mouse-down (fn [e]
(util/stop e)
(if @show?
(do
(reset! show? false)
(reset! commands/*current-command nil)
(state/set-editor-show-date-picker! false)
(state/set-timestamp-block! nil))
(do
(reset! show? true)
(reset! commands/*current-command typ)
(state/set-editor-show-date-picker! true)
(state/set-timestamp-block! {:block block
:typ typ
:show? show?}))))}
[:span.time-start "<"] [:time (repeated/timestamp->text ast)] [:span.time-stop ">"]]]
(when (true? @show?)
(let [ts (repeated/timestamp->map ast)]
[:div.my-4