From cb72ca80c57de63babb343f905cccc7e3fef7898 Mon Sep 17 00:00:00 2001 From: Tienson Qin Date: Thu, 26 Dec 2024 21:12:50 +0800 Subject: [PATCH] enhance: improve repeated task condition word --- .../frontend/components/property/value.cljs | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/main/frontend/components/property/value.cljs b/src/main/frontend/components/property/value.cljs index 3488ff73cd..840d8d618b 100644 --- a/src/main/frontend/components/property/value.cljs +++ b/src/main/frontend/components/property/value.cljs @@ -253,11 +253,15 @@ (>= (count (:property/closed-values property)) 2)))) (concat [(db/entity :logseq.task/status)]) (util/distinct-by :db/id)) - property-id (or (:db/id (:logseq.task/recur-status-property block)) - (:db/id (db/entity :logseq.task/status)))] + status-property (or (:logseq.task/recur-status-property block) + (db/entity :logseq.task/status)) + property-id (:db/id status-property) + done-choice (or + (some (fn [choice] (when (true? (:logseq.property/choice-checkbox-state choice)) choice)) (:property/closed-values status-property)) + (db/entity :logseq.task/status.done))] [:div.flex.flex-col.gap-2 [:div.text-muted-foreground - "Scheduled on:"] + "Reschedule when"] (shui/select (cond-> {:on-value-change (fn [v] @@ -270,7 +274,12 @@ (shui/select-value {:placeholder "Select a property"})) (shui/select-content (map (fn [choice] - (shui/select-item {:value (:db/id choice)} (:block/title choice))) properties)))])])) + (shui/select-item {:value (:db/id choice)} (:block/title choice))) properties))) + [:div.flex.flex-row.gap-1 + [:div.text-muted-foreground + "is:"] + (when done-choice + (db-property/property-value-content done-choice))]])])) (rum/defcs calendar-inner < rum/reactive db-mixins/query (rum/local (str "calendar-inner-" (js/Date.now)) ::identity)