Update GraphQL queries in Kumulatif Laporan components

This commit is contained in:
Dede Fuji Abdul
2024-03-01 20:10:43 +07:00
parent 45a0e1c0aa
commit d779be6232
5 changed files with 208 additions and 350 deletions

View File

@@ -78,6 +78,7 @@ import { Workbook } from 'exceljs'
import { useQuery } from '@vue/apollo-composable'
import gql from 'graphql-tag'
import { getMonthName } from '@/utils/texts'
import { queries } from '@/utils/graphql'
const position = { of: '#data' }
const showIndicator = ref(true)
const shading = ref(true)
@@ -121,41 +122,8 @@ const onSelectionChanged = ({ selectedRowsData }: any) => {
const data = selectedRowsData[0]
console.log(data)
}
const agingComplaintKumulatif = gql`
query DaftaragingComplaintKumulatif(
#$regional: String
$idUlp: Int
$idUid: Int
$idUp3: Int
$bulan: Int
$tahun: Int
) {
agingComplaintKumulatif(
#regional: $regional
idUlp: $idUlp
idUid: $idUid
idUp3: $idUp3
bulan: $bulan
tahun: $tahun
) {
nama_regional
id_uid
nama_uid
id_up3
nama_up3
id_ulp
nama_ulp
avg_durasi_recovery_gangguan
sla_gangguan
avg_durasi_recovery_keluhan
sla_keluhan
aging_complaint_gangguan
aging_complaint_keluhan
avg_aging_complaint
}
}
`
const { onResult, onError, loading, refetch } = useQuery(agingComplaintKumulatif, {
const { onResult, onError, loading, refetch } = useQuery(queries.monalisa.laporan.kumulatif.agingComplaintKumulatif, {
regional: '',
idUlp: 0,
idUid: 0,