pemantauan.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  1. import React, { Component } from "react";
  2. import ContentWrapper from "@/components/Layout/ContentWrapper";
  3. import Header from "@/components/Main/Header";
  4. import DetailPT from "@/components/Main/DetailPT";
  5. import {
  6. Row,
  7. Col,
  8. Card,
  9. Button,
  10. CardHeader,
  11. CardFooter,
  12. Table,
  13. Nav,
  14. NavItem,
  15. NavLink,
  16. TabContent,
  17. TabPane,
  18. Pagination,
  19. PaginationItem,
  20. PaginationLink,
  21. ListGroup,
  22. ListGroupItem,
  23. Dropdown,
  24. DropdownMenu,
  25. DropdownToggle,
  26. DropdownItem,
  27. } from "reactstrap";
  28. //import { Row, Col, Card, CardHeader, CardFooter, Table, Pagination, PaginationItem, PaginationLink } from 'reactstrap';
  29. // import { Row, Col, Dropdown, DropdownMenu, DropdownToggle, DropdownItem } from 'reactstrap';
  30. import Select from "react-select";
  31. import { GoogleMap, LoadScript, Marker } from "@react-google-maps/api";
  32. import { GetServerSideProps, NextPage } from "next";
  33. import ErrorPage from "next/error";
  34. import fetch from "node-fetch";
  35. import https from "https";
  36. const containerStyle = {
  37. width: "100%",
  38. height: "155px",
  39. };
  40. var jenisPelanggaran = [];
  41. //const qpt_id = {};
  42. //http://localhost:3000/app/profile?ptId=0BCE4DB7-B207-445D-8D03-0C54B7688252
  43. // Demo with custom style
  44. const DemoMapCustomStyle = (props) => (
  45. <GoogleMap mapContainerStyle={containerStyle} zoom={14} center={props.location} options={{ styles: props.mapStyles }}>
  46. <Marker position={props.location} />
  47. </GoogleMap>
  48. );
  49. const styleHeaderText = {
  50. color: "brown",
  51. };
  52. class Profile extends Component {
  53. toggleTab = (tab) => {
  54. if (this.state.activeTab !== tab) {
  55. this.setState({
  56. activeTab: tab,
  57. });
  58. }
  59. };
  60. static async getInitialProps({ query }) {
  61. const httpsAgent = new https.Agent({
  62. rejectUnauthorized: false,
  63. });
  64. const json = [
  65. {
  66. id: "0BCE4DB7-B207-445D-8D03-0C54B7688252",
  67. kode: "031031",
  68. kode_satker: null,
  69. nama: "Universitas Satyagama",
  70. nama_singkat: "USG",
  71. sk_pendirian: "0742/O/1990",
  72. tgl_sk_pendirian: "1990-12-22",
  73. sk_operasional: null,
  74. tgl_sk_operasional: null,
  75. status: "A",
  76. alamat: {
  77. jalan: "Jalan Kamal Raya No 2-A Cengkareng",
  78. rt: null,
  79. rw: null,
  80. dusun: null,
  81. kelurahan: "-",
  82. kode_pos: "11730",
  83. kab_kota: {
  84. id: "016200",
  85. nama: "Kota Jakarta Barat",
  86. },
  87. },
  88. propinsi: {
  89. id: "010000",
  90. nama: "Prov. D.K.I. Jakarta",
  91. },
  92. telepon: "(021) 5452377-78",
  93. faksimile: "(021) 54391325",
  94. website: "www.satyagama.ac.id",
  95. email: "info@satyagama.ac.id",
  96. status_milik: {
  97. id: "3",
  98. nama: "Yayasan",
  99. },
  100. pembina: {
  101. id: "728989DD-251E-4516-BE2C-BA17A93A5C51",
  102. nama: "LLDIKTI III",
  103. },
  104. bentuk_pendidikan: {
  105. id: "23",
  106. nama: "Universitas",
  107. },
  108. last_update: "2021-12-08",
  109. negara: {
  110. id: "ID",
  111. nama: "Indonesia",
  112. },
  113. pimpinan: {
  114. id: "D3D20B3D-0FBE-4706-8A70-67C4C09C8FBE",
  115. nama: "DEWI SULISTYANI",
  116. tmt_sk_pengangkatan: "2021-03-17",
  117. tst_sk_pengangkatan: "2025-03-17",
  118. },
  119. },
  120. ];
  121. console.log("json : ", json);
  122. return { data: json[0] };
  123. }
  124. state = {
  125. dropdownOpen: false,
  126. dropdownOpenUpload: false,
  127. timelineAlt: false,
  128. location: { lat: 33.7906731, lng: -117.8357194 },
  129. customStyle: [
  130. { featureType: "water", stylers: [{ visibility: "on" }, { color: "#bdd1f9" }] },
  131. { featureType: "all", elementType: "labels.text.fill", stylers: [{ color: "#334165" }] },
  132. { featureType: "landscape", stylers: [{ color: "#e9ebf1" }] },
  133. { featureType: "road.highway", elementType: "geometry", stylers: [{ color: "#c5c6c6" }] },
  134. { featureType: "road.arterial", elementType: "geometry", stylers: [{ color: "#fff" }] },
  135. { featureType: "road.local", elementType: "geometry", stylers: [{ color: "#fff" }] },
  136. { featureType: "transit", elementType: "geometry", stylers: [{ color: "#d8dbe0" }] },
  137. { featureType: "poi", elementType: "geometry", stylers: [{ color: "#cfd5e0" }] },
  138. { featureType: "administrative", stylers: [{ visibility: "on" }, { lightness: 33 }] },
  139. { featureType: "poi.park", elementType: "labels", stylers: [{ visibility: "on" }, { lightness: 20 }] },
  140. { featureType: "road", stylers: [{ color: "#d8dbe0", lightness: 20 }] },
  141. ],
  142. listA: [],
  143. selectedOptionMulti: [],
  144. activeTab: "tasks",
  145. };
  146. toggleDD = () =>
  147. this.setState({
  148. dropdownOpen: !this.state.dropdownOpen,
  149. });
  150. toggleDDUpload = () =>
  151. this.setState({
  152. dropdownOpenUpload: !this.state.dropdownOpenUpload,
  153. });
  154. toggleTimeline = (e) => {
  155. this.setState({
  156. timelineAlt: e.target.checked,
  157. });
  158. };
  159. render() {
  160. const { selectedOptionMulti } = this.state;
  161. return (
  162. <ContentWrapper unwrap>
  163. <Header />
  164. <div className="p-3">
  165. <Row>
  166. <Col xl="9">
  167. <ul className="timeline">
  168. {/* Date */}
  169. <li className="timeline-separator" data-datetime="Today"></li>
  170. {/* EndDate */}
  171. <li className="timeline-inverted">
  172. {/* Left Card */}
  173. {/* icon */}
  174. <div className="timeline-badge info">
  175. <em className="far fa-file"></em>
  176. </div>
  177. {/* endicon */}
  178. <div className="timeline-card">
  179. <div className="popover right">
  180. <div className="arrow"></div>
  181. <div className="popover-body">
  182. <div className="d-flex align-items-center mb-3">
  183. <img className="mr-3 rounded-circle thumb48" src="/static/img/user/admin.png" alt="Avatar" />
  184. <p className="m-0">
  185. {/* <a className="text-muted" href=""> */}
  186. <strong>Admin</strong>
  187. {/* </a> */}
  188. <br />
  189. Upload Bukti Perbaikan
  190. {/* <em className="fa fa-paperclip"></em> */}
  191. <Dropdown isOpen={this.state.dropdownOpenUpload} toggle={this.toggleDDUpload}>
  192. {/* <em className="fa fa-graduation-cap fa-fw mr-3"></em>Status */}
  193. {/* <p className="m-0"><br/> Upload Bukti Perbaikan </p> */}
  194. <DropdownToggle caret color="link">
  195. <em className="fa fa-paperclip"></em>
  196. </DropdownToggle>
  197. <DropdownMenu className="animated fadeInUpShort">
  198. <DropdownItem>
  199. <em className="fa fa-lock mr-2"></em>Upload
  200. </DropdownItem>
  201. </DropdownMenu>
  202. </Dropdown>
  203. </p>
  204. {/* <li> */}
  205. {/* </li> */}
  206. </div>
  207. {/* <a href="">
  208. <img className="img-fluid img-thumbnail" src="/static/img/mockup.png" alt="Img"/>
  209. </a> */}
  210. <p className="text-muted my-2">3 Logs</p>
  211. <div className="media bb p-2">
  212. <img className="mr-2 rounded-circle thumb32" src="/static/img/user/user.png" alt="Avatar" />
  213. <div className="media-body">
  214. <p className="m-0">
  215. <a href="">
  216. <strong>Universitas Username</strong>
  217. </a>
  218. </p>
  219. <div className="text-sm text-muted">Uploaded Document File BBB.pdf</div>
  220. </div>
  221. <small className="ml-auto text-muted">12m ago</small>
  222. </div>
  223. <div className="media bb p-2">
  224. <img className="mr-2 rounded-circle thumb32" src="/static/img/user/user.png" alt="Avatar" />
  225. <div className="media-body">
  226. <p className="m-0">
  227. <a href="">
  228. <strong>Universitas Username</strong>
  229. </a>
  230. </p>
  231. <div className="text-sm text-muted">Uploaded Document File CCC.pdf</div>
  232. </div>
  233. <small className="ml-auto text-muted">30m ago</small>
  234. </div>
  235. <div className="media bb p-2">
  236. <img className="mr-2 rounded-circle thumb32" src="/static/img/user/user.png" alt="Avatar" />
  237. <div className="media-body">
  238. <p className="m-0">
  239. <a href="">
  240. <strong>Universitas Username</strong>
  241. </a>
  242. </p>
  243. <div className="text-sm text-muted">Uploaded Document File AAA.pdf</div>
  244. </div>
  245. <small className="ml-auto text-muted">30m ago</small>
  246. </div>
  247. {/* <form className="mt-2" method="post" action="#">
  248. <textarea className="form-control no-resize" placeholder="Comment..." rows="1"></textarea>
  249. </form> */}
  250. </div>
  251. </div>
  252. </div>
  253. {/* EndLeftCard */}
  254. </li>
  255. <li>
  256. {/* rightCard */}
  257. {/* icon */}
  258. <div className="timeline-badge danger">
  259. <em className="fas fa-ticket-alt"></em>
  260. </div>
  261. {/* endicon */}
  262. <div className="timeline-card">
  263. <div className="popover left">
  264. <div className="arrow"></div>
  265. <div className="popover-body">
  266. <div className="d-flex align-items-center mb-3">
  267. <img className="mr-3 rounded-circle thumb48" src="/static/img/user/admin.png" alt="Avatar" />
  268. <p className="m-0">
  269. {/* <a className="text-muted" href=""> */}
  270. <strong>Admin</strong>
  271. {/* </a> */}
  272. <br />
  273. opened project
  274. <a className="ml-2" href="">
  275. #548795
  276. </a>
  277. </p>
  278. </div>
  279. <p>
  280. <em>&mdash; Project description sample</em>
  281. </p>
  282. </div>
  283. </div>
  284. </div>
  285. {/* endRightCard */}
  286. </li>
  287. <li>
  288. {/* rightCard */}
  289. {/* icon */}
  290. <div className="timeline-badge danger">
  291. <em className="fas fa-ticket-alt"></em>
  292. </div>
  293. {/* endicon */}
  294. <div className="timeline-card">
  295. <div className="popover left">
  296. <div className="arrow"></div>
  297. <div className="popover-body">
  298. <div className="d-flex align-items-center mb-3">
  299. <img className="mr-3 rounded-circle thumb48" src="/static/img/user/admin.png" alt="Avatar" />
  300. <p className="m-0">
  301. {/* <a className="text-muted" href=""> */}
  302. <strong>Admin</strong>
  303. {/* </a> */}
  304. <br />
  305. opened project
  306. <a className="ml-2" href="">
  307. #548795
  308. </a>
  309. </p>
  310. </div>
  311. <p>
  312. <em>&mdash; Project description sample</em>
  313. </p>
  314. </div>
  315. </div>
  316. </div>
  317. {/* endRightCard */}
  318. </li>
  319. <li className="timeline-end">
  320. <a className="timeline-badge">
  321. <em className="fa fa-plus"></em>
  322. </a>
  323. </li>
  324. </ul>
  325. </Col>
  326. <Col xl="3">
  327. <DetailPT />
  328. </Col>
  329. </Row>
  330. </div>
  331. </ContentWrapper>
  332. );
  333. }
  334. }
  335. export default Profile;