Merge branch 'connetction-segment-integration' of gitlab.com:CIEFWorldwideSdnBhd/shipping-portal into development

# Conflicts:
#	app/Classes/Modules/Transactions/ControllersLogic/CreateShippingInvoiceTransactionLogic.php
#	app/Http/Resources/OrderResource.php
#	app/Http/Resources/PackingListResource.php
#	resources/assets/vue/components/orders/sections/OrderProfileSectionComponent.vue
#	resources/assets/vue/components/paymentsBilling/elements/AdminPaymentsBillingComponent.vue
This commit is contained in:
omair saleh
2022-09-20 02:47:47 +08:00
17 changed files with 335 additions and 42 deletions
@@ -2,6 +2,7 @@
namespace App\Classes\General\Eloquent\Filters;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Builder;
class DoesNotHaveTransactionType implements Filter
@@ -15,6 +16,8 @@ class DoesNotHaveTransactionType implements Filter
{
return $builder->whereDoesntHave('transactions', function (Builder $query) use($value) {
$query->where('type', $value);
})->whereHas('containers', function ($query){
return $query->whereDate('loading_date', '>=', Carbon::parse('08-08-2022'));
});
}
}
@@ -0,0 +1,20 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class SegmentIdIn implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return Builder|mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->whereIn('segment_id', $value);
}
}
@@ -4,6 +4,7 @@ namespace App\Classes\Modules\Companies\Services;
use App\Classes\Exceptions\MalformedRequestException;
use App\Classes\General\Eloquent\AbstractUpdateRecord;
use App\Classes\ValueObjects\Constants\BusinessType;
use App\Models\Company;
use App\Models\Segment;
use Illuminate\Database\QueryException;
@@ -19,8 +20,9 @@ class AssignsCompanyToSegment extends AbstractUpdateRecord
public function execute(Company $company, Segment $segment)
{
try {
$company->segments()->attach($segment);
$companyModule = $company->companyModules()->where('type', BusinessType::IMPORTER)->first();
$connection = $companyModule->connections()->where('inviter_reference', 'CIEF');
$connection->segments()->attach($segment);
return $company;
@@ -4,9 +4,9 @@ namespace App\Classes\ValueObjects\Constants;
final class TransactionDetailType {
public const SHIPPING_FEE = 'Shipping Fee';
public const SHIPPING_FEE = 'X1 Freight Service Charge';
public const OVER_WEIGHT_CHARGES = 'Over weight charges';
public const OVER_WEIGHT_CHARGES = 'Overweight Charges';
public const CUSTOM_CHARGES = 'Custom charges';
}
@@ -10,7 +10,7 @@ class AssignCompanyConnectionToConnectionSegmentController
{
/**
* @param Request $request
* @param AssignCompanyToSegmentLogic $logic
* @param AssignCompanyConnectionToConnectionSegmentLogic $logic
* @return JsonResponse
*/
public function assign(Request $request, AssignCompanyConnectionToConnectionSegmentLogic $logic): JsonResponse {
@@ -47,6 +47,7 @@ class CompanyModuleResource extends JsonResource
'remarks' => RemarkResource::collection($this->remarks),
'marking' => $marking,
'warehouseCharges' => array_key_exists($this->id, $segmentConstant) ? $segmentConstant[$this->id] : null,
'connections' => $this->connections,
];
}
+1
View File
@@ -27,6 +27,7 @@ class CompanyResource extends JsonResource
'type' => (int) $this->type,
'business_type' => (int) $this->business_type,
'status' => (int) $this->status,
'segments' => SegmentResource::collection($companyModule->connections()->first()->segments),
'contact' => new ContactResource ($this->when($this->has('contacts'), $this->contacts->first())),
'employee' => new UserResource($companyModule->employees()->first()),
'company_module' => new CompanyModuleResource($companyModule),
+1 -6
View File
@@ -15,12 +15,7 @@ class SegmentsTableSeeder extends Seeder
'id' => 1,
'company_module_id' => 1,
'name' => 'Default Segment',
],
[
'id' => 2,
'company_module_id' => 2,
'name' => 'Normal Member',
],
]
]
);
}
@@ -30,6 +30,32 @@
</div>
</div>
</div>
<div class="col-auto">
<div class="row align-items-center parentContainer">
<div class="col-auto padding-5 b-a b-grey b-rad-lg pointer requestModal" data-type="assignSegment">
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
width="30" height="30"
viewBox="0 0 172 172"
style=" fill:#000000;"><defs><linearGradient x1="86" y1="97.08594" x2="86" y2="105.31775" gradientUnits="userSpaceOnUse" id="color-1_43991_gr1"><stop offset="0" stop-color="#4ec9ff"></stop><stop offset="1" stop-color="#2bffe6"></stop></linearGradient><linearGradient x1="94.0625" y1="85.83338" x2="94.0625" y2="93.89588" gradientUnits="userSpaceOnUse" id="color-2_43991_gr2"><stop offset="0" stop-color="#4ec9ff"></stop><stop offset="1" stop-color="#2bffe6"></stop></linearGradient><linearGradient x1="77.9375" y1="85.83338" x2="77.9375" y2="93.89588" gradientUnits="userSpaceOnUse" id="color-3_43991_gr3"><stop offset="0" stop-color="#4ec9ff"></stop><stop offset="1" stop-color="#2bffe6"></stop></linearGradient><linearGradient x1="86" y1="28.55469" x2="86" y2="143.10938" gradientUnits="userSpaceOnUse" id="color-4_43991_gr4"><stop offset="0" stop-color="#009add"></stop><stop offset="1" stop-color="#00baa4"></stop></linearGradient></defs><g fill="none" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><path d="M0,172v-172h172v172z" fill="none"></path><g><path d="M77.9375,96.75c0,4.45319 3.60931,8.0625 8.0625,8.0625c4.45319,0 8.0625,-3.60931 8.0625,-8.0625z" fill="url(#color-1_43991_gr1)"></path><path d="M94.0625,86c-2.2264,0 -4.03125,1.80485 -4.03125,4.03125c0,2.2264 1.80485,4.03125 4.03125,4.03125c2.2264,0 4.03125,-1.80485 4.03125,-4.03125c0,-2.2264 -1.80485,-4.03125 -4.03125,-4.03125z" fill="url(#color-2_43991_gr2)"></path><path d="M77.9375,86c-2.2264,0 -4.03125,1.80485 -4.03125,4.03125c0,2.2264 1.80485,4.03125 4.03125,4.03125c2.2264,0 4.03125,-1.80485 4.03125,-4.03125c0,-2.2264 -1.80485,-4.03125 -4.03125,-4.03125z" fill="url(#color-3_43991_gr3)"></path><path d="M147.8125,51.0625h-18.8125v-8.0625c0,-4.44512 -3.61738,-8.0625 -8.0625,-8.0625h-11.2445c-1.11263,-3.12019 -4.06888,-5.375 -7.568,-5.375h-32.25c-3.49912,0 -6.45538,2.25481 -7.568,5.375h-11.2445c-4.44512,0 -8.0625,3.61738 -8.0625,8.0625v8.0625h-18.8125c-4.44513,0 -8.0625,3.61738 -8.0625,8.0625v59.125c0,4.44512 3.61737,8.0625 8.0625,8.0625h18.8125v8.0625c0,4.44512 3.61738,8.0625 8.0625,8.0625h69.875c4.44512,0 8.0625,-3.61738 8.0625,-8.0625v-8.0625h18.8125c4.44512,0 8.0625,-3.61738 8.0625,-8.0625v-59.125c0,-4.44512 -3.61737,-8.0625 -8.0625,-8.0625zM147.8125,56.4375c1.4835,0 2.6875,1.20669 2.6875,2.6875v51.0625h-2.88637c-0.80625,-6.09525 -4.28119,-11.78469 -9.47612,-15.25425c0.99437,-1.87319 1.6125,-3.98019 1.6125,-6.24575v-5.375c0,-6.48763 -4.62519,-11.91638 -10.75,-13.16606v-13.70894zM134.375,88.6875c0,3.49912 -2.25213,6.45538 -5.375,7.568v-20.50831c3.12287,1.11262 5.375,4.06887 5.375,7.568zM134.6545,99.1365c3.913,2.48056 6.62469,6.84506 7.47125,11.051h-13.12575v-8.33394c2.12044,-0.43269 4.02319,-1.41094 5.6545,-2.71706zM67.1875,37.625c0,-1.48081 1.204,-2.6875 2.6875,-2.6875h32.25c1.4835,0 2.6875,1.20669 2.6875,2.6875v2.6875c0,1.48081 -1.204,2.6875 -2.6875,2.6875h-32.25c-1.4835,0 -2.6875,-1.20669 -2.6875,-2.6875zM51.0625,40.3125h10.75c0,4.44512 3.61737,8.0625 8.0625,8.0625h32.25c4.44512,0 8.0625,-3.61738 8.0625,-8.0625h10.75c1.4835,0 2.6875,1.20669 2.6875,2.6875v83.3125h-3.34056c-1.73881,-9.23963 -7.19444,-17.45531 -15.06344,-22.66906c1.44319,-2.88906 2.279,-6.13556 2.279,-9.58094v-10.75c0,-11.85456 -9.64544,-21.5 -21.5,-21.5c-11.85456,0 -21.5,9.64544 -21.5,21.5v10.75c0,3.44537 0.83581,6.69188 2.28169,9.58094c-7.869,5.21375 -13.32463,13.42675 -15.06344,22.66906h-3.34325v-83.3125c0,-1.48081 1.204,-2.6875 2.6875,-2.6875zM102.125,94.0625c0,8.89294 -7.23206,16.125 -16.125,16.125c-8.89294,0 -16.125,-7.23206 -16.125,-16.125v-10.75c0,-8.89294 7.23206,-16.125 16.125,-16.125c8.89294,0 16.125,7.23206 16.125,16.125zM86,115.5625c6.48494,0 12.29531,-2.89981 16.24056,-7.45513c6.39088,4.22744 10.93006,10.77956 12.59363,18.20513h-57.66837c1.66356,-7.42556 6.20275,-13.97769 12.59631,-18.20244c3.94256,4.55531 9.75294,7.45244 16.23787,7.45244zM43,96.2555c-3.12288,-1.11263 -5.375,-4.06888 -5.375,-7.568v-5.375c0,-3.49912 2.25212,-6.45538 5.375,-7.568zM37.32669,99.12306c1.634,1.31419 3.54481,2.29512 5.67331,2.7305v8.33394h-13.18487c0.78475,-4.57412 3.526,-8.63225 7.51156,-11.06444zM24.1875,56.4375h18.8125v13.70894c-6.12481,1.24969 -10.75,6.67575 -10.75,13.16606v5.375c0,2.26287 0.61544,4.36719 1.60981,6.24038c-5.21106,3.44806 -8.686,9.05688 -9.47613,15.25963h-2.88369v-51.0625c0,-1.48081 1.204,-2.6875 2.6875,-2.6875zM24.1875,120.9375c-1.4835,0 -2.6875,-1.20669 -2.6875,-2.6875v-2.6875h21.5v5.375zM120.9375,137.0625h-69.875c-1.4835,0 -2.6875,-1.20669 -2.6875,-2.6875v-2.6875h75.25v2.6875c0,1.48081 -1.204,2.6875 -2.6875,2.6875zM147.8125,120.9375h-18.8125v-5.375h21.5v2.6875c0,1.48081 -1.204,2.6875 -2.6875,2.6875z" fill="url(#color-4_43991_gr4)"></path></g></g></svg>
</div>
<div class="col">
<div class="row no-margin">
<div class="col-auto no-padding m-r-10 m-b-5 m-t-5 parentContainer" v-for="segment in item.segments" v-bind:key="segment.id" v-if="segment.id !== 1">
<div class="font-heading fs-10 lh-20 p-l-10 p-r-10 bg-master-lightest btn-rounded">
{{segment.name}}
<i class="fa fa-times muted m-l-10 pointer requestModal" data-type="detachSegment" ></i>
</div>
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="detachSegment">
<detach-segment-form-component :data="segment" :company_id="item.id" section="customerProfileSection"></detach-segment-form-component>
</modal-component>
</div>
</div>
</div>
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="assignSegment">
<assign-segment-form-component :data="item" section="customerProfileSection"></assign-segment-form-component>
</modal-component>
</div>
</div>
<div class="col-6">
<div class="row">
<div class="col-auto" v-if="item.employee">
@@ -0,0 +1,73 @@
<template>
<div class="row">
<div class="col">
<loading-component style="height: 50px; top: 0;" key="1" color="success" v-show="$store.getters.isLoading(section)"></loading-component>
<div class="row" v-show="!$store.getters.isLoading(section)">
<div class="col">
<div class="row m-b-10">
<div class="col">
<h3 class="all-caps m-b-5 bold no-margin">Assign Segment</h3>
<div class="fs-11">Select a segment to {{parameters.name}}</div>
</div>
</div>
<div class="row m-b-5 animate__animated animate__fadeInUpBig animate__fast" v-if="error">
<div class="col">
<small class="bold fs-10 text-danger">{{error}}</small>
</div>
</div>
<div class="row m-b-15">
<div class="col">
<validation-wrapper-component selectable :validator="$v.parameters.segment_id">
<label>Segment</label>
<selectable-component :endpoint="route('api.segment.list') + '?filters=' + JSON.stringify({'id_not_in': currentSegmentIds})" :section="multiple?'segmentsListSection_'+data.id:'segmentsListSection'" valueColumn="id" :labelColumn="['name']" v-model="parameters.segment_id"></selectable-component>
</validation-wrapper-component>
</div>
</div>
<div class="row">
<div class="col p-r-5">
<div class="btn btn-sm btn-default bg-master-lightest btn-block b-rad-none" data-dismiss="modal">Not Now</div>
</div>
<div class="col p-l-5">
<div class="btn btn-sm btn-success btn-block b-rad-none" @click="submit(route('api.company.connection.assign', data.id, data.company_module.connections[0].id), 'post', section, true, false)">Assign Segment</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import ModalFormHandler from '../../../general/mixins/modalFormHandler';
import { required } from "vuelidate/lib/validators";
export default {
props: {
multiple: {
default: false,
type: Boolean
}
},
data(){
return {
parameters: {
segment_id: ''
}
}
},
validations: {
parameters: {
segment_id: {
required
}
}
},
computed: {
currentSegmentIds(){
return this.data.segments.map(function (value){
return value.id;
})
}
},
mixins: [ModalFormHandler]
}
</script>
@@ -0,0 +1,44 @@
<template>
<div class="row">
<div class="col">
<loading-component style="height: 300px; top: 0;" key="1" color="success" v-show="isLoading" ></loading-component>
<div class="row m-b-5 animate__animated animate__fadeInUpBig animate__fast" v-if="error">
<div class="col">
<small class="bold fs-10 text-danger">{{error}}</small>
</div>
</div>
<div class="row justify-content-center" v-show="!isLoading">
<div class="col">
<div class="row m-b-20">
<div class="col">
<h3 class="all-caps">Are you Sure?</h3>
<div class="fs-11">Are you sure you want to detach custom from <span class="bold">{{this.item.name}}</span> segment?</div>
</div>
</div>
<div class="row">
<div class="col p-r-5">
<div class="btn btn-sm btn-success btn-block b-rad-none" data-dismiss="modal">Cancel</div>
</div>
<div class="col p-l-5">
<div class="btn btn-sm btn-danger btn-block b-rad-none" @click="submit(route('api.company.segment.detach', company_id, item.id), 'delete', 'customerProfileSection', true, true)">Remove Segment</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import componentHandler from '../../../general/mixins/componentHandler';
import ModalFormHandler from '../../../general/mixins/modalFormHandler';
export default {
props: {
company_id: {
required: true,
type: Number
}
},
mixins: [componentHandler, ModalFormHandler]
}
</script>
@@ -9,6 +9,7 @@
<div class="no-margin">
<div v-if="item.order">
<a :href="route('customer.profile', item.order.company_module.marking)">{{item.order.company_module.marking}}</a>/<a :href="route('order.show', item.order.reference)">{{item.order.reference}}</a>
<p>{{item.loading_days_ago}}</p>
</div>
<div v-else class="text-danger">Unclaimed Packing List</div>
</div>
+127 -1
View File
@@ -11,9 +11,135 @@
body {
font-family: sun-extA;
padding: 0;
}
.header {
margin-top: 5em;
}
.separator {
text-align: right;
border-bottom: 0.5px solid black;
font-size: 0.7em;
}
img.logo {
top: 10px;
}
img {
height: 6em;
width: 9em;
}
.title {
font-size: 2em;
font-weight: 1200;
}
.details {
display: inline-block;
position: relative;
}
.sub-title {
font-size: 1.3em;
font-weight: bold;
}
.label {
font-size: 1.1em;
font-weight: bold;
}
.bill-to {
margin-top: 30px;
}
table {
width: 100%;
vertical-align: top;
}
th {
border-bottom: 1px solid black;
}
td {
padding: 0.4em;
/* text-align: center; */
}
td.title {
text-align: left;
}
td.description,
th.description {
text-align: justify;
max-width: 40em;
}
td.stock-code,
th.stock-code {
text-align: center;
}
th {
vertical-align: middle;
}
td,
th {
/* margin-top: 0.6em;
margin-right: 0.6em; */
}
.subtotal td {
border-top: 1px solid black;
}
.total {
border-top: 1px solid black;
border-bottom: 3px double black;
font-weight: bolder;
}
.address {}
*/ td.header-logo {
/* text-align: left; */
width: fit-content;
}
td.header-cief-address {
text-align: left;
margin-left: -30px;
}
td.header-details {
text-align: left;
vertical-align: top;
}
td.bill-to {
text-align: left;
}
td.document-detail {
text-align: left;
border: 1px solid black;
padding: 1em 1em 1em 1em;
width: 16em;
}
td.address {
text-align: left;
}
.right {
text-align: right;
}
</style>
</head>
@@ -17,27 +17,28 @@
</strong>
</span>
<span class="company-reg">(1134596-M)</span><br>
Malaysian Global Innovation &amp; Creativity Center <br>
Level 1 CWS, Block 3730, Persiaran APEC, <br>
63000 Cyberjaya, Malaysian. <br>
Tel: 018-2909252
No. 72-3, Jalan Jalil 1,<br>
The Earth Bukit Jalil,<br>
57000 Kuala Lumpur<br>
Tel: 03-8082 1252
</td>
<td class="header-details">
<div class="title">
<div class="title" style="font-size: 20px; text-transform: uppercase;">
<strong>
Invoice
</strong>
</div>
<div class="number">EI#: {{ $invoice_transaction->bill_no }}</div>
<div class="number">Invoice No: {{ $invoice_transaction->bill_no }}</div>
@php
$companyModule = $invoice_transaction->owner->owner->companyModule;
@endphp
<div class="ref">Ref# {{ $invoice_transaction->owner->owner->reference }}</div>
<!-- <div class="d-none">{{ $companyModule->inviters()->withPivot('invitee_reference')->first()->pivot->invitee_reference }}</div> -->
<div class="date">Date: {{ $invoice_transaction->created_at }}</div>
<div class="ref">Order No: {{ $invoice_transaction->owner->owner->reference }}</div>
<div class="ref">Container Ref: {{ $invoice_transaction->owner->containers()->first()->reference }}</div>
{{--<div class="d-none">{{ $companyModule->inviters()->withPivot('invitee_reference')->first()->pivot->invitee_reference }}</div>--}}
<div>&nbsp;</div>
</div>
</td>
@@ -56,7 +57,7 @@
</div>
<div class="address">
@php
$addresses = $invoice_transaction->owner->owner->addresses()->where('status', '=', 2)->first();
$addresses = $companyModule->addresses()->where('status', '=', \App\Classes\ValueObjects\Constants\ApprovalStatus::APPROVED)->where('type', '=', \App\Classes\ValueObjects\Constants\AddressType::BILLING)->first();
@endphp
{{ $addresses->street_one }}
{{ $addresses->street_two }} ,
@@ -82,53 +83,53 @@
<tr>
<th width="5%">No</th>
<th class="description">Description</th>
<th width="10%">Quantity</th>
<th width="15%">Unit Price (RM)</th>
<th width="10%">Total Amount<br>(RM)</th>
<th width="15%">Quantity</th>
<th width="20%">Unit Price (RM)</th>
<th width="20%">Total Amount<br>(RM)</th>
</tr>
</thead>
<tbody>
@foreach ($invoice_transaction->transactionDetails as $key => $transaction_detail)
<tr>
<td width="5%" class="center top">{{ $key + 1 }}</td>
<td class="description">{{ $transaction_detail->name }}</td>
<td width="10%" class="center top">{{ $transaction_detail->quantity }}</td>
<td width="15%" class="center top">
{{ $transaction_detail->price }}
<td class="description">{!! $transaction_detail->name !!}</td>
<td width="15%" class="center top" style="text-align: center">{{ round($transaction_detail->quantity, 3) }}</td>
<td width="20%" class="center top" style="text-align: center">
{{ round($transaction_detail->price, 2) }}
</td>
<td width="20%" class="right top">
{{ $transaction_detail->amount }}
{{ round($transaction_detail->amount, 2) }}
</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr class="subtotal">
<td colspan="4"></td>
<td colspan="3"></td>
<td class="right middle">Subtotal</td>
<td class="right middle">
{{ number_format($invoice_transaction->amount, 2) }}
{{ round($invoice_transaction->amount, 2) }}
</td>
</tr>
<tr class="billingcharges">
<td colspan="4"></td>
<td colspan="3"></td>
<td class="right">Service Charges</td>
<td class="right">
{{ number_format($invoice_transaction->service_charge, 2) }}
{{ round($invoice_transaction->service_charge, 2) }}
</td>
</tr>
@if($invoice_transaction->tax > 0)
<tr class="billingcharges">
<td colspan="4"></td>
<td colspan="3"></td>
<td class="right">Tax</td>
<td class="right">{{ number_format($invoice_transaction->tax, 2) }}</td>
</tr>
@endif
<tr>
<td colspan="4"></td>
<td colspan="3"></td>
<td class="right middle">Total</td>
<td class="total right middle">
{{ number_format($invoice_transaction->amount, 2) }}
{{ round($invoice_transaction->amount, 2) }}
</td>
</tr>
</tfoot>
+1 -1
View File
@@ -285,7 +285,7 @@
<div class="row m-b-20">
<div class="col">
<!-- <list-component section="segmentsSection" :endpoint="route('api.segment.list')" :options="{'type': 2}"> -->
<list-component section="segmentsSection" :endpoint="route('api.segment.list')">
<list-component section="segmentsSection" :endpoint="route('api.segment.list')" :options="{'id_not': 1}">
<template slot="list" slot-scope="{data}">
<segment-component :data="data" section="segmentsSection"></segment-component>
</template>
+1 -1
View File
@@ -147,7 +147,7 @@
<a href="{{route('template.shipping-queue')}}"><h6 class="no-margin light fs-18 all-caps">Shipping Queue</h6></a>
</div>
</div>
<div class="row p-t-15 p-b-15 align-items-center justify-content-center hide">
<div class="row p-t-15 p-b-15 align-items-center justify-content-center">
<div class="col-auto p-r-0">
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
width="25" height="25"
+4 -4
View File
@@ -11,10 +11,10 @@ Route::group(['prefix' => 'company', 'as' => 'company.', 'namespace' => 'Compani
Route::post('/team/create', 'AddNewMemberController@create')->name('team.create');
Route::group(['prefix' => '{id}/segment', 'as' => 'segment.'], function () {
Route::post('/assign', 'AssignCompanyToSegmentController@assign')->name('assign');
Route::delete('/detach/{segment_id}', 'RemoveCompanyFromSegmentController@detach')->name('detach');
});
// Route::group(['prefix' => '{id}/segment', 'as' => 'segment.'], function () {
// Route::post('/assign', 'AssignCompanyToSegmentController@assign')->name('assign');
// Route::delete('/detach/{segment_id}', 'RemoveCompanyFromSegmentController@detach')->name('detach');
// });
Route::group(['prefix' => '{id}/connection/{company_connection_id}', 'as' => 'connection.'], function () {
Route::post('/assign', 'AssignCompanyConnectionToConnectionSegmentController@assign')->name('assign');