Merge branch 'develop' into tender-feedbacks
This commit is contained in:
+1
-1
@@ -12,7 +12,7 @@ import { Providers } from "./providers";
|
||||
export const metadata: Metadata = {
|
||||
title: {
|
||||
template: "%s | NextAdmin - Next.js Dashboard Kit",
|
||||
default: "NextAdmin - Next.js Dashboard Kit",
|
||||
default: "Opp lens - panel",
|
||||
},
|
||||
description:
|
||||
"Next.js admin dashboard toolkit with 200+ templates, UI components, and integrations for fast dashboard development.",
|
||||
|
||||
@@ -167,7 +167,7 @@ const TagInput = <T extends FieldValues>({
|
||||
<input
|
||||
type="hidden"
|
||||
{...(register ? register(name) : {})}
|
||||
value={JSON.stringify(tags)}
|
||||
value={tags.length > 0 ? JSON.stringify(tags) : ''}
|
||||
ref={ref}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -67,7 +67,7 @@ const CompaniesTable = ({}: IProps) => {
|
||||
<TableHead className="text-start" colSpan={100}>
|
||||
{company.email}
|
||||
</TableHead>
|
||||
<TableHead className="text-start" colSpan={100}>
|
||||
<TableHead className="w-full text-start" colSpan={100}>
|
||||
{formatPhoneNumber(company.phone)}
|
||||
</TableHead>
|
||||
<TableHead className="text-start" colSpan={100}>
|
||||
|
||||
@@ -116,7 +116,7 @@ const CreateAdminForm: FC<IProps> = ({ defaultValues, editMode, id }) => {
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{!editMode && (
|
||||
<div>
|
||||
<InputGroup
|
||||
label="Password"
|
||||
@@ -146,6 +146,7 @@ const CreateAdminForm: FC<IProps> = ({ defaultValues, editMode, id }) => {
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div>
|
||||
<InputGroup
|
||||
|
||||
@@ -34,7 +34,7 @@ const useCreateCompanyPresenter = ({ defaultValues, editMode, id }: IProps) => {
|
||||
|
||||
useEffect(() => {
|
||||
if (defaultValues) {
|
||||
const categories = defaultValues?.tags.categories.map(
|
||||
const categories = defaultValues?.tags?.categories?.map(
|
||||
(item: any) => item.id,
|
||||
);
|
||||
setValue("tags.categories", categories);
|
||||
@@ -52,6 +52,19 @@ const useCreateCompanyPresenter = ({ defaultValues, editMode, id }: IProps) => {
|
||||
founded_year: data.founded_year ? +data.founded_year : 0,
|
||||
employee_count: data.employee_count ? +data.employee_count : 0,
|
||||
annual_revenue: data.annual_revenue ? +data.annual_revenue : 0,
|
||||
tags: {
|
||||
keywords: data?.tags?.keywords?.length ? data?.tags?.keywords : [],
|
||||
categories: data?.tags?.categories?.length
|
||||
? data?.tags?.categories
|
||||
: [],
|
||||
cpv_codes: data?.tags?.cpv_codes?.length ? data?.tags?.cpv_codes : [],
|
||||
specializations: data?.tags?.specializations?.length
|
||||
? data?.tags?.specializations
|
||||
: [],
|
||||
certifications: data?.tags?.certifications?.length
|
||||
? data?.tags?.certifications
|
||||
: [],
|
||||
},
|
||||
};
|
||||
if (editMode) {
|
||||
updateCompany({
|
||||
@@ -61,7 +74,9 @@ const useCreateCompanyPresenter = ({ defaultValues, editMode, id }: IProps) => {
|
||||
} else {
|
||||
createCompany(formattedData as ICreateCompanyCredentials);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
const handleCancel = () => {
|
||||
reset();
|
||||
router.back();
|
||||
|
||||
@@ -108,11 +108,15 @@ const CreateCustomer = ({ defaultValues, editMode, id }: IProps) => {
|
||||
placeholder="Select Role"
|
||||
/>
|
||||
</div>
|
||||
{!editMode && (
|
||||
<div className="flex flex-col gap-2">
|
||||
<InputGroup
|
||||
{...register("password", {
|
||||
required: { value: true, message: FormErrorMessages.required },
|
||||
minLength: { value: 8, message: FormErrorMessages.minLength(8) },
|
||||
minLength: {
|
||||
value: 8,
|
||||
message: FormErrorMessages.minLength(8),
|
||||
},
|
||||
maxLength: {
|
||||
value: 128,
|
||||
message: FormErrorMessages.maxLength(128),
|
||||
@@ -130,6 +134,8 @@ const CreateCustomer = ({ defaultValues, editMode, id }: IProps) => {
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div className="flex flex-col gap-2">
|
||||
<InputGroup
|
||||
{...register("full_name", {
|
||||
|
||||
Reference in New Issue
Block a user