From 9c8d7988c5743c8af4d86df7e43348eaba65f7d0 Mon Sep 17 00:00:00 2001 From: Joao Ramos Date: Wed, 6 Dec 2023 15:16:48 +0000 Subject: [PATCH] Changed Comercial labels to Corporate --- src/components/DemographicInformationInput.tsx | 8 ++++---- src/components/UserCard.tsx | 10 +++++----- src/pages/profile.tsx | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/components/DemographicInformationInput.tsx b/src/components/DemographicInformationInput.tsx index 222dc546..1f90ff21 100644 --- a/src/components/DemographicInformationInput.tsx +++ b/src/components/DemographicInformationInput.tsx @@ -24,7 +24,7 @@ export default function DemographicInformationInput({user, mutateUser}: Props) { const [position, setPosition] = useState(); const [isLoading, setIsLoading] = useState(false); - const [companyName, setCompanyName] = useState(); + const [corporateName, setCorporateName] = useState(); const [commercialRegistration, setCommercialRegistration] = useState(); const save = (e?: FormEvent) => { @@ -40,7 +40,7 @@ export default function DemographicInformationInput({user, mutateUser}: Props) { employment: user.type === "corporate" ? undefined : employment, position: user.type === "corporate" ? position : undefined, }, - agentInformation: user.type === "agent" ? {companyName, commercialRegistration} : undefined, + agentInformation: user.type === "agent" ? {corporateName, commercialRegistration} : undefined, }) .then((response) => mutateUser((response.data as {user: User}).user)) .catch(() => { @@ -62,7 +62,7 @@ export default function DemographicInformationInput({user, mutateUser}: Props) {
{user.type === "agent" && (
- + {!isLoading && "Save information"} {isLoading && ( diff --git a/src/components/UserCard.tsx b/src/components/UserCard.tsx index 682b32d8..f81302ac 100644 --- a/src/components/UserCard.tsx +++ b/src/components/UserCard.tsx @@ -146,11 +146,11 @@ const UserCard = ({user, loggedInUser, onClose, onViewStudents, onViewTeachers, <>
@@ -159,7 +159,7 @@ const UserCard = ({user, loggedInUser, onClose, onViewStudents, onViewTeachers, type="text" name="commercialRegistration" onChange={setCommercialRegistration} - placeholder="Enter company name" + placeholder="Enter commercial registration" defaultValue={commercialRegistration} required /> @@ -171,11 +171,11 @@ const UserCard = ({user, loggedInUser, onClose, onViewStudents, onViewTeachers, <>
null} - placeholder="Enter company name" + placeholder="Enter corporate name" defaultValue={user.agentInformation.companyName} disabled /> @@ -227,7 +227,7 @@ export default function Home() { type="text" name="commercialRegistration" onChange={() => null} - placeholder="Enter company name" + placeholder="Enter commercial registration" defaultValue={user.agentInformation.commercialRegistration} disabled />