|
|
@ -53,13 +53,16 @@ const Root = () => { |
|
|
|
const [ar, setAr] = useState([]) |
|
|
|
const [ar, setAr] = useState([]) |
|
|
|
const [zp, setZp] = useState([]) |
|
|
|
const [zp, setZp] = useState([]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const [tahunKegiatan, setTahunKegiatan] = useState([]) |
|
|
|
|
|
|
|
const [tahunKegiatanSelected, setTahunKegiatanSelected] = useState([]) |
|
|
|
|
|
|
|
|
|
|
|
const [kanwilSelected, setKanwilSelected] = useState({}) |
|
|
|
const [kanwilSelected, setKanwilSelected] = useState({}) |
|
|
|
const [kppSelected, setKppSelected] = useState({}) |
|
|
|
const [kppSelected, setKppSelected] = useState({}) |
|
|
|
const [seksiSelected, setSeksiSelected] = useState([]) |
|
|
|
const [seksiSelected, setSeksiSelected] = useState([]) |
|
|
|
const [arSelected, setArSelected] = useState([]) |
|
|
|
const [arSelected, setArSelected] = useState([]) |
|
|
|
const [zpSelected, setZpSelected] = useState([]) |
|
|
|
const [zpSelected, setZpSelected] = useState([]) |
|
|
|
|
|
|
|
|
|
|
|
const [dataSend, setDataSend] = useState({ opsiWilZona: null, adm4_pcode: [], id_poly_zona: [], nip_ar_perekam: [], nip_ar_pengampu: [] }) |
|
|
|
const [dataSend, setDataSend] = useState({}) |
|
|
|
const [dataGraphMatoa, setDataGraphMatoa] = useState({ poi_agg: [], kpdl_agg: [] }) |
|
|
|
const [dataGraphMatoa, setDataGraphMatoa] = useState({ poi_agg: [], kpdl_agg: [] }) |
|
|
|
// let session = null
|
|
|
|
// let session = null
|
|
|
|
const [session, setSession] = useState({}) |
|
|
|
const [session, setSession] = useState({}) |
|
|
@ -98,6 +101,25 @@ const Root = () => { |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
jquery.ajax({ |
|
|
|
|
|
|
|
url: base_url + 'kewilayahan/ref/tahunKegiatan', |
|
|
|
|
|
|
|
method: 'GET', |
|
|
|
|
|
|
|
dataType: 'json', |
|
|
|
|
|
|
|
success: (data) => { |
|
|
|
|
|
|
|
setTahunKegiatan(data) |
|
|
|
|
|
|
|
setTahunKegiatanSelected(data[0]) |
|
|
|
|
|
|
|
setDataSend({ |
|
|
|
|
|
|
|
opsiWilZona: null, |
|
|
|
|
|
|
|
adm4_pcode: [], |
|
|
|
|
|
|
|
id_poly_zona: [], |
|
|
|
|
|
|
|
nip_ar_perekam: [], |
|
|
|
|
|
|
|
nip_ar_pengampu: [], |
|
|
|
|
|
|
|
tahun: data[0].value, |
|
|
|
|
|
|
|
tahunKegiatan: new Date().getFullYear() - 1 |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
jquery.getJSON(base_url + 'kewilayahan/ref/opsi').then((response) => { |
|
|
|
jquery.getJSON(base_url + 'kewilayahan/ref/opsi').then((response) => { |
|
|
|
setDataOpsi(response) |
|
|
|
setDataOpsi(response) |
|
|
|
dispatch(setSelectedOpsi(response.default)) |
|
|
|
dispatch(setSelectedOpsi(response.default)) |
|
|
@ -258,7 +280,13 @@ const Root = () => { |
|
|
|
case 'wilayah': |
|
|
|
case 'wilayah': |
|
|
|
if (adm4_pcode.length) { |
|
|
|
if (adm4_pcode.length) { |
|
|
|
dispatch(setSelectedOpsi(dataOpsi.wilayah)) |
|
|
|
dispatch(setSelectedOpsi(dataOpsi.wilayah)) |
|
|
|
setDataSend({ opsiWilZona: dataOpsi.wilayah.key, adm4_pcode, id_poly_zona: [] }) |
|
|
|
setDataSend({ |
|
|
|
|
|
|
|
opsiWilZona: dataOpsi.wilayah.key, |
|
|
|
|
|
|
|
adm4_pcode, |
|
|
|
|
|
|
|
id_poly_zona: [], |
|
|
|
|
|
|
|
tahun: tahunKegiatanSelected.value, |
|
|
|
|
|
|
|
tahunKegiatan: tahunKegiatanSelected.label |
|
|
|
|
|
|
|
}) |
|
|
|
setHiddenGraphMatoa(false) |
|
|
|
setHiddenGraphMatoa(false) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
toast.current.show({ severity: 'info', summary: 'Info', detail: 'Kelurahan harus dipilih' }) |
|
|
|
toast.current.show({ severity: 'info', summary: 'Info', detail: 'Kelurahan harus dipilih' }) |
|
|
@ -267,7 +295,13 @@ const Root = () => { |
|
|
|
case 'zona': |
|
|
|
case 'zona': |
|
|
|
if (id_poly_zona.length) { |
|
|
|
if (id_poly_zona.length) { |
|
|
|
dispatch(setSelectedOpsi(dataOpsi.zona)) |
|
|
|
dispatch(setSelectedOpsi(dataOpsi.zona)) |
|
|
|
setDataSend({ opsiWilZona: dataOpsi.zona.key, adm4_pcode: [], id_poly_zona }) |
|
|
|
setDataSend({ |
|
|
|
|
|
|
|
opsiWilZona: dataOpsi.zona.key, |
|
|
|
|
|
|
|
adm4_pcode: [], |
|
|
|
|
|
|
|
id_poly_zona, |
|
|
|
|
|
|
|
tahun: tahunKegiatanSelected.value, |
|
|
|
|
|
|
|
tahunKegiatan: tahunKegiatanSelected.label |
|
|
|
|
|
|
|
}) |
|
|
|
setHiddenGraphMatoa(false) |
|
|
|
setHiddenGraphMatoa(false) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
toast.current.show({ severity: 'info', summary: 'Info', detail: 'Zona harus dipilih' }) |
|
|
|
toast.current.show({ severity: 'info', summary: 'Info', detail: 'Zona harus dipilih' }) |
|
|
@ -579,7 +613,23 @@ const Root = () => { |
|
|
|
</Col> |
|
|
|
</Col> |
|
|
|
</Row> |
|
|
|
</Row> |
|
|
|
<Row className="mt-2"> |
|
|
|
<Row className="mt-2"> |
|
|
|
<Col sm="12"> |
|
|
|
<Col md="3"> |
|
|
|
|
|
|
|
<Label className="form-label" for="Pilih Zona"> |
|
|
|
|
|
|
|
Tahun Kegiatan |
|
|
|
|
|
|
|
</Label> |
|
|
|
|
|
|
|
<Select |
|
|
|
|
|
|
|
placeholder="Pilih Tahun" |
|
|
|
|
|
|
|
className="basic-single w-100" |
|
|
|
|
|
|
|
onChange={(e) => { |
|
|
|
|
|
|
|
setTahunKegiatanSelected(e) |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
classNamePrefix="select" |
|
|
|
|
|
|
|
value={tahunKegiatanSelected} |
|
|
|
|
|
|
|
isClearable={false} |
|
|
|
|
|
|
|
options={tahunKegiatan} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</Col> |
|
|
|
|
|
|
|
<Col sm="3" className="pt-4"> |
|
|
|
<ButtonP onClick={() => buttonProsesOnClick()} label="Proses" severity="" rounded className="w-10rem text-white text-base" /> |
|
|
|
<ButtonP onClick={() => buttonProsesOnClick()} label="Proses" severity="" rounded className="w-10rem text-white text-base" /> |
|
|
|
</Col> |
|
|
|
</Col> |
|
|
|
</Row> |
|
|
|
</Row> |
|
|
@ -673,6 +723,23 @@ const Root = () => { |
|
|
|
overrideStrings={{ allItemsAreSelected: 'Semua dipilih', selectSomeItems: 'Pilih Zona' }} |
|
|
|
overrideStrings={{ allItemsAreSelected: 'Semua dipilih', selectSomeItems: 'Pilih Zona' }} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</Col> |
|
|
|
</Col> |
|
|
|
|
|
|
|
<Col md="3"> |
|
|
|
|
|
|
|
<Label className="form-label" for="Pilih Zona"> |
|
|
|
|
|
|
|
Tahun Kegiatan |
|
|
|
|
|
|
|
</Label> |
|
|
|
|
|
|
|
<Select |
|
|
|
|
|
|
|
placeholder="Pilih Tahun" |
|
|
|
|
|
|
|
className="basic-single w-100" |
|
|
|
|
|
|
|
onChange={(e) => { |
|
|
|
|
|
|
|
setTahunKegiatanSelected(e) |
|
|
|
|
|
|
|
}} |
|
|
|
|
|
|
|
classNamePrefix="select" |
|
|
|
|
|
|
|
// defaultValue={kanwilSelected}
|
|
|
|
|
|
|
|
value={tahunKegiatanSelected} |
|
|
|
|
|
|
|
isClearable={false} |
|
|
|
|
|
|
|
options={tahunKegiatan} |
|
|
|
|
|
|
|
/> |
|
|
|
|
|
|
|
</Col> |
|
|
|
<Col md="3" className="pt-4"> |
|
|
|
<Col md="3" className="pt-4"> |
|
|
|
<ButtonP onClick={() => buttonProsesOnClick()} label="Proses" severity="" rounded className="w-10rem text-white text-base" /> |
|
|
|
<ButtonP onClick={() => buttonProsesOnClick()} label="Proses" severity="" rounded className="w-10rem text-white text-base" /> |
|
|
|
</Col> |
|
|
|
</Col> |
|
|
@ -686,6 +753,9 @@ const Root = () => { |
|
|
|
toast={toast} |
|
|
|
toast={toast} |
|
|
|
setHiddenGraphMatoa={setHiddenGraphMatoa} |
|
|
|
setHiddenGraphMatoa={setHiddenGraphMatoa} |
|
|
|
dataOpsi={dataOpsi} |
|
|
|
dataOpsi={dataOpsi} |
|
|
|
|
|
|
|
tahunKegiatan={tahunKegiatan} |
|
|
|
|
|
|
|
tahunKegiatanSelected={tahunKegiatanSelected} |
|
|
|
|
|
|
|
setTahunKegiatanSelected={setTahunKegiatanSelected} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</TabPane> |
|
|
|
</TabPane> |
|
|
|
<TabPane tabId="pengampu"> |
|
|
|
<TabPane tabId="pengampu"> |
|
|
@ -696,6 +766,9 @@ const Root = () => { |
|
|
|
toast={toast} |
|
|
|
toast={toast} |
|
|
|
setHiddenGraphMatoa={setHiddenGraphMatoa} |
|
|
|
setHiddenGraphMatoa={setHiddenGraphMatoa} |
|
|
|
dataOpsi={dataOpsi} |
|
|
|
dataOpsi={dataOpsi} |
|
|
|
|
|
|
|
tahunKegiatan={tahunKegiatan} |
|
|
|
|
|
|
|
tahunKegiatanSelected={tahunKegiatanSelected} |
|
|
|
|
|
|
|
setTahunKegiatanSelected={setTahunKegiatanSelected} |
|
|
|
/> |
|
|
|
/> |
|
|
|
</TabPane> |
|
|
|
</TabPane> |
|
|
|
</TabContent> |
|
|
|
</TabContent> |
|
|
|