fix: tweak datetime label

DateTime is a lot more common than Datetime as it makes Time more
distinct and easier for users to visually parse
pull/11468/merge
Gabriel Horner 2024-09-28 00:49:52 -04:00
parent ac4af08996
commit 6853acd0c9
2 changed files with 4 additions and 9 deletions

View File

@ -33,13 +33,6 @@
[promesa.core :as p] [promesa.core :as p]
[rum.core :as rum])) [rum.core :as rum]))
(defn- property-type-label
[property-type]
(case property-type
:default
"Text"
((comp string/capitalize name) property-type)))
(defn- <add-property-from-dropdown (defn- <add-property-from-dropdown
"Adds an existing or new property from dropdown. Used from a block or page context." "Adds an existing or new property from dropdown. Used from a block or page context."
[entity property-uuid-or-name schema {:keys [class-schema?]}] [entity property-uuid-or-name schema {:keys [class-schema?]}]
@ -83,7 +76,7 @@
(when built-in? (when built-in?
db-property-type/internal-built-in-property-types)) db-property-type/internal-built-in-property-types))
(map (fn [type] (map (fn [type]
{:label (property-type-label type) {:label (property-config/property-type-label type)
:value type})))] :value type})))]
[:div {:class "flex items-center col-span-1"} [:div {:class "flex items-center col-span-1"}
(shui/select (shui/select

View File

@ -433,11 +433,13 @@
(dropdown-editor-menuitem (dropdown-editor-menuitem
(assoc v :item-props item-props))))])) (assoc v :item-props item-props))))]))
(defn- property-type-label (defn property-type-label
[property-type] [property-type]
(case property-type (case property-type
:default :default
"Text" "Text"
:datetime
"DateTime"
((comp string/capitalize name) property-type))) ((comp string/capitalize name) property-type)))
(defn- handle-delete-property! (defn- handle-delete-property!