@stoker-platform/web-app 0.5.30 → 0.5.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/utils/getFormattedFieldValue.tsx +19 -1
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -67,7 +67,9 @@ export const getFormattedFieldValue = (
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
let value = record[field.name]
|
|
70
|
+
let modified = false
|
|
70
71
|
if (fieldCustomization?.admin?.modifyDisplayValue) {
|
|
72
|
+
modified = true
|
|
71
73
|
value = tryFunction(fieldCustomization.admin.modifyDisplayValue, [
|
|
72
74
|
record,
|
|
73
75
|
card ? "card" : form ? "form" : "list",
|
|
@@ -134,7 +136,23 @@ export const getFormattedFieldValue = (
|
|
|
134
136
|
)
|
|
135
137
|
}
|
|
136
138
|
|
|
137
|
-
if (
|
|
139
|
+
if (modified) {
|
|
140
|
+
if (value === "tick") {
|
|
141
|
+
return (
|
|
142
|
+
<div className="w-full flex justify-start">
|
|
143
|
+
<Check />
|
|
144
|
+
</div>
|
|
145
|
+
)
|
|
146
|
+
} else if (value === "cross") {
|
|
147
|
+
return (
|
|
148
|
+
<div className="w-full flex justify-start">
|
|
149
|
+
<X />
|
|
150
|
+
</div>
|
|
151
|
+
)
|
|
152
|
+
} else {
|
|
153
|
+
return getStandardDisplay()
|
|
154
|
+
}
|
|
155
|
+
} else if (isRelationField(field)) {
|
|
138
156
|
const titleField = field.titleField
|
|
139
157
|
const relationCollection = schema.collections[field.collection]
|
|
140
158
|
if (["OneToOne", "OneToMany"].includes(field.type)) {
|