From 0ab53538b883f18b6839d3d85d17ed1966e656e6 Mon Sep 17 00:00:00 2001 From: Ganes556 Date: Fri, 14 Feb 2025 09:55:26 +0800 Subject: [PATCH 1/2] make price column align right in table rentals retina --- app/Actions/Retina/Pricing/UI/IndexRetinaRentals.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Actions/Retina/Pricing/UI/IndexRetinaRentals.php b/app/Actions/Retina/Pricing/UI/IndexRetinaRentals.php index 308a3ebb0..e1730a5ea 100644 --- a/app/Actions/Retina/Pricing/UI/IndexRetinaRentals.php +++ b/app/Actions/Retina/Pricing/UI/IndexRetinaRentals.php @@ -179,7 +179,7 @@ public function tableStructure( ->column(key: 'state', label: '', canBeHidden: false, type: 'icon') ->column(key: 'code', label: __('code'), canBeHidden: false, sortable: true, searchable: true) ->column(key: 'name', label: __('name'), canBeHidden: false, sortable: true, searchable: true) - ->column(key: 'rental_price', label: __('price'), canBeHidden: false, sortable: true, searchable: true, className: 'text-right font-mono') + ->column(key: 'rental_price', label: __('price'), canBeHidden: false, sortable: true, searchable: true, align: 'right', className: 'text-right font-mono') ->defaultSort('code'); }; } From d31cd21de023d9e7c790f9a01ca86ad078d8893a Mon Sep 17 00:00:00 2001 From: KirinZero0 Date: Fri, 14 Feb 2025 09:56:23 +0800 Subject: [PATCH 2/2] Rrtina attachments in return --- .../PalletReturn/UI/ShowRetinaPalletReturn.php | 10 ++++++++-- .../UI/ShowRetinaStoredItemReturn.php | 10 ++++++++-- .../Pages/Retina/Storage/RetinaPalletReturn.vue | 16 +++++++++++----- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/app/Actions/Retina/Fulfilment/PalletReturn/UI/ShowRetinaPalletReturn.php b/app/Actions/Retina/Fulfilment/PalletReturn/UI/ShowRetinaPalletReturn.php index 6f194e277..49811d6b6 100644 --- a/app/Actions/Retina/Fulfilment/PalletReturn/UI/ShowRetinaPalletReturn.php +++ b/app/Actions/Retina/Fulfilment/PalletReturn/UI/ShowRetinaPalletReturn.php @@ -13,6 +13,7 @@ use App\Actions\Fulfilment\PalletReturn\UI\IndexServiceInPalletReturn; use App\Actions\Fulfilment\StoredItem\UI\IndexStoredItemsInReturn; use App\Actions\Helpers\Country\UI\GetAddressData; +use App\Actions\Helpers\Media\UI\IndexAttachments; use App\Actions\Retina\Fulfilment\UI\ShowRetinaStorageDashboard; use App\Actions\RetinaAction; use App\Enums\Fulfilment\PalletReturn\PalletReturnStateEnum; @@ -25,6 +26,7 @@ use App\Http\Resources\Fulfilment\PalletReturnsResource; use App\Http\Resources\Fulfilment\PalletReturnStoredItemsResource; use App\Http\Resources\Helpers\AddressResource; +use App\Http\Resources\Helpers\Attachment\AttachmentsResource; use App\Http\Resources\Helpers\CurrencyResource; use App\Models\Fulfilment\FulfilmentCustomer; use App\Models\Fulfilment\PalletReturn; @@ -436,7 +438,11 @@ public function htmlResponse(PalletReturn $palletReturn, ActionRequest $request) PalletReturnTabsEnum::PHYSICAL_GOODS->value => $this->tab == PalletReturnTabsEnum::PHYSICAL_GOODS->value ? fn () => FulfilmentTransactionsResource::collection(IndexPhysicalGoodInPalletReturn::run($palletReturn, PalletReturnTabsEnum::PHYSICAL_GOODS->value)) - : Inertia::lazy(fn () => FulfilmentTransactionsResource::collection(IndexPhysicalGoodInPalletReturn::run($palletReturn, PalletReturnTabsEnum::PHYSICAL_GOODS->value))) + : Inertia::lazy(fn () => FulfilmentTransactionsResource::collection(IndexPhysicalGoodInPalletReturn::run($palletReturn, PalletReturnTabsEnum::PHYSICAL_GOODS->value))), + + PalletReturnTabsEnum::ATTACHMENTS->value => $this->tab == PalletReturnTabsEnum::ATTACHMENTS->value ? + fn () => AttachmentsResource::collection(IndexAttachments::run($palletReturn, PalletReturnTabsEnum::ATTACHMENTS->value)) + : Inertia::lazy(fn () => AttachmentsResource::collection(IndexAttachments::run($palletReturn, PalletReturnTabsEnum::ATTACHMENTS->value))), ] )->table( IndexPalletsInReturnPalletWholePallets::make()->tableStructure( @@ -454,7 +460,7 @@ public function htmlResponse(PalletReturn $palletReturn, ActionRequest $request) $palletReturn, prefix: PalletReturnTabsEnum::PHYSICAL_GOODS->value ) - ); + )->table(IndexAttachments::make()->tableStructure(PalletReturnTabsEnum::ATTACHMENTS->value)); } diff --git a/app/Actions/Retina/Fulfilment/PalletReturn/UI/ShowRetinaStoredItemReturn.php b/app/Actions/Retina/Fulfilment/PalletReturn/UI/ShowRetinaStoredItemReturn.php index bf83ab8ff..447d7b896 100644 --- a/app/Actions/Retina/Fulfilment/PalletReturn/UI/ShowRetinaStoredItemReturn.php +++ b/app/Actions/Retina/Fulfilment/PalletReturn/UI/ShowRetinaStoredItemReturn.php @@ -13,6 +13,7 @@ use App\Actions\Fulfilment\PalletReturn\UI\IndexServiceInPalletReturn; use App\Actions\Fulfilment\StoredItem\UI\IndexStoredItemsInReturn; use App\Actions\Helpers\Country\UI\GetAddressData; +use App\Actions\Helpers\Media\UI\IndexAttachments; use App\Actions\Retina\Fulfilment\UI\ShowRetinaStorageDashboard; use App\Actions\RetinaAction; use App\Enums\Fulfilment\PalletReturn\PalletReturnStateEnum; @@ -25,6 +26,7 @@ use App\Http\Resources\Fulfilment\PalletReturnsResource; use App\Http\Resources\Fulfilment\PalletReturnStoredItemsResource; use App\Http\Resources\Helpers\AddressResource; +use App\Http\Resources\Helpers\Attachment\AttachmentsResource; use App\Http\Resources\Helpers\CurrencyResource; use App\Models\Fulfilment\FulfilmentCustomer; use App\Models\Fulfilment\PalletReturn; @@ -457,7 +459,11 @@ public function htmlResponse(PalletReturn $palletReturn, ActionRequest $request) PalletReturnTabsEnum::PHYSICAL_GOODS->value => $this->tab == PalletReturnTabsEnum::PHYSICAL_GOODS->value ? fn () => FulfilmentTransactionsResource::collection(IndexPhysicalGoodInPalletReturn::run($palletReturn, PalletReturnTabsEnum::PHYSICAL_GOODS->value)) - : Inertia::lazy(fn () => FulfilmentTransactionsResource::collection(IndexPhysicalGoodInPalletReturn::run($palletReturn, PalletReturnTabsEnum::PHYSICAL_GOODS->value))) + : Inertia::lazy(fn () => FulfilmentTransactionsResource::collection(IndexPhysicalGoodInPalletReturn::run($palletReturn, PalletReturnTabsEnum::PHYSICAL_GOODS->value))), + + PalletReturnTabsEnum::ATTACHMENTS->value => $this->tab == PalletReturnTabsEnum::ATTACHMENTS->value ? + fn () => AttachmentsResource::collection(IndexAttachments::run($palletReturn, PalletReturnTabsEnum::ATTACHMENTS->value)) + : Inertia::lazy(fn () => AttachmentsResource::collection(IndexAttachments::run($palletReturn, PalletReturnTabsEnum::ATTACHMENTS->value))), ] )->table( IndexStoredItemsInReturn::make()->tableStructure( @@ -475,7 +481,7 @@ public function htmlResponse(PalletReturn $palletReturn, ActionRequest $request) $palletReturn, prefix: PalletReturnTabsEnum::PHYSICAL_GOODS->value ) - ); + )->table(IndexAttachments::make()->tableStructure(PalletReturnTabsEnum::ATTACHMENTS->value)); } diff --git a/resources/js/Pages/Retina/Storage/RetinaPalletReturn.vue b/resources/js/Pages/Retina/Storage/RetinaPalletReturn.vue index 7830e5a60..d8c186678 100644 --- a/resources/js/Pages/Retina/Storage/RetinaPalletReturn.vue +++ b/resources/js/Pages/Retina/Storage/RetinaPalletReturn.vue @@ -20,8 +20,9 @@ import { PageHeading as PageHeadingTypes } from '@/types/PageHeading' import { Tabs as TSTabs } from '@/types/Tabs' import { Action } from '@/types/Action' import { BoxStats, PDRNotes, UploadPallet } from '@/types/Pallet' - - +import { Table as TableTS } from '@/types/Table' +import TableAttachments from "@/Components/Tables/Grp/Helpers/TableAttachments.vue"; +import UploadAttachment from '@/Components/Upload/UploadAttachment.vue' import '@/Composables/Icon/PalletReturnStateEnum' import '@/Composables/Icon/Pallet/PalletType' @@ -39,10 +40,10 @@ import PureMultiselect from "@/Components/Pure/PureMultiselect.vue" import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome' import { faSpinnerThird } from '@fad' -import { faStickyNote, faConciergeBell, faCube } from '@fal' +import { faStickyNote, faPaperclip, faConciergeBell, faCube } from '@fal' import { faNarwhal } from '@fas' import { library } from '@fortawesome/fontawesome-svg-core' -library.add(faCube, faConciergeBell, faNarwhal, faSpinnerThird, faStickyNote) +library.add(faCube, faConciergeBell, faPaperclip, faNarwhal, faSpinnerThird, faStickyNote) // import '@/Composables/Icon/PalletStateEnum.ts' // import '@/Composables/Icon/PalletDeliveryStateEnum.ts' @@ -61,7 +62,11 @@ const props = defineProps<{ data?: {} history?: {} pageHead: PageHeadingTypes - + attachments?: TableTS + attachmentRoutes: { + attachRoute: routeType + detachRoute: routeType + } interest: { pallets_storage: boolean items_storage: boolean @@ -120,6 +125,7 @@ const component = computed(() => { services: TableFulfilmentTransactions, physical_goods: TableFulfilmentTransactions, history: TableHistories, + attachments: TableAttachments } return components[currentTab.value] })