kcscDev/egovframe-template-simple-r.../src/pages/admin/config/baseCode/ParentCodeDiv.jsx

58 lines
1.8 KiB
React
Raw Normal View History

2024-01-02 09:02:31 +00:00
import React, { useState, useEffect, useCallback } from 'react';
2023-12-29 02:56:04 +00:00
import {Container} from "react-bootstrap";
import Row from "react-bootstrap/Row";
import Col from "react-bootstrap/Col";
import Form from 'react-bootstrap/Form'
import Button from "react-bootstrap/Button";
2024-01-02 09:02:31 +00:00
import * as EgovNet from "api/egovFetch";
function ParentCodeDiv(props){
const [codeGrpRow, setCodeGrpRow] = useState();
function getCodeGrp(){
EgovNet.requestFetch(
'/admin/config/code-grp',
{
method: "GET",
headers: {
'Content-type': 'application/json'
},
body: JSON.stringify({})
},
(resp) => {
debugger
},
function (resp) {
console.log("err response : ", resp);
}
);
}
useEffect(() => {
getCodeGrp();
}, []);
2023-12-29 02:56:04 +00:00
return (
<Container className={"pt-3"}>
<Row className={"py-2 bg-light border-bottom"}>
<Col xs={4}>코드그룹</Col>
<Col xs={4}>코드그룹명</Col>
<Col xs={2}>삭제</Col>
<Col xs={2}>수정</Col>
</Row>
2024-01-02 09:02:31 +00:00
{codeGrpRow}
2023-12-29 02:56:04 +00:00
<Row className={"py-1"}>
<Col xs={4}>
<Form.Control type={"text"} placeholder={"코드그룹"} size={"sm"}/>
</Col>
<Col xs={4}>
<Form.Control type={"text"} placeholder={"코드그룹명"} size={"sm"}/>
</Col>
<Col xs={{span:2, offset:2}}><Button type={"button"} variant={"primary"} size={"sm"}>등록</Button></Col>
</Row>
</Container>
);
}
export default ParentCodeDiv;