@snapdragonsnursery/react-components 1.1.15 → 1.1.17
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 -6
package/package.json
CHANGED
package/src/ChildSearchPage.jsx
CHANGED
|
@@ -170,13 +170,18 @@ const ChildSearchPage = ({
|
|
|
170
170
|
header: "Age",
|
|
171
171
|
cell: ({ row }) => {
|
|
172
172
|
const { age_years, age_months } = row.original;
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
173
|
+
|
|
174
|
+
// Calculate proper years and months
|
|
175
|
+
let totalMonths = (age_years || 0) * 12 + (age_months || 0);
|
|
176
|
+
let years = Math.floor(totalMonths / 12);
|
|
177
|
+
let months = totalMonths % 12;
|
|
178
|
+
|
|
179
|
+
const ageText = totalMonths > 0
|
|
180
|
+
? `${years}y ${months}m`
|
|
181
|
+
: "N/A";
|
|
182
|
+
|
|
177
183
|
return (
|
|
178
184
|
<div className="flex items-center space-x-2">
|
|
179
|
-
<span className="text-gray-400 font-mono">#</span>
|
|
180
185
|
<span>{ageText}</span>
|
|
181
186
|
</div>
|
|
182
187
|
);
|
|
@@ -434,7 +439,7 @@ const ChildSearchPage = ({
|
|
|
434
439
|
<div className="p-6">
|
|
435
440
|
{/* Search Input */}
|
|
436
441
|
<div className="relative mb-4">
|
|
437
|
-
<MagnifyingGlassIcon className="absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400" />
|
|
442
|
+
<MagnifyingGlassIcon className="absolute left-3 top-1/2 transform -translate-y-1/2 h-4 w-4 text-gray-400 pointer-events-none" />
|
|
438
443
|
<Input
|
|
439
444
|
type="text"
|
|
440
445
|
placeholder="🔧 UPDATED: Search by name or child ID... (v1.1.14)"
|