add marking to arrived parcel components

This commit is contained in:
omair saleh
2021-09-06 12:52:11 +08:00
parent 6009e82994
commit 91c8424dc5
6 changed files with 37 additions and 18 deletions
@@ -0,0 +1,20 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class OrderByArrivalDate implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->with('transports');
}
}
@@ -124,11 +124,12 @@ class FetchLoadedContainersFromVTPortalProcessor
*/
public function execute(?Carbon $start = null, ?Carbon $end = null){
DB::beginTransaction();
// DB::beginTransaction();
try {
$start = Carbon::parse('01-06-2021');
$start = $start ? $start : Carbon::now()->subMonth();
$startLimit = Carbon::parse('11-08-2021');
$startLimit = Carbon::parse('01-06-2021');
if($start->isBefore($startLimit)){
$start = $startLimit;
@@ -221,7 +222,7 @@ class FetchLoadedContainersFromVTPortalProcessor
}
DB::commit();
// DB::commit();
return [];
}
@@ -116,9 +116,11 @@ class FetchWarehouseReceiveListFromVTPortalProcessor
try {
$start = Carbon::parse('01-06-2021');
$start = $start ? $start : Carbon::now()->subMonth();
$startLimit = Carbon::parse('11-08-2021');
$startLimit = Carbon::parse('01-06-2021');
if($start->isBefore($startLimit)){
$start = $startLimit;
@@ -38,7 +38,7 @@
</div>
<div class="row" v-if="expanded" >
<div class="col bg-white p-t-15 p-b-15">
<div class="row m-b-5" v-if="$store.getter.isAdmin">
<div class="row m-b-5" v-if="$store.getters.isAdmin">
<div class="col-auto p-r-5">
<p class="no-margin all-caps fs-10 light">Marking</p>
</div>
@@ -1,12 +0,0 @@
<template>
<div class="row">
<div class="col-5">
<list-component section="warehouseListSection" :endpoint="route('api.packing_list.list')" :options="{type: 1, status: 2, per_page: 20, order_by: {column: 'created_at', DESC: false}}">
<template slot="list" slot-scope="{data}">
<parcel-component v-for="packages in data.packages" :data="packages" :key="packages.id"></parcel-component>
</template>
</list-component>
</div>
</div>
</template>
@@ -1,4 +1,12 @@
@extends('layouts.base_portal')
@section('inner_content')
<warehouse-list-section-component></warehouse-list-section-component>
<div class="row">
<div class="col-5">
<list-component section="warehouseListSection" :endpoint="route('api.packing_list.list')" :options="{type: 1, status: 2, per_page: 20, order_by_arrival_date: true, order_by: {column: 'created_at', DESC: false}}">
<template slot="list" slot-scope="{data}">
<parcel-component v-for="packages in data.packages" :data="packages" :key="packages.id"></parcel-component>
</template>
</list-component>
</div>
</div>
@endsection