Dar acceso de visualizacion a los tabuladores de los traficos al resto de departamentos

feature/ConsolidarPedimentos_20231229
Felix Morales 11 months ago
parent b918c89d9a
commit 3951e7c8c1
  1. 11
      src/Components/Corresponsales/Tabulador/Tabulador.tsx
  2. 7
      src/Components/Corresponsales/TraficoCorresponsales.tsx
  3. 2
      src/Components/Utils/ControlledInput/ControlledInput.tsx

@ -18,6 +18,7 @@ interface IProps {
NombreCliente: string
closeTabulador: (arg: boolean) => void
cambiaPrecuenta: (IDPrecuenta: number) => void
Depto: string
}
interface IselectedRows {
@ -56,7 +57,7 @@ export const Tabulador: FC<IProps> = (props) => {
name: 'Costo',
width: '15%',
cell: (row: ITabuladorConceptos) => {
return <ControlledInput id={row.id} value={row.costo} disabled={true} postCost={(id, value) => {}} />
return <ControlledInput id={row.id} value={row.costo.toFixed(2)} disabled={true} postCost={(id, value) => {}} />
/*return row.activo === 1 ? (
<ControlledInput id={row.id} value={row.costo} disabled={true} postCost={(id, value) => {}} />
) : (
@ -77,6 +78,7 @@ export const Tabulador: FC<IProps> = (props) => {
onChange={() => {
switchConcept(row.id, row.activo ? 0 : 1)
}}
disabled={props.Depto !== 'Corresponsalias'}
/>
</Form.Group>
)
@ -229,6 +231,7 @@ export const Tabulador: FC<IProps> = (props) => {
onChange={(e) => setIDTabulador(parseInt(e.target.value))}
className='form-select form-select-sm'
style={{ fontSize: '15px' }}
disabled={props.Depto !== 'Corresponsalias'}
>
<option value='0'>- No tiene tabulador asignado -</option>
{Tabuladores
@ -239,7 +242,9 @@ export const Tabulador: FC<IProps> = (props) => {
</Form.Control>
</Col>
<Col xs={1}>
<Button
{
(props.Depto === 'Corresponsalias')
? <Button
variant='primary'
size='sm'
style={{ paddingLeft: '10px', paddingRight: '10px' }}
@ -247,6 +252,8 @@ export const Tabulador: FC<IProps> = (props) => {
>
Guardar
</Button>
: ''
}
</Col>
</Row>
</Alert>

@ -1644,11 +1644,7 @@ export default function TraficoCorresponsales (props:IProps) {
<Col sm={6} md={6} lg={8}>
<Form.Label style={{ width:'100%' }}>
<IconContext.Provider value={{ color: 'blue', size: '15px' }}>
<span onClick={() => {
return (Depto === 'Corresponsalias' || Depto === 'Sistemas')
? showModalBox(10)
: ''
}}
<span onClick={() => {showModalBox(10)}}
style={{ cursor: 'pointer' }}>
<FcTimeline />&nbsp;Precuenta
</span>
@ -4235,6 +4231,7 @@ export default function TraficoCorresponsales (props:IProps) {
cambiaPrecuenta={function (idTab: number): void {
setIDTabulador(idTab)
}}
Depto={Depto}
/>
</div>
) : null}

@ -3,7 +3,7 @@ import { MsgInformativo } from '../Toast/msgInformativo'
interface IProps {
id: number
value: number
value: number | string
disabled?: boolean
postCost: (id: number, value: number) => void
}

Loading…
Cancel
Save