import React from 'react' import { BottomNavigation, BottomNavigationAction, Box, Paper, Skeleton, Slider, 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 })) function valuetext(value) { return `${value}` } const PopUpRatingGoogle = (props) => { const { isOpenPopUpRating, setIsOpenPopUpRating, wmsRef, refFeatureBawah, zonaRef, dataSend, setDataSend, dataOpsi, setDataOpsi } = props const toast = useRef() const map = useMap() const dispatch = useDispatch() const storePeta = useSelector((state) => state.peta) const [value, setValue] = React.useState(50) const handleChange = (event, newValue) => { setValue(newValue) } const toggleDrawer = (anchor, open) => (event) => { if (event && event.type === 'keydown' && (event.key === 'Tab' || event.key === 'Shift')) { return } setIsOpenPopUpRating(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 = () => { const cq_filter_poi = "REVIEW >= '" + value + "'" const paramExisting = storePeta.cqlFilterWilayah matoaLayers.poiGoogleLayer.setParams({ styles: 'poi_google', cql_filter: paramExisting + ' AND ' + cq_filter_poi }) setIsOpenPopUpRating(false) } return ( <> Filter Jumlah Ulasan Poi Google
Seret ke kanan/kiri minimal jumlah ulasan : 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={} /> setIsOpenPopUpRating(false)} color={red[700]} sx={{ width: '50%', maxWidth: '50% !important' }} label="Tutup" value="close" icon={} />
) } export default PopUpRatingGoogle