Fixed build issues

This commit is contained in:
AmirReza Jamali
2025-09-09 13:32:58 +03:30
parent d73a64fe52
commit 83bd4394fc
18 changed files with 139 additions and 80 deletions
+26 -3
View File
@@ -1,7 +1,30 @@
import { ShadowBox } from "@/src/components";
"use client";
const EditCustomer = () => {
return <ShadowBox>Edit customer</ShadowBox>;
import { use } from "react";
import {
useCustomersInfiniteQuery,
useGetCustomersDetails,
} from "../../../../hooks/queries/useCustomerQueries";
import Breadcrumb from "@/components/Breadcrumbs/Breadcrumb";
import CreateCustomer from "@/components/forms/customers/CreateCustomer";
import Loading from "@/app/loading";
const EditCustomer = ({ params }: { params: Promise<{ id: string }> }) => {
const { id } = use(params);
const { isLoading, data, isError } = useGetCustomersDetails(id);
const breadcrumbItems = [
{ name: "Dashboard", href: "/" },
{ name: "Customers", href: "/customers" },
{ name: "Edit Customer", href: `/customers/edit/${id}` },
];
if (isLoading) return <Loading />;
if (isError) return <div>Error</div>;
return (
<>
<Breadcrumb items={breadcrumbItems} />
<CreateCustomer editMode defaultValues={data.data} id={id} />
</>
);
};
export default EditCustomer;
@@ -8,7 +8,7 @@ export function ContactForm() {
<ShowcaseSection title="Contact Form" className="!p-6.5">
<form action="#">
<div className="mb-4.5 flex flex-col gap-4.5 xl:flex-row">
<InputGroup
{/* <InputGroup
label="First name"
type="text"
placeholder="Enter your first name"
@@ -20,10 +20,10 @@ export function ContactForm() {
type="text"
placeholder="Enter your last name"
className="w-full xl:w-1/2"
/>
/> */}
</div>
<InputGroup
{/* <InputGroup
label="Email"
type="email"
placeholder="Enter your email address"
@@ -49,7 +49,7 @@ export function ContactForm() {
]}
/>
<TextAreaGroup label="Message" placeholder="Type your message" />
<TextAreaGroup label="Message" placeholder="Type your message" /> */}
<button className="mt-6 flex w-full justify-center rounded-lg bg-primary p-[13px] font-medium text-white hover:bg-opacity-90">
Send Message
@@ -7,7 +7,7 @@ export function SignInForm() {
return (
<ShowcaseSection title="Sign In Form" className="!p-6.5">
<form action="#">
<InputGroup
{/* <InputGroup
label="Email"
type="email"
placeholder="Enter your email address"
@@ -18,7 +18,7 @@ export function SignInForm() {
label="Password"
type="password"
placeholder="Enter your password"
/>
/> */}
<div className="mb-5.5 mt-5 flex items-center justify-between">
<Checkbox label="Remember me" minimal withBg withIcon="check" />
@@ -5,7 +5,7 @@ export function SignUpForm() {
return (
<ShowcaseSection title="Sign Up Form" className="!p-6.5">
<form action="#">
<InputGroup
{/* <InputGroup
label="Name"
type="text"
placeholder="Enter full name"
@@ -31,7 +31,7 @@ export function SignUpForm() {
type="password"
placeholder="Re-type password"
className="mb-5.5"
/>
/> */}
<button className="flex w-full justify-center rounded-lg bg-primary p-[13px] font-medium text-white hover:bg-opacity-90">
Sign Up
@@ -62,13 +62,13 @@ export function PersonalInfoForm() {
height="sm"
/>
<TextAreaGroup
{/* <TextAreaGroup
className="mb-5.5"
label="BIO"
placeholder="Write your bio here"
icon={<PencilSquareIcon />}
defaultValue="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam lacinia turpis tortor, consequat efficitur mi congue a. Curabitur cursus, ipsum ut lobortis sodales, enim arcu pellentesque lectus ac suscipit diam sem a felis. Cras sapien ex, blandit eu dui et suscipit gravida nunc. Sed sed est quis dui."
/>
/> */}
<div className="flex justify-end gap-3">
<button
+11 -10
View File
@@ -8,15 +8,16 @@ export const metadata: Metadata = {
export default function SettingsPage() {
return (
<div className="mx-auto w-full max-w-[1080px]">
<div className="grid grid-cols-5 gap-8">
<div className="col-span-5 xl:col-span-3">
<PersonalInfoForm />
</div>
<div className="col-span-5 xl:col-span-2">
<UploadPhotoForm />
</div>
</div>
</div>
<div>Settings</div>
// <div className="mx-auto w-full max-w-[1080px]">
// <div className="grid grid-cols-5 gap-8">
// <div className="col-span-5 xl:col-span-3">
// <PersonalInfoForm />
// </div>
// <div className="col-span-5 xl:col-span-2">
// <UploadPhotoForm />
// </div>
// </div>
// </div>
);
}