Refactor code for improved performance and readability
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
<!-- ss -->
|
||||
<script setup lang="ts">
|
||||
// components
|
||||
import Button from '@/components/Button.vue'
|
||||
// icons
|
||||
import { PhArrowsCounterClockwise, PhFileText, PhMagnifyingGlass } from '@phosphor-icons/vue'
|
||||
|
||||
const emit = defineEmits(['runSearch','resetForm'])
|
||||
defineProps({
|
||||
reportButton: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
})
|
||||
|
||||
const emit = defineEmits(['runSearch', 'resetForm', 'runReport'])
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -26,10 +30,12 @@ const emit = defineEmits(['runSearch','resetForm'])
|
||||
</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>
|
||||
|
||||
|
Reference in New Issue
Block a user