fix: all table and anomali gangguan petugas
This commit is contained in:
@@ -22,6 +22,8 @@
|
||||
<Anomali_LAPPGP_LPT
|
||||
:data="data"
|
||||
:filters="filters"
|
||||
:grouping="grouping"
|
||||
:loading-data="loadingData"
|
||||
@update:data-sub="dataSub = $event"
|
||||
@update:loading-sub-data="loadingSubData = $event"
|
||||
@update:marking="marking = $event"
|
||||
@@ -48,6 +50,21 @@ import { apolloClient } from '@/utils/api/api.graphql'
|
||||
import { provideApolloClient } from '@vue/apollo-composable'
|
||||
import BufferDialog from '@/components/Dialogs/BufferDialog.vue'
|
||||
|
||||
const grouping = ref<any[]>([
|
||||
{
|
||||
data: '',
|
||||
caption: 'Semua Unit'
|
||||
},
|
||||
{
|
||||
data: 'nama_uid',
|
||||
caption: 'UID'
|
||||
},
|
||||
{
|
||||
data: 'nama_up3',
|
||||
caption: 'UP3'
|
||||
}
|
||||
])
|
||||
|
||||
const client = apolloClient()
|
||||
provideApolloClient(client)
|
||||
const data = ref<any[]>([])
|
||||
@@ -76,6 +93,46 @@ const filterData = async (params: any) => {
|
||||
const { ulp, uid, up3, jenisLaporan } = params
|
||||
console.table('LAPPGP', jenisLaporan)
|
||||
|
||||
var groupList: any[] = [
|
||||
{
|
||||
data: '',
|
||||
caption: 'Semua Unit'
|
||||
},
|
||||
{
|
||||
data: 'nama_uid',
|
||||
caption: 'UID'
|
||||
},
|
||||
{
|
||||
data: 'nama_up3',
|
||||
caption: 'UP3'
|
||||
}
|
||||
]
|
||||
|
||||
if (uid?.id != 0) {
|
||||
groupList.forEach((item, index) => {
|
||||
if (item.caption == 'Semua Unit') {
|
||||
groupList.splice(index, 1)
|
||||
}
|
||||
})
|
||||
|
||||
if (up3?.id != 0) {
|
||||
groupList.forEach((item, index) => {
|
||||
if (item.caption == 'UID') {
|
||||
groupList.splice(index, 1)
|
||||
}
|
||||
})
|
||||
|
||||
if (ulp?.id != 0) {
|
||||
groupList.forEach((item, index) => {
|
||||
if (item.caption == 'UP3') {
|
||||
groupList.splice(index, 1)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
grouping.value = groupList
|
||||
|
||||
const dateValue = params.periode.split(' s/d ')
|
||||
const query = {
|
||||
dateFrom: dateValue[0]
|
||||
|
||||
Reference in New Issue
Block a user