| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 | 
							- import React, { Component } from "react";
 
- import Header from "@/components/Main/Header";
 
- import DetailPT from "@/components/Main/DetailPT";
 
- import InputData from "@/components/Pelaporan/InputData";
 
- import Link from "next/link";
 
- import { getPT } from "@/actions/PT";
 
- import ContentWrapper from "@/components/Layout/ContentWrapper";
 
- import { Row, Col, Card, CardHeader, CardBody } from "reactstrap";
 
- class PelaporanNew extends Component {
 
- 	constructor(props) {
 
- 		super(props);
 
- 		this.state = {
 
- 			pt: {},
 
- 		};
 
- 	}
 
- 	static getInitialProps = async ({ query }) => {
 
- 		return { query };
 
- 	};
 
- 	componentDidMount = async () => {
 
- 		const { query } = this.props;
 
- 		const pt = await getPT({ id: query.ptId });
 
- 		this.setState({ pt });
 
- 	};
 
- 	render() {
 
- 		const { pt } = this.state;
 
- 		return (
 
- 			<ContentWrapper unwrap>
 
- 				{/* <Header /> */}
 
- 				<div className="p-3">
 
- 					<div className="content-heading">
 
- 						<div>
 
- 							Pelaporan Baru
 
- 							<small>Form pembuatan laporan baru v.0.1</small>
 
- 						</div>
 
- 						<div className="ml-auto">
 
- 							<Link href="/app/pelaporan/search">
 
- 								<button className="btn btn-sm btn-secondary text-sm">< back</button>
 
- 							</Link>
 
- 						</div>
 
- 					</div>
 
- 					<Row>
 
- 						<Col xl="9">
 
- 							<Card className="card-default">
 
- 								<CardBody>
 
- 									<Row>
 
- 										<Col lg={12}>
 
- 											<p className="lead bb">Informasi Laporan</p>
 
- 											<InputData query={this.props.query} />
 
- 										</Col>
 
- 									</Row>
 
- 								</CardBody>
 
- 							</Card>
 
- 						</Col>
 
- 						<Col xl="3">{pt?.data && <DetailPT data={pt.data[0]} />}</Col>
 
- 					</Row>
 
- 				</div>
 
- 			</ContentWrapper>
 
- 		);
 
- 	}
 
- }
 
- export default PelaporanNew;
 
 
  |