@timardex/cluemart-shared 1.5.517 → 1.5.519
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/dist/hooks/index.cjs +4 -1
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.mjs +4 -1
- package/dist/hooks/index.mjs.map +1 -1
- package/dist/index.cjs +4 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +4 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/hooks/index.cjs
CHANGED
|
@@ -5590,7 +5590,7 @@ var schoolSchema = yup11.object().shape({
|
|
|
5590
5590
|
name: yup11.string().trim().required("Name is required"),
|
|
5591
5591
|
region: yup11.string().trim().required("Region is required"),
|
|
5592
5592
|
socialMedia: yup11.array().of(socialMediaSchema).nullable().default(null),
|
|
5593
|
-
studentCount: yup11.number().label("Student Count").min(
|
|
5593
|
+
studentCount: yup11.number().label("Student Count").nullable().transform((value, originalValue) => originalValue === "" ? null : value).typeError("Student count must be a number").min(350, "Student count must be at least 350").required("Student count is required").test("no-leading-zeros", "", noLeadingZeros("Student Count"))
|
|
5594
5594
|
});
|
|
5595
5595
|
|
|
5596
5596
|
// src/hooks/useSchoolForm.ts
|
|
@@ -5622,6 +5622,7 @@ function useSchoolForm(data) {
|
|
|
5622
5622
|
(0, import_react5.useEffect)(() => {
|
|
5623
5623
|
if (data) {
|
|
5624
5624
|
reset({
|
|
5625
|
+
_id: data._id,
|
|
5625
5626
|
active: data.active,
|
|
5626
5627
|
contactDetails: data.contactDetails,
|
|
5627
5628
|
location: data.location,
|
|
@@ -5638,6 +5639,7 @@ function useSchoolForm(data) {
|
|
|
5638
5639
|
}
|
|
5639
5640
|
}, [data]);
|
|
5640
5641
|
const {
|
|
5642
|
+
_id,
|
|
5641
5643
|
socialMedia: socialMedia2,
|
|
5642
5644
|
active,
|
|
5643
5645
|
contactDetails,
|
|
@@ -5652,6 +5654,7 @@ function useSchoolForm(data) {
|
|
|
5652
5654
|
return {
|
|
5653
5655
|
control,
|
|
5654
5656
|
fields: {
|
|
5657
|
+
_id,
|
|
5655
5658
|
active,
|
|
5656
5659
|
contactDetails,
|
|
5657
5660
|
location,
|