ÿØÿà JFIF  ` ` ÿþš 403 WEBHELL REBORN
403 WEBHELL REBORN
Server : Apache
System : Linux cloud.heroica.com.br 4.18.0-553.36.1.el8_10.x86_64 #1 SMP Wed Jan 22 03:07:54 EST 2025 x86_64
User : farolpborg ( 1053)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /var/www/node_services/novosisneg/frontend/src/pages/Endereco/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

Buat Folder Baru:
Buat File Baru:

Current File : //var/www/node_services/novosisneg/frontend/src/pages/Endereco/index.tsx
import  {FormEvent , useState} from 'react'

import {Helmet} from "react-helmet";

import {Container, Row, Col, Form, Button} from "react-bootstrap";

import {useNavigate } from 'react-router-dom';
import KeyVAlueStepper from "../../components/KeyVAlueStepper.tsx";
import ReactComponent from "../../assets/sebrae.svg";
import HeroicaSvg from "../../assets/heroica.svg";

function Endereco(){
    const navigate = useNavigate();


    const [cep , setCep] = useState('');
    const [cidade , setCidade] = useState('');
    const [numero , setNumero] = useState('');
    const [uf , setUf] = useState('');
    const [logradouro , setLogradouro] = useState('');
    const [complemento , setComplemento] = useState('');
    const [bairro , setBairro] = useState('');
    const [obs , setObs] = useState('');

    async function onHandleClick(event:FormEvent<HTMLFormElement>){
        event.preventDefault();
        navigate('/dadosdaempresa')
    }

    async function voltar(){
        navigate('/')
    }

    async function onhandleCep(cep:string){
        const string_cep = cep.replace(/[^0-9]/g, '');
        if(string_cep.length === 8){
            const urlcep = `https://viacep.com.br/ws/${string_cep}/json/`
            fetch(urlcep).then(async(res) => {
                const dataresponse = await res.json();
                setCidade(dataresponse.localidade)
                setUf(dataresponse.uf)
                setLogradouro(dataresponse.logradouro)
                setComplemento(dataresponse.complemento)
                setBairro(dataresponse.bairro)
            })
        }
    }

    return (
        <>
            <Helmet>
                <title>SisNeg - Endereço</title>
            </Helmet>


            <Container fluid>

                <Row className="justify-content-center">


                    <Col xs={12} lg={7}>

                        <Col xs={12} className=" mt-3">
                            <Row>
                                <Col style={{height:'5vh'}} xs={12} className="text-left justify-content-start ">
                                    <img
                                        src={ReactComponent}
                                        alt=""
                                        style={{
                                            height: '100%',
                                            background: '#fff'
                                        }}
                                        className={'mx-2'}
                                    />

                                    <img
                                        src={HeroicaSvg}
                                        alt=""
                                        style={{
                                            height: '100%',
                                            background: '#fff'
                                        }}
                                    />
                                </Col>
                            </Row>

                        </Col>

                        <KeyVAlueStepper actvestep={1} />

                        <Col xs={12}>
                            <h2 style={{textAlign:"center"}}>Endereço da empresa</h2>
                        </Col>

                        <Form onSubmit={onHandleClick}>

                            <Row>
                                <hr/>
                                <Col xs={12} >
                                    <Form.Group as={Row} className="mb-3" >
                                        <Form.Label htmlFor={'cep'} column sm="2" className={'labels_cadastrar_form'} >
                                            CEP:
                                        </Form.Label>
                                        <Col sm="10">
                                            <Form.Control id={'cep'} type={'text'} value={cep} onChange={(e)=>setCep(e.target.value)} onBlur={(e)=>onhandleCep(e.target.value)} placeholder="Insira seu cep aqui..."   />
                                        </Col>
                                    </Form.Group>
                                </Col>
                                <Col xs={12}>
                                    <Form.Group as={Row} className="mb-3" controlId="logradouro">
                                        <Form.Label column sm="2" className={'labels_cadastrar_form'}>
                                            Logradouro:
                                        </Form.Label>
                                        <Col sm="10">
                                            <Form.Control type="text" value={logradouro} onChange={(e)=>setLogradouro(e.target.value)} placeholder="Ex: Av..."  />
                                        </Col>
                                    </Form.Group>
                                </Col>

                                <Col xs={12} >
                                    <Form.Group as={Row} className="mb-3" >
                                        <Form.Label column sm="2" htmlFor={'numero'} className={'labels_cadastrar_form'}>
                                            Número:
                                        </Form.Label>
                                        <Col sm="4">
                                            <Form.Control id={'numero'} value={numero} onChange={(e)=>setNumero(e.target.value)} type={'text'}   />
                                        </Col>
                                        <Form.Label column sm="2" htmlFor={'complemento'} className={'labels_cadastrar_form'}>
                                            Complemento:
                                        </Form.Label>
                                        <Col sm="4">
                                            <Form.Control id={'complemento'} value={complemento} onChange={(e)=>setComplemento(e.target.value)} type="text" placeholder=""  />
                                        </Col>
                                    </Form.Group>
                                </Col>

                                <Col xs={12} >
                                    <Form.Group as={Row} className="mb-3" >
                                        <Form.Label column sm="2" htmlFor={'cidade'} className={'labels_cadastrar_form'}>
                                            Cidade:
                                        </Form.Label>
                                        <Col sm="4">
                                            <Form.Control type="text" value={cidade} onChange={(e)=>setCidade(e.target.value)} id={'cidade'} placeholder={'Ex: São Paulo'} />
                                        </Col>
                                        <Form.Label htmlFor={'uf'} column sm="2"  className={'labels_cadastrar_form'}>
                                            Uf:
                                        </Form.Label>
                                        <Col sm="4">
                                            <Form.Control id={'uf'} type="text" value={uf} onChange={(e)=>setUf(e.target.value)} maxLength={2} placeholder="Ex: SP"   />
                                        </Col>
                                    </Form.Group>
                                </Col>





                                <Col xs={12} >
                                    <Form.Group as={Row} className="mb-3" controlId="bairro">
                                        <Form.Label column sm="2"  className={'labels_cadastrar_form'}>
                                            Bairro:
                                        </Form.Label>
                                        <Col sm="10">
                                            <Form.Control value={bairro} onChange={(e)=>setBairro(e.target.value)} type={'text'}  />
                                        </Col>
                                    </Form.Group>
                                </Col>

                                <Col xs={12} >
                                    <Form.Group as={Row} className="mb-3" controlId="obs">
                                        <Form.Label column sm="2"  className={'labels_cadastrar_form'}>
                                            Obs.:
                                        </Form.Label>
                                        <Col sm="10">
                                            <Form.Control value={obs} onChange={(e)=>setObs(e.target.value)} as={'textarea'} type={'text'}  />
                                        </Col>
                                    </Form.Group>
                                </Col>
                                <hr/>
                                <Col xs={12} className={'text-center'}>
                                    <Button variant="danger" onClick={voltar} className={'mx-2'}>Voltar</Button>
                                    <Button variant="primary" type="submit">Próxima</Button>

                                </Col>

                            </Row>

                        </Form>

                    </Col>
                </Row>
            </Container>
        </>
    )
}


export default Endereco;

Anon7 - 2021