mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-29 01:13:59 +00:00
Merge branch 'dillon/34.7-jenkins-vapor' into vapor/staging
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Site Under Maintenance</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
background-color: #f4f4f4;
|
||||
text-align: center;
|
||||
padding: 50px;
|
||||
}
|
||||
.content {
|
||||
background: white;
|
||||
padding: 20px;
|
||||
border-radius: 10px;
|
||||
display: inline-block;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<h1>We'll be back soon!</h1>
|
||||
<p>Sorry for the inconvenience but we're performing some maintenance at the moment. We'll be back online shortly!</p>
|
||||
<p>— CIEF EXCHANGE</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -51,8 +51,8 @@ class ExportsAnalyticBookingTransactions implements FromQuery, WithHeadings, Wit
|
||||
* @return \Illuminate\Support\Collection|mixed
|
||||
*/
|
||||
public function query()
|
||||
{
|
||||
return Booking::query();
|
||||
{
|
||||
return Booking::query()->whereBetween('created_at', [Carbon::now()->subMonth(1), Carbon::now()]); //Limit, 'expensive' query;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -66,12 +66,12 @@ class ExportsAnalyticBookingTransactions implements FromQuery, WithHeadings, Wit
|
||||
$companyType[companyType::PERSONAL_BUSINESS] = 'PERSONAL_BUSINESS';
|
||||
|
||||
$payments = $booking->transactions()->where('type', 1)->whereIn('status', [2, 3]);
|
||||
|
||||
|
||||
$paymentmethondArray = PaymentMethodType::PAYMENT_METHODS_ID;
|
||||
$paymentmethondArray[0] = 'Hybrid';
|
||||
$paymentMethod = '';
|
||||
foreach ($payments->get() as $payment) {
|
||||
if ( $paymentMethod == '' ) {
|
||||
if ( $paymentMethod == '' ) {
|
||||
$paymentMethod = $payment->payment_method;
|
||||
} else if ( $payment->payment_method != $paymentMethod ) {
|
||||
$paymentMethod = 0; // set it to Hybrid
|
||||
@@ -104,4 +104,4 @@ class ExportsAnalyticBookingTransactions implements FromQuery, WithHeadings, Wit
|
||||
'',
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace App\Classes\Modules\Exports\Services;
|
||||
use App\Classes\ValueObjects\Constants\BusinessType;
|
||||
use App\Classes\ValueObjects\Constants\CompanyType;
|
||||
use App\Models\Company;
|
||||
use Carbon\Carbon;
|
||||
use Maatwebsite\Excel\Concerns\Exportable;
|
||||
use Maatwebsite\Excel\Concerns\FromQuery;
|
||||
use Maatwebsite\Excel\Concerns\ShouldAutoSize;
|
||||
@@ -38,7 +39,8 @@ class ExportsCustomers implements FromQuery, WithHeadings, WithHeadingRow, WithM
|
||||
*/
|
||||
public function query()
|
||||
{
|
||||
return Company::where('business_type', '=', 2);
|
||||
return Company::where('business_type', '=', 2)
|
||||
->whereBetween('created_at', [Carbon::now()->subMonths(12), Carbon::now()]); //Limit, 'expensive' query;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -66,4 +68,4 @@ class ExportsCustomers implements FromQuery, WithHeadings, WithHeadingRow, WithM
|
||||
count($company->segments()->where('segment_id', '=', 5)->get()) ? 'Exchange 1.0' : 'Exchange 2.0'
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ use App\Models\Booking;
|
||||
use App\Models\Company;
|
||||
use App\Models\Transaction;
|
||||
use App\Models\Wallet;
|
||||
use Carbon\Carbon;
|
||||
use Maatwebsite\Excel\Concerns\Exportable;
|
||||
use Maatwebsite\Excel\Concerns\FromQuery;
|
||||
use Maatwebsite\Excel\Concerns\WithHeadingRow;
|
||||
@@ -26,7 +27,9 @@ class ExportsTransactions implements FromQuery, WithHeadingRow, WithMapping, Sho
|
||||
*/
|
||||
public function query()
|
||||
{
|
||||
return Transaction::whereIn('type', [TransactionType::PAYMENT, TransactionType::BILL])->where('owner_type', '!=',Wallet::class);
|
||||
return Transaction::whereBetween('created_at', [Carbon::now()->subMonths(1), Carbon::now()]) //Limit, 'expensive' query;
|
||||
->whereIn('type', [TransactionType::PAYMENT, TransactionType::BILL])
|
||||
->where('owner_type', '!=',Wallet::class);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -87,7 +90,7 @@ class ExportsTransactions implements FromQuery, WithHeadingRow, WithMapping, Sho
|
||||
$transaction->currency_rate,
|
||||
$transaction->tax,
|
||||
$transaction->service_charge,
|
||||
$transactionStatus[$transaction->status],
|
||||
isset($transactionStatus[$transaction->status]) ? $transactionStatus[$transaction->status] : 'Unknown Status',
|
||||
\PhpOffice\PhpSpreadsheet\Shared\Date::dateTimeToExcel($transaction->created_at),
|
||||
\PhpOffice\PhpSpreadsheet\Shared\Date::dateTimeToExcel($transaction->updated_at),
|
||||
// $marking
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class AddIndexToTransactions extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('transactions', function (Blueprint $table) {
|
||||
$table->index(['owner_id', 'owner_type', 'created_at', 'status'], 'idx_transactions_owner_date_status');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('transactions', function (Blueprint $table) {
|
||||
$table->dropIndex('idx_transactions_owner_date_status');
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -72,9 +72,9 @@
|
||||
this.submit(this.route('api.debtor.import'), 'post', this.section, true, false)
|
||||
},
|
||||
downloadReport(){
|
||||
let route = route('newDebtor.export');
|
||||
let url = route('newDebtor.export');
|
||||
if(window.LARAVEL_VAPOR_ENABLED){
|
||||
this.$store.dispatch('crudRequest', {endpoint: route, method: 'get'})
|
||||
this.$store.dispatch('crudRequest', {endpoint: url, method: 'get'})
|
||||
.then(response =>
|
||||
{
|
||||
let success = response.ok;
|
||||
@@ -88,7 +88,7 @@
|
||||
);
|
||||
}
|
||||
else{
|
||||
window.open(route, '_blank');
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
-1
@@ -124,7 +124,6 @@
|
||||
</list-component>
|
||||
|
||||
<!-- <list-polling-component ref="pendingOrdersList" section="pendingOrdersSection" :endpoint="route('api.transaction.list.job')" :options="{per_page: 5, status: 2, owner_type: 'App\\Models\\Booking', type: 1, original_currency_id_in: [selectedCurrency.id], transaction_service_id: selectedService.id, does_not_have_refund_in_progress: true}">
|
||||
<list-polling-component ref="pendingOrdersList" section="pendingOrdersSection" :endpoint="route('api.transaction.list.job')" :options="{per_page: 5, status: 2, owner_type: 'App\\Models\\Booking', is_not_fully_refunded: true, type: 1, original_currency_id_in: [selectedCurrency.id], transaction_service_id: selectedService.id}">
|
||||
<template slot="list" slot-scope="{data}">
|
||||
<supplier-pending-order-component :data="data" v-on:input="updateOrder($event)"></supplier-pending-order-component>
|
||||
</template>
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Site Under Maintenance</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
background-color: #f4f4f4;
|
||||
text-align: center;
|
||||
padding: 50px;
|
||||
}
|
||||
.content {
|
||||
background: white;
|
||||
padding: 20px;
|
||||
border-radius: 10px;
|
||||
display: inline-block;
|
||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="content">
|
||||
<h1>We'll be back soon!</h1>
|
||||
<p>Sorry for the inconvenience but we're performing some maintenance at the moment. We'll be back online shortly!</p>
|
||||
<p>— CIEF EXCHANGE</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -268,10 +268,8 @@
|
||||
<button class="btn btn-success btn-xs">Export Leads Data</button>
|
||||
</a> -->
|
||||
<div class="m-b-20">
|
||||
<open-link-in-new-tab-component custom-class="" :url="route('leads.export')">
|
||||
<button class="btn btn-success btn-xs">
|
||||
Export Leads Data
|
||||
</button>
|
||||
<open-link-in-new-tab-component custom-class="btn btn-primary btn-xs" :url="route('leads.export')">
|
||||
Export Leads Data
|
||||
</open-link-in-new-tab-component>
|
||||
</div>
|
||||
<list-component key="2" section="leadCustomerListSection" :endpoint="route('api.company.list')" :options="{'business_type': 2, with_bookings:true, without_confirmed_payments: true, does_not_have_segments: [5]}">
|
||||
|
||||
@@ -9,15 +9,57 @@
|
||||
<div class="col-md-6">
|
||||
<div class="card mb-3">
|
||||
<div class="card-body d-flex justify-content-between align-items-center">
|
||||
<span>customers.csv</span>
|
||||
<open-link-in-new-tab-component custom-class="btn btn-primary" :url="route('customer.export')">
|
||||
<div>
|
||||
<span>customers.csv</span>
|
||||
<p class="text-muted mb-0">(last 12 months)</p>
|
||||
</div>
|
||||
<open-link-in-new-tab-component custom-class="btn btn-primary" :url="route('customers.export')">
|
||||
<i class="fa fa-download"></i> Download
|
||||
</open-link-in-new-tab-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="card mb-3">
|
||||
<div class="card-body d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<span>transactions.csv</span>
|
||||
<p class="text-muted mb-0">(last 1 month)</p>
|
||||
</div>
|
||||
<open-link-in-new-tab-component custom-class="btn btn-primary" :url="route('transactions.export')">
|
||||
<i class="fa fa-download"></i> Download
|
||||
</open-link-in-new-tab-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="card mb-3">
|
||||
<div class="card-body d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<span>bookingData.csv</span>
|
||||
<p class="text-muted mb-0">(last 1 month)</p>
|
||||
</div>
|
||||
<open-link-in-new-tab-component custom-class="btn btn-primary" :url="route('bookingData.export')">
|
||||
<i class="fa fa-download"></i> Download
|
||||
</open-link-in-new-tab-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="card mb-3">
|
||||
<div class="card-body d-flex justify-content-between align-items-center">
|
||||
<span>billingData.csv</span>
|
||||
<open-link-in-new-tab-component custom-class="btn btn-primary" :url="route('billingData.export')">
|
||||
<i class="fa fa-download"></i> Download
|
||||
</open-link-in-new-tab-component>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Group 2: XXX Downloads -->
|
||||
|
||||
+4
-4
@@ -289,8 +289,8 @@ Route::get('billplz/bills/{bill_no}', function($bill_no){
|
||||
})->name('billplz.bill');
|
||||
|
||||
|
||||
Route::get('/export/customers/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@export')->name('customer.export');
|
||||
Route::get('/export/transactions/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@transactions');
|
||||
Route::get('/export/customers/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@export')->name('customers.export');
|
||||
Route::get('/export/transactions/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@transactions')->name('transactions.export');
|
||||
Route::get('/export/null-debtor/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@nullDebtor')->name('newDebtor.export');
|
||||
Route::get('/export/payment-transactions/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@paymentTransactions')->name('paymentTransactions.export');
|
||||
Route::get('/export/white-form-transactions/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@whiteFormTransactions')->name('whiteFormTransactions.export');
|
||||
@@ -300,8 +300,8 @@ Route::get('/export/invoice-transactions/f614e339d7058904a831aad742e24d55', 'Exp
|
||||
Route::get('/export/receipt-transactions/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@receiptTransactions')->name('receiptTransactions.export');
|
||||
Route::get('/export/imported-invoice-mapped', 'Exports\ExportCustomersToExcelController@importedInvoiceMapped')->name('importedInvoiceMapped.export');
|
||||
Route::get('/export/imported-receipt-mapped', 'Exports\ExportCustomersToExcelController@importedReceiptMapped')->name('importedReceiptMapped.export');
|
||||
Route::get('/export/analytic/booking', 'Exports\ExportAnalyticToExcelController@bookingData');
|
||||
Route::get('/export/analytic/bills', 'Exports\ExportAnalyticToExcelController@billingData');
|
||||
Route::get('/export/analytic/booking', 'Exports\ExportAnalyticToExcelController@bookingData')->name('bookingData.export');;
|
||||
Route::get('/export/analytic/bills', 'Exports\ExportAnalyticToExcelController@billingData')->name('billingData.export');;
|
||||
Route::get('/export/customers/leads', 'Exports\ExportCustomersToExcelController@leadsData')->name('leads.export');
|
||||
route::get('/export/excel/{id}', 'Exports\ExportCustomersToExcelController@exportCurrencyVendorOrder')->name('group.excel');
|
||||
|
||||
|
||||
@@ -11,8 +11,6 @@ environments:
|
||||
- exchange-high_priority-production
|
||||
database: cief-amazon-rds-mysql
|
||||
storage: exchange-2.0-production
|
||||
# gateway-version: 2
|
||||
# cache: vapor-laravel-poc-cache
|
||||
runtime: 'docker'
|
||||
timeout: 180
|
||||
build:
|
||||
@@ -20,13 +18,6 @@ environments:
|
||||
- 'npm install'
|
||||
- 'npm run prod'
|
||||
- 'gulp build'
|
||||
# - 'rm -rf node_modules'
|
||||
# - 'php artisan optimize'
|
||||
# # - 'php artisan config:clear'
|
||||
# - 'php artisan key:generate'
|
||||
# - 'php artisan config:cache'
|
||||
# - 'php artisan route:cache'
|
||||
# - 'php artisan view:cache'
|
||||
deploy:
|
||||
- 'php artisan migrate --force'
|
||||
staging:
|
||||
|
||||
Reference in New Issue
Block a user