49 lines
1.3 KiB
Vue
Executable File
49 lines
1.3 KiB
Vue
Executable File
<script setup lang="ts">
|
|
import Button from '@/components/Button.vue'
|
|
import { PhArrowsCounterClockwise, PhFileText, PhMagnifyingGlass } from '@phosphor-icons/vue'
|
|
|
|
defineProps({
|
|
reportButton: {
|
|
type: Boolean,
|
|
default: false
|
|
}
|
|
})
|
|
|
|
const emit = defineEmits(['runSearch', 'resetForm', 'runReport'])
|
|
</script>
|
|
|
|
<template>
|
|
<div class="filters rounded-2xl">
|
|
<form class="filter-body bg-gray-50 mx-auto space-y-3 p-4 rounded-t-2xl">
|
|
<slot></slot>
|
|
</form>
|
|
|
|
<div class="filter-footer rounded-b-2xl px-4 py-3 bg-primary-50 flex justify-end">
|
|
<div class="filter-buttons flex gap-3 flex-wrap">
|
|
<Button
|
|
@on:click="() => emit('resetForm')"
|
|
label="Ulangi"
|
|
style-type="outline"
|
|
class-name="bg-white"
|
|
>
|
|
<PhArrowsCounterClockwise size="18" class="ml-1" weight="regular" />
|
|
</Button>
|
|
|
|
<Button
|
|
v-if="reportButton"
|
|
label="Lihat Laporan"
|
|
style-type="outline"
|
|
class-name="bg-white"
|
|
@on:click="() => emit('runReport')"
|
|
>
|
|
<PhFileText size="18" class="ml-1" weight="regular" />
|
|
</Button>
|
|
|
|
<Button @on:click="() => emit('runSearch')" label="Cari Data">
|
|
<PhMagnifyingGlass size="18" class="ml-1" weight="regular" />
|
|
</Button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|