API Flutter Patch 3
This commit is contained in:
parent
1f7ecb22be
commit
85dec7d3c0
@ -191,6 +191,7 @@ class PembeliApiController extends Controller
|
|||||||
return response()->json([
|
return response()->json([
|
||||||
'status' => true,
|
'status' => true,
|
||||||
'message' => 'Berhasil menambahkan transaksi. Silahkan lakukan pembayaran.',
|
'message' => 'Berhasil menambahkan transaksi. Silahkan lakukan pembayaran.',
|
||||||
|
'url' => $result['redirect_url']
|
||||||
]);
|
]);
|
||||||
} catch (Throwable $e) {
|
} catch (Throwable $e) {
|
||||||
DB::rollBack();
|
DB::rollBack();
|
||||||
@ -243,6 +244,7 @@ class PembeliApiController extends Controller
|
|||||||
|
|
||||||
public function payPayment(Request $request)
|
public function payPayment(Request $request)
|
||||||
{
|
{
|
||||||
|
|
||||||
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
|
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
|
||||||
|
|
||||||
$response = Http::withOptions([
|
$response = Http::withOptions([
|
||||||
@ -351,8 +353,6 @@ class PembeliApiController extends Controller
|
|||||||
'message' => 'Transaksi pembayaran gagal.',
|
'message' => 'Transaksi pembayaran gagal.',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return response()->json();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function cancelPayment(Request $request)
|
public function cancelPayment(Request $request)
|
||||||
@ -574,7 +574,7 @@ class PembeliApiController extends Controller
|
|||||||
'status' => false,
|
'status' => false,
|
||||||
'message' => 'Pembayaran sudah expire, silahkan buat transaksi baru.',
|
'message' => 'Pembayaran sudah expire, silahkan buat transaksi baru.',
|
||||||
]);
|
]);
|
||||||
} elseif ($result['transaction'] == 'failure') {
|
} elseif ($result['transaction_status'] == 'failure') {
|
||||||
TransactionDescription::create([
|
TransactionDescription::create([
|
||||||
'transaction_id' => $request->input('id'),
|
'transaction_id' => $request->input('id'),
|
||||||
'status' => 'failure',
|
'status' => 'failure',
|
||||||
|
@ -59,7 +59,7 @@ class PenjualApiController extends Controller
|
|||||||
$params = [
|
$params = [
|
||||||
'refund_key' => $request->input('id') . '-ref1',
|
'refund_key' => $request->input('id') . '-ref1',
|
||||||
'amount' => $transaction->total_bayar,
|
'amount' => $transaction->total_bayar,
|
||||||
'reason' => $request->complaint,
|
'reason' => $request->input('complaint'),
|
||||||
];
|
];
|
||||||
|
|
||||||
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
|
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
|
||||||
@ -91,7 +91,7 @@ class PenjualApiController extends Controller
|
|||||||
'total' => $transaction->total_bayar,
|
'total' => $transaction->total_bayar,
|
||||||
'due_date' => now(),
|
'due_date' => now(),
|
||||||
'status' => 'refund',
|
'status' => 'refund',
|
||||||
'complaint' => $request->complaint,
|
'complaint' => $request->input('complaint'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
TransactionDescription::create([
|
TransactionDescription::create([
|
||||||
@ -100,7 +100,7 @@ class PenjualApiController extends Controller
|
|||||||
'background' => 'bg-seller',
|
'background' => 'bg-seller',
|
||||||
'user' => auth()->user()->email,
|
'user' => auth()->user()->email,
|
||||||
'judul' => 'fas fa-times',
|
'judul' => 'fas fa-times',
|
||||||
'deskripsi' => 'Transaksi ditolak ' . auth()->user()->nama_depan . ', uang akan dikembalikan ke pembeli. Alasan : ' . $request->complaint,
|
'deskripsi' => 'Transaksi ditolak ' . auth()->user()->nama_depan . ', uang akan dikembalikan ke pembeli. Alasan : ' . $request->input('complaint'),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
DB::commit();
|
DB::commit();
|
||||||
@ -339,4 +339,8 @@ class PenjualApiController extends Controller
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function acceptResult(Request $request){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -20,25 +20,17 @@ class ProfileApiController extends Controller
|
|||||||
{
|
{
|
||||||
public function getProfile()
|
public function getProfile()
|
||||||
{
|
{
|
||||||
$provinces = Provinsi::where('code', auth()->user()->village->district->city->province->code)->get();
|
|
||||||
$cities = City::where('province_code', auth()->user()->village->district->city->province->code)->get();
|
|
||||||
$districts = District::where('city_code', auth()->user()->village->district->city->code)->get();
|
|
||||||
$villages = Village::where('district_code', auth()->user()->village->district->code)->get();
|
|
||||||
$token = JWTAuth::getToken();
|
$token = JWTAuth::getToken();
|
||||||
$user = JWTAuth::user($token);
|
$user = JWTAuth::user($token);
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'user' => $user,
|
'user' => $user,
|
||||||
'provinces' => $provinces,
|
|
||||||
'cities' => $cities,
|
|
||||||
'districts' => $districts,
|
|
||||||
'villages' => $villages
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateProfile(Request $request)
|
public function updateProfile(Request $request)
|
||||||
{
|
{
|
||||||
$nama_depan = str_replace(' ', '_', $request->input('nama_depan'));
|
$nama_depan = $request->input('nama_depan');
|
||||||
$nama_belakang = str_replace(' ', '_', $request->input('nama_belakang'));
|
$nama_belakang = $request->input('nama_belakang');
|
||||||
$nohp = $request->input('nohp');
|
$nohp = $request->input('nohp');
|
||||||
$kode_kelurahan = $request->input('kelurahan');
|
$kode_kelurahan = $request->input('kelurahan');
|
||||||
$alamat = $request->input('alamat');
|
$alamat = $request->input('alamat');
|
||||||
@ -47,7 +39,7 @@ class ProfileApiController extends Controller
|
|||||||
$foto_profile = '';
|
$foto_profile = '';
|
||||||
if ($request->hasFile('foto')) {
|
if ($request->hasFile('foto')) {
|
||||||
$file = $request->file('foto');
|
$file = $request->file('foto');
|
||||||
$foto_profile = 'Foto_Profil_' . $nama_depan . '_' . $nama_belakang .'.'. $file->getClientOriginalExtension();
|
$foto_profile = 'Foto_Profil_' . str_replace(' ', '_', $request->input('nama_depan')) . '_' . str_replace(' ', '_', $request->input('nama_belakang')).'.'. $file->getClientOriginalExtension();
|
||||||
$path = 'foto-profile/' . $foto_profile;
|
$path = 'foto-profile/' . $foto_profile;
|
||||||
|
|
||||||
Storage::disk('public')->put($path, file_get_contents($file));
|
Storage::disk('public')->put($path, file_get_contents($file));
|
||||||
@ -80,12 +72,12 @@ class ProfileApiController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function updateProfilePassword(Request $request){
|
public function updateProfilePassword(Request $request){
|
||||||
$currentPassword = $request->input('currentPassword');
|
$currentPassword = $request->input('current_password');
|
||||||
$newPassword = $request->input('newPassword');
|
$newPassword = $request->input('new_password');
|
||||||
$renewPassword = $request->input('renewPassword');
|
$renewPassword = $request->input('renew_password');
|
||||||
|
|
||||||
if(!Hash::check($currentPassword, auth()->user()->password)){
|
if(!Hash::check($currentPassword, auth()->user()->password)){
|
||||||
return response()->json(['status' => false, 'message' => 'Password sekarang tidak sama','password' => $currentPassword]);
|
return response()->json(['status' => false, 'message' => 'Password sekarang tidak sama']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($renewPassword != $newPassword){
|
if($renewPassword != $newPassword){
|
||||||
|
@ -12,6 +12,7 @@ use Illuminate\Support\Facades\DB;
|
|||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Models\TransactionDescription;
|
use App\Models\TransactionDescription;
|
||||||
|
use Yajra\DataTables\Facades\DataTables;
|
||||||
|
|
||||||
class RefundApiController extends Controller
|
class RefundApiController extends Controller
|
||||||
{
|
{
|
||||||
@ -83,7 +84,7 @@ class RefundApiController extends Controller
|
|||||||
|
|
||||||
Log::error($e->getMessage());
|
Log::error($e->getMessage());
|
||||||
|
|
||||||
return response()->json(['success' => false, 'message' => 'Terjadi Kesalahan pada sisi server']);
|
return response()->json(['success' => false, 'message' => 'Terjadi kesalahan pada sisi server']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,4 +96,75 @@ class RefundApiController extends Controller
|
|||||||
'descriptions' => $refundDescription
|
'descriptions' => $refundDescription
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function listRefund(Request $request)
|
||||||
|
{
|
||||||
|
try{
|
||||||
|
$subQuery = Refund::join('transactions', 'refunds.transaction_id', '=', 'transactions.id')
|
||||||
|
->join('users as s', 'transactions.penjual','=','s.email')
|
||||||
|
->select(
|
||||||
|
'refunds.id',
|
||||||
|
'refunds.total',
|
||||||
|
'refunds.due_date',
|
||||||
|
'refunds.created_at',
|
||||||
|
'refunds.status',
|
||||||
|
'transactions.nama_barang',
|
||||||
|
DB::raw("CONCAT(s.nama_depan,' ',s.nama_belakang) as nama_penjual"),
|
||||||
|
);
|
||||||
|
|
||||||
|
if($request->has('search') && !empty($request->search['value'])){
|
||||||
|
$searchRefund = $request->search['value'];
|
||||||
|
if(!is_numeric($searchRefund)){
|
||||||
|
$subQuery->where(function($a) use ($searchRefund){
|
||||||
|
$a->whereRaw("LOWER(CONCAT(s.nama_depan,' ',s.nama_belakang)) LIKE ?",['%'.strtolower($searchRefund).'%'])
|
||||||
|
->orWhereRaw('LOWER(transactions.nama_barang) LIKE ?',['%'.strtolower($searchRefund).'%'])
|
||||||
|
->orWhereRaw('LOWER(refunds.status) LIKE ?',['%'.strtolower($searchRefund).'%']);
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
$subQuery->where(function($a) use ($searchRefund){
|
||||||
|
$a->whereDay('refunds.created_at', '=', $searchRefund)
|
||||||
|
->orWhereMonth('refunds.created_at', '=', $searchRefund)
|
||||||
|
->orWhereYear('refunds.created_at', '=', $searchRefund)
|
||||||
|
->orWhereDay('refunds.due_date', '=', $searchRefund)
|
||||||
|
->orWhereMonth('refunds.due_date', '=', $searchRefund)
|
||||||
|
->orWhereYear('refunds.due_date', '=', $searchRefund)
|
||||||
|
->orWhere('refunds.total', '=', $searchRefund);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$queryRefund = Refund::from(DB::raw("({$subQuery->toSql()}) as tmp"))
|
||||||
|
->mergeBindings($subQuery->getQuery()) // Menggabungkan binding parameters
|
||||||
|
->select('*')
|
||||||
|
->get();
|
||||||
|
|
||||||
|
if ($request->ajax()) {
|
||||||
|
return DataTables::of($queryRefund)
|
||||||
|
->addIndexColumn()
|
||||||
|
->addColumn('action', function ($row) {
|
||||||
|
$url = route('user-refund.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']);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,6 @@ namespace App\Http\Controllers\Admin\Dashboard;
|
|||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use App\Models\Transactions;
|
|
||||||
use App\Models\Transaction;
|
use App\Models\Transaction;
|
||||||
use App\Models\Refund;
|
use App\Models\Refund;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
@ -15,7 +14,6 @@ class AdminDashboardController extends Controller
|
|||||||
{
|
{
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$transactions = Transactions::allTransactions();
|
|
||||||
$currentMonth = Carbon::now()->month;
|
$currentMonth = Carbon::now()->month;
|
||||||
$currentYear = Carbon::now()->year;
|
$currentYear = Carbon::now()->year;
|
||||||
|
|
||||||
@ -73,7 +71,7 @@ class AdminDashboardController extends Controller
|
|||||||
return view('admin.index', compact('transactions', 'countSuccess', 'countPending', 'countCancelled', 'countRefund', 'totalRefund', 'totalUser', 'totalTransaction', 'dataChartTransaction', 'dataChartRefund', 'dataChartTotalUser', 'dataChartTotalRefund', 'transactions'));
|
return view('admin.index', compact('transactions', 'countSuccess', 'countPending', 'countCancelled', 'countRefund', 'totalRefund', 'totalUser', 'totalTransaction', 'dataChartTransaction', 'dataChartRefund', 'dataChartTotalUser', 'dataChartTotalRefund', 'transactions'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getChartByMonth()
|
public function getSelectedChart()
|
||||||
{
|
{
|
||||||
$dataChartLaporan = [];
|
$dataChartLaporan = [];
|
||||||
$tahun = Carbon::now()->year;
|
$tahun = Carbon::now()->year;
|
||||||
|
@ -18,11 +18,11 @@ class InvoiceController extends Controller
|
|||||||
|
|
||||||
public function exportInvoice(Request $request)
|
public function exportInvoice(Request $request)
|
||||||
{
|
{
|
||||||
// $transaction = Transaction::findOrFail($request->id);
|
$transaction = Transaction::findOrFail($request->id);
|
||||||
// $pdf = Pdf::loadView('invoice.export-invoice',compact('transaction'))->setPaper('A4','Portrait');
|
$pdf = Pdf::loadView('invoice.export-invoice',compact('transaction'))->setPaper('A4','Portrait');
|
||||||
// return $pdf->download("invoice-$request->id.pdf");
|
return $pdf->download("invoice-$request->id.pdf");
|
||||||
return view('invoice.export-invoice', [
|
// return view('invoice.export-invoice', [
|
||||||
'transaction' => Transaction::findOrFail($request->id),
|
// 'transaction' => Transaction::findOrFail($request->id),
|
||||||
]);
|
// ]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,8 @@ namespace App\Http\Controllers\User\Dashboard;
|
|||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use App\Models\RefundUser;
|
use App\Models\RefundUser;
|
||||||
|
use App\Models\Transaction;
|
||||||
|
use Carbon\Carbon;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
use Illuminate\Support\Facades\Log;
|
use Illuminate\Support\Facades\Log;
|
||||||
@ -12,9 +14,46 @@ use Throwable;
|
|||||||
|
|
||||||
class UserDashboardController extends Controller
|
class UserDashboardController extends Controller
|
||||||
{
|
{
|
||||||
public function index(){
|
public function index()
|
||||||
return view('user.index',[
|
{
|
||||||
"refundUserss"=>RefundUser::HistoryRefundUser(),
|
$currentMonth = Carbon::now()->month;
|
||||||
]);
|
$currentYear = Carbon::now()->year;
|
||||||
|
$currentRole = 'Pembeli';
|
||||||
|
|
||||||
|
$countCreated = Transaction::where('status_transaksi', 'created')
|
||||||
|
->whereMonth('updated_at', $currentMonth)
|
||||||
|
->whereYear('updated_at', $currentYear)
|
||||||
|
->where('pembeli', auth()->user()->email)
|
||||||
|
->count();
|
||||||
|
|
||||||
|
$countPending = Transaction::where('status_pembayaran', 'pending')
|
||||||
|
->whereMonth('updated_at', $currentMonth)
|
||||||
|
->whereYear('updated_at', $currentYear)
|
||||||
|
->where('pembeli', auth()->user()->email)
|
||||||
|
->count();
|
||||||
|
|
||||||
|
$countFailure = Transaction::whereIn('status_pembayaran', ['cancel', 'expire', 'failure'])
|
||||||
|
->whereMonth('updated_at', $currentMonth)
|
||||||
|
->whereYear('updated_at', $currentYear)
|
||||||
|
->where('pembeli', auth()->user()->email)
|
||||||
|
->count();
|
||||||
|
|
||||||
|
$sumRefund = '';
|
||||||
|
|
||||||
|
$sumTransaksi = '';
|
||||||
|
|
||||||
|
return view('user.index');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getSelectedChart(){
|
||||||
|
$currentMonth = Carbon::now()->month;
|
||||||
|
$currentYear = Carbon::now()->year;
|
||||||
|
$currentRole = 'Pembeli';
|
||||||
|
|
||||||
|
if($currentRole == 'Pembeli'){
|
||||||
|
|
||||||
|
}else{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -115,7 +115,7 @@ class PenjualController extends Controller
|
|||||||
';
|
';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($row->status_transaksi == 'sent') {
|
if ($row->status_transaksi == 'sending') {
|
||||||
$html_code .=
|
$html_code .=
|
||||||
'
|
'
|
||||||
<li><a class="dropdown-item" data-toggle="modal"
|
<li><a class="dropdown-item" data-toggle="modal"
|
||||||
@ -127,6 +127,18 @@ class PenjualController extends Controller
|
|||||||
</li>
|
</li>
|
||||||
';
|
';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($row->status_transaksi == 'finished') {
|
||||||
|
$html_code .=
|
||||||
|
'
|
||||||
|
<li><a class="dropdown-item" id="acceptResult"
|
||||||
|
data-id="' .
|
||||||
|
$row->id .
|
||||||
|
'"
|
||||||
|
href="#">Terima Uang</a>
|
||||||
|
</li>
|
||||||
|
';
|
||||||
|
}
|
||||||
$html_code .= '
|
$html_code .= '
|
||||||
</ul>
|
</ul>
|
||||||
</div>';
|
</div>';
|
||||||
@ -336,11 +348,21 @@ class PenjualController extends Controller
|
|||||||
'message' => 'Gagal update status karena kesalahan server.',
|
'message' => 'Gagal update status karena kesalahan server.',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return response([
|
public function acceptResult(Request $request)
|
||||||
'status' => true,
|
{
|
||||||
'message' => 'Sukses kirim data.',
|
try{
|
||||||
'data' => $request,
|
|
||||||
|
}catch(Throwable $e){
|
||||||
|
DB::rollBack();
|
||||||
|
|
||||||
|
Log::error($e->getMessage());
|
||||||
|
|
||||||
|
return response()->json([
|
||||||
|
'status' => false,
|
||||||
|
'message' => 'Gagal update status karena kesalahan server.',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ return new class extends Migration
|
|||||||
$table->string('token')->nullable();
|
$table->string('token')->nullable();
|
||||||
$table->string('metode_pembayaran')->nullable();
|
$table->string('metode_pembayaran')->nullable();
|
||||||
$table->string('fraud_status')->nullable();
|
$table->string('fraud_status')->nullable();
|
||||||
$table->enum('status_transaksi',['success','challenge','failure','process','sending','sent','finished','created', 'refund'])->default('created'); // transaction_status
|
$table->enum('status_transaksi',['success','challenge','failure','process','sending','sent','finished','created', 'refund', 'done'])->default('created'); // transaction_status
|
||||||
$table->enum('status_pembayaran',['settlement','capture','pending','expire','failure','cancel','refund'])->nullable(); // status transaksi dari midtrans
|
$table->enum('status_pembayaran',['settlement','capture','pending','expire','failure','cancel','refund'])->nullable(); // status transaksi dari midtrans
|
||||||
$table->timestamp('batas_pembayaran')->nullable();
|
$table->timestamp('batas_pembayaran')->nullable();
|
||||||
$table->timestamp('batas_konfirmasi_transaksi')->nullable();
|
$table->timestamp('batas_konfirmasi_transaksi')->nullable();
|
||||||
|
@ -130,32 +130,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<canvas id="myChart1"></canvas>
|
<canvas id="myChart1"></canvas>
|
||||||
{{-- <div class="statistic-details mt-sm-4">
|
|
||||||
<div class="statistic-details-item">
|
|
||||||
<span class="text-muted"><span class="text-primary"><i
|
|
||||||
class="fas fa-caret-up"></i></span> 7%</span>
|
|
||||||
<div class="detail-value">$243</div>
|
|
||||||
<div class="detail-name">Today's Sales</div>
|
|
||||||
</div>
|
|
||||||
<div class="statistic-details-item">
|
|
||||||
<span class="text-muted"><span class="text-danger"><i
|
|
||||||
class="fas fa-caret-down"></i></span> 23%</span>
|
|
||||||
<div class="detail-value">$2,902</div>
|
|
||||||
<div class="detail-name">This Week's Sales</div>
|
|
||||||
</div>
|
|
||||||
<div class="statistic-details-item">
|
|
||||||
<span class="text-muted"><span class="text-primary"><i
|
|
||||||
class="fas fa-caret-up"></i></span>9%</span>
|
|
||||||
<div class="detail-value">$12,821</div>
|
|
||||||
<div class="detail-name">This Month's Sales</div>
|
|
||||||
</div>
|
|
||||||
<div class="statistic-details-item">
|
|
||||||
<span class="text-muted"><span class="text-primary"><i
|
|
||||||
class="fas fa-caret-up"></i></span> 19%</span>
|
|
||||||
<div class="detail-value">$92,142</div>
|
|
||||||
<div class="detail-name">This Year's Sales</div>
|
|
||||||
</div>
|
|
||||||
</div> --}}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -298,89 +272,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{-- <div class="row">
|
|
||||||
<div class="col-12">
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-header">
|
|
||||||
<div class="container">
|
|
||||||
<h2>History Transaction</h2>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="card-body">
|
|
||||||
<div class="table-responsive">
|
|
||||||
<table class="table table-striped" id="table-4">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th class="text-center">
|
|
||||||
#
|
|
||||||
</th>
|
|
||||||
<th>Nama Barang</th>
|
|
||||||
<th>Pembeli</th>
|
|
||||||
<th>Penjual</th>
|
|
||||||
<th>Total</th>
|
|
||||||
<th>Tanggal Transaksi</th>
|
|
||||||
<th>Tanggal Update</th>
|
|
||||||
<th>Status</th>
|
|
||||||
<th>Aksi</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
@foreach ($transactions as $transaction)
|
|
||||||
<tr>
|
|
||||||
<td>{{ $loop->iteration }}</td>
|
|
||||||
<td>{{ $transaction->nama_barang }}</td>
|
|
||||||
<td>{{ $transaction->data_pembeli->nama_depan . ' ' . $transaction->data_pembeli->nama_belakang }}
|
|
||||||
</td>
|
|
||||||
<td>{{ $transaction->data_penjual->nama_depan . ' ' . $transaction->data_penjual->nama_belakang }}
|
|
||||||
</td>
|
|
||||||
<td>Rp {{ number_format($transaction->total_bayar, 2, ',', '.') }}</td>
|
|
||||||
<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'])
|
|
||||||
? 'badge-light'
|
|
||||||
: (in_array($transaction->status, ['settlement', 'capture'])
|
|
||||||
? 'badge-info'
|
|
||||||
: (in_array($transaction->status, ['process', 'sending', 'sended'])
|
|
||||||
? 'badge-warning'
|
|
||||||
: (in_array($transaction->status, ['cancel', 'expire', 'failure', 'refund'])
|
|
||||||
? 'badge-danger'
|
|
||||||
: ($transaction->status == 'finished'
|
|
||||||
? 'badge-success'
|
|
||||||
: '')))) }}">{{ ucwords($transaction->status) }}</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">
|
|
||||||
...
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<ul class="dropdown-menu">
|
|
||||||
<li><a class="dropdown-item"
|
|
||||||
href="{{ route('admin-transaction.show', $transaction->id) }}">Detail</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
@if (!$transaction->transactionDescription->isEmpty())
|
|
||||||
<li><a class="dropdown-item" data-toggle="modal"
|
|
||||||
data-target="#modalTracking"
|
|
||||||
data-transaction="{{ $transaction->transactionDescription }}">Tracking</a>
|
|
||||||
</li>
|
|
||||||
@endif
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
@endforeach
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div> --}}
|
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
@include('admin.transaction.modal-tracking')
|
@include('admin.transaction.modal-tracking')
|
||||||
|
@ -2,54 +2,23 @@
|
|||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header d-flex justify-content-center">
|
<div class="modal-header d-flex justify-content-center">
|
||||||
<h3 class="modal-title fs-5" id="staticBackdropLabel">Keterangan Status Transaksi</h3>
|
<h3 class="modal-title fs-5" id="staticBackdropLabel">Keterangan Status Refund</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="badge badge-light">Created</label>
|
<label class="badge badge-light">Pending</label>
|
||||||
<p class="form-control">Transaksi baru telah dibuat oleh pembeli.</p>
|
<p class="form-control">Pembeli sudah mengajukan refund dan menunggu persetujuan dari admin.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="badge badge-dark">Challenge</label>
|
<label class="badge badge-success">Refund</label>
|
||||||
<p class="form-control">Transaksi diduga penipuan dan perlu direview oleh admin.</p>
|
<p class="form-control">Admin menyetujui pengajuan refund pembeli dan uang akan dikembalikan ke
|
||||||
|
pembeli.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="badge badge-info">Success</label>
|
<label class="badge badge-danger">Deny</label>
|
||||||
<p class="form-control">Transaksi sukses dibayar dan akan dilanjutkan ke pihak penjual</p>
|
<p class="form-control">Admin menolak pengajuan refund pembeli dan transaksi akan diselesaikan.</p>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-3">
|
|
||||||
<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="badge badge-warning">Process</label>
|
|
||||||
<p class="form-control">Transaksi/pesanan pembeli sedang diproses oleh penjual.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-3">
|
|
||||||
<label class="badge badge-warning">Sending</label>
|
|
||||||
<p class="form-control">Pesanan sedang dikirim oleh penjual.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-3">
|
|
||||||
<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="badge badge-success">Finished</label>
|
|
||||||
<p class="form-control">Transaksi telah selesai dan diselesaikan oleh pembeli.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-3">
|
|
||||||
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -120,7 +120,7 @@
|
|||||||
return `<a href="#" data-toggle="modal" data-target="#modalKeteranganStatus" class="badge badge-danger">
|
return `<a href="#" data-toggle="modal" data-target="#modalKeteranganStatus" class="badge badge-danger">
|
||||||
${row.status_transaksi.charAt(0).toUpperCase()}${row.status_transaksi.slice(1)}
|
${row.status_transaksi.charAt(0).toUpperCase()}${row.status_transaksi.slice(1)}
|
||||||
</a>`;
|
</a>`;
|
||||||
} else if (row.status_transaksi == 'finished') {
|
} else if (['finished', 'done'].includes(row.status_transaksi)) {
|
||||||
return `<a href="#" data-toggle="modal" data-target="#modalKeteranganStatus" class="badge badge-success">
|
return `<a href="#" data-toggle="modal" data-target="#modalKeteranganStatus" class="badge badge-success">
|
||||||
${row.status_transaksi.charAt(0).toUpperCase()}${row.status_transaksi.slice(1)}
|
${row.status_transaksi.charAt(0).toUpperCase()}${row.status_transaksi.slice(1)}
|
||||||
</a>`;
|
</a>`;
|
||||||
|
@ -47,6 +47,11 @@
|
|||||||
<p class="form-control">Transaksi telah selesai dan diselesaikan oleh pembeli.</p>
|
<p class="form-control">Transaksi telah selesai dan diselesaikan oleh pembeli.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="badge badge-success">Done</label>
|
||||||
|
<p class="form-control">Transaksi selesai dan uang akan dikirim ke penjual.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="badge badge-danger">Refund</label>
|
<label class="badge badge-danger">Refund</label>
|
||||||
<p class="form-control">Transaksi ditandai oleh pembeli untuk dikembalikan/retur dikarenakan
|
<p class="form-control">Transaksi ditandai oleh pembeli untuk dikembalikan/retur dikarenakan
|
||||||
|
@ -4,49 +4,59 @@
|
|||||||
<div class="main-content">
|
<div class="main-content">
|
||||||
<section class="section">
|
<section class="section">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-4 col-md-4 col-sm-12">
|
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||||
<div class="card card-statistic-2">
|
<div class="card card-statistic-2">
|
||||||
<div class="card-stats">
|
<div class="card-stats">
|
||||||
<div class="card-stats-title">List Transaction -
|
<div class="card-stats-title">List Transaction -
|
||||||
<div class="dropdown d-inline">
|
<div class="dropdown d-inline">
|
||||||
<a class="font-weight-600 dropdown-toggle" data-toggle="dropdown" href="#"
|
<a class="font-weight-600 dropdown-toggle" data-toggle="dropdown" href="#"
|
||||||
id="orders-month">August</a>
|
id="orders-month">August</a>
|
||||||
<ul class="dropdown-menu dropdown-menu-sm">
|
<ul class="dropdown-menu dropdown-menu-sm" aria-labelledby="orders-month"
|
||||||
<li class="dropdown-title">Select Month</li>
|
id="dropdownMenu1">
|
||||||
<li><a href="#" class="dropdown-item">January</a></li>
|
<li class="dropdown-title">Pilih Bulan</li>
|
||||||
<li><a href="#" class="dropdown-item">February</a></li>
|
<li><a href="#" class="dropdown-item">Januari</a></li>
|
||||||
<li><a href="#" class="dropdown-item">March</a></li>
|
<li><a href="#" class="dropdown-item">Februari</a></li>
|
||||||
|
<li><a href="#" class="dropdown-item">Maret</a></li>
|
||||||
<li><a href="#" class="dropdown-item">April</a></li>
|
<li><a href="#" class="dropdown-item">April</a></li>
|
||||||
<li><a href="#" class="dropdown-item">May</a></li>
|
<li><a href="#" class="dropdown-item">May</a></li>
|
||||||
<li><a href="#" class="dropdown-item">June</a></li>
|
<li><a href="#" class="dropdown-item">Juni</a></li>
|
||||||
<li><a href="#" class="dropdown-item">July</a></li>
|
<li><a href="#" class="dropdown-item">Juli</a></li>
|
||||||
<li><a href="#" class="dropdown-item">August</a></li>
|
<li><a href="#" class="dropdown-item">Agustus</a></li>
|
||||||
<li><a href="#" class="dropdown-item">September</a></li>
|
<li><a href="#" class="dropdown-item">September</a></li>
|
||||||
<li><a href="#" class="dropdown-item">October</a></li>
|
<li><a href="#" class="dropdown-item">Oktober</a></li>
|
||||||
<li><a href="#" class="dropdown-item">November</a></li>
|
<li><a href="#" class="dropdown-item">November</a></li>
|
||||||
<li><a href="#" class="dropdown-item">December</a></li>
|
<li><a href="#" class="dropdown-item">Desember</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<ul class="dropdown-menu dropdown-menu-sm">
|
</div>
|
||||||
<li class="dropdown-title">Select Year</li>
|
<div class="dropdown d-inline">
|
||||||
<li><a href="#" class="dropdown-item">January</a></li>
|
<a class="font-weight-600 dropdown-toggle" data-toggle="dropdown" href="#"
|
||||||
<li><a href="#" class="dropdown-item">February</a></li>
|
id="orders-year">2023</a>
|
||||||
<li><a href="#" class="dropdown-item">March</a></li>
|
<ul class="dropdown-menu dropdown-menu-sm" aria-labelledby="orders-year"
|
||||||
<li><a href="#" class="dropdown-item">April</a></li>
|
id="dropdownMenu2">
|
||||||
<li><a href="#" class="dropdown-item">May</a></li>
|
<li class="dropdown-title">Pilih Tahun</li>
|
||||||
<li><a href="#" class="dropdown-item">June</a></li>
|
<li><a href="#" class="dropdown-item">2019</a></li>
|
||||||
<li><a href="#" class="dropdown-item">July</a></li>
|
<li><a href="#" class="dropdown-item">2020</a></li>
|
||||||
<li><a href="#" class="dropdown-item">August</a></li>
|
<li><a href="#" class="dropdown-item">2021</a></li>
|
||||||
<li><a href="#" class="dropdown-item">September</a></li>
|
<li><a href="#" class="dropdown-item">2022</a></li>
|
||||||
<li><a href="#" class="dropdown-item">October</a></li>
|
<li><a href="#" class="dropdown-item">2023</a></li>
|
||||||
<li><a href="#" class="dropdown-item">November</a></li>
|
</ul>
|
||||||
<li><a href="#" class="dropdown-item">December</a></li>
|
</div>
|
||||||
|
Sebagai -
|
||||||
|
<div class="dropdown d-inline">
|
||||||
|
<a class="font-weight-600 dropdown-toggle" data-toggle="dropdown" href="#"
|
||||||
|
id="orders-role">Pembeli</a>
|
||||||
|
<ul class="dropdown-menu dropdown-menu-sm" aria-labelledby="orders-role"
|
||||||
|
id="dropdownMenu3">
|
||||||
|
<li class="dropdown-title">Pilih Peran</li>
|
||||||
|
<li><a href="#" class="dropdown-item">Pembeli</a></li>
|
||||||
|
<li><a href="#" class="dropdown-item">Penjual</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-stats-items">
|
<div class="card-stats-items">
|
||||||
<div class="card-stats-item">
|
<div class="card-stats-item">
|
||||||
<div class="card-stats-item-count">114</div>
|
<div class="card-stats-item-count">114</div>
|
||||||
<div class="card-stats-item-label">Success</div>
|
<div class="card-stats-item-label">Dibuat</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-stats-item">
|
<div class="card-stats-item">
|
||||||
<div class="card-stats-item-count">12</div>
|
<div class="card-stats-item-count">12</div>
|
||||||
@ -54,7 +64,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card-stats-item">
|
<div class="card-stats-item">
|
||||||
<div class="card-stats-item-count">23</div>
|
<div class="card-stats-item-count">23</div>
|
||||||
<div class="card-stats-item-label">Canceled</div>
|
<div class="card-stats-item-label">Gagal</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -63,15 +73,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card-wrap">
|
<div class="card-wrap">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h4>Total Transaction</h4>
|
<h4>Jumlah Transaction</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
159
|
159 Transaksi
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-4 col-md-4 col-sm-12">
|
{{-- <div class="col-lg-4 col-md-4 col-sm-12">
|
||||||
<div class="card card-statistic-2">
|
<div class="card card-statistic-2">
|
||||||
<div class="card-chart">
|
<div class="card-chart">
|
||||||
<canvas id="balance-chart" height="80"></canvas>
|
<canvas id="balance-chart" height="80"></canvas>
|
||||||
@ -81,10 +91,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="card-wrap">
|
<div class="card-wrap">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h4>Total Refund</h4>
|
<h4>Jumlah Refund</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
190
|
190 Bulan ini
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -102,19 +112,29 @@
|
|||||||
<h4>Total Transaction </h4>
|
<h4>Total Transaction </h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
109 </div>
|
109 Bulan ini</div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div> --}}
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
<div class="alert alert-primary alert-dismissible fade show mb-3" role="alert">
|
||||||
|
Pendapatan Hari Ini meningkat <span class="mdi mdi-arrow-up-bold"></span>
|
||||||
|
5.27%</span>
|
||||||
|
</div>
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
<h4>INCOME</h4>
|
<h4 style="font-size: 36px;">Transaksi</h4>
|
||||||
|
<div class="card-header-action">
|
||||||
|
<div class="btn-group">
|
||||||
|
<a href="#" class="btn btn-primary">Week</a>
|
||||||
|
<a href="#" class="btn">Month</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<canvas id="myChart" height="158">1412</canvas>
|
<canvas id="myChart" height="150"></canvas>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -131,11 +151,11 @@
|
|||||||
var myChart = new Chart(ctx, {
|
var myChart = new Chart(ctx, {
|
||||||
type: 'line',
|
type: 'line',
|
||||||
data: {
|
data: {
|
||||||
labels: ["January", "February", "March", "April", "May", "June", "July", "August", "September",
|
labels: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Agu", "Sep",
|
||||||
"Oktober", "November", "December"
|
"Okt", "Nov", "Des"
|
||||||
],
|
],
|
||||||
datasets: [{
|
datasets: [{
|
||||||
label: 'Transaction',
|
label: 'Transaksi',
|
||||||
data: [3200, 18009, 4305, 3022, 6310, 5120, 5880, 6154, 0],
|
data: [3200, 18009, 4305, 3022, 6310, 5120, 5880, 6154, 0],
|
||||||
borderWidth: 2,
|
borderWidth: 2,
|
||||||
backgroundColor: 'rgba(63,82,227,.8)',
|
backgroundColor: 'rgba(63,82,227,.8)',
|
||||||
@ -162,12 +182,13 @@
|
|||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
layout: {
|
layout: {
|
||||||
padding: 20,
|
padding: 10,
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
display: true,
|
display: true,
|
||||||
labels: {
|
labels: {
|
||||||
padding: 20,
|
padding: 10,
|
||||||
|
fontSize: 16
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
scales: {
|
scales: {
|
||||||
@ -186,13 +207,22 @@
|
|||||||
style: 'currency',
|
style: 'currency',
|
||||||
currency: 'IDR',
|
currency: 'IDR',
|
||||||
}).format(value);
|
}).format(value);
|
||||||
}
|
},
|
||||||
}
|
fontSize: 14,
|
||||||
|
},
|
||||||
|
scaleLabel: {
|
||||||
|
display: true,
|
||||||
|
labelString: 'Dalam Ratusan Juta', // Label khusus untuk sumbu Y
|
||||||
|
fontSize: 16 // Ukuran font untuk label sumbu Y
|
||||||
|
},
|
||||||
}],
|
}],
|
||||||
xAxes: [{
|
xAxes: [{
|
||||||
gridLines: {
|
gridLines: {
|
||||||
display: true,
|
display: true,
|
||||||
tickMarkLength: 15,
|
tickMarkLength: 15,
|
||||||
|
},
|
||||||
|
ticks: {
|
||||||
|
fontSize: 16,
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
|
@ -2,54 +2,23 @@
|
|||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header d-flex justify-content-center">
|
<div class="modal-header d-flex justify-content-center">
|
||||||
<h3 class="modal-title fs-5" id="staticBackdropLabel">Keterangan Status Transaksi</h3>
|
<h3 class="modal-title fs-5" id="staticBackdropLabel">Keterangan Status Refund</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="badge badge-light">Created</label>
|
<label class="badge badge-light">Pending</label>
|
||||||
<p class="form-control">Transaksi baru telah dibuat oleh pembeli.</p>
|
<p class="form-control">Pembeli sudah mengajukan refund dan menunggu persetujuan dari admin.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="badge badge-dark">Challenge</label>
|
<label class="badge badge-success">Refund</label>
|
||||||
<p class="form-control">Transaksi diduga penipuan dan perlu direview oleh admin.</p>
|
<p class="form-control">Admin menyetujui pengajuan refund pembeli dan uang akan dikembalikan ke
|
||||||
|
pembeli.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="badge badge-info">Success</label>
|
<label class="badge badge-danger">Deny</label>
|
||||||
<p class="form-control">Transaksi sukses dibayar dan akan dilanjutkan ke pihak penjual</p>
|
<p class="form-control">Admin menolak pengajuan refund pembeli dan transaksi akan diselesaikan.</p>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-3">
|
|
||||||
<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="badge badge-warning">Process</label>
|
|
||||||
<p class="form-control">Transaksi/pesanan pembeli sedang diproses oleh penjual.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-3">
|
|
||||||
<label class="badge badge-warning">Sending</label>
|
|
||||||
<p class="form-control">Pesanan sedang dikirim oleh penjual.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-3">
|
|
||||||
<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="badge badge-success">Finished</label>
|
|
||||||
<p class="form-control">Transaksi telah selesai dan diselesaikan oleh pembeli.</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mb-3">
|
|
||||||
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -143,7 +143,7 @@
|
|||||||
return `<a href="#" data-toggle="modal" data-target="#modalKeteranganStatus" class="badge badge-danger">
|
return `<a href="#" data-toggle="modal" data-target="#modalKeteranganStatus" class="badge badge-danger">
|
||||||
${row.status_transaksi.charAt(0).toUpperCase()}${row.status_transaksi.slice(1)}
|
${row.status_transaksi.charAt(0).toUpperCase()}${row.status_transaksi.slice(1)}
|
||||||
</a>`;
|
</a>`;
|
||||||
} else if (row.status_transaksi == 'finished') {
|
} else if (['finished', 'done'].includes(row.status_transaksi)) {
|
||||||
return `<a href="#" data-toggle="modal" data-target="#modalKeteranganStatus" class="badge badge-success">
|
return `<a href="#" data-toggle="modal" data-target="#modalKeteranganStatus" class="badge badge-success">
|
||||||
${row.status_transaksi.charAt(0).toUpperCase()}${row.status_transaksi.slice(1)}
|
${row.status_transaksi.charAt(0).toUpperCase()}${row.status_transaksi.slice(1)}
|
||||||
</a>`;
|
</a>`;
|
||||||
|
@ -47,6 +47,11 @@
|
|||||||
<p class="form-control">Transaksi telah selesai dan diselesaikan oleh pembeli.</p>
|
<p class="form-control">Transaksi telah selesai dan diselesaikan oleh pembeli.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="badge badge-success">Done</label>
|
||||||
|
<p class="form-control">Transaksi selesai dan uang akan dikirim ke penjual.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="badge badge-danger">Refund</label>
|
<label class="badge badge-danger">Refund</label>
|
||||||
<p class="form-control">Transaksi ditandai oleh pembeli untuk dikembalikan/retur dikarenakan
|
<p class="form-control">Transaksi ditandai oleh pembeli untuk dikembalikan/retur dikarenakan
|
||||||
|
@ -134,7 +134,7 @@
|
|||||||
return `<a href="#" data-toggle="modal" data-target="#modalKeteranganStatus" class="badge badge-danger">
|
return `<a href="#" data-toggle="modal" data-target="#modalKeteranganStatus" class="badge badge-danger">
|
||||||
${row.status_transaksi.charAt(0).toUpperCase()}${row.status_transaksi.slice(1)}
|
${row.status_transaksi.charAt(0).toUpperCase()}${row.status_transaksi.slice(1)}
|
||||||
</a>`;
|
</a>`;
|
||||||
} else if (row.status_transaksi == 'finished') {
|
} else if (['finished', 'done'].includes(row.status_transaksi)) {
|
||||||
return `<a href="#" data-toggle="modal" data-target="#modalKeteranganStatus" class="badge badge-success">
|
return `<a href="#" data-toggle="modal" data-target="#modalKeteranganStatus" class="badge badge-success">
|
||||||
${row.status_transaksi.charAt(0).toUpperCase()}${row.status_transaksi.slice(1)}
|
${row.status_transaksi.charAt(0).toUpperCase()}${row.status_transaksi.slice(1)}
|
||||||
</a>`;
|
</a>`;
|
||||||
@ -532,6 +532,49 @@
|
|||||||
|
|
||||||
$('#acceptResult').on('click', function() {
|
$('#acceptResult').on('click', function() {
|
||||||
const csrfToken = $('meta[name="csrf-token"]').attr('content');
|
const csrfToken = $('meta[name="csrf-token"]').attr('content');
|
||||||
|
const id = $(this).data('id');
|
||||||
|
|
||||||
|
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-penjual.accept-result') }}",
|
||||||
|
type: 'PUT',
|
||||||
|
data: {
|
||||||
|
id: id,
|
||||||
|
},
|
||||||
|
success: function(response) {
|
||||||
|
Swal.fire({
|
||||||
|
title: response.status ? 'Berhasil' : 'Gagal',
|
||||||
|
text: response.message,
|
||||||
|
icon: response.status ? 'success' : 'error',
|
||||||
|
confirmButtonText: 'OK',
|
||||||
|
}).then(function() {
|
||||||
|
if (response.status) {
|
||||||
|
listPenjual.ajax.reload();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
error: function(error) {
|
||||||
|
Swal.fire({
|
||||||
|
title: 'Gagal',
|
||||||
|
text: 'Terjadi error di server',
|
||||||
|
icon: 'error'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header d-flex justify-content-center">
|
<div class="modal-header d-flex justify-content-center">
|
||||||
<h3 class="modal-title fs-5" id="staticBackdropLabel">Keterangan Status Transaksi</h3>
|
<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>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
@ -46,6 +47,11 @@
|
|||||||
<p class="form-control">Transaksi telah selesai dan diselesaikan oleh pembeli.</p>
|
<p class="form-control">Transaksi telah selesai dan diselesaikan oleh pembeli.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="mb-3">
|
||||||
|
<label class="badge badge-success">Done</label>
|
||||||
|
<p class="form-control">Transaksi selesai dan uang akan dikirim ke penjual.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="badge badge-danger">Refund</label>
|
<label class="badge badge-danger">Refund</label>
|
||||||
<p class="form-control">Transaksi ditandai oleh pembeli untuk dikembalikan/retur dikarenakan
|
<p class="form-control">Transaksi ditandai oleh pembeli untuk dikembalikan/retur dikarenakan
|
||||||
|
@ -16,10 +16,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
width: 80%;
|
width: 90%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,8 +28,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.info-user,
|
.info-user,
|
||||||
.data-barang,
|
.rincian-pesanan,
|
||||||
.info-pembayaran {
|
.info-pembayaran,
|
||||||
|
.data-pesanan {
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
@ -39,30 +38,23 @@
|
|||||||
table p {
|
table p {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
color: #414141;
|
color: #191919;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
table h3 {
|
table h3 {
|
||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
color: #414141;
|
color: #191919;
|
||||||
}
|
}
|
||||||
|
|
||||||
table span {
|
table span {
|
||||||
font-size: 0.9rem;
|
font-size: 0.9rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
table h4 {
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: 1.1rem;
|
|
||||||
color: rgb(31, 31, 31);
|
|
||||||
text-transform: capitalize;
|
|
||||||
}
|
|
||||||
|
|
||||||
table label {
|
table label {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
color: #777777;
|
color: #4d4d4d;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,6 +74,10 @@
|
|||||||
padding-top: 40px;
|
padding-top: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pb-1 {
|
||||||
|
padding-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.pr-1 {
|
.pr-1 {
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
}
|
}
|
||||||
@ -90,7 +86,51 @@
|
|||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.data-barang thead {
|
.info-user td:first-child {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-pembayaran {
|
||||||
|
margin-top: 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-pembayaran label {
|
||||||
|
font-size: 0.85rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-pembayaran p {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-pembayaran td:first-child {
|
||||||
|
opacity: 1%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info-pembayaran td:last-child {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
background: whitesmoke;
|
||||||
|
width: 60%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-pesanan {
|
||||||
|
background: whitesmoke;
|
||||||
|
margin: 15px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-pesanan thead {
|
||||||
|
height: 40px;
|
||||||
|
text-transform: capitalize;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
padding: 20px 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-pesanan td {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
padding: 20px 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rincian-pesanan thead {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
text-transform: capitalize;
|
text-transform: capitalize;
|
||||||
background: #900C3F;
|
background: #900C3F;
|
||||||
@ -98,40 +138,37 @@
|
|||||||
font-size: 0.85rem;
|
font-size: 0.85rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.data-barang thead th:first-child {
|
.rincian-pesanan thead th:first-child {
|
||||||
border-top-left-radius: 1rem;
|
border-top-left-radius: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.data-barang thead th:last-child {
|
.rincian-pesanan thead th:last-child {
|
||||||
border-top-right-radius: 1rem;
|
border-top-right-radius: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.data-barang th {
|
.rincian-pesanan th {
|
||||||
padding: 10px 15px;
|
padding: 10px 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.data-barang tbody {
|
.rincian-pesanan tbody {
|
||||||
background: whitesmoke;
|
background: whitesmoke;
|
||||||
}
|
}
|
||||||
|
|
||||||
.data-barang tr {
|
.rincian-pesanan tr {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.data-barang td {
|
.rincian-pesanan td {
|
||||||
color: #414141;
|
color: #414141;
|
||||||
font-size: 0.8rem;
|
font-size: 0.8rem;
|
||||||
padding: 10px 15px;
|
padding: 10px 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.data-barang td:nth-child(2) {
|
.rincian-pesanan td:first-child,
|
||||||
display: flex;
|
.rincian-pesanan td:nth-child(3),
|
||||||
}
|
.rincian-pesanan td:nth-child(4),
|
||||||
|
.rincian-pesanan td:last-child,
|
||||||
.data-barang td:first-child,
|
.rincian-pesanan th:last-child {
|
||||||
.data-barang td:nth-child(3),
|
|
||||||
.data-barang td:nth-child(4),
|
|
||||||
.data-barang th:last-child {
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -139,72 +176,72 @@
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="card">
|
<div class="card">
|
||||||
|
<h3 style="text-align: center;">Nota Pesanan</h3>
|
||||||
<table class="info-user">
|
<table class="info-user">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td class="pt-2">
|
||||||
<h3>Invoice</h3>
|
<p>Pembeli :</p>
|
||||||
</td>
|
</td>
|
||||||
<td align="end"><label>Order #8shd87ugd-18bg-273v</label></td>
|
<td class="pt-2">
|
||||||
</tr>
|
<p>Penjual :</p>
|
||||||
<tr>
|
|
||||||
<td class="pt-4">
|
|
||||||
<p>Pembeli</p>
|
|
||||||
</td>
|
|
||||||
<td align="end" class="pt-4">
|
|
||||||
<p>Penjual</p>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><span>Septea</span></td>
|
<td><span>Septea</span></td>
|
||||||
<td align="end"><span>Takapedia Top Up</span></td>
|
<td><span>Takapedia Top Up</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="pt-0">
|
<td class="pt-0">
|
||||||
<p>Alamat Pembeli</p>
|
<p>Email :</p>
|
||||||
</td>
|
</td>
|
||||||
<td align="end" class="pt-0">
|
</tr>
|
||||||
<p>Alamat Penjual</p>
|
<tr>
|
||||||
|
<td class="pt-0"><span>darwin@gmail.com</span></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="pt-0">
|
||||||
|
<p>Alamat :</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="pr-1"><span>Pondok ponogoro jl.raya bogor no.26 rt 2/2Pondok ponogoro jl.raya bogor no.26
|
<td class="pr-1"><span>Pondok ponogoro jl.raya bogor no.26 rt 2/2Pondok ponogoro jl.raya bogor no.26
|
||||||
rt 2/2</span></td>
|
rt 2/2</span></td>
|
||||||
<td align="end" class="pl-1"><span>Pondok ponogoro jl.raya bogor no.26 rt 2/2Pondok ponogoro
|
|
||||||
jl.raya bogor no.26 rt 2/2</span></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="pt-4">
|
<td class="pt-0" colspan="2">
|
||||||
<p>Payment Method</p>
|
<p>no. HP :</p>
|
||||||
<td align="end" class="pt-4">
|
|
||||||
<p>Tanggal Transaksi</p>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><span>visa ending ***4352</span></td>
|
<td colspan="2"><span>6285753478458</span></td>
|
||||||
<td align="end"><span>11 Nov 2023, 12:06</span></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
|
</table>
|
||||||
|
<table class="data-pesanan">
|
||||||
|
<thead>
|
||||||
|
<th>No. Pesanan</th>
|
||||||
|
<th>Tgl Pesanan</th>
|
||||||
|
<th>Metode Pembayaran</th>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="end" class="pt-0" colspan="2">
|
<td><span>#8shd87ugd-18bg-273v</span></td>
|
||||||
<p>email</p>
|
<td><span>18/02/2024</span></td>
|
||||||
</td>
|
<td><span>Visa ending ***</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<table class="pb-1">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="end" colspan="2"><span>ripannisa@gmail.com</span></td>
|
<td class="pt-0">
|
||||||
</tr>
|
<h4>Rincian Pesanan</h4>
|
||||||
<tr>
|
|
||||||
<td class="pt-4">
|
|
||||||
<h4>Rangkuman Barang</h4>
|
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="start" colspan="2"><span>Semua barang yang di daftarkan dalam transaksi</span></td>
|
<td align="start" colspan="2"><span>Semua pesanan yang di daftarkan dalam transaksi</span></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<div class="table">
|
<table class="rincian-pesanan">
|
||||||
|
|
||||||
</div>
|
|
||||||
<table class="data-barang pt-2">
|
|
||||||
<thead>
|
<thead>
|
||||||
<th>#</th>
|
<th>#</th>
|
||||||
<th>nama barang</th>
|
<th>nama barang</th>
|
||||||
@ -218,41 +255,44 @@
|
|||||||
<td>Iphone 17 Pro Max</td>
|
<td>Iphone 17 Pro Max</td>
|
||||||
<td>Rp.17.994.592,00</td>
|
<td>Rp.17.994.592,00</td>
|
||||||
<td>2</td>
|
<td>2</td>
|
||||||
<td align="end">Rp.35.989.184,00</td>
|
<td>Rp.35.989.184,00</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<table class="info-pembayaran">
|
<table class="info-pembayaran pt-4">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="pt-4">
|
<td>[ini kosongggggggggggggggggggg]</td>
|
||||||
<h4>metode pembayaran</h4>
|
<td><label>subtotal :</label></td>
|
||||||
</td>
|
|
||||||
<td align="end" class="pt-4"><label>subtotal</label></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="end" colspan="2">
|
<td>[kosong]</td>
|
||||||
|
<td colspan="2">
|
||||||
<p>Rp.35.989.184,00</p>
|
<p>Rp.35.989.184,00</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="end" colspan="2" class="pt-1"><label>biaya admin</label></td>
|
<td>[kosong]</td>
|
||||||
|
<td colspan="2" class="pt-1"><label>biaya admin</label></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="end" colspan="2">
|
<td>[kosong]</td>
|
||||||
|
<td colspan="2">
|
||||||
<p>Rp.30.000,00</p>
|
<p>Rp.30.000,00</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td>[kosong]</td>
|
||||||
<td class="py-2">
|
<td class="py-2">
|
||||||
<hr>
|
<hr>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="end" colspan="2"><label>total</label></td>
|
<td>[kosong]</td>
|
||||||
|
<td colspan="2"><label>total</label></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td align="end" colspan="2">
|
<td>[kosong]</td>
|
||||||
|
<td colspan="2">
|
||||||
<p>Rp.30.000,00</p>
|
<p>Rp.30.000,00</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -26,21 +26,6 @@ use Illuminate\Support\Facades\Auth;
|
|||||||
// return $request->user();
|
// return $request->user();
|
||||||
// });
|
// });
|
||||||
|
|
||||||
// Login
|
|
||||||
// Route::group(
|
|
||||||
// [
|
|
||||||
// 'middleware' => 'api',
|
|
||||||
// 'prefix' => 'auth',
|
|
||||||
// ],
|
|
||||||
// function () {
|
|
||||||
|
|
||||||
//
|
|
||||||
// Route::get('me', [LoginApiController::class,'me']);
|
|
||||||
|
|
||||||
// Route::get('status',[LoginApiController::class,'check']);
|
|
||||||
// },
|
|
||||||
// );
|
|
||||||
|
|
||||||
Route::prefix('auth')->group(function () {
|
Route::prefix('auth')->group(function () {
|
||||||
Route::controller(LoginApiController::class)->group(function () {
|
Route::controller(LoginApiController::class)->group(function () {
|
||||||
Route::post('login', 'login')->name('auth.login'); // bisa
|
Route::post('login', 'login')->name('auth.login'); // bisa
|
||||||
@ -75,47 +60,48 @@ Route::middleware(['auth:api'])->group(function () {
|
|||||||
}); // sudah
|
}); // sudah
|
||||||
|
|
||||||
Route::controller(TransactionApiController::class)->group(function () {
|
Route::controller(TransactionApiController::class)->group(function () {
|
||||||
Route::get('get-transaction-tracking', 'getTrackingTransaction')->name('transaction.get-transaction-tracking');
|
Route::get('get-transaction-tracking', 'getTrackingTransaction')->name('transaction.get-transaction-tracking'); // Bisa
|
||||||
Route::get('get-detail-transaction', 'getDetailTransaction')->name('transaction.get-detail-transaction');
|
Route::get('get-detail-transaction', 'getDetailTransaction')->name('transaction.get-detail-transaction'); // Bisa
|
||||||
}); // sudah
|
}); // sudah
|
||||||
|
|
||||||
Route::controller(RefundApiController::class)->group(function () {
|
Route::controller(RefundApiController::class)->group(function () {
|
||||||
Route::get('list-refund', 'listRefund')->name('refund.list-refund');
|
Route::get('list-refund', 'listRefund')->name('refund.list-refund'); // Ragu
|
||||||
Route::get('create-refund','createRefund')->name('refund.create-refund');
|
Route::get('create-refund','createRefund')->name('refund.create-refund'); // Bisa
|
||||||
Route::get('detail-refund','getDetailRefund')->name('refund.get-detail-refund');
|
Route::get('detail-refund','getDetailRefund')->name('refund.get-detail-refund'); // Bisa
|
||||||
Route::post('store-refund', 'storeRefund')->name('refund.store-refund');
|
Route::post('store-refund', 'storeRefund')->name('refund.store-refund'); // Bisa
|
||||||
}); // sudah
|
}); // sudah
|
||||||
|
|
||||||
Route::controller(PembeliApiController::class)->group(function () {
|
Route::controller(PembeliApiController::class)->group(function () {
|
||||||
Route::get('list-pembeli', 'listPembeli')->name('pembeli.list-pembeli');
|
Route::get('list-pembeli', 'listPembeli')->name('pembeli.list-pembeli'); // Ragu
|
||||||
Route::get('create-transaction', 'createTransaction')->name('pembeli.create-transaction');
|
Route::get('create-transaction', 'createTransaction')->name('pembeli.create-transaction'); // Bisa
|
||||||
Route::post('store-transaction', 'storeTransaction')->name('pembeli.store-transaction');
|
Route::post('store-transaction', 'storeTransaction')->name('pembeli.store-transaction'); // Bisa
|
||||||
Route::post('pay-payment', 'payPayment')->name('pembeli.pay-payment');
|
Route::post('pay-payment', 'payPayment')->name('pembeli.pay-payment'); // Bisa
|
||||||
Route::post('cancel-payment', 'cancelPayment')->name('pembeli.cancel-payment');
|
Route::post('cancel-payment', 'cancelPayment')->name('pembeli.cancel-payment'); // Bisa
|
||||||
Route::post('pending-payment', 'pendingPayment')->name('pembeli.pending-payment');
|
Route::post('pending-payment', 'pendingPayment')->name('pembeli.pending-payment'); // Bisa
|
||||||
Route::post('error-payment', 'errorPayment')->name('pembeli.error-paymennt');
|
Route::post('error-payment', 'errorPayment')->name('pembeli.error-payment'); // Bisa
|
||||||
Route::post('close-payment', 'closePayment')->name('pembeli.close-payment');
|
Route::post('close-payment', 'closePayment')->name('pembeli.close-payment'); // Bisa
|
||||||
Route::post('finish-transaction', 'finishTransaction')->name('pembeli.finish-transaction');
|
Route::post('finish-transaction', 'finishTransaction')->name('pembeli.finish-transaction'); // Bisa
|
||||||
Route::post('cancel-transaction', 'cancelTransaction')->name('pembeli.cancel-transaction');
|
Route::post('cancel-transaction', 'cancelTransaction')->name('pembeli.cancel-transaction'); // Bisa
|
||||||
}); // sudah
|
}); // sudah
|
||||||
|
|
||||||
Route::controller(PenjualApiController::class)->group(function () {
|
Route::controller(PenjualApiController::class)->group(function () {
|
||||||
Route::get('list-penjual', 'listPenjual')->name('penjual.list-penjual');
|
Route::get('list-penjual', 'listPenjual')->name('penjual.list-penjual'); // Ragu
|
||||||
Route::post('accept-transaction', 'acceptTransaction')->name('penjual.accept-transaction');
|
Route::post('accept-transaction', 'acceptTransaction')->name('penjual.accept-transaction'); // Bisa
|
||||||
Route::post('reject-transaction', 'rejectTransaction')->name('penjual.reject-transaction');
|
Route::post('reject-transaction', 'rejectTransaction')->name('penjual.reject-transaction'); // Bisa
|
||||||
Route::post('sending-order', 'sendingOrder')->name('penjual.sending-order');
|
Route::post('sending-order', 'sendingOrder')->name('penjual.sending-order'); // Bisa
|
||||||
Route::post('sent-order', 'sentOrder')->name('penjual.sent-order');
|
Route::post('sent-order', 'sentOrder')->name('penjual.sent-order'); // Bisa
|
||||||
|
Route::post('accept-result','acceptResult')->name('penjual.accept-result'); // Bisa
|
||||||
}); // sudah
|
}); // sudah
|
||||||
|
|
||||||
Route::controller(ProfileApiController::class)->group(function () {
|
Route::controller(ProfileApiController::class)->group(function () {
|
||||||
Route::get('get-profile', 'getProfile')->name('profile.get-profile');
|
Route::get('get-profile', 'getProfile')->name('profile.get-profile'); // Bisa
|
||||||
Route::post('update-profile', 'updateProfile')->name('profile.update-profile');
|
Route::post('update-profile', 'updateProfile')->name('profile.update-profile'); // Bisa
|
||||||
Route::post('update-profile-password', 'updateProfilePassword')->name('profile.update-profile-password');
|
Route::post('update-profile-password', 'updateProfilePassword')->name('profile.update-profile-password'); // Bisa
|
||||||
}); // sudah
|
}); // sudah
|
||||||
|
|
||||||
Route::controller(InvoiceApiController::class)->group(function () {
|
Route::controller(InvoiceApiController::class)->group(function () {
|
||||||
Route::get('get-invoice', 'getInvoice')->name('invoice.get-invoice');
|
Route::get('get-invoice', 'getInvoice')->name('invoice.get-invoice'); // Bisa
|
||||||
Route::get('export-invoice', 'exportInvoice')->name('invoice.export-invoice');
|
Route::get('export-invoice', 'exportInvoice')->name('invoice.export-invoice'); // Bisa
|
||||||
}); // sudah
|
}); // sudah
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -175,6 +175,7 @@ Route::middleware(['auth'])->group(function(){
|
|||||||
Route::put('user-penjual/tolak-transaksi','denyTransaction')->name('user-penjual.deny');
|
Route::put('user-penjual/tolak-transaksi','denyTransaction')->name('user-penjual.deny');
|
||||||
Route::put('user-penjual/terima-transaksi','acceptTransaction')->name('user-penjual.accept');
|
Route::put('user-penjual/terima-transaksi','acceptTransaction')->name('user-penjual.accept');
|
||||||
Route::put('user-penjual/kirim-pesanan','sendingOrder')->name('user-penjual.sending');
|
Route::put('user-penjual/kirim-pesanan','sendingOrder')->name('user-penjual.sending');
|
||||||
|
Route::put('user-penjual/terima-uang','acceptResult')->name('user-penjual.accept-result');
|
||||||
Route::post('user-penjual/selesai-kirim-pesanan','sentOrder')->name('user-penjual.sent');
|
Route::post('user-penjual/selesai-kirim-pesanan','sentOrder')->name('user-penjual.sent');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user