Datatable server side
This commit is contained in:
parent
38619ca991
commit
5486e7cbbd
@ -56,12 +56,12 @@ class AdminDashboardController extends Controller
|
||||
$transaction = Transaction::whereMonth('updated_at', $bulan)
|
||||
->whereYear('updated_at', $currentYear)
|
||||
->where('status_pembayaran', 'settlement')
|
||||
->sum('total_bayar');
|
||||
->sum('total_bayar')/100;
|
||||
|
||||
$refund = Transaction::whereMonth('updated_at', $bulan)
|
||||
->whereYear('updated_at', $currentYear)
|
||||
->where('status_pembayaran', 'refund')
|
||||
->sum('total_harga');
|
||||
->sum('total_harga')/100;
|
||||
|
||||
$dataChartTransaction[] = intval($transaction);
|
||||
$dataChartRefund[] = intval($refund);
|
||||
|
@ -39,32 +39,30 @@ class AdminRefundController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
public function aprroveRefund($id)
|
||||
public function approveRefund(Request $request)
|
||||
{
|
||||
$transaction = Transaction::where('id', $id)->first();
|
||||
|
||||
$refund = Refund::where('transaction_id', $id)->first();
|
||||
$refund = Refund::where('id', $request->id)->first();
|
||||
|
||||
$params = [
|
||||
'refund_key' => $id . '-ref1',
|
||||
'amount' => $transaction->total_harga,
|
||||
'refund_key' => $request->id . '-ref1',
|
||||
'amount' => $refund->total,
|
||||
'reason' => $refund->complaint,
|
||||
];
|
||||
|
||||
// $refundMidtrans = Trans::refund($id, $params);
|
||||
// $refundMidtrans = Trans::refund($request->id, $params);
|
||||
|
||||
try {
|
||||
Transaction::where('id', $id)->update([
|
||||
Transaction::where('id', $refund->transaction_id)->update([
|
||||
'status_transaksi' => 'refund',
|
||||
'status_pembayaran' => 'refund'
|
||||
]);
|
||||
|
||||
Refund::where('transaction_id', $id)->update([
|
||||
Refund::where('id', $request->id)->update([
|
||||
'status' => 'refund',
|
||||
]);
|
||||
|
||||
TransactionDescription::create([
|
||||
'transcation_id' => $id,
|
||||
'transaction_id' => $refund->transaction_id,
|
||||
'status' => 'refund',
|
||||
'user' => auth()->user()->email,
|
||||
'judul' => 'fas fa-long-arrow-alt-left',
|
||||
@ -75,8 +73,8 @@ class AdminRefundController extends Controller
|
||||
DB::commit();
|
||||
|
||||
return response()->json([
|
||||
'status' => false,
|
||||
'message' => 'Refund berhasil dilakukan',
|
||||
'status' => true,
|
||||
'message' => 'Refund berhasil dilakukan. Uang akan dikembalikan ke pembeli.',
|
||||
// 'refundMidtrans' => $refundMidtrans,
|
||||
]);
|
||||
} catch (Throwable $e) {
|
||||
@ -92,25 +90,34 @@ class AdminRefundController extends Controller
|
||||
}
|
||||
}
|
||||
|
||||
public function denyRefund($id)
|
||||
public function denyRefund(Request $request)
|
||||
{
|
||||
$refund = Refund::where('id', $request->id)->first();
|
||||
|
||||
try {
|
||||
Transaction::where('id', $id)->update([
|
||||
Transaction::where('id', $refund->transaction_id)->update([
|
||||
'status_transaksi' => 'finished',
|
||||
'status_pembayaran' => 'settlement'
|
||||
]);
|
||||
|
||||
Refund::where('transaction_id', $id)->update([
|
||||
Refund::where('id', $request->id)->update([
|
||||
'status' => 'deny',
|
||||
]);
|
||||
|
||||
TransactionDescription::create([
|
||||
'transcation_id' => $id,
|
||||
'transaction_id' => $refund->transaction_id,
|
||||
'status' => 'deny',
|
||||
'user' => auth()->user()->email,
|
||||
'judul' => 'fas fa-long-arrow-alt-left',
|
||||
'judul' => 'fas fa-long-arrow-alt-right',
|
||||
'background' => 'bg-primary',
|
||||
'deskripsi' => 'Admin telah menyetujui refund.',
|
||||
'deskripsi' => 'Admin telah menolak refund. Transaksi akan diteruskan ke penjual',
|
||||
]);
|
||||
|
||||
DB::commit();
|
||||
|
||||
return response()->json([
|
||||
'status' => true,
|
||||
'message' => 'Refund berhasil ditolak. Transaksi diselesaikan dan uang disampaikan ke penjual.'
|
||||
]);
|
||||
} catch (Throwable $e) {
|
||||
DB::rollBack();
|
||||
|
@ -5,6 +5,10 @@ namespace App\Http\Controllers\Admin;
|
||||
use App\Models\User;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Yajra\DataTables\DataTables;
|
||||
use Throwable;
|
||||
|
||||
class AdminUserController extends Controller
|
||||
{
|
||||
@ -85,4 +89,56 @@ class AdminUserController extends Controller
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function listUser(Request $request)
|
||||
{
|
||||
try {
|
||||
$subQuery = User::where('role', 'User')
|
||||
->orderByRaw("CASE WHEN status = 'Progress' THEN 1 WHEN status = 'Finished' THEN 2 WHEN status = 'Rejected' THEN 3 ELSE 4 END ASC")
|
||||
->latest()
|
||||
->select('users.id', DB::raw("CONCAT(users.nama_depan, ' ', users.nama_belakang) as nama_lengkap"), 'users.email', 'users.foto_profile', 'users.status', 'users.created_at as tanggal_daftar');
|
||||
|
||||
if ($request->has('search') && !empty($request->search['value'])) {
|
||||
$searchUser = $request->search['value'];
|
||||
$subQuery->where(function ($a) use ($searchUser) {
|
||||
$a->whereRaw('email LIKE ?', ['%' . $searchUser . '%'])
|
||||
->orWhereRaw('nama_depan LIKE ?', ['%' . $searchUser . '%'])
|
||||
->orWhereRaw('nama_belakang LIKE ?', ['%' . $searchUser . '%']);
|
||||
});
|
||||
}
|
||||
|
||||
$queryUser = User::from(DB::raw("({$subQuery->toSql()}) as tmp"))
|
||||
->mergeBindings($subQuery->getQuery()) // Menggabungkan binding parameters
|
||||
->select('*')
|
||||
->get();
|
||||
|
||||
if ($request->ajax()) {
|
||||
return DataTables::of($queryUser)
|
||||
->addIndexColumn()
|
||||
->addColumn('action', function ($row) {
|
||||
$url = route('admin-user.show', ['id' => $row->id]);
|
||||
$html_code = '
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary dropdown-toggle"
|
||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
....
|
||||
</button>
|
||||
|
||||
<ul class="dropdown-menu">
|
||||
<li><a class="dropdown-item"
|
||||
href="'.$url.'">Detail</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>';
|
||||
return $html_code;
|
||||
})
|
||||
->rawColumns(['action'])
|
||||
->make(true);
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
Log::error($e->getMessage());
|
||||
|
||||
return response()->json(['success' => false, 'message' => 'Terjadi Kesalahan pada sisi server']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,6 +9,7 @@ use App\Models\Refund;
|
||||
use App\Models\RefundDescription;
|
||||
use App\Models\Transaction;
|
||||
use App\Models\TransactionDescription;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Throwable;
|
||||
@ -17,10 +18,12 @@ class UserRefundController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
$refunds = Refund::join('transactions', 'refunds.transaction_id', '=', 'transactions.id')
|
||||
->where('transactions.pembeli', auth()->user()->email)
|
||||
->get('refunds.*');
|
||||
|
||||
return view('user.refund.index', [
|
||||
'refunds' => Refund::join('transactions', 'refunds.transaction_id', '=', 'transactions.id')
|
||||
->where('transactions.pembeli', auth()->user()->email)
|
||||
->select()
|
||||
'refunds' => $refunds
|
||||
]);
|
||||
}
|
||||
|
||||
@ -29,19 +32,24 @@ class UserRefundController extends Controller
|
||||
return view('user.refund.new-refund',['id' => $id]);
|
||||
}
|
||||
|
||||
public function store(Request $request, $id){
|
||||
public function store(Request $request){
|
||||
$now = Carbon::now();
|
||||
$due_date = $now->addDays(2)->toDateTimeString();
|
||||
|
||||
try{
|
||||
DB::beginTransaction();
|
||||
|
||||
$transaction = Transaction::where('id',$id)->update([
|
||||
'status_transaksi' => 'refund',
|
||||
$transaction = Transaction::where('id',$request->id)->first();
|
||||
|
||||
Transaction::where('id', $request->id)->update([
|
||||
'status_transaksi' => 'refund'
|
||||
]);
|
||||
|
||||
$refund = Refund::create([
|
||||
'transaction_id' => $id,
|
||||
'transaction_id' => $request->id,
|
||||
'total' => $transaction->total_harga,
|
||||
'due_date' => $transaction,
|
||||
'complain' => $request->complain
|
||||
'due_date' => $due_date,
|
||||
'complaint' => $request->complaint
|
||||
]);
|
||||
|
||||
if ($request->hasFile('files')) {
|
||||
@ -68,7 +76,7 @@ class UserRefundController extends Controller
|
||||
}
|
||||
|
||||
TransactionDescription::create([
|
||||
'transcation_id' => $id,
|
||||
'transaction_id' => $request->id,
|
||||
'status' => 'pending',
|
||||
'user' => auth()->user()->email,
|
||||
'judul' => 'fas fa-clock',
|
||||
@ -77,6 +85,11 @@ class UserRefundController extends Controller
|
||||
]);
|
||||
|
||||
DB::commit();
|
||||
|
||||
return response()->json([
|
||||
'status' => true,
|
||||
'message' => 'Permintaan refund anda telah dikirim ke admin untuk direview. Mohon tunggu maksimal 2 hari.',
|
||||
]);
|
||||
}catch(Throwable $e){
|
||||
DB::rollback();
|
||||
|
||||
@ -88,7 +101,7 @@ class UserRefundController extends Controller
|
||||
|
||||
public function show($id){
|
||||
$refund = Refund::find($id);
|
||||
$refundDescription = RefundDescription::where($id)->get();
|
||||
$refundDescription = RefundDescription::where('refund_id',$id)->get();
|
||||
return view('user.refund.detail-refund',[
|
||||
'refund' => $refund,
|
||||
'descriptions' => $refundDescription
|
||||
|
@ -19,6 +19,7 @@ class Refund extends Model
|
||||
'total',
|
||||
'due_date',
|
||||
'status',
|
||||
'complaint'
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
|
@ -20,7 +20,8 @@
|
||||
"ramsey/uuid": "^4.7",
|
||||
"stichoza/google-translate-php": "^5.1",
|
||||
"thiagoalessio/tesseract_ocr": "^2.12",
|
||||
"tymon/jwt-auth": "^2.0"
|
||||
"tymon/jwt-auth": "^2.0",
|
||||
"yajra/laravel-datatables": "10.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"fakerphp/faker": "^1.9.1",
|
||||
|
586
composer.lock
generated
586
composer.lock
generated
@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "12fffdf5c68db05168e9385fccb5dec2",
|
||||
"content-hash": "8a11a96f5b3b33624cb77d7ee7c3dba7",
|
||||
"packages": [
|
||||
{
|
||||
"name": "brick/math",
|
||||
@ -1056,16 +1056,16 @@
|
||||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
"version": "v10.30.1",
|
||||
"version": "v10.31.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/framework.git",
|
||||
"reference": "7a2da50258c4d0f693b738d3f3c69b2693aea6c1"
|
||||
"reference": "507ce9b28bce4b5e4140c28943092ca38e9a52e4"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/7a2da50258c4d0f693b738d3f3c69b2693aea6c1",
|
||||
"reference": "7a2da50258c4d0f693b738d3f3c69b2693aea6c1",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/507ce9b28bce4b5e4140c28943092ca38e9a52e4",
|
||||
"reference": "507ce9b28bce4b5e4140c28943092ca38e9a52e4",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1254,7 +1254,7 @@
|
||||
"issues": "https://github.com/laravel/framework/issues",
|
||||
"source": "https://github.com/laravel/framework"
|
||||
},
|
||||
"time": "2023-11-01T13:52:17+00:00"
|
||||
"time": "2023-11-07T13:48:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/prompts",
|
||||
@ -1315,16 +1315,16 @@
|
||||
},
|
||||
{
|
||||
"name": "laravel/sanctum",
|
||||
"version": "v3.3.1",
|
||||
"version": "v3.3.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/sanctum.git",
|
||||
"reference": "338f633e6487e76b255470d3373fbc29228aa971"
|
||||
"reference": "e1a272893bec13cf135627f7e156030b3afe1e60"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/sanctum/zipball/338f633e6487e76b255470d3373fbc29228aa971",
|
||||
"reference": "338f633e6487e76b255470d3373fbc29228aa971",
|
||||
"url": "https://api.github.com/repos/laravel/sanctum/zipball/e1a272893bec13cf135627f7e156030b3afe1e60",
|
||||
"reference": "e1a272893bec13cf135627f7e156030b3afe1e60",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1377,7 +1377,7 @@
|
||||
"issues": "https://github.com/laravel/sanctum/issues",
|
||||
"source": "https://github.com/laravel/sanctum"
|
||||
},
|
||||
"time": "2023-09-07T15:46:33+00:00"
|
||||
"time": "2023-11-03T13:42:14+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/serializable-closure",
|
||||
@ -1920,16 +1920,16 @@
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem",
|
||||
"version": "3.18.0",
|
||||
"version": "3.19.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/flysystem.git",
|
||||
"reference": "015633a05aee22490495159237a5944091d8281e"
|
||||
"reference": "1b2aa10f2326e0351399b8ce68e287d8e9209a83"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/015633a05aee22490495159237a5944091d8281e",
|
||||
"reference": "015633a05aee22490495159237a5944091d8281e",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/1b2aa10f2326e0351399b8ce68e287d8e9209a83",
|
||||
"reference": "1b2aa10f2326e0351399b8ce68e287d8e9209a83",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -1994,7 +1994,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/thephpleague/flysystem/issues",
|
||||
"source": "https://github.com/thephpleague/flysystem/tree/3.18.0"
|
||||
"source": "https://github.com/thephpleague/flysystem/tree/3.19.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -2006,20 +2006,20 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-10-20T17:59:40+00:00"
|
||||
"time": "2023-11-07T09:04:28+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem-local",
|
||||
"version": "3.18.0",
|
||||
"version": "3.19.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/flysystem-local.git",
|
||||
"reference": "e7381ef7643f658b87efb7dbe98fe538fb1bbf32"
|
||||
"reference": "8d868217f9eeb4e9a7320db5ccad825e9a7a4076"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/e7381ef7643f658b87efb7dbe98fe538fb1bbf32",
|
||||
"reference": "e7381ef7643f658b87efb7dbe98fe538fb1bbf32",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem-local/zipball/8d868217f9eeb4e9a7320db5ccad825e9a7a4076",
|
||||
"reference": "8d868217f9eeb4e9a7320db5ccad825e9a7a4076",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -2054,7 +2054,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/thephpleague/flysystem-local/issues",
|
||||
"source": "https://github.com/thephpleague/flysystem-local/tree/3.18.0"
|
||||
"source": "https://github.com/thephpleague/flysystem-local/tree/3.19.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -2066,7 +2066,77 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-10-19T20:07:13+00:00"
|
||||
"time": "2023-11-06T20:35:28+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/fractal",
|
||||
"version": "0.20.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/fractal.git",
|
||||
"reference": "8b9d39b67624db9195c06f9c1ffd0355151eaf62"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/fractal/zipball/8b9d39b67624db9195c06f9c1ffd0355151eaf62",
|
||||
"reference": "8b9d39b67624db9195c06f9c1ffd0355151eaf62",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.4"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/orm": "^2.5",
|
||||
"illuminate/contracts": "~5.0",
|
||||
"mockery/mockery": "^1.3",
|
||||
"pagerfanta/pagerfanta": "~1.0.0",
|
||||
"phpstan/phpstan": "^1.4",
|
||||
"phpunit/phpunit": "^9.5",
|
||||
"squizlabs/php_codesniffer": "~3.4",
|
||||
"vimeo/psalm": "^4.22",
|
||||
"zendframework/zend-paginator": "~2.3"
|
||||
},
|
||||
"suggest": {
|
||||
"illuminate/pagination": "The Illuminate Pagination component.",
|
||||
"pagerfanta/pagerfanta": "Pagerfanta Paginator",
|
||||
"zendframework/zend-paginator": "Zend Framework Paginator"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "0.20.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"League\\Fractal\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Phil Sturgeon",
|
||||
"email": "me@philsturgeon.uk",
|
||||
"homepage": "http://philsturgeon.uk/",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"description": "Handle the output of complex data structures ready for API output.",
|
||||
"homepage": "http://fractal.thephpleague.com/",
|
||||
"keywords": [
|
||||
"api",
|
||||
"json",
|
||||
"league",
|
||||
"rest"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/thephpleague/fractal/issues",
|
||||
"source": "https://github.com/thephpleague/fractal/tree/0.20.1"
|
||||
},
|
||||
"time": "2022-04-11T12:47:17+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/mime-type-detection",
|
||||
@ -3520,16 +3590,16 @@
|
||||
},
|
||||
{
|
||||
"name": "ramsey/uuid",
|
||||
"version": "4.7.4",
|
||||
"version": "4.7.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/ramsey/uuid.git",
|
||||
"reference": "60a4c63ab724854332900504274f6150ff26d286"
|
||||
"reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/ramsey/uuid/zipball/60a4c63ab724854332900504274f6150ff26d286",
|
||||
"reference": "60a4c63ab724854332900504274f6150ff26d286",
|
||||
"url": "https://api.github.com/repos/ramsey/uuid/zipball/5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e",
|
||||
"reference": "5f0df49ae5ad6efb7afa69e6bfab4e5b1e080d8e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -3596,7 +3666,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/ramsey/uuid/issues",
|
||||
"source": "https://github.com/ramsey/uuid/tree/4.7.4"
|
||||
"source": "https://github.com/ramsey/uuid/tree/4.7.5"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -3608,7 +3678,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2023-04-15T23:01:58+00:00"
|
||||
"time": "2023-11-08T05:53:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "stella-maris/clock",
|
||||
@ -6389,6 +6459,446 @@
|
||||
"source": "https://github.com/webmozarts/assert/tree/1.11.0"
|
||||
},
|
||||
"time": "2022-06-03T18:03:27+00:00"
|
||||
},
|
||||
{
|
||||
"name": "yajra/laravel-datatables",
|
||||
"version": "v10.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/yajra/datatables.git",
|
||||
"reference": "5a65f1b611a53a07530915619869ec87dcb823ad"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/yajra/datatables/zipball/5a65f1b611a53a07530915619869ec87dcb823ad",
|
||||
"reference": "5a65f1b611a53a07530915619869ec87dcb823ad",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^8.1",
|
||||
"yajra/laravel-datatables-buttons": "^10",
|
||||
"yajra/laravel-datatables-editor": "1.*",
|
||||
"yajra/laravel-datatables-fractal": "^10",
|
||||
"yajra/laravel-datatables-html": "^10",
|
||||
"yajra/laravel-datatables-oracle": "^10"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "10.0-dev"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Arjay Angeles",
|
||||
"email": "aqangeles@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Laravel DataTables Complete Package.",
|
||||
"keywords": [
|
||||
"datatables",
|
||||
"jquery",
|
||||
"laravel"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/yajra/datatables/issues",
|
||||
"source": "https://github.com/yajra/datatables/tree/v10.0.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/sponsors/yajra",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-02-07T09:44:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "yajra/laravel-datatables-buttons",
|
||||
"version": "v10.0.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/yajra/laravel-datatables-buttons.git",
|
||||
"reference": "f43f6eb501af2fbbb78d2b2985a9da992af768bd"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/yajra/laravel-datatables-buttons/zipball/f43f6eb501af2fbbb78d2b2985a9da992af768bd",
|
||||
"reference": "f43f6eb501af2fbbb78d2b2985a9da992af768bd",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/console": "^10",
|
||||
"php": "^8.1",
|
||||
"yajra/laravel-datatables-html": "^10",
|
||||
"yajra/laravel-datatables-oracle": "^10"
|
||||
},
|
||||
"require-dev": {
|
||||
"barryvdh/laravel-snappy": "^1.0.1",
|
||||
"maatwebsite/excel": "^3.1.46",
|
||||
"nunomaduro/larastan": "^2.4",
|
||||
"orchestra/testbench": "^8",
|
||||
"rap2hpoutre/fast-excel": "^5.1"
|
||||
},
|
||||
"suggest": {
|
||||
"barryvdh/laravel-snappy": "Allows exporting of dataTable to PDF using the print view.",
|
||||
"dompdf/dompdf": "Allows exporting of dataTable to PDF using the DomPDF.",
|
||||
"maatwebsite/excel": "Exporting of dataTables (excel, csv and PDF) using maatwebsite package.",
|
||||
"rap2hpoutre/fast-excel": "Faster exporting of dataTables using fast-excel package.",
|
||||
"yajra/laravel-datatables-export": "Exporting of dataTables (excel, csv and PDF) via livewire and queue worker."
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "10.0-dev"
|
||||
},
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Yajra\\DataTables\\ButtonsServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Yajra\\DataTables\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Arjay Angeles",
|
||||
"email": "aqangeles@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Laravel DataTables Buttons Plugin.",
|
||||
"keywords": [
|
||||
"buttons",
|
||||
"datatables",
|
||||
"jquery",
|
||||
"laravel"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/yajra/laravel-datatables-buttons/issues",
|
||||
"source": "https://github.com/yajra/laravel-datatables-buttons/tree/v10.0.7"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/sponsors/yajra",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-07-31T03:19:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "yajra/laravel-datatables-editor",
|
||||
"version": "v1.25.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/yajra/laravel-datatables-editor.git",
|
||||
"reference": "23962356700d6b31f49bb119665b13e87303e13f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/yajra/laravel-datatables-editor/zipball/23962356700d6b31f49bb119665b13e87303e13f",
|
||||
"reference": "23962356700d6b31f49bb119665b13e87303e13f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/console": "*",
|
||||
"illuminate/database": "*",
|
||||
"illuminate/http": "*",
|
||||
"illuminate/validation": "*",
|
||||
"php": ">=7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"orchestra/testbench": "~3.5"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.0-dev"
|
||||
},
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Yajra\\DataTables\\EditorServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Yajra\\DataTables\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Arjay Angeles",
|
||||
"email": "aqangeles@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Laravel DataTables Editor plugin for Laravel 5.5+.",
|
||||
"keywords": [
|
||||
"JS",
|
||||
"datatables",
|
||||
"editor",
|
||||
"html",
|
||||
"jquery",
|
||||
"laravel"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/yajra/laravel-datatables-editor/issues",
|
||||
"source": "https://github.com/yajra/laravel-datatables-editor/tree/v1.25.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://www.paypal.me/yajra",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/yajra",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://www.patreon.com/yajra",
|
||||
"type": "patreon"
|
||||
}
|
||||
],
|
||||
"time": "2023-02-21T06:57:59+00:00"
|
||||
},
|
||||
{
|
||||
"name": "yajra/laravel-datatables-fractal",
|
||||
"version": "v10.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/yajra/laravel-datatables-fractal.git",
|
||||
"reference": "765198d1f2b3f0a7c0c00f08ee41ba11be4ab1e2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/yajra/laravel-datatables-fractal/zipball/765198d1f2b3f0a7c0c00f08ee41ba11be4ab1e2",
|
||||
"reference": "765198d1f2b3f0a7c0c00f08ee41ba11be4ab1e2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"league/fractal": "^0.20.1",
|
||||
"php": "^8.1",
|
||||
"yajra/laravel-datatables-oracle": "^10.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"nunomaduro/larastan": "^2.4",
|
||||
"orchestra/testbench": "^7.21"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "10.0-dev"
|
||||
},
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Yajra\\DataTables\\FractalServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Yajra\\DataTables\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Arjay Angeles",
|
||||
"email": "aqangeles@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Laravel DataTables Fractal Plugin.",
|
||||
"keywords": [
|
||||
"api",
|
||||
"datatables",
|
||||
"fractal",
|
||||
"laravel"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/yajra/laravel-datatables-fractal/issues",
|
||||
"source": "https://github.com/yajra/laravel-datatables-fractal/tree/v10.0.0"
|
||||
},
|
||||
"time": "2023-02-07T03:46:04+00:00"
|
||||
},
|
||||
{
|
||||
"name": "yajra/laravel-datatables-html",
|
||||
"version": "v10.11.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/yajra/laravel-datatables-html.git",
|
||||
"reference": "f1154f4ba0c3d228ec70a965315a471e57ca57f2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/yajra/laravel-datatables-html/zipball/f1154f4ba0c3d228ec70a965315a471e57ca57f2",
|
||||
"reference": "f1154f4ba0c3d228ec70a965315a471e57ca57f2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"php": "^8.1",
|
||||
"yajra/laravel-datatables-oracle": "^10.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"nunomaduro/larastan": "^2.4",
|
||||
"orchestra/testbench": "^7.21"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "10.0-dev"
|
||||
},
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Yajra\\DataTables\\HtmlServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Yajra\\DataTables\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Arjay Angeles",
|
||||
"email": "aqangeles@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Laravel DataTables HTML builder plugin for Laravel 5.4+.",
|
||||
"keywords": [
|
||||
"JS",
|
||||
"datatables",
|
||||
"html",
|
||||
"jquery",
|
||||
"laravel"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/yajra/laravel-datatables-html/issues",
|
||||
"source": "https://github.com/yajra/laravel-datatables-html/tree/v10.11.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://www.paypal.me/yajra",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/yajra",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://www.patreon.com/yajra",
|
||||
"type": "patreon"
|
||||
}
|
||||
],
|
||||
"time": "2023-11-06T05:50:47+00:00"
|
||||
},
|
||||
{
|
||||
"name": "yajra/laravel-datatables-oracle",
|
||||
"version": "v10.11.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/yajra/laravel-datatables.git",
|
||||
"reference": "6badd623d6352284a926de604b55db881057ca67"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/yajra/laravel-datatables/zipball/6badd623d6352284a926de604b55db881057ca67",
|
||||
"reference": "6badd623d6352284a926de604b55db881057ca67",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/database": "^9|^10",
|
||||
"illuminate/filesystem": "^9|^10",
|
||||
"illuminate/http": "^9|^10",
|
||||
"illuminate/support": "^9|^10",
|
||||
"illuminate/view": "^9|^10",
|
||||
"php": "^8.0.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"algolia/algoliasearch-client-php": "^3.4",
|
||||
"laravel/scout": "^10.5",
|
||||
"meilisearch/meilisearch-php": "^1.4",
|
||||
"nunomaduro/larastan": "^2.4",
|
||||
"orchestra/testbench": "^8",
|
||||
"yajra/laravel-datatables-html": "^9.3.4|^10"
|
||||
},
|
||||
"suggest": {
|
||||
"yajra/laravel-datatables-buttons": "Plugin for server-side exporting of dataTables.",
|
||||
"yajra/laravel-datatables-editor": "Plugin to use DataTables Editor (requires a license).",
|
||||
"yajra/laravel-datatables-export": "Plugin for server-side exporting using livewire and queue worker.",
|
||||
"yajra/laravel-datatables-fractal": "Plugin for server-side response using Fractal.",
|
||||
"yajra/laravel-datatables-html": "Plugin for server-side HTML builder of dataTables."
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "10.x-dev"
|
||||
},
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Yajra\\DataTables\\DataTablesServiceProvider"
|
||||
],
|
||||
"aliases": {
|
||||
"DataTables": "Yajra\\DataTables\\Facades\\DataTables"
|
||||
}
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"files": [
|
||||
"src/helper.php"
|
||||
],
|
||||
"psr-4": {
|
||||
"Yajra\\DataTables\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Arjay Angeles",
|
||||
"email": "aqangeles@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "jQuery DataTables API for Laravel 4|5|6|7|8|9|10",
|
||||
"keywords": [
|
||||
"datatables",
|
||||
"jquery",
|
||||
"laravel"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/yajra/laravel-datatables/issues",
|
||||
"source": "https://github.com/yajra/laravel-datatables/tree/v10.11.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://github.com/sponsors/yajra",
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2023-11-04T01:21:13+00:00"
|
||||
}
|
||||
],
|
||||
"packages-dev": [
|
||||
@ -6584,16 +7094,16 @@
|
||||
},
|
||||
{
|
||||
"name": "laravel/pint",
|
||||
"version": "v1.13.5",
|
||||
"version": "v1.13.6",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/pint.git",
|
||||
"reference": "df105cf8ce7a8f0b8a9425ff45cd281a5448e423"
|
||||
"reference": "3e3d2ab01c7d8b484c18e6100ecf53639c744fa7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/pint/zipball/df105cf8ce7a8f0b8a9425ff45cd281a5448e423",
|
||||
"reference": "df105cf8ce7a8f0b8a9425ff45cd281a5448e423",
|
||||
"url": "https://api.github.com/repos/laravel/pint/zipball/3e3d2ab01c7d8b484c18e6100ecf53639c744fa7",
|
||||
"reference": "3e3d2ab01c7d8b484c18e6100ecf53639c744fa7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@ -6604,13 +7114,13 @@
|
||||
"php": "^8.1.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "^3.34.1",
|
||||
"illuminate/view": "^10.26.2",
|
||||
"laravel-zero/framework": "^10.1.2",
|
||||
"friendsofphp/php-cs-fixer": "^3.38.0",
|
||||
"illuminate/view": "^10.30.1",
|
||||
"laravel-zero/framework": "^10.3.0",
|
||||
"mockery/mockery": "^1.6.6",
|
||||
"nunomaduro/larastan": "^2.6.4",
|
||||
"nunomaduro/termwind": "^1.15.1",
|
||||
"pestphp/pest": "^2.20.0"
|
||||
"pestphp/pest": "^2.24.2"
|
||||
},
|
||||
"bin": [
|
||||
"builds/pint"
|
||||
@ -6646,7 +7156,7 @@
|
||||
"issues": "https://github.com/laravel/pint/issues",
|
||||
"source": "https://github.com/laravel/pint"
|
||||
},
|
||||
"time": "2023-10-26T09:26:10+00:00"
|
||||
"time": "2023-11-07T17:59:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/sail",
|
||||
|
91
config/datatables-buttons.php
Normal file
91
config/datatables-buttons.php
Normal file
@ -0,0 +1,91 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
/*
|
||||
* Namespaces used by the generator.
|
||||
*/
|
||||
'namespace' => [
|
||||
/*
|
||||
* Base namespace/directory to create the new file.
|
||||
* This is appended on default Laravel namespace.
|
||||
* Usage: php artisan datatables:make User
|
||||
* Output: App\DataTables\UserDataTable
|
||||
* With Model: App\User (default model)
|
||||
* Export filename: users_timestamp
|
||||
*/
|
||||
'base' => 'DataTables',
|
||||
|
||||
/*
|
||||
* Base namespace/directory where your model's are located.
|
||||
* This is appended on default Laravel namespace.
|
||||
* Usage: php artisan datatables:make Post --model
|
||||
* Output: App\DataTables\PostDataTable
|
||||
* With Model: App\Post
|
||||
* Export filename: posts_timestamp
|
||||
*/
|
||||
'model' => 'App\\Models',
|
||||
],
|
||||
|
||||
/*
|
||||
* Set Custom stub folder
|
||||
*/
|
||||
//'stub' => '/resources/custom_stub',
|
||||
|
||||
/*
|
||||
* PDF generator to be used when converting the table to pdf.
|
||||
* Available generators: excel, snappy
|
||||
* Snappy package: barryvdh/laravel-snappy
|
||||
* Excel package: maatwebsite/excel
|
||||
*/
|
||||
'pdf_generator' => 'snappy',
|
||||
|
||||
/*
|
||||
* Snappy PDF options.
|
||||
*/
|
||||
'snappy' => [
|
||||
'options' => [
|
||||
'no-outline' => true,
|
||||
'margin-left' => '0',
|
||||
'margin-right' => '0',
|
||||
'margin-top' => '10mm',
|
||||
'margin-bottom' => '10mm',
|
||||
],
|
||||
'orientation' => 'landscape',
|
||||
],
|
||||
|
||||
/*
|
||||
* Default html builder parameters.
|
||||
*/
|
||||
'parameters' => [
|
||||
'dom' => 'Bfrtip',
|
||||
'order' => [[0, 'desc']],
|
||||
'buttons' => [
|
||||
'excel',
|
||||
'csv',
|
||||
'pdf',
|
||||
'print',
|
||||
'reset',
|
||||
'reload',
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
* Generator command default options value.
|
||||
*/
|
||||
'generator' => [
|
||||
/*
|
||||
* Default columns to generate when not set.
|
||||
*/
|
||||
'columns' => 'id,add your columns,created_at,updated_at',
|
||||
|
||||
/*
|
||||
* Default buttons to generate when not set.
|
||||
*/
|
||||
'buttons' => 'excel,csv,pdf,print,reset,reload',
|
||||
|
||||
/*
|
||||
* Default DOM to generate when not set.
|
||||
*/
|
||||
'dom' => 'Bfrtip',
|
||||
],
|
||||
];
|
13
config/datatables-fractal.php
Normal file
13
config/datatables-fractal.php
Normal file
@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
/*
|
||||
* Request key name to parse includes on fractal.
|
||||
*/
|
||||
'includes' => 'include',
|
||||
|
||||
/*
|
||||
* Default fractal serializer.
|
||||
*/
|
||||
'serializer' => League\Fractal\Serializer\DataArraySerializer::class,
|
||||
];
|
27
config/datatables-html.php
Normal file
27
config/datatables-html.php
Normal file
@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
/*
|
||||
* DataTables JavaScript global namespace.
|
||||
*/
|
||||
|
||||
'namespace' => 'LaravelDataTables',
|
||||
|
||||
/*
|
||||
* Default table attributes when generating the table.
|
||||
*/
|
||||
'table' => [
|
||||
'class' => 'table',
|
||||
'id' => 'dataTableBuilder',
|
||||
],
|
||||
|
||||
/*
|
||||
* Html builder script template.
|
||||
*/
|
||||
'script' => 'datatables::script',
|
||||
|
||||
/*
|
||||
* Html builder script template for DataTables Editor integration.
|
||||
*/
|
||||
'editor' => 'datatables::editor',
|
||||
];
|
127
config/datatables.php
Normal file
127
config/datatables.php
Normal file
@ -0,0 +1,127 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
/*
|
||||
* DataTables search options.
|
||||
*/
|
||||
'search' => [
|
||||
/*
|
||||
* Smart search will enclose search keyword with wildcard string "%keyword%".
|
||||
* SQL: column LIKE "%keyword%"
|
||||
*/
|
||||
'smart' => true,
|
||||
|
||||
/*
|
||||
* Multi-term search will explode search keyword using spaces resulting into multiple term search.
|
||||
*/
|
||||
'multi_term' => true,
|
||||
|
||||
/*
|
||||
* Case insensitive will search the keyword in lower case format.
|
||||
* SQL: LOWER(column) LIKE LOWER(keyword)
|
||||
*/
|
||||
'case_insensitive' => true,
|
||||
|
||||
/*
|
||||
* Wild card will add "%" in between every characters of the keyword.
|
||||
* SQL: column LIKE "%k%e%y%w%o%r%d%"
|
||||
*/
|
||||
'use_wildcards' => false,
|
||||
|
||||
/*
|
||||
* Perform a search which starts with the given keyword.
|
||||
* SQL: column LIKE "keyword%"
|
||||
*/
|
||||
'starts_with' => false,
|
||||
],
|
||||
|
||||
/*
|
||||
* DataTables internal index id response column name.
|
||||
*/
|
||||
'index_column' => 'DT_RowIndex',
|
||||
|
||||
/*
|
||||
* List of available builders for DataTables.
|
||||
* This is where you can register your custom dataTables builder.
|
||||
*/
|
||||
'engines' => [
|
||||
'eloquent' => Yajra\DataTables\EloquentDataTable::class,
|
||||
'query' => Yajra\DataTables\QueryDataTable::class,
|
||||
'collection' => Yajra\DataTables\CollectionDataTable::class,
|
||||
'resource' => Yajra\DataTables\ApiResourceDataTable::class,
|
||||
],
|
||||
|
||||
/*
|
||||
* DataTables accepted builder to engine mapping.
|
||||
* This is where you can override which engine a builder should use
|
||||
* Note, only change this if you know what you are doing!
|
||||
*/
|
||||
'builders' => [
|
||||
//Illuminate\Database\Eloquent\Relations\Relation::class => 'eloquent',
|
||||
//Illuminate\Database\Eloquent\Builder::class => 'eloquent',
|
||||
//Illuminate\Database\Query\Builder::class => 'query',
|
||||
//Illuminate\Support\Collection::class => 'collection',
|
||||
],
|
||||
|
||||
/*
|
||||
* Nulls last sql pattern for PostgreSQL & Oracle.
|
||||
* For MySQL, use 'CASE WHEN :column IS NULL THEN 1 ELSE 0 END, :column :direction'
|
||||
*/
|
||||
'nulls_last_sql' => ':column :direction NULLS LAST',
|
||||
|
||||
/*
|
||||
* User friendly message to be displayed on user if error occurs.
|
||||
* Possible values:
|
||||
* null - The exception message will be used on error response.
|
||||
* 'throw' - Throws a \Yajra\DataTables\Exceptions\Exception. Use your custom error handler if needed.
|
||||
* 'custom message' - Any friendly message to be displayed to the user. You can also use translation key.
|
||||
*/
|
||||
'error' => env('DATATABLES_ERROR', null),
|
||||
|
||||
/*
|
||||
* Default columns definition of dataTable utility functions.
|
||||
*/
|
||||
'columns' => [
|
||||
/*
|
||||
* List of columns hidden/removed on json response.
|
||||
*/
|
||||
'excess' => ['rn', 'row_num'],
|
||||
|
||||
/*
|
||||
* List of columns to be escaped. If set to *, all columns are escape.
|
||||
* Note: You can set the value to empty array to disable XSS protection.
|
||||
*/
|
||||
'escape' => '*',
|
||||
|
||||
/*
|
||||
* List of columns that are allowed to display html content.
|
||||
* Note: Adding columns to list will make us available to XSS attacks.
|
||||
*/
|
||||
'raw' => ['action'],
|
||||
|
||||
/*
|
||||
* List of columns are forbidden from being searched/sorted.
|
||||
*/
|
||||
'blacklist' => ['password', 'remember_token'],
|
||||
|
||||
/*
|
||||
* List of columns that are only allowed fo search/sort.
|
||||
* If set to *, all columns are allowed.
|
||||
*/
|
||||
'whitelist' => '*',
|
||||
],
|
||||
|
||||
/*
|
||||
* JsonResponse header and options config.
|
||||
*/
|
||||
'json' => [
|
||||
'header' => [],
|
||||
'options' => 0,
|
||||
],
|
||||
|
||||
/*
|
||||
* Default condition to determine if a parameter is a callback or not.
|
||||
* Callbacks needs to start by those terms, or they will be cast to string.
|
||||
*/
|
||||
'callback' => ['$', '$.', 'function'],
|
||||
];
|
284
public/vendor/datatables/buttons.server-side.js
vendored
Normal file
284
public/vendor/datatables/buttons.server-side.js
vendored
Normal file
@ -0,0 +1,284 @@
|
||||
(function ($, DataTable) {
|
||||
"use strict";
|
||||
|
||||
var _buildParams = function (dt, action, onlyVisibles) {
|
||||
var params = dt.ajax.params();
|
||||
params.action = action;
|
||||
params._token = $('meta[name="csrf-token"]').attr('content');
|
||||
|
||||
if (onlyVisibles) {
|
||||
params.visible_columns = _getVisibleColumns();
|
||||
} else {
|
||||
params.visible_columns = null;
|
||||
}
|
||||
|
||||
return params;
|
||||
};
|
||||
|
||||
var _getVisibleColumns = function () {
|
||||
|
||||
var visible_columns = [];
|
||||
$.each(DataTable.settings[0].aoColumns, function (key, col) {
|
||||
if (col.bVisible) {
|
||||
visible_columns.push(col.name);
|
||||
}
|
||||
});
|
||||
|
||||
return visible_columns;
|
||||
};
|
||||
|
||||
var _downloadFromUrl = function (url, params) {
|
||||
var postUrl = url + '/export';
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('POST', postUrl, true);
|
||||
xhr.responseType = 'arraybuffer';
|
||||
xhr.onload = function () {
|
||||
if (this.status === 200) {
|
||||
var filename = "";
|
||||
var disposition = xhr.getResponseHeader('Content-Disposition');
|
||||
if (disposition && disposition.indexOf('attachment') !== -1) {
|
||||
var filenameRegex = /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/;
|
||||
var matches = filenameRegex.exec(disposition);
|
||||
if (matches != null && matches[1]) filename = matches[1].replace(/['"]/g, '');
|
||||
}
|
||||
var type = xhr.getResponseHeader('Content-Type');
|
||||
|
||||
var blob = new Blob([this.response], {type: type});
|
||||
if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
||||
// IE workaround for "HTML7007: One or more blob URLs were revoked by closing the blob for which they were created. These URLs will no longer resolve as the data backing the URL has been freed."
|
||||
window.navigator.msSaveBlob(blob, filename);
|
||||
} else {
|
||||
var URL = window.URL || window.webkitURL;
|
||||
var downloadUrl = URL.createObjectURL(blob);
|
||||
|
||||
if (filename) {
|
||||
// use HTML5 a[download] attribute to specify filename
|
||||
var a = document.createElement("a");
|
||||
// safari doesn't support this yet
|
||||
if (typeof a.download === 'undefined') {
|
||||
window.location = downloadUrl;
|
||||
} else {
|
||||
a.href = downloadUrl;
|
||||
a.download = filename;
|
||||
document.body.appendChild(a);
|
||||
a.click();
|
||||
}
|
||||
} else {
|
||||
window.location = downloadUrl;
|
||||
}
|
||||
|
||||
setTimeout(function () {
|
||||
URL.revokeObjectURL(downloadUrl);
|
||||
}, 100); // cleanup
|
||||
}
|
||||
}
|
||||
};
|
||||
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
|
||||
xhr.send($.param(params));
|
||||
};
|
||||
|
||||
var _buildUrl = function(dt, action) {
|
||||
var url = dt.ajax.url() || '';
|
||||
var params = dt.ajax.params();
|
||||
params.action = action;
|
||||
|
||||
if (url.indexOf('?') > -1) {
|
||||
return url + '&' + $.param(params);
|
||||
}
|
||||
|
||||
return url + '?' + $.param(params);
|
||||
};
|
||||
|
||||
DataTable.ext.buttons.excel = {
|
||||
className: 'buttons-excel',
|
||||
|
||||
text: function (dt) {
|
||||
return '<i class="fa fa-file-excel-o"></i> ' + dt.i18n('buttons.excel', 'Excel');
|
||||
},
|
||||
|
||||
action: function (e, dt, button, config) {
|
||||
var url = _buildUrl(dt, 'excel');
|
||||
window.location = url;
|
||||
}
|
||||
};
|
||||
|
||||
DataTable.ext.buttons.postExcel = {
|
||||
className: 'buttons-excel',
|
||||
|
||||
text: function (dt) {
|
||||
return '<i class="fa fa-file-excel-o"></i> ' + dt.i18n('buttons.excel', 'Excel');
|
||||
},
|
||||
|
||||
action: function (e, dt, button, config) {
|
||||
var url = dt.ajax.url() || window.location.href;
|
||||
var params = _buildParams(dt, 'excel');
|
||||
|
||||
_downloadFromUrl(url, params);
|
||||
}
|
||||
};
|
||||
|
||||
DataTable.ext.buttons.postExcelVisibleColumns = {
|
||||
className: 'buttons-excel',
|
||||
|
||||
text: function (dt) {
|
||||
return '<i class="fa fa-file-excel-o"></i> ' + dt.i18n('buttons.excel', 'Excel (only visible columns)');
|
||||
},
|
||||
|
||||
action: function (e, dt, button, config) {
|
||||
var url = dt.ajax.url() || window.location.href;
|
||||
var params = _buildParams(dt, 'excel', true);
|
||||
|
||||
_downloadFromUrl(url, params);
|
||||
}
|
||||
};
|
||||
|
||||
DataTable.ext.buttons.export = {
|
||||
extend: 'collection',
|
||||
|
||||
className: 'buttons-export',
|
||||
|
||||
text: function (dt) {
|
||||
return '<i class="fa fa-download"></i> ' + dt.i18n('buttons.export', 'Export') + ' <span class="caret"/>';
|
||||
},
|
||||
|
||||
buttons: ['csv', 'excel', 'pdf']
|
||||
};
|
||||
|
||||
DataTable.ext.buttons.csv = {
|
||||
className: 'buttons-csv',
|
||||
|
||||
text: function (dt) {
|
||||
return '<i class="fa fa-file-excel-o"></i> ' + dt.i18n('buttons.csv', 'CSV');
|
||||
},
|
||||
|
||||
action: function (e, dt, button, config) {
|
||||
var url = _buildUrl(dt, 'csv');
|
||||
window.location = url;
|
||||
}
|
||||
};
|
||||
|
||||
DataTable.ext.buttons.postCsvVisibleColumns = {
|
||||
className: 'buttons-csv',
|
||||
|
||||
text: function (dt) {
|
||||
return '<i class="fa fa-file-excel-o"></i> ' + dt.i18n('buttons.csv', 'CSV (only visible columns)');
|
||||
},
|
||||
|
||||
action: function (e, dt, button, config) {
|
||||
var url = dt.ajax.url() || window.location.href;
|
||||
var params = _buildParams(dt, 'csv', true);
|
||||
|
||||
_downloadFromUrl(url, params);
|
||||
}
|
||||
};
|
||||
|
||||
DataTable.ext.buttons.postCsv = {
|
||||
className: 'buttons-csv',
|
||||
|
||||
text: function (dt) {
|
||||
return '<i class="fa fa-file-excel-o"></i> ' + dt.i18n('buttons.csv', 'CSV');
|
||||
},
|
||||
|
||||
action: function (e, dt, button, config) {
|
||||
var url = dt.ajax.url() || window.location.href;
|
||||
var params = _buildParams(dt, 'csv');
|
||||
|
||||
_downloadFromUrl(url, params);
|
||||
}
|
||||
};
|
||||
|
||||
DataTable.ext.buttons.pdf = {
|
||||
className: 'buttons-pdf',
|
||||
|
||||
text: function (dt) {
|
||||
return '<i class="fa fa-file-pdf-o"></i> ' + dt.i18n('buttons.pdf', 'PDF');
|
||||
},
|
||||
|
||||
action: function (e, dt, button, config) {
|
||||
var url = _buildUrl(dt, 'pdf');
|
||||
window.location = url;
|
||||
}
|
||||
};
|
||||
|
||||
DataTable.ext.buttons.postPdf = {
|
||||
className: 'buttons-pdf',
|
||||
|
||||
text: function (dt) {
|
||||
return '<i class="fa fa-file-pdf-o"></i> ' + dt.i18n('buttons.pdf', 'PDF');
|
||||
},
|
||||
|
||||
action: function (e, dt, button, config) {
|
||||
var url = dt.ajax.url() || window.location.href;
|
||||
var params = _buildParams(dt, 'pdf');
|
||||
|
||||
_downloadFromUrl(url, params);
|
||||
}
|
||||
};
|
||||
|
||||
DataTable.ext.buttons.print = {
|
||||
className: 'buttons-print',
|
||||
|
||||
text: function (dt) {
|
||||
return '<i class="fa fa-print"></i> ' + dt.i18n('buttons.print', 'Print');
|
||||
},
|
||||
|
||||
action: function (e, dt, button, config) {
|
||||
var url = _buildUrl(dt, 'print');
|
||||
window.location = url;
|
||||
}
|
||||
};
|
||||
|
||||
DataTable.ext.buttons.reset = {
|
||||
className: 'buttons-reset',
|
||||
|
||||
text: function (dt) {
|
||||
return '<i class="fa fa-undo"></i> ' + dt.i18n('buttons.reset', 'Reset');
|
||||
},
|
||||
|
||||
action: function (e, dt, button, config) {
|
||||
dt.search('');
|
||||
dt.columns().search('');
|
||||
dt.draw();
|
||||
}
|
||||
};
|
||||
|
||||
DataTable.ext.buttons.reload = {
|
||||
className: 'buttons-reload',
|
||||
|
||||
text: function (dt) {
|
||||
return '<i class="fa fa-refresh"></i> ' + dt.i18n('buttons.reload', 'Reload');
|
||||
},
|
||||
|
||||
action: function (e, dt, button, config) {
|
||||
dt.draw(false);
|
||||
}
|
||||
};
|
||||
|
||||
DataTable.ext.buttons.create = {
|
||||
className: 'buttons-create',
|
||||
|
||||
text: function (dt) {
|
||||
return '<i class="fa fa-plus"></i> ' + dt.i18n('buttons.create', 'Create');
|
||||
},
|
||||
|
||||
action: function (e, dt, button, config) {
|
||||
window.location = window.location.href.replace(/\/+$/, "") + '/create';
|
||||
}
|
||||
};
|
||||
|
||||
if (typeof DataTable.ext.buttons.copyHtml5 !== 'undefined') {
|
||||
$.extend(DataTable.ext.buttons.copyHtml5, {
|
||||
text: function (dt) {
|
||||
return '<i class="fa fa-copy"></i> ' + dt.i18n('buttons.copy', 'Copy');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (typeof DataTable.ext.buttons.colvis !== 'undefined') {
|
||||
$.extend(DataTable.ext.buttons.colvis, {
|
||||
text: function (dt) {
|
||||
return '<i class="fa fa-eye"></i> ' + dt.i18n('buttons.colvis', 'Column visibility');
|
||||
}
|
||||
});
|
||||
}
|
||||
})(jQuery, jQuery.fn.dataTable);
|
@ -12,8 +12,15 @@
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="card">
|
||||
<div class="card-body p-0">
|
||||
<div class="card-body">
|
||||
<div class="container">
|
||||
<div class="text-right">
|
||||
<div class="float-left">
|
||||
<h2>Refund</h2>
|
||||
</div>
|
||||
<p>#{{ $refund->id }}</p>
|
||||
</div>
|
||||
<hr>
|
||||
<p><strong>Bukti Foto/Video</strong></p>
|
||||
@foreach ($descriptions as $description)
|
||||
@if ($description->type == 'image')
|
||||
@ -26,9 +33,13 @@
|
||||
@endif
|
||||
@endforeach
|
||||
<br><br>
|
||||
<div class="row">
|
||||
<div class="col-2"><strong>Status</strong></div>
|
||||
<div class="col">{{ ucwords($refund->status) }}</div>
|
||||
</div><br>
|
||||
<div class="row">
|
||||
<div class="col-2"><strong>ID Order</strong></div>
|
||||
<div class="col">{{ $refund->transaction_id }}</div>
|
||||
<div class="col">#{{ $refund->transaction_id }}</div>
|
||||
</div><br>
|
||||
<div class="row">
|
||||
<div class="col-2"><strong>Nama Barang</strong></div>
|
||||
@ -50,15 +61,19 @@
|
||||
</div><br>
|
||||
<div class="row">
|
||||
<div class="col-2"><strong>Harga Satuan Barang</strong></div>
|
||||
<div class="col">{{ $refund->satuan_barang }}</div>
|
||||
<div class="col">{{ $refund->transaction->satuan_barang }}</div>
|
||||
</div><br>
|
||||
<div class="row">
|
||||
<div class="col-2"><strong>Jumlah Barang</strong></div>
|
||||
<div class="col">{{ $refund->jumlah_barang }}</div>
|
||||
<div class="col">{{ $refund->transaction->jumlah_barang }}</div>
|
||||
</div><br>
|
||||
<div class="row">
|
||||
<div class="col-2"><strong>Total Harga</strong></div>
|
||||
<div class="col">{{ $refund->total_harga }}</div>
|
||||
<div class="col-2"><strong>Total Bayar</strong></div>
|
||||
<div class="col">{{ $refund->transaction->total_bayar }}</div>
|
||||
</div><br>
|
||||
<div class="row">
|
||||
<div class="col-2"><strong>Total Refund</strong></div>
|
||||
<div class="col">{{ $refund->transaction->total_harga }}</div>
|
||||
</div><br>
|
||||
<div class="row">
|
||||
<div class="col-2"><strong>Batas Pengajuan Refund</strong></div>
|
||||
@ -71,12 +86,12 @@
|
||||
|
||||
@if ($refund->status == 'pending')
|
||||
<div class="d-flex justify-content-center mt-3">
|
||||
<a href="#" data-toggle="modal" data-target="#ModalRefund"
|
||||
class="btn btn-primary mx-1">Accept</a>
|
||||
<a href="{{ route('admin-refund.index') }}" class="btn btn-danger mx-1">Decline</a>
|
||||
<a href="#" data-toggle="modal" id="accept" class="btn btn-primary mx-1"
|
||||
data-id="{{ $refund->id }}">Terima</a>
|
||||
<a href="#" class="btn btn-danger mx-1" data-id="{{ $refund->id }}"
|
||||
id="reject">Tolak</a>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
<br>
|
||||
</div>
|
||||
@ -84,5 +99,136 @@
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@include('admin.refund.modal-next-detail-refund')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#accept').on('click', function() {
|
||||
var id = $(this).data('id');
|
||||
const csrfToken = $('meta[name="csrf-token"]').attr("content");
|
||||
|
||||
Swal.fire({
|
||||
title: 'Setuju Refund',
|
||||
text: 'Apakah anda yakin untuk menyetujui refund ini?',
|
||||
icon: 'question',
|
||||
confirmButtonText: 'Ya, setuju',
|
||||
showCancelButton: true,
|
||||
cancelButtonText: 'Tunggu sebentar.'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
Swal.fire({
|
||||
html: '<div class="mt-3"><lord-icon src="https://cdn.lordicon.com/etwtznjn.json" trigger="loop" colors="primary:#0ab39c,secondary:#405189" style="width:120px;height:120px"></lord-icon><div class="mt-4 pt-2 fs-15"><h4>Form Anda sedang diproses!</h4><p class="text-muted mx-4 mb-0">Mohon tunggu...</p></div></div>',
|
||||
allowEscapeKey: false,
|
||||
allowOutsideClick: false,
|
||||
didOpen: () => {
|
||||
Swal.showLoading();
|
||||
}
|
||||
});
|
||||
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': csrfToken,
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: "{{ route('admin-refund.approve') }}",
|
||||
type: 'PUT',
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
success: function(response) {
|
||||
Swal.fire({
|
||||
title: response.status ? 'Berhasil' :
|
||||
'Gagal',
|
||||
text: response.message,
|
||||
icon: response.status ? 'success' : 'error'
|
||||
}).then(function() {
|
||||
// if (response.status) {
|
||||
// location.reload();
|
||||
// }
|
||||
});
|
||||
console.log(response);
|
||||
},
|
||||
error: function(error) {
|
||||
Swal.fire({
|
||||
title: 'Gagal',
|
||||
text: 'Terjadi kesalahan di error',
|
||||
icon: 'error',
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: 'Ditunda',
|
||||
text: 'Mohon diperiksa dahulu sebelum disetujui',
|
||||
icon: 'info'
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#reject').on('click', function() {
|
||||
var id = $(this).data('id');
|
||||
const csrfToken = $('meta[name="csrf-token"]').attr("content");
|
||||
|
||||
Swal.fire({
|
||||
title: 'Tolak Refund',
|
||||
text: 'Apakah anda yakin untuk menolak refund ini?',
|
||||
icon: 'question',
|
||||
confirmButtonText: 'Ya, setuju',
|
||||
showCancelButton: true,
|
||||
cancelButtonText: 'Tunggu sebentar.'
|
||||
}).then((result) => {
|
||||
if (result.isConfirmed) {
|
||||
Swal.fire({
|
||||
html: '<div class="mt-3"><lord-icon src="https://cdn.lordicon.com/etwtznjn.json" trigger="loop" colors="primary:#0ab39c,secondary:#405189" style="width:120px;height:120px"></lord-icon><div class="mt-4 pt-2 fs-15"><h4>Form Anda sedang diproses!</h4><p class="text-muted mx-4 mb-0">Mohon tunggu...</p></div></div>',
|
||||
allowEscapeKey: false,
|
||||
allowOutsideClick: false,
|
||||
didOpen: () => {
|
||||
Swal.showLoading();
|
||||
}
|
||||
});
|
||||
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': csrfToken,
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: "{{ route('admin-refund.deny') }}",
|
||||
type: 'PUT',
|
||||
data: {
|
||||
id: id
|
||||
},
|
||||
success: function(response) {
|
||||
Swal.fire({
|
||||
title: response.status ? 'Berhasil' :
|
||||
'Gagal',
|
||||
text: response.message,
|
||||
icon: response.status ? 'success' : 'error'
|
||||
}).then(function() {
|
||||
if (response.status) {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
},
|
||||
error: function(error) {
|
||||
Swal.fire({
|
||||
title: 'Gagal',
|
||||
text: 'Terjadi kesalahan di error',
|
||||
icon: 'error',
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
Swal.fire({
|
||||
title: 'Ditunda',
|
||||
text: 'Mohon diperiksa dahulu sebelum ditolak',
|
||||
icon: 'info'
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
@ -33,7 +33,6 @@
|
||||
@foreach ($refunds as $refund)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $refund->id }}</td>
|
||||
<td>{{ $refund->transaction->data_pembeli->nama_depan }}
|
||||
</td>
|
||||
<td>{{ $refund->transaction->nama_barang }}
|
||||
@ -50,7 +49,7 @@
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary dropdown-toggle"
|
||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Aksi
|
||||
...
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item"
|
||||
|
@ -1,30 +0,0 @@
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="ModalRefund" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLongTitle">Refund Confirmation</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<h6> Apakah kamu yakin untuk menerima pengembalian dana? </h6>
|
||||
<h7><b>Jumlah Pengembalian Dana: </b></h7>
|
||||
<p>Rp. 15000</p>
|
||||
|
||||
<input type="radio" id="yes" name="fav_language" value="yes">
|
||||
<label for="yes">Ya! Terima pengembalian dana </label> <br>
|
||||
<input type="radio" id="no" name="fav_language" value="no">
|
||||
<label for="no">Tidak! Pengembalian dana tidak bisa dilanjutkan</label>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancel</button>
|
||||
<a href="{{ route('admin-refund.index') }}" class="btn btn-primary mx-1">Accept Refund</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
@ -171,7 +171,7 @@
|
||||
<th>Tahun</th>
|
||||
<th>Persentase (%)</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -6,7 +6,10 @@
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="d-flex justify-content-center">
|
||||
<h2 class="mb-4"> Informasi Pesanan</h2>
|
||||
<h2>Informasi Pesanan</h2>
|
||||
</div>
|
||||
<div class="d-flex justify-content-center">
|
||||
<p>#{{ $transaction->id }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -123,7 +126,7 @@
|
||||
</div>
|
||||
<div class="row mt-4">
|
||||
<div class="col-lg-8">
|
||||
<div class="section-title">Payment Method</div>
|
||||
<div class="section-title">Metode Pembayaran</div>
|
||||
<div class="images">
|
||||
@if ($transaction->metode_pembayaran != null)
|
||||
<img style="width: 20%; height: 20%;"
|
||||
@ -159,6 +162,18 @@
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="text-md-right">
|
||||
<div class="float-lg-left mb-lg-0 mb-3">
|
||||
<a href="/pembeli" class="btn btn-primary btn-icon icon-left"><i
|
||||
class="fas fa-credit-card" id="payment"></i> Process
|
||||
Payment</a>
|
||||
<a href="/pembeli" class="btn btn-danger btn-icon icon-left"><i
|
||||
class="fas fa-times"></i>
|
||||
Cancel</a>
|
||||
</div>
|
||||
<button class="btn btn-warning btn-icon icon-left"><i class="fas fa-print"></i>
|
||||
Print</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -26,7 +26,7 @@
|
||||
<th>Tanggal Transaksi</th>
|
||||
<th>Tanggal Update</th>
|
||||
<th>Status</th>
|
||||
<th>Action</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@ -42,23 +42,23 @@
|
||||
<td>{{ $transaction->created_at }}</td>
|
||||
<td>{{ $transaction->updated_at }}</td>
|
||||
<td><a href="#" data-toggle="modal" data-target="#modalKeteranganStatus"
|
||||
class="badge {{ in_array($transaction->status, ['pending', 'created'])
|
||||
class="badge {{ in_array($transaction->status_transaksi, ['created'])
|
||||
? 'badge-light'
|
||||
: (in_array($transaction->status, ['settlement', 'capture'])
|
||||
: (in_array($transaction->status_transaksi, ['success'])
|
||||
? 'badge-info'
|
||||
: (in_array($transaction->status, ['process', 'sending', 'sended'])
|
||||
: (in_array($transaction->status_transaksi, ['process', 'sending', 'sent'])
|
||||
? 'badge-warning'
|
||||
: (in_array($transaction->status, ['cancel', 'expire', 'failure', 'refund'])
|
||||
: (in_array($transaction->status_transaksi, ['cancel', 'failure', 'refund'])
|
||||
? 'badge-danger'
|
||||
: ($transaction->status == 'finished'
|
||||
: ($transaction->status_transaksi == 'finished'
|
||||
? 'badge-success'
|
||||
: '')))) }}">{{ ucwords($transaction->status) }}</a>
|
||||
: 'bagde-dark')))) }}">{{ ucwords($transaction->status_transaksi) }}</a>
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary dropdown-toggle"
|
||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Action
|
||||
....
|
||||
</button>
|
||||
|
||||
<ul class="dropdown-menu">
|
||||
@ -85,7 +85,7 @@
|
||||
</div>
|
||||
</div>
|
||||
@include('admin.transaction.modal-tracking')
|
||||
@extends('admin.transaction.modal-keterangan-status')
|
||||
@include('admin.transaction.modal-keterangan-status')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#modalTracking').on('show.bs.modal', function(event) {
|
||||
|
@ -1,5 +1,4 @@
|
||||
<div class="modal fade" id="modalKeteranganStatus" tabindex="-1"
|
||||
aria-labelledby="staticBackdropLabel" aria-hidden="true">
|
||||
<div class="modal fade" id="modalKeteranganStatus" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header d-flex justify-content-center">
|
||||
@ -8,63 +7,50 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Created</label>
|
||||
<p class="form-control">Transaksi baru telah dibuat.</p>
|
||||
<label class="badge badge-light">Created</label>
|
||||
<p class="form-control">Transaksi baru telah dibuat oleh pembeli.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Pending</label>
|
||||
<p class="form-control">Transaksi menunggu pembayaran.</p>
|
||||
<label class="badge badge-dark">Challenge</label>
|
||||
<p class="form-control">Transaksi diduga penipuan dan perlu direview oleh admin.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Capture</label>
|
||||
<p class="form-control">Transaksi berhasil dan saldo kartu berhasil diambil. Jika Anda tidak mengambil tindakan apa pun, transaksi akan berhasil diselesaikan dalam waktu 24 jam atau dalam waktu penyelesaian yang disepakati dengan bank mitra Anda dan status transaksi anda akan berubah menjadi settlement. Sehingga aman untuk mengasumsikan pembayaran berhasil.</p>
|
||||
<label class="badge badge-info">Success</label>
|
||||
<p class="form-control">Transaksi sukses dibayar dan akan dilanjutkan ke pihak penjual</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Settlement</label>
|
||||
<p class="form-control">Transaksi berhasil diselesaikan. Dana telah dikreditkan ke Rekber.</p>
|
||||
<label class="badge badge-danger">Failure</label>
|
||||
<p class="form-control">Terjadi kesalahan pada transaksi seperti pembatalan, pembayaran sudah
|
||||
kedaluwarsa atau kerusakan di server.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Cancel</label>
|
||||
<p class="form-control">Transaksi dibatalkan. Hal ini bisa dipicu oleh Midtrans, bank partner atau pembeli.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Expire</label>
|
||||
<p class="form-control">Transaksi tidak dapat diproses karena pembayaran tertunda atau melebihi batas pembayaran.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Process</label>
|
||||
<label class="badge badge-warning">Process</label>
|
||||
<p class="form-control">Transaksi/pesanan pembeli sedang diproses oleh penjual.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Sending</label>
|
||||
<label class="badge badge-warning">Sending</label>
|
||||
<p class="form-control">Pesanan sedang dikirim oleh penjual.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Sended</label>
|
||||
<p class="form-control">Pesanan sudah sampai ditujuan pembeli.</p>
|
||||
<label class="badge badge-warning">Sent</label>
|
||||
<p class="form-control">Pesanan sudah sampai di tujuan pembeli.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Finished</label>
|
||||
<label class="badge badge-success">Finished</label>
|
||||
<p class="form-control">Transaksi telah selesai dan diselesaikan oleh pembeli.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Failure</label>
|
||||
<p class="form-control">Terjadi kesalahan tak terduga selama pemrosesan transaksi.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Refund</label>
|
||||
<p class="form-control">Transaksi ditandai untuk dikembalikan. Status pengembalian dana dipicu oleh pembeli.</p>
|
||||
<label class="badge badge-danger">Refund</label>
|
||||
<p class="form-control">Transaksi ditandai oleh pembeli untuk dikembalikan/retur dikarenakan
|
||||
kemungkinan barang/jasa yang salah atau terjadi kerusakan.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -13,13 +13,13 @@
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped" id="table-1">
|
||||
<table class="table table-striped" id="table-user">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">#</th>
|
||||
<th>UID</th>
|
||||
<th>Foto Profil</th>
|
||||
<th>Nama Panjang</th>
|
||||
<th>Nama Lengkap</th>
|
||||
<th>Email</th>
|
||||
<th>Tanggal Daftar</th>
|
||||
<th>Status</th>
|
||||
@ -27,40 +27,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($users as $user)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $user->id }}</td>
|
||||
<td>
|
||||
<figure class="avatar mr-2 avatar-xl">
|
||||
<img src="{{ $user->foto_profil != null ? asset('storage') : asset('assets/img/avatar/avatar-6.png') }}"
|
||||
alt="...">
|
||||
</figure>
|
||||
</td>
|
||||
<td>{{ $user->nama_depan . ' ' . $user->nama_belakang }}</td>
|
||||
<td>{{ $user->email }}</td>
|
||||
<td>{{ $user->created_at }}</td>
|
||||
<td>
|
||||
<div
|
||||
class="badge {{ $user->status == 'Finished' ? 'badge-success' : ($user->status == 'Progress' ? 'badge-info' : 'badge-warning') }}">
|
||||
{{ $user->status }}</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary dropdown-toggle"
|
||||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Aksi
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item"
|
||||
href="{{ route('admin-user.show', $user->id) }}">Detail</a>
|
||||
<a class="dropdown-item" href="#"
|
||||
data-id="{{ $user->id }}" id="deleteUser">Hapus</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@ -71,8 +38,76 @@
|
||||
</div>
|
||||
<script>
|
||||
$(function() {
|
||||
let listUser = $('#table-user').DataTable({
|
||||
processing: true,
|
||||
serverSide: true,
|
||||
ajax: "{{ route('admin-user.list-user') }}",
|
||||
columns: [{
|
||||
data: 'DT_RowIndex',
|
||||
name: 'DT_RowIndex',
|
||||
orderable: false,
|
||||
searchable: true,
|
||||
}, {
|
||||
data: 'id',
|
||||
name: 'id',
|
||||
orderable: false,
|
||||
searchable: true,
|
||||
}, {
|
||||
data: 'foto_profile',
|
||||
name: 'foto_profile',
|
||||
render: function(data, type, row) {
|
||||
var foto = data;
|
||||
return `<figure class="avatar mr-2 avatar-xl">
|
||||
<img src="${foto !== null ? '{{ asset('storage/foto-profile/') }}' + foto : '{{ asset('assets/img/avatar/avatar-6.png') }}'}"
|
||||
alt="...">
|
||||
</figure>`;
|
||||
},
|
||||
orderable: false,
|
||||
searchable: false,
|
||||
}, {
|
||||
data: 'nama_lengkap',
|
||||
name: 'nama_lengkap'
|
||||
}, {
|
||||
data: 'email',
|
||||
name: 'email'
|
||||
}, {
|
||||
data: 'tanggal_daftar',
|
||||
name: 'tanggal_daftar',
|
||||
render: function(data, type, row) {
|
||||
if (type == 'display') {
|
||||
var date = new Date(data);
|
||||
var formattedDate = date.toLocaleDateString('en-US', {
|
||||
year: '2-digit',
|
||||
month: '2-digit',
|
||||
day: '2-digit'
|
||||
});
|
||||
return formattedDate;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}, {
|
||||
data: null,
|
||||
render: function(data, type, row) {
|
||||
if (row.status == 'Finished') {
|
||||
return `<a href="#" data-toggle="modal" data-target="#modalKeteranganStatus" class="badge badge-success">${row.status}</a>`;
|
||||
} else if (row.status == 'Progress') {
|
||||
return `<a href="#" data-toggle="modal" data-target="#modalKeteranganStatus" class="badge badge-info">${row.status}</a>`;
|
||||
} else {
|
||||
return `<a href="#" data-toggle="modal" data-target="#modalKeteranganStatus" class="badge badge-warning">${row.status}</a>`;
|
||||
}
|
||||
},
|
||||
orderable: true,
|
||||
searchable: true
|
||||
}, {
|
||||
data: 'action',
|
||||
name: 'action',
|
||||
orderable: false,
|
||||
searchable: false
|
||||
}],
|
||||
});
|
||||
|
||||
// Hapus data
|
||||
$('#table-1').on('click', '#deleteUser', function() {
|
||||
$('#table-user').on('click', '#deleteUser', function() {
|
||||
const csrfToken = $('meta[name="csrf-token"]').attr('content');
|
||||
let dataId = $(this).data("id");
|
||||
|
||||
|
@ -58,8 +58,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@extends('user.contact.modal-detail-contact')
|
||||
@extends('user.contact.modal-add-contact')
|
||||
@include('user.contact.modal-detail-contact')
|
||||
@include('user.contact.modal-add-contact')
|
||||
</section>
|
||||
</div>
|
||||
<script>
|
||||
@ -136,7 +136,7 @@
|
||||
confirmButtonText: 'OK'
|
||||
}).then(function() {
|
||||
Swal.close();
|
||||
if (response.status == true) {
|
||||
if (response.status) {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
@ -264,7 +264,7 @@
|
||||
confirmButtonText: 'OK',
|
||||
}).then(function() {
|
||||
Swal.close();
|
||||
if (response.status == true) {
|
||||
if (response.status) {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
|
@ -27,17 +27,17 @@
|
||||
@endforeach
|
||||
<br><br>
|
||||
<div class="row">
|
||||
<div class="col-2"><strong>ID Order</strong></div>
|
||||
<div class="col">{{ $refund->order_id }}</div>
|
||||
<div class="col-2"><strong>Transaction ID</strong></div>
|
||||
<div class="col">#{{ $refund->transaction_id }}</div>
|
||||
</div><br>
|
||||
<div class="row">
|
||||
<div class="col-2"><strong>Customer Name</strong></div>
|
||||
<div class="col-2"><strong>Nama Pembeli</strong></div>
|
||||
<div class="col">
|
||||
{{ $refund->transaction->data_pembeli->nama_depan . ' ' . $refund->transaction->data_pembeli->nama_belakang }}
|
||||
</div>
|
||||
</div><br>
|
||||
<div class="row">
|
||||
<div class="col-2"><strong>Seller Name</strong></div>
|
||||
<div class="col-2"><strong>Nama Penjual</strong></div>
|
||||
<div class="col">
|
||||
{{ $refund->transaction->data_penjual->nama_depan . ' ' . $refund->transaction->data_penjual->nama_belakang }}
|
||||
</div>
|
||||
|
@ -43,7 +43,7 @@
|
||||
<td>{{ $refund->due_date }}</td>
|
||||
<td><a href="#" data-toggle="modal"
|
||||
data-target="#modalKeteranganStatus"
|
||||
class="badge {{ $refund->status == 'partial refund' ? 'badge-succes' : ($refund->status == 'pending' ? 'badge-warning' : 'badge-danger') }}">{{ ucwords($refund->status) }}</a>
|
||||
class="badge {{ $refund->status == 'refund' ? 'badge-succes' : ($refund->status == 'pending' ? 'badge-warning' : 'badge-danger') }}">{{ ucwords($refund->status) }}</a>
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
@ -54,7 +54,7 @@
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item"
|
||||
href="{{ route('admin-refund.show', $refund->id) }}">Detail</a>
|
||||
href="{{ route('user-refund.show', $refund->id) }}">Detail</a>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
@ -49,37 +49,65 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
{{-- awal modal konfirmasi --}}
|
||||
<div class="modal fade" id="confirmtransaction" aria-hidden="true" aria-labelledby="myModalLabel" tabindex="-1">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal">
|
||||
<span aria-hidden="true">×</span>
|
||||
<span class="sr-only">Close</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-header d-flex justify-content-center">
|
||||
<h5 class="modal-title" id="transaksiberhasil">Transaksi Berhasil Dilakukan!</h5>
|
||||
<a type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></a>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<a type="button" class="btn btn-primary" data-bs-dismiss="modal">OK!</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{-- akhir modal konfirmasi --}}
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#formPengajuan').on('submit', function(e) {
|
||||
e.preventDefault();
|
||||
const csrfToken = $('meta[name="csrf-token"]').attr('content');
|
||||
|
||||
let form = this;
|
||||
|
||||
if (!form.checkValidity()) {
|
||||
form.reportValidity();
|
||||
return;
|
||||
}
|
||||
|
||||
let formData = new FormData(this);
|
||||
|
||||
Swal.fire({
|
||||
html: '<div class="mt-3"><lord-icon src="https://cdn.lordicon.com/etwtznjn.json" trigger="loop" colors="primary:#0ab39c,secondary:#405189" style="width:120px;height:120px"></lord-icon><div class="mt-4 pt-2 fs-15"><h4>Form Anda sedang diproses!</h4><p class="text-muted mx-4 mb-0">Mohon tunggu...</p></div></div>',
|
||||
allowEscapeKey: false,
|
||||
allowOutsideClick: false,
|
||||
didOpen: () => {
|
||||
Swal.showLoading()
|
||||
}
|
||||
});
|
||||
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': csrfToken
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: "{{ route('user-refund.store') }}",
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(response) {
|
||||
Swal.fire({
|
||||
title: response.status ? 'Berhasil' : 'Gagal',
|
||||
text: response.message,
|
||||
icon: response.status ? 'success' : 'error',
|
||||
}).then(function() {
|
||||
if (response.status) {
|
||||
location.href =
|
||||
"{{ route('user-refund.index') }}";
|
||||
}
|
||||
});
|
||||
},
|
||||
error: function(error) {
|
||||
Swal.fire({
|
||||
title: 'Gagal',
|
||||
text: 'Terjadi kesalahan di server',
|
||||
icon: 'error'
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
@ -67,7 +67,7 @@
|
||||
? 'badge-danger'
|
||||
: ($transaction->status_transaksi == 'finished'
|
||||
? 'badge-success'
|
||||
: '')))) }}">{{ ucwords($transaction->status_transaksi) }}</a>
|
||||
: 'badge-dark')))) }}">{{ ucwords($transaction->status_transaksi) }}</a>
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
@ -83,13 +83,13 @@
|
||||
</li>
|
||||
|
||||
{{-- di midtrans statusnya settlement --}}
|
||||
{{-- @if ($transaction->status_transaksi == 'sent') --}}
|
||||
<li><a class="dropdown-item" data-toggle="modal"
|
||||
data-target="#modalFinish" id="tracking"
|
||||
data-id="{{ $transaction->id }}"
|
||||
href="#">Selesaikan</a>
|
||||
</li>
|
||||
{{-- @endif --}}
|
||||
@if ($transaction->status_transaksi == 'sent')
|
||||
<li><a class="dropdown-item" data-toggle="modal"
|
||||
data-target="#modalFinish" id="tracking"
|
||||
data-id="{{ $transaction->id }}"
|
||||
href="#">Selesaikan</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@if ($transaction->status_transaksi == 'created')
|
||||
<li><a class="dropdown-item" id="bayar"
|
||||
@ -126,9 +126,9 @@
|
||||
</section>
|
||||
</div>
|
||||
<!-- Tambahkan elemen progress bar ke tampilan Anda (dengan awalnya disembunyikan) -->
|
||||
@extends('user.transaction.pembeli.modal-end-transaction')
|
||||
@extends('user.transaction.pembeli.modal-tracking')
|
||||
@extends('user.transaction.pembeli.modal-keterangan-status')
|
||||
@include('user.transaction.pembeli.modal-end-transaction')
|
||||
@include('user.transaction.pembeli.modal-tracking')
|
||||
@include('user.transaction.pembeli.modal-keterangan-status')
|
||||
|
||||
<script type="text/javascript" src="https://app.sandbox.midtrans.com/snap/snap.js"
|
||||
data-client-key="SB-Mid-client-lEMALcmIPviksRRe"></script>
|
||||
@ -477,18 +477,14 @@
|
||||
text: response.message,
|
||||
icon: 'error'
|
||||
});
|
||||
console.log(error);
|
||||
}
|
||||
});
|
||||
|
||||
console.log(id);
|
||||
});
|
||||
|
||||
// complain
|
||||
$('#modalFinish').on('click', '#complain', function() {
|
||||
var id = $(this).data('id');
|
||||
location.href = "{{ route('user-refund.create', ':id') }}".replace(':id', id);
|
||||
console.log(id);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<div class="modal fade" id="modalKeteranganStatus" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header d-flex justify-content-center">
|
||||
<h3 class="modal-title fs-5" id="staticBackdropLabel">Keterangan Status Transaksi</h3>
|
||||
@ -7,69 +7,50 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Created</label>
|
||||
<p class="form-control">Transaksi baru telah dibuat.</p>
|
||||
<label class="badge badge-light">Created</label>
|
||||
<p class="form-control">Transaksi baru telah dibuat oleh pembeli.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Pending</label>
|
||||
<p class="form-control">Transaksi menunggu pembayaran.</p>
|
||||
<label class="badge badge-dark">Challenge</label>
|
||||
<p class="form-control">Transaksi diduga penipuan dan perlu direview oleh admin.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Capture</label>
|
||||
<p class="form-control">Transaksi berhasil dan saldo kartu berhasil diambil. Jika Anda tidak
|
||||
mengambil tindakan apa pun, transaksi akan berhasil diselesaikan dalam waktu 24 jam atau dalam
|
||||
waktu penyelesaian yang disepakati dengan bank mitra Anda dan status transaksi anda akan berubah
|
||||
menjadi settlement. Sehingga aman untuk mengasumsikan pembayaran berhasil.</p>
|
||||
<label class="badge badge-info">Success</label>
|
||||
<p class="form-control">Transaksi sukses dibayar dan akan dilanjutkan ke pihak penjual</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Settlement</label>
|
||||
<p class="form-control">Transaksi berhasil diselesaikan. Dana telah dikreditkan ke Rekber.</p>
|
||||
<label class="badge badge-danger">Failure</label>
|
||||
<p class="form-control">Terjadi kesalahan pada transaksi seperti pembatalan, pembayaran sudah
|
||||
kedaluwarsa atau kerusakan di server.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Cancel</label>
|
||||
<p class="form-control">Transaksi dibatalkan. Hal ini bisa dipicu oleh Midtrans, bank partner atau
|
||||
pembeli.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Expire</label>
|
||||
<p class="form-control">Transaksi tidak dapat diproses karena pembayaran tertunda atau melebihi
|
||||
batas pembayaran.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Process</label>
|
||||
<label class="badge badge-warning">Process</label>
|
||||
<p class="form-control">Transaksi/pesanan pembeli sedang diproses oleh penjual.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Sending</label>
|
||||
<label class="badge badge-warning">Sending</label>
|
||||
<p class="form-control">Pesanan sedang dikirim oleh penjual.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Sended</label>
|
||||
<p class="form-control">Pesanan sudah sampai ditujuan pembeli.</p>
|
||||
<label class="badge badge-warning">Sent</label>
|
||||
<p class="form-control">Pesanan sudah sampai di tujuan pembeli.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Finished</label>
|
||||
<label class="badge badge-success">Finished</label>
|
||||
<p class="form-control">Transaksi telah selesai dan diselesaikan oleh pembeli.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Failure</label>
|
||||
<p class="form-control">Terjadi kesalahan tak terduga selama pemrosesan transaksi.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Refund</label>
|
||||
<p class="form-control">Transaksi ditandai untuk dikembalikan. Status pengembalian dana dipicu oleh
|
||||
pembeli.</p>
|
||||
<label class="badge badge-danger">Refund</label>
|
||||
<p class="form-control">Transaksi ditandai oleh pembeli untuk dikembalikan/retur dikarenakan
|
||||
kemungkinan barang/jasa yang salah atau terjadi kerusakan.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -61,7 +61,7 @@
|
||||
? 'badge-danger'
|
||||
: ($transaction->status_transaksi == 'finished'
|
||||
? 'badge-success'
|
||||
: '')))) }}">{{ ucwords($transaction->status_transaksi) }}</a>
|
||||
: 'badge-dark')))) }}">{{ ucwords($transaction->status_transaksi) }}</a>
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
@ -81,35 +81,41 @@
|
||||
</li>
|
||||
@endif
|
||||
{{-- Setelah dibayar --}}
|
||||
{{-- @if ($transaction->status_transaksi == 'success') --}}
|
||||
<li><a class="dropdown-item" href="#"
|
||||
id="processTransaction"
|
||||
data-id="{{ $transaction->id }}">Proses
|
||||
Transaksi</a>
|
||||
</li>
|
||||
{{-- @endif --}}
|
||||
@if ($transaction->status_transaksi == 'success')
|
||||
<li><a class="dropdown-item" href="#"
|
||||
id="processTransaction"
|
||||
data-id="{{ $transaction->id }}">Proses
|
||||
Transaksi</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
{{-- Pengiriman barang --}}
|
||||
{{-- @if ($transaction->status_transaksi == 'process') --}}
|
||||
<li><a class="dropdown-item" href="#" id="sendOrder"
|
||||
data-id="{{ $transaction->id }}">Kirim
|
||||
Barang</a>
|
||||
</li>
|
||||
{{-- @endif --}}
|
||||
{{-- @if ($transaction->status_transaksi == 'sending') --}}
|
||||
<li><a class="dropdown-item" href="#"
|
||||
data-toggle="modal" data-target="#modalOrderSent"
|
||||
id="sentOrder"
|
||||
data-id="{{ $transaction->id }}">Barang sudah
|
||||
sampai</a>
|
||||
</li>
|
||||
{{-- @endif --}}
|
||||
{{-- @if ($transaction->status_transaksi == 'finished') --}}
|
||||
<li><a class="dropdown-item" href="#"
|
||||
id="acceptResult"
|
||||
data-id="{{ $transaction->id }}">Terima
|
||||
Uang</a>
|
||||
</li>
|
||||
{{-- @endif --}}
|
||||
@if ($transaction->status_transaksi == 'process')
|
||||
<li><a class="dropdown-item" href="#"
|
||||
id="sendOrder"
|
||||
data-id="{{ $transaction->id }}">Kirim
|
||||
Barang</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
{{-- Barang sudah sampai --}}
|
||||
@if ($transaction->status_transaksi == 'sending')
|
||||
<li><a class="dropdown-item" href="#"
|
||||
data-toggle="modal"
|
||||
data-target="#modalOrderSent" id="sentOrder"
|
||||
data-id="{{ $transaction->id }}">Barang sudah
|
||||
sampai</a>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
{{-- Transaksi sudah selesai --}}
|
||||
@if ($transaction->status_transaksi == 'finished')
|
||||
<li><a class="dropdown-item" href="#"
|
||||
id="acceptResult"
|
||||
data-id="{{ $transaction->id }}">Terima
|
||||
Uang</a>
|
||||
</li>
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
@ -126,9 +132,9 @@
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@extends('user.transaction.penjual.modal-tracking')
|
||||
@extends('user.transaction.penjual.modal-pengiriman-selesai')
|
||||
@extends('user.transaction.penjual.modal-keterangan-status')
|
||||
@include('user.transaction.penjual.modal-tracking')
|
||||
@include('user.transaction.penjual.modal-pengiriman-selesai')
|
||||
@include('user.transaction.penjual.modal-keterangan-status')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('#modalTracking').on('show.bs.modal', function(event) {
|
||||
@ -256,7 +262,7 @@
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: "route('user-penjual.sending')",
|
||||
url: "{{ route('user-penjual.sending') }}",
|
||||
type: 'PUT',
|
||||
data: {
|
||||
id: id,
|
||||
@ -280,7 +286,6 @@
|
||||
text: 'Terjadi error di server',
|
||||
icon: 'error'
|
||||
});
|
||||
console.log(error);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -361,8 +366,11 @@
|
||||
title: response.status ? 'Berhasil' : 'Gagal',
|
||||
text: response.message,
|
||||
icon: response.status ? 'success' : 'error'
|
||||
}).then(function() {
|
||||
if (response.status) {
|
||||
location.reload();
|
||||
}
|
||||
});
|
||||
console.log(response);
|
||||
},
|
||||
error: function(error) {
|
||||
Swal.fire({
|
||||
@ -370,10 +378,13 @@
|
||||
text: 'Terjadi kesalahan di server',
|
||||
icon: 'error'
|
||||
});
|
||||
console.log(error);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#acceptResult').on('click', function() {
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
@ -1,70 +1,55 @@
|
||||
<div class="modal fade" id="modalKeteranganStatus" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1"
|
||||
aria-labelledby="staticBackdropLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered">
|
||||
<div class="modal fade" id="modalKeteranganStatus" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header d-flex justify-content-center">
|
||||
<h3 class="modal-title fs-5" id="staticBackdropLabel">Keterangan Status Transaksi</h3>
|
||||
<a type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close">×</a>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Pending</label>
|
||||
<p class="form-control">asdas</p>
|
||||
<label class="badge badge-light">Created</label>
|
||||
<p class="form-control">Transaksi baru telah dibuat oleh pembeli.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Capture</label>
|
||||
<p class="form-control">asdas</p>
|
||||
<label class="badge badge-dark">Challenge</label>
|
||||
<p class="form-control">Transaksi diduga penipuan dan perlu direview oleh admin.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Settlement</label>
|
||||
<p class="form-control">asdas</p>
|
||||
<label class="badge badge-info">Success</label>
|
||||
<p class="form-control">Transaksi sukses dibayar dan akan dilanjutkan ke pihak penjual</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Cancel</label>
|
||||
<p class="form-control">asdas</p>
|
||||
<label class="badge badge-danger">Failure</label>
|
||||
<p class="form-control">Terjadi kesalahan pada transaksi seperti pembatalan, pembayaran sudah
|
||||
kedaluwarsa atau kerusakan di server.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Expire</label>
|
||||
<p class="form-control">asdas</p>
|
||||
<label class="badge badge-warning">Process</label>
|
||||
<p class="form-control">Transaksi/pesanan pembeli sedang diproses oleh penjual.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Progress</label>
|
||||
<p class="form-control">asdas</p>
|
||||
<label class="badge badge-warning">Sending</label>
|
||||
<p class="form-control">Pesanan sedang dikirim oleh penjual.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Sending</label>
|
||||
<p class="form-control">asdas</p>
|
||||
<label class="badge badge-warning">Sent</label>
|
||||
<p class="form-control">Pesanan sudah sampai di tujuan pembeli.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Sended</label>
|
||||
<p class="form-control">asdas</p>
|
||||
<label class="badge badge-success">Finished</label>
|
||||
<p class="form-control">Transaksi telah selesai dan diselesaikan oleh pembeli.</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Finished</label>
|
||||
<p class="form-control">asdas</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Failure</label>
|
||||
<p class="form-control">asdas</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Failed</label>
|
||||
<p class="form-control">asdas</p>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label">Refund</label>
|
||||
<p class="form-control">asdas</p>
|
||||
<label class="badge badge-danger">Refund</label>
|
||||
<p class="form-control">Transaksi ditandai oleh pembeli untuk dikembalikan/retur dikarenakan
|
||||
kemungkinan barang/jasa yang salah atau terjadi kerusakan.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -16,10 +16,11 @@
|
||||
<div class="row d-flex justify-content-center form-bukti-id hidden">
|
||||
|
||||
</div>
|
||||
<div class="row d-flex justify-content-center">
|
||||
<img src="{{ asset('assets/img/avatar/avatar-1.png') }}" alt="bukti foto"
|
||||
style="max-width: 450px; max-height: 400px; margin: 0 3px 0 3px;"
|
||||
id="buktiFotoPreview">
|
||||
<div class="container">
|
||||
<div class="row d-flex justify-content-center">
|
||||
<img src="{{ asset('assets/img/avatar/avatar-1.png') }}" alt="bukti foto"
|
||||
id="buktiFotoPreview" style="max-width: 400px; max-height: 350px;">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row d-flex justify-content-center mt-3">
|
||||
<label for="buktiFoto" class="btn btn-primary" style="font-size: 16px;">
|
||||
|
15
resources/views/vendor/datatables/editor.blade.php
vendored
Normal file
15
resources/views/vendor/datatables/editor.blade.php
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
$(function(){
|
||||
window.{{ config('datatables-html.namespace', 'LaravelDataTables') }} = window.{{ config('datatables-html.namespace', 'LaravelDataTables') }} || {};
|
||||
$.ajaxSetup({headers: {'X-CSRF-TOKEN': '{{csrf_token()}}'}});
|
||||
@foreach($editors as $editor)
|
||||
var {{$editor->instance}} = window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}["%1$s-{{$editor->instance}}"] = new $.fn.dataTable.Editor({!! $editor->toJson() !!});
|
||||
{!! $editor->scripts !!}
|
||||
@foreach ((array) $editor->events as $event)
|
||||
{{$editor->instance}}.on('{!! $event['event'] !!}', {!! $event['script'] !!});
|
||||
@endforeach
|
||||
@endforeach
|
||||
window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}["%1$s"] = $("#%1$s").DataTable(%2$s);
|
||||
});
|
||||
@foreach ($scripts as $script)
|
||||
@include($script)
|
||||
@endforeach
|
14
resources/views/vendor/datatables/function.blade.php
vendored
Normal file
14
resources/views/vendor/datatables/function.blade.php
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
window.dtx = window.dtx || {};
|
||||
window.dtx["%1$s"] = function(opts) {
|
||||
window.{{ config('datatables-html.namespace', 'LaravelDataTables') }} = window.{{ config('datatables-html.namespace', 'LaravelDataTables') }} || {};
|
||||
@if(isset($editors))
|
||||
@foreach($editors as $editor)
|
||||
var {{$editor->instance}} = window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}["%1$s-{{$editor->instance}}"] = new $.fn.dataTable.Editor({!! $editor->toJson() !!});
|
||||
{!! $editor->scripts !!}
|
||||
@foreach ((array) $editor->events as $event)
|
||||
{{$editor->instance}}.on('{!! $event['event'] !!}', {!! $event['script'] !!});
|
||||
@endforeach
|
||||
@endforeach
|
||||
@endif
|
||||
return window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}["%1$s"] = $("#%1$s").DataTable($.extend(%2$s, opts));
|
||||
}
|
14
resources/views/vendor/datatables/functions/batch_remove.blade.php
vendored
Normal file
14
resources/views/vendor/datatables/functions/batch_remove.blade.php
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
$(function(){
|
||||
@foreach($editors as $editor)
|
||||
{{ config('datatables-html.namespace', 'LaravelDataTables') }}["%1$s-{{$editor->instance}}"].on('preSubmit', function(e, data, action) {
|
||||
if (action !== 'remove') return;
|
||||
|
||||
for (let row_id of Object.keys(data.data))
|
||||
{
|
||||
data.data[row_id] = {
|
||||
DT_RowId: data.data[row_id].DT_RowId
|
||||
};
|
||||
}
|
||||
});
|
||||
@endforeach
|
||||
});
|
6
resources/views/vendor/datatables/options.blade.php
vendored
Normal file
6
resources/views/vendor/datatables/options.blade.php
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
window.{{ config('datatables-html.namespace', 'LaravelDataTables') }} = window.{{ config('datatables-html.namespace', 'LaravelDataTables') }} || {};
|
||||
window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}.options = %2$s
|
||||
window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}.editors = [];
|
||||
@foreach($editors as $editor)
|
||||
window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}.editors["{{$editor->instance}}"] = {!! $editor->toJson() !!}
|
||||
@endforeach
|
37
resources/views/vendor/datatables/print.blade.php
vendored
Normal file
37
resources/views/vendor/datatables/print.blade.php
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>Print Table</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name=description content="">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<!-- Bootstrap CSS -->
|
||||
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
|
||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
|
||||
<style>
|
||||
body {margin: 20px}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table class="table table-bordered table-condensed table-striped">
|
||||
@foreach($data as $row)
|
||||
@if ($loop->first)
|
||||
<tr>
|
||||
@foreach($row as $key => $value)
|
||||
<th>{!! $key !!}</th>
|
||||
@endforeach
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
@foreach($row as $key => $value)
|
||||
@if(is_string($value) || is_numeric($value))
|
||||
<td>{!! $value !!}</td>
|
||||
@else
|
||||
<td></td>
|
||||
@endif
|
||||
@endforeach
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
23
resources/views/vendor/datatables/scout.blade.php
vendored
Normal file
23
resources/views/vendor/datatables/scout.blade.php
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
$(function(){
|
||||
$('#%1$s').on('xhr.dt', function (e, settings, json, xhr) {
|
||||
if (json == null || !('disableOrdering' in json)) return;
|
||||
|
||||
let table = {{ config('datatables-html.namespace', 'LaravelDataTables') }}[$(this).attr('id')];
|
||||
if (json.disableOrdering) {
|
||||
table.settings()[0].aoColumns.forEach(function(column) {
|
||||
column.bSortable = false;
|
||||
$(column.nTh).removeClass('sorting_asc sorting_desc sorting').addClass('sorting_disabled');
|
||||
});
|
||||
} else {
|
||||
let changed = false;
|
||||
table.settings()[0].aoColumns.forEach(function(column) {
|
||||
if (column.bSortable) return;
|
||||
column.bSortable = true;
|
||||
changed = true;
|
||||
});
|
||||
if (changed) {
|
||||
table.draw();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
4
resources/views/vendor/datatables/script.blade.php
vendored
Normal file
4
resources/views/vendor/datatables/script.blade.php
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
$(function(){window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}=window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}||{};window.{{ config('datatables-html.namespace', 'LaravelDataTables') }}["%1$s"]=$("#%1$s").DataTable(%2$s);});
|
||||
@foreach ($scripts as $script)
|
||||
@include($script)
|
||||
@endforeach
|
@ -96,6 +96,7 @@ Route::middleware(['auth'])->group(function(){
|
||||
// Tampilan, aprove atau deny dan hapus user
|
||||
Route::controller(AdminUserController::class)->group(function(){
|
||||
Route::get('admin-user','index')->name('admin-user.index');
|
||||
Route::get('admin-user/list-user','listUser')->name('admin-user.list-user');
|
||||
Route::get('admin-user/{id}','show')->name('admin-user.show');
|
||||
Route::delete('admin-user/{id}','delete')->name('admin-user.destroy');
|
||||
Route::put('admin-user/approve-user/{id}', 'approveUser')->name('admin-user.approve');
|
||||
@ -106,20 +107,22 @@ Route::middleware(['auth'])->group(function(){
|
||||
Route::controller(AdminTransactionController::class)->group(function(){
|
||||
Route::get('admin-transaction','index')->name('admin-transaction.index');
|
||||
Route::get('admin-transaction/detail/{id}','show')->name('admin-transaction.show');
|
||||
|
||||
Route::get('admin-transaction/list-transaction','listTransaction')->name('admin-transaction.list-transaction');
|
||||
});
|
||||
|
||||
// Tampilan, approve atau deny dan hapus refund
|
||||
Route::controller(AdminRefundController::class)->group(function(){
|
||||
Route::get('admin-refund','index')->name('admin-refund.index');
|
||||
Route::get('admin-refund/list-refund','listRefund')->name('admin-refund.list-refund');
|
||||
Route::get('admin-refund/{id}','show')->name('admin-refund.show');
|
||||
Route::put('admin-refund/approve-refund/{id}','approveRefund')->name('admin-refund.approve');
|
||||
Route::put('admin-refund/deny-refund/{id}','denyRefund')->name('admin-refund.deny');
|
||||
Route::put('admin-refund/approve-refund','approveRefund')->name('admin-refund.approve');
|
||||
Route::put('admin-refund/deny-refund','denyRefund')->name('admin-refund.deny');
|
||||
});
|
||||
|
||||
// Tampilan, tambah, ubah dan hapus kebijakan persentase perusahaan
|
||||
Route::controller(AdminSettingController::class)->group(function(){
|
||||
Route::get('admin-setting','index')->name('admin-setting.index');
|
||||
Route::get('admin-setting/list-setting','listSetting')->name('admin-setting.list-setting');
|
||||
Route::post('admin-setting/store','store')->name('admin-setting.store');
|
||||
Route::put('admin-setting/active/','activeSetting')->name('admin-setting.active-setting');
|
||||
});
|
||||
@ -139,6 +142,7 @@ Route::middleware(['auth'])->group(function(){
|
||||
// Tampilan, tambah dan hapus kontak
|
||||
Route::controller(UserContactController::class)->group(function(){
|
||||
Route::get('user-contact','index')->name('user-contact.index');
|
||||
Route::get('user-contact/list-contact','listContact')->name('user-contact.list-contact');
|
||||
Route::post('user-contact','store')->name('user-contact.store');
|
||||
Route::delete('user-contact/delete/{id}','destroy')->name('user-contact.destroy');
|
||||
Route::get('user-contact/get-user-contact','getContact')->name('user-contact.get');
|
||||
@ -149,6 +153,7 @@ Route::middleware(['auth'])->group(function(){
|
||||
Route::controller(UserTransactionController::class)->group(function(){
|
||||
// Pembeli
|
||||
Route::get('user-pembeli','indexPembeli')->name('user-pembeli.index');
|
||||
Route::get('user-pembeli/list-pembeli','listPembeli')->name('user-pembeli.list-pembeli');
|
||||
Route::get('user-pembeli/detail-transaksi/{id}','show')->name('user-pembeli.show');
|
||||
Route::get('user-pembeli/tambah-transaksi','create')->name('user-pembeli.create');
|
||||
Route::get('user-pembeli/invoice/{id}','invoice')->name('user-pembeli.invoice');
|
||||
@ -163,6 +168,7 @@ Route::middleware(['auth'])->group(function(){
|
||||
|
||||
//Penjual
|
||||
Route::get('user-penjual','indexPenjual')->name('user-penjual.index');
|
||||
Route::get('user-penjual/list-penjual','listPenjual')->name('user-penjual.list-penjual');
|
||||
Route::get('user-penjual/detail-transaksi/{id}','show')->name('user-penjual.show');
|
||||
Route::get('user-penjual/tolak-transaksi','denyTransaction')->name('user-penjual.deny');
|
||||
Route::put('user-penjual/terima-transaksi','acceptTransaction')->name('user-penjual.accept');
|
||||
@ -175,6 +181,7 @@ Route::middleware(['auth'])->group(function(){
|
||||
// Tampilan refund
|
||||
Route::controller(UserRefundController::class)->group(function(){
|
||||
Route::get('user-refund','index')->name('user-refund.index');
|
||||
Route::get('user-refund/list-refund','listRefund')->name('user-refund.list-refund');
|
||||
Route::get('user-refund/ajukan-komplain/{id}','create')->name('user-refund.create');
|
||||
Route::get('user-refund/detail-refund/{id}','show')->name('user-refund.show');
|
||||
Route::post('user-refund','store')->name('user-refund.store');
|
||||
|
Loading…
Reference in New Issue
Block a user