From 7d82fe327dbace583f48d17003ca55bb76342c14 Mon Sep 17 00:00:00 2001 From: John Darragh Date: Thu, 14 Nov 2024 19:06:19 -0800 Subject: [PATCH 1/2] Fix deployment issue, remove validation from social media fields (#2282) --- client/package-lock.json | 4 +-- .../src/components/Admin/OrganizationEdit.jsx | 34 +++++++------------ .../Admin/OrganizationEdit/ContactDetails.jsx | 14 ++++---- 3 files changed, 20 insertions(+), 32 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index af197071..a35eb072 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -1,12 +1,12 @@ { "name": "foodoasis-client", - "version": "1.0.84", + "version": "1.0.86", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "foodoasis-client", - "version": "1.0.84", + "version": "1.0.86", "license": "GPL-2.0", "dependencies": { "@craco/craco": "^7.0.0", diff --git a/client/src/components/Admin/OrganizationEdit.jsx b/client/src/components/Admin/OrganizationEdit.jsx index 92e8db48..85f2f3fe 100644 --- a/client/src/components/Admin/OrganizationEdit.jsx +++ b/client/src/components/Admin/OrganizationEdit.jsx @@ -33,13 +33,13 @@ import MoreDetails from "./OrganizationEdit/MoreDetails"; import Verification from "./OrganizationEdit/Verification"; import Label from "./ui/Label"; import Textarea from "./ui/Textarea"; -import { - FACEBOOK_REGEX, - INSTAGRAM_REGEX, - LINKEDIN_REGEX, - PINTEREST_REGEX, - TWITTER_REGEX, -} from "../../helpers/Constants"; +// import { +// FACEBOOK_REGEX, +// INSTAGRAM_REGEX, +// LINKEDIN_REGEX, +// PINTEREST_REGEX, +// TWITTER_REGEX, +// } from "../../helpers/Constants"; const HourSchema = Yup.object().shape({ weekOfMonth: Yup.number().required("Interval is required"), @@ -58,21 +58,11 @@ const validationSchema = Yup.object().shape({ longitude: Yup.number().required("Longitude is required").min(-180).max(180), email: Yup.string().email("Invalid email address format"), hours: Yup.array().of(HourSchema), - instagram: Yup.string() - .matches(INSTAGRAM_REGEX, "Please enter a valid Instagram URL.") - .nullable(), - pinterest: Yup.string() - .matches(PINTEREST_REGEX, "Please enter a valid Pinterest URL.") - .nullable(), - facebook: Yup.string() - .matches(FACEBOOK_REGEX, "Please enter a valid Facebook URL.") - .nullable(), - linkedin: Yup.string() - .matches(LINKEDIN_REGEX, "Please enter a valid LinkedIn URL.") - .nullable(), - twitter: Yup.string() - .matches(TWITTER_REGEX, "Please enter a valid Twitter/X URL.") - .nullable(), + instagram: Yup.string().nullable(), + pinterest: Yup.string().nullable(), + facebook: Yup.string().nullable(), + linkedin: Yup.string().nullable(), + twitter: Yup.string().nullable(), selectedCategoryIds: Yup.array().min( 1, "You must select at least one category" diff --git a/client/src/components/Admin/OrganizationEdit/ContactDetails.jsx b/client/src/components/Admin/OrganizationEdit/ContactDetails.jsx index 72e16650..e5a8c4e2 100644 --- a/client/src/components/Admin/OrganizationEdit/ContactDetails.jsx +++ b/client/src/components/Admin/OrganizationEdit/ContactDetails.jsx @@ -3,8 +3,6 @@ import { TabPanel } from "components/Admin/ui/TabPanel"; import { TextField } from "@mui/material"; import Label from "../ui/Label"; - - export default function ContactDetails({ tabPage, values, @@ -21,7 +19,7 @@ export default function ContactDetails({