Refactor form filters in multiple components
This commit is contained in:
parent
05946bfd33
commit
cbe6dbb262
@ -20,12 +20,12 @@ const up3Placeholder = 'Semua Unit Pelaksanaan Pelayanan Pelanggan';
|
|||||||
const ulpPlaceholder = 'Semua Unit Layanan Pelanggan';
|
const ulpPlaceholder = 'Semua Unit Layanan Pelanggan';
|
||||||
const up3 = ref({ id: 0, name: up3Placeholder });
|
const up3 = ref({ id: 0, name: up3Placeholder });
|
||||||
const uid = ref({ id: 0, name: uidPlaceholder });
|
const uid = ref({ id: 0, name: uidPlaceholder });
|
||||||
const ulp = ref({ id: "", name: ulpPlaceholder });
|
const ulp = ref({ id: 0, name: ulpPlaceholder });
|
||||||
const emit = defineEmits(['update:filters'])
|
const emit = defineEmits(['update:filters'])
|
||||||
const data = ref({
|
const data = ref({
|
||||||
uid: uid.value,
|
uid: uid.value,
|
||||||
up3: up3.value,
|
up3: up3.value,
|
||||||
posko: ulp.value,
|
ulp: ulp.value,
|
||||||
periode: '',
|
periode: '',
|
||||||
minJmlLapor: 1,
|
minJmlLapor: 1,
|
||||||
maxJmlLapor: 1
|
maxJmlLapor: 1
|
||||||
@ -40,14 +40,14 @@ const setUid = (value: any) => {
|
|||||||
const setUp3 = (value: any) => {
|
const setUp3 = (value: any) => {
|
||||||
up3.value = value;
|
up3.value = value;
|
||||||
selectedUp3Ulp(value);
|
selectedUp3Ulp(value);
|
||||||
ulp.value = { id: "", name: ulpPlaceholder };
|
ulp.value = { id: 0, name: ulpPlaceholder };
|
||||||
data.value.up3 = value;
|
data.value.up3 = value;
|
||||||
};
|
};
|
||||||
|
|
||||||
const setUlp = (value: any) => {
|
const setUlp = (value: any) => {
|
||||||
ulp.value = value;
|
ulp.value = value;
|
||||||
selectedUlp(value);
|
selectedUlp(value);
|
||||||
data.value.posko = value;
|
data.value.ulp = value;
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
emit('update:filters', data.value)
|
emit('update:filters', data.value)
|
||||||
|
@ -21,7 +21,7 @@ const up3Placeholder = 'Semua Unit Pelaksanaan Pelayanan Pelanggan';
|
|||||||
const ulpPlaceholder = 'Semua Unit Layanan Pelanggan';
|
const ulpPlaceholder = 'Semua Unit Layanan Pelanggan';
|
||||||
const up3 = ref({ id: 0, name: up3Placeholder });
|
const up3 = ref({ id: 0, name: up3Placeholder });
|
||||||
const uid = ref({ id: 0, name: uidPlaceholder });
|
const uid = ref({ id: 0, name: uidPlaceholder });
|
||||||
const ulp = ref({ id: "", name: ulpPlaceholder });
|
const ulp = ref({ id: 0, name: ulpPlaceholder });
|
||||||
const emit = defineEmits(['update:filters'])
|
const emit = defineEmits(['update:filters'])
|
||||||
|
|
||||||
const sla = [
|
const sla = [
|
||||||
@ -37,7 +37,7 @@ const sla = [
|
|||||||
const data = ref({
|
const data = ref({
|
||||||
uid: uid.value,
|
uid: uid.value,
|
||||||
up3: up3.value,
|
up3: up3.value,
|
||||||
posko: ulp.value,
|
ulp: ulp.value,
|
||||||
periode: '',
|
periode: '',
|
||||||
minTime: 1,
|
minTime: 1,
|
||||||
maxTime: 1
|
maxTime: 1
|
||||||
@ -52,14 +52,14 @@ const setUid = (value: any) => {
|
|||||||
const setUp3 = (value: any) => {
|
const setUp3 = (value: any) => {
|
||||||
up3.value = value;
|
up3.value = value;
|
||||||
selectedUp3Ulp(value);
|
selectedUp3Ulp(value);
|
||||||
ulp.value = { id: "", name: ulpPlaceholder };
|
ulp.value = { id: 0, name: ulpPlaceholder };
|
||||||
data.value.up3 = value;
|
data.value.up3 = value;
|
||||||
};
|
};
|
||||||
|
|
||||||
const setUlp = (value: any) => {
|
const setUlp = (value: any) => {
|
||||||
ulp.value = value;
|
ulp.value = value;
|
||||||
selectedUlp(value);
|
selectedUlp(value);
|
||||||
data.value.posko = value;
|
data.value.ulp = value;
|
||||||
};
|
};
|
||||||
const setMin = (value: any) => {
|
const setMin = (value: any) => {
|
||||||
console.log(value)
|
console.log(value)
|
||||||
|
@ -9,12 +9,12 @@ const up3Placeholder = 'Semua Unit Pelaksanaan Pelayanan Pelanggan';
|
|||||||
const ulpPlaceholder = 'Semua Unit Layanan Pelanggan';
|
const ulpPlaceholder = 'Semua Unit Layanan Pelanggan';
|
||||||
const uppp = ref({ id: 0, name: up3Placeholder });
|
const uppp = ref({ id: 0, name: up3Placeholder });
|
||||||
const uid = ref({ id: 0, name: uidPlaceholder });
|
const uid = ref({ id: 0, name: uidPlaceholder });
|
||||||
const ulp = ref({ id: "", name: ulpPlaceholder });
|
const ulp = ref({ id: 0, name: ulpPlaceholder });
|
||||||
const emit = defineEmits(['update:filters'])
|
const emit = defineEmits(['update:filters'])
|
||||||
const data = ref({
|
const data = ref({
|
||||||
uid: uid.value,
|
uid: uid.value,
|
||||||
up3: uppp.value,
|
up3: uppp.value,
|
||||||
posko: ulp.value,
|
ulp: ulp.value,
|
||||||
periode: '',
|
periode: '',
|
||||||
minDurasiResponseTime: 1,
|
minDurasiResponseTime: 1,
|
||||||
maxDurasiResponseTime: 1
|
maxDurasiResponseTime: 1
|
||||||
@ -29,14 +29,14 @@ const setUid = (value: any) => {
|
|||||||
const setUp3 = (value: any) => {
|
const setUp3 = (value: any) => {
|
||||||
uppp.value = value;
|
uppp.value = value;
|
||||||
selectedUp3Ulp(value);
|
selectedUp3Ulp(value);
|
||||||
ulp.value = { id: "", name: ulpPlaceholder };
|
ulp.value = { id: 0, name: ulpPlaceholder };
|
||||||
data.value.up3 = value;
|
data.value.up3 = value;
|
||||||
};
|
};
|
||||||
|
|
||||||
const setUlp = (value: any) => {
|
const setUlp = (value: any) => {
|
||||||
ulp.value = value;
|
ulp.value = value;
|
||||||
selectedUlp(value);
|
selectedUlp(value);
|
||||||
data.value.posko = value;
|
data.value.ulp = value;
|
||||||
};
|
};
|
||||||
const triggerInput = ref(false)
|
const triggerInput = ref(false)
|
||||||
const sla = [
|
const sla = [
|
||||||
|
@ -14,7 +14,7 @@ const emit = defineEmits(['update:filters'])
|
|||||||
const data = ref({
|
const data = ref({
|
||||||
uid: uid.value,
|
uid: uid.value,
|
||||||
up3: up3.value,
|
up3: up3.value,
|
||||||
posko: ulp.value,
|
ulp: ulp.value,
|
||||||
periode: '',
|
periode: '',
|
||||||
group: 1
|
group: 1
|
||||||
})
|
})
|
||||||
@ -35,7 +35,7 @@ const setUp3 = (value: any) => {
|
|||||||
const setUlp = (value: any) => {
|
const setUlp = (value: any) => {
|
||||||
ulp.value = value;
|
ulp.value = value;
|
||||||
selectedUlp(value);
|
selectedUlp(value);
|
||||||
data.value.posko = value;
|
data.value.ulp = value;
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
emit('update:filters', data.value)
|
emit('update:filters', data.value)
|
||||||
|
@ -8,12 +8,12 @@ const up3Placeholder = 'Semua Unit Pelaksanaan Pelayanan Pelanggan';
|
|||||||
const ulpPlaceholder = 'Semua Unit Layanan Pelanggan';
|
const ulpPlaceholder = 'Semua Unit Layanan Pelanggan';
|
||||||
const uppp = ref({ id: 0, name: up3Placeholder });
|
const uppp = ref({ id: 0, name: up3Placeholder });
|
||||||
const uid = ref({ id: 0, name: uidPlaceholder });
|
const uid = ref({ id: 0, name: uidPlaceholder });
|
||||||
const ulp = ref({ id: "", name: ulpPlaceholder });
|
const ulp = ref({ id: 0, name: ulpPlaceholder });
|
||||||
const emit = defineEmits(['update:filters'])
|
const emit = defineEmits(['update:filters'])
|
||||||
const data = ref({
|
const data = ref({
|
||||||
uid: uid.value,
|
uid: uid.value,
|
||||||
up3: uppp.value,
|
up3: uppp.value,
|
||||||
posko: ulp.value,
|
ulp: ulp.value,
|
||||||
periode: '',
|
periode: '',
|
||||||
group: 1
|
group: 1
|
||||||
})
|
})
|
||||||
|
@ -11,7 +11,7 @@ const up3Placeholder = 'Semua Unit Pelaksanaan Pelayanan Pelanggan';
|
|||||||
const poskoPlaceholder = 'Semua Posko';
|
const poskoPlaceholder = 'Semua Posko';
|
||||||
const up3 = ref({ id: 0, name: up3Placeholder });
|
const up3 = ref({ id: 0, name: up3Placeholder });
|
||||||
const uid = ref({ id: 0, name: uidPlaceholder });
|
const uid = ref({ id: 0, name: uidPlaceholder });
|
||||||
const posko = ref({ id: "", name: poskoPlaceholder });
|
const posko = ref({ id: 0, name: poskoPlaceholder });
|
||||||
const emit = defineEmits(['update:filters'])
|
const emit = defineEmits(['update:filters'])
|
||||||
const jenisTransakasi = [
|
const jenisTransakasi = [
|
||||||
{ id: 1, value: 'Koreksi Transaksi Individual',label: 'Koreksi Transaksi Individual' },
|
{ id: 1, value: 'Koreksi Transaksi Individual',label: 'Koreksi Transaksi Individual' },
|
||||||
|
@ -46,7 +46,7 @@ const data = ref({
|
|||||||
regional: regional.value,
|
regional: regional.value,
|
||||||
uid: uid.value,
|
uid: uid.value,
|
||||||
up3: uppp.value,
|
up3: uppp.value,
|
||||||
posko: ulp.value,
|
ulp: ulp.value,
|
||||||
periode: '',
|
periode: '',
|
||||||
bulan: bulan.value,
|
bulan: bulan.value,
|
||||||
tahun: tahun.value
|
tahun: tahun.value
|
||||||
@ -77,7 +77,7 @@ const setUp3 = (value: any) => {
|
|||||||
const setUlp = (value: any) => {
|
const setUlp = (value: any) => {
|
||||||
ulp.value = value
|
ulp.value = value
|
||||||
selectedUp3Ulp(value)
|
selectedUp3Ulp(value)
|
||||||
data.value.posko = value
|
data.value.ulp = value
|
||||||
}
|
}
|
||||||
const setMonth = (value: any) => {
|
const setMonth = (value: any) => {
|
||||||
bulan.value = value
|
bulan.value = value
|
||||||
|
@ -8,12 +8,12 @@ const up3Placeholder = 'Semua Unit Pelaksanaan Pelayanan Pelanggan';
|
|||||||
const ulpPlaceholder = 'Semua Unit Layanan Pelanggan';
|
const ulpPlaceholder = 'Semua Unit Layanan Pelanggan';
|
||||||
const uppp = ref({ id: 0, name: up3Placeholder });
|
const uppp = ref({ id: 0, name: up3Placeholder });
|
||||||
const uid = ref({ id: 0, name: uidPlaceholder });
|
const uid = ref({ id: 0, name: uidPlaceholder });
|
||||||
const ulp = ref({ id: "", name: ulpPlaceholder });
|
const ulp = ref({ id: 0, name: ulpPlaceholder });
|
||||||
const emit = defineEmits(['update:filters'])
|
const emit = defineEmits(['update:filters'])
|
||||||
const data = ref({
|
const data = ref({
|
||||||
uid: uid.value,
|
uid: uid.value,
|
||||||
up3: uppp.value,
|
up3: uppp.value,
|
||||||
posko: ulp.value,
|
ulp: ulp.value,
|
||||||
periode: '',
|
periode: '',
|
||||||
jenisLaporan : ''
|
jenisLaporan : ''
|
||||||
})
|
})
|
||||||
@ -27,14 +27,14 @@ const setUid = (value: any) => {
|
|||||||
const setUp3 = (value: any) => {
|
const setUp3 = (value: any) => {
|
||||||
uppp.value = value;
|
uppp.value = value;
|
||||||
selectedUp3Ulp(value);
|
selectedUp3Ulp(value);
|
||||||
ulp.value = { id: "", name: ulpPlaceholder };
|
ulp.value = { id: 0, name: ulpPlaceholder };
|
||||||
data.value.up3 = value;
|
data.value.up3 = value;
|
||||||
};
|
};
|
||||||
|
|
||||||
const setUlp = (value: any) => {
|
const setUlp = (value: any) => {
|
||||||
ulp.value = value;
|
ulp.value = value;
|
||||||
selectedUlp(value);
|
selectedUlp(value);
|
||||||
data.value.posko = value;
|
data.value.ulp = value;
|
||||||
};
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
emit('update:filters', data.value)
|
emit('update:filters', data.value)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user