Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/inikoo/aiku into main
Browse files Browse the repository at this point in the history
  • Loading branch information
aqordeon committed May 31, 2024
2 parents 65fb821 + 399f6d4 commit 55eaf2e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
4 changes: 2 additions & 2 deletions resources/js/Components/Elements/Buttons/Button.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import { trans } from 'laravel-vue-i18n'
import { faSave as fadSave } from '@fad'
import { library } from '@fortawesome/fontawesome-svg-core'
import {faClipboard, faDownload, faFileExport, faPlus as falPlus} from '@fal'
import {faClipboard, faDownload, faFileExport, faPlus as falPlus, faHistory} from '@fal'
import { faArrowLeft, faPencil, faTrashAlt, faPersonDolly } from '@far'
import { faPlus, faSave, faUpload, faTrashUndoAlt } from '@fas'
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"
Expand All @@ -19,7 +19,7 @@ import { inject } from 'vue'
// const layout = useLayoutStore()
const layout: any = inject('layout', {})

library.add(faPlus, faSave, fadSave, faUpload, faDownload, falPlus, faArrowLeft, faPencil, faTrashAlt, faSpinnerThird, faTrashUndoAlt, faPersonDolly, faFileExport, faClipboard)
library.add(faPlus, faSave, fadSave, faUpload, faDownload, falPlus, faArrowLeft, faPencil, faTrashAlt, faSpinnerThird, faTrashUndoAlt, faPersonDolly, faFileExport, faClipboard, faHistory)


const props = withDefaults(defineProps<{
Expand Down
10 changes: 5 additions & 5 deletions resources/js/Components/Rental/Agreement.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ import ServicesBluprint from './Bluprint/services.js'
import PhysicalGoodsBluprint from './Bluprint/physicalGoods.js'
import { inject } from 'vue'
import { layoutStructure } from '@/Composables/useLayoutStructure'
import { cloneDeep } from 'lodash'
const layout = inject('layout', layoutStructure)
const props = defineProps<{
form: any
fieldName: string
Expand Down Expand Up @@ -57,11 +56,12 @@ const tabs = ref([
])
onBeforeMount(() => {
props.form[props.fieldName] = {
rentals: props.fieldData?.rentals.data,
physical_goods: props.fieldData?.physical_goods.data,
services: props.fieldData?.services.data,
rentals: cloneDeep(props.fieldData?.rentals?.data),
physical_goods: cloneDeep(props.fieldData?.physical_goods.data),
services: cloneDeep(props.fieldData?.services.data),
}
})
Expand Down
10 changes: 7 additions & 3 deletions resources/js/Components/Rental/Table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,16 @@ const onBulkDiscount = (close: Function) => {
}


const resetValue=()=>{
props.form[props.fieldName][props.bluprint.key] = props.fieldData[props.bluprint.key].data
}


</script>

<template>

<div class="flex justify-end mt-3 mb-3">
<div class="flex justify-end mb-3">
<Popover width="w-full" class="relative h-full">
<template #button>
<Button :key="bulkData.length" label="Set all discount (%)"
Expand All @@ -97,8 +102,7 @@ const onBulkDiscount = (close: Function) => {
</div>
</template>
</Popover>
<!-- <Button :key="bulkData.length" :label="`Delete (${bulkData.length})`" :icon='["far", "fa-trash-alt"]'
:type="bulkData.length > 0 ? 'delete' : 'disabled'" @click="bulkDeleteAction" /> -->
<Button :key="bluprint.key" :label="`Reset`" :icon="['fal', 'history']" :type="'gray'" @click="resetValue"/>
</div>


Expand Down

0 comments on commit 55eaf2e

Please sign in to comment.