Refactor form filters in multiple components
This commit is contained in:
@@ -21,7 +21,7 @@ const up3Placeholder = 'Semua Unit Pelaksanaan Pelayanan Pelanggan';
|
||||
const ulpPlaceholder = 'Semua Unit Layanan Pelanggan';
|
||||
const up3 = ref({ id: 0, name: up3Placeholder });
|
||||
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 sla = [
|
||||
@@ -37,7 +37,7 @@ const sla = [
|
||||
const data = ref({
|
||||
uid: uid.value,
|
||||
up3: up3.value,
|
||||
posko: ulp.value,
|
||||
ulp: ulp.value,
|
||||
periode: '',
|
||||
minTime: 1,
|
||||
maxTime: 1
|
||||
@@ -52,14 +52,14 @@ const setUid = (value: any) => {
|
||||
const setUp3 = (value: any) => {
|
||||
up3.value = value;
|
||||
selectedUp3Ulp(value);
|
||||
ulp.value = { id: "", name: ulpPlaceholder };
|
||||
ulp.value = { id: 0, name: ulpPlaceholder };
|
||||
data.value.up3 = value;
|
||||
};
|
||||
|
||||
const setUlp = (value: any) => {
|
||||
ulp.value = value;
|
||||
selectedUlp(value);
|
||||
data.value.posko = value;
|
||||
data.value.ulp = value;
|
||||
};
|
||||
const setMin = (value: any) => {
|
||||
console.log(value)
|
||||
|
||||
Reference in New Issue
Block a user