Przeglądaj źródła

fix bug pelaporan

andi 3 lat temu
rodzic
commit
05ce6a3812

+ 2 - 19
components/Pelaporan/TableLaporan.js

@@ -18,24 +18,7 @@ function TableLaporan({ listData, to, linkName, status = false, noBy = false })
                     </Link>
                 </div>
                 {listData && (
-                    <Datatable options={
-                        {
-                            'paging': true, responsive: false, ordering: true, keys: false,
-                            oLanguage: {
-                                sSearch: '<em class="fa fa-search"></em>',
-                                sLengthMenu: '_MENU_ records per page',
-                                info: 'Showing page _PAGE_ of _PAGES_',
-                                zeroRecords: 'Nothing found - sorry',
-                                infoEmpty: 'No records available',
-                                infoFiltered: '(filtered from _MAX_ total records)',
-                                oPaginate: {
-                                    sNext: '<em class="fa fa-caret-right"></em>',
-                                    sPrevious: '<em class="fa fa-caret-left"></em>',
-                                    color: '#ffff'
-                                }
-                            },
-                        }
-                    }>
+                    <Datatable options={{ responsive: false, ordering: true, keys: true }}>
                         <table className="table w-100" data-order='[[3, "desc"]]'>
                             <thead>
                                 <tr>
@@ -94,7 +77,7 @@ function TableLaporan({ listData, to, linkName, status = false, noBy = false })
                                                             query: { id: data._id },
                                                         }}
                                                     >
-                                                        <Button className="btn-login" color>
+                                                        <Button className="color-3e3a8e" color>
                                                             <span className="font-color-white">
                                                                 {linkName}
                                                             </span>

+ 4 - 10
pages/app/pelaporan/index.js

@@ -81,17 +81,11 @@ class Pelaporan extends Component {
 					</Link>
 				</div>
 				<Row>
-					<Col lg="4">{graph?.data ? <CaseProgress data={graph.data} nextButton={this.nextButton} prevButton={this.prevButton} tahun={this.state.tahun} newLaporan={newLaporan} excel={this.excel} /> : <Loader />}</Col>
+					<Col lg="4">
+						{graph?.data ? <CaseProgress data={graph.data} nextButton={this.nextButton} prevButton={this.prevButton} tahun={this.state.tahun} newLaporan={newLaporan} excel={this.excel} /> : <Loader />}
+					</Col>
 					<Col lg="8">
-						<div className="mb-3 d-flex">
-							{/* <div className="margin-left-auto">
-								<Link href="/app/pelaporan/search">
-									<Button className="color-3e3a8e" color="purple">Laporan Baru</Button>
-								</Link>
-							</div> */}
-							{pelaporan?.data ? <TableLaporan listData={pelaporan.data} to="/app/pelaporan/detail" linkName="Detail" /> : <Loader />}
-						</div>
-
+						{pelaporan?.data ? <TableLaporan listData={pelaporan.data} to="/app/pelaporan/detail" linkName="Detail" /> : <Loader />}
 					</Col>
 				</Row>
 			</ContentWrapper>

+ 0 - 1
styles/bootstrap/_buttons.scss

@@ -304,7 +304,6 @@ input[type="button"] {
 }
 .margin-left-auto {
   float: left;
-  margin-top: -3px;
   margin-right: auto;
 }
 .icon-laporan-baru {