Update posko parameter to accept integer instead of string
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
:allow-column-resizing="true" column-resizing-mode="widget">
|
||||
<DxSelection mode="single" />
|
||||
<DxPaging :page-size="5" :enabled="true" />
|
||||
<DxPager :visible="true" :allowed-page-sizes="[5, 10, 20]" display-mode="full"
|
||||
:show-page-size-selector="true" :show-info="true" :show-navigation-buttons="true" />
|
||||
<DxPager :visible="true" :allowed-page-sizes="[5, 10, 20]" display-mode="full" :show-page-size-selector="true"
|
||||
:show-info="true" :show-navigation-buttons="true" />
|
||||
<DxLoadPanel :position="position" :show-indicator="showIndicator" :show-pane="showPane" :shading="shading"
|
||||
v-if="loading" v-model:visible="loading" :enabled="true" />
|
||||
<DxSearchPanel :visible="true" :highlight-case-sensitive="true" />
|
||||
@@ -21,7 +21,7 @@
|
||||
<DxColumn css-class="custom-table-column" :width="50" alignment="center"
|
||||
:calculateCellValue="(item: any) => data.findIndex((i) => i == item) + 1" data-type="number" caption="No" />
|
||||
|
||||
<DxColumn :width="150" alignment="center" data-field="nama_unit" caption="Nama Unit"
|
||||
<DxColumn :width="150" alignment="center" data-field="nama_posko" caption="Nama Unit"
|
||||
css-class="custom-table-column" />
|
||||
<DxColumn :width="150" alignment="center" data-field="total" data-type="number" caption="Total"
|
||||
:allow-resizing="false" css-class="custom-table-column" />
|
||||
@@ -52,7 +52,7 @@
|
||||
:allow-resizing="false" css-class="custom-table-column" />
|
||||
<DxColumn :width="150" alignment="center" data-field="min_durasi_response" data-type="number" caption="Min"
|
||||
:allow-resizing="false" css-class="custom-table-column" />
|
||||
<DxColumn :width="150" alignment="center" data-field="total_diatas_sla_repsonse" data-type="number"
|
||||
<DxColumn :width="150" alignment="center" data-field="total_diatas_sla_response" data-type="number"
|
||||
caption=">SLA" :allow-resizing="false" css-class="custom-table-column" />
|
||||
<DxColumn :width="150" alignment="center" data-field="total_dibawah_sla_response" data-type="number"
|
||||
caption="≤SLA" :allow-resizing="false" css-class="custom-table-column" />
|
||||
@@ -88,11 +88,6 @@ import { Workbook } from 'exceljs'
|
||||
|
||||
import gql from 'graphql-tag';
|
||||
import { useQuery } from '@vue/apollo-composable'
|
||||
import { useSearchStore } from '@/stores/filtersAction'
|
||||
import { useDateStore } from '@/stores/date'
|
||||
import { usePostsStore } from '@/stores/posts'
|
||||
import { useRegionStore } from '@/stores/region'
|
||||
import { useUp3Store } from '@/stores/up3'
|
||||
const position = { of: '#data' };
|
||||
const showIndicator = ref(true);
|
||||
const shading = ref(true);
|
||||
@@ -102,7 +97,7 @@ const GET_REKAPITULASI_GANGGUAN_ALL = gql`
|
||||
query rekapitulasiAllGangguan(
|
||||
$dateFrom: Date!
|
||||
$dateTo: Date!
|
||||
$posko: String!
|
||||
$posko: Int!
|
||||
$idUid: Int!
|
||||
$idUp3: Int!
|
||||
) {
|
||||
@@ -116,8 +111,6 @@ query rekapitulasiAllGangguan(
|
||||
avg_durasi_dispatch
|
||||
avg_durasi_recovery
|
||||
avg_durasi_response
|
||||
id_uid
|
||||
id_up3
|
||||
max_durasi_dispatch
|
||||
max_durasi_recovery
|
||||
max_durasi_response
|
||||
@@ -126,7 +119,7 @@ query rekapitulasiAllGangguan(
|
||||
min_durasi_response
|
||||
persen_inproses
|
||||
persen_selesai
|
||||
posko
|
||||
nama_posko
|
||||
total
|
||||
total_diatas_sla_dispatch
|
||||
total_diatas_sla_recovery
|
||||
@@ -141,20 +134,18 @@ query rekapitulasiAllGangguan(
|
||||
const { onResult, onError, loading, refetch } = useQuery(GET_REKAPITULASI_GANGGUAN_ALL, {
|
||||
dateFrom: new Date().toISOString().slice(0, 10),
|
||||
dateTo: new Date().toISOString().slice(0, 10),
|
||||
posko: "",
|
||||
posko: 0,
|
||||
idUid: 0,
|
||||
idUp3: 0,
|
||||
})
|
||||
|
||||
const filterData = (param: any) => {
|
||||
const dateValue = useDateStore().getDateValue().split(' s/d ');
|
||||
const posko = usePostsStore().getData() ? usePostsStore().getData() : ""
|
||||
const up3 = useUp3Store().getData() ? useUp3Store().getData() : 0
|
||||
const uid = useRegionStore().getData() ? useRegionStore().getData() : 0
|
||||
const filterData = (params: any) => {
|
||||
const { posko, uid, up3 } = params
|
||||
const dateValue = params.periode.split(' s/d ')
|
||||
refetch({
|
||||
dateFrom: dateValue[0] ? dateValue[0].split('-').reverse().join('-') : new Date().toISOString().slice(0, 10),
|
||||
dateTo: dateValue[1] ? dateValue[1].split('-').reverse().join('-') : new Date().toISOString().slice(0, 10),
|
||||
posko,
|
||||
posko: posko ? posko.id : 0,
|
||||
idUid: uid ? uid.id : 0,
|
||||
idUp3: up3 ? up3.id : 0,
|
||||
})
|
||||
@@ -163,7 +154,6 @@ const filterData = (param: any) => {
|
||||
queryResult.data.rekapitulasiAllGangguan.forEach((item: any) => {
|
||||
data.value = [...data.value, {
|
||||
...item,
|
||||
nama_unit: 'UNIT'
|
||||
}];
|
||||
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user