Browse Source

sort tablelaporan dan sanksi by date

andi 2 years ago
parent
commit
b50d2a1628

+ 2 - 1
components/Banding/TableSanksi.js

@@ -8,7 +8,7 @@ function TableSanksi({ listData, to, linkName }) {
 		<div className="card b">
 			<div className="card-body card-over">
 				<Datatable options={{ responsive: false, ordering: true }}>
-					<table className="table w-100" data-order='[3,"desc"]'>
+					<table className="table w-100" data-order='[0,"desc"]'>
 						<thead>
 							<tr>
 								<th>Nomor Sanksi</th>
@@ -28,6 +28,7 @@ function TableSanksi({ listData, to, linkName }) {
 												<div className="media align-items-center">
 													<div className="media-body d-flex">
 														<div>
+															<p style={{ display: "none" }}>{data.createdAt}</p>
 															<h4>{data.no_sanksi}</h4>
 															<p>{moment(data.createdAt).format("MM-DD-YYYY")}</p>
 														</div>

+ 2 - 1
components/Bypass/TableBypass.js

@@ -59,7 +59,7 @@ function TableBypass({ listData, to, linkName, role }) {
             </Modal>
             <div className="card-body card-over">
                 <Datatable options={{ responsive: false, ordering: true }}>
-                    <table className="table w-100" data-order='[[3, "desc"]]'>
+                    <table className="table w-100" data-order='[[0, "desc"]]'>
                         <thead>
                             <tr>
                                 <th>Nomor Sanksi</th>
@@ -79,6 +79,7 @@ function TableBypass({ listData, to, linkName, role }) {
                                                 <div className="media align-items-center">
                                                     <div className="media-body d-flex">
                                                         <div>
+														<p  style={{ display: "none" }}>{data.createdAt}</p>
                                                             <h4>{data.no_sanksi}</h4>
                                                             <p>{moment(data.createdAt).format("DD-MM-YYYY")}</p>
                                                         </div>

+ 2 - 1
components/Delegasi/TableLaporan.js

@@ -9,7 +9,7 @@ function TableLaporan({ listData, to, linkName, status = false, noBy = false })
             <div className="card-body card-over">
                 {listData && (
                     <Datatable options={{ responsive: false, ordering: true }}>
-                        <table className="table w-100" data-order='[[3, "desc"]]'>
+                        <table className="table w-100" data-order='[[0, "desc"]]'>
                             <thead>
                                 <tr>
                                     <th>No.Laporan</th>
@@ -29,6 +29,7 @@ function TableLaporan({ listData, to, linkName, status = false, noBy = false })
                                                 <div className="media align-items-center">
                                                     <div className="media-body d-flex">
                                                         <div>
+														<p  style={{ display: "none" }}>{data.createdAt}</p>
                                                             <h4>{data.no_laporan}</h4>
                                                             <p>{moment(data.createdAt).format("DD-MM-YYYY")}</p>
                                                         </div>

+ 2 - 1
components/Keberatan/TableSanksi.js

@@ -8,7 +8,7 @@ function TableSanksi({ listData, to, linkName }) {
 		<div className="card b">
 			<div className="card-body card-over">
 				<Datatable options={{ responsive: false, ordering: true }}>
-					<table className="table w-100" data-order='[[3, "desc"]]'>
+					<table className="table w-100" data-order='[[0, "desc"]]'>
 						<thead>
 							<tr>
 								<th>Nomor Sanksi</th>
@@ -28,6 +28,7 @@ function TableSanksi({ listData, to, linkName }) {
 												<div className="media align-items-center">
 													<div className="media-body d-flex">
 														<div>
+														<p  style={{ display: "none" }}>{data.createdAt}</p>
 															<h4>{data.no_sanksi}</h4>
 															<p>{moment(data.createdAt).format("DD-MM-YYYY")}</p>
 														</div>

+ 2 - 1
components/Main/TableLaporan.js

@@ -9,7 +9,7 @@ function TableLaporan({ listData, to, linkName, status = false, noBy = false })
 			<div className="card-body card-over">
 				{listData && (
 					<Datatable options={{ responsive: false, ordering: true }}>
-						<table className="table w-100" data-order='[[3, "desc"]]'>
+						<table className="table w-100" data-order='[[0, "desc"]]'>
 							<thead>
 								<tr>
 									<th>No.Laporan</th>
@@ -29,6 +29,7 @@ function TableLaporan({ listData, to, linkName, status = false, noBy = false })
 												<div className="media align-items-center">
 													<div className="media-body d-flex">
 														<div>
+														<p  style={{ display: "none" }}>{data.createdAt}</p>
 															<h4>{data.no_laporan}</h4>
 															<p>{moment(data.createdAt).format("DD-MM-YYYY")}</p>
 														</div>

+ 2 - 2
components/Main/TableSanksi.js

@@ -9,8 +9,7 @@ function TableSanksi({ listData, to, linkName }) {
 			<div className="card-body card-over">
 				{listData && (
 					<Datatable options={{ responsive: false, ordering: true }}>
-						{/* <table className="table w-100" data-order='[[2, "asc"], [3, "desc"]]'> */}
-						<table className="table w-100" data-order='[[2, "asc"]]'>
+						<table className="table w-100" data-order='[[0, "desc"]]'>
 							<thead>
 								<tr>
 									<th>Nomor Sanksi</th>
@@ -30,6 +29,7 @@ function TableSanksi({ listData, to, linkName }) {
 													<div className="media align-items-center">
 														<div className="media-body d-flex">
 															<div>
+																<p style={{ display: "none" }}>{data.createdAt}</p>
 																<h4>{data.no_sanksi}</h4>
 																<p>{moment(data.createdAt).format("DD-MM-YYYY")}</p>
 															</div>

+ 2 - 1
components/NaikSanksi/TableLaporan.js

@@ -29,7 +29,7 @@ function TableLaporan({ listData, to, linkName, status = false, noBy = false })
 			<div className="card-body card-over">
 				{listData && (
 					<Datatable options={{ responsive: false, ordering: true }}>
-						<table className="table w-100" data-order='[[3, "desc"]]'>
+						<table className="table w-100" data-order='[[0, "desc"]]'>
 							<thead>
 								<tr>
 									<th>No.Laporan</th>
@@ -50,6 +50,7 @@ function TableLaporan({ listData, to, linkName, status = false, noBy = false })
 												<div className="media align-items-center">
 													<div className="media-body d-flex">
 														<div>
+														<p  style={{ display: "none" }}>{data.createdAt}</p>
 															<h4>{data.laporan.no_laporan}</h4>
 															<p>{moment(data.createdAt).format("DD-MMMM-YYYY")}</p>
 														</div>

+ 2 - 1
components/Pelaporan/TableLaporan.js

@@ -25,7 +25,7 @@ function TableLaporan({ listData, to, linkName, status = false, noBy = false })
                         // ordering: false,
                         // info: false,
                     }}>
-                        <table className="table w-100" data-order='[[3, "desc"]]'>
+                        <table className="table w-100" data-order='[[0, "desc"]]'>
                             <thead>
                                 <tr>
                                     <th>No.Laporan</th>
@@ -45,6 +45,7 @@ function TableLaporan({ listData, to, linkName, status = false, noBy = false })
                                                 <div className="media align-items-center">
                                                     <div className="media-body d-flex">
                                                         <div>
+														<p  style={{ display: "none" }}>{data.createdAt}</p>
                                                             <h4>{data.no_laporan}</h4>
                                                             <p>{moment(data.createdAt).format("DD-MM-YYYY")}</p>
                                                         </div>

+ 3 - 2
components/PelaporanTuntas/TableLaporan.js

@@ -9,7 +9,7 @@ function TableLaporan({ listData, to, linkName }) {
 			<div className="card-body card-over">
 				{listData && (
 					<Datatable options={{ responsive: false, ordering: true }}>
-						<table className="table w-100" data-order='[[2, "asc"], [3, "desc"]]'>
+						<table className="table w-100" data-order='[[3, "desc"]]'>
 							<thead>
 								<tr>
 									<th>No.Laporan</th>
@@ -27,6 +27,7 @@ function TableLaporan({ listData, to, linkName }) {
 												<div className="media align-items-center">
 													<div className="media-body d-flex">
 														<div>
+															<p style={{ display: "none" }}>{data.createdAt}</p>
 															<h4>{data.laporan?.no_laporan || data.no_laporan}</h4>
 															<p>{moment(data.createdAt).format("MM-DD-YYYY")}</p>
 														</div>
@@ -46,7 +47,7 @@ function TableLaporan({ listData, to, linkName }) {
 												</div>
 											</td>
 											<td>
-												{data.flag === "diterima" ? <div className="badge badge-success">Selesai - Diterima</div> :data.status === "Diterima" ? <div className="badge badge-success">Selesai - Diterima</div> : data.status === "Ditutup" ? <div className="badge badge-danger">Ditutup</div> : data.status === "Selesai" ? <div className="badge badge-success">Selesai</div> : ""}
+												{data.flag === "diterima" ? <div className="badge badge-success">Selesai - Diterima</div> : data.status === "Diterima" ? <div className="badge badge-success">Selesai - Diterima</div> : data.status === "Ditutup" ? <div className="badge badge-danger">Ditutup</div> : data.status === "Selesai" ? <div className="badge badge-success">Selesai</div> : ""}
 											</td>
 											<td>
 												<div className="ml-auto">

+ 2 - 1
components/Pemeriksaan/TableLaporan.js

@@ -9,7 +9,7 @@ function TableLaporan({ listData, to, linkName }) {
 			<div className="card-body card-over">
 				{listData && (
 					<Datatable options={{ responsive: false, ordering: true }}>
-						<table className="table w-100" data-order='[[2, "asc"], [3, "desc"]]'>
+						<table className="table w-100" data-order='[ [0, "desc"]]'>
 							<thead>
 								<tr>
 									<th>No.Laporan</th>
@@ -28,6 +28,7 @@ function TableLaporan({ listData, to, linkName }) {
 												<div className="media align-items-center">
 													<div className="media-body d-flex">
 														<div>
+														<p  style={{ display: "none" }}>{data.createdAt}</p>
 															<h4>{data.no_laporan}</h4>
 															<p>{moment(data.createdAt).format("MM-DD-YYYY")}</p>
 														</div>

+ 2 - 1
components/PencabutanSanksi/TableSanksi.js

@@ -8,7 +8,7 @@ function TableSanksi({ listData, to, linkName }) {
 		<div className="card b">
 			<div className="card-body card-over">
 				<Datatable options={{ responsive: false, ordering: true }}>
-					<table className="table w-100" data-order='[3, "asc"]'>
+					<table className="table w-100" data-order='[0, "desc"]'>
 						<thead>
 							<tr>
 								<th>Nomor Sanksi</th>
@@ -28,6 +28,7 @@ function TableSanksi({ listData, to, linkName }) {
 												<div className="media align-items-center">
 													<div className="media-body d-flex">
 														<div>
+														<p  style={{ display: "none" }}>{data.createdAt}</p>
 															<h4>{data.no_sanksi}</h4>
 															<p>{moment(data.createdAt).format("MM-DD-YYYY")}</p>
 														</div>

+ 3 - 1
components/Penjadwalan/TableLaporan.js

@@ -9,7 +9,7 @@ function TableLaporan({ listData, to, linkName }) {
 			<div className="card-body card-over">
 				{listData && (
 					<Datatable options={{ responsive: false, ordering: true }}>
-						<table className="table w-100" data-order='[[2, "desc"], [3, "desc"]]'>
+						<table className="table w-100" data-order='[[0, "desc"]]'>
 							<thead>
 								<tr>
 									<th>No.Laporan</th>
@@ -28,6 +28,8 @@ function TableLaporan({ listData, to, linkName }) {
 												<div className="media align-items-center">
 													<div className="media-body d-flex">
 														<div>
+															
+														<p  style={{ display: "none" }}>{data.createdAt}</p>
 															<h4>{data.no_laporan}</h4>
 															<p>{moment(data.createdAt).format("MM-DD-YYYY")}</p>
 														</div>

+ 2 - 1
components/PerpanjanganSanksi/TableLaporan.js

@@ -11,7 +11,7 @@ function TableLaporan({ listData, to, linkName, status = false, noBy = false })
 			<div className="card-body card-over">
 				{listData && (
 					<Datatable options={{ responsive: false, ordering: true }}>
-						<table className="table w-100" data-order='[[3, "desc"]]'>
+						<table className="table w-100" data-order='[[0, "desc"]]'>
 							<thead>
 								<tr>
 									<th>No.Laporan</th>
@@ -30,6 +30,7 @@ function TableLaporan({ listData, to, linkName, status = false, noBy = false })
 												<div className="media align-items-center">
 													<div className="media-body d-flex">
 														<div>
+														<p  style={{ display: "none" }}>{data.createdAt}</p>
 															<h4>{data.laporan.no_laporan}</h4>
 															<p>{moment(data.createdAt).format("DD-MMMM-YYYY")}</p>
 														</div>

+ 2 - 1
components/RekomendasiDelegasi/TableLaporan.js

@@ -11,7 +11,7 @@ function TableLaporan({ listData, to, linkName, status = false, noBy = false })
 			<div className="card-body card-over">
 				{listData && (
 					<Datatable options={{ responsive: false, ordering: true }}>
-						<table className="table w-100" data-order='[[3, "desc"]]'>
+						<table className="table w-100" data-order='[[0, "desc"]]'>
 							<thead>
 								<tr>
 									<th>No.Laporan</th>
@@ -32,6 +32,7 @@ function TableLaporan({ listData, to, linkName, status = false, noBy = false })
 												<div className="media align-items-center">
 													<div className="media-body d-flex">
 														<div>
+														<p  style={{ display: "none" }}>{data.createdAt}</p>
 															<h4>{data.laporan.no_laporan}</h4>
 															<p>{moment(data.createdAt).format("DD-MMMM-YYYY")}</p>
 														</div>

+ 6 - 4
components/Riwayat/TableLaporan.js

@@ -8,14 +8,15 @@ function TableLaporan({ listData, to, linkName, status = false, noBy = false })
         <div className="card b ">
             <div className="card-body card-over">
                 {listData && (
-                    <Datatable options={{ responsive: false, ordering: true }}>
-                        <table className="table w-100" data-order='[[1, "desc"]]'>
+                    <Datatable options={{ responsive: false, ordering: true
+                    }}>
+                        <table className="table w-100" data-order='[[0, "desc"]]'>
                             <thead>
                                 <tr>
                                     <th>No.Laporan</th>
                                     <th>Deskripsi Laporan</th>
                                      <th>Status</th>
-                                    {!noBy && <th>Dibuat Oleh</th>}
+                                    {/* {!noBy && <th>Dibuat Oleh</th>} */}
                                 </tr>
                             </thead>
                             <tbody>
@@ -27,6 +28,7 @@ function TableLaporan({ listData, to, linkName, status = false, noBy = false })
                                                 <div className="media align-items-center">
                                                     <div className="media-body d-flex">
                                                         <div>
+                                                            <p  style={{ display: "none" }}>{data.createdAt}</p>
                                                             <h4>{data.no_laporan}</h4>
                                                             <p>{moment(data.createdAt).format("DD-MM-YYYY")}</p>
                                                         </div>
@@ -54,7 +56,7 @@ function TableLaporan({ listData, to, linkName, status = false, noBy = false })
                                             ) : (
                                                 ""
                                             )}
-                                            {!noBy && <td>{data.user.isPrivate ? "" : data.user.nama}</td>}
+                                            {/* {!noBy && <td>{data.user.isPrivate ? "" : data.user.nama}</td>} */}
                                             {/* <td>
                                                 <div className="ml-auto">
                                                     <Link

+ 2 - 1
components/Sanksi/TableLaporan.js

@@ -9,7 +9,7 @@ function TableLaporan({ listData }) {
 			<div className="card-body card-over">
 				{listData && (
 					<Datatable options={{ responsive: false }}>
-						<table className="table w-100" data-order='[[2, "asc"], [3, "desc"]]'>
+						<table className="table w-100" data-order='[[0, "desc"]]'>
 							<thead>
 								<tr>
 									<th>No.Laporan</th>
@@ -28,6 +28,7 @@ function TableLaporan({ listData }) {
 												<div className="media align-items-center">
 													<div className="media-body d-flex">
 														<div>
+														<p  style={{ display: "none" }}>{data.createdAt}</p>
 															<h4>{data.no_laporan}</h4>
 															<p>{moment(data.createdAt).format("DD-MM-YYYY")}</p>
 														</div>

+ 2 - 1
components/TurunSanksi/TableLaporan.js

@@ -28,7 +28,7 @@ function TableLaporan({ listData, to, linkName, status = false, noBy = false })
 			<div className="card-body card-over">
 				{listData && (
 					<Datatable options={{ responsive: false, ordering: true }}>
-						<table className="table w-100" data-order='[[3, "desc"]]'>
+						<table className="table w-100" data-order='[[0, "desc"]]'>
 							<thead>
 								<tr>
 									<th>No.Laporan</th>
@@ -49,6 +49,7 @@ function TableLaporan({ listData, to, linkName, status = false, noBy = false })
 												<div className="media align-items-center">
 													<div className="media-body d-flex">
 														<div>
+															<p style={{ display: "none" }}>{data.createdAt}</p>
 															<h4>{data.laporan.no_laporan}</h4>
 															<p>{moment(data.createdAt).format("DD-MMMM-YYYY")}</p>
 														</div>