@snapdragonsnursery/react-components 1.1.16 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snapdragonsnursery/react-components",
3
- "version": "1.1.16",
3
+ "version": "1.1.17",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -170,10 +170,16 @@ const ChildSearchPage = ({
170
170
  header: "Age",
171
171
  cell: ({ row }) => {
172
172
  const { age_years, age_months } = row.original;
173
- const ageText =
174
- age_years || age_months
175
- ? `${age_years || 0}y ${age_months || 0}m`
176
- : "N/A";
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
185
  <span>{ageText}</span>
@@ -433,7 +439,7 @@ const ChildSearchPage = ({
433
439
  <div className="p-6">
434
440
  {/* Search Input */}
435
441
  <div className="relative mb-4">
436
- <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" />
437
443
  <Input
438
444
  type="text"
439
445
  placeholder="🔧 UPDATED: Search by name or child ID... (v1.1.14)"