Merge remote-tracking branch 'origin/master'

This commit is contained in:
Omair Saleh
2023-06-01 23:52:57 +08:00
3 changed files with 19 additions and 9 deletions
@@ -33,9 +33,18 @@ class ImportHoneyTrapController
$excelRows = $import->rows;
$excelRows = $excelRows->toArray();
$returnArray = [];
$returnArray = [];
$segment_name = 'honey trap campaign';
$segment = Segment::where('name', $segment_name)->first();
$segment_id = Segment::where('name', 'honey trap platinum')->first()->id;
if (!$segment) {
$row['status'] = 'Failed';
$row['message'] = '"' . $segment_name . '"' . ' not found';
$returnArray[] = $row;
return response()->json($returnArray);
}
$segment_id = $segment->id;
foreach ($excelRows as $row) {
@@ -111,6 +120,6 @@ class ImportHoneyTrapController
{
$unixTime = (($date - 25569) * 86400);
$date = new DateTime("@$unixTime");
return $date->format('d/m/Y');
return $date->format('Y-m-d'); // Change the format to 'Y-m-d'
}
}
@@ -26,12 +26,12 @@
:endpoint="route('api.company.list')"
:options="{
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 },
// 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 }">
@@ -36,6 +36,7 @@
@endphp
<section id="customer-account" class="m-b-50">
<h3>Customer Account</h3>
<p>Company Id: <span>{{$company->id}}</span></p>
<p>Marking: <span><a href="{{route('customer.profile', $company->reference)}}" target="_blank">{{$company->reference}}</a></span></p>
<p>Account Type: <span>{{$company->type === 1 ? 'Business' : 'Personal'}}</span></p>
@if($company->type === 1)<p>Company's Name: <span>{{$company->name}}</span></p>@endif