Merge branch 'development' into vapor/development

This commit is contained in:
Dillon Ngo
2024-06-17 11:02:07 +08:00
46 changed files with 1072 additions and 108 deletions
@@ -0,0 +1,24 @@
<?php
namespace App\Classes\General\Eloquent\Filters;
use Illuminate\Database\Eloquent\Builder;
class CompanySegmentsIn implements Filter
{
/**
* @param Builder $builder
* @param $value
* @return mixed
*/
public static function apply(Builder $builder, $value)
{
return $builder->whereHas('companyModules', function ($module) use ($value) {
$module->whereHas('connections', function ($connection) use ($value) {
$connection->whereHas('connectionSegments', function ($segment) use ($value) {
$segment->whereIn('segment_id', $value);
});
});
});
}
}
@@ -0,0 +1,12 @@
<?php
namespace App\Classes\General\Interfaces;
use Illuminate\Database\Eloquent\Relations\MorphMany;
interface KeyValueInterface
{
public function attributes(): morphMany;
}
@@ -0,0 +1,44 @@
<?php
namespace App\Classes\Modules\Accounts\DataTransferObjects;
use App\Classes\General\Interfaces\DataTransferObject;
class KeyValuePairObject implements DataTransferObject
{
/** @var string */
private $key;
/** @var string */
private $value;
/**
* KeyValuePairObject constructor.
* @param string $key
* @param string $value
*/
public function __construct(string $key, string $value)
{
$this->key = $key;
$this->value = $value;
}
/**
* @return string
*/
public function getKey(): string
{
return $this->key;
}
/**
* @return string
*/
public function getValue(): string
{
return $this->value;
}
}
@@ -0,0 +1,28 @@
<?php
namespace App\Classes\Modules\Accounts\Services;
use App\Classes\General\Eloquent\AbstractUpdateRelationshipRecord;
use App\Classes\General\Interfaces\KeyValueInterface;
use App\Classes\Modules\Accounts\DataTransferObjects\KeyValuePairObject;
use App\Models\KeyValuePair;
class CreatesKeyValuePair extends AbstractUpdateRelationshipRecord
{
/**
* @param KeyValueInterface $kv
* @param KeyValuePairObject $object
* @return \Illuminate\Database\Eloquent\Model
* @throws \App\Classes\Exceptions\MalformedRequestException
*/
public function execute(KeyValueInterface $kv, KeyValuePairObject $object) {
$model = new KeyValuePair();
$model->key = $object->getKey();
$model->value = $object->getValue();
return $this->handler($kv->attributes(), $model);
}
}
@@ -18,6 +18,7 @@ use App\Classes\Modules\Contacts\Processors\CreateContactProcessor;
use App\Classes\Modules\Remarks\DataTransferObjects\RemarkObject;
use App\Classes\Modules\Remarks\Processors\CreateRemarkProcessor;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\RemarkTypes;
use App\Http\Resources\AddressResource;
use App\Models\Address;
use App\Transformers\AddressTransformer;
@@ -110,6 +111,15 @@ class CreateAddressLogic extends AbstractControllerLogic
->parseIncludes('remark')
->respond(200, [], JSON_PRETTY_PRINT);*/
$addressExtraFields = [
'property_type' => $request->input('property_type'),
'tools_required_unload' => $request->input('tools_required_unload'),
'pickup_time_from' => $request->input('pickup_time_from'),
'pickup_time_to' => $request->input('pickup_time_to'),
];
$addressExtraFieldsObject = new RemarkObject(json_encode($addressExtraFields), Auth()->user()->id, RemarkTypes::ADDRESS_EXTRA_COLUMNS);
$this->createRemarkProcessor->execute($address, $addressExtraFieldsObject);
return $this->resourceResponse(new AddressResource($address));
@@ -15,6 +15,7 @@ use App\Classes\Modules\Remarks\DataTransferObjects\RemarkObject;
use App\Classes\Modules\Remarks\Processors\CreateRemarkProcessor;
use App\Classes\ValueObjects\Constants\AddressType;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\RemarkTypes;
use App\Http\Resources\AddressResource;
use App\Models\Address;
use App\Transformers\AddressTransformer;
@@ -110,6 +111,15 @@ class UpdateAddressLogic extends AbstractControllerLogic
->item($address, new AddressTransformer())
->parseIncludes('remark')
->respond(200, [], JSON_PRETTY_PRINT);*/
$addressExtraFields = [
'property_type' => $request->input('property_type'),
'tools_required_unload' => $request->input('tools_required_unload'),
'pickup_time_from' => $request->input('pickup_time_from'),
'pickup_time_to' => $request->input('pickup_time_to'),
];
$addressExtraFieldsObject = new RemarkObject(json_encode($addressExtraFields), Auth()->user()->id, RemarkTypes::ADDRESS_EXTRA_COLUMNS);
$this->createRemarkProcessor->execute($address, $addressExtraFieldsObject);
return $this->resourceResponse(new AddressResource($address));
@@ -7,6 +7,8 @@ use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Companies\Processors\AssignConnectionSegmentProcessor;
use App\Classes\Modules\Companies\Services\FetchesCompany;
use App\Classes\Modules\Companies\Services\FetchesCompanyConnection;
use App\Classes\Modules\Contacts\DataTransferObjects\ContactObject;
use App\Classes\Modules\Contacts\Processors\CreateContactProcessor;
use App\Http\Resources\CompanyResource;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
@@ -33,17 +35,22 @@ class AssignCompanyConnectionToConnectionSegmentLogic extends AbstractController
/** @var AssignConnectionSegmentProcessor */
private $assignCompanyConnectionToConnectionSegmentProcessor;
/** @var CreateContactProcessor */
private $createContactProcessor;
/**
* AssignCompanyToSegmentLogic constructor.
* @param FetchesCompany $fetchesCompany
* @param FetchesCompanyConnection $fetchesCompanyConnection
* @param AssignConnectionSegmentProcessor $assignCompanyConnectionToConnectionSegmentProcessor
* @param CreateContactProcessor $createContactProcessor
*/
public function __construct(FetchesCompany $fetchesCompany, FetchesCompanyConnection $fetchesCompanyConnection, AssignConnectionSegmentProcessor $assignCompanyConnectionToConnectionSegmentProcessor)
public function __construct(FetchesCompany $fetchesCompany, FetchesCompanyConnection $fetchesCompanyConnection, AssignConnectionSegmentProcessor $assignCompanyConnectionToConnectionSegmentProcessor, CreateContactProcessor $createContactProcessor)
{
$this->fetchesCompany = $fetchesCompany;
$this->fetchesCompanyConnection = $fetchesCompanyConnection;
$this->assignCompanyConnectionToConnectionSegmentProcessor = $assignCompanyConnectionToConnectionSegmentProcessor;
$this->createContactProcessor = $createContactProcessor;
}
/**
@@ -62,6 +69,11 @@ class AssignCompanyConnectionToConnectionSegmentLogic extends AbstractController
$this->assignCompanyConnectionToConnectionSegmentProcessor->execute($companyConnection, $request->input('segment_id'));
if ($request->input('segment_id') == 10 || $request->input('segment_id') == 11) {
$contactObject = new ContactObject('Whatsapp: ' . $request->input('name'), $request->input('phone'), null, null);
$this->createContactProcessor->execute($contactObject, $company);
}
return $this->resourceResponse(new CompanyResource($company));
}
}
@@ -6,6 +6,7 @@ use App\Classes\Exceptions\RequestValidationException;
use App\Classes\General\Abstracts\AbstractControllerLogic;
use App\Classes\Modules\Addresses\DataTransferObjects\AddressObject;
use App\Classes\Modules\Addresses\Services\CreatesAddress;
use App\Classes\Modules\Accounts\DataTransferObjects\KeyValuePairObject;
use App\Classes\Modules\Addresses\Services\FetchesAddress;
use App\Classes\Modules\Companies\Services\FetchesCompany;
use App\Classes\Modules\Companies\Services\FetchesCompanyModule;
@@ -16,10 +17,12 @@ use App\Classes\Modules\Orders\Services\ConnectOrderToExchangeBooking;
use App\Classes\Modules\Orders\Services\GeneratesOrderNumber;
use App\Classes\ValueObjects\Constants\AddressType;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\WarehouseReferences;
use App\Http\Resources\OrderResource;
use App\Classes\Modules\Addresses\Standards\Rules\CanCreateAddress;
use App\Models\Address;
use App\Classes\Modules\Accounts\Services\CreatesKeyValuePair;
use App\Classes\ValueObjects\Constants\WarehouseReferences;
use App\Http\Resources\OrderResource;
use App\Models\Order;
use Illuminate\Http\Request;
use Illuminate\Http\JsonResponse;
@@ -64,6 +67,10 @@ class CreateOrderLogic extends AbstractControllerLogic
/** @var ConnectOrderToExchangeBookingOnExchangeProcessor */
private $connectOrderToExchangeBookingOnExchangeProcessor;
/** @var CreatesKeyValuePair */
private $createsKeyValuePair;
/**
* CreateOrderLogic constructor.
* @param FetchesCompany $fetchesCompany
@@ -75,7 +82,7 @@ class CreateOrderLogic extends AbstractControllerLogic
* @param ConnectOrderToExchangeBooking $connectOrderToExchangeBooking
* @param ConnectOrderToExchangeBookingOnExchangeProcessor $connectOrderToExchangeBookingOnExchangeProcessor
*/
public function __construct(FetchesCompany $fetchesCompany, FetchesAddress $fetchesAddress, CreateOrderProcessor $createOrderProcessor, FetchesCompanyModule $fetchesCompanyModule, GeneratesOrderNumber $generatesOrderNumber, NewLeadTaskToPerfexCRMProcessor $newLeadTaskToPerfexCRMProcessor, ConnectOrderToExchangeBooking $connectOrderToExchangeBooking, ConnectOrderToExchangeBookingOnExchangeProcessor $connectOrderToExchangeBookingOnExchangeProcessor)
public function __construct(FetchesCompany $fetchesCompany, FetchesAddress $fetchesAddress, CreateOrderProcessor $createOrderProcessor, FetchesCompanyModule $fetchesCompanyModule, GeneratesOrderNumber $generatesOrderNumber, NewLeadTaskToPerfexCRMProcessor $newLeadTaskToPerfexCRMProcessor, ConnectOrderToExchangeBooking $connectOrderToExchangeBooking, ConnectOrderToExchangeBookingOnExchangeProcessor $connectOrderToExchangeBookingOnExchangeProcessor, CreatesKeyValuePair $createsKeyValuePair)
{
$this->fetchesCompany = $fetchesCompany;
$this->fetchesAddress = $fetchesAddress;
@@ -85,12 +92,16 @@ class CreateOrderLogic extends AbstractControllerLogic
$this->newLeadTaskToPerfexCRMProcessor = $newLeadTaskToPerfexCRMProcessor;
$this->connectOrderToExchangeBooking = $connectOrderToExchangeBooking;
$this->connectOrderToExchangeBookingOnExchangeProcessor = $connectOrderToExchangeBookingOnExchangeProcessor;
$this->createsKeyValuePair = $createsKeyValuePair;
}
public function logic(Request $request): JsonResponse
{
$isTermsAgreed = $request->input('is_terms_agree');
if(!$isTermsAgreed){
throw new RequestValidationException('You must read and agree to our terms and conditions to proceed');
}
$company = $this->fetchesCompany->execute(['id' => $request->input('company_id')]);
@@ -116,8 +127,15 @@ class CreateOrderLogic extends AbstractControllerLogic
throw new RequestValidationException('Our Yiwu warehouse is unable to ship goods to Sabah & Sarawak at the moment. you can select our Guangzhou warehouse as an alternative.');
}
/** @var Order $order */
$order = $this->createOrderProcessor->execute($company, $originWarehouse, $address, $this->generatesOrderNumber->execute());
$keyValuePairObject = new KeyValuePairObject(
"TERMS_AND_CONDITIONS",
$isTermsAgreed
);
$this->createsKeyValuePair->execute($order, $keyValuePairObject);
if(config('perfexcrm.is_enabled') == 'true'){
$this->newLeadTaskToPerfexCRMProcessor->execute($company);
}
@@ -67,7 +67,7 @@ class CreateOrderProcessor
* @param CompanyModule $originWarehouse
* @param Address $address
* @param int|null $orderNumber
* @return Addressable
* @return Order
* @throws \App\Classes\Exceptions\AccessForbiddenException
* @throws \App\Classes\Exceptions\MalformedRequestException
* @throws \App\Classes\Exceptions\RequestValidationException
@@ -58,32 +58,21 @@ class RescheduleContainerLogic extends AbstractControllerLogic
*/
public function logic(Request $request): JsonResponse
{
try {
$container = $this->fetchesContainer->execute(['id' => $request->route('id')]);
$transport = $container->transports()->first();
$container = $this->fetchesContainer->execute(['id' => $request->route('id')]);
$transport = $container->transports()->first();
$old_sechedule = $transport->schedules()->first();
$old_schedule = $transport->schedules()->delete();
$this->updatesScheduleStatus->execute($old_sechedule, ApprovalStatus::REJECTED);
// $this->updatesScheduleStatus->execute($old_schedule, ApprovalStatus::REJECTED);
$scheduleObject = new ScheduleObject(
Carbon::parse($request->input('etd')),
Carbon::parse($request->input('eta')),
ApprovalStatus::APPROVED
);
$schedule = $this->createsSchedule->execute($transport, $scheduleObject);
//no relationship
/* return fractal()
->item($container, new ContainerTransformer())
->respond(200, [], JSON_PRETTY_PRINT);*/
return $this->resourceResponse(new ContainerResource($container));
} catch (\Exception $exception) {
throw new ErrorException($exception->getMessage(), $exception->getCode());
}
$scheduleObject = new ScheduleObject(
Carbon::parse($request->input('etd')),
Carbon::parse($request->input('eta')),
ApprovalStatus::APPROVED
);
$schedule = $this->createsSchedule->execute($transport, $scheduleObject);
return $this->resourceResponse(new ContainerResource($container));
}
}
@@ -13,10 +13,14 @@ class RemarkObject implements DataTransferObject
/** @var string*/
private $content;
public function __construct(string $content, int $commenterID)
/** @var int|null */
private $type;
public function __construct(string $content, int $commenterID, int $type = null)
{
$this->commenterID = $commenterID;
$this->content = $content;
$this->type = $type;
}
/**
@@ -35,4 +39,12 @@ class RemarkObject implements DataTransferObject
return $this->content;
}
/**
* @return int|null
*/
public function getType(): ?int
{
return $this->type;
}
}
@@ -24,6 +24,7 @@ class CreatesRemark extends AbstractUpdateRelationshipRecord
$model->commenter_id = $object->getCommenterId();
$model->content = $object->getContent();
$model->type = $object->getType();
return $this->handler($remarkable->remarks(), $model);
@@ -22,7 +22,7 @@ use App\Models\GroupTransaction;
use App\Http\Resources\WalletTransactionResource;
use App\Models\Wallet;
use App\Classes\Modules\Transactions\Processors\ReleaseGoodsToCustomerProcessor;
use Illuminate\Support\Facades\Log;
class CreateGroupsLogic extends AbstractControllerLogic
{
@@ -200,7 +200,9 @@ class CreateGroupsLogic extends AbstractControllerLogic
if (in_array($payment_method, [PaymentMethodType::PAYMENT_GATEWAY, PaymentMethodType::CASH])) {
// create only one billplz payment for wallet top up
$amount = floatval(str_replace(',', '', $reqAmount));
$amount2 = floatval(str_replace(',', '', $reqAmount));
Log::channel('storage_invoices')->info('CreateGroupsLogic reqAmount from client: ' .$amount2);
Log::channel('storage_invoices')->info('CreateGroupsLogic amount from backend: ' .$amount); //the real amount should always be from backend
$companyModuleId = $invoice->receiver;
$companyModule = $this->fetchesCompanyModule->execute(['id' => $companyModuleId]);
@@ -4,7 +4,6 @@
namespace App\Classes\Modules\Transactions\Processors;
use App\Classes\Exceptions\MalformedRequestException;
use App\Classes\General\LogHelper;
use App\Classes\Modules\Orders\Services\FetchesOrder;
use App\Classes\Modules\Transactions\Services\GeneratesTransactionBillNumber;
use App\Classes\Modules\Transactions\Services\CreatesTransaction;
@@ -124,7 +123,7 @@ class CheckStorageInvoiceTransactionProcessor
$result = $this->processSingleTransactionOfTypeShippingInvoice($invoice_transaction, $packingList, $order->company_module_id, $eta);
}
else{
$result = $this->isPaidOrWaivedStorageInvoiceExist($invoice_transaction, $packingList, $eta);
$result = $this->isExistPaidOrWaivedStorageInvoice($invoice_transaction, $packingList, $eta);
}
if($result){
$results[] = $result;
@@ -165,6 +164,7 @@ class CheckStorageInvoiceTransactionProcessor
if ($transport) {
$schedule = $transport->schedules->last();
if ($schedule) {
Log::channel('storage_invoices')->info('schedule: '.json_encode($schedule));
return $schedule->eta;
}
}
@@ -178,11 +178,14 @@ class CheckStorageInvoiceTransactionProcessor
$pricePerCBM = 3;
$resultNumberOfDaysFree = 10;
$dt1 = $eta->copy()->addDay()->startOfDay();
$resultStartDate = $dt1->format('Y-m-d');
$currentDatetime = Carbon::now();
$dt2 = $currentDatetime->copy()->addDay()->startOfDay();
$resultCurrentDate = $dt2->format('Y-m-d H:i:s');
$dt2 = Carbon::now()->copy()->addDay()->startOfDay();
$interval = Carbon::parse($dt2)->diff($dt1);
Log::channel('storage_invoices')->info('eta: '.json_encode($eta));
Log::channel('storage_invoices')->info('dt1: '.json_encode($dt1));
Log::channel('storage_invoices')->info('dt2: '.json_encode($dt2));
Log::channel('storage_invoices')->info('interval: '.json_encode($interval));
Log::channel('storage_invoices')->info('Carbon now: '.json_encode(Carbon::now()));
$resultNumberOfDaysExceeded = $interval->days - $resultNumberOfDaysFree;
$storageInvoice = $destinationWarehousePackage->transactions()->where('transactions.type', TransactionType::STORAGE_INVOICE)->first();
@@ -201,14 +204,14 @@ class CheckStorageInvoiceTransactionProcessor
$taxPercentage = TaxPercentage::DEFAULT;
$price_cbm = $pricePerCBM * $cbm * $resultNumberOfDaysExceeded;
$dateToCompare = Carbon::parse(env('SST_START_DATE', '2024-04-01 00:00:00'));
$shippingInvoiceTransactionCreatedDate = Carbon::now();
LogHelper::channel('storage_invoices')->info('storageInvoice: '.json_encode($storageInvoice).', $transaction->status: '.$transaction->status);
Log::channel('storage_invoices')->info('storageInvoice: '.json_encode($storageInvoice).', $transaction->status: '.$transaction->status);
if(!$storageInvoice && $resultNumberOfDaysExceeded > 0 && $transaction->status != ApprovalStatus::COMPLETED){
LogHelper::channel('storage_invoices')->info('Created $transaction->id: '.$transaction->id);
Log::channel('storage_invoices')->info('Created $transaction->id: '.$transaction->id);
$billNumber = $this->generatesTransactionBillNumber->execute('STOR-');
if ($shippingInvoiceTransactionCreatedDate->isAfter($dateToCompare)) {
if (Carbon::now()->isAfter($dateToCompare)) {
$taxPercentage = TaxPercentage::SIX_PERCENT;
$total_tax = $price_cbm * $taxPercentage / 100;
$price_cbm = $price_cbm + $total_tax;
@@ -229,13 +232,13 @@ class CheckStorageInvoiceTransactionProcessor
$paymentStorageTransaction = $storageInvoice->transactions()->where('transactions.type', TransactionType::PAYMENT)->where('transactions.status', ApprovalStatus::APPROVED)->first();
if($paymentStorageTransaction){
$dateStorageInvoicePaid = $paymentStorageTransaction->created_at->copy()->addDay()->startOfDay();
LogHelper::channel('storage_invoices')->info('dateStorageInvoicePaid: '.$dateStorageInvoicePaid.', resultCurrentDate: '.$resultCurrentDate);
Log::channel('storage_invoices')->info('dateStorageInvoicePaid: '.$dateStorageInvoicePaid.', resultCurrentDate: '.$resultCurrentDate);
$intervalRecalculate = Carbon::parse($dateStorageInvoicePaid)->diff($dt1);
$resultNumberOfDaysExceeded = $intervalRecalculate->days - $resultNumberOfDaysFree;
$price_cbm = $pricePerCBM * $cbm * $resultNumberOfDaysExceeded;
}
if ($shippingInvoiceTransactionCreatedDate->isAfter($dateToCompare)) {
if (Carbon::now()->isAfter($dateToCompare)) {
$taxPercentage = TaxPercentage::SIX_PERCENT;
$total_tax = $price_cbm * $taxPercentage / 100;
$price_cbm = $price_cbm + $total_tax;
@@ -250,7 +253,7 @@ class CheckStorageInvoiceTransactionProcessor
$proceedToUpdate = false;
if(abs($price_cbm - $amount) > $epsilon && $storageInvoice->status !== ApprovalStatus::COMPLETED){
if(abs($price_cbm - $amount) > $epsilon && $storageInvoice->status !== ApprovalStatus::COMPLETED && !$this->isExistPendingVerificationManualPayment($storageInvoice)){
$paymentTransactions = $storageInvoice->transactions()->where('transactions.type', TransactionType::PAYMENT)->where('transactions.status', ApprovalStatus::PENDING_SUBMISSION)->get();
// if(!$isBackDoorCheck){
if(count($paymentTransactions) > 0){
@@ -281,8 +284,8 @@ class CheckStorageInvoiceTransactionProcessor
'storageInvoiceId' => $storageInvoiceId,
'numberOfDaysExceeded' => $resultNumberOfDaysExceeded,
'numberOfDaysFree' => $resultNumberOfDaysFree,
'startDate' => $resultStartDate,
'currentDate' => $resultCurrentDate,
'startDate' => $dt1->format('Y-m-d'),
'currentDate' => $dt2->format('Y-m-d H:i:s'),
'cbm' => $cbm,
'pricePerCBM' => $pricePerCBM,
'storageInvoice' => new TransactionWithStorageResource($storageInvoice)
@@ -292,7 +295,7 @@ class CheckStorageInvoiceTransactionProcessor
}
private function isPaidOrWaivedStorageInvoiceExist($transaction, $packingList, $eta){
private function isExistPaidOrWaivedStorageInvoice($transaction, $packingList, $eta){
$pricePerCBM = 3;
$resultNumberOfDaysFree = 10;
$dt1 = $eta->copy()->addDay()->startOfDay();
@@ -347,6 +350,21 @@ class CheckStorageInvoiceTransactionProcessor
return [];
}
private function isExistPendingVerificationManualPayment($storageInvoice){
$g = $storageInvoice->groups()->whereIn('status', [ApprovalStatus::PENDING_VERIFICATION, ApprovalStatus::COMPLETED, ApprovalStatus::SUSPENDED])->where('payment_method', PaymentMethodType::CASH)->latest('updated_at')->first();
Log::channel('storage_invoices')->info('group: ' .json_encode($g));
if($g){
$gr = $g->reference;
$manualPaymentTransaction =Transaction::where('payment_reference', $gr)->first();
Log::channel('storage_invoices')->info('manualPaymentTransaction: ' .json_encode($manualPaymentTransaction));
if($manualPaymentTransaction->status === ApprovalStatus::PENDING_SUBMISSION || $manualPaymentTransaction->status === ApprovalStatus::PENDING_VERIFICATION){
Log::channel('storage_invoices')->info('isExistPendingVerificationManualPayment');
return true;
}
}
return false;
}
private function updatePaymentTransactionViaGroupPayment($storageInvoice){
LogHelper::channel('storage_invoices')->info('updatePaymentTransactionViaGroupPayment');
$groups = $storageInvoice->groups()->whereNotIn('status', [ApprovalStatus::COMPLETED, ApprovalStatus::SUSPENDED])->get();
@@ -360,7 +378,7 @@ class CheckStorageInvoiceTransactionProcessor
$this->updatesTransactionStatus->execute($walletTransaction, ApprovalStatus::EXPIRED);
if($walletTransaction->payment_reference){
$deletedBillplzBill = $this->deletesBillplzBill->execute($walletTransaction->payment_reference);
LogHelper::channel('storage_invoices')->info('deletedBillplzBill TransactionType::WALLET: '.json_encode($deletedBillplzBill));
Log::channel('storage_invoices')->info('deletedBillplzBill TransactionType::WALLET: '.json_encode($deletedBillplzBill));
}
}
}
@@ -10,4 +10,6 @@ final class RemarkTypes
public const EXTERNAL = 1;
}
public const ADDRESS_EXTRA_COLUMNS = 2;
}
+8
View File
@@ -27,6 +27,9 @@ class AddressResource extends JsonResource
$outstationPostcodeConstant = $outstationPostcodeConstantObject->isEmpty() ? [] : (array)$outstationPostcodeConstantObject->first()->value;
in_array((String)$this->postcode, $outstationPostcodeConstant) ? $postcodeArea = 'OUTSTATION_POSTCODE' : null;
$extrafields = json_decode($this->addressExtraFields->first());
$extrafields = $extrafields ? (isset($extrafields->content) ? json_decode($extrafields->content) : null) : null;
return [
'id' => $this->id,
'reference' => $this->reference,
@@ -43,6 +46,11 @@ class AddressResource extends JsonResource
'contact' => new ContactResource($this->contacts->first()),
'remark' => new RemarkResource($this->remarks->first()),
'type' => $this->type,
'extrafields' => $extrafields,
'property_type' => $extrafields ? $extrafields->property_type : null,
'tools_required_unload' => $extrafields ? $extrafields->tools_required_unload : null,
'pickup_time_from' => $extrafields ? $extrafields->pickup_time_from : null,
'pickup_time_to' => $extrafields ? $extrafields->pickup_time_to : null,
$this->mergeWhen($this->relationLoaded('owner'), [
'owner' => $this->when($this->owner instanceof Order, [
'reference' => $this->owner->reference,
+2 -1
View File
@@ -40,7 +40,8 @@ class CompanyResource extends JsonResource
'last_order' => $companyModule->type === 7 ? new DeliveryOrderResource($companyModule->orders()->orderBy('id', 'DESC')->first()) : new OrderResource($companyModule->orders()->orderBy('id', 'DESC')->first()),
'order_count' => $companyModule->orders()->count(),
'identification' => new DocumentResource($this->documents->whereIn('document_type', DocumentType::IDENTIFICATION_DOCUMENTS)->whereIn('status', [ApprovalStatus::PENDING_VERIFICATION, ApprovalStatus::APPROVED])->first()),
'created_at' => $this->created_at->format('d-m-Y')
'created_at' => $this->created_at->format('d-m-Y'),
'whatsapp' => new ContactResource($this->contacts()->where('reference', 'LIKE', '%Whatsapp%')->orderBy('created_at', 'DESC')->first())
];
+1 -1
View File
@@ -18,7 +18,7 @@ class SegmentResource extends JsonResource
$constant = $this->constants->where('reference', SegmentConstants::CUSTOM_PRICE)->first();
return [
'id' => $this->id,
'name' => $this->name,
'name' => ucwords(str_replace('_', ' ', $this->name)),
'price' => $constant ? $constant->value[0] : 0
];
}
@@ -5,6 +5,7 @@ namespace App\Http\Resources;
use App\Classes\ValueObjects\Constants\ApprovalStatus;
use App\Classes\ValueObjects\Constants\TransactionType;
use App\Models\Group;
use App\Models\PackingList;
use App\Models\Transaction;
use App\Models\Wallet;
use Carbon\Carbon;
@@ -27,7 +28,9 @@ class TransactionWithStorageResource extends JsonResource
$groupPaymentAttemptsFiltered = [];
$group_payment_expired = null;
$group_payment_history = null;
$group_payment_history_query = null;
$groupTotalAmount = 0;
$payment_history = null;
if ($this->owner instanceof Transaction) {
if ($this->owner) {
@@ -43,7 +46,8 @@ class TransactionWithStorageResource extends JsonResource
if($this->groups){
$group_payment_attempts = GroupForOrderV2Resource::collection($this->groups->whereNotIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::COMPLETED]));
$group_payment_expired = GroupForOrderV2Resource::collection($this->groupsWithTrashed->whereIn('status', [ApprovalStatus::EXPIRED]));
$group_payment_history = GroupForOrderV2Resource::collection($this->groups->whereIn('status', [ApprovalStatus::PENDING_VERIFICATION, ApprovalStatus::REJECTED]));
$group_payment_history_query = $this->groups->whereIn('status', [ApprovalStatus::PENDING_VERIFICATION, ApprovalStatus::REJECTED]);
$group_payment_history = GroupForOrderV2Resource::collection($group_payment_history_query);
}
} else {
@@ -54,9 +58,13 @@ class TransactionWithStorageResource extends JsonResource
}
$packingListReference = null;
if ($this->owner instanceof PackingList) {
$packingListReference = $this->owner->reference;
}
$ts = $this->groups->whereIn('status', [ApprovalStatus::PENDING_VERIFICATION])->last();
if ($ts) {
if ($ts && $group_payment_history && $group_payment_attempts) {
$paymentTransaction = Transaction::where('payment_reference', $ts->reference)->whereIn('status', [ApprovalStatus::PENDING_SUBMISSION])->first();
if($paymentTransaction){
$groupTotalAmount = (double) $this->amount;
@@ -76,6 +84,21 @@ class TransactionWithStorageResource extends JsonResource
}
$payment_history = TransactionResource::collection($this->transactions()
->payments()
->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::PENDING_VERIFICATION, ApprovalStatus::COMPLETED, ApprovalStatus::REJECTED])
->get());
//For 'Your Payment Proof' at frontend
if($group_payment_history_query && count($group_payment_history_query) > 0){
if($this->getReferenceForGroupPayment($group_payment_history_query)){
foreach ($payment_history as $item) {
$item['payment_reference'] = $this->getReferenceForGroupPayment($group_payment_history_query);
}
}
}
return [
'id' => $this->id,
'owner_type' => $this->owner_type,
@@ -112,13 +135,9 @@ class TransactionWithStorageResource extends JsonResource
->payments()->where('status', ApprovalStatus::EXPIRED)
->get()
),
'payment_history' => TransactionResource::collection(
$this->transactions()
->payments()
->whereIn('status', [ApprovalStatus::APPROVED, ApprovalStatus::PENDING_VERIFICATION, ApprovalStatus::COMPLETED, ApprovalStatus::REJECTED])
->get()
),
'payment_history' => $payment_history,
'remarks' => RemarkResource::collection($this->remarks),
'packing_list_reference' => $packingListReference,
'storages' => $this->storages ? $this->storages : null, //from middleware
'is_waived' => (int) $this->is_waived,
'expires_on' => Carbon::parse($this->expires_on)->format('d-m-Y h:i:s A'),
@@ -126,4 +145,12 @@ class TransactionWithStorageResource extends JsonResource
'created_at' => Carbon::parse($this->created_at)->format('d-m-Y')
];
}
private function getReferenceForGroupPayment($groups){
if(count($groups)){
$firstGroup = $groups[0];
return $firstGroup['reference'];
}
return null;
}
}
+9
View File
@@ -5,6 +5,7 @@ namespace App\Models;
use App\Classes\General\Interfaces\Contactable;
use App\Classes\General\Interfaces\Remarkable;
use Barryvdh\LaravelIdeHelper\Eloquent;
use App\Classes\ValueObjects\Constants\RemarkTypes;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
@@ -142,4 +143,12 @@ class Address extends AbstractModel implements Contactable, Remarkable
{
return $this->morphMany(Remark::class, 'owner');
}
/**
* @return MorphMany
*/
public function addressExtraFields(): MorphMany
{
return $this->morphMany(Remark::class, 'owner')->where('type', RemarkTypes::ADDRESS_EXTRA_COLUMNS);
}
}
+8
View File
@@ -69,4 +69,12 @@ class CompanyConnection extends AbstractModel
return $this->belongsToMany(Segment::class, (new ConnectionSegment())->getTable(), 'company_connection_id', 'segment_id');
}
/**
* @return belongsToMany
*/
public function connectionSegments(): HasMany
{
return $this->hasMany(ConnectionSegment::class, 'company_connection_id');
}
}
+15
View File
@@ -0,0 +1,15 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Relations\MorphTo;
class KeyValuePair extends AbstractModel
{
protected $table = 'key_value_pairs';
public function owner(): MorphTo
{
return $this->morphTo();
}
}
+7 -1
View File
@@ -4,6 +4,7 @@ namespace App\Models;
use App\Classes\General\Interfaces\Addressable;
use App\Classes\General\Interfaces\Contactable;
use App\Classes\General\Interfaces\KeyValueInterface;
use App\Classes\General\Interfaces\Packable;
use App\Classes\General\Interfaces\Remarkable;
use App\Classes\General\Interfaces\Notifiable;
@@ -75,7 +76,7 @@ use Staudenmeir\EloquentHasManyDeep\HasRelationships;
* @method static Builder|Order withoutTrashed()
* @mixin Eloquent
*/
class Order extends AbstractModel implements Addressable, Packable, Remarkable, Notifiable
class Order extends AbstractModel implements Addressable, Packable, Remarkable, Notifiable, KeyValueInterface
{
use SoftDeletes;
use HasRelationships;
@@ -225,4 +226,9 @@ class Order extends AbstractModel implements Addressable, Packable, Remarkable,
{
return $this->hasManyDeep(Transaction::class, [PackingList::class], ['owner_id', 'owner_id'], ['id', 'id']);
}
public function attributes(): MorphMany
{
return $this->morphMany(KeyValuePair::class, 'owner');
}
}
+18
View File
@@ -149,6 +149,24 @@ return [
'groupNamePrefix' => env('CLOUDWATCH_LOGGROUP_PREFIX'),
],
'apiResponseTimeLog' => [
'driver' => 'single',
'path' => storage_path('logs/apiResponseTime.log'),
'level' => 'info',
],
'webResponseTimeLog' => [
'driver' => 'single',
'path' => storage_path('logs/webResponseTimeLog.log'),
'level' => 'info',
],
'priceCbmLog' => [
'driver' => 'single',
'path' => storage_path('logs/priceCbmLog.log'),
'level' => 'info',
],
'deletePaidGroupOrder' => [
'driver' => 'single',
'path' => storage_path('logs/deletePaidGroupOrder.log'),
@@ -0,0 +1,37 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateKeyValuePairsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('key_value_pairs', function (Blueprint $table) {
$table->id();
$table->string('owner_type'); //'user', 'order', 'transaction'
$table->unsignedBigInteger('owner_id');
$table->string('key');
$table->string('value');
$table->timestamps();
$table->index(['owner_type', 'owner_id']);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('key_value_pairs');
}
}
@@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddTypeToRemarksTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('remarks', function (Blueprint $table) {
$table->string('type')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('remarks', function (Blueprint $table) {
$table->dropColumn('type');
});
}
}
+1
View File
@@ -31,6 +31,7 @@
"vue": "^2.6.10",
"vue-avatar": "^2.1.8",
"vue-debounce": "^2.6.0",
"vue-gtag": "^1.16.1",
"vue-template-compiler": "^2.6.10",
"vue-the-mask": "^0.11.1",
"vuelidate": "^0.7.4",
+12 -1
View File
@@ -2,6 +2,7 @@
/** Dependencies */
import Vue from 'vue'
import store from './vuex/store';
import VueGtag from 'vue-gtag'
window.route = require('./general/functions/router');
@@ -47,7 +48,7 @@ Vue.mixin({
asset: window.Vapor.asset
},
mixins: [request, crudHandler]
});
});
/** Components Registrations */
Vue.component(Avatar);
@@ -55,6 +56,16 @@ Vue.component(Avatar);
const files = require.context('./', true, /\.vue$/i);
files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default));
// Google Analytics 4 (GA4) Integration
Vue.use(VueGtag, {
property: {
id: 'G-SP04J05142',
params: {
user_id: store.getters.getUserId
}
}
});
const app = new Vue({
el: '#app',
store,
@@ -3,14 +3,6 @@
<div class="col">
<div class="row" v-if="![7,8].includes($store.getters.getCompanyModuleType)">
<div class="col">
<div class="row m-b-15">
<div class="col">
<validation-wrapper-component :validator="$v.parameters.reference">
<label>Address Reference/Label</label>
<input class="form-control" name="reference" v-model="parameters.reference">
</validation-wrapper-component>
</div>
</div>
<div class="row m-b-15">
<div class="col">
<validation-wrapper-component :validator="$v.parameters.street_one">
@@ -41,6 +33,14 @@
</validation-wrapper-component>
</div>
</div>
<div class="row m-b-15">
<div class="col">
<validation-wrapper-component :validator="$v.parameters.reference">
<label>Address Name / Label</label>
<input class="form-control" name="reference" v-model="parameters.reference" placeholder="E.g. Home Address">
</validation-wrapper-component>
</div>
</div>
<div class="row">
<div class="col">
<div class="row">
@@ -59,14 +59,6 @@
</validation-wrapper-component>
</div>
</div>
<div class="row m-b-15">
<div class="col">
<validation-wrapper-component :validator="$v.parameters.remark">
<label>Delivery Remark</label>
<input class="form-control" name="remark" v-model="parameters.remark">
</validation-wrapper-component>
</div>
</div>
</div>
</div>
</div>
@@ -125,14 +117,47 @@
</validation-wrapper-component>
</div>
</div>
<div class="row m-b-15">
<div class="col">
<validation-wrapper-component :validator="$v.parameters.remark">
<label>Remark</label>
<input class="form-control" name="remark" v-model="parameters.remark">
</validation-wrapper-component>
</div>
</div>
</div>
</div>
<div class="row m-b-15">
<div class="col">
<validation-wrapper-component :validator="$v.parameters.remark">
<label>Delivery Remark</label>
<input class="form-control" name="remark" v-model="parameters.remark">
</validation-wrapper-component>
</div>
</div>
<div class="row m-b-15">
<div class="col-12 col-md pr-md-1 pb-3 pb-md-0">
<validation-wrapper-component :validator="$v.parameters.pickup_time_from">
<label>收货时间从 Available Hours From</label>
<input type="time" class="form-control" name="pickup_time" v-model="parameters.pickup_time_from">
</validation-wrapper-component>
</div>
<div class="col-12 col-md pl-md-1">
<validation-wrapper-component :validator="$v.parameters.pickup_time_to">
<label>最晚收货时间 Available Hours To</label>
<input type="time" class="form-control" name="latest_pickup_time" v-model="parameters.pickup_time_to">
</validation-wrapper-component>
</div>
</div>
<div class="row m-b-15">
<div class="col-12 col-md pr-md-1 pb-3 pb-md-0">
<validation-wrapper-component selectable :validator="$v.parameters.property_type">
<label>房型 Receiver's property type</label>
<select-component :options="['住家Landed house', '公寓Condominium (Drop on lobby only)', '工厂Factory', '店面Shop', '商场Shopping Mall (Drop on loading bay only)', 'Others']" v-model="parameters.property_type"></select-component>
</validation-wrapper-component>
</div>
<div class="col-12 col-md pl-md-1 pb-3 pb-md-0">
<validation-wrapper-component selectable :validator="$v.parameters.tools_required_unload">
<label>卸货工具 Tools require to unload goods</label>
<select-component :options="['Manpower', 'Forklift', 'None of above']" v-model="parameters.tools_required_unload"></select-component>
</validation-wrapper-component>
</div>
</div>
<div class="row justify-content-center allign-items-center">
<div class="col-12 col-sm-7">
<h6 class="text-center fs-12 text-danger">**kindly reply within 2 hours while warehouse contact to arrange for delivery, otherwise, reschedule of delivery date will apply</h6>
</div>
</div>
<div class="row">
@@ -154,7 +179,7 @@
props: {
id: {
type: Number,
required: true
// required: true
},
type: {
type: Number,
@@ -174,6 +199,10 @@
remark: '',
phone: '',
person_in_charge: '',
property_type: '',
tools_required_unload: '',
pickup_time_from: '',
pickup_time_to: '',
}
}
@@ -189,6 +218,10 @@
this.parameters.phone = this.data.contact ? this.data.contact.phone : '';
this.parameters.person_in_charge = this.data.contact ? this.data.contact.reference : '';
this.parameters.remark = this.data.remark ? this.data.remark.content : '';
this.parameters.property_type = this.data.property_type ? this.data.property_type : '';
this.parameters.tools_required_unload = this.data.tools_required_unload ? this.data.tools_required_unload : '';
this.parameters.pickup_time_from = this.data.pickup_time_from ? this.data.pickup_time_from : '';
this.parameters.pickup_time_to = this.data.pickup_time_to ? this.data.pickup_time_to : '';
}
},
watch: {
@@ -10,6 +10,10 @@
<div class="font-heading all-caps fs-11">{{this.item.name}}</div>
<div class="font-heading all-caps fs-11">CIEF/{{this.item.company_module.marking}}</div>
</div>
<div class="col-auto" v-if="this.item.whatsapp">
<div class="font-heading all-caps fs-11">Whatsapp:</div>
<div class="font-heading all-caps fs-11">{{ this.item.whatsapp.reference.replace('Whatsapp:', '') }}: {{ this.item.whatsapp.phone }}</div>
</div>
<div class="col-auto text-center">
<div class="font-heading all-caps fs-11">Orders</div>
<div class="font-heading all-caps fs-11">{{this.item.order_count}}</div>
@@ -116,9 +116,10 @@
},
sumAmount () {
var new_object = this.selectedInvoice;
return Object.keys(new_object).reduce(function(total, key) {
return total + Math.round(new_object[key].amount * 100) / 100;
var total = Object.keys(new_object).reduce(function(total, key) {
return total + new_object[key].amount;
}, 0).toFixed(2);
return Math.round(total * 100) / 100;
},
selectedIds () {
return this.selectedInvoice.map(s=>s.id);
@@ -0,0 +1,115 @@
<template>
<div class="row bg-white padding-25">
<div class="col" v-if="step === 1">
<loading-component style="height: 300px; top: 0;" key="1" color="success" v-show="isLoading" ></loading-component>
<div class="row justify-content-center" v-show="!isLoading">
<div class="col">
<div class="row">
<div class="col">
<h3>Please provide your Whatsapp phone number:</h3>
</div>
</div>
<div class="row m-t-20 m-b-15">
<div class="col-12">
<validation-wrapper-component :validator="$v.parameters.name">
<label>Name</label>
<input class="form-control" v-model="parameters.name">
</validation-wrapper-component>
</div>
<div class="col-12 p-t-15">
<validation-wrapper-component :validator="$v.parameters.phone">
<label>Phone</label>
<input class="form-control" v-model="parameters.phone">
</validation-wrapper-component>
</div>
</div>
<div class="row p-t-15">
<div class="col p-r-5">
<div class="btn btn-lg block btn m-b-5 no-border bg-master-lighter" data-dismiss="modal">Cancel</div>
</div>
<div class="col p-l-5">
<div class="btn btn-lg block btn m-b-5 no-border text-white bg-primary pointer" @click="nextStep">Confirm</div>
</div>
</div>
</div>
</div>
</div>
<div class="col" v-if="step === 2">
<loading-component style="height: 300px; top: 0;" key="1" color="success" v-show="isLoading" ></loading-component>
<div class="row justify-content-center" v-show="!isLoading">
<div class="col">
<div class="row">
<div class="col">
<h3>欲知更多详情请浏览 <a href="https://bit.ly/4a5v34p" target="_blank" class="text-underline">https://bit.ly/4a5v34p</a> 或联系 Whatsapp: <a href="https://wa.me/601136814520" target="_blank" class="text-underline text-success">+6011-36814520</a></h3>
</div>
</div>
<div class="row p-t-15">
<div class="col p-r-5">
<div class="btn btn-lg block btn m-b-5 no-border bg-master-lighter" @click="previousStep">Cancel</div>
</div>
<div class="col p-l-5">
<div class="btn btn-lg block btn m-b-5 no-border text-white bg-primary pointer" @click="activateService">Confirm</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { required } from 'vuelidate/lib/validators';
import componentHandler from '../../../general/mixins/componentHandler';
import modalFormHandler from '../../../general/mixins/modalFormHandler';
export default {
props: {
company:{
type: Object,
required: true
},
segmentId:{
type: Number,
required: false
}
},
data() {
return {
step: 1,
parameters: {
name: '',
phone: '',
}
}
},
validations: {
parameters: {
name: { required },
phone: { required },
}
},
methods: {
previousStep() {
this.step = 1;
},
nextStep() {
if (this.parameters.name && this.parameters.phone) {
this.step = 2;
} else {
this.parameters = {};
this.submit(this.route('api.company.connection.assign', this.company.id, this.company.company_module.connections[0].id), 'post', 'activateService', true, false);
}
},
activateService(){
this.parameters.segment_id = this.segmentId
this.submit(this.route('api.company.connection.assign', this.company.id, this.company.company_module.connections[0].id), 'post', 'activateService', true, false);
},
successHandler(){
location.reload();
}
},
mixins: [componentHandler, modalFormHandler]
}
</script>
@@ -0,0 +1,119 @@
<template>
<div class="row m-t-15 m-b-15 align-items-end parentContainer" v-if="company">
<div class="col">
<!-- 1688 consent -->
<div class="row m-l-0 m-r-0 m-b-15 animate__animated animate__tada animate__repeat-2 animate__delay-3s" v-if="!company.segments.some(item => item.id === 10 || item.id === 11 || item.id === 12)">
<div class="col bg-white padding-15">
<div class="row">
<div class="col">
<div class="row ">
<div class="col">
<h5 class="m-t-0 text-justify">重磅消息! CIEF 正式开通 <span class="bold">3PL fulfillment 服务</span>!! 你从中国进来的货物, 我们可以直接帮你仓储, 分拣打包, 直接送货到您的顾客手上, 只需系统对接你的 Lazada , Shopee , Tiktok 网店, 就能实现全自动化! 一个月只需 <span class="bold">RMX88</span>! </h5>
<h5 class="m-t-0 text-justify">Exciting news! CIEF has officially launched its <span class="bold">3PL fulfillment service</span>! We can assist with warehousing, sorting, packaging, and direct delivery of your goods from China to your customers. Simply integrate your Lazada, Shopee, or TikTok online stores with our system for full automation! Only <span class="bold">RMX88</span> per month!</h5>
</div>
</div>
<div class="row">
<div class="col-12 text-center">
<div class="btn btn-md block btn m-b-5 no-border text-white pointer bg-success requestModal" data-type="fulfilment-interested-now">Interested now (感兴趣)</div>
</div>
<div class="col-12 text-center">
<div class="btn btn-md block btn m-b-5 pointer requestModal" data-type="fulfilment-interested-later">Interested later (感兴趣但现在不需要)</div>
</div>
<div class="col-12 text-center">
<div class="btn btn-md block btn m-b-5 no-border text-white pointer bg-danger requestModal" data-type="not-interested-confirm">Not interested (不感兴趣)</div>
</div>
</div>
</div>
</div>
</div>
</div>
<modal-component class="animate__animated animate__fast animate__fadeIn" type="fulfilment-interested-now" styleType="fill-in" size="large">
<fulfilment-interested-form-component
section="activateService"
:company="company"
:segmentId="10"
>
</fulfilment-interested-form-component>
</modal-component>
<modal-component class="animate__animated animate__fast animate__fadeIn" type="fulfilment-interested-later" styleType="fill-in" size="large">
<fulfilment-interested-form-component
section="activateService"
:company="company"
:segmentId="11"
>
</fulfilment-interested-form-component>
</modal-component>
<modal-component small type="not-interested-confirm">
<div class="row">
<div class="col text-center">
<div class="row">
<div class="col text-center">
<div class="row m-b-20">
<div class="col">
<h5 class="all-caps">Are you Sure?</h5>
<div class="fs-11">Are you sure you are not interested in this service?</div>
</div>
</div>
<div class="row">
<div class="col p-r-5">
<div data-dismiss="modal" class="btn btn-sm btn-default bg-master-lighter btn-block b-rad-none">No, take me back</div>
</div>
<div class="col p-l-5">
<div data-dismiss="modal" class="btn btn-sm btn-danger btn-block b-rad-none" @click="activateService(12)">Yes, Im sure</div>
</div>
</div>
</div>
</div>
</div>
</div>
</modal-component>
</div>
</div>
</template>
<script>
import componentHandler from '../../../general/mixins/componentHandler';
export default {
data(){
return {
section: 'newServiceList',
parameters: {
segment_id: ''
},
expanded: false,
failed: false,
part: 0,
isFetchCompany: false,
company: null
}
},
created(){
this.fetchCompany();
},
methods: {
fetchCompany(){
this.parameters = null;
this.isFetchCompany = true;
this.submit(route('api.company.show', this.$store.getters.getCompanyId), 'get', this.section, false, false)
},
activateService(segmentId){
this.parameters = {
segment_id: segmentId
};
this.part = 1;
this.submit(this.route('api.company.connection.assign', this.company.id, this.company.company_module.connections[0].id), 'post', 'activateService', true, false);
},
successHandler(response){
if (this.isFetchCompany) {
this.company = response.payload.data;
this.isFetchCompany = false;
}
if(this.part == 1 || this.part == 4){
location.reload();
}
}
},
mixins: [componentHandler]
}
</script>
@@ -49,7 +49,7 @@
</transition-component>
</template>
fetchJobResult<script>
<script>
import requestV2 from '../../../general/mixins/aws/requestV2'
export default {
props: {
@@ -17,7 +17,7 @@
<div class="col-auto hide" v-if="$store.getters.isSuperAdmin">
<button type="button" class="btn b-rad-none btn-danger fs-11 requestModal" data-type="deletePackingList"><i class="fa fa-times text-white fs-12"></i></button>
<modal-component class="animate__animated animate__fast animate__fadeIn" styleType="fill-in" type="deletePackingList">
<delete-packinglist-form-component :data="data"></delete-packinglist-form-component>
<delete-packinglist-form-component :data="data" :section="section"></delete-packinglist-form-component>
</modal-component>
<button type="button" class="btn b-rad-none btn-primary fs-11 requestModal" data-type="claimPackingList">Claim</button>
</div>
@@ -51,7 +51,7 @@
<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" data-dismiss="modal" @click="submit(route('api.packing_list.delete', item.id), 'delete', 'unclaimedPackingListSection', true, true)">Confirm</div>
<div class="btn btn-sm btn-danger btn-block b-rad-none" data-dismiss="modal" @click="submit(route('api.packing_list.delete', item.id), 'delete', section, true, true)">Confirm</div>
</div>
</div>
</div>
@@ -78,6 +78,12 @@
<script>
import componentHandler from '../../../general/mixins/componentHandler';
export default {
mixins: [componentHandler]
mixins: [componentHandler],
data() {
return {
isLoading: false,
section: 'unclaimedPackingListSection',
}
}
}
</script>
@@ -7,7 +7,7 @@
<div class="col">
<div class="row m-b-20 text-info">
<div class="col text-center">
<h5 class="m-b-0">We currently support two major cities in china.</h5>
<h5 class="m-b-0">We currently support three major cities in china.</h5>
<h3 class="m-t-0">Which warehouse is more suitable for you?</h3>
</div>
</div>
@@ -128,12 +128,19 @@
</div>
<div class="row justify-content-center animate__animated animate__fadeInUpBig animate__delay-1 animate__fast">
<div class="col col-md-8 no-padding">
<div class="row justify-content-center">
<div class="col-auto p-r-5">
<input type="checkbox" id="agree" v-model="isChecked">
<label for="agree">I have read and understand the terms and agree to the <a href="https://www.cief-malaysia.com/shipping-terms-and-conditions/" target="_blank">Terms & Conditions</a>.</label>
<br>
</div>
</div>
<div class="row">
<div class="col-auto p-r-5">
<button type="button" class="btn btn-lg btn-default b-rad-none" @click="step--">back</button>
</div>
<div class="col p-l-5">
<button type="button" class="btn btn-lg btn-block btn-primary b-rad-none" @click="createOrder()" v-if="parameters.address_id && company.company_module.billingAddress">Create Order</button>
<button type="button" class="btn btn-lg btn-block btn-primary b-rad-none" :disabled="!isChecked" @click="createOrder()" v-if="parameters.address_id && company.company_module.billingAddress">Create Order</button>
<button type="button" class="btn btn-lg btn-block btn-primary b-rad-none" @click=" chooseBillingAddress = !chooseBillingAddress" v-if="parameters.address_id && !company.company_module.billingAddress">Select Billing Address</button>
</div>
</div>
@@ -193,12 +200,19 @@
</div>
<div class="row justify-content-center animate__animated animate__fadeInUpBig animate__delay-1 animate__fast">
<div class="col col-md-8 no-padding">
<div class="row justify-content-center">
<div class="col-auto p-r-5">
<input type="checkbox" id="agree" v-model="isChecked">
<label for="agree">I have read and understand the terms and agree to the <a href="https://www.cief-malaysia.com/shipping-terms-and-conditions/" target="_blank">Terms & Conditions</a>.</label>
<br>
</div>
</div>
<div class="row">
<div class="col-auto p-r-5">
<button type="button" class="btn btn-lg btn-default b-rad-none" @click="chooseBillingAddress = !chooseBillingAddress">back</button>
</div>
<div class="col p-l-5">
<button type="button" class="btn btn-lg btn-block btn-primary b-rad-none" @click="createOrder()" v-if="parameters.billing_address_id">Create Order</button>
<button type="button" class="btn btn-lg btn-block btn-primary b-rad-none" :disabled="!isChecked" @click="createOrder()" v-if="parameters.address_id">Create Order</button>
</div>
</div>
</div>
@@ -256,7 +270,7 @@
chooseBillingAddress: false,
useDeliveryAddress: false,
billingAddressFilters: {
per_page: 10,
per_page: 10,
HasMorphCompanyModule: this.company.company_module.id,
type: 1
},
@@ -265,12 +279,15 @@
address_id: '',
company_id: this.company.id,
billing_address_id: '',
}
is_terms_agree: false
},
isChecked: false
}
},
methods:{
createOrder(){
this.step++;
this.parameters.is_terms_agree = this.isChecked;
this.submit((this.route('api.order.create')), 'post', 'orderListSection', false, false)
},
cancelOrder(){
@@ -298,7 +315,7 @@
if(this.useDeliveryAddress) {
// if use delivery address
this.billingAddressFilters = {
per_page: 10,
per_page: 10,
HasMorphCompanyModule: this.company.company_module.id,
type: 1
}
@@ -93,6 +93,16 @@
</div>
</div>
</div>
<div class="row" v-if="$store.getters.isAdmin">
<div class="col padding-20">
<div class="row">
<div class="col">
<p class="no-margin fs-10 all-caps">Packinglist Reference</p>
<div>{{ item.packing_list_reference }}</div>
</div>
</div>
</div>
</div>
<div class="row b-t b-grey p-t-10 m-l-5 m-r-5" v-show="expanded" v-if="![5, 6].includes(item.status)">
<div class="col-12 col-md-7 padding-20">
<div class="row bg-master-lightest h-100">
@@ -157,6 +157,13 @@
</div>
</a>
</div>
<div class="row no-margin" v-if="item.payment_method === 4 && item.payment_reference">
<a :href="route('billplz.bill', item.payment_reference)" target="_blank">
<div class="icon-thumbnail fs-11 text-white icon-25 bg-primary btn-rounded float-left m-r-5">
<i class="fa fa-file-image-o fs-10"></i>
</div>
</a>
</div>
</div>
</div>
</div>
@@ -181,9 +188,13 @@
},
methods: {
clickExpand(){
if(this.item
&& ((this.item.payment_method !== 5 && this. item.documents.length)
|| (this.item.payment_method === 5 && (this.item.status === 2 || this.item.status === 3)))){
// if(this.item
// && ((this.item.payment_method !== 5 && this. item.documents.length)
// || (this.item.payment_method === 5 && (this.item.status === 2 || this.item.status === 3)))){
// this.expandPaymentDetails = !this.expandPaymentDetails;
// }
if(this.item){
this.expandPaymentDetails = !this.expandPaymentDetails;
}
},
@@ -0,0 +1,119 @@
<template>
<div class="w-100">
<validation-wrapper-component
selectable
:validator="$v.parameters.id"
>
<label>Segment</label>
<selectable-component
:endpoint="
route('api.segment.list')
"
:section="section"
:value="3"
valueColumn="id"
:labelColumn="['name']"
v-model="parameters.id"
@input="onSelect"
></selectable-component>
</validation-wrapper-component>
<list-component
v-if="parameters.id"
class="mt-4"
:key="parameters.id"
:section="`segments_${parameters.id}`"
:endpoint="route('api.company.list')"
:options="{
company_segments_in: [parameters.id],
// with_total_payments: true,
// recency: '2022-02-15',
// frequency: 15,
// business_type: 2,
// with_bookings: true,
// order_by: { column: 'total_payments', DESC: true },
}"
>
<template slot="list" slot-scope="{ data }">
<company-component :data="data"></company-component>
</template>
</list-component>
<div v-else>
<div
class="row align-items-center justify-content-center p-t-50 p-b-50"
style=""
>
<div class="col-10">
<div
class="row align-items-center justify-content-center hint-text"
>
<div class="col-4 hint-text">
<img
src="/images/2829248.png"
class="w-100 hint-text"
/>
</div>
</div>
<div class="row text-center">
<div class="col">
<div class="row m-t-20">
<div class="col">
<p
class="all-caps no-margin fs-11"
style="letter-spacing: 2px"
>
Please Select a Segment
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import componentHandler from "../../../general/mixins/componentHandler";
export default {
props: {
section: {
type: String,
required: true,
},
type: {
type: Number,
required: true,
},
id: {
type: Number,
default: null,
}
},
data() {
return {
parameters: {
id: null,
},
};
},
validations: {
parameters: {
id: {},
},
},
methods: {
onSelect(val) {
this.parameters.id = val
},
},
created(){
const id = new URL(location.href).searchParams.get('id')
if(id){
this.parameters.id = id
}
},
mixins: [componentHandler],
};
</script>
@@ -34,6 +34,15 @@
</div>
</div>
</div>
<div class="col-auto">
<div class="row">
<div class="col">
<a class="btn btn-xs btn-outline-info b-rad-none m-r-5 requestModal" :href="route('segments') + `?id=${item.id}`">
<i class="fa fa-list"></i>
</a>
</div>
</div>
</div>
<div class="col-auto hide">
<div class="row">
<div class="col">
@@ -19,6 +19,10 @@ export default {
remark: {},
phone: {required, numeric},
person_in_charge: { required },
property_type: { required },
tools_required_unload: { required },
pickup_time_from: { required },
pickup_time_to: { required },
}
},
mixins: [addressFormHandler]
-4
View File
@@ -4,10 +4,6 @@
@include('vendor/head')
</head>
<body class="horizontal-menu horizontal-app-menu bg-white overflow-hidden">
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-T3XCNMB"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<div id="app" style="min-height: 100%;">
@yield('content')
</div>
@@ -0,0 +1,134 @@
<div class="row">
<div class="col b-r b-white">
<div class="row fs-12 text-center">
<div class="col p-t-20 p-b-20 bg-master-lighter tabButton @if($active==1) active @endif" tab-name="segment1">
<div class="row justify-content-center m-b-5">
<div class="col-auto">
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="35" height="35" viewBox="0 0 172 172" style=" fill:#000000;">
<defs>
<linearGradient x1="66.87575" y1="36.02325" x2="66.87575" y2="164.11756" gradientUnits="userSpaceOnUse" id="color-1_hUqtl21qkZmg_gr1">
<stop offset="0" stop-color="#009add"></stop>
<stop offset="1" stop-color="#00baa4"></stop>
</linearGradient>
<linearGradient x1="105.12425" y1="35.4535" x2="105.12425" y2="164.77331" gradientUnits="userSpaceOnUse" id="color-2_hUqtl21qkZmg_gr2">
<stop offset="0" stop-color="#009add"></stop>
<stop offset="1" stop-color="#00baa4"></stop>
</linearGradient>
<linearGradient x1="86" y1="130.00781" x2="86" y2="146.81275" gradientUnits="userSpaceOnUse" id="color-3_hUqtl21qkZmg_gr3">
<stop offset="0" stop-color="#4ec9ff"></stop>
<stop offset="1" stop-color="#2bffe6"></stop>
</linearGradient>
<linearGradient x1="86" y1="2.6875" x2="86" y2="163.9375" gradientUnits="userSpaceOnUse" id="color-4_hUqtl21qkZmg_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="M73.43863,107.5c-3.30294,0 -6.03075,2.40531 -6.48763,5.53087h-0.1505c-0.45687,-3.12556 -3.182,-5.53087 -6.48763,-5.53087c-3.62544,0 -6.56287,2.88906 -6.56287,6.45269c0,7.2885 6.78325,12.19856 10.59681,14.37812c1.55606,0.88956 3.49913,0.88956 5.05519,0c3.81625,-2.18225 10.59681,-7.08962 10.59681,-14.37812c0,-3.56363 -2.93744,-6.45269 -6.56019,-6.45269z" fill="url(#color-1_hUqtl21qkZmg_gr1)"></path>
<path d="M111.68713,107.5c-3.30294,0 -6.03075,2.40531 -6.48762,5.53087h-0.1505c-0.45419,-3.12556 -3.182,-5.53087 -6.48763,-5.53087c-3.62275,0 -6.56288,2.88906 -6.56288,6.45269c0,7.2885 6.78325,12.19856 10.59681,14.37813c1.55606,0.88956 3.49913,0.88956 5.05519,0c3.81625,-2.17956 10.5995,-7.08694 10.5995,-14.37812c0,-3.56363 -2.93744,-6.45269 -6.56288,-6.45269z" fill="url(#color-2_hUqtl21qkZmg_gr2)"></path>
<path d="M75.25,134.375c0,5.93669 4.81331,10.75 10.75,10.75c5.93669,0 10.75,-4.81331 10.75,-10.75v-2.6875h-21.5z" fill="url(#color-3_hUqtl21qkZmg_gr3)"></path>
<path d="M139.75,95.90344v-6.74831c0.02956,-0.15856 0.09406,-0.301 0.09406,-0.46762l-0.00806,-22.12619c0.2795,-14.89412 -7.39331,-27.3695 -10.70431,-32.04038c-5.54431,-7.80719 -11.05906,-11.73631 -13.83525,-12.08569c-1.06156,-0.12362 -2.11775,0.387 -2.65794,1.31688l-1.14487,1.97262c-0.97019,1.67431 -2.71169,2.67406 -4.65475,2.67406c-1.94306,0 -3.68994,-0.99975 -4.66012,-2.67406l-11.98625,-20.63194c-0.87613,-1.505 -2.44563,-2.40531 -4.1925,-2.40531c-1.74956,0 -3.31906,0.90031 -4.18981,2.408l-11.94056,20.54863c-0.97019,1.67431 -2.71169,2.67406 -4.65475,2.67406c-1.94306,0 -3.68994,-0.99975 -4.66281,-2.67406l-1.16906,-2.01025c-0.42463,-0.73369 -1.17712,-1.2255 -2.021,-1.31956c-2.64181,-0.3225 -7.47662,3.06375 -11.86531,8.38231c-6.26456,7.60025 -13.01019,20.86575 -13.15262,35.31375l-0.09406,22.66638c0,0 0,0 0,0.00269c0,0.00269 0,0.00538 0,0.00806v7.21594c-6.34519,3.02881 -10.75,9.48687 -10.75,16.97156c0,10.37106 8.44144,18.8125 18.8125,18.8125h0.12362c6.64888,18.77487 24.51,32.25 45.56388,32.25c21.05388,0 38.915,-13.47513 45.56388,-32.25h0.12363c10.37106,0 18.8125,-8.44144 18.8125,-18.8125c0,-7.48469 -4.40481,-13.94275 -10.75,-16.97156zM49.6435,34.11513c2.7735,-3.36475 4.94769,-5.02025 6.24038,-5.80769l0.0215,0.03762c1.94844,3.34863 5.42875,5.34813 9.3095,5.34813c3.88344,0 7.36106,-1.9995 9.30412,-5.35081l11.481,-19.76388l11.52669,19.84719c1.94844,3.34863 5.42875,5.34813 9.3095,5.34813c3.82969,0 7.267,-1.94844 9.22619,-5.21375c1.83019,1.20937 5.01756,3.90763 8.686,9.07031c2.28975,3.23038 9.59975,14.61463 9.69919,27.93119c-8.66719,-18.07881 -27.09538,-30.62406 -48.44756,-30.62406c-21.16406,0 -39.45788,12.32487 -48.21644,30.14838c0.4085,-12.65544 6.321,-24.252 11.85994,-30.97075zM26.875,112.875c0,-6.48763 4.62519,-11.91637 10.75,-13.16606v5.59806c-3.12556,1.10994 -5.375,4.0635 -5.375,7.568c0,3.59856 2.37306,6.60856 5.62763,7.64594c0.19619,1.91887 0.53481,3.79206 0.94869,5.64106c-6.70263,-0.74981 -11.95131,-6.3855 -11.95131,-13.287zM129,115.5625c0,23.70913 -19.29087,43 -43,43c-23.70913,0 -43,-19.29087 -43,-43v-16.125h8.0625c9.34981,0 17.47413,-5.32931 21.5,-13.11231c4.02587,7.783 12.15019,13.11231 21.5,13.11231h34.9375zM94.0625,94.0625c-10.37106,0 -18.8125,-8.44144 -18.8125,-18.8125v-2.6875h-5.375v2.6875c0,10.37106 -8.44144,18.8125 -18.8125,18.8125h-13.4375v-5.36425v-0.01075c0,-26.67344 21.70156,-48.375 48.375,-48.375c26.67344,0 48.375,21.70156 48.375,48.375v5.375zM133.17369,126.162c0.41387,-1.84631 0.75519,-3.7195 0.94869,-5.64106c3.25456,-1.03737 5.62762,-4.04738 5.62762,-7.64594c0,-3.5045 -2.24944,-6.45806 -5.375,-7.568v-5.59806c6.12481,1.24969 10.75,6.67575 10.75,13.16606c0,6.9015 -5.24869,12.53719 -11.95131,13.287z" fill="url(#color-4_hUqtl21qkZmg_gr4)"></path>
</g>
</g>
</svg>
</div>
</div>
<div class="row">
<div class="col">
<div class="fs-12 m-t-5 all-caps">{{ __('Standard') }}</div>
</div>
</div>
</div>
</div>
</div>
<div class="col b-r b-white">
<div class="row fs-12 text-center">
<div class="col p-t-20 p-b-20 bg-master-lighter tabButton @if($active==2) active @endif" tab-name="segment2">
<div class="row justify-content-center m-b-5">
<div class="col-auto">
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="35" height="35" viewBox="0 0 172 172" style=" fill:#000000;">
<defs>
<linearGradient x1="104.8125" y1="95.74219" x2="104.8125" y2="114.9175" gradientUnits="userSpaceOnUse" id="color-1_TUOBhQt-Vj1j_gr1">
<stop offset="0" stop-color="#4ec9ff"></stop>
<stop offset="1" stop-color="#2bffe6"></stop>
</linearGradient>
<linearGradient x1="67.1875" y1="95.74219" x2="67.1875" y2="114.9175" gradientUnits="userSpaceOnUse" id="color-2_TUOBhQt-Vj1j_gr2">
<stop offset="0" stop-color="#4ec9ff"></stop>
<stop offset="1" stop-color="#2bffe6"></stop>
</linearGradient>
<linearGradient x1="86" y1="125.40413" x2="86" y2="133.41288" gradientUnits="userSpaceOnUse" id="color-3_TUOBhQt-Vj1j_gr3">
<stop offset="0" stop-color="#4ec9ff"></stop>
<stop offset="1" stop-color="#2bffe6"></stop>
</linearGradient>
<linearGradient x1="86" y1="10.234" x2="86" y2="158.13788" gradientUnits="userSpaceOnUse" id="color-4_TUOBhQt-Vj1j_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>
<circle cx="39" cy="39" transform="scale(2.6875,2.6875)" r="3" fill="url(#color-1_TUOBhQt-Vj1j_gr1)"></circle>
<circle cx="25" cy="39" transform="scale(2.6875,2.6875)" r="3" fill="url(#color-2_TUOBhQt-Vj1j_gr2)"></circle>
<rect x="28" y="47" transform="scale(2.6875,2.6875)" width="8" height="3" fill="url(#color-3_TUOBhQt-Vj1j_gr3)"></rect>
<path d="M142.4375,80.11975v-7.55725c0,-31.11856 -25.31625,-56.4375 -56.4375,-56.4375c-31.12125,0 -56.4375,25.31894 -56.4375,56.4375v7.55725c-4.81062,2.79231 -8.0625,7.98994 -8.0625,13.94275c0,8.89294 7.23206,16.125 16.125,16.125h0.13706c1.40556,25.42106 22.47019,45.6875 48.23794,45.6875c25.76775,0 46.83238,-20.26644 48.23794,-45.6875h0.13706c8.89294,0 16.125,-7.23206 16.125,-16.125c0,-5.95281 -3.25188,-11.15044 -8.0625,-13.94275zM34.9375,77.9375v-5.375h16.125c7.40944,0 13.4375,-6.02806 13.4375,-13.4375v-5.375h-5.375v5.375c0,4.44512 -3.61738,8.0625 -8.0625,8.0625h-15.83744c2.69556,-25.63875 24.43475,-45.6875 50.77494,-45.6875c26.34019,0 48.07938,20.04875 50.77494,45.6875h-42.71244c-4.44512,0 -8.0625,-3.61738 -8.0625,-8.0625v-5.375h-5.375v5.375c0,7.40944 6.02806,13.4375 13.4375,13.4375h43v5.375h-46.91837c-8.213,0 -14.89413,-6.68113 -14.89413,-14.89413v-9.29337h-5.375v8.94937c0,8.40113 -6.837,15.23813 -15.23813,15.23813zM26.875,94.0625c0,-5.92863 4.82138,-10.75 10.75,-10.75v8.0625h-2.6875c-1.4835,0 -2.6875,1.20131 -2.6875,2.6875c0,1.48619 1.204,2.6875 2.6875,2.6875h2.6875v8.0625c-5.92862,0 -10.75,-4.82137 -10.75,-10.75zM86,150.5c-23.70912,0 -43,-19.29087 -43,-43v-24.1875h11.63687c7.61906,0 14.28675,-4.15488 17.85575,-10.31731c3.48031,6.15438 10.08888,10.31731 17.6515,10.31731h38.85587v24.1875c0,23.70913 -19.29087,43 -43,43zM134.375,104.8125v-8.0625h2.6875c1.4835,0 2.6875,-1.20131 2.6875,-2.6875c0,-1.48619 -1.204,-2.6875 -2.6875,-2.6875h-2.6875v-8.0625c5.92863,0 10.75,4.82137 10.75,10.75c0,5.92863 -4.82137,10.75 -10.75,10.75z" fill="url(#color-4_TUOBhQt-Vj1j_gr4)"></path>
</g>
</g>
</svg>
</div>
</div>
<div class="row">
<div class="col">
<div class="fs-12 m-t-5 all-caps">{{ __('Custom') }}</div>
</div>
</div>
</div>
</div>
</div>
<div class="col b-r b-white">
<div class="row fs-12 text-center">
<div class="col p-t-20 p-b-20 bg-master-lighter tabButton @if($active==3) active @endif" tab-name="segment3">
<div class="row justify-content-center m-b-5">
<div class="col-auto">
<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="35" height="35" viewBox="0 0 172 172" style=" fill:#000000;">
<defs>
<linearGradient x1="104.8125" y1="95.74219" x2="104.8125" y2="114.9175" gradientUnits="userSpaceOnUse" id="color-1_TUOBhQt-Vj1j_gr1">
<stop offset="0" stop-color="#4ec9ff"></stop>
<stop offset="1" stop-color="#2bffe6"></stop>
</linearGradient>
<linearGradient x1="67.1875" y1="95.74219" x2="67.1875" y2="114.9175" gradientUnits="userSpaceOnUse" id="color-2_TUOBhQt-Vj1j_gr2">
<stop offset="0" stop-color="#4ec9ff"></stop>
<stop offset="1" stop-color="#2bffe6"></stop>
</linearGradient>
<linearGradient x1="86" y1="125.40413" x2="86" y2="133.41288" gradientUnits="userSpaceOnUse" id="color-3_TUOBhQt-Vj1j_gr3">
<stop offset="0" stop-color="#4ec9ff"></stop>
<stop offset="1" stop-color="#2bffe6"></stop>
</linearGradient>
<linearGradient x1="86" y1="10.234" x2="86" y2="158.13788" gradientUnits="userSpaceOnUse" id="color-4_TUOBhQt-Vj1j_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>
<circle cx="39" cy="39" transform="scale(2.6875,2.6875)" r="3" fill="url(#color-1_TUOBhQt-Vj1j_gr1)"></circle>
<circle cx="25" cy="39" transform="scale(2.6875,2.6875)" r="3" fill="url(#color-2_TUOBhQt-Vj1j_gr2)"></circle>
<rect x="28" y="47" transform="scale(2.6875,2.6875)" width="8" height="3" fill="url(#color-3_TUOBhQt-Vj1j_gr3)"></rect>
<path d="M142.4375,80.11975v-7.55725c0,-31.11856 -25.31625,-56.4375 -56.4375,-56.4375c-31.12125,0 -56.4375,25.31894 -56.4375,56.4375v7.55725c-4.81062,2.79231 -8.0625,7.98994 -8.0625,13.94275c0,8.89294 7.23206,16.125 16.125,16.125h0.13706c1.40556,25.42106 22.47019,45.6875 48.23794,45.6875c25.76775,0 46.83238,-20.26644 48.23794,-45.6875h0.13706c8.89294,0 16.125,-7.23206 16.125,-16.125c0,-5.95281 -3.25188,-11.15044 -8.0625,-13.94275zM34.9375,77.9375v-5.375h16.125c7.40944,0 13.4375,-6.02806 13.4375,-13.4375v-5.375h-5.375v5.375c0,4.44512 -3.61738,8.0625 -8.0625,8.0625h-15.83744c2.69556,-25.63875 24.43475,-45.6875 50.77494,-45.6875c26.34019,0 48.07938,20.04875 50.77494,45.6875h-42.71244c-4.44512,0 -8.0625,-3.61738 -8.0625,-8.0625v-5.375h-5.375v5.375c0,7.40944 6.02806,13.4375 13.4375,13.4375h43v5.375h-46.91837c-8.213,0 -14.89413,-6.68113 -14.89413,-14.89413v-9.29337h-5.375v8.94937c0,8.40113 -6.837,15.23813 -15.23813,15.23813zM26.875,94.0625c0,-5.92863 4.82138,-10.75 10.75,-10.75v8.0625h-2.6875c-1.4835,0 -2.6875,1.20131 -2.6875,2.6875c0,1.48619 1.204,2.6875 2.6875,2.6875h2.6875v8.0625c-5.92862,0 -10.75,-4.82137 -10.75,-10.75zM86,150.5c-23.70912,0 -43,-19.29087 -43,-43v-24.1875h11.63687c7.61906,0 14.28675,-4.15488 17.85575,-10.31731c3.48031,6.15438 10.08888,10.31731 17.6515,10.31731h38.85587v24.1875c0,23.70913 -19.29087,43 -43,43zM134.375,104.8125v-8.0625h2.6875c1.4835,0 2.6875,-1.20131 2.6875,-2.6875c0,-1.48619 -1.204,-2.6875 -2.6875,-2.6875h-2.6875v-8.0625c5.92863,0 10.75,4.82137 10.75,10.75c0,5.92863 -4.82137,10.75 -10.75,10.75z" fill="url(#color-4_TUOBhQt-Vj1j_gr4)"></path>
</g>
</g>
</svg>
</div>
</div>
<div class="row">
<div class="col">
<div class="fs-12 m-t-5 all-caps">{{ __('Label') }}</div>
</div>
</div>
</div>
</div>
</div>
</div>
@@ -0,0 +1,12 @@
@extends('layouts.base_portal')
@section('inner_content')
<div class="tabsContainer p-3 p-b-0 p-md-0">
<div class="row" v-if="$store.getters.isAdmin">
<div class="col bg-white padding-25">
<div class="row tabsContainer tabContent m-l-0 m-r-0" tab-name="segment1">
<segment-company-component section="customSegmentSection" />
</div>
</div>
</div>
</div>
@endsection
File diff suppressed because one or more lines are too long
+6 -1
View File
@@ -564,7 +564,8 @@ Route::get('/customers/active/{active_start}/{active_end}/{inactive_start?}/{ina
Route::get('/online_payment/redirect', 'Billplz\CallbackBillplzController@callback')->name('online_payment.redirect');
Route::get('/order/{id}', function ($id) {
return view('pages.orders.profile', ['id' => $id]);
// return view('pages.orders.profile', ['id' => $id]);
return redirect()->route('order.show', ['order_number' => $id]);
})->name('order.details');
Route::get('/payment-and-billing', function () {
@@ -1314,3 +1315,7 @@ Route::get('/show-all-extra-payments', function () {
}
echo '</table>';
});
Route::get('/segments', function (Request $request) {
return view('pages.segments.index');
})->name('segments');