Refactor dialogDetail variable names in Vue components

This commit is contained in:
Dede Fuji Abdul
2024-03-20 17:10:15 +07:00
parent 9d75cdf7c2
commit b472cd29a7
27 changed files with 547 additions and 180 deletions

View File

@ -13,7 +13,7 @@
:show-borders="true"
:row-alternation-enabled="true"
:hover-state-enabled="true"
@selection-changed=""
@selection-changed="onSelectionChanged"
:column-width="100"
@exporting="onExporting"
:allow-column-resizing="true"
@ -167,28 +167,133 @@
cell-template="formatText"
/>
<template #cellCenter="{ data }">
<p class="cursor-pointer">
{{ data.text }}
</p>
</template>
<template #formatText="{ data }">
<p class="text-left cursor-pointer">
<p class="text-left cursor-pointer" @click="showDetail()">
{{ data.text }}
</p>
</template>
<template #formatTime="{ data }">
<p class="!text-right">
<p class="!text-right cursor-pointer" @click="showDetail()">
{{ parseInt(data.text) ? formatWaktu(data.text) : '-' }}
</p>
</template>
</DxDataGrid>
</div>
<DetailDialog
:open="dialogDetail"
title="Daftar Gangguan Berdasarkan Media"
@on-close="closeDialog"
>
<div class="w-full p-4 space-y-2 bg-white rounded-xl">
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">No Laporan:</h3>
<InputText :readonly="true" :value="dataDetail.no_laporan" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Tgl Lapor:</h3>
<InputText :readonly="true" :value="dataDetail?.waktu_lapor" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Tgl Response:</h3>
<InputText :readonly="true" :value="dataDetail?.waktu_response" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Tgl Recovery:</h3>
<InputText :readonly="true" :value="dataDetail?.waktu_recovery" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Response Time:</h3>
<InputText
:readonly="true"
:value="
parseInt(dataDetail?.durasi_response_time)
? formatWaktu(dataDetail?.durasi_response_time)
: '-'
"
class-name="flex-1"
/>
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Recovery Time:</h3>
<InputText
:readonly="true"
class-name="flex-1"
:value="
parseInt(dataDetail?.durasi_recovery_time)
? formatWaktu(dataDetail?.durasi_recovery_time)
: '-'
"
/>
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Status :</h3>
<InputText :readonly="true" :value="dataDetail?.status_akhir" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">IDPEL/NOMETER:</h3>
<InputText :readonly="true" :value="dataDetail?.idpel_nometer" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Nama Pelapor:</h3>
<InputText :readonly="true" :value="dataDetail?.nama_pelapor" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Alamat Pelapor:</h3>
<InputText :readonly="true" :value="dataDetail?.alamat_pelapor" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">No Telp Pelapor:</h3>
<InputText :readonly="true" :value="dataDetail?.no_telp_pelapor" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Keterangan Pelapor:</h3>
<InputText :readonly="true" :value="dataDetail?.keterangan_pelapor" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Sumper Lapor:</h3>
<InputText :readonly="true" :value="dataDetail?.media" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">TGL Media:</h3>
<InputText
:readonly="true"
type="textarea"
:value="dataDetail?.waktu_media"
class-name="flex-1"
/>
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Keterangan Media:</h3>
<InputText
:readonly="true"
type="textarea"
:value="dataDetail?.keterangan_media"
class-name="flex-1"
/>
</div>
</div>
</DetailDialog>
</template>
<script setup lang="ts">
import DetailDialog from '@/components/Dialogs/DetailDialog.vue'
import InputText from '@/components/InputText.vue'
import Filters from '@/components/Form/Filters.vue'
import Type16 from '@/components/Form/FiltersType/Type16.vue'
import { formatWaktu } from '@/components/Form/FiltersType/reference'
@ -217,6 +322,17 @@ const showIndicator = ref(true)
const shading = ref(true)
const showPane = ref(true)
const data = ref<any[]>([])
const dataDetail = ref<any>({})
const dialogDetail = ref(false)
const onSelectionChanged = ({ selectedRowsData }: any) => {
const data = selectedRowsData[0]
dataDetail.value = data
}
const showDetail = () => (dialogDetail.value = true)
const closeDialog = () => (dialogDetail.value = false)
const { onResult, onError, loading, refetch } = useQuery(queries.gangguan.daftar.berdasarkanMedia, {
dateFrom: new Date().toISOString().slice(0, 10),

View File

@ -202,19 +202,19 @@
/>
<template #cellCenter="{ data }">
<p class="cursor-pointer" @click="showData()">
<p class="cursor-pointer" @click="showDetail()">
{{ data.text }}
</p>
</template>
<template #formatText="{ data }">
<p class="text-left cursor-pointer" @click="showData()">
<p class="text-left cursor-pointer" @click="showDetail()">
{{ data.text }}
</p>
</template>
<template #formatTime="{ data }">
<p class="cursor-pointer !text-right" @click="showData()">
<p class="cursor-pointer !text-right" @click="showDetail()">
{{ parseInt(data.text) ? formatWaktu(data.text) : '-' }}
</p>
</template>
@ -222,9 +222,9 @@
</div>
<DetailDialog
:open="showDetail"
:open="dialogDetail"
title="Daftar Gangguan Dialihkan ke Posko Lain"
@on-close="closeDetail"
@on-close="closeDialog"
>
<div class="w-full p-4 space-y-2 bg-white rounded-xl">
<div class="flex flex-row items-center justify-between w-full">
@ -377,7 +377,6 @@ import {
VerticalAlign,
TextRun,
WidthType,
TableBorders,
PageOrientation
} from 'docx'
@ -387,8 +386,8 @@ const shading = ref(true)
const showPane = ref(true)
const data = ref<any[]>([])
const dataDetail = ref<any>()
const showDetail = ref(false)
const closeDetail = () => (showDetail.value = false)
const dialogDetail = ref(false)
const closeDialog = () => (dialogDetail.value = false)
const setHeaderStyle = (
worksheet: any,
@ -451,7 +450,7 @@ const onSelectionChanged = ({ selectedRowsData }: any) => {
const data = selectedRowsData[0]
dataDetail.value = data
}
const showData = () => (showDetail.value = true)
const showDetail = () => (dialogDetail.value = true)
const filters = ref()
const reportMeta = ref({

View File

@ -13,7 +13,7 @@
:show-borders="true"
:row-alternation-enabled="true"
:hover-state-enabled="true"
@selection-changed=""
@selection-changed="onSelectionChanged"
:column-width="100"
@exporting="onExporting"
:allow-column-resizing="true"
@ -60,7 +60,7 @@
alignment="center"
data-field="no_laporan"
caption="No Laporan"
cell-template="cellCenter"
cell-template="formatText"
/>
<DxColumn
css-class="custom-table-column"
@ -68,7 +68,7 @@
alignment="center"
data-field="waktu_lapor"
caption="Tgl Lapor"
cell-template="cellCenter"
cell-template="formatText"
/>
<DxColumn
css-class="custom-table-column"
@ -76,7 +76,7 @@
alignment="center"
data-field="waktu_response"
caption="Tgl Response"
cell-template="cellCenter"
cell-template="formatText"
/>
<DxColumn
css-class="custom-table-column"
@ -84,7 +84,7 @@
alignment="center"
data-field="waktu_recovery"
caption="Tgl Recovery"
cell-template="cellCenter"
cell-template="formatText"
/>
<DxColumn
css-class="custom-table-column"
@ -108,7 +108,7 @@
alignment="center"
data-field="status_akhir"
caption="Status"
cell-template="cellCenter"
cell-template="formatText"
/>
<DxColumn
css-class="custom-table-column"
@ -116,7 +116,7 @@
alignment="center"
data-field="idpel_nometer"
caption="IDPEL/NO METER"
cell-template="cellCenter"
cell-template="formatText"
/>
<DxColumn
css-class="custom-table-column"
@ -140,7 +140,7 @@
alignment="center"
data-field="no_telp_pelapor"
caption="No Telp Pelapor"
cell-template="cellCenter"
cell-template="formatText"
/>
<DxColumn
css-class="custom-table-column"
@ -156,7 +156,7 @@
alignment="center"
data-field="media"
caption="Sumber Lapor"
cell-template="cellCenter"
cell-template="formatText"
/>
<DxColumn
css-class="custom-table-column"
@ -167,28 +167,143 @@
cell-template="formatText"
/>
<template #cellCenter="{ data }">
<p class="cursor-pointer">
{{ data.text }}
</p>
</template>
<template #formatText="{ data }">
<p class="text-left cursor-pointer">
<p class="text-left cursor-pointer" @click="showDetail()">
{{ data.text }}
</p>
</template>
<template #formatTime="{ data }">
<p class="!text-right">
<p class="!text-right cursor-pointer" @click="showDetail()">
{{ parseInt(data.text) ? formatWaktu(data.text) : '-' }}
</p>
</template>
</DxDataGrid>
</div>
<DetailDialog
:open="dialogDetail"
title="Daftar Gangguan Diselesaikan Mobile APKT"
@on-close="closeDialog"
>
<div class="w-full p-4 space-y-2 bg-white rounded-xl">
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">No Laporan:</h3>
<InputText :readonly="true" :value="dataDetail.no_laporan" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Tgl Lapor:</h3>
<InputText :readonly="true" :value="dataDetail?.waktu_lapor" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Tgl Response:</h3>
<InputText :readonly="true" :value="dataDetail?.waktu_response" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Tgl Recovery:</h3>
<InputText :readonly="true" :value="dataDetail?.waktu_recovery" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Response Time:</h3>
<InputText
:readonly="true"
:value="
parseInt(dataDetail?.durasi_response_time)
? formatWaktu(dataDetail?.durasi_response_time)
: '-'
"
class-name="flex-1"
/>
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Recovery Time:</h3>
<InputText
:readonly="true"
class-name="flex-1"
:value="
parseInt(dataDetail?.durasi_recovery_time)
? formatWaktu(dataDetail?.durasi_recovery_time)
: '-'
"
/>
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Status :</h3>
<InputText :readonly="true" :value="dataDetail?.status_akhir" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">IDPEL/NOMETER:</h3>
<InputText :readonly="true" :value="dataDetail?.idpel_nometer" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Nama Pelapor:</h3>
<InputText :readonly="true" :value="dataDetail?.nama_pelapor" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Alamat Pelapor:</h3>
<InputText :readonly="true" :value="dataDetail?.alamat_pelapor" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">No Telp Pelapor:</h3>
<InputText :readonly="true" :value="dataDetail?.no_telp_pelapor" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Keterangan Pelapor:</h3>
<InputText :readonly="true" :value="dataDetail?.keterangan_pelapor" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Sumper Lapor:</h3>
<InputText :readonly="true" :value="dataDetail?.media" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Nama ULP:</h3>
<InputText
:readonly="true"
type="textarea"
:value="dataDetail?.nama_posko"
class-name="flex-1"
/>
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Penyebab:</h3>
<InputText
:readonly="true"
type="textarea"
:value="dataDetail?.penyebab"
class-name="flex-1"
/>
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Tindakan:</h3>
<InputText
:readonly="true"
type="textarea"
:value="dataDetail?.tindakan"
class-name="flex-1"
/>
</div>
</div>
</DetailDialog>
</template>
<script setup lang="ts">
import DetailDialog from '@/components/Dialogs/DetailDialog.vue'
import InputText from '@/components/InputText.vue'
import Filters from '@/components/Form/Filters.vue'
import Type1 from '@/components/Form/FiltersType/Type1.vue'
import { formatWaktu } from '@/components/Form/FiltersType/reference'
@ -217,6 +332,17 @@ const showIndicator = ref(true)
const shading = ref(true)
const showPane = ref(true)
const data = ref<any[]>([])
const dataDetail = ref<any>({})
const dialogDetail = ref(false)
const onSelectionChanged = ({ selectedRowsData }: any) => {
const data = selectedRowsData[0]
dataDetail.value = data
}
const showDetail = () => (dialogDetail.value = true)
const closeDialog = () => (dialogDetail.value = false)
const { onResult, onError, loading, refetch } = useQuery(
queries.gangguan.daftar.diselesaikanMobileAPKT,

View File

@ -174,25 +174,25 @@
/>
<template #cellCenter="{ data }">
<p class="cursor-pointer" @click="showData()">
<p class="cursor-pointer" @click="showDetail()">
{{ data.text }}
</p>
</template>
<template #formatText="{ data }">
<p class="text-left cursor-pointer" @click="showData()">
<p class="text-left cursor-pointer" @click="showDetail()">
{{ data.text }}
</p>
</template>
<template #formatNumber="{ data }">
<p class="text-right cursor-pointer" @click="showData()">
<p class="text-right cursor-pointer" @click="showDetail()">
{{ isNumber(data.text) ? formatNumber(data.text) : data.text }}
</p>
</template>
<template #formatTime="{ data }">
<p class="cursor-pointer !text-right" @click="showData()">
<p class="cursor-pointer !text-right" @click="showDetail()">
{{ parseInt(data.text) ? formatWaktu(data.text) : '-' }}
</p>
</template>
@ -200,9 +200,9 @@
</div>
<DetailDialog
:open="showDetail"
:open="dialogDetail"
title="Daftar Gangguan Melapor Lebih Dari 1 Kali"
@on-close="closeDetail"
@on-close="closeDialog"
>
<div class="w-full p-4 space-y-2 bg-white rounded-xl">
<div class="flex flex-row items-center justify-between w-full">
@ -337,7 +337,7 @@ const shading = ref(true)
const showPane = ref(true)
const data = ref<any[]>([])
const dataDetail = ref<any>({})
const showDetail = ref(false)
const dialogDetail = ref(false)
const filters = ref()
const reportMeta = ref({
uid: { id: 0, name: 'Semua Unit Induk Distribusi/Wilayah' },
@ -353,9 +353,9 @@ const onSelectionChanged = ({ selectedRowsData }: any) => {
dataDetail.value = data
}
const showData = () => (showDetail.value = true)
const showDetail = () => (dialogDetail.value = true)
const closeDetail = () => (showDetail.value = false)
const closeDialog = () => (dialogDetail.value = false)
const { onResult, onError, loading, refetch } = useQuery(
queries.gangguan.daftar.melaporLebihDariSatuKali,

View File

@ -192,26 +192,26 @@
/>
<template #cellCenter="{ data }">
<p class="cursor-pointer" @click="showData()">
<p class="cursor-pointer" @click="showDetail()">
{{ data.text }}
</p>
</template>
<template #formatText="{ data }">
<p class="text-left cursor-pointer" @click="showData()">
<p class="text-left cursor-pointer" @click="showDetail()">
{{ data.text }}
</p>
</template>
<template #formatTime="{ data }">
<p class="cursor-pointer !text-right" @click="showData()">
<p class="cursor-pointer !text-right" @click="showDetail()">
{{ parseInt(data.text) ? formatWaktu(data.text) : '-' }}
</p>
</template>
</DxDataGrid>
</div>
<DetailDialog :open="showDetail" title="Daftar Gangguan Recovery Time" @on-close="closeDetail">
<DetailDialog :open="dialogDetail" title="Daftar Gangguan Recovery Time" @on-close="closeDialog">
<div class="w-full p-4 space-y-2 bg-white rounded-xl">
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">No Laporan:</h3>
@ -359,16 +359,16 @@ const shading = ref(true)
const showPane = ref(true)
const data = ref<any[]>([])
const dataDetail = ref<any>({})
const showDetail = ref(false)
const dialogDetail = ref(false)
const onSelectionChanged = ({ selectedRowsData }: any) => {
const data = selectedRowsData[0]
dataDetail.value = data
}
const showData = () => (showDetail.value = true)
const showDetail = () => (dialogDetail.value = true)
const closeDetail = () => (showDetail.value = false)
const closeDialog = () => (dialogDetail.value = false)
const filterData = (params: any) => {
const { minTime, maxTime, posko, uid, up3 } = params

View File

@ -169,26 +169,26 @@
/>
<template #cellCenter="{ data }">
<p class="cursor-pointer" @click="showData()">
<p class="cursor-pointer" @click="showDetail()">
{{ data.text }}
</p>
</template>
<template #formatText="{ data }">
<p class="text-left cursor-pointer" @click="showData()">
<p class="text-left cursor-pointer" @click="showDetail()">
{{ data.text }}
</p>
</template>
<template #formatTime="{ data }">
<p class="cursor-pointer !text-right" @click="showData()">
<p class="cursor-pointer !text-right" @click="showDetail()">
{{ parseInt(data.text) ? formatWaktu(data.text) : '-' }}
</p>
</template>
</DxDataGrid>
</div>
<DetailDialog :open="showDetail" title="Daftar Gangguan Response Time" @on-close="closeDetail">
<DetailDialog :open="dialogDetail" title="Daftar Gangguan Response Time" @on-close="closeDialog">
<div class="w-full p-4 space-y-2 bg-white rounded-xl">
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">No Laporan:</h3>
@ -336,16 +336,16 @@ const shading = ref(true)
const showPane = ref(true)
const data = ref<any[]>([])
const dataDetail = ref<any>({})
const showDetail = ref(false)
const dialogDetail = ref(false)
const onSelectionChanged = ({ selectedRowsData }: any) => {
const data = selectedRowsData[0]
dataDetail.value = data
}
const showData = () => (showDetail.value = true)
const showDetail = () => (dialogDetail.value = true)
const closeDetail = () => (showDetail.value = false)
const closeDialog = () => (dialogDetail.value = false)
const filterData = (params: any) => {
const { minTime, maxTime, posko, uid, up3 } = params

View File

@ -13,7 +13,7 @@
:show-borders="true"
:row-alternation-enabled="true"
:hover-state-enabled="true"
@selection-changed=""
@selection-changed="onSelectionChanged"
:column-width="100"
@exporting="onExporting"
:allow-column-resizing="true"
@ -60,7 +60,7 @@
alignment="center"
data-field="no_laporan"
caption="No Laporan"
cell-template="cellCenter"
cell-template="formatText"
/>
<DxColumn
css-class="custom-table-column"
@ -68,7 +68,7 @@
alignment="center"
data-field="waktu_lapor"
caption="Tgl Lapor"
cell-template="cellCenter"
cell-template="formatText"
/>
<DxColumn
css-class="custom-table-column"
@ -76,7 +76,7 @@
alignment="center"
data-field="waktu_response"
caption="Tgl Response"
cell-template="cellCenter"
cell-template="formatText"
/>
<DxColumn
css-class="custom-table-column"
@ -84,7 +84,7 @@
alignment="center"
data-field="waktu_recovery"
caption="Tgl Recovery"
cell-template="cellCenter"
cell-template="formatText"
/>
<DxColumn
css-class="custom-table-column"
@ -108,7 +108,7 @@
alignment="center"
data-field="status_akhir"
caption="Status"
cell-template="cellCenter"
cell-template="formatText"
/>
<DxColumn
css-class="custom-table-column"
@ -116,7 +116,7 @@
alignment="center"
data-field="idpel_nometer"
caption="IDPEL/NO METER"
cell-template="cellCenter"
cell-template="formatText"
/>
<DxColumn
css-class="custom-table-column"
@ -140,7 +140,7 @@
alignment="center"
data-field="no_telp_pelapor"
caption="No Telp Pelapor"
cell-template="cellCenter"
cell-template="formatText"
/>
<DxColumn
css-class="custom-table-column"
@ -156,7 +156,7 @@
alignment="center"
data-field="media"
caption="Sumber Lapor"
cell-template="cellCenter"
cell-template="formatText"
/>
<DxColumn
css-class="custom-table-column"
@ -167,28 +167,143 @@
cell-template="formatText"
/>
<template #cellCenter="{ data }">
<p class="cursor-pointer">
{{ data.text }}
</p>
</template>
<template #formatText="{ data }">
<p class="text-left cursor-pointer">
<p class="text-left cursor-pointer" @click="showDetail()">
{{ data.text }}
</p>
</template>
<template #formatTime="{ data }">
<p class="!text-right">
<p class="!text-right cursor-pointer" @click="showDetail()">
{{ parseInt(data.text) ? formatWaktu(data.text) : '-' }}
</p>
</template>
</DxDataGrid>
</div>
<DetailDialog
:open="dialogDetail"
title="Daftar Gangguan Diselesaikan Tanpa ID Pelanggan"
@on-close="closeDialog"
>
<div class="w-full p-4 space-y-2 bg-white rounded-xl">
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">No Laporan:</h3>
<InputText :readonly="true" :value="dataDetail.no_laporan" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Tgl Lapor:</h3>
<InputText :readonly="true" :value="dataDetail?.waktu_lapor" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Tgl Response:</h3>
<InputText :readonly="true" :value="dataDetail?.waktu_response" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Tgl Recovery:</h3>
<InputText :readonly="true" :value="dataDetail?.waktu_recovery" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Response Time:</h3>
<InputText
:readonly="true"
:value="
parseInt(dataDetail?.durasi_response_time)
? formatWaktu(dataDetail?.durasi_response_time)
: '-'
"
class-name="flex-1"
/>
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Recovery Time:</h3>
<InputText
:readonly="true"
class-name="flex-1"
:value="
parseInt(dataDetail?.durasi_recovery_time)
? formatWaktu(dataDetail?.durasi_recovery_time)
: '-'
"
/>
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Status :</h3>
<InputText :readonly="true" :value="dataDetail?.status_akhir" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">IDPEL/NOMETER:</h3>
<InputText :readonly="true" :value="dataDetail?.idpel_nometer" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Nama Pelapor:</h3>
<InputText :readonly="true" :value="dataDetail?.nama_pelapor" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Alamat Pelapor:</h3>
<InputText :readonly="true" :value="dataDetail?.alamat_pelapor" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">No Telp Pelapor:</h3>
<InputText :readonly="true" :value="dataDetail?.no_telp_pelapor" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Keterangan Pelapor:</h3>
<InputText :readonly="true" :value="dataDetail?.keterangan_pelapor" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Sumper Lapor:</h3>
<InputText :readonly="true" :value="dataDetail?.media" class-name="flex-1" />
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Unit Layanan Pelanggan:</h3>
<InputText
:readonly="true"
type="textarea"
:value="dataDetail?.nama_posko"
class-name="flex-1"
/>
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Penyebab:</h3>
<InputText
:readonly="true"
type="textarea"
:value="dataDetail?.penyebab"
class-name="flex-1"
/>
</div>
<div class="flex flex-row items-center justify-between w-full">
<h3 class="text-sm font-medium w-[170px] text-gray-800">Tindakan:</h3>
<InputText
:readonly="true"
type="textarea"
:value="dataDetail?.tindakan"
class-name="flex-1"
/>
</div>
</div>
</DetailDialog>
</template>
<script setup lang="ts">
import DetailDialog from '@/components/Dialogs/DetailDialog.vue'
import InputText from '@/components/InputText.vue'
import Filters from '@/components/Form/Filters.vue'
import Type1 from '@/components/Form/FiltersType/Type1.vue'
import { formatWaktu } from '@/components/Form/FiltersType/reference'
@ -217,6 +332,17 @@ const showIndicator = ref(true)
const shading = ref(true)
const showPane = ref(true)
const data = ref<any[]>([])
const dataDetail = ref<any>({})
const dialogDetail = ref(false)
const onSelectionChanged = ({ selectedRowsData }: any) => {
const data = selectedRowsData[0]
dataDetail.value = data
}
const showDetail = () => (dialogDetail.value = true)
const closeDialog = () => (dialogDetail.value = false)
const { onResult, onError, loading, refetch } = useQuery(
queries.gangguan.daftar.selesaiTanpaIDPelanggan,