Update date variables in MonalisaLK_PenurunanJumlahKomplain and MonalisaGR_JumlahKaliGangguan
This commit is contained in:
@ -19,7 +19,7 @@
|
||||
<DxColumn :width="170" alignment="center" data-field="nama_ulp" caption="Nama Unit" css-class="custom-table-column"
|
||||
cell-template="cell-left" />
|
||||
|
||||
<DxColumn alignment="center" :caption="`s.d ${getMonthName(bulanSekarang - 1)} ${tahunLalu}`"
|
||||
<DxColumn alignment="center" :caption="`s.d ${getMonthName(currentMonth - 1)} ${lastYear}`"
|
||||
css-class="custom-table-column">
|
||||
<DxColumn :width="120" alignment="center" data-field="total_keluhan_tahun_sebelumnya" data-type="number"
|
||||
caption="Keluhan" css-class="custom-table-column" name="keluhanBulanLalu" />
|
||||
@ -37,7 +37,7 @@
|
||||
data-field="total_tahun_sebelumnya" data-type="number" />
|
||||
</DxColumn>
|
||||
|
||||
<DxColumn alignment="center" :caption="`s.d ${getMonthName(bulanSekarang - 1)} ${tahunSekarang}`"
|
||||
<DxColumn alignment="center" :caption="`s.d ${getMonthName(currentMonth - 1)} ${currentYear}`"
|
||||
css-class="custom-table-column">
|
||||
<DxColumn :width="120" alignment="center" data-field="total_keluhan_tahun_ini" data-type="number"
|
||||
caption="Keluhan" css-class="custom-table-column" />
|
||||
@ -118,9 +118,9 @@ const showPane = ref(true)
|
||||
const data = ref<any[]>([])
|
||||
const dataDetail = ref<any>()
|
||||
const showDetail = ref(false)
|
||||
const tahunSekarang = ref(new Date().getFullYear())
|
||||
const bulanSekarang = ref(new Date().getMonth())
|
||||
const tahunLalu = ref(tahunSekarang.value - 1)
|
||||
const currentYear = ref(new Date().getFullYear())
|
||||
const currentMonth = ref(new Date().getMonth())
|
||||
const lastYear = ref(currentYear.value - 1)
|
||||
|
||||
const onExporting = (e: any) => {
|
||||
if (e.format === 'pdf') {
|
||||
@ -165,9 +165,9 @@ const { onResult, onError, loading, refetch } = useQuery(queries.monalisa.lapora
|
||||
})
|
||||
const filterData = (params: any) => {
|
||||
const { regional, ulp, uid, up3, bulan, tahun } = params
|
||||
tahunSekarang.value = tahun.id
|
||||
bulanSekarang.value = bulan.id
|
||||
tahunLalu.value = tahun.id - 1
|
||||
currentYear.value = tahun.id
|
||||
currentMonth.value = bulan.id
|
||||
lastYear.value = tahun.id - 1
|
||||
|
||||
refetch({
|
||||
regional: regional,
|
||||
|
Reference in New Issue
Block a user