@snapdragonsnursery/react-components 1.1.30 → 1.1.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/package.json +1 -1
- package/src/ChildSearchPage.jsx +11 -24
package/package.json
CHANGED
package/src/ChildSearchPage.jsx
CHANGED
|
@@ -130,13 +130,10 @@ const ChildSearchPage = ({
|
|
|
130
130
|
columnHelper.accessor("full_name", {
|
|
131
131
|
header: "Name",
|
|
132
132
|
cell: ({ row }) => (
|
|
133
|
-
<div
|
|
134
|
-
<
|
|
135
|
-
<div>
|
|
136
|
-
|
|
137
|
-
<div className="text-sm text-gray-500">
|
|
138
|
-
ID: {row.original.child_id}
|
|
139
|
-
</div>
|
|
133
|
+
<div>
|
|
134
|
+
<div className="font-medium">{row.original.full_name}</div>
|
|
135
|
+
<div className="text-sm text-gray-500">
|
|
136
|
+
ID: {row.original.child_id}
|
|
140
137
|
</div>
|
|
141
138
|
</div>
|
|
142
139
|
),
|
|
@@ -145,24 +142,18 @@ const ChildSearchPage = ({
|
|
|
145
142
|
columnHelper.accessor("site_name", {
|
|
146
143
|
header: "Site",
|
|
147
144
|
cell: ({ row }) => (
|
|
148
|
-
<
|
|
149
|
-
<MapPinIcon className="h-4 w-4 text-gray-400" />
|
|
150
|
-
<span>{row.original.site_name}</span>
|
|
151
|
-
</div>
|
|
145
|
+
<span>{row.original.site_name}</span>
|
|
152
146
|
),
|
|
153
147
|
}),
|
|
154
148
|
// Date of Birth column
|
|
155
149
|
columnHelper.accessor("date_of_birth", {
|
|
156
150
|
header: "Date of Birth",
|
|
157
151
|
cell: ({ row }) => (
|
|
158
|
-
<
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
: "N/A"}
|
|
164
|
-
</span>
|
|
165
|
-
</div>
|
|
152
|
+
<span>
|
|
153
|
+
{row.original.date_of_birth
|
|
154
|
+
? new Date(row.original.date_of_birth).toLocaleDateString("en-GB")
|
|
155
|
+
: "N/A"}
|
|
156
|
+
</span>
|
|
166
157
|
),
|
|
167
158
|
}),
|
|
168
159
|
// Age column
|
|
@@ -180,11 +171,7 @@ const ChildSearchPage = ({
|
|
|
180
171
|
? `${years}y ${months}m`
|
|
181
172
|
: "N/A";
|
|
182
173
|
|
|
183
|
-
return
|
|
184
|
-
<div className="flex items-center space-x-2">
|
|
185
|
-
<span>{ageText}</span>
|
|
186
|
-
</div>
|
|
187
|
-
);
|
|
174
|
+
return <span>{ageText}</span>;
|
|
188
175
|
},
|
|
189
176
|
}),
|
|
190
177
|
// Status column
|