diff --git a/src/app/configs/navigationConfig.ts b/src/app/configs/navigationConfig.ts index cf18332..b04b52c 100644 --- a/src/app/configs/navigationConfig.ts +++ b/src/app/configs/navigationConfig.ts @@ -37,8 +37,27 @@ const navigationConfig: FuseNavItemType[] = [ type: 'item', icon: 'heroicons-outline:clipboard-check', url: 'product/list' + }, + + { + id: 'cliente-component', + title: 'Cliente', + translate: 'Cliente', + type: 'item', + icon: 'heroicons-outline:user', + url: 'client/list' + }, + + { + id: 'firma-component', + title: 'signature', + translate: 'Firma', + type: 'item', + icon: 'heroicons-outline:pencil', + url: 'signature/form' } + ]; export default navigationConfig; diff --git a/src/app/configs/routesConfig.tsx b/src/app/configs/routesConfig.tsx index 661e591..678562d 100644 --- a/src/app/configs/routesConfig.tsx +++ b/src/app/configs/routesConfig.tsx @@ -10,6 +10,8 @@ import Error404Page from '../main/404/Error404Page'; import ProjectDashboardAppConfig from '../main/dashboard/project/ProjectDashboardAppConfig'; import ProductoConfigs from '../main/producto/ProductoConfig'; import InvoiceConfigs from '../main/invoice/InvoiceConfig'; +import ClientConfig from '../main/client/ClientConfig'; +import firmaConfigs from '../main/firmaElectronica/FirmaConfig'; const routeConfigs: FuseRouteConfigsType = [ SignOutConfig, @@ -17,7 +19,9 @@ const routeConfigs: FuseRouteConfigsType = [ SignUpConfig, ProjectDashboardAppConfig, ...ProductoConfigs, - ...InvoiceConfigs + ...InvoiceConfigs, + ...ClientConfig, + ...firmaConfigs ]; /** diff --git a/src/app/main/client/Client.tsx b/src/app/main/client/Client.tsx new file mode 100644 index 0000000..e992c3f --- /dev/null +++ b/src/app/main/client/Client.tsx @@ -0,0 +1,37 @@ +import DemoContent from '@fuse/core/DemoContent'; +import FusePageSimple from '@fuse/core/FusePageSimple'; +import { useTranslation } from 'react-i18next'; +import { styled } from '@mui/material/styles'; +import ClientRender from './ClientRender'; + + +const Root = styled(FusePageSimple)(({ theme }) => ({ + '& .FusePageSimple-header': { + backgroundColor: theme.palette.background.paper, + borderBottomWidth: 1, + borderStyle: 'solid', + borderColor: theme.palette.divider + }, + '& .FusePageSimple-content': {}, + '& .FusePageSimple-sidebarHeader': {}, + '& .FusePageSimple-sidebarContent': {} +})); + +function Client() { + const { t } = useTranslation('clients'); + + return( + +

{t('CLIENTES')}

+ + } + content={ + + } + /> + ) +} + +export default Client; \ No newline at end of file diff --git a/src/app/main/client/ClientConfig.ts b/src/app/main/client/ClientConfig.ts new file mode 100644 index 0000000..8d41e7f --- /dev/null +++ b/src/app/main/client/ClientConfig.ts @@ -0,0 +1,10 @@ +import { FuseRouteConfigsType } from "@fuse/utils/FuseUtils"; +import DetalleClienteConfig from "./detalleCliente/DetalleClienteConfig"; +import FormularioClienteConfig from "./formularioCliente/FormularioClienteConfig"; + +const clientConfigs: FuseRouteConfigsType = [ + DetalleClienteConfig, + FormularioClienteConfig +] + +export default clientConfigs; \ No newline at end of file diff --git a/src/app/main/client/ClientRender.tsx b/src/app/main/client/ClientRender.tsx new file mode 100644 index 0000000..e1daffa --- /dev/null +++ b/src/app/main/client/ClientRender.tsx @@ -0,0 +1,11 @@ +import DetalleCliente from "./detalleCliente/DetalleCliente" + +const ClientRender = () => { + return ( +
+ +
+ ) +} + +export default ClientRender; diff --git a/src/app/main/client/detalleCliente/DetalleCliente.tsx b/src/app/main/client/detalleCliente/DetalleCliente.tsx new file mode 100644 index 0000000..cf145ec --- /dev/null +++ b/src/app/main/client/detalleCliente/DetalleCliente.tsx @@ -0,0 +1,9 @@ +import ListDetalleClienteRender from './DetalleClienteRender' + +const DetalleCliente = () => { + return ( + + ) +} + +export default DetalleCliente; diff --git a/src/app/main/client/detalleCliente/DetalleClienteConfig.tsx b/src/app/main/client/detalleCliente/DetalleClienteConfig.tsx new file mode 100644 index 0000000..95c0128 --- /dev/null +++ b/src/app/main/client/detalleCliente/DetalleClienteConfig.tsx @@ -0,0 +1,19 @@ +import {lazy} from 'react'; + +const Cliente = lazy(() => import('./DetalleCliente')); + +const DetalleClienteConfig = { + settings: { + layout: { + config: {} + } + }, + routes: [ + { + path: 'client/list', + element: + } + ] +}; + +export default DetalleClienteConfig; \ No newline at end of file diff --git a/src/app/main/client/detalleCliente/DetalleClienteRender.tsx b/src/app/main/client/detalleCliente/DetalleClienteRender.tsx new file mode 100644 index 0000000..887f16c --- /dev/null +++ b/src/app/main/client/detalleCliente/DetalleClienteRender.tsx @@ -0,0 +1,185 @@ +import FusePageSimple from '@fuse/core/FusePageSimple'; +import FuseSvgIcon from '@fuse/core/FuseSvgIcon'; +import { + Button, + IconButton, + Paper, + Table, + TableBody, + TableCell, + TableHead, + TablePagination, + TableRow, + Typography, + styled +} from "@mui/material"; +import clsx from 'clsx'; +import { format } from 'date-fns'; +import { useTranslation } from 'react-i18next'; +import { Link } from 'react-router-dom'; +import ResponsiveDialog from 'src/components/widgets/DialogDelete'; + +const Root = styled(FusePageSimple)(({ theme }) => ({ + '& .FusePageSimple-header': { + backgroundColor: theme.palette.background.paper, + boxShadow: `inset 0 0 0 1px ${theme.palette.divider}` + } +})); + +function ListDetalleClienteRender() { + const { t } = useTranslation('clients'); + const columns = [ + 'id', + 'Nombre Comercial', + 'Razon Social', + 'Identificación', + 'Teléfono', + 'Correo Electrónico', + 'Acciones', + ]; + + const rows = [ + { + id: 111, + nombreComercial:'Susana Noroña', + razonSocial: 'Susana Noroña', + identificacion: '1720336948', + telefono: '0984294253', + correo: 'cammmmm@test.com', + action:true, + }, + { + id: 555, + nombreComercial:'Camila Morales', + razonSocial: 'Camila Morales', + identificacion: '1720336948', + telefono: '0984294253', + correo: 'cammmmm@test.com', + action:true, + }, + { + id: 777, + nombreComercial:'Cristian Hernandez', + razonSocial: 'Cristian Hernandez', + identificacion: '1720336948', + telefono: '0984294253', + correo: 'cammmmm@test.com', + action:true, + }, + ]; + + return ( + +

{t('CLIENTES')}

+ + } + + content={ + + +
+ +
+ + {t('Detalle de clientes')} + +
+ +
+ +
+
+ +
+ + + + {columns.map((column, index) => ( + + + {column} + + + ))} + + + + + {rows.map((row, index) => ( + + {Object.entries(row).map(([key, value]) => { + switch (key) { + case 'action': { + return ( + +
+ {value} + + + heroicons-outline:pencil-alt + + + + +
+
+ ); + } + default: { + return ( + + {value} + + ); + } + } + })} +
+ ))} +
+
+
+ +
+ + + + + } + + + + + /> + ); +} + +export default ListDetalleClienteRender; + diff --git a/src/app/main/client/formularioCliente/ClienteInterfaz.ts b/src/app/main/client/formularioCliente/ClienteInterfaz.ts new file mode 100644 index 0000000..ab2255d --- /dev/null +++ b/src/app/main/client/formularioCliente/ClienteInterfaz.ts @@ -0,0 +1,73 @@ +export interface Client{ + nombreComercial: string; + razonSocial: string; + identificacion: string; + direccion: string; + telefono: string; + correoElectronico: string; +} + +/* const FormularioClienteRender = () => { + return ( + + + + + { + // Aquí manejas la lógica de envío del formulario + console.log(values); + setSubmitting(false); + }} + > + {({ isSubmitting }) => ( +
+ + + + + + {/* Agrega el resto de los campos y sus mensajes de error aquí */} + + {/* + + +
+ )} +
+
+ ); +}; + */} \ No newline at end of file diff --git a/src/app/main/client/formularioCliente/FormularioCliente.tsx b/src/app/main/client/formularioCliente/FormularioCliente.tsx new file mode 100644 index 0000000..c680361 --- /dev/null +++ b/src/app/main/client/formularioCliente/FormularioCliente.tsx @@ -0,0 +1,10 @@ +import React from 'react' +import FormularioClienteRender from './FormularioClienteRender' + +const FormularioCliente = () => { + return ( + + ) +} + +export default FormularioCliente diff --git a/src/app/main/client/formularioCliente/FormularioClienteConfig.tsx b/src/app/main/client/formularioCliente/FormularioClienteConfig.tsx new file mode 100644 index 0000000..8d243c5 --- /dev/null +++ b/src/app/main/client/formularioCliente/FormularioClienteConfig.tsx @@ -0,0 +1,19 @@ +import {lazy} from 'react'; + +const FormularioCliente = lazy(() => import('./FormularioCliente')); + +const FormularioClienteConfig = { + settings: { + layout: { + config: {} + } + }, + routes: [ + { + path: 'client/form', + element: + } + ] +}; + +export default FormularioClienteConfig; diff --git a/src/app/main/client/formularioCliente/FormularioClienteRender.tsx b/src/app/main/client/formularioCliente/FormularioClienteRender.tsx new file mode 100644 index 0000000..9340fd4 --- /dev/null +++ b/src/app/main/client/formularioCliente/FormularioClienteRender.tsx @@ -0,0 +1,188 @@ +import FusePageSimple from "@fuse/core/FusePageSimple"; +import { + Autocomplete, + Card, + CardActions, + CardContent, + CardHeader, + Divider, + TextField, + styled, + Button, + Grid, +} from "@mui/material"; +import { useState } from "react"; +import { Formik, Form, Field, ErrorMessage } from "formik"; +import * as Yup from "yup"; + + +const FormularioClienteRender = () => { + const [datosCargados, setDatosCargados] = useState(false); + + const validationSchema = Yup.object().shape({ + nombreComercial: Yup.string().required('El nombre comercial es requerido'), + razonSocial: Yup.string().required('La razón social es requerida'), + identificacion: Yup.string() + .required('La cédula o RUC es requerida') + .min(10, 'La cédula debe tener 10 digitos') + .max(13, 'El RUC debe tener 13 digitos'), + direccion: Yup.string().required('La dirección es requerida'), + telefono: Yup.string() + .required('El teléfono es requerido') + .matches(/^[0-9]{10}$/, 'El teléfono debe ser un número de 10 dígitos'), + correoElectronico: Yup.string() + .required('El correo electrónico es requerido') + .email('Ingrese un correo electrónico válido'), + }) + + return ( + + + + + { + console.log(values); + setSubmitting(false); + }} + > + + {({ isSubmitting, touched, errors }) => ( +
+ + + +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+
+
+ + + + +
+ )} +
+
+ ) +}; + +export default FormularioClienteRender; \ No newline at end of file diff --git a/src/app/main/firmaElectronica/Firma.tsx b/src/app/main/firmaElectronica/Firma.tsx new file mode 100644 index 0000000..3081992 --- /dev/null +++ b/src/app/main/firmaElectronica/Firma.tsx @@ -0,0 +1,37 @@ +import DemoContent from '@fuse/core/DemoContent'; +import FusePageSimple from '@fuse/core/FusePageSimple'; +import { useTranslation } from 'react-i18next'; +import { styled } from '@mui/material/styles'; +import FirmaRender from './FirmaRender'; + + +const Root = styled(FusePageSimple)(({ theme }) => ({ + '& .FusePageSimple-header': { + backgroundColor: theme.palette.background.paper, + borderBottomWidth: 1, + borderStyle: 'solid', + borderColor: theme.palette.divider + }, + '& .FusePageSimple-content': {}, + '& .FusePageSimple-sidebarHeader': {}, + '& .FusePageSimple-sidebarContent': {} +})); + +function Firma() { + const { t } = useTranslation('signature'); + + return( + +

{t('FIRMA ELECTRONICA')}

+ + } + content={ + + } + /> + ) +} + +export default Firma; \ No newline at end of file diff --git a/src/app/main/firmaElectronica/FirmaConfig.ts b/src/app/main/firmaElectronica/FirmaConfig.ts new file mode 100644 index 0000000..1a52058 --- /dev/null +++ b/src/app/main/firmaElectronica/FirmaConfig.ts @@ -0,0 +1,8 @@ +import { FuseRouteConfigsType } from "@fuse/utils/FuseUtils"; +import FormularioFirmaConfig from "./formularioFirma/FormularioFirmaConfig"; + +const firmaConfigs: FuseRouteConfigsType = [ + FormularioFirmaConfig +] + +export default firmaConfigs; \ No newline at end of file diff --git a/src/app/main/firmaElectronica/FirmaRender.tsx b/src/app/main/firmaElectronica/FirmaRender.tsx new file mode 100644 index 0000000..5f8c102 --- /dev/null +++ b/src/app/main/firmaElectronica/FirmaRender.tsx @@ -0,0 +1,11 @@ +import FormularioFirma from "./formularioFirma/FormularioFirma"; + +const ClientRender = () => { + return ( +
+ +
+ ) +} + +export default ClientRender; diff --git a/src/app/main/firmaElectronica/formularioFirma/FormularioFirma.tsx b/src/app/main/firmaElectronica/formularioFirma/FormularioFirma.tsx new file mode 100644 index 0000000..146de1b --- /dev/null +++ b/src/app/main/firmaElectronica/formularioFirma/FormularioFirma.tsx @@ -0,0 +1,10 @@ +import React from 'react' +import FormularioFirmaRender from './FormularioFirmaRender' + +const FormularioFirma = () => { + return ( + + ) +} + +export default FormularioFirma diff --git a/src/app/main/firmaElectronica/formularioFirma/FormularioFirmaConfig.tsx b/src/app/main/firmaElectronica/formularioFirma/FormularioFirmaConfig.tsx new file mode 100644 index 0000000..6583b76 --- /dev/null +++ b/src/app/main/firmaElectronica/formularioFirma/FormularioFirmaConfig.tsx @@ -0,0 +1,19 @@ +import {lazy} from 'react'; + +const FormularioFirma = lazy(() => import('./FormularioFirma')); + +const FormularioClienteConfig = { + settings: { + layout: { + config: {} + } + }, + routes: [ + { + path: 'signature/form', + element: + } + ] +}; + +export default FormularioClienteConfig; diff --git a/src/app/main/firmaElectronica/formularioFirma/FormularioFirmaRender.tsx b/src/app/main/firmaElectronica/formularioFirma/FormularioFirmaRender.tsx new file mode 100644 index 0000000..5af6223 --- /dev/null +++ b/src/app/main/firmaElectronica/formularioFirma/FormularioFirmaRender.tsx @@ -0,0 +1,200 @@ +import { useState } from "react"; +import { Formik, Form, Field, ErrorMessage } from "formik"; +import * as Yup from "yup"; +import { Card, CardActions, CardContent, CardHeader, Button, TextField } from "@mui/material"; + +const FormularioClienteRender = () => { + const [file, setFile] = useState(null); + + const validationSchema = Yup.object().shape({ + contrasena: Yup.string() + .required("La contraseña es requerida"), + /* .min(5, 'La contraseña debe tener como mínimo 8 caracteres') + .max(10, 'La contraseña debe tener como máximo 10 caracteres') + .matches(/[0-9]/, 'La contraseña requiere al menos un número') + .matches(/[a-z]/, 'La contraseña requiere al menos una letra minuscula') + .matches(/[A-Z]/, 'La contraseña requiere al menos una letra mayuscula'), */ + validarContrasena: Yup.string() + .required("La verificación de la contraseña es requerida") + .oneOf([Yup.ref('contrasena'), null], 'La contraseña debe coincidir con la anterior'), + + fechaCaducacion: Yup.date() + .required("La fecha de caducación es requerida") + .min(new Date(), "La fecha de caducación debe ser posterior a la fecha actual"), + + archivo: Yup.mixed() + .required("El archivo es requerido") + .test("fileFormat", "Solo se permiten archivos PDF", (value) => { + if (value) { + return value.type === "application/pdf"; + } + return true; + }), + }); + + const handleFileDrop = (event, setFieldValue) => { + event.preventDefault(); + const droppedFile = event.dataTransfer.files[0]; + setFile(droppedFile); + setFieldValue("archivo", droppedFile); + }; + + const handleFileChange = (event, setFieldValue) => { + const selectedFile = event.currentTarget.files[0]; + setFile(selectedFile); + setFieldValue("archivo", selectedFile); + }; + + return ( +
+

CONFIGURACIÓN DE LA FIRMA ELECTRÓNICA

+
+ + +
Para poder registrar su firma electrónica deberá
+
ingresar la siguiente información
+ + { + console.log(values); + setSubmitting(false); + }} + > + {({ isSubmitting, touched, errors, setFieldValue }) => ( +
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
handleFileDrop(event, setFieldValue)} onDragOver={(event) => event.preventDefault()}> +
+ +
+ + +
+ + + + +
+ )} +
+
+
+
+
+ ); +}; + +export default FormularioClienteRender; \ No newline at end of file diff --git a/src/app/main/invoice/InvoiceConfig.ts b/src/app/main/invoice/InvoiceConfig.ts index 4fe6cc5..b1420a8 100644 --- a/src/app/main/invoice/InvoiceConfig.ts +++ b/src/app/main/invoice/InvoiceConfig.ts @@ -9,4 +9,4 @@ const invoiceConfigs: FuseRouteConfigsType = [ GenerateInvoiceConfig ] -export default invoiceConfigs; \ No newline at end of file +export default invoiceConfigs; diff --git a/src/app/main/invoice/generateInvoice/components/dataClient/components/addClient/AddClient.tsx b/src/app/main/invoice/generateInvoice/components/dataClient/components/addClient/AddClient.tsx index e32d2f0..9509773 100644 --- a/src/app/main/invoice/generateInvoice/components/dataClient/components/addClient/AddClient.tsx +++ b/src/app/main/invoice/generateInvoice/components/dataClient/components/addClient/AddClient.tsx @@ -19,13 +19,21 @@ function AddClient({ open, setOpen, handleSelectClient }: Props) { telefono: '', correo: '' }, + validationSchema: Yup.object({ - nombreComercial: Yup.string().required('El campo es Obligatorio'), - razonSocial: Yup.string().required('El campo es Obligatorio'), - identificacion: Yup.string().required('El campo es Obligatorio'), - direccion: Yup.string().required('El campo es Obligatorio'), - telefono: Yup.string().required('El campo es Obligatorio'), - correo: Yup.string().required('El campo es Obligatorio').email('Correo no valido') + nombreComercial: Yup.string().required('El nombre comercial es requerido'), + razonSocial: Yup.string().required('La razón social es requerida'), + identificacion: Yup.string() + .required('La cédula o RUC es requerida') + .min(10, 'La cédula debe tener 10 digitos') + .max(13, 'El RUC debe tener 13 digitos'), + direccion: Yup.string().required('La dirección es requerida'), + telefono: Yup.string() + .required('El teléfono es requerido') + .matches(/^[0-9]{10}$/, 'El teléfono debe ser un número de 10 dígitos'), + correo: Yup.string() + .required('El correo electrónico es requerido') + .email('Ingrese un correo electrónico válido'), }), onSubmit: (value) => { handleSaveClient(value); diff --git a/src/app/main/invoice/generateInvoice/components/dataClient/components/addClient/AddClientRender.tsx b/src/app/main/invoice/generateInvoice/components/dataClient/components/addClient/AddClientRender.tsx index 6373c26..eeead5d 100644 --- a/src/app/main/invoice/generateInvoice/components/dataClient/components/addClient/AddClientRender.tsx +++ b/src/app/main/invoice/generateInvoice/components/dataClient/components/addClient/AddClientRender.tsx @@ -73,7 +73,7 @@ function AddClientRender({ open, setOpen, formik, handleOnChange }: Props) { > +
@@ -148,7 +148,7 @@ function ListDetalleProductoRender() { switch (key) { case "artEstado": { return ( - + -
+
+ {value} + heroicons-outline:pencil-alt -
-
+
); } + default: { return ( diff --git a/src/app/main/producto/formularioProducto/FormularioProducto.tsx b/src/app/main/producto/formularioProducto/FormularioProducto.tsx index 48054d4..00793de 100644 --- a/src/app/main/producto/formularioProducto/FormularioProducto.tsx +++ b/src/app/main/producto/formularioProducto/FormularioProducto.tsx @@ -6,4 +6,4 @@ const FormularioProducto = () => { ); }; -export default FormularioProducto; \ No newline at end of file +export default FormularioProducto; diff --git a/src/app/main/producto/formularioProducto/FormularioProductoRender.tsx b/src/app/main/producto/formularioProducto/FormularioProductoRender.tsx index 045ac80..ea50504 100644 --- a/src/app/main/producto/formularioProducto/FormularioProductoRender.tsx +++ b/src/app/main/producto/formularioProducto/FormularioProductoRender.tsx @@ -12,141 +12,214 @@ import { Grid, } from "@mui/material"; import { useState } from "react"; +import { Formik, Form, Field, ErrorMessage } from "formik"; +import * as Yup from "yup"; const FormularioProductoRender = () => { - const [formData, setFormData] = useState({ - codigo: "", - tipo: "", - nombre: "", - descripcion: "", - stockMinimo: "", - margenGanancia: "", - estado: "", - }); - const [datosCargados, setDatosCargados] = useState(false); - const cargarDatosDesdeBD = () => { - setDatosCargados(true); - }; + const validationSchema = Yup.object().shape({ + codigo: Yup.string().required("El código es requerido"), + tipo: Yup.string().required("El tipo es requerido"), + nombre: Yup.string().required("El nombre es requerido"), + estado: Yup.string().required("El estado es requerido"), + stockMinimo: Yup.string().required("El stock mínimo es requerido"), + margenGanancia: Yup.string().required("El margen de ganancia es requerido"), + descripcion: Yup.string().required("La descripción es requerida"), + }); return ( - - - - ( - - )} - /> + - - ( - - )} - /> - - - - - - - - - { + console.log(values); + setSubmitting(false); + }} > - - {datosCargados && ( - + {({ isSubmitting, touched, errors, setFieldTouched }) => ( +
+ + + +
+ + +
+ +
+ setFieldTouched("tipo", true)} + renderInput={(params) => ( + + )} + /> + +
+ +
+ + +
+ +
+ setFieldTouched("estado", true)} + renderInput={(params) => ( + + )} + /> + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+
+ + + + {datosCargados && ( + + )} + +
)} -
+
); }; diff --git a/src/components/widgets/BuscarProducto.tsx b/src/components/widgets/BuscarProducto.tsx new file mode 100644 index 0000000..56447f5 --- /dev/null +++ b/src/components/widgets/BuscarProducto.tsx @@ -0,0 +1,81 @@ +import * as React from 'react'; +import { styled, alpha } from '@mui/material/styles'; +import Box from '@mui/material/Box'; +import Toolbar from '@mui/material/Toolbar'; +import IconButton from '@mui/material/IconButton'; +import Typography from '@mui/material/Typography'; +import InputBase from '@mui/material/InputBase'; +import FuseSvgIcon from '@fuse/core/FuseSvgIcon'; +import FuseSearch from '@fuse/core/FuseSearch'; +import { Card } from '@mui/material'; +import { color } from '@mui/system'; + +const Search = styled('div')(({ theme }) => ({ + position: 'relative', + borderRadius: theme.shape.borderRadius, + backgroundColor: alpha(theme.palette.common.black, 0.06), + '&:hover': { + /* backgroundColor: alpha(theme.palette.common.white, 0.25), */ + }, + width: '100%', + [theme.breakpoints.up('sm')]: { + /* marginLeft: theme.spacing(), */ + width: 'auto', + }, +})); + +const SearchIconWrapper = styled('div')(({ theme }) => ({ + padding: theme.spacing(0, 2), + height: '100%', + position: 'absolute', + pointerEvents: 'none', + display: 'flex', + alignItems: 'center', + justifyContent: 'center', +})); + +const StyledInputBase = styled(InputBase)(({ theme }) => ({ + color: 'inherit', + width: '100%', + '& .MuiInputBase-input': { + padding: theme.spacing(1, 1, 1, 0), + // vertical padding + font size from searchIcon + paddingLeft: `calc(1em + ${theme.spacing(4)})`, + transition: theme.transitions.create('width'), + }, +})); + +function BuscarProducto() { + return ( + +
+ + {("Buscar producto")} + + + + + + heroicons-outline:search + + + + + +
+
+ ); +} + +export default BuscarProducto; \ No newline at end of file diff --git a/src/components/widgets/DialogDelete.tsx b/src/components/widgets/DialogDelete.tsx new file mode 100644 index 0000000..bb61900 --- /dev/null +++ b/src/components/widgets/DialogDelete.tsx @@ -0,0 +1,59 @@ +import FuseSvgIcon from "@fuse/core/FuseSvgIcon"; +import { + Button, + useMediaQuery, + useTheme, + Dialog, + DialogTitle, + DialogContent, + DialogContentText, + DialogActions, + IconButton, +} from "@mui/material"; +import React from "react"; + +function ResponsiveDialog() { + const [open, setOpen] = React.useState(false); + const theme = useTheme(); + const fullScreen = useMediaQuery(theme.breakpoints.down("sm")); + + const handleClickOpen = () => { + setOpen(true); + }; + + const handleClose = () => { + setOpen(false); + }; + + return ( +
+ + heroicons-outline:trash + + + {"Confirmar"} + + + Este elemento se eliminará permanentemente. ¿Deseas continuar?. + + + + + + + +
+ ); +} + +export default ResponsiveDialog; diff --git a/src/components/widgets/types/DetalleProductoType.ts b/src/components/widgets/types/DetalleProductoType.ts new file mode 100644 index 0000000..a2a356b --- /dev/null +++ b/src/components/widgets/types/DetalleProductoType.ts @@ -0,0 +1,14 @@ +type DetalleProductoRow = { + artCodigo: number; + artNombre: string; + artDescripcion: string; + artStockMinimo: number; + artEstado: any; +}; + +type DetalleProductoType = { + columns: string[]; + rows: DetalleProductoRow[]; +}; + +export default DetalleProductoType; \ No newline at end of file