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