mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-08-24 15:05:09 +00:00
Merge branch 'master' of https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal into package-ui-create
This commit is contained in:
@@ -43,4 +43,4 @@ abstract class AbstractListRecord extends AbstractGetRecord
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,6 @@ class LogoutUserLogic extends AbstractControllerLogic
|
||||
*/
|
||||
protected function logic(Request $request): JsonResponse {
|
||||
|
||||
logger("logout");
|
||||
$this->invalidatesAuthenticationToken->execute();
|
||||
|
||||
return $this->response();
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace App\Console\Commands;
|
||||
|
||||
use App\Models\State;
|
||||
use App\Http\Helpers\General;
|
||||
|
||||
use Illuminate\Console\Command;
|
||||
use App\Classes\Jobs\FetchContainersStatusUpdateFromVTPortalJob;
|
||||
use App\Classes\Jobs\FetchDeliveryListFromVTPortalJob;
|
||||
use App\Classes\Jobs\FetchLoadedContainersFromVTPortalJob;
|
||||
use App\Classes\Jobs\FetchPackingListFromVTPortalJob;
|
||||
use App\Classes\Jobs\FetchWarehouseReceiveListFromVTPortalJob;
|
||||
|
||||
class CurlVTCommand extends Command
|
||||
{
|
||||
/**
|
||||
* The name and signature of the console command.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
|
||||
protected $signature = 'command:curlVTCommand';
|
||||
// php artisan queue:work
|
||||
|
||||
/**
|
||||
* The console command description.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $description = 'Command description';
|
||||
|
||||
/**
|
||||
* Create a new command instance.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute the console command.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
FetchWarehouseReceiveListFromVTPortalJob::withChain([
|
||||
new FetchLoadedContainersFromVTPortalJob,
|
||||
new FetchPackingListFromVTPortalJob,
|
||||
new FetchContainersStatusUpdateFromVTPortalJob,
|
||||
new FetchDeliveryListFromVTPortalJob
|
||||
])->dispatch();
|
||||
}
|
||||
}
|
||||
+9
-22
@@ -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');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -51,15 +51,15 @@
|
||||
<div class="col">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="row align-items-center p-t-10 p-b-10 b-t b-grey" v-for="packingList in item.packing_lists">
|
||||
<div class="row align-items-center p-t-10 p-b-10 b-t b-grey" v-for="(packingList, index) in item.packing_lists">
|
||||
<div class="col-2"><a :href="route('customer.profile', packingList.order.company_module.marking)">{{packingList.order.company_module.marking}}</a>/<a :href="route('order.show', packingList.order.reference)">{{packingList.order.reference}}</a></div>
|
||||
<div class="col-1 text-center">{{packingList.packages.reduce((total, obj) => obj.quantity + total, 0)}}</div>
|
||||
<div class="col-1">{{(Math.ceil((packingList.packages.reduce((total, obj) => obj.cbm + total, 0)) * 10000) / 10000).toFixed(3)}}</div>
|
||||
<div class="col-1">{{ (Math.ceil((packingList.packages.reduce((total, obj) => obj.cbm + total, 0)) * 1000) / 1000).toFixed(3)}}</div>
|
||||
<div class="col-1 bold text-center" :class="{'text-danger': packingList.status === 5, 'text-success': packingList.status !== 5}">{{packingList.status === 5 ? 'On Hold' : 'Release'}}</div>
|
||||
<div class="col">{{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}}</div>
|
||||
<div class="col-auto" v-if="!packingList.transport">
|
||||
<div class="btn btn-xs btn-success pointer" v-if="packingList.status === 5" @click="submit(route('api.packing_list.status.update', packingList.id, item.status === 1 ? 1 : 2), 'put', 'containerListSection', true, true)"><i class="fa fa-check m-r-5"></i>Release</div>
|
||||
<div class="btn btn-xs btn-danger pointer" v-if="packingList.status !== 5" @click="submit(route('api.packing_list.status.update', packingList.id, 5), 'put', 'containerListSection', true, true)"><i class="fa fa-hand-paper-o m-r-5"></i>Hold</div>
|
||||
<div class="btn btn-xs btn-success pointer" v-if="packingList.status === 5" @click="updateStatus(index, item.status === 1 ? 1 : 2)"><i class="fa fa-check m-r-5"></i>Release</div>
|
||||
<div class="btn btn-xs btn-danger pointer" v-if="packingList.status !== 5" @click="updateStatus(index, 5)"><i class="fa fa-hand-paper-o m-r-5"></i>Hold</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -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]
|
||||
|
||||
@@ -93,4 +93,4 @@
|
||||
},
|
||||
mixins: [componentHandler]
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<!-- <list-component section="containerListSection" :endpoint="route('api.packing_list.container.list')"> -->
|
||||
<list-component section="containerListSection" :endpoint="route('api.packing_list.container.list')" :options="{'with_packing_lists': true, order_by: {column: 'created_at', DESC: true}}">
|
||||
<list-component section="containerListSection" :endpoint="route('api.packing_list.container.list')" :options="{'per_page': 5, 'with_packing_lists': true, order_by: {column: 'created_at', DESC: true}}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<container-component :data="data"></container-component>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user