correcciones
This commit is contained in:
parent
31dc8c9478
commit
bfa3be924a
|
|
@ -14,14 +14,6 @@ i18next.addResourceBundle('es', 'navigation', es);
|
|||
* The navigationConfig object is an array of navigation items for the Fuse application.
|
||||
*/
|
||||
const navigationConfig: FuseNavItemType[] = [
|
||||
{
|
||||
id: 'example-component',
|
||||
title: 'Example',
|
||||
translate: 'EXAMPLE',
|
||||
type: 'item',
|
||||
icon: 'heroicons-outline:star',
|
||||
url: 'example'
|
||||
},
|
||||
{
|
||||
id: 'dashboard-component',
|
||||
title: 'Dashboard',
|
||||
|
|
|
|||
|
|
@ -7,12 +7,18 @@ import SignInConfig from '../main/sign-in/SignInConfig';
|
|||
import SignUpConfig from '../main/sign-up/SignUpConfig';
|
||||
import SignOutConfig from '../main/sign-out/SignOutConfig';
|
||||
import Error404Page from '../main/404/Error404Page';
|
||||
import ExampleConfig from '../main/example/ExampleConfig';
|
||||
import ProjectDashboardAppConfig from '../main/dashboard/project/ProjectDashboardAppConfig';
|
||||
import ProductoConfigs from '../main/producto/ProductoConfig'
|
||||
import ProductoConfigs from '../main/producto/ProductoConfig';
|
||||
import InvoiceConfigs from '../main/invoice/InvoiceConfig';
|
||||
|
||||
const routeConfigs: FuseRouteConfigsType = [ExampleConfig, SignOutConfig, SignInConfig, SignUpConfig, ProjectDashboardAppConfig, ...ProductoConfigs, ...InvoiceConfigs];
|
||||
const routeConfigs: FuseRouteConfigsType = [
|
||||
SignOutConfig,
|
||||
SignInConfig,
|
||||
SignUpConfig,
|
||||
ProjectDashboardAppConfig,
|
||||
...ProductoConfigs,
|
||||
...InvoiceConfigs
|
||||
];
|
||||
|
||||
/**
|
||||
* The routes of the application.
|
||||
|
|
@ -21,7 +27,7 @@ const routes: FuseRoutesType = [
|
|||
...FuseUtils.generateRoutesFromConfigs(routeConfigs, settingsConfig.defaultAuth),
|
||||
{
|
||||
path: '/',
|
||||
element: <Navigate to="/example" />,
|
||||
element: <Navigate to="/dashboards/project" />,
|
||||
auth: settingsConfig.defaultAuth
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -16,8 +16,8 @@ function Error404Page() {
|
|||
>
|
||||
<Box
|
||||
component="svg"
|
||||
width="100%"
|
||||
height="100%"
|
||||
width="80%"
|
||||
height="80%"
|
||||
viewBox="0 0 1075 585"
|
||||
fill="none"
|
||||
preserveAspectRatio="xMidYMax slice"
|
||||
|
|
@ -243,7 +243,7 @@ function Error404Page() {
|
|||
color="text.secondary"
|
||||
className="mt-8 text-center text-lg font-medium tracking-tight md:text-xl"
|
||||
>
|
||||
The page you requested could not be found.
|
||||
La página a la que se quiere acceder no existe.
|
||||
</Typography>
|
||||
</motion.div>
|
||||
<Link
|
||||
|
|
|
|||
|
|
@ -1,111 +1,163 @@
|
|||
import { useState } from "react";
|
||||
import FuseSvgIcon from "@fuse/core/FuseSvgIcon";
|
||||
import {
|
||||
Autocomplete,
|
||||
Box,
|
||||
Divider,
|
||||
Grid,
|
||||
TextField,
|
||||
Typography,
|
||||
Button,
|
||||
} from "@mui/material";
|
||||
import AddClient from "./components/addClient/AddClient";
|
||||
import { Client } from "./DataClientInterfaz";
|
||||
import { useState } from 'react';
|
||||
import FuseSvgIcon from '@fuse/core/FuseSvgIcon';
|
||||
import { Autocomplete, Box, Divider, Grid, TextField, Typography, Button } from '@mui/material';
|
||||
import AddClient from './components/addClient/AddClient';
|
||||
import { Client } from './DataClientInterfaz';
|
||||
|
||||
interface Props {
|
||||
client: Client[];
|
||||
handleSelectClient: (value: Client) => void;
|
||||
selectClient: Client;
|
||||
client: Client[];
|
||||
handleSelectClient: (value: Client) => void;
|
||||
selectClient: Client;
|
||||
}
|
||||
function DataClientRender({ client, handleSelectClient, selectClient }: Props) {
|
||||
const [openDialog, setOpenDialog] = useState<boolean>(false);
|
||||
return (
|
||||
<Box className="mt-10 p-20 shadow-2 rounded-8">
|
||||
<AddClient open={openDialog} setOpen={setOpenDialog} handleSelectClient={handleSelectClient}/>
|
||||
<Grid container spacing={2}>
|
||||
<Grid item xs={12} md={10}>
|
||||
<Typography component="h3" className="mb-7 text-16">
|
||||
Datos cliente
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={12} md={2} className="flex justify-end">
|
||||
<Button
|
||||
color="primary"
|
||||
variant="outlined"
|
||||
className="rounded-6"
|
||||
size="small"
|
||||
onClick={() => setOpenDialog(true)}
|
||||
startIcon={
|
||||
<FuseSvgIcon className="text-48" size={24} color="action">
|
||||
heroicons-outline:plus
|
||||
</FuseSvgIcon>
|
||||
}
|
||||
>
|
||||
Agregar{" "}
|
||||
</Button>
|
||||
</Grid>
|
||||
<Grid item xs={12}>
|
||||
<Divider className="border-1 mb-10" />
|
||||
</Grid>
|
||||
<Grid item xs={12} md={12}>
|
||||
<Autocomplete
|
||||
className="mt-8 mb-16"
|
||||
options={client}
|
||||
getOptionLabel={(option) => option.razonSocial}
|
||||
noOptionsText="No se encontro un resultado"
|
||||
size="small"
|
||||
value={selectClient}
|
||||
onChange={(event, newValue) => {
|
||||
handleSelectClient(newValue);
|
||||
}}
|
||||
renderInput={(params) => (
|
||||
<TextField
|
||||
{...params}
|
||||
placeholder="Busque el cliente"
|
||||
label="Cliente"
|
||||
variant="outlined"
|
||||
InputLabelProps={{
|
||||
shrink: true,
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
</Grid>
|
||||
<Grid item md={12}>
|
||||
<Divider />
|
||||
</Grid>
|
||||
{selectClient ? (
|
||||
<>
|
||||
<Grid item md={4} xs={12}>
|
||||
<b>Razón Social:</b> {selectClient.razonSocial}
|
||||
</Grid>
|
||||
<Grid item md={4} xs={12}>
|
||||
<b>Nombre Comercial:</b> {selectClient.nombreComercial}
|
||||
</Grid>
|
||||
<Grid item md={4} xs={12}>
|
||||
<b>Ruc:</b> {selectClient.identificacion}
|
||||
</Grid>
|
||||
const [openDialog, setOpenDialog] = useState<boolean>(false);
|
||||
return (
|
||||
<Box className="mt-10 p-20 shadow-2 rounded-8">
|
||||
<AddClient
|
||||
open={openDialog}
|
||||
setOpen={setOpenDialog}
|
||||
handleSelectClient={handleSelectClient}
|
||||
/>
|
||||
<Grid
|
||||
container
|
||||
spacing={2}
|
||||
>
|
||||
<Grid
|
||||
item
|
||||
xs={12}
|
||||
md={10}
|
||||
>
|
||||
<Typography
|
||||
component="h3"
|
||||
className="mb-7 text-16"
|
||||
>
|
||||
Datos cliente
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid
|
||||
item
|
||||
xs={12}
|
||||
md={2}
|
||||
className="flex justify-end"
|
||||
>
|
||||
<Button
|
||||
color="primary"
|
||||
variant="outlined"
|
||||
className="rounded-6"
|
||||
size="small"
|
||||
onClick={() => setOpenDialog(true)}
|
||||
startIcon={
|
||||
<FuseSvgIcon
|
||||
className="text-48"
|
||||
size={24}
|
||||
color="action"
|
||||
>
|
||||
heroicons-outline:plus
|
||||
</FuseSvgIcon>
|
||||
}
|
||||
>
|
||||
Agregar{' '}
|
||||
</Button>
|
||||
</Grid>
|
||||
<Grid
|
||||
item
|
||||
xs={12}
|
||||
>
|
||||
<Divider className="border-1 mb-10" />
|
||||
</Grid>
|
||||
<Grid
|
||||
item
|
||||
xs={12}
|
||||
md={12}
|
||||
>
|
||||
<Autocomplete
|
||||
className="mt-8 mb-16"
|
||||
options={client}
|
||||
getOptionLabel={(option) => option.razonSocial}
|
||||
noOptionsText="No se encontro un resultado"
|
||||
size="small"
|
||||
value={selectClient}
|
||||
onChange={(event, newValue) => {
|
||||
handleSelectClient(newValue);
|
||||
}}
|
||||
renderInput={(params) => (
|
||||
<TextField
|
||||
{...params}
|
||||
placeholder="Busque el cliente"
|
||||
label="Cliente"
|
||||
variant="outlined"
|
||||
InputLabelProps={{
|
||||
shrink: true
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
</Grid>
|
||||
<Grid
|
||||
item
|
||||
md={12}
|
||||
>
|
||||
<Divider />
|
||||
</Grid>
|
||||
{selectClient ? (
|
||||
<>
|
||||
<Grid
|
||||
item
|
||||
md={4}
|
||||
xs={12}
|
||||
>
|
||||
<b>Razón Social:</b> {selectClient.razonSocial}
|
||||
</Grid>
|
||||
<Grid
|
||||
item
|
||||
md={4}
|
||||
xs={12}
|
||||
>
|
||||
<b>Nombre Comercial:</b> {selectClient.nombreComercial}
|
||||
</Grid>
|
||||
<Grid
|
||||
item
|
||||
md={4}
|
||||
xs={12}
|
||||
>
|
||||
<b>Ruc:</b> {selectClient.identificacion}
|
||||
</Grid>
|
||||
|
||||
<Grid item md={4} xs={12}>
|
||||
<b>Dirección:</b> {selectClient.direccion}
|
||||
</Grid>
|
||||
<Grid item md={4} xs={12}>
|
||||
<b>Teléfono:</b> {selectClient.telefono}
|
||||
</Grid>
|
||||
<Grid item md={4} xs={12}>
|
||||
<b>Correo:</b> {selectClient.correo}
|
||||
</Grid>
|
||||
</>
|
||||
) : (
|
||||
<Box className="flex justify-center w-full mt-20">
|
||||
<Typography variant="subtitle2" gutterBottom>
|
||||
Seleccione o agrege el cliente
|
||||
</Typography>
|
||||
</Box>
|
||||
)}
|
||||
</Grid>
|
||||
</Box>
|
||||
);
|
||||
<Grid
|
||||
item
|
||||
md={4}
|
||||
xs={12}
|
||||
>
|
||||
<b>Dirección:</b> {selectClient.direccion}
|
||||
</Grid>
|
||||
<Grid
|
||||
item
|
||||
md={4}
|
||||
xs={12}
|
||||
>
|
||||
<b>Teléfono:</b> {selectClient.telefono}
|
||||
</Grid>
|
||||
<Grid
|
||||
item
|
||||
md={4}
|
||||
xs={12}
|
||||
>
|
||||
<b>Correo:</b> {selectClient.correo}
|
||||
</Grid>
|
||||
</>
|
||||
) : (
|
||||
<Box className="flex justify-center w-full mt-20">
|
||||
<Typography
|
||||
variant="subtitle2"
|
||||
gutterBottom
|
||||
>
|
||||
Seleccione o agrege el cliente
|
||||
</Typography>
|
||||
</Box>
|
||||
)}
|
||||
</Grid>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
export default DataClientRender;
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ function ListInvoiceRender() {
|
|||
</div>
|
||||
}
|
||||
content={
|
||||
<Paper className="flex flex-col flex-auto p-24 shadow rounded-2 overflow-hidden mt-6">
|
||||
<Paper className="flex flex-col flex-auto p-24 shadow rounded-2 overflow-hidden m-10">
|
||||
<div className="flex md:flex-row justify-between flex-col">
|
||||
<div>
|
||||
<Typography className="mr-16 text-lg font-medium tracking-tight leading-6 truncate">
|
||||
|
|
|
|||
Loading…
Reference in New Issue