import React from 'react' import { BottomNavigation, BottomNavigationAction, Box, Paper, Skeleton, SwipeableDrawer, styled } from '@mui/material' import { lazy, useEffect, useMemo, useRef, useState } from 'react' import { Card, CardHeader, CardTitle, CardBody, CardText, Input, Label, Row, Col } from 'reactstrap' import { AutorenewOutlined, CheckCircle, Close, CloseFullscreenRounded, CloseOutlined, CloseRounded, RefreshOutlined } from '@mui/icons-material' import { red } from '@mui/material/colors' import { useDispatch, useSelector } from 'react-redux' import collect from 'collect.js' import { useMap } from 'react-leaflet' import L from 'leaflet' import { Button as ButtonP } from 'primereact/button' import { MultiSelect } from 'react-multi-select-component' import Select from 'react-select' import jquery from 'jquery' import { isObjEmpty } from '../kytp/util' import { setSelectedOpsi } from '../kytp/store/PetaStore' import { Toast } from 'primereact/toast' import NipPerekam from './components/NipPerekam' import NipPengampu from './components/NipPengampu' import { matoaLayers } from './layers/overlayLayers' const anchor = 'bottom' const StyledBox = styled('div')(({ theme }) => ({ backgroundColor: theme.palette.mode === 'light' ? '#fff' : grey[800] })) const Item = styled(Paper)(({ theme }) => ({ backgroundColor: theme.palette.mode === 'dark' ? '#1A2027' : '#fff', ...theme.typography.body2, padding: theme.spacing(1), textAlign: 'center', color: theme.palette.text.secondary })) const PopUPTematikPembayaran = (props) => { const { isOpenPopUpPembayaran, setIsOpenPopUpPembayaran, wmsRef, refFeatureBawah, zonaRef, dataSend, setDataSend, dataOpsi, setDataOpsi } = props const toast = useRef() const map = useMap() const dispatch = useDispatch() const storePeta = useSelector((state) => state.peta) const toggleDrawer = (anchor, open) => (event) => { if (event && event.type === 'keydown' && (event.key === 'Tab' || event.key === 'Shift')) { return } setIsOpenPopUpPembayaran(open) } const onClickReset = () => { refFeatureBawah.current.clearLayers() matoaLayers.poiMatoaNpwpLayer.setParams({ styles: 'poi_matoa_npwp', cql_filter: '(1=1)' }) matoaLayers.poiMatoaNpwpNullLayer.setParams({ styles: 'poi_matoa_npwp_null', cql_filter: '(1=1)' }) matoaLayers.poiGoogleLayer.setParams({ styles: 'poi_google', cql_filter: '(1=1)' }) setIsOpenPopUpPembayaran(false) } const buttonProsesOnClick = () => { // map.removeLayer(matoaLayers.poiMatoaNpwpNullLayer) matoaLayers.poiMatoaNpwpNullLayer.removeFrom(map) const warna_byr = [] const warna_spt = [] const bayarchecked = document.querySelectorAll('.tematik_pembayaran_checkbox:checked') const sptchecked = document.querySelectorAll('.tematik_spt_checkbox:checked') bayarchecked.forEach((val, idx) => { warna_byr.push(val.value) }) sptchecked.forEach((val, idx) => { warna_spt.push(val.value) }) // STATUS_SPT_TAHUNAN_TERAKHIR if (bayarchecked.length) { const par_bayar = warna_byr.join("','") const par_spt = warna_spt.join("','") const cq_filter_poi_bayar = "WARNA_PEMBAYARAN_THN_TERAKHIR in ('" + par_bayar + "')" const cq_filter_poi_spt = "STATUS_SPT_TAHUNAN_TERAKHIR in ('" + par_spt + "')" const paramExisting = storePeta.cqlFilterWilayah matoaLayers.poiMatoaNpwpLayer.setParams({ styles: 'poi_matoa_npwp_bayar', cql_filter: paramExisting + ' AND ' + cq_filter_poi_bayar + ' AND ' + cq_filter_poi_spt // minZoom: 4 }) // matoaLayers.poiMatoaNpwpNullLayer.setParams({ // style: 'poi_matoa_npwp_bayar', // cql_filter: paramExisting + ' AND ' + cq_filter_poi, // minZoom: 4 // }) // map.setZoom(8) setIsOpenPopUpPembayaran(false) } else { toast.current.show({ severity: 'info', summary: 'Info', detail: 'Rentang Pembayaran harus dipilih ' }) } } return ( <> Tematik Pembayaran Pilih rentang pembayaran :
{Object.values(storePeta.warnaBayar).map((val, idx) => { return (
) })}

Pilih Status SPT :
{Object.values(storePeta.statusSPT).map((val, idx) => { return (
) })}
buttonProsesOnClick()} label="Proses" severity="" rounded className="w-10rem text-white text-base" /> {/*
*/}
onClickReset()} className=" text-xl" sx={{ width: '50%', maxWidth: '50% !important' }} label="Reset Filter" value="clear" icon={} /> setIsOpenPopUpPembayaran(false)} color={red[700]} sx={{ width: '50%', maxWidth: '50% !important' }} label="Tutup" value="close" icon={} />
) } export default PopUPTematikPembayaran