diff --git a/public/lapiz.png b/public/lapiz.png
new file mode 100644
index 0000000..676ff53
Binary files /dev/null and b/public/lapiz.png differ
diff --git a/src/app/layout.tsx b/src/app/layout.tsx
index 828d36b..3796391 100644
--- a/src/app/layout.tsx
+++ b/src/app/layout.tsx
@@ -16,7 +16,7 @@ export default function RootLayout({
children: React.ReactNode
}) {
return (
-
+
diff --git a/src/app/pedidos/cliente/[id]/page.tsx b/src/app/pedidos/cliente/[id]/page.tsx
index 6761c12..6067629 100644
--- a/src/app/pedidos/cliente/[id]/page.tsx
+++ b/src/app/pedidos/cliente/[id]/page.tsx
@@ -1,3 +1,87 @@
-export default function Page({ params }: { params: { id: string } }) {
- return
My Post: {params.id}
-}
\ No newline at end of file
+'use client'
+import { Input } from '@/components/Input';
+import { useForm } from 'react-hook-form';
+import Button from '@/components/Button';
+import { useRouter } from 'next/navigation';
+import { useEffect, useState } from 'react';
+import { Toolbar } from '@/components/Toolbar';
+import useFetchWithAuth from '@/hooks/useFetchWithAuth';
+import saveWithAuth from '@/hooks/saveWithAuth';
+
+const ClientePage = ({ params }: { params: { id: string } }) => {
+
+ const router = useRouter();
+ const entityId =params.id;
+ const [cliente, setCliente] = useState({
+ id: 0,
+ cedula: '',
+ nombreCompleto: '',
+ });
+ const { register, setValue,getValues,handleSubmit, formState: { errors } } = useForm(
+ {
+ defaultValues: {
+ ...cliente
+ }
+ }
+ );
+
+ const getInitData = async () => {
+ if (!entityId || entityId=="0")
+ return;
+ const { data, error } = await useFetchWithAuth("cliente/" + entityId);
+
+ if (!error) {
+
+ if (data.id!=0){
+ setValue("id", data['id'])
+ setValue("cedula", data['cedula'])
+ setValue("nombreCompleto", data['nombreCompleto'])
+ setCliente(data)
+ }
+
+ } else {
+ console.log(error)
+ }
+ }
+
+ const onSubmit = async (entity: any) => {
+ try {
+ let endpoint = "cliente";
+
+ const { data, error } = await saveWithAuth(endpoint, entityId, entity);
+ if (error) {
+ console.log(error);
+ } else {
+ router.push("pedidos/"+endpoint+"/"+ data.id)
+ }
+ } catch (e) {
+ console.log("Post error:");
+ console.table(e);
+ }
+ }
+
+
+ useEffect(() => {
+ getInitData();
+ }, [])
+
+ return (
+ <>
+
+
+ >
+ )
+}
+
+export default ClientePage;
diff --git a/src/app/pedidos/cliente/page.tsx b/src/app/pedidos/cliente/page.tsx
index 6e47124..fcb1010 100644
--- a/src/app/pedidos/cliente/page.tsx
+++ b/src/app/pedidos/cliente/page.tsx
@@ -1,24 +1,20 @@
+import { Toolbar } from '@/components/Toolbar';
import Head from '@/components/table/Head'
import TBody from '@/components/table/TBody';
-import { FC } from 'react'
-interface Props {
-}
-
-const ListadoCliente:FC
= () => {
+const ListadoCliente = () => {
return (
<>
-
-
-
Listado de cliente
-
-
+
+
+
Listado de clientes
+
-
-
-
+
+
>
)
}
diff --git a/src/app/pedidos/layout.tsx b/src/app/pedidos/layout.tsx
index 3ef6da6..3f9575b 100644
--- a/src/app/pedidos/layout.tsx
+++ b/src/app/pedidos/layout.tsx
@@ -2,6 +2,7 @@ import Navbar from '@/components/Navbar'
import './../globals.css'
import { Inter } from 'next/font/google'
import Sidebar from '@/components/Sidebar'
+import { Toolbar } from '@/components/Toolbar'
const inter = Inter({ subsets: ['latin'] })
@@ -20,7 +21,6 @@ export default function RootLayout({
<>