diff --git a/src/assets/css/style.css b/src/assets/css/style.css index c163ba1..ee4d47d 100755 --- a/src/assets/css/style.css +++ b/src/assets/css/style.css @@ -1048,8 +1048,8 @@ body { top: 100%; } -.top-px { - top: 1px; +.top-16 { + top: 4rem; } .z-10 { @@ -1076,35 +1076,8 @@ body { grid-column: span 7 / span 7; } -.-m-px { - margin: -1px; -} - -.m-0 { - margin: 0px; -} - -.m-3 { - margin: 0.75rem; -} - -.m-3\.5 { - margin: 0.875rem; -} - -.mx-0 { - margin-left: 0px; - margin-right: 0px; -} - -.mx-0\.5 { - margin-left: 0.125rem; - margin-right: 0.125rem; -} - -.mx-1 { - margin-left: 0.25rem; - margin-right: 0.25rem; +.m-auto { + margin: auto; } .mx-2 { @@ -1480,12 +1453,8 @@ body { width: 100%; } -.w-px { - width: 1px; -} - -.min-w-0 { - min-width: 0px; +.w-72 { + width: 18rem; } .max-w-2xl { @@ -2099,6 +2068,21 @@ body { background-color: rgb(204 204 0 / var(--tw-bg-opacity)); } +.bg-red-500 { + --tw-bg-opacity: 1; + background-color: rgb(255 0 0 / var(--tw-bg-opacity)); +} + +.bg-blue-200 { + --tw-bg-opacity: 1; + background-color: rgb(191 219 254 / var(--tw-bg-opacity)); +} + +.bg-secondary-300 { + --tw-bg-opacity: 1; + background-color: rgb(102 194 208 / var(--tw-bg-opacity)); +} + .bg-opacity-100 { --tw-bg-opacity: 1; } @@ -2308,14 +2292,9 @@ body { padding-bottom: 1.5rem; } -.py-\[5px\] { - padding-top: 5px; - padding-bottom: 5px; -} - -.py-px { - padding-top: 1px; - padding-bottom: 1px; +.py-5 { + padding-top: 1.25rem; + padding-bottom: 1.25rem; } .pb-4 { @@ -2797,6 +2776,10 @@ body { --tw-ring-color: rgb(209 213 219 / var(--tw-ring-opacity)); } +.ring-black\/5 { + --tw-ring-color: rgb(0 0 0 / 0.05); +} + .ring-opacity-5 { --tw-ring-opacity: 0.05; } @@ -3099,6 +3082,10 @@ body { --tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity)); } +.focus-visible\:ring-white\/75:focus-visible { + --tw-ring-color: rgb(255 255 255 / 0.75); +} + .focus-visible\:ring-opacity-75:focus-visible { --tw-ring-opacity: 0.75; } diff --git a/src/components/DatePicker.vue b/src/components/DatePicker.vue index a68317b..e3b775b 100755 --- a/src/components/DatePicker.vue +++ b/src/components/DatePicker.vue @@ -1,5 +1,4 @@ @@ -79,7 +59,7 @@ onMounted(() => {
-
@@ -96,9 +76,12 @@ onMounted(() => {
- +
diff --git a/src/components/Form/FiltersType/reference.ts b/src/components/Form/FiltersType/reference.ts index a297a19..0392da9 100755 --- a/src/components/Form/FiltersType/reference.ts +++ b/src/components/Form/FiltersType/reference.ts @@ -1,13 +1,12 @@ -import { getUid, getUp3, getPosko, getUlp,getUidRegional, getRegional } from '@/utils/network' -import { ref } from 'vue' import { usePostsStore } from '@/stores/posts' -import { useUp3Store } from '@/stores/up3' import { useRegionStore } from '@/stores/region' import { useUlpStore } from '@/stores/ulp' - +import { useUp3Store } from '@/stores/up3' +import { getUid, getUp3, getPosko, getUlp,getRegional } from '@/utils/network' +import { ref } from 'vue' interface Item { - id: any; - name: any; + id: any + name: any } const months = [ { id: 1, name: 'Januari' }, @@ -21,24 +20,40 @@ const months = [ { id: 9, name: 'September' }, { id: 10, name: 'Oktober' }, { id: 11, name: 'November' }, - { id: 12, name: 'Desember' }, + { id: 12, name: 'Desember' } ] - // create 4 year back array -const year = new Date().getFullYear(); -let years = ref([]); +const year = new Date().getFullYear() +const years = ref([]) for (let i = 0; i < 5; i++) { years.value.push({ id: year - i, name: year - i }) } - -const timeout = ref() -const itemsUid = ref([]); -const itemsUp3 = ref([]); -const itemsPosko = ref([]); -const itemsUlp = ref([]); -const itemsRegional = ref([]); -const itemsMedia = ref([]); -const fetchRegional =async () => { +const itemsUid = ref([]) +const itemsUp3 = ref([]) +const itemsPosko = ref([]) +const itemsUlp = ref([]) +const itemsRegional = ref([]) +const itemsMedia = ref([]) +// Fetch data from the API using Axios +const fetchMedia = () => { + itemsMedia.value = [ + { id: 'Ulasan Aplikasi PLN Mobile', name: 'Ulasan Aplikasi PLN Mobile' }, + { id: 'Twitter', name: 'Twitter' }, + { id: 'PLN Mobile', name: 'PLN Mobile' }, + { id: 'Media Massa', name: 'Media Massa' }, + { id: 'Live Chat Website', name: 'Live Chat Website' }, + { id: 'Live Chat PLN Mobile', name: 'Live Chat PLN Mobile' }, + { id: 'Instagram', name: 'Instagram' }, + { id: 'Facebook', name: 'Facebook' }, + { id: 'Email', name: 'Email' }, + { id: 'EMS', name: 'EMS' }, + { id: 'Datang ke Kantor', name: 'Datang ke Kantor' }, + { id: 'Call ke Kantor Unit', name: 'Call ke Kantor Unit' }, + { id: 'Call PLN 123', name: 'Call PLN 123' } + ] +} +// Fetch data from the API using Axios +const fetchUid = async () => { try { const res = await getRegional() itemsRegional.value = res.data.map((item: any) => ( @@ -51,67 +66,7 @@ const fetchRegional =async () => { console.error('Error fetching data:', error); } } -const fetchStatus = (data : any) => { - const status = [ - {"id": "8", "name": "Selesai"}, - {"id": "7", "name": "Nyala"}, - {"id": "6", "name": "Pengalihan"}, - {"id": "5", "name": "Dialihkan"}, - {"id": "4", "name": "Dalam Pengerjaan"}, - {"id": "3", "name": "Dalam Perjalanan"}, - {"id": "2", "name": "Penugasan Regu"}, - {"id": "1", "name": "lapor"} - ] - const filteredStatus = status.find(item => item.id == data); - const name = filteredStatus ? filteredStatus.name : null; - return name; -} -const fetchMedia = () => { - itemsMedia.value = [ - { id: "Ulasan Aplikasi PLN Mobile", name: "Ulasan Aplikasi PLN Mobile" }, - { id: "Twitter", name: "Twitter" }, - { id: "PLN Mobile", name: "PLN Mobile" }, - { id: "Media Massa", name: "Media Massa" }, - { id: "Live Chat Website", name: "Live Chat Website" }, - { id: "Live Chat PLN Mobile", name: "Live Chat PLN Mobile" }, - { id: "Instagram", name: "Instagram" }, - { id: "Facebook", name: "Facebook" }, - { id: "Email", name: "Email" }, - { id: "EMS", name: "EMS" }, - { id: "Datang ke Kantor", name: "Datang ke Kantor" }, - { id: "Call ke Kantor Unit", name: "Call ke Kantor Unit" }, - { id: "Call PLN 123", name: "Call PLN 123" }, - ] - -} -// Fetch data from the API using Axios -const fetchUid = async () => { - try { - const res = await getUid() - itemsUid.value = res.data.map((item: any) => ( - { - id: item.id, - name: item.nama, - } - )); - } catch (error) { - console.error('Error fetching data:', error); - } -}; -const fetchUidWithRegional = async (regional: number) => { - try { - const res = await getUidRegional(regional) - itemsUid.value = res.data.map((item: any) => ( - { - id: item.id, - name: item.nama, - } - )); - } catch (error) { - console.error('Error fetching data:', error); - } -} const fetchDataUp3 = async (uid: number) => { try { const res = await getUp3(uid) @@ -126,32 +81,50 @@ const fetchDataUp3 = async (uid: number) => { const fetchDataUlp = async (up3: number) => { try { const res = await getUlp(up3) - itemsUlp.value = res.data.map((item: any) => ( - { - id: item.id, - name: item.nama, - } - )); + itemsUlp.value = res.data.map((item: any) => ({ + id: item.id, + name: item.nama + })) } catch (error) { console.error('Error fetching data:', error) } } const fetchDataPosko = async (up3: number) => { - clearTimeout(timeout.value) - timeout.value = setTimeout(async () => { - try { - const res = await getPosko(up3) - itemsPosko.value = res.data.map((item: any) => ( - { - id: item.id, - name: item.nama, - } - )); - } catch (error) { - console.error('Error fetching data:', error); - } - }, 300); -}; + try { + const res = await getPosko(up3) + itemsPosko.value = res.data.map((item: any) => ({ + id: item.id, + name: item.nama + })) + } catch (error) { + console.error('Error fetching data:', error) + } +} +const fetchRegional = () => { + itemsRegional.value = [ + { id: '1', name: 'Wilayah Sumatera' }, + { id: '2', name: 'Wilayah Jawa Bali' }, + { id: '3', name: 'Wilayah Kalimantan' }, + { id: '4', name: 'Wilayah Sulawesi' }, + { id: '5', name: 'Wilayah Nusa Tenggara' }, + { id: '6', name: 'Wilayah Maluku Papua' } + ] +} +const fetchStatus = (data: any) => { + const status = [ + { id: '8', name: 'Selesai' }, + { id: '7', name: 'Nyala' }, + { id: '6', name: 'Pengalihan' }, + { id: '5', name: 'Dialihkan' }, + { id: '4', name: 'Dalam Pengerjaan' }, + { id: '3', name: 'Dalam Perjalanan' }, + { id: '2', name: 'Penugasan Regu' }, + { id: '1', name: 'lapor' } + ] + const filteredStatus = status.find((item) => item.id == data) + const name = filteredStatus ? filteredStatus.name : null + return name +} const selectedUid = (value: any) => { useRegionStore().setData(value.id) fetchDataUp3(value.id) @@ -173,4 +146,22 @@ const selectedUlp = (value: any) => { useUlpStore().setData(value.id) } -export { selectedUid, selectedUp3Posko, selectedUp3Ulp, selectedPosko, selectedUlp, fetchMedia,fetchStatus,fetchUidWithRegional,fetchRegional, fetchUid, itemsUid, itemsUp3, itemsPosko, itemsRegional, itemsMedia, itemsUlp, months, years }; +export { + selectedUid, + selectedUp3Posko, + selectedUp3Ulp, + selectedPosko, + selectedUlp, + fetchRegional, + fetchUid, + fetchMedia, + fetchStatus, + itemsUid, + itemsUp3, + itemsPosko, + itemsRegional, + itemsMedia, + itemsUlp, + months, + years +} diff --git a/src/components/Pages/Gangguan/Table_1.vue b/src/components/Pages/Gangguan/Table_1.vue index 14889e7..5d2cf54 100755 --- a/src/components/Pages/Gangguan/Table_1.vue +++ b/src/components/Pages/Gangguan/Table_1.vue @@ -1,9 +1,20 @@ - - +