import React from "react"; import ContentWrapper from '@/components/Layout/ContentWrapper'; import { Container, Row, Col, Card, CardBody, CardFooter, CardHeader, Input, Button } from 'reactstrap'; import FormValidator from "@/components/Forms/Validator.js"; import { ptPublic } from "@/actions/PT"; import AsyncSelect from "react-select/async"; import { loginToPt } from "../../../actions/auth"; import { connect } from "react-redux"; import { ToastContainer, toast } from "react-toastify"; import { getCsrf } from "../../../actions/security"; import Router from "next/router"; const loadOptions = (inputValue, callback) => { setTimeout(async () => { const pt = await ptPublic({ search: inputValue }); const data = pt?.data.map((e) => ({ value: e.id, label: e.nama, className: "State-ACT", })); callback(data); }, 1000); }; class BypassII extends React.Component { constructor(props) { super(props); this.state = { formLogin: { password: "" }, loading: false, inputValue: "", pt_id: "" }; } handleChangeSelectPerguruanTinggi = (selected_PT) => { this.setState({ pt_id: selected_PT.value }); }; handleClick = (e, PT_ID) => { e.preventDefault(); Router.push({ pathname: "/app/bypassII/detail", query: { ptId: PT_ID }, }); } render() { return (
Bypass II
Pilih Perguruan tinggi
{ this.handleChangeSelectPerguruanTinggi(e); }} // onInputChange={this.handleInputChange} /> Field is required
) } } const mapStateToProps = (state) => ({ user: state.user, token: state.token }); export default connect(mapStateToProps)(BypassII);