@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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @stoker-platform/web-app
2
2
 
3
+ ## 0.5.31
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: treat modified display value as Computed field type
8
+
3
9
  ## 0.5.30
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/web-app",
3
- "version": "0.5.30",
3
+ "version": "0.5.31",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "scripts": {
@@ -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 (isRelationField(field)) {
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)) {