andi il y a 2 ans
Parent
commit
6a07d964be

+ 3 - 3
components/Layout/Sidebar.js

@@ -15,9 +15,9 @@ import SidebarUserBlock from "./SidebarUserBlock";
 import Menu from "./Menu.js";
 import MenuLLDIKTI from "./MenuLLDIKTI.js";
 import MenuPT from "./MenuPT.js";
-import MenuBypass from "./MenuBypass";
+import MenuBypass from "./MenuBypass.js";
 import { ENV } from "../../env";
-import MenuReadOnly from "./MenuReadOnly";
+import MenuReadOnly from "./MenuReadOnly.js";
 // localStorage.getItem("user");
 // import Menu from './MenuPT.js';
 
@@ -152,7 +152,7 @@ class Sidebar extends Component {
 		// const user = await getUser();
 		const user = this.props.user;
 		if (ENV === "production") {
-			this.menu = user.user_id === "2A080F42-AE7F-407B-976E-DE5FA87BD277" || "28DB23AE-2976-47E0-9410-241A11EE1F88" ? MenuBypass : user.role.id === 2022 ? MenuPT : user.role.id === 2021 ? MenuLLDIKTI : user.role.id === 2024 ? MenuReadOnly : Menu;
+			this.menu = user.user_id === "2A080F42-AE7F-407B-976E-DE5FA87BD277" || user.user_id === "28DB23AE-2976-47E0-9410-241A11EE1F88" ? MenuBypass : user.role.id === 2022 ? MenuPT : user.role.id === 2021 ? MenuLLDIKTI : user.role.id === 2024 ? MenuReadOnly : Menu;
 		}
 		if (ENV === "development") {
 			this.menu = user.user_id === "28DB23AE-2976-47E0-9410-241A11EE1F88" ? MenuBypass : user.role.id === 2022 ? MenuPT : user.role.id === 2021 ? MenuLLDIKTI : user.role.id === 2024 ? MenuReadOnly : Menu;

+ 106 - 40
components/Riwayat/TableRadar.js

@@ -6,53 +6,115 @@ import { Row, Col, Card, CardHeader, CardBody, Table, Button } from 'reactstrap'
 function TableRadar({ listData, to, linkName, jadwal, pemeriksaan, sanksi, keberatan, banding, perbaikan, cabutSanksi, all_Laporan }) {
     return (
         <Card className="card-default">
-            <CardBody>
+            <CardBody style={{
+                            outerWidth:"700"
+                                }}>
                 <Table bordered responsive>
                     <thead>
                         <tr >
-                            <th>Wilayah LLDikti\Menu</th>
-                            <th style={{
-                                color: "black",
-                            }}>Jumlah Laporan</th><th style={{
-                                backgroundColor: '#80b1ff',
-                                color: "black",
+                            <th rowspan="2"
+                             style={{
+                                verticalAlign: "middle",
                                 textAlign: "center",
-                            }}>1. Penjadwalan Evaluasi</th>
-                            <th style={{
-                                backgroundColor: '#de8383',
-                                color: "black",
-                                textAlign: "center",
-                            }}>2. Pemeriksaan</th>
-                            <th style={{
-                                backgroundColor: '#fdda80',
-                                color: "black",
-                                textAlign: "center",
-                            }}>3. Sanksi</th>
-                            <th style={{
-                                backgroundColor: '#cfab80',
-                                color: "black",
-                                textAlign: "center",
-                            }}>4. Keberatan</th>
-                            <th style={{
-                                backgroundColor: '#ef90df',
-                                color: "black",
-                                textAlign: "center",
-                            }}>5. Banding</th>
-                            <th style={{
-                                backgroundColor: '#80df89',
-                                color: "black",
-                                textAlign: "center",
-                            }}>6. Dokumen Perbaikan</th>
-                            <th style={{
-                                backgroundColor: '#a3d4d1',
-                                color: "black",
-                                textAlign: "center",
-                            }}>7. Permohonan Pencabutan Sanksi</th>
-                            <th style={{
+                            }}
+                            >Wilayah LLDikti\Menu</th>
+                            <th
+                                rowspan="2"
+                                style={{
+                                    color: "black",
+                                    verticalAlign: "middle",
+                                }}>Jumlah Laporan</th>
+                            <th
+                                colSpan="2"
+                                style={{
+                                    backgroundColor: '#80b1ff',
+                                    color: "black",
+                                    textAlign: "center",
+
+                                }}>1. Pelaporan Tuntas</th>
+                            <th
+                                rowspan="2"
+                                style={{
+                                    backgroundColor: '#80b1ff',
+                                    color: "black",
+                                    textAlign: "center",
+                                    verticalAlign: "middle",
+                                }}>Penjadwalan Evaluasi</th>
+                            <th
+                                rowspan="2"
+                                style={{
+                                    backgroundColor: '#de8383',
+                                    color: "black",
+                                    textAlign: "center",
+                                    verticalAlign: "middle",
+                                }}>2. Pemeriksaan</th>
+                            <th
+                                rowspan="2"
+                                style={{
+                                    backgroundColor: '#fdda80',
+                                    color: "black",
+                                    textAlign: "center",
+                                    verticalAlign: "middle",
+                                }}>3. Sanksi</th>
+                            <th
+                                rowspan="2"
+                                style={{
+                                    backgroundColor: '#cfab80',
+                                    color: "black",
+                                    textAlign: "center",
+                                    verticalAlign: "middle",
+                                }}>4. Keberatan</th>
+                            <th
+                                rowspan="2"
+                                style={{
+                                    backgroundColor: '#ef90df',
+                                    color: "black",
+                                    textAlign: "center",
+                                    verticalAlign: "middle",
+                                }}>5. Banding</th>
+                            <th
+                                rowspan="2"
+                                style={{
+                                    backgroundColor: '#80df89',
+                                    color: "black",
+                                    textAlign: "center",
+                                    verticalAlign: "middle",
+                                }}>6. Dokumen Perbaikan</th>
+                            <th
+                                rowspan="2"
+                                style={{
+                                    backgroundColor: '#a3d4d1',
+                                    color: "black",
+                                    textAlign: "center",
+                                    verticalAlign: "middle",
+                                }}>7. Permohonan Pencabutan Sanksi</th>
+                            <th
+                                rowspan="2"
+                                style={{
+                                    backgroundColor: '#a3d4d1',
+                                    color: "black",
+                                    textAlign: "center",
+                                    verticalAlign: "middle",
+                                }}>9. Cabut Sanksi</th>
+                            <th
+                                rowspan="2"
+                                style={{
+                                    backgroundColor: '#e8f2f1',
+                                    color: "black",
+                                    textAlign: "center",
+                                    verticalAlign: "middle",
+                                }}>Lihat Laporan</th>
+                        </tr>
+                        <tr>
+                            <th
+                             style={{
                                 backgroundColor: '#e8f2f1',
                                 color: "black",
                                 textAlign: "center",
-                            }}>Lihat Laporan</th>
+                                verticalAlign: "middle",
+                            }}
+                            >Ditutup</th>
+                            <th>Delegasi LLDIKTI</th>
                         </tr>
                     </thead>
                     {listData.map((data) => {
@@ -71,6 +133,9 @@ function TableRadar({ listData, to, linkName, jadwal, pemeriksaan, sanksi, keber
                                         cursor: "pointer",
                                     }}>{data.laporan.length}</td>
                                 </Link>
+                                <td>ditutup</td>
+                                <td>delegasi</td>
+
                                 <Link
                                     href={{
                                         pathname: jadwal,
@@ -162,6 +227,7 @@ function TableRadar({ listData, to, linkName, jadwal, pemeriksaan, sanksi, keber
                                         cursor: "pointer",
                                     }}>{data.jumlah_pencabutan_sanksi}</td>
                                 </Link>
+                                <td>"0</td>
                                 <td>
                                     <div className="ml-auto" style={{
                                         textAlign: "center",

+ 1 - 1
components/Sanksi/SuratBA _detail.js

@@ -135,7 +135,7 @@ class ComponentBA extends React.Component {
                                                 -
                                             </td>)
                                         }
-                                        <td style={{ minWidth: "215px" }}>{`Sanksi Administratif berupa ${this.state?.sanksi ? this.state?.sanksi : ""}` || ""}</td>
+                                        <td style={{ minWidth: "215px" }}>{`Sanksi Administratif berupa ${this.state?.sanksi ? this.state?.sanksi : "-"}` || ""}</td>
                                     </tr>
                                 ))}
                                 {/* {this.state.dataPelanggaran?.data?.map((e, i) => (

+ 115 - 102
pages/app/pencabutan-sanksi/detail.js

@@ -173,11 +173,18 @@ class JawabanPencabutanSanksi extends Component {
 	render() {
 		const { files, selectedOption, sanksi, pt } = this.state;
 
+		const removeFile = file => () => {
+			const newFiles = [...files]
+			newFiles.splice(newFiles.indexOf(file), 1)
+			this.setState({
+				files: newFiles,
+			});
+		}
 		const thumbs = files.map((file, index) => (
-			<div md={3} key={index}>
-				{/* <img className="img-fluid mb-2" src={file.preview} alt="Item" /> */}
-				<span className="text-left">{index + 1}.{file.name}</span>
-			</div>
+			<p>
+				<em className="far fa-file" />&nbsp;&nbsp;{file.name}
+				<button className="bg-transparent button-transparent border-0 fas fa-trash text-danger float-right" onClick={removeFile(file)} />
+			</p>
 		));
 
 		return (
@@ -262,109 +269,115 @@ class JawabanPencabutanSanksi extends Component {
 																""
 															)}
 															{selectedOption && selectedOption.value === "Rekomendasi Perbaikan" ? (
-																<FormGroup>
-																	<label className="row-form-label">Upload Dokumen  &#40;Opsional&#41; :</label>
-																	<div className="row-md-10">
-																		<Field name="dokumen">
-																			{({ field, form }) => (
-																				<DropzoneWrapper
-																					className=""
-																					onDrop={(e) => {
-																						this.onDrop(e);
-																						form.setFieldValue(field.name, e);
-																					}}
-																				>
-																					{({ getRootProps, getInputProps, isDragActive }) => {
-																						return (
-																							<div {...getRootProps()} className={"dropzone card p-3 " + (isDragActive ? "dropzone-drag-active" : "")}>
-																								<input {...getInputProps()} />
-																								<div className="dropzone-previews flex">
-																									<div className="dropzone-style-1">
-																										<div className="center-ver-hor dropzone-previews flex">{this.state.files.length > 0 ? <Row><span className="text-left">{thumbs}</span></Row> :
-																											<div className="text-center fa-2x icon-cloud-upload mr-2 ">
-																												<h5 className="text-center dz-default dz-message">Klik untuk upload dokumen</h5>
-																											</div>
-																										}
-																										</div>
-																									</div>																							</div>
-																								<div className="d-flex align-items-center">
-																									<small className="ml-auto">
-																										<button
-																											type="button"
-																											className="btn btn-link"
-																											onClick={(e) => {
-																												this.clearFiles(e);
-																												form.setFieldValue(field.name, []);
-																											}}
-																										>
-																											Reset dokumen
-																										</button>
-																									</small>
+																<FormGroup row>
+																<label className="col-md-2 col-form-label">Upload File Pendukung<span className="text-danger">*</span></label>
+																<div className="col-md-10">
+																	<Field name="dokumen">
+																		{({ field, form, meta }) => (
+																			<DropzoneWrapper
+																				className=""
+																				onDrop={(e) => {
+																					this.onDrop(e);
+																					form.setFieldValue(field.name, e);
+																				}}
+																			>
+																				{({ getRootProps, getInputProps, isDragActive }) => {
+																					return (
+																						<div {...getRootProps()} className={"dropzone card" + (isDragActive ? "dropzone-drag-active" : "")}>
+																							<input name="dokumen" {...getInputProps()} />
+																							<div className="dropzone-style-1">
+																								<div className="center-ver-hor dropzone-previews flex">{this.state.files.length > 0 ?
+																									<div className="text-center fa-2x icon-cloud-upload mr-2 ">
+																										<h5 className="text-center dz-default dz-message">Klik untuk tambah file</h5>
+																									</div> :
+																									<div className="text-center fa-2x icon-cloud-upload mr-2 ">
+																										<h5 className="text-center dz-default dz-message">Klik untuk upload dokumen</h5>
+																									</div>
+																								}
 																								</div>
 																							</div>
-																						);
-																					}}
-																				</DropzoneWrapper>
-																			)}
-																		</Field>
-																		<ErrorMessage name="dokumen" component="div" className="form-text text-danger" />
-																		<p className="mrgn-top-5">
-																			Ukuran setiap dokumen maksimal 15mb
-																		</p>
-																	</div>
-																</FormGroup>
+																							<div className="d-flex align-items-center">
+																								<small className="ml-auto">
+																									<button
+																										type="button"
+																										className="btn btn-link"
+																										onClick={(e) => {
+																											this.clearFiles(e);
+																											form.setFieldValue(field.name, []);
+																										}}
+																									>
+																										Reset dokumen
+																									</button>
+																								</small>
+																							</div>
+																						</div>
+																					);
+																				}}
+																			</DropzoneWrapper>
+																		)}
+																	</Field>
+																	{thumbs}
+																	<ErrorMessage name="dokumen" component="div" className="form-text text-danger" />
+																	<p className="mrgn-top-5 font-color-black">
+																		Ukuran setiap dokumen maksimal 15mb
+																	</p>
+																</div>
+															</FormGroup>
 															) : (
-																<FormGroup>
-																	<label className="row-form-label">Upload Dokumen <span className=" text-danger">*</span>:</label>
-																	<div className="row-md-10">
-																		<Field name="dokumen">
-																			{({ field, form }) => (
-																				<DropzoneWrapper
-																					className=""
-																					onDrop={(e) => {
-																						this.onDrop(e);
-																						form.setFieldValue(field.name, e);
-																					}}
-																				>
-																					{({ getRootProps, getInputProps, isDragActive }) => {
-																						return (
-																							<div {...getRootProps()} className={"dropzone card p-3 " + (isDragActive ? "dropzone-drag-active" : "")}>
-																								<input {...getInputProps()} />
-																								<div className="dropzone-previews flex">
-																									<div className="dropzone-style-1">
-																										<div className="center-ver-hor dropzone-previews flex">{this.state.files.length > 0 ? <Row><span className="text-left">{thumbs}</span></Row> :
-																											<div className="text-center fa-2x icon-cloud-upload mr-2 ">
-																												<h5 className="text-center dz-default dz-message">Klik untuk upload dokumen</h5>
-																											</div>
-																										}
-																										</div>
-																									</div>		</div>
-																								<div className="d-flex align-items-center">
-																									<small className="ml-auto">
-																										<button
-																											type="button"
-																											className="btn btn-link"
-																											onClick={(e) => {
-																												this.clearFiles(e);
-																												form.setFieldValue(field.name, []);
-																											}}
-																										>
-																											Reset dokumen
-																										</button>
-																									</small>
+																<FormGroup row>
+																<label className="col-md-2 col-form-label">Upload File Pendukung<span className="text-danger">*</span></label>
+																<div className="col-md-10">
+																	<Field name="dokumen">
+																		{({ field, form, meta }) => (
+																			<DropzoneWrapper
+																				className=""
+																				onDrop={(e) => {
+																					this.onDrop(e);
+																					form.setFieldValue(field.name, e);
+																				}}
+																			>
+																				{({ getRootProps, getInputProps, isDragActive }) => {
+																					return (
+																						<div {...getRootProps()} className={"dropzone card" + (isDragActive ? "dropzone-drag-active" : "")}>
+																							<input name="dokumen" {...getInputProps()} />
+																							<div className="dropzone-style-1">
+																								<div className="center-ver-hor dropzone-previews flex">{this.state.files.length > 0 ?
+																									<div className="text-center fa-2x icon-cloud-upload mr-2 ">
+																										<h5 className="text-center dz-default dz-message">Klik untuk tambah file</h5>
+																									</div> :
+																									<div className="text-center fa-2x icon-cloud-upload mr-2 ">
+																										<h5 className="text-center dz-default dz-message">Klik untuk upload dokumen</h5>
+																									</div>
+																								}
 																								</div>
 																							</div>
-																						);
-																					}}
-																				</DropzoneWrapper>
-																			)}
-																		</Field>
-																		<ErrorMessage name="dokumen" component="div" className="form-text text-danger" />
-																		<p className="mrgn-top-5">
-																			Ukuran setiap dokumen maksimal 15mb
-																		</p>
-																	</div>
-																</FormGroup>
+																							<div className="d-flex align-items-center">
+																								<small className="ml-auto">
+																									<button
+																										type="button"
+																										className="btn btn-link"
+																										onClick={(e) => {
+																											this.clearFiles(e);
+																											form.setFieldValue(field.name, []);
+																										}}
+																									>
+																										Reset dokumen
+																									</button>
+																								</small>
+																							</div>
+																						</div>
+																					);
+																				}}
+																			</DropzoneWrapper>
+																		)}
+																	</Field>
+																	{thumbs}
+																	<ErrorMessage name="dokumen" component="div" className="form-text text-danger" />
+																	<p className="mrgn-top-5 font-color-black">
+																		Ukuran setiap dokumen maksimal 15mb
+																	</p>
+																</div>
+															</FormGroup>
 															)}
 															<FormGroup>
 																<div className="row-xl-10">