Api Flutter
This commit is contained in:
parent
645c20a1d2
commit
fe5e2952c0
11
app/Http/Controllers/API/Contact/ContactApiController.php
Normal file
11
app/Http/Controllers/API/Contact/ContactApiController.php
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\API\Contact;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class ContactApiController extends Controller
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
254
app/Http/Controllers/API/Login/LoginApiController.php
Normal file
254
app/Http/Controllers/API/Login/LoginApiController.php
Normal file
@ -0,0 +1,254 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\API\Login;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Tymon\JWTAuth\Facades\JWTFactory;
|
||||||
|
use Illuminate\Support\Facades\Hash;
|
||||||
|
use App\Models\User;
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Illuminate\Support\Facades\DB;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
use Illuminate\Support\Facades\Storage;
|
||||||
|
use Illuminate\Support\Str;
|
||||||
|
use Tymon\JWTAuth\Facades\JWTAuth;
|
||||||
|
|
||||||
|
class LoginApiController extends Controller
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Create a new AuthController instance.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->middleware('auth:api', ['except' => ['login', 'register', 'hai']]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a JWT via given credentials.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\JsonResponse
|
||||||
|
*/
|
||||||
|
public function login(Request $request)
|
||||||
|
{
|
||||||
|
// $credentials = $request->validate(
|
||||||
|
// [
|
||||||
|
// 'email' => ['required', 'email'],
|
||||||
|
// 'password' => ['required', 'min:8'],
|
||||||
|
// ],
|
||||||
|
// [
|
||||||
|
// 'email.required' => 'Alamat email wajib diisi.',
|
||||||
|
// 'email.email' => 'Alamat email harus berformat valid.',
|
||||||
|
// 'password.required' => 'Password wajib diisi.',
|
||||||
|
// 'password.min' => 'Password harus memiliki panjang minimal 8 karakter.',
|
||||||
|
// ],
|
||||||
|
// );
|
||||||
|
|
||||||
|
// $credentials = $request->only('email', 'password');
|
||||||
|
|
||||||
|
// if (!$token = Auth::attempt($credentials)) {
|
||||||
|
// return response()->json(['error' => 'Unauthorized', 'message' => $credentials ], 401);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // return $this->respondWithToken($token);
|
||||||
|
// return response()->json([
|
||||||
|
// 'token' => $token
|
||||||
|
// ]);
|
||||||
|
|
||||||
|
$credentials = request(['email', 'password']);
|
||||||
|
|
||||||
|
if (!($token = Auth::guard('api')->attempt($credentials))) {
|
||||||
|
return response()->json(['error' => 'Unauthorized'], 401);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->respondWithToken($token);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the authenticated User.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\JsonResponse
|
||||||
|
*/
|
||||||
|
public function me()
|
||||||
|
{
|
||||||
|
$token = JWTAuth::getToken();
|
||||||
|
return response()->json(JWTAuth::user($token));
|
||||||
|
}
|
||||||
|
|
||||||
|
public function test(Request $request)
|
||||||
|
{
|
||||||
|
return response()->json([
|
||||||
|
'message' => 'Hello from API',
|
||||||
|
'data' => $request->input('data'),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Log the user out (Invalidate the token).
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\JsonResponse
|
||||||
|
*/
|
||||||
|
public function logout()
|
||||||
|
{
|
||||||
|
auth()->logout();
|
||||||
|
|
||||||
|
return response()->json(['message' => 'Successfully logged out']);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Refresh a token.
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\JsonResponse
|
||||||
|
*/
|
||||||
|
public function refresh()
|
||||||
|
{
|
||||||
|
return $this->respondWithToken(Auth::refresh());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the token array structure.
|
||||||
|
*
|
||||||
|
* @param string $token
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\JsonResponse
|
||||||
|
*/
|
||||||
|
protected function respondWithToken($token)
|
||||||
|
{
|
||||||
|
return response()->json([
|
||||||
|
'access_token' => $token,
|
||||||
|
'token_type' => 'bearer',
|
||||||
|
'expires_in' => JWTFactory::getTTL() * 60,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function register(Request $request)
|
||||||
|
{
|
||||||
|
$nama_depan = $request->input('nama_depan');
|
||||||
|
$nama_belakang = $request->input('nama_belakang');
|
||||||
|
$tanggal_lahir = $request->input('tanggal_lahir');
|
||||||
|
$new_password = $request->input('new_password');
|
||||||
|
$nik = $request->input('nik');
|
||||||
|
$email = $request->input('new_email');
|
||||||
|
$nohp = $request->input('nohp');
|
||||||
|
$alamat = $request->input('alamat');
|
||||||
|
$foto_ktp = '';
|
||||||
|
$foto_wajah = '';
|
||||||
|
$persentase_kemiripan = 0;
|
||||||
|
$gender = $request->input('gender');
|
||||||
|
$kode_kelurahan = $request->input('village_code');
|
||||||
|
|
||||||
|
// $ktpBase64 = $request->input('ktp');
|
||||||
|
// $wajahBase64 = $request->input('wajah');
|
||||||
|
|
||||||
|
// if ($ktpBase64 && $wajahBase64) {
|
||||||
|
// // Konversi string Base64 ke file gambar
|
||||||
|
// $ktpFile = base64_decode(preg_replace('#^data:image/\w+;base64,#i', '', $ktpBase64));
|
||||||
|
// $wajahFile = base64_decode(preg_replace('#^data:image/\w+;base64,#i', '', $wajahBase64));
|
||||||
|
|
||||||
|
// $foto_ktp = 'Foto-KTP-' . $nama_depan . '-' . $nama_belakang . '.jpg';
|
||||||
|
// $foto_wajah = 'Foto-Wajah-' . $nama_depan . '-' . $nama_belakang . '.jpg';
|
||||||
|
|
||||||
|
// file_put_contents(public_path('storage/foto-ktp/' . $foto_ktp), $ktpFile);
|
||||||
|
// file_put_contents(public_path('storage/foto-wajah/' . $foto_wajah), $wajahFile);
|
||||||
|
// }
|
||||||
|
|
||||||
|
if ($request->hasFile('ktp') && $request->hasFile('wajah')) {
|
||||||
|
$fileKtp = $request->file('ktp');
|
||||||
|
$fileWajah = $request->file('wajah');
|
||||||
|
$foto_ktp = $nama_depan.'-'.$nama_belakang. '.' . $fileKtp->getClientOriginalExtension();
|
||||||
|
$foto_wajah = $nama_depan.'-'.$nama_belakang. '.' . $fileWajah->getClientOriginalExtension();
|
||||||
|
$pathKtp = 'foto-ktp/' . $foto_ktp;
|
||||||
|
$pathWajah = 'foto-wajah/' . $foto_wajah;
|
||||||
|
|
||||||
|
Storage::disk('public')->put($pathKtp, file_get_contents($fileKtp));
|
||||||
|
Storage::disk('public')->put($pathWajah, file_get_contents($fileWajah));
|
||||||
|
}
|
||||||
|
|
||||||
|
//OCR
|
||||||
|
try {
|
||||||
|
// $fotoKTP = public_path('storage/foto-ktp/' . $foto_ktp);
|
||||||
|
|
||||||
|
// $image = Image::make($fotoKTP);
|
||||||
|
|
||||||
|
// $image->greyscale(); // Convert to grayscale
|
||||||
|
// $image->contrast(10); // Increase contrast, adjust the value as needed
|
||||||
|
|
||||||
|
// $preprocessedfotoKTP = public_path('storage/preprocessed/preprocessed_image.jpg');
|
||||||
|
// $image->save($preprocessedfotoKTP);
|
||||||
|
|
||||||
|
// $result = (new TesseractOCR($preprocessedfotoKTP))->run();
|
||||||
|
|
||||||
|
// (5) Normalize
|
||||||
|
|
||||||
|
// $lines = explode("\n", $result);
|
||||||
|
// $namaOCR = '';
|
||||||
|
// $nikOCR = '';
|
||||||
|
// $nikInputan = $nik;
|
||||||
|
// $namaInputan = $nama_depan . ' ' . $nama_belakang;
|
||||||
|
|
||||||
|
// foreach ($lines as $line) {
|
||||||
|
// // Mencari NIK
|
||||||
|
// if (strpos($line, $nikInputan) !== false) {
|
||||||
|
// $nikOCR = preg_replace('/[^0-9]/', '', $line);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// // Mencari nama
|
||||||
|
// if (strpos($line, $namaInputan) !== false) {
|
||||||
|
// $namaOCR = trim(substr($line, strpos($line, ':') + 1));
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
//Selesai
|
||||||
|
|
||||||
|
// $persentase_kemiripan = (similar_text($nikInputan, $nikOCR, $percent) + similar_text($namaOCR, $namaOCR, $percent)) / 2;
|
||||||
|
// $status = 'Progress';
|
||||||
|
|
||||||
|
// if (similar_text($nikInputan, $nikOCR, $percent) >= 70 && similar_text($namaOCR, $namaOCR, $percent) >= 70) {
|
||||||
|
// $status = 'Progress';
|
||||||
|
// } else {
|
||||||
|
// $status = 'Progress';
|
||||||
|
// }
|
||||||
|
|
||||||
|
DB::beginTransaction();
|
||||||
|
|
||||||
|
$password = Hash::make($new_password);
|
||||||
|
|
||||||
|
User::create([
|
||||||
|
'nama_depan' => $nama_depan,
|
||||||
|
'nama_belakang' => $nama_belakang,
|
||||||
|
'tanggal_lahir' => $tanggal_lahir,
|
||||||
|
'email' => $email,
|
||||||
|
'email_verified_at' => now(),
|
||||||
|
'password' => $password,
|
||||||
|
'nohp' => $nohp,
|
||||||
|
'nik' => $nik,
|
||||||
|
'alamat' => $alamat,
|
||||||
|
'foto_ktp' => $foto_ktp,
|
||||||
|
'foto_wajah' => $foto_wajah,
|
||||||
|
'persentase_kemiripan' => $persentase_kemiripan,
|
||||||
|
'gender' => $gender,
|
||||||
|
'kode_kelurahan' => $kode_kelurahan,
|
||||||
|
'remember_token' => Str::random(10),
|
||||||
|
]);
|
||||||
|
|
||||||
|
DB::commit();
|
||||||
|
|
||||||
|
return response()->json([
|
||||||
|
'status' => true,
|
||||||
|
'message' => 'Akun anda sudah terdaftar dan butuh verifikasi hingga maksimal 1 hari kerja',
|
||||||
|
]);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
DB::rollBack();
|
||||||
|
|
||||||
|
Log::error($e->getMessage());
|
||||||
|
|
||||||
|
return response()->json([
|
||||||
|
'status' => false,
|
||||||
|
'message' => 'Akun anda gagal terdaftar. Coba lagi!',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,127 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Controllers\API;
|
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
|
||||||
use Illuminate\Support\Facades\Hash;
|
|
||||||
use App\Models\User;
|
|
||||||
|
|
||||||
class LoginApiController extends Controller
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Create a new AuthController instance.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
$this->middleware('auth:api', ['except' => ['login', 'register', 'hai']]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get a JWT via given credentials.
|
|
||||||
*
|
|
||||||
* @return \Illuminate\Http\JsonResponse
|
|
||||||
*/
|
|
||||||
public function login()
|
|
||||||
{
|
|
||||||
// $request->validate([
|
|
||||||
// 'email' => 'required|string|email',
|
|
||||||
// 'password' => 'required',
|
|
||||||
// ]);
|
|
||||||
|
|
||||||
$credentials = request(['email', 'password']);
|
|
||||||
|
|
||||||
if (!($token = auth()->attempt($credentials))) {
|
|
||||||
return response()->json(['error' => 'Unauthorized'], 401);
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->respondWithToken($token);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the authenticated User.
|
|
||||||
*
|
|
||||||
* @return \Illuminate\Http\JsonResponse
|
|
||||||
*/
|
|
||||||
public function me()
|
|
||||||
{
|
|
||||||
return response()->json(Auth::user());
|
|
||||||
}
|
|
||||||
|
|
||||||
public function hai()
|
|
||||||
{
|
|
||||||
return response()->json([
|
|
||||||
'message' => 'Hello from API',
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Log the user out (Invalidate the token).
|
|
||||||
*
|
|
||||||
* @return \Illuminate\Http\JsonResponse
|
|
||||||
*/
|
|
||||||
public function logout()
|
|
||||||
{
|
|
||||||
auth()->logout();
|
|
||||||
|
|
||||||
return response()->json(['message' => 'Successfully logged out']);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Refresh a token.
|
|
||||||
*
|
|
||||||
* @return \Illuminate\Http\JsonResponse
|
|
||||||
*/
|
|
||||||
public function refresh()
|
|
||||||
{
|
|
||||||
return $this->respondWithToken(Auth::refresh());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the token array structure.
|
|
||||||
*
|
|
||||||
* @param string $token
|
|
||||||
*
|
|
||||||
* @return \Illuminate\Http\JsonResponse
|
|
||||||
*/
|
|
||||||
protected function respondWithToken($token)
|
|
||||||
{
|
|
||||||
return response()->json([
|
|
||||||
'user' => auth()->user(),
|
|
||||||
'access_token' => $token,
|
|
||||||
'token_type' => 'bearer',
|
|
||||||
'expires_in' => Auth::factory()->getTTL() * 60,
|
|
||||||
// 'status' => auth()->check(),
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function register(Request $request)
|
|
||||||
{
|
|
||||||
$request->validate([
|
|
||||||
'name' => 'required|string|max:255',
|
|
||||||
'email' => 'required|string|email|unique:users',
|
|
||||||
'password' => 'required|string|min:8',
|
|
||||||
]);
|
|
||||||
|
|
||||||
$user = User::create([
|
|
||||||
'name' => $request->name,
|
|
||||||
'email' => $request->email,
|
|
||||||
'password' => Hash::make($request->password),
|
|
||||||
]);
|
|
||||||
|
|
||||||
return response()->json([
|
|
||||||
'message' => 'User created successfully',
|
|
||||||
'user' => $user,
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// public function check()
|
|
||||||
// {
|
|
||||||
// return response()->json([
|
|
||||||
// 'status' => auth()->check(),
|
|
||||||
// ]);
|
|
||||||
// }
|
|
||||||
}
|
|
11
app/Http/Controllers/API/Pembeli/PembeliApiController.php
Normal file
11
app/Http/Controllers/API/Pembeli/PembeliApiController.php
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\API\Pembeli;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class PembeliApiController extends Controller
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
11
app/Http/Controllers/API/Penjual/PenjualApiController.php
Normal file
11
app/Http/Controllers/API/Penjual/PenjualApiController.php
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\API\Penjual;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class PenjualApiController extends Controller
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
11
app/Http/Controllers/API/Profile/ProfileApiController.php
Normal file
11
app/Http/Controllers/API/Profile/ProfileApiController.php
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\API\Profile;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class ProfileApiController extends Controller
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
11
app/Http/Controllers/API/Refund/RefundApiController.php
Normal file
11
app/Http/Controllers/API/Refund/RefundApiController.php
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\API\Refund;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class RefundApiController extends Controller
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers\API\Transaction;
|
||||||
|
|
||||||
|
use App\Http\Controllers\Controller;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class TransactionApiController extends Controller
|
||||||
|
{
|
||||||
|
//
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Controllers\Admin;
|
namespace App\Http\Controllers\Admin\Dashboard;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Controllers\Admin;
|
namespace App\Http\Controllers\Admin\Refund;
|
||||||
|
|
||||||
use Throwable;
|
use Throwable;
|
||||||
use App\Models\Refund;
|
use App\Models\Refund;
|
||||||
@ -133,7 +133,7 @@ class AdminRefundController extends Controller
|
|||||||
'user' => auth()->user()->email,
|
'user' => auth()->user()->email,
|
||||||
'judul' => 'fas fa-long-arrow-alt-right',
|
'judul' => 'fas fa-long-arrow-alt-right',
|
||||||
'background' => 'bg-primary',
|
'background' => 'bg-primary',
|
||||||
'deskripsi' => 'Admin telah menolak refund. Transaksi akan diteruskan ke penjual',
|
'deskripsi' => 'Admin telah menolak refund. Transaksi akan diteruskan ke penjual. Alasan: '.$request->complaint,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
DB::commit();
|
DB::commit();
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Controllers\Admin;
|
namespace App\Http\Controllers\Admin\Setting;
|
||||||
|
|
||||||
use App\Models\Setting;
|
use App\Models\Setting;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Controllers\Admin;
|
namespace App\Http\Controllers\Admin\Transaction;
|
||||||
|
|
||||||
use App\Models\Transaction;
|
use App\Models\Transaction;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
@ -127,7 +127,7 @@ class AdminTransactionController extends Controller
|
|||||||
'user' => auth()->user()->email,
|
'user' => auth()->user()->email,
|
||||||
'judul' => 'fa fa-times',
|
'judul' => 'fa fa-times',
|
||||||
'background' => 'bg-primary',
|
'background' => 'bg-primary',
|
||||||
'deskripsi' => 'Admin telah menolak pembayaran karena terindikasi penipuan.',
|
'deskripsi' => 'Admin telah menolak pembayaran. Alasan: '.$request->compaint,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
DB::commit();
|
DB::commit();
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Controllers\Admin;
|
namespace App\Http\Controllers\Admin\User;
|
||||||
|
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
@ -78,7 +78,8 @@ class AdminUserController extends Controller
|
|||||||
DB::beginTransaction();
|
DB::beginTransaction();
|
||||||
|
|
||||||
User::where('id', $request->id)->update([
|
User::where('id', $request->id)->update([
|
||||||
'status' => 'Rejected'
|
'status' => 'Rejected',
|
||||||
|
'keterangan' => $request->keterangan
|
||||||
]);
|
]);
|
||||||
|
|
||||||
DB::commit();
|
DB::commit();
|
@ -61,7 +61,7 @@ class LoginController extends Controller
|
|||||||
return redirect()->intended('user');
|
return redirect()->intended('user');
|
||||||
}
|
}
|
||||||
} elseif (Auth::user()->status == 'Rejected') {
|
} elseif (Auth::user()->status == 'Rejected') {
|
||||||
Session::flash('message', 'Akun ditolak karena tidak memenuhi persyaratan');
|
Session::flash('message', 'Akun ditolak. Alasan: '.Auth::user()->keterangan);
|
||||||
return redirect()->back();
|
return redirect()->back();
|
||||||
} else {
|
} else {
|
||||||
Session::flash('message', 'Akun tidak ditemukan atau sedang dalam pengajuan');
|
Session::flash('message', 'Akun tidak ditemukan atau sedang dalam pengajuan');
|
||||||
@ -93,7 +93,7 @@ class LoginController extends Controller
|
|||||||
|
|
||||||
public function register(Request $request)
|
public function register(Request $request)
|
||||||
{
|
{
|
||||||
$credentials = $request->validate(
|
$request->validate(
|
||||||
[
|
[
|
||||||
'nama_depan' => ['required'],
|
'nama_depan' => ['required'],
|
||||||
'nama_belakang' => ['required'],
|
'nama_belakang' => ['required'],
|
||||||
@ -281,8 +281,8 @@ class LoginController extends Controller
|
|||||||
|
|
||||||
public function accountStatus(Request $request)
|
public function accountStatus(Request $request)
|
||||||
{
|
{
|
||||||
$result = User::where('email', $request->email)->get();
|
$result = User::where('email', $request->email)->first();
|
||||||
if ($result->isNotEmpty()) {
|
if ($result) {
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'status' => true,
|
'status' => true,
|
||||||
'message' => $result,
|
'message' => $result,
|
||||||
@ -290,7 +290,7 @@ class LoginController extends Controller
|
|||||||
} else {
|
} else {
|
||||||
return response()->json([
|
return response()->json([
|
||||||
'status' => false,
|
'status' => false,
|
||||||
'message' => $result,
|
'message' => 'Akun dengan email '.$request->email.' tidak tersedia',
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -417,12 +417,10 @@ class LoginController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function invoice(){
|
public function invoice(){
|
||||||
// return view('invoice.export-invoice', [
|
// return view('invoice.export-invoice');
|
||||||
// 'transaction' => Transaction::findOrFail('80d9b19b-ba17-4aea-8cad-c3b4661d33bc'),
|
|
||||||
// ]);
|
|
||||||
|
|
||||||
$transaction = Transaction::findOrFail('80d9b19b-ba17-4aea-8cad-c3b4661d33bc');
|
// $transaction = Transaction::findOrFail('80d9b19b-ba17-4aea-8cad-c3b4661d33bc');
|
||||||
$pdf = Pdf::loadView('invoice.export-invoice',compact('transaction'))->setPaper('A4','portrait');
|
$pdf = Pdf::loadView('invoice.export-invoice')->setPaper('A4','portrait');
|
||||||
return $pdf->download("invoice-80d9b19b-ba17-4aea-8cad-c3b4661d33b-".uniqid().".pdf");
|
return $pdf->download("invoice-80d9b19b-ba17-4aea-8cad-c3b4661d33b-".uniqid().".pdf");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Controllers\User;
|
namespace App\Http\Controllers\User\Contact;
|
||||||
|
|
||||||
use Throwable;
|
use Throwable;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Controllers\User;
|
namespace App\Http\Controllers\User\Dashboard;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Controllers\User;
|
namespace App\Http\Controllers\User\Pembeli;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Models\Contact;
|
use App\Models\Contact;
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Controllers\User;
|
namespace App\Http\Controllers\User\Penjual;
|
||||||
|
|
||||||
use App\Http\Controllers\Controller;
|
use App\Http\Controllers\Controller;
|
||||||
use App\Models\Refund;
|
use App\Models\Refund;
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Controllers\User;
|
namespace App\Http\Controllers\User\Refund;
|
||||||
|
|
||||||
use Throwable;
|
use Throwable;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace App\Http\Controllers\User;
|
namespace App\Http\Controllers\User\Transaction;
|
||||||
|
|
||||||
use Throwable;
|
use Throwable;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
@ -10,7 +10,7 @@ use Laravel\Sanctum\HasApiTokens;
|
|||||||
use Tymon\JWTAuth\Contracts\JWTSubject;
|
use Tymon\JWTAuth\Contracts\JWTSubject;
|
||||||
use Illuminate\Database\Eloquent\Concerns\HasUuids;
|
use Illuminate\Database\Eloquent\Concerns\HasUuids;
|
||||||
|
|
||||||
class User extends Authenticatable
|
class User extends Authenticatable implements JWTSubject
|
||||||
{
|
{
|
||||||
use HasApiTokens, HasFactory, Notifiable;
|
use HasApiTokens, HasFactory, Notifiable;
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ class UserFactory extends Factory
|
|||||||
'status'=> $this->faker->randomElement(['Progress', 'Finished', 'Rejected']),
|
'status'=> $this->faker->randomElement(['Progress', 'Finished', 'Rejected']),
|
||||||
'gender' => $this->faker->randomElement(['Laki-laki', 'Perempuan']),
|
'gender' => $this->faker->randomElement(['Laki-laki', 'Perempuan']),
|
||||||
'kode_kelurahan' => '1101012002',
|
'kode_kelurahan' => '1101012002',
|
||||||
|
'keterangan' => $this->faker->sentence
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,7 +68,8 @@ class DatabaseSeeder extends Seeder
|
|||||||
'gender' => $faker->randomElement(['Laki-laki', 'Perempuan']),
|
'gender' => $faker->randomElement(['Laki-laki', 'Perempuan']),
|
||||||
'kode_kelurahan' => '1101012002',
|
'kode_kelurahan' => '1101012002',
|
||||||
'nama_bank' => 'mandiri',
|
'nama_bank' => 'mandiri',
|
||||||
'no_rek' => '019809210873'
|
'no_rek' => '019809210873',
|
||||||
|
'keterangan' => $faker->sentence()
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$user2 = User::factory()->create([
|
$user2 = User::factory()->create([
|
||||||
@ -89,7 +90,8 @@ class DatabaseSeeder extends Seeder
|
|||||||
'gender' => $faker->randomElement(['Laki-laki', 'Perempuan']),
|
'gender' => $faker->randomElement(['Laki-laki', 'Perempuan']),
|
||||||
'kode_kelurahan' => '1101012002',
|
'kode_kelurahan' => '1101012002',
|
||||||
'nama_bank' => 'bca',
|
'nama_bank' => 'bca',
|
||||||
'no_rek' => '01980921'
|
'no_rek' => '01980921',
|
||||||
|
'keterangan' => $faker->sentence()
|
||||||
]);
|
]);
|
||||||
|
|
||||||
User::factory(100)->create();
|
User::factory(100)->create();
|
||||||
|
@ -106,12 +106,12 @@
|
|||||||
const csrfToken = $('meta[name="csrf-token"]').attr("content");
|
const csrfToken = $('meta[name="csrf-token"]').attr("content");
|
||||||
|
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: 'Setuju Refund',
|
title: 'Terima Refund?',
|
||||||
text: 'Apakah anda yakin untuk menyetujui refund ini?',
|
text: 'Apakah anda yakin untuk menerima refund ini?',
|
||||||
icon: 'question',
|
icon: 'question',
|
||||||
confirmButtonText: 'Ya, setuju',
|
confirmButtonText: 'Ya, setuju',
|
||||||
showCancelButton: true,
|
showCancelButton: true,
|
||||||
cancelButtonText: 'Tunggu sebentar.'
|
cancelButtonText: 'Tunggu, lihat detail dahulu'
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
if (result.isConfirmed) {
|
if (result.isConfirmed) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
@ -142,9 +142,9 @@
|
|||||||
text: response.message,
|
text: response.message,
|
||||||
icon: response.status ? 'success' : 'error'
|
icon: response.status ? 'success' : 'error'
|
||||||
}).then(function() {
|
}).then(function() {
|
||||||
// if (response.status) {
|
if (response.status) {
|
||||||
// location.reload();
|
location.reload();
|
||||||
// }
|
}
|
||||||
});
|
});
|
||||||
console.log(response);
|
console.log(response);
|
||||||
},
|
},
|
||||||
@ -159,7 +159,7 @@
|
|||||||
} else {
|
} else {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: 'Ditunda',
|
title: 'Ditunda',
|
||||||
text: 'Mohon diperiksa dahulu sebelum disetujui',
|
text: 'Mohon diperiksa dahulu sebelum menerima refund',
|
||||||
icon: 'info'
|
icon: 'info'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -171,60 +171,74 @@
|
|||||||
const csrfToken = $('meta[name="csrf-token"]').attr("content");
|
const csrfToken = $('meta[name="csrf-token"]').attr("content");
|
||||||
|
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: 'Tolak Refund',
|
title: 'Tolak Refund?',
|
||||||
text: 'Apakah anda yakin untuk menolak refund ini?',
|
text: 'Apakah anda yakin untuk menolak refund ini?',
|
||||||
icon: 'question',
|
icon: 'question',
|
||||||
confirmButtonText: 'Ya, setuju',
|
confirmButtonText: 'Ya, setuju',
|
||||||
showCancelButton: true,
|
showCancelButton: true,
|
||||||
cancelButtonText: 'Tunggu sebentar.'
|
cancelButtonText: 'Tunggu, lihat detail dahulu'
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
if (result.isConfirmed) {
|
if (result.isConfirmed) {
|
||||||
Swal.fire({
|
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>',
|
title: 'Tolak Refund?',
|
||||||
allowEscapeKey: false,
|
text: 'Berikan alasan menolak refund ini'
|
||||||
allowOutsideClick: false,
|
input: 'text',
|
||||||
didOpen: () => {
|
inputPlaceholder: 'Cth. Bukti foto tidak sesuai',
|
||||||
Swal.showLoading();
|
confirmButtonText: 'Kirim',
|
||||||
}
|
showCancelButton: true
|
||||||
});
|
cancelButtonText: 'Batal'
|
||||||
|
}).then((a) => {
|
||||||
|
if (a.isConfirmed) {
|
||||||
|
if (a.value) {
|
||||||
|
$.ajaxSetup({
|
||||||
|
headers: {
|
||||||
|
'X-CSRF-TOKEN': csrfToken,
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$.ajaxSetup({
|
$.ajax({
|
||||||
headers: {
|
url: "{{ route('admin-refund.deny') }}",
|
||||||
'X-CSRF-TOKEN': csrfToken,
|
type: 'PUT',
|
||||||
}
|
data: {
|
||||||
});
|
id: id,
|
||||||
|
complaint: a.value
|
||||||
$.ajax({
|
},
|
||||||
url: "{{ route('admin-refund.deny') }}",
|
success: function(response) {
|
||||||
type: 'PUT',
|
Swal.fire({
|
||||||
data: {
|
title: response.status ?
|
||||||
id: id
|
'Berhasil' :
|
||||||
},
|
'Gagal',
|
||||||
success: function(response) {
|
text: response.message,
|
||||||
Swal.fire({
|
icon: response.status ?
|
||||||
title: response.status ? 'Berhasil' :
|
'success' : 'error'
|
||||||
'Gagal',
|
}).then(function() {
|
||||||
text: response.message,
|
if (response.status) {
|
||||||
icon: response.status ? 'success' : 'error'
|
location.reload();
|
||||||
}).then(function() {
|
}
|
||||||
if (response.status) {
|
});
|
||||||
location.reload();
|
},
|
||||||
}
|
error: function(error) {
|
||||||
});
|
Swal.fire({
|
||||||
},
|
title: 'Gagal',
|
||||||
error: function(error) {
|
text: 'Terjadi kesalahan di error',
|
||||||
Swal.fire({
|
icon: 'error',
|
||||||
title: 'Gagal',
|
});
|
||||||
text: 'Terjadi kesalahan di error',
|
}
|
||||||
icon: 'error',
|
});
|
||||||
});
|
} else {
|
||||||
|
Swal.fire({
|
||||||
|
title: 'Peringatan',
|
||||||
|
text: 'Masukkan alasan untuk menolak transaksi ini',
|
||||||
|
icon: 'warning'
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: 'Ditunda',
|
title: 'Peringatan',
|
||||||
text: 'Mohon diperiksa dahulu sebelum ditolak',
|
text: 'Mohon diperiksa dahulu sebelum menolak refund',
|
||||||
icon: 'info'
|
icon: 'warning'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -187,11 +187,11 @@
|
|||||||
const csrfToken = $('meta[name="csrf-token"]').attr('content');
|
const csrfToken = $('meta[name="csrf-token"]').attr('content');
|
||||||
|
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: 'Terima Transaksi',
|
title: 'Terima Transaksi?',
|
||||||
text: 'Apakah anda yakin untuk menerima transaksi ini?',
|
text: 'Apakah anda yakin untuk menerima transaksi ini?',
|
||||||
icon: 'question',
|
icon: 'question',
|
||||||
showCancelButton: true,
|
showCancelButton: true,
|
||||||
cancelButtonText: 'Tunggu, Lihat sebentar',
|
cancelButtonText: 'Tunggu, lihat detail dahulu',
|
||||||
confirmButtonText: 'Ya, terima transaksi ini'
|
confirmButtonText: 'Ya, terima transaksi ini'
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
if (result.isConfirmed) {
|
if (result.isConfirmed) {
|
||||||
@ -237,6 +237,12 @@
|
|||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
Swal.fire({
|
||||||
|
title: 'Peringatan',
|
||||||
|
text: 'Periksa dahulu sebelum menerima transaksi',
|
||||||
|
icon: 'warning'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -246,55 +252,84 @@
|
|||||||
const csrfToken = $('meta[name="csrf-token"]').attr('content');
|
const csrfToken = $('meta[name="csrf-token"]').attr('content');
|
||||||
|
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: 'Tolak Transaksi',
|
title: 'Tolak Transaksi?',
|
||||||
text: 'Apakah anda yakin untuk menolak transaksi ini?',
|
text: 'Apakah anda yakin untuk menolak transaksi ini?',
|
||||||
icon: 'question',
|
icon: 'question',
|
||||||
showCancelButton: true,
|
showCancelButton: true,
|
||||||
cancelButtonText: 'Tunggu, Lihat sebentar',
|
cancelButtonText: 'Tunggu, lihat detail dahulu',
|
||||||
confirmButtonText: 'Ya, tolak transaksi ini'
|
confirmButtonText: 'Ya, tolak transaksi ini'
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
if (result.isConfirmed) {
|
if (result.isConfirmed) {
|
||||||
Swal.fire({
|
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>',
|
title: 'Tolak Transaksi?',
|
||||||
allowEscapeKey: false,
|
text: 'Berikan alasan untuk menolak transaksi ini',
|
||||||
allowOutsideClick: false,
|
input: 'text',
|
||||||
didOpen: () => {
|
inputPlaceholder: 'Cth. terindikasi penipuan.',
|
||||||
Swal.showLoading();
|
confirmButtonText: 'Kirim',
|
||||||
|
showCancelButton: true,
|
||||||
|
cancelButtonText: 'Batal'
|
||||||
|
}).then((a) => {
|
||||||
|
if (a.isConfirmed) {
|
||||||
|
if (a.value) {
|
||||||
|
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-transaction.deny-transaction') }}",
|
||||||
|
data: {
|
||||||
|
id: id,
|
||||||
|
complaint: a.value
|
||||||
|
},
|
||||||
|
type: 'PUT',
|
||||||
|
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 server',
|
||||||
|
icon: 'error'
|
||||||
|
});
|
||||||
|
console.log(error);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
Swal.fire({
|
||||||
|
title: 'Peringatan',
|
||||||
|
text: 'Masukkan alasan untuk menolak transaksi.',
|
||||||
|
icon: 'warning'
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
$.ajaxSetup({
|
Swal.fire({
|
||||||
headers: {
|
title: 'Peringatan',
|
||||||
'X-CSRF-TOKEN': csrfToken
|
text: 'Periksa dahulu sebelum menolak transaksi.',
|
||||||
}
|
icon: 'warning'
|
||||||
});
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
url: "{{ route('admin-transaction.deny-transaction') }}",
|
|
||||||
data: {
|
|
||||||
id: id
|
|
||||||
},
|
|
||||||
type: 'PUT',
|
|
||||||
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 server',
|
|
||||||
icon: 'error'
|
|
||||||
});
|
|
||||||
console.log(error);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -31,6 +31,9 @@
|
|||||||
<h4 class="align-self-center mt-3">Status :
|
<h4 class="align-self-center mt-3">Status :
|
||||||
{{ $user->status == 'Finished' ? 'Selesai diverifikasi' : ($user->status == 'Progress' ? 'Sedang diverifikasi' : 'Tolak') }}
|
{{ $user->status == 'Finished' ? 'Selesai diverifikasi' : ($user->status == 'Progress' ? 'Sedang diverifikasi' : 'Tolak') }}
|
||||||
</h4>
|
</h4>
|
||||||
|
@if ($user->status == 'Rejected')
|
||||||
|
<p class="align-self-center">Keterangan : {{ $user->keterangan }}</p>
|
||||||
|
@endif
|
||||||
<hr class="border border-1 opacity-75 w-100">
|
<hr class="border border-1 opacity-75 w-100">
|
||||||
<div class="data-field">
|
<div class="data-field">
|
||||||
<span class="fw-bold text-start">NIK</span>
|
<span class="fw-bold text-start">NIK</span>
|
||||||
@ -178,12 +181,12 @@
|
|||||||
let id = $(this).data('id');
|
let id = $(this).data('id');
|
||||||
const csrfToken = $('meta[name="csrf-token"]').attr('content');
|
const csrfToken = $('meta[name="csrf-token"]').attr('content');
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: 'Status Akun',
|
title: 'Terima Akun?',
|
||||||
text: 'Apakah anda yakin menyetujui akun ini?',
|
text: 'Apakah anda yakin menyetujui akun ini?',
|
||||||
icon: 'info',
|
icon: 'info',
|
||||||
confirmButtonText: 'Ya, setuju!',
|
confirmButtonText: 'Ya, setuju!',
|
||||||
showCancelButton: true,
|
showCancelButton: true,
|
||||||
cancelButtonText: 'Tidak'
|
cancelButtonText: 'Tunggu, lihat sebentar'
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
if (result.isConfirmed) {
|
if (result.isConfirmed) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
@ -229,6 +232,12 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
Swal.fire({
|
||||||
|
title: 'Peringatan',
|
||||||
|
text: 'Silahkan periksa dahulu sebelum menerima user',
|
||||||
|
icon: 'warning'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -237,54 +246,85 @@
|
|||||||
let id = $(this).data('id');
|
let id = $(this).data('id');
|
||||||
const csrfToken = $('meta[name="csrf-token"]').attr('content');
|
const csrfToken = $('meta[name="csrf-token"]').attr('content');
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: 'Status Akun',
|
title: 'Tolak Akun?',
|
||||||
text: 'Apakah anda yakin menolak akun ini?',
|
text: 'Apakah anda yakin menolak akun ini?',
|
||||||
icon: 'info',
|
icon: 'info',
|
||||||
confirmButtonText: 'Ya, setuju!',
|
confirmButtonText: 'Ya, tolak!',
|
||||||
showCancelButton: true,
|
showCancelButton: true,
|
||||||
cancelButtonText: 'Tidak'
|
cancelButtonText: 'Tunggu, lihat sebentar'
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
if (result.isConfirmed) {
|
if (result.isConfirmed) {
|
||||||
Swal.fire({
|
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>',
|
title: 'Tolak Akun?',
|
||||||
allowEscapeKey: false,
|
text: 'Berikan alasan menolak akun ini?',
|
||||||
allowOutsideClick: false,
|
icon: 'question',
|
||||||
didOpen: () => {
|
input: 'text',
|
||||||
Swal.showLoading();
|
inputPlaceholder: 'Cth. Data tidak sesuai.',
|
||||||
|
confirmButtonText: 'Kirim',
|
||||||
|
showCancelButton: true,
|
||||||
|
cancelButtonText: 'Batal'
|
||||||
|
}).then((a) => {
|
||||||
|
if (a.isConfirmed) {
|
||||||
|
if (a.value) {
|
||||||
|
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-user.deny') }}",
|
||||||
|
data: {
|
||||||
|
id: id,
|
||||||
|
keterangan: a.value
|
||||||
|
},
|
||||||
|
type: 'PUT',
|
||||||
|
success: function(response) {
|
||||||
|
Swal.fire({
|
||||||
|
title: response.status ?
|
||||||
|
'Berhasil!' :
|
||||||
|
'Gagal!',
|
||||||
|
text: response.message,
|
||||||
|
icon: response.status ?
|
||||||
|
'success' : 'error',
|
||||||
|
confirmButtonText: 'OK'
|
||||||
|
}).then(function() {
|
||||||
|
location.reload();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
error: function(error) {
|
||||||
|
Swal.fire({
|
||||||
|
title: 'Gagal!',
|
||||||
|
text: 'Gagal mengubah status akun, karena ' +
|
||||||
|
error,
|
||||||
|
icon: 'info'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
Swal.fire({
|
||||||
|
title: 'Peringatan',
|
||||||
|
text: 'Masukkan alasan menolak user ini.',
|
||||||
|
icon: 'warning'
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$.ajaxSetup({
|
} else {
|
||||||
headers: {
|
Swal.fire({
|
||||||
'X-CSRF-TOKEN': csrfToken
|
title: 'Peringatan',
|
||||||
}
|
text: 'Silahkan periksa dahulu sebelum menolak user',
|
||||||
});
|
icon: 'warning'
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
url: "{{ route('admin-user.deny') }}",
|
|
||||||
data: {
|
|
||||||
id: id
|
|
||||||
}
|
|
||||||
type: 'PUT',
|
|
||||||
success: function(response) {
|
|
||||||
Swal.fire({
|
|
||||||
title: response.status ? 'Berhasil!' :
|
|
||||||
'Gagal!',
|
|
||||||
text: response.message,
|
|
||||||
icon: response.status ? 'success' : 'error',
|
|
||||||
confirmButtonText: 'OK'
|
|
||||||
}).then(function() {
|
|
||||||
location.reload();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
error: function(error) {
|
|
||||||
Swal.fire({
|
|
||||||
title: 'Gagal!',
|
|
||||||
text: 'Gagal mengubah status akun, karena ' +
|
|
||||||
error,
|
|
||||||
icon: 'info'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
render: function(data, type, row) {
|
render: function(data, type, row) {
|
||||||
var foto = data;
|
var foto = data;
|
||||||
return `<figure class="avatar mr-2 avatar-xl">
|
return `<figure class="avatar mr-2 avatar-xl">
|
||||||
<img src="${foto !== null ? '{{ asset('storage/foto-profile/') }}' + foto : '{{ asset('assets/img/avatar/avatar-6.png') }}'}"
|
<img src="${foto !== null ? "{{ asset('storage/foto-profile/') }}/" + foto : '{{ asset('assets/img/avatar/avatar-6.png') }}'}"
|
||||||
alt="...">
|
alt="...">
|
||||||
</figure>`;
|
</figure>`;
|
||||||
},
|
},
|
||||||
@ -108,64 +108,6 @@
|
|||||||
className: 'text-center'
|
className: 'text-center'
|
||||||
}],
|
}],
|
||||||
});
|
});
|
||||||
|
|
||||||
// Hapus data
|
|
||||||
$('#table-user').on('click', '#deleteUser', function() {
|
|
||||||
const csrfToken = $('meta[name="csrf-token"]').attr('content');
|
|
||||||
let dataId = $(this).data("id");
|
|
||||||
|
|
||||||
Swal.fire({
|
|
||||||
title: 'Hapus data',
|
|
||||||
text: 'Apakah yakin ingin menghapus data user ini?',
|
|
||||||
icon: 'question',
|
|
||||||
confirmButtonText: 'Ya, hapus!',
|
|
||||||
showDenyButton: true,
|
|
||||||
denyButtonText: 'Tidak, jangan hapus!',
|
|
||||||
}).then((result) => {
|
|
||||||
if (result.isConfirmed) {
|
|
||||||
$.ajaxSetup({
|
|
||||||
headers: {
|
|
||||||
'X-CSRF-TOKEN': csrfToken
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
url: "{{ route('admin-user.destroy') }}"
|
|
||||||
data: {
|
|
||||||
id: dataId
|
|
||||||
},
|
|
||||||
type: 'DELETE',
|
|
||||||
processData: false,
|
|
||||||
contentType: false,
|
|
||||||
success: function(response) {
|
|
||||||
Swal.fire({
|
|
||||||
title: response.status ? 'Berhasil!' :
|
|
||||||
'Gagal!',
|
|
||||||
text: response.message,
|
|
||||||
icon: response.status ? 'success' : 'error',
|
|
||||||
confirmButtonText: 'OK'
|
|
||||||
}).then(function() {
|
|
||||||
location.reload();
|
|
||||||
});
|
|
||||||
},
|
|
||||||
error: function(error) {
|
|
||||||
Swal.fire({
|
|
||||||
title: 'Gagal!',
|
|
||||||
text: 'Tidak ada data yang dihapus, karena ' +
|
|
||||||
error,
|
|
||||||
icon: 'info'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else if (result.isDenied) {
|
|
||||||
Swal.fire({
|
|
||||||
title: 'Gagal!',
|
|
||||||
text: 'Tidak ada data yang dihapus',
|
|
||||||
icon: 'info'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
@endsection
|
@endsection
|
||||||
|
@ -114,56 +114,10 @@
|
|||||||
<h4>INCOME</h4>
|
<h4>INCOME</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<canvas id="myChart" height="158"></canvas>
|
<canvas id="myChart" height="158">1412</canvas>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
{{-- <div class="col-md-12">
|
|
||||||
<div class="card">
|
|
||||||
<div class="card-header">
|
|
||||||
<h2>Transaction</h2>
|
|
||||||
</div>
|
|
||||||
<div class="card-body p-0">
|
|
||||||
<div class="table-responsive table-invoice">
|
|
||||||
<table class="table table-striped">
|
|
||||||
<tr>
|
|
||||||
<th>Order ID</th>
|
|
||||||
<th>Customer</th>
|
|
||||||
<th>Seller</th>
|
|
||||||
<th>Total</th>
|
|
||||||
<th>Due Date</th>
|
|
||||||
<th>Status</th>
|
|
||||||
<th>Image</th>
|
|
||||||
</tr>
|
|
||||||
@foreach ($refundUserss as $HistoryRefundUser)
|
|
||||||
<tr>
|
|
||||||
<td class="font-weight-600">
|
|
||||||
{{ $HistoryRefundUser['orderId'] }}</td>
|
|
||||||
<td class="font-weight-600">
|
|
||||||
{{ $HistoryRefundUser['Customer'] }}</td>
|
|
||||||
<td class="font-weight-600">
|
|
||||||
{{ $HistoryRefundUser['seller'] }}</td>
|
|
||||||
<td class="font-weight-600">
|
|
||||||
{{ $HistoryRefundUser['Total'] }}</td>
|
|
||||||
<td>{{ $HistoryRefundUser['dueDate'] }}</td>
|
|
||||||
<td>
|
|
||||||
<div class="badge badge-success" data-status="diterima"
|
|
||||||
onclick="setStatus('diterima')">Diterima</div>
|
|
||||||
</td>
|
|
||||||
<td class="font-weight-600">
|
|
||||||
{{ $HistoryRefundUser['uploadBukti'] }}</td>
|
|
||||||
<td>
|
|
||||||
|
|
||||||
</tr>
|
|
||||||
@endforeach
|
|
||||||
</table>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div> --}}
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
@ -421,7 +421,7 @@
|
|||||||
text: 'Apakah anda yakin untuk membatalkan transaksi?',
|
text: 'Apakah anda yakin untuk membatalkan transaksi?',
|
||||||
icon: 'question',
|
icon: 'question',
|
||||||
showCancelButton: true,
|
showCancelButton: true,
|
||||||
cancelButtonText: 'Tidak.',
|
cancelButtonText: 'Tunggu, lihat detail dahulu.',
|
||||||
confirmButtonText: 'Ya, batalkan transaksi.'
|
confirmButtonText: 'Ya, batalkan transaksi.'
|
||||||
}).then((result) => {
|
}).then((result) => {
|
||||||
if (result.isConfirmed) {
|
if (result.isConfirmed) {
|
||||||
@ -484,13 +484,16 @@
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: 'Gagal',
|
title: 'Peringatan',
|
||||||
text: 'Masukan alasan untuk membatalkan transaksi',
|
text: 'Masukan alasan untuk membatalkan transaksi',
|
||||||
icon: 'error'
|
icon: 'warning'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
location.href = "{{ route('user-transaction.show', ':id') }}".replace(
|
||||||
|
':id', id);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -236,44 +236,59 @@
|
|||||||
const csrfToken = $('meta[name="csrf-token"]').attr('content');
|
const csrfToken = $('meta[name="csrf-token"]').attr('content');
|
||||||
|
|
||||||
Swal.fire({
|
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>',
|
title: 'Terima Transaksi?',
|
||||||
allowEscapeKey: false,
|
text: 'Apakah anda yakin untuk menerima transaksi ini?',
|
||||||
allowOutsideClick: false,
|
icon: 'question',
|
||||||
didOpen: () => {
|
showCancelButton: true,
|
||||||
Swal.showLoading();
|
cancelButtonText: "Tunggu, lihat detail dahulu",
|
||||||
}
|
confirmButtonText: 'Ya, proses transaksi'
|
||||||
});
|
}).then((result) => {
|
||||||
|
if (result.isConfirmed) {
|
||||||
$.ajaxSetup({
|
|
||||||
headers: {
|
|
||||||
'X-CSRF-TOKEN': csrfToken
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
url: "{{ route('user-penjual.accept') }}",
|
|
||||||
type: 'PUT',
|
|
||||||
data: {
|
|
||||||
id: id,
|
|
||||||
},
|
|
||||||
success: function(response) {
|
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: response.status ? 'Berhasil' : 'Gagal',
|
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>',
|
||||||
text: response.message,
|
allowEscapeKey: false,
|
||||||
icon: response.status ? 'success' : 'error',
|
allowOutsideClick: false,
|
||||||
}).then(function() {
|
didOpen: () => {
|
||||||
Swal.close();
|
Swal.showLoading();
|
||||||
if (response.status) {
|
|
||||||
listPenjual.ajax.reload();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
|
||||||
error: function(error) {
|
$.ajaxSetup({
|
||||||
Swal.fire({
|
headers: {
|
||||||
title: 'Gagal',
|
'X-CSRF-TOKEN': csrfToken
|
||||||
text: 'Pemrosesan transaksi gagal',
|
}
|
||||||
icon: 'error'
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: "{{ route('user-penjual.accept') }}",
|
||||||
|
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() {
|
||||||
|
Swal.close();
|
||||||
|
if (response.status) {
|
||||||
|
listPenjual.ajax.reload();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
error: function(error) {
|
||||||
|
Swal.fire({
|
||||||
|
title: 'Gagal',
|
||||||
|
text: 'Pemrosesan transaksi gagal',
|
||||||
|
icon: 'error'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
location.href = "{{ route('user-transaction.show', ':id') }}".replace(':id',
|
||||||
|
id);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -349,15 +364,13 @@
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: 'Gagal',
|
title: 'Peringatan',
|
||||||
text: 'Masukan alasan untuk menolak transaksi',
|
text: 'Masukan alasan untuk menolak transaksi',
|
||||||
icon: 'error'
|
icon: 'warning'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
location.href = "{{ route('user-transaction.show', ':id') }}".replace(':id',
|
location.href = "{{ route('user-transaction.show', ':id') }}".replace(':id',
|
||||||
id);
|
id);
|
||||||
|
@ -457,7 +457,7 @@
|
|||||||
},
|
},
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
let status = response.message[0].status
|
let status = response.message.status
|
||||||
if (response.status) {
|
if (response.status) {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: 'Akun ditemukan',
|
title: 'Akun ditemukan',
|
||||||
@ -465,7 +465,8 @@
|
|||||||
'Finished' ? ' siap digunakan' : (
|
'Finished' ? ' siap digunakan' : (
|
||||||
status == 'Progress' ?
|
status == 'Progress' ?
|
||||||
' masih proses verifikasi' :
|
' masih proses verifikasi' :
|
||||||
' ditolak')),
|
' ditolak. Alasan: ' + response
|
||||||
|
.message.keterangan)),
|
||||||
icon: (status == 'Finished' ? 'success' : (
|
icon: (status == 'Finished' ? 'success' : (
|
||||||
status == 'Progress' ? 'info' :
|
status == 'Progress' ? 'info' :
|
||||||
'error')),
|
'error')),
|
||||||
@ -475,8 +476,7 @@
|
|||||||
} else {
|
} else {
|
||||||
Swal.fire({
|
Swal.fire({
|
||||||
title: 'Gagal',
|
title: 'Gagal',
|
||||||
text: 'Akun dengen email ' + email +
|
text: response.message,
|
||||||
' tidak tersedia',
|
|
||||||
icon: 'error',
|
icon: 'error',
|
||||||
confirmButtonText: 'OK'
|
confirmButtonText: 'OK'
|
||||||
});
|
});
|
||||||
|
@ -1,15 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use App\Http\Controllers\Admin\AdminRefundController;
|
|
||||||
use App\Http\Controllers\Admin\AdminSettingController;
|
|
||||||
use App\Http\Controllers\Admin\AdminUserController;
|
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
use App\Http\Controllers\API\LoginApiController;
|
use App\Http\Controllers\API\Login\LoginApiController;
|
||||||
use App\Http\Controllers\Profile\ProfileController;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use App\Http\Controllers\User\UserContactController;
|
|
||||||
use App\Http\Controllers\User\UserDashboardController;
|
|
||||||
use App\Http\Controllers\User\UserRefundController;
|
|
||||||
use App\Http\Controllers\User\UserTransactionController;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@ -33,34 +26,17 @@ Route::group(
|
|||||||
],
|
],
|
||||||
function () {
|
function () {
|
||||||
Route::post('login', [LoginApiController::class,'login']);
|
Route::post('login', [LoginApiController::class,'login']);
|
||||||
Route::post('logout', [LoginApiController::class,'logout']);
|
Route::get('logout', [LoginApiController::class,'logout']);
|
||||||
Route::post('refresh', [LoginApiController::class,'refresh']);
|
Route::get('refresh', [LoginApiController::class,'refresh']);
|
||||||
Route::post('me', [LoginApiController::class,'me']);
|
Route::get('me', [LoginApiController::class,'me']);
|
||||||
Route::post('register',[LoginApiController::class,'register']);
|
Route::post('register',[LoginApiController::class,'register']);
|
||||||
Route::post('hai',[LoginApiController::class,'hai']);
|
Route::post('hai',[LoginApiController::class,'test']);
|
||||||
Route::post('status',[LoginApiController::class,'check']);
|
Route::get('status',[LoginApiController::class,'check']);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
Route::middleware(['auth'])->group(function(){
|
Route::middleware(['auth'])->group(function(){
|
||||||
Route::middleware(['admin'])->group(function(){
|
|
||||||
Route::prefix('admin')->group(function(){
|
|
||||||
// aprove atau deny dan hapus user
|
|
||||||
Route::controller(AdminUserController::class)->group(function(){
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
// approve atau deny dan hapus refund
|
|
||||||
Route::controller(AdminRefundController::class)->group(function(){
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
Route::controller(AdminSettingController::class)->group(function(){
|
|
||||||
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
Route::prefix('profile')->group(function(){
|
Route::prefix('profile')->group(function(){
|
||||||
Route::controller(ProfileController::class)->group(function(){
|
Route::controller(ProfileController::class)->group(function(){
|
||||||
|
@ -3,27 +3,30 @@
|
|||||||
use App\Models\Refunds;
|
use App\Models\Refunds;
|
||||||
use App\Models\Transactions;
|
use App\Models\Transactions;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
//Admin
|
//Admin
|
||||||
use App\Http\Controllers\Login\LoginController;
|
use App\Http\Controllers\Admin\User\AdminUserController;
|
||||||
use App\Http\Controllers\Admin\AdminUserController;
|
use App\Http\Controllers\Admin\Setting\AdminSettingController;
|
||||||
use App\Http\Controllers\User\UserRefundController;
|
use App\Http\Controllers\Admin\Dashboard\AdminDashboardController;
|
||||||
|
use App\Http\Controllers\Admin\Transaction\AdminTransactionController;
|
||||||
|
use App\Http\Controllers\Admin\Refund\AdminRefundController;
|
||||||
|
|
||||||
//Login
|
//Login
|
||||||
use App\Http\Controllers\User\UserContactController;
|
use App\Http\Controllers\Login\LoginController;
|
||||||
use App\Http\Controllers\Admin\AdminRefundController;
|
|
||||||
//User
|
//User
|
||||||
use App\Http\Controllers\Admin\AdminSettingController;
|
use App\Http\Controllers\User\Contact\UserContactController;
|
||||||
use App\Http\Controllers\User\UserDashboardController;
|
use App\Http\Controllers\User\Refund\UserRefundController;
|
||||||
use App\Http\Controllers\Admin\AdminDashboardController;
|
use App\Http\Controllers\User\Dashboard\UserDashboardController;
|
||||||
use App\Http\Controllers\User\UserTransactionController;
|
use App\Http\Controllers\User\Transaction\UserTransactionController;
|
||||||
use App\Http\Controllers\Admin\AdminTransactionController;
|
use App\Http\Controllers\User\Pembeli\PembeliController;
|
||||||
|
use App\Http\Controllers\User\Penjual\PenjualController;
|
||||||
|
|
||||||
//Profile
|
//Profile
|
||||||
use App\Http\Controllers\Profile\ProfileController;
|
use App\Http\Controllers\Profile\ProfileController;
|
||||||
|
|
||||||
//Invoice
|
//Invoice
|
||||||
use App\Http\Controllers\Invoice\InvoiceController;
|
use App\Http\Controllers\Invoice\InvoiceController;
|
||||||
use App\Http\Controllers\User\PembeliController;
|
|
||||||
use App\Http\Controllers\User\PenjualController;
|
|
||||||
|
|
||||||
// use Illuminate\Foundation\Auth\User;
|
// use Illuminate\Foundation\Auth\User;
|
||||||
|
|
||||||
@ -80,7 +83,7 @@ Route::controller(LoginController::class)->group(function(){
|
|||||||
Route::post('kode-verifikasi','sendVerificationCode')->name('kirim-kode');
|
Route::post('kode-verifikasi','sendVerificationCode')->name('kirim-kode');
|
||||||
Route::get('ocr','getOcr');
|
Route::get('ocr','getOcr');
|
||||||
Route::get('email','email');
|
Route::get('email','email');
|
||||||
Route::get('test-invoice','invoice');
|
Route::get('test','invoice');
|
||||||
});
|
});
|
||||||
|
|
||||||
// admin dan user
|
// admin dan user
|
||||||
|
Loading…
Reference in New Issue
Block a user