@snapdragonsnursery/react-components 1.1.30 → 1.1.32
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 +19 -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
|
|
@@ -495,6 +482,7 @@ const ChildSearchPage = ({
|
|
|
495
482
|
status: e.target.value,
|
|
496
483
|
}))
|
|
497
484
|
}
|
|
485
|
+
className="bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white"
|
|
498
486
|
>
|
|
499
487
|
<SelectOption value="all">All Children</SelectOption>
|
|
500
488
|
<SelectOption value="active">Active Only</SelectOption>
|
|
@@ -518,6 +506,7 @@ const ChildSearchPage = ({
|
|
|
518
506
|
selectedSiteId: e.target.value,
|
|
519
507
|
}))
|
|
520
508
|
}
|
|
509
|
+
className="bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white"
|
|
521
510
|
>
|
|
522
511
|
<SelectOption value="">All Sites</SelectOption>
|
|
523
512
|
{sites.map((site) => (
|
|
@@ -543,6 +532,7 @@ const ChildSearchPage = ({
|
|
|
543
532
|
dobFrom: e.target.value,
|
|
544
533
|
}))
|
|
545
534
|
}
|
|
535
|
+
className="bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white"
|
|
546
536
|
/>
|
|
547
537
|
</div>
|
|
548
538
|
|
|
@@ -559,6 +549,7 @@ const ChildSearchPage = ({
|
|
|
559
549
|
dobTo: e.target.value,
|
|
560
550
|
}))
|
|
561
551
|
}
|
|
552
|
+
className="bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white"
|
|
562
553
|
/>
|
|
563
554
|
</div>
|
|
564
555
|
|
|
@@ -578,6 +569,7 @@ const ChildSearchPage = ({
|
|
|
578
569
|
}))
|
|
579
570
|
}
|
|
580
571
|
placeholder="0"
|
|
572
|
+
className="bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white"
|
|
581
573
|
/>
|
|
582
574
|
</div>
|
|
583
575
|
|
|
@@ -596,6 +588,7 @@ const ChildSearchPage = ({
|
|
|
596
588
|
}))
|
|
597
589
|
}
|
|
598
590
|
placeholder="60"
|
|
591
|
+
className="bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white"
|
|
599
592
|
/>
|
|
600
593
|
</div>
|
|
601
594
|
|
|
@@ -612,6 +605,7 @@ const ChildSearchPage = ({
|
|
|
612
605
|
sortBy: e.target.value,
|
|
613
606
|
}))
|
|
614
607
|
}
|
|
608
|
+
className="bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white"
|
|
615
609
|
>
|
|
616
610
|
<SelectOption value="last_name">Last Name</SelectOption>
|
|
617
611
|
<SelectOption value="first_name">First Name</SelectOption>
|
|
@@ -635,6 +629,7 @@ const ChildSearchPage = ({
|
|
|
635
629
|
sortOrder: e.target.value,
|
|
636
630
|
}))
|
|
637
631
|
}
|
|
632
|
+
className="bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white"
|
|
638
633
|
>
|
|
639
634
|
<SelectOption value="asc">Ascending</SelectOption>
|
|
640
635
|
<SelectOption value="desc">Descending</SelectOption>
|