Se cambia la forma en la que se determina el ancho del modal que muestra otros componentes durante la captura de un trafico

feature/cambiar_propiedades_modal_de_traficos_20240208
Felix Morales 8 months ago
parent 21a58970aa
commit 68907a58f8
  1. 2
      src/Components/Catalogos/CatCorresponsales/ControlledInput/ControlledInput.tsx
  2. 2
      src/Components/Corresponsales/ProveedorFactura/ProveedorFactura.tsx
  3. 42
      src/Components/Corresponsales/TraficoCorresponsales.tsx
  4. 5
      src/css/generic01.css

@ -98,7 +98,7 @@ export const ControlledInput: FC<IProps> = (props) => {
onChange={onChangeEmail} onChange={onChangeEmail}
disabled={false} disabled={false}
onKeyDown={(e) => handleKeyDown(e, 2)} onKeyDown={(e) => handleKeyDown(e, 2)}
style={{ width: '650px', textAlign: 'left' }} style={{ width: '450px', textAlign: 'left' }}
/> />
<MsgInformativo <MsgInformativo
show={show} show={show}

@ -356,7 +356,7 @@ export const ProveedorFactura: FC<IProps> = (props) => {
fontSize: '18px', fontSize: '18px',
backgroundColor: '#F5FFED', backgroundColor: '#F5FFED',
border: '2px solid #25D05B', border: '2px solid #25D05B',
width: '100px', width: '100%',
textAlign: 'right', textAlign: 'right',
borderRadius: '10px', borderRadius: '10px',
}} }}

