diff --git a/app/Classes/General/Eloquent/AbstractListRecord.php b/app/Classes/General/Eloquent/AbstractListRecord.php index c5d2e6e6..01e66c29 100644 --- a/app/Classes/General/Eloquent/AbstractListRecord.php +++ b/app/Classes/General/Eloquent/AbstractListRecord.php @@ -43,4 +43,4 @@ abstract class AbstractListRecord extends AbstractGetRecord } -} \ No newline at end of file +} diff --git a/app/Classes/Modules/Accounts/ControllersLogic/LogoutUserLogic.php b/app/Classes/Modules/Accounts/ControllersLogic/LogoutUserLogic.php index bfa1f20a..aea1f932 100644 --- a/app/Classes/Modules/Accounts/ControllersLogic/LogoutUserLogic.php +++ b/app/Classes/Modules/Accounts/ControllersLogic/LogoutUserLogic.php @@ -37,7 +37,6 @@ class LogoutUserLogic extends AbstractControllerLogic */ protected function logic(Request $request): JsonResponse { - logger("logout"); $this->invalidatesAuthenticationToken->execute(); return $this->response(); diff --git a/app/Console/Commands/CurlVTCommand.php b/app/Console/Commands/CurlVTCommand.php new file mode 100644 index 00000000..e779cd5c --- /dev/null +++ b/app/Console/Commands/CurlVTCommand.php @@ -0,0 +1,57 @@ +dispatch(); + } +} diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 623233c2..2e082565 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -17,9 +17,7 @@ class Kernel extends ConsoleKernel * * @var array */ - protected $commands = [ - // - ]; + protected $commands = []; /** * Define the application's command schedule. @@ -29,26 +27,15 @@ class Kernel extends ConsoleKernel */ protected function schedule(Schedule $schedule) { + $schedule->command('command:curlVTCommand') + ->dailyAt('15:00') + ->withoutOverlapping() + ->appendOutputTo (storage_path().'/logs/curlvt.log'); - $schedule->call(function(){ - return FetchWarehouseReceiveListFromVTPortalJob::withChain([ - new FetchLoadedContainersFromVTPortalJob, - new FetchPackingListFromVTPortalJob, - new FetchContainersStatusUpdateFromVTPortalJob, - new FetchDeliveryListFromVTPortalJob - ])->dispatch(); - })->dailyAt('15:00'); - - $schedule->call(function(){ - return FetchWarehouseReceiveListFromVTPortalJob::withChain([ - new FetchLoadedContainersFromVTPortalJob, - new FetchPackingListFromVTPortalJob, - new FetchContainersStatusUpdateFromVTPortalJob, - new FetchDeliveryListFromVTPortalJob - ])->dispatch(); - })->dailyAt('21:00'); - - + $schedule->command('command:curlVTCommand') + ->dailyAt('21:00') + ->withoutOverlapping() + ->appendOutputTo (storage_path().'/logs/curlvt.log'); } /** diff --git a/resources/assets/vue/components/containers/elements/ContainerComponent.vue b/resources/assets/vue/components/containers/elements/ContainerComponent.vue index 4ed82551..e8af2c65 100644 --- a/resources/assets/vue/components/containers/elements/ContainerComponent.vue +++ b/resources/assets/vue/components/containers/elements/ContainerComponent.vue @@ -51,15 +51,15 @@
-
+
{{packingList.packages.reduce((total, obj) => obj.quantity + total, 0)}}
-
{{(Math.ceil((packingList.packages.reduce((total, obj) => obj.cbm + total, 0)) * 10000) / 10000).toFixed(3)}}
+
{{ (Math.ceil((packingList.packages.reduce((total, obj) => obj.cbm + total, 0)) * 1000) / 1000).toFixed(3)}}
{{packingList.status === 5 ? 'On Hold' : 'Release'}}
{{packingList.order.address.street_one+' '+(packingList.order.address.street_two ? packingList.order.address.street_two : '')+', '+ packingList.order.address.district.name+', '+packingList.order.address.post_code+' '+packingList.order.address.state.name+', '+packingList.order.address.country.name}}
-
Release
-
Hold
+
Release
+
Hold
@@ -76,12 +76,22 @@ export default { data(){ return { - expanded: false + expanded: false, + index: null, } }, methods: { - successHandler(){ - this.$store.dispatch('reloadList', {'name': 'containerListSection'}); + updateStatus(index, status){ + this.index = index; + this.submit(this.route('api.packing_list.status.update', this.item.packing_lists[index].id, status), 'put', 'containerListSection', true, true) + }, + successHandler(response){ + this.item.packing_lists[this.index] = response.payload.data; + this.$forceUpdate(); + this.index = null; + }, + errorHandler(){ + this.index = null; } }, mixins: [componentHandler] diff --git a/resources/assets/vue/components/orders/elements/ParcelComponent.vue b/resources/assets/vue/components/orders/elements/ParcelComponent.vue index 17e29d63..44303afb 100644 --- a/resources/assets/vue/components/orders/elements/ParcelComponent.vue +++ b/resources/assets/vue/components/orders/elements/ParcelComponent.vue @@ -93,4 +93,4 @@ }, mixins: [componentHandler] } - \ No newline at end of file + diff --git a/resources/views/pages/containers.blade.php b/resources/views/pages/containers.blade.php index 6c2eb286..642d8c33 100644 --- a/resources/views/pages/containers.blade.php +++ b/resources/views/pages/containers.blade.php @@ -9,7 +9,7 @@
- +