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
itzArtha committed Feb 14, 2025
2 parents 385000b + 8a3194c commit c0c79ac
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use App\Actions\Fulfilment\PalletReturn\UI\IndexPhysicalGoodInPalletReturn;
use App\Actions\Fulfilment\PalletReturn\UI\IndexServiceInPalletReturn;
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;
Expand All @@ -23,6 +24,7 @@
use App\Http\Resources\Fulfilment\PalletReturnResource;
use App\Http\Resources\Fulfilment\PalletReturnsResource;
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;
Expand Down Expand Up @@ -434,7 +436,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(
Expand All @@ -452,7 +458,7 @@ public function htmlResponse(PalletReturn $palletReturn, ActionRequest $request)
$palletReturn,
prefix: PalletReturnTabsEnum::PHYSICAL_GOODS->value
)
);
)->table(IndexAttachments::make()->tableStructure(PalletReturnTabsEnum::ATTACHMENTS->value));
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -24,6 +25,7 @@
use App\Http\Resources\Fulfilment\PalletReturnResource;
use App\Http\Resources\Fulfilment\PalletReturnsResource;
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;
Expand Down Expand Up @@ -456,7 +458,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(
Expand All @@ -474,7 +480,7 @@ public function htmlResponse(PalletReturn $palletReturn, ActionRequest $request)
$palletReturn,
prefix: PalletReturnTabsEnum::PHYSICAL_GOODS->value
)
);
)->table(IndexAttachments::make()->tableStructure(PalletReturnTabsEnum::ATTACHMENTS->value));
}


Expand Down
2 changes: 1 addition & 1 deletion app/Actions/Retina/Pricing/UI/IndexRetinaRentals.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
};
}
Expand Down
16 changes: 11 additions & 5 deletions resources/js/Pages/Retina/Storage/RetinaPalletReturn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand All @@ -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'
Expand All @@ -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
Expand Down Expand Up @@ -120,6 +125,7 @@ const component = computed(() => {
services: TableFulfilmentTransactions,
physical_goods: TableFulfilmentTransactions,
history: TableHistories,
attachments: TableAttachments
}
return components[currentTab.value]
})
Expand Down

0 comments on commit c0c79ac

Please sign in to comment.