@ -193,7 +193,8 @@ export default function TraficoCorresponsales (props:IProps) {
(state:RootState) => state.CPedimentosConsolidados.PedimentosConsolidados (state:RootState) => state.CPedimentosConsolidados.PedimentosConsolidados
) )
const [ModalSize, setModalSize] = useState('sm') const [ModalClassName, setModalClassName] = useState('')
const [ModalCentered, setModalCentered] = useState(false)
const [showModal, setShowModal] = useState(false) const [showModal, setShowModal] = useState(false)
const [LoadComponent, setLoadComponent] = useState(0) const [LoadComponent, setLoadComponent] = useState(0)
const [IDTrafico, setIDTrafico] = useState(props.IDTrafico) const [IDTrafico, setIDTrafico] = useState(props.IDTrafico)
@ -1126,10 +1127,10 @@ export default function TraficoCorresponsales (props:IProps) {
} }
}, [FechaDesaduanamiento, FAlmacenajeInicioGastos, CostoDiario]) }, [FechaDesaduanamiento, FAlmacenajeInicioGastos, CostoDiario])
function showModalBox(i: number) { function showModalBox(i: number, className: string, modalCentered: boolean) {
setLoadComponent(i) setLoadComponent(i)
if (i === 1) setModalSize('lg') setModalClassName(className)
else setModalSize('sm') setModalCentered(modalCentered)
setShowModal(true) setShowModal(true)
} }
@ -1463,10 +1464,6 @@ export default function TraficoCorresponsales (props:IProps) {
}) })
} }
const showHistorialRectificaciones = () => {
setLoadComponent(14);
setShowModal(true);
}
return ( return (
<div style={{height:'100%', overflowY:'scroll'}}> <div style={{height:'100%', overflowY:'scroll'}}>
<Card className="labelSize13px" style={{borderStyle:'none', height:'100%'}}> <Card className="labelSize13px" style={{borderStyle:'none', height:'100%'}}>
@ -1501,7 +1498,7 @@ export default function TraficoCorresponsales (props:IProps) {
<Col sm={3} md={2} lg={4}> <Col sm={3} md={2} lg={4}>
<Form.Label <Form.Label
onClick={() => { onClick={() => {
showModalBox(11) showModalBox(11, 'modal-50w', false)
}} }}
style={{ cursor: 'pointer', display: 'flex'}} style={{ cursor: 'pointer', display: 'flex'}}
> >
@ -1645,7 +1642,7 @@ export default function TraficoCorresponsales (props:IProps) {
<Col sm={6} md={6} lg={8}> <Col sm={6} md={6} lg={8}>
<Form.Label style={{ width:'100%' }}> <Form.Label style={{ width:'100%' }}>
<IconContext.Provider value={{ color: 'blue', size: '15px' }}> <IconContext.Provider value={{ color: 'blue', size: '15px' }}>
<span onClick={() => {showModalBox(10)}} <span onClick={() => {showModalBox(10, 'modal-50w', false)}}
style={{ cursor: 'pointer' }}> style={{ cursor: 'pointer' }}>
<FcTimeline />&nbsp;Precuenta <FcTimeline />&nbsp;Precuenta
</span> </span>
@ -1740,7 +1737,7 @@ export default function TraficoCorresponsales (props:IProps) {
<Form.Label <Form.Label
onClick={() => { onClick={() => {
return Depto === 'Corresponsalias' return Depto === 'Corresponsalias'
? showModalBox(1) ? showModalBox(1, 'modal-90w', false)
: '' : ''
}} }}
style={{ cursor: 'pointer' }} style={{ cursor: 'pointer' }}
@ -1969,7 +1966,7 @@ export default function TraficoCorresponsales (props:IProps) {
<Row className='justify-content-between' style={{alignItems:'center'}}> <Row className='justify-content-between' style={{alignItems:'center'}}>
<Col sm={5} md={5} lg={5}> <Col sm={5} md={5} lg={5}>
<Button variant="success" <Button variant="success"
onClick={()=>{setLoadComponent(13);setShowModal(true);}} onClick={()=>{showModalBox(13, 'modal-70w', false)}}
style={{width:'100%', padding:'6px'}} style={{width:'100%', padding:'6px'}}
> >
{LblPedimentos} {LblPedimentos}
@ -2145,7 +2142,7 @@ export default function TraficoCorresponsales (props:IProps) {
<legend className='w-auto' style={{float:'none', fontSize:'1rem'}}>Última Rectificación</legend> <legend className='w-auto' style={{float:'none', fontSize:'1rem'}}>Última Rectificación</legend>
<Row className='justify-content-between' style={{alignItems:'center', paddingTop:'15px'}}> <Row className='justify-content-between' style={{alignItems:'center', paddingTop:'15px'}}>
<Col sm={5} md={4} lg={4}> <Col sm={5} md={4} lg={4}>
<Button variant="success" style={{width:'100%', padding:'6px'}} onClick={() => {showHistorialRectificaciones()}}>{LblRectificaciones}</Button> <Button variant="success" style={{width:'100%', padding:'6px'}} onClick={() => {showModalBox(14, 'modal-70w', false)}}>{LblRectificaciones}</Button>
</Col> </Col>
<Col sm={1} md={1} lg={2}> <Col sm={1} md={1} lg={2}>
<Form.Label>Aduana</Form.Label> <Form.Label>Aduana</Form.Label>
@ -2423,7 +2420,7 @@ export default function TraficoCorresponsales (props:IProps) {
value={{ color: 'green', size: '15px' }} value={{ color: 'green', size: '15px' }}
> >
<BiDownload onClick={() => {GetFacturasExcel()}} style={{ cursor: 'pointer' }}/>&nbsp; <BiDownload onClick={() => {GetFacturasExcel()}} style={{ cursor: 'pointer' }}/>&nbsp;
<span onClick={() => {showModalBox(2)}} style={{ cursor: 'pointer' }}><HiCurrencyDollar />&nbsp;{LblFacturas}</span> <span onClick={() => {showModalBox(2, 'modal-85w', false)}} style={{ cursor: 'pointer' }}><HiCurrencyDollar />&nbsp;{LblFacturas}</span>
</IconContext.Provider> </IconContext.Provider>
</Form.Label> </Form.Label>
@ -2577,7 +2574,7 @@ export default function TraficoCorresponsales (props:IProps) {
<Col sm={2}> <Col sm={2}>
<Form.Label <Form.Label
onClick={() => { onClick={() => {
showModalBox(9) showModalBox(9, 'modal-85w', false)
}} }}
style={{ cursor: 'pointer' }} style={{ cursor: 'pointer' }}
> >
@ -2660,7 +2657,7 @@ export default function TraficoCorresponsales (props:IProps) {
<Form.Label <Form.Label
id="LinkFacturasTerceros" id="LinkFacturasTerceros"
onClick={() => { onClick={() => {
showModalBox(4) showModalBox(4, 'modal-50w', false)
}} }}
style={{ cursor: 'pointer' }} style={{ cursor: 'pointer' }}
> >
@ -3022,7 +3019,7 @@ export default function TraficoCorresponsales (props:IProps) {
<Col xs={2}> <Col xs={2}>
<Form.Label <Form.Label
onClick={() => { onClick={() => {
showModalBox(2) showModalBox(2, 'modal-85w', false)
}} }}
style={{ cursor: 'pointer', width:'100%'}} style={{ cursor: 'pointer', width:'100%'}}
> >
@ -4183,12 +4180,9 @@ export default function TraficoCorresponsales (props:IProps) {
<Modal <Modal
show={showModal} show={showModal}
onHide={handleClose} onHide={handleClose}
size={LoadComponent === 1 || LoadComponent === 7 ? 'lg' : 'sm'} dialogClassName={ModalClassName}
dialogClassName={ centered={ModalCentered}
LoadComponent === 1 || LoadComponent === 2 || LoadComponent === 9 //backdropClassName='brightness(0.5)'
? 'modal-90w'
: LoadComponent === 13 || LoadComponent === 14 ? 'modal-70w' : 'modal-50w'
}
style={{backdropFilter:'brightness(0.5)'}} style={{backdropFilter:'brightness(0.5)'}}
> >
<Modal.Body> <Modal.Body>
@ -4222,7 +4216,7 @@ export default function TraficoCorresponsales (props:IProps) {
</div> </div>
) : null} ) : null}
{LoadComponent === 9 ? ( {LoadComponent === 9 ? (
<div style={{ height: '350px'}}> <div style={{ height: '400px'}}>
<Anticipos <Anticipos
IDTrafico={IDTrafico} IDTrafico={IDTrafico}
FolioTrafico={FolioTrafico} FolioTrafico={FolioTrafico}

@ -19,6 +19,11 @@
max-width: none !important; max-width: none !important;
} }
.modal-85w {
width: 85%;
max-width: none !important;
}
.modal-90w { .modal-90w {
width: 90%; width: 90%;
max-width: none !important; max-width: none !important;

Loading…
Cancel
Save