@@ -56,6 +57,7 @@ const CreateCompany = ({ defaultValues, editMode, id }: IProps) => {
})}
label="Name"
name="name"
+ required
type="text"
placeholder="Enter Company Name"
/>
@@ -72,6 +74,7 @@ const CreateCompany = ({ defaultValues, editMode, id }: IProps) => {
})}
label="Email"
name="email"
+ required
type="email"
placeholder="Enter Company Email"
/>
@@ -89,9 +92,14 @@ const CreateCompany = ({ defaultValues, editMode, id }: IProps) => {
value: 20,
message: FormErrorMessages.maxLength(20),
},
+ pattern: {
+ value: PHONE_REGEX,
+ message: FormErrorMessages.invalidPattern,
+ },
})}
label="Phone"
name="phone"
+ required
type="tel"
placeholder="Enter Company Phone"
/>
@@ -104,6 +112,7 @@ const CreateCompany = ({ defaultValues, editMode, id }: IProps) => {
})}
name="type"
label="Company type"
+ required
items={[
{ value: "private", label: "Private" },
{ value: "public", label: "Public" },
@@ -129,6 +138,7 @@ const CreateCompany = ({ defaultValues, editMode, id }: IProps) => {
label="Registration Number"
name="registration_number"
type="text"
+ required
placeholder="Enter Registration Number"
/>
{errors.registration_number && (
@@ -148,6 +158,7 @@ const CreateCompany = ({ defaultValues, editMode, id }: IProps) => {
label="Tax id"
name="tax_id"
type="text"
+ required
placeholder="Enter Tax id"
/>
{errors.tax_id && (
@@ -165,6 +176,7 @@ const CreateCompany = ({ defaultValues, editMode, id }: IProps) => {
label="Industry"
name="industry"
type="text"
+ required
placeholder="Enter Industry"
/>
{errors.industry && (
@@ -202,6 +214,7 @@ const CreateCompany = ({ defaultValues, editMode, id }: IProps) => {
},
})}
label="Website"
+ required
name="website"
type="url"
placeholder="Enter Company Website"
@@ -212,116 +225,7 @@ const CreateCompany = ({ defaultValues, editMode, id }: IProps) => {
)}
-
-
- {errors.contact_person?.full_name && (
-
- {errors.contact_person.full_name.message}
-
- )}
-
- {errors.contact_person?.position && (
-
- {errors.contact_person.position.message}
-
- )}
-
- {errors.contact_person?.email && (
-
- {errors.contact_person.email.message}
-
- )}
-
- {errors.contact_person?.phone && (
-
- {errors.contact_person.phone.message}
-
- )}
-
- {errors.contact_person?.mobile && (
-
- {errors.contact_person.mobile.message}
-
- )}
-
+
diff --git a/src/components/logo.tsx b/src/components/logo.tsx
index 47bd582..ab16fd6 100644
--- a/src/components/logo.tsx
+++ b/src/components/logo.tsx
@@ -6,10 +6,9 @@ export function Logo() {
src="/images/main-logo.svg"
width={174}
height={32}
- alt="NextAdmin logo"
+ alt="Opp lens logo"
role="presentation"
quality={100}
- className="dark:invert"
/>
);
}
diff --git a/src/components/ui/Status.tsx b/src/components/ui/Status.tsx
new file mode 100644
index 0000000..273a4f7
--- /dev/null
+++ b/src/components/ui/Status.tsx
@@ -0,0 +1,51 @@
+import { cn } from "@/lib/utils";
+import { ReactNode } from "react";
+
+interface IProps {
+ status: string;
+ children: ReactNode;
+}
+
+const Status = ({ status, children }: IProps) => {
+ const reds = [
+ "cancelled",
+ "inactive",
+ "rejected",
+ "failed",
+ "denied",
+ "blocked",
+ ];
+ const greens = [
+ "active",
+ "approved",
+ "completed",
+ "success",
+ "verified",
+ "published",
+ ];
+ const blues = ["awarded", "processing", "in-review", "scheduled"];
+ const yellows = ["pending", "warning", "on-hold", "delayed"];
+ const oranges = ["expired", "expiring", "limited"];
+ const grays = ["draft", "disabled", "archived", "paused"];
+
+ return (
+