Update props names in Type17Keluhan.vue and Type17Gangguan.vue files
This commit is contained in:
parent
412412121e
commit
9572c31744
@ -25,9 +25,9 @@ const props = defineProps({
|
|||||||
reportType: {
|
reportType: {
|
||||||
type: Array as PropType<any[]>,
|
type: Array as PropType<any[]>,
|
||||||
default: [
|
default: [
|
||||||
{ id: 1, name: 'No Lapor' },
|
{ id: 1, title: 'No Lapor' },
|
||||||
{ id: 2, name: 'Nama Pelapor' },
|
{ id: 2, title: 'Nama Pelapor' },
|
||||||
{ id: 3, name: 'Permasalahan' }
|
{ id: 3, title: 'Permasalahan' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
statusType: {
|
statusType: {
|
||||||
@ -67,18 +67,14 @@ const props = defineProps({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
const searchBy = ref<any>(props.reportType[0].title)
|
|
||||||
const status = ref(props.statusType[0])
|
|
||||||
const sla = ref(props.slaType[0])
|
|
||||||
|
|
||||||
const data = ref({
|
const data = ref({
|
||||||
uid: { id: 0, name: uidPlaceholder },
|
uid: { id: 0, name: uidPlaceholder },
|
||||||
up3: { id: 0, name: up3Placeholder },
|
up3: { id: 0, name: up3Placeholder },
|
||||||
ulp: { id: 0, name: ulpPlaceholder },
|
ulp: { id: 0, name: ulpPlaceholder },
|
||||||
status: status.value,
|
status: props.statusType[0],
|
||||||
keyword: keyword.value,
|
keyword: keyword.value,
|
||||||
searchBy: searchBy.value,
|
searchBy: props.reportType[0].title,
|
||||||
sla: sla.value,
|
sla: props.slaType[0],
|
||||||
periode: ''
|
periode: ''
|
||||||
})
|
})
|
||||||
const renderUp3 = ref(false)
|
const renderUp3 = ref(false)
|
||||||
@ -131,23 +127,31 @@ const setUlp = (value: any) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const setStatus = (value: any) => {
|
const setStatus = (value: any) => {
|
||||||
status.value = value
|
data.value = {
|
||||||
data.value.status = value
|
...data.value,
|
||||||
|
status: value
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const changeKeyword = (value: string) => {
|
const changeKeyword = (value: string) => {
|
||||||
keyword.value = value
|
data.value = {
|
||||||
data.value.keyword = value
|
...data.value,
|
||||||
|
keyword: value
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const changeReportTypeSelected = (id: any) => {
|
const changeReportTypeSelected = (id: any) => {
|
||||||
searchBy.value = props.reportType.find((item) => item.id == id)?.title
|
data.value = {
|
||||||
data.value.searchBy = searchBy.value
|
...data.value,
|
||||||
|
searchBy: props.reportType.find((item) => item.id == id)?.title
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const setSla = (value: any) => {
|
const setSla = (value: any) => {
|
||||||
sla.value = value
|
data.value = {
|
||||||
data.value.sla = value
|
...data.value,
|
||||||
|
sla: value
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
@ -205,7 +209,6 @@ onMounted(() => {
|
|||||||
<Select
|
<Select
|
||||||
@update:selected="setStatus($event)"
|
@update:selected="setStatus($event)"
|
||||||
:data="statusType"
|
:data="statusType"
|
||||||
:selected="status"
|
|
||||||
:placeholder="statusPlaceholder"
|
:placeholder="statusPlaceholder"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@ -213,12 +216,7 @@ onMounted(() => {
|
|||||||
<div class="flex flex-col flex-1 space-y-2">
|
<div class="flex flex-col flex-1 space-y-2">
|
||||||
<label class="filter-input-label">SLA:</label>
|
<label class="filter-input-label">SLA:</label>
|
||||||
|
|
||||||
<Select
|
<Select @update:selected="setSla($event)" :data="slaType" :placeholder="slaPlaceholder" />
|
||||||
@update:selected="setSla($event)"
|
|
||||||
:data="slaType"
|
|
||||||
:selected="sla"
|
|
||||||
:placeholder="slaPlaceholder"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex flex-col flex-1 space-y-2">
|
<div class="flex flex-col flex-1 space-y-2">
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
<Filters @reset-form="data = []" @run-search="() => filterData(filters)" class="mb-4">
|
<Filters @reset-form="data = []" @run-search="() => filterData(filters)" class="mb-4">
|
||||||
<Type17Gangguan v-if="tab == 'gangguan'" @update:filters="(value) => (filters = value)" />
|
<Type17Gangguan v-if="tab == 'gangguan'" @update:filters="(value) => (filters = value)" />
|
||||||
<!-- <Type17Keluhan v-else @update:filters="(value) => (filters = value)" /> -->
|
<Type17Keluhan v-else @update:filters="(value) => (filters = value)" />
|
||||||
</Filters>
|
</Filters>
|
||||||
|
|
||||||
<div id="data">
|
<div id="data">
|
||||||
@ -235,7 +235,7 @@ import {
|
|||||||
DxSearchPanel,
|
DxSearchPanel,
|
||||||
DxSelection
|
DxSelection
|
||||||
} from 'devextreme-vue/data-grid'
|
} from 'devextreme-vue/data-grid'
|
||||||
import { Type17Gangguan } from '@/components/Form/FiltersType'
|
import { Type17Gangguan, Type17Keluhan } from '@/components/Form/FiltersType'
|
||||||
import Filters from '@/components/Form/Filters.vue'
|
import Filters from '@/components/Form/Filters.vue'
|
||||||
import BufferDialog from '@/components/Dialogs/BufferDialog.vue'
|
import BufferDialog from '@/components/Dialogs/BufferDialog.vue'
|
||||||
import { queries, requestGraphQl } from '@/utils/api/api.graphql'
|
import { queries, requestGraphQl } from '@/utils/api/api.graphql'
|
||||||
@ -401,7 +401,7 @@ const resetData = () => {
|
|||||||
const filterData = async (params: any) => {
|
const filterData = async (params: any) => {
|
||||||
resetData()
|
resetData()
|
||||||
const dateValue = params.periode.split(' s/d ')
|
const dateValue = params.periode.split(' s/d ')
|
||||||
const { posko, uid, up3, status, keyword, searchBy, sla } = params
|
const { posko, ulp, uid, up3, status, keyword, searchBy, sla } = params
|
||||||
const query = {
|
const query = {
|
||||||
dateFrom: dateValue[0]
|
dateFrom: dateValue[0]
|
||||||
? dateValue[0].split('-').reverse().join('-')
|
? dateValue[0].split('-').reverse().join('-')
|
||||||
@ -412,6 +412,7 @@ const filterData = async (params: any) => {
|
|||||||
idPosko: posko ? posko.id : 0,
|
idPosko: posko ? posko.id : 0,
|
||||||
idUid: uid ? uid.id : 0,
|
idUid: uid ? uid.id : 0,
|
||||||
idUp3: up3 ? up3.id : 0,
|
idUp3: up3 ? up3.id : 0,
|
||||||
|
idUlp: ulp ? ulp.id : 0,
|
||||||
tipe_sla: sla ? sla.id : 0,
|
tipe_sla: sla ? sla.id : 0,
|
||||||
operator_sla: '',
|
operator_sla: '',
|
||||||
status_akhir: status ? status.name : '',
|
status_akhir: status ? status.name : '',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user