+
{
inputmode="numeric"
pattern="[0-9.]*"
:disabled="disabled"
- @oninput="handleInput($event)"
- @onblur="handleBlur($event)"
- @onfocus="handleFocus($event)"
+ @input="handleInput($event)"
+ @blur="handleBlur($event)"
+ @focus="handleFocus($event)"
class="w-full px-4 py-2 text-sm leading-6 placeholder:text-gray-400 text-gray-900 border-0 border-transparent rounded-lg outline-0 bg-gray-200 focus:outline-0 focus:border-0 focus:ring-0"
/>
diff --git a/src/components/InputText.vue b/src/components/InputText.vue
index e51eb58..6ccd13f 100755
--- a/src/components/InputText.vue
+++ b/src/components/InputText.vue
@@ -2,58 +2,74 @@
import { ref } from 'vue'
const props = defineProps({
- type: {
- type: String,
- default: "text",
- },
- placeholder: {
- type: String,
- default: "",
- },
- value: {
- type: String,
- default: "",
- },
- disabled: {
- type: Boolean,
- default: false,
- },
- readonly: {
- type: Boolean,
- default: false,
- },
- className: {
- type: String,
- default: "",
- }
+ type: {
+ type: String,
+ default: 'text'
+ },
+ placeholder: {
+ type: String,
+ default: ''
+ },
+ value: {
+ type: String,
+ default: ''
+ },
+ disabled: {
+ type: Boolean,
+ default: false
+ },
+ readonly: {
+ type: Boolean,
+ default: false
+ },
+ className: {
+ type: String,
+ default: ''
+ }
})
const emit = defineEmits(['update:value'])
const updateValue = (event: Event) => {
- const value = (event.target as HTMLInputElement).value;
- emit('update:value', value)
+ const value = (event.target as HTMLInputElement).value
+ emit('update:value', value)
}
const inputType = ref(props.type)
const switchInputType = () => {
- inputType.value = inputType.value == 'password' ? 'text' : 'password'
+ inputType.value = inputType.value == 'password' ? 'text' : 'password'
}
-
-
-
\ No newline at end of file
+
+
diff --git a/src/components/Pages/Gangguan/Table_1.vue b/src/components/Pages/Gangguan/Table_1.vue
index dc4201d..5b27b35 100755
--- a/src/components/Pages/Gangguan/Table_1.vue
+++ b/src/components/Pages/Gangguan/Table_1.vue
@@ -1,11 +1,6 @@
- {
- filterData(filters)
- }" class="mb-4">
- {
- filters = value
- }
- " />
+ filterData(filters)" class="mb-4">
+ (filters = value)" />
@@ -71,132 +66,95 @@
-
- No Laporan:
-
+ No Laporan:
-
- Pembuat Laporan:
-
+ Pembuat Laporan:
-
- Tanggal Laporan:
-
+ Tanggal Laporan:
-
- Tanggal Dialihkan:
-
+ Tanggal Dialihkan:
-
- Tanggal Respon:
-
+ Tanggal Respon:
-
- Tanggal Recovery:
-
+ Tanggal Recovery:
-
- Durasi Response Time:
-
+ Durasi Response Time:
-
- Durasi Recovery Time:
-
+ Durasi Recovery Time:
-
- Posko Awal:
-
+ Posko Awal:
-
- Posko Tujuan:
-
+ Posko Tujuan:
-
- Status:
-
+ Status:
-
- IDPEL/NO METER:
-
+ IDPEL/NO METER:
-
- Nama Pelapor:
-
+ Nama Pelapor:
-
- Alamat Pelapor:
-
+ Alamat Pelapor:
-
- Pembuat Laporan:
-
+ Pembuat Laporan:
-
- Keterangan Pelapor:
-
+ Keterangan Pelapor:
-
- Sumber Laporan:
-
+ Sumber Laporan:
-
- Posko:
-
+ Posko:
-
@@ -210,66 +168,96 @@ import {
DxLoadPanel,
DxPager,
DxPaging,
- DxScrolling,
DxSearchPanel,
DxSelection
} from 'devextreme-vue/data-grid'
-import { computed, onMounted, ref, watch } from 'vue'
+import { ref } from 'vue'
import { jsPDF } from 'jspdf'
import autoTable from 'jspdf-autotable'
-
-import { exportDataGrid as exportToPdf } from 'devextreme/pdf_exporter'
import { exportDataGrid as exportToExcel } from 'devextreme/excel_exporter'
import { saveAs } from 'file-saver'
import { Workbook } from 'exceljs'
-import { useDialogStore } from '@/stores/dialog'
import DetailDialog from '@/components/Dialogs/DetailDialog.vue'
import InputText from '@/components/InputText.vue'
import { useQuery } from '@vue/apollo-composable'
import gql from 'graphql-tag'
+
const position = { of: '#dataTable' }
const showIndicator = ref(true)
const shading = ref(true)
const showPane = ref(true)
-const dialog = useDialogStore()
const data = ref
([])
const dataDetail = ref()
const showDetail = ref(false)
-const runReset = ref(false)
const closeDetail = () => {
showDetail.value = false
}
-const onExporting = (e: any) => {
+const onExporting = (e: any) => {
if (e.format === 'pdf') {
const doc = new jsPDF({
orientation: 'landscape',
unit: 'mm',
- format: 'F4',
+ format: 'F4'
})
- // Add title on each page
- const title = "Daftar Gangguan Dialihkan Ke Posko Lain";
// Initialize page number
- const pageNumber = ref(1);
+ const pageNumber = ref(1)
autoTable(doc, {
- head: [['No Laporan', 'Pembuat Laporan', 'Tgl Lapor', 'Tgl Dialihkan', 'Tgl Response', 'Tgl Recovery', 'Durasi Response Time', 'Durasi Recovery Time', 'Posko Awal', 'Posko Tujuan', 'Status', 'IDPEL/NO METER', 'Nama Pelapor', 'Alamat Pelapor', 'No Telp Pelapor', 'Keterangan Pelapor', 'Sumber Lapor', 'Posko']],
+ head: [
+ [
+ 'No Laporan',
+ 'Pembuat Laporan',
+ 'Tgl Lapor',
+ 'Tgl Dialihkan',
+ 'Tgl Response',
+ 'Tgl Recovery',
+ 'Durasi Response Time',
+ 'Durasi Recovery Time',
+ 'Posko Awal',
+ 'Posko Tujuan',
+ 'Status',
+ 'IDPEL/NO METER',
+ 'Nama Pelapor',
+ 'Alamat Pelapor',
+ 'No Telp Pelapor',
+ 'Keterangan Pelapor',
+ 'Sumber Lapor',
+ 'Posko'
+ ]
+ ],
startY: 10,
- body: data.value.map((item) =>
- [item.no_laporan, item.pembuat_laporan, item.waktu_lapor, item.waktu_dialihkan, item.waktu_response, item.waktu_recovery, item.durasi_response_time, item.durasi_recovery_time, item.nama_posko_lama, item.nama_posko_baru, item.status_akhir, item.idpel_nometer, item.nama_pelapor, item.alamat_pelapor, item.no_telp_pelapor, item.keterangan_pelapor, item.media, item.posko]),
+ body: data.value.map((item) => [
+ item.no_laporan,
+ item.pembuat_laporan,
+ item.waktu_lapor,
+ item.waktu_dialihkan,
+ item.waktu_response,
+ item.waktu_recovery,
+ item.durasi_response_time,
+ item.durasi_recovery_time,
+ item.nama_posko_lama,
+ item.nama_posko_baru,
+ item.status_akhir,
+ item.idpel_nometer,
+ item.nama_pelapor,
+ item.alamat_pelapor,
+ item.no_telp_pelapor,
+ item.keterangan_pelapor,
+ item.media,
+ item.posko
+ ]),
styles: {
fontSize: 6,
cellWidth: 'wrap'
- },
-
-
+ }
})
doc.setProperties({
title: 'Daftar Gangguan Dialihkan Ke Posko Lain',
- subject: 'Daftar Gangguan Dialihkan Ke Posko Lain',
- });
+ subject: 'Daftar Gangguan Dialihkan Ke Posko Lain'
+ })
- pageNumber.value++; // Increment the pageNumber
+ pageNumber.value++ // Increment the pageNumber
doc.save(`Daftar Gangguan Dialihkan Ke Posko Lain.pdf`)
// exportToPdf({
@@ -289,7 +277,10 @@ const onExporting = (e: any) => {
autoFilterEnabled: true
}).then(() => {
workbook.xlsx.writeBuffer().then((buffer: any) => {
- saveAs(new Blob([buffer], { type: 'application/octet-stream' }), 'DaftarGangguanDialihkanKePoskoLain.xlsx')
+ saveAs(
+ new Blob([buffer], { type: 'application/octet-stream' }),
+ 'DaftarGangguanDialihkanKePoskoLain.xlsx'
+ )
})
})
@@ -332,8 +323,12 @@ 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),
+ 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.id : 0,
idUid: uid ? uid.id : 0,
idUp3: up3 ? up3.id : 0
diff --git a/src/components/Pages/Gangguan/Table_2.vue b/src/components/Pages/Gangguan/Table_2.vue
index d237ad4..e29179b 100755
--- a/src/components/Pages/Gangguan/Table_2.vue
+++ b/src/components/Pages/Gangguan/Table_2.vue
@@ -1,166 +1,271 @@
- filterData(filters)" class="mb-4">
- {
- filters = value
- }
- " />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ filterData(filters)" class="mb-4">
+ (filters = value)" />
+
-
-
- {{ data.text }}
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ data.text }}
+
+
+
+
+
+
+
+
+
No Laporan:
+
+
+
+
+
Tgl Lapor:
+
+
+
+
+
Tgl Response:
+
+
+
+
+
Tgl Recovery:
+
+
+
+
+
Jml Lapor:
+
+
+
+
+
Response Time:
+
+
+
+
+
Recovery Time:
+
+
+
+
+
Status :
+
+
+
+
+
IDPEL/NOMETER:
+
+
+
+
+
Nama Pelapor:
+
+
+
+
+
Alamat Pelapor:
+
+
+
+
+
No Telp Pelapor:
+
+
+
+
+
Keterangan Pelapor:
+
+
+
+
+
Sumper Lapor:
+
+
+
+
+
Unit Layanan Pelanggan:
+
+
-
-
-
-
-
- No Laporan:
-
-
-
-
-
-
- Tanggal Lapor:
-
-
-
-
-
-
- Tanggal Response:
-
-
-
-
-
-
- Tanggal Recovery:
-
-
-
-
-
-
- Jumlah Lapor:
-
-
-
-
-
-
- Durasi Response Time:
-
-
-
-
-
-
- Durasi Response Time:
-
-
-
-
-
-
- Status :
-
-
-
-
-
-
- IDPEL/NO METER:
-
-
-
-
-
-
- Nama Pelapor:
-
-
-
-
-
-
- No Telp Pelapor:
-
-
-
-
-
-
- Keterangan Pelapor:
-
-
-
-
-
-
- Sumper Lapor:
-
-
-
-
-
-
- Posko:
-
-
-
-
-
-
+
\ No newline at end of file
+
diff --git a/src/components/Pages/Gangguan/Table_3.vue b/src/components/Pages/Gangguan/Table_3.vue
index 9f4ba9a..c71967e 100755
--- a/src/components/Pages/Gangguan/Table_3.vue
+++ b/src/components/Pages/Gangguan/Table_3.vue
@@ -1,55 +1,277 @@
- filterData(filters)" class="mb-4">
- {
- filters = value
- }
- " />
-
-
-
-
-
-
-
-
-
-
+ filterData(filters)" class="mb-4">
+ (filters = value)" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ data.text }}
+
+
+
+
+
+
+
+
+
No Laporan:
+
+
+
+
+
Tgl Lapor:
+
+
+
+
+
Tgl Response:
+
+
+
+
+
Tgl Recovery:
+
+
+
+
+
Response Time:
+
+
+
+
+
Recovery Time:
+
+
+
+
+
Status :
+
+
+
+
+
IDPEL/NOMETER:
+
+
+
+
+
Nama Pelapor:
+
+
+
+
+
Alamat Pelapor:
+
+
+
+
+
No Telp Pelapor:
+
+
+
+
+
Keterangan Pelapor:
+
+
+
+
+
Sumper Lapor:
+
+
+
+
+
Unit Layanan Pelanggan:
+
+
+
+
+
Penyebab:
+
+
+
+
+
Tindakan:
+
+
+
\ No newline at end of file
+
diff --git a/src/components/Pages/Gangguan/Table_4.vue b/src/components/Pages/Gangguan/Table_4.vue
index a50d7f2..d650ec5 100755
--- a/src/components/Pages/Gangguan/Table_4.vue
+++ b/src/components/Pages/Gangguan/Table_4.vue
@@ -1,98 +1,219 @@
- filterData(filters)" class="mb-4">
- {
- filters = value
- }
- " />
-
-
-
-
-
-
-
-
-
-
+ filterData(filters)" class="mb-4">
+ (filters = value)" />
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
+
diff --git a/src/components/Pages/Gangguan/Table_6.vue b/src/components/Pages/Gangguan/Table_6.vue
index e919518..c938d4e 100755
--- a/src/components/Pages/Gangguan/Table_6.vue
+++ b/src/components/Pages/Gangguan/Table_6.vue
@@ -1,46 +1,149 @@
- filterData(filters)" class="mb-4">
- {
- filters = value
- }
- " />
-
-
-
-
-
-
-
-
-
-
+ filterData(filters)" class="mb-4">
+ (filters = value)" />
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
+
diff --git a/src/components/Select.vue b/src/components/Select.vue
index 57b341b..5092440 100755
--- a/src/components/Select.vue
+++ b/src/components/Select.vue
@@ -29,8 +29,6 @@ const selected = ref(data.value[0].id)
watch(
() => props.selected,
(value: any) => {
- console.log('value', value)
- console.log('aaaaaaaaaaaaaaaa')
selected.value = value.id
}
)
diff --git a/src/router/index.ts b/src/router/index.ts
index 592d3ea..ea54da9 100755
--- a/src/router/index.ts
+++ b/src/router/index.ts
@@ -1,7 +1,6 @@
import { createRouter, createWebHistory, type RouteRecordRaw } from 'vue-router'
import { useAuthStore } from '@/stores/auth'
import HomeView from '@/views/HomeView.vue'
-import TestView from '@/views/TestView.vue'
import LoginView from '@/views/LoginView.vue'
import NotFoundView from '@/views/NotFoundView.vue'
import WelcomePage from '@/components/Pages/Welcome.vue'
@@ -532,7 +531,7 @@ export const routes: RouteRecordRaw[] = [
},
{
path: 'check-in-out',
- name: 'Check In OutCheck In Dan Check Out',
+ name: 'Check In Dan Check Out',
children: [
{
path: 'laporan',
@@ -696,11 +695,6 @@ export const routes: RouteRecordRaw[] = [
name: 'Login',
component: LoginView
},
- {
- path: '/playground',
- name: 'Playground',
- component: TestView
- },
{
path: '/404',
name: 'Not Found',
@@ -788,8 +782,8 @@ export const fixRoute = (route: RouteRecordRaw[]): RouteRecordRaw[] => {
fullPath === '/home/'
? ''
: fullPath.includes('/home/')
- ? fullPath.replace('/home/', '')
- : fullPath,
+ ? fullPath.replace('/home/', '')
+ : fullPath,
name: r.name,
component: r.component
} as RouteRecordRaw
diff --git a/src/utils/graphql.ts b/src/utils/graphql.ts
index 98c8a4e..2dab2c2 100755
--- a/src/utils/graphql.ts
+++ b/src/utils/graphql.ts
@@ -1,12 +1,10 @@
import { ApolloClient, createHttpLink, InMemoryCache } from '@apollo/client/core'
export const apolloClient = () => {
-
const httpLink = createHttpLink({
uri: import.meta.env.VITE_APP_GRAPHQL_ENDPOINT,
- credentials: 'include',
- });
-
+ credentials: 'include' // Include credentials for cross-origin requests
+ })
const apolloClient = new ApolloClient({
cache: new InMemoryCache(),
@@ -16,9 +14,9 @@ export const apolloClient = () => {
'Accept-Encoding': 'gzip, deflate',
'Cache-Control': 'no-cache',
Connection: 'keep-alive',
- 'Content-Type': 'application/json',
+ 'Content-Type': 'application/json'
// Add other headers as needed
- },
- });
- return apolloClient;
-}
\ No newline at end of file
+ }
+ })
+ return apolloClient
+}
diff --git a/src/utils/network.ts b/src/utils/network.ts
index f6bb137..655cca7 100755
--- a/src/utils/network.ts
+++ b/src/utils/network.ts
@@ -1,5 +1,6 @@
import axios from 'axios'
-const url = import.meta.env.VITE_APP_REST_ENDPOINT as string
+
+const url = import.meta.env.VITE_APP_REST_ENDPOINT
const instance = axios.create({
baseURL: url
})
@@ -12,4 +13,13 @@ const getJenisTransaksi = async () => await instance.get('/jenisTransaksi')
const getUp3 = async (uid: number) => await instance.get('/up3?uid=' + uid)
const getUlp = async (up3: number) => await instance.get('/ulp?up3=' + up3)
const getPosko = async (uppp: number) => await instance.get('/posko?up3=' + uppp)
-export { getUid, getUp3, getPosko, getUlp, getMedia, getJenisTransaksi, getUidRegional, getRegional }
+export {
+ getUid,
+ getUp3,
+ getPosko,
+ getUlp,
+ getMedia,
+ getJenisTransaksi,
+ getUidRegional,
+ getRegional
+}
diff --git a/src/views/TestView.vue b/src/views/TestView.vue
deleted file mode 100755
index a805d6f..0000000
--- a/src/views/TestView.vue
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-