Refactor GraphQL queries and filterData function

This commit is contained in:
Dede Fuji Abdul
2024-02-29 20:31:00 +07:00
parent 81068e0842
commit 298533eb87
2 changed files with 11 additions and 11 deletions

View File

@@ -113,7 +113,7 @@ const showDetail = ref(false)
const monalisaJumlahDurasiRptRctGangguan = gql`
query DaftarmonalisaJumlahDurasiRptRctGangguan(
#$regional: String
#$posko: Int
$idUlp: Int
$idUid: Int
$idUp3: Int
$bulan: Int
@@ -121,7 +121,7 @@ const monalisaJumlahDurasiRptRctGangguan = gql`
) {
monalisaJumlahDurasiRptRctGangguan(
#regional: $regional
#posko: $posko
idUlp: $idUlp
idUid: $idUid
idUp3: $idUp3
bulan: $bulan
@@ -152,14 +152,14 @@ const { onResult, onError, loading, refetch } = useQuery(monalisaJumlahDurasiRpt
bulan: 10,
tahun: 2023,
// regional: '',
// posko: '',
idUlp: 0,
idUid: 0,
idUp3: 0
})
const filterData = (params: any) => {
const {
// regional,
// posko,
ulp,
uid,
up3,
bulan,
@@ -171,7 +171,7 @@ const filterData = (params: any) => {
refetch({
// regional: regional,
// posko: posko ? posko.id : 0,
idUlp: ulp ? ulp.id : 0,
idUid: uid ? uid.id : 0,
idUp3: up3 ? up3.id : 0,
bulan: bulan ? bulan.id : 10,