Repo Baru
59
.env.example
@ -1,59 +0,0 @@
|
||||
APP_NAME=Laravel
|
||||
APP_ENV=local
|
||||
APP_KEY=
|
||||
APP_DEBUG=true
|
||||
APP_URL=http://localhost
|
||||
|
||||
LOG_CHANNEL=stack
|
||||
LOG_DEPRECATIONS_CHANNEL=null
|
||||
LOG_LEVEL=debug
|
||||
|
||||
DB_CONNECTION=mysql
|
||||
DB_HOST=127.0.0.1
|
||||
DB_PORT=3306
|
||||
DB_DATABASE=laravel
|
||||
DB_USERNAME=root
|
||||
DB_PASSWORD=
|
||||
|
||||
BROADCAST_DRIVER=log
|
||||
CACHE_DRIVER=file
|
||||
FILESYSTEM_DISK=local
|
||||
QUEUE_CONNECTION=sync
|
||||
SESSION_DRIVER=file
|
||||
SESSION_LIFETIME=120
|
||||
|
||||
MEMCACHED_HOST=127.0.0.1
|
||||
|
||||
REDIS_HOST=127.0.0.1
|
||||
REDIS_PASSWORD=null
|
||||
REDIS_PORT=6379
|
||||
|
||||
MAIL_MAILER=smtp
|
||||
MAIL_HOST=mailpit
|
||||
MAIL_PORT=1025
|
||||
MAIL_USERNAME=null
|
||||
MAIL_PASSWORD=null
|
||||
MAIL_ENCRYPTION=null
|
||||
MAIL_FROM_ADDRESS="hello@example.com"
|
||||
MAIL_FROM_NAME="${APP_NAME}"
|
||||
|
||||
AWS_ACCESS_KEY_ID=
|
||||
AWS_SECRET_ACCESS_KEY=
|
||||
AWS_DEFAULT_REGION=us-east-1
|
||||
AWS_BUCKET=
|
||||
AWS_USE_PATH_STYLE_ENDPOINT=false
|
||||
|
||||
PUSHER_APP_ID=
|
||||
PUSHER_APP_KEY=
|
||||
PUSHER_APP_SECRET=
|
||||
PUSHER_HOST=
|
||||
PUSHER_PORT=443
|
||||
PUSHER_SCHEME=https
|
||||
PUSHER_APP_CLUSTER=mt1
|
||||
|
||||
VITE_APP_NAME="${APP_NAME}"
|
||||
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||
VITE_PUSHER_HOST="${PUSHER_HOST}"
|
||||
VITE_PUSHER_PORT="${PUSHER_PORT}"
|
||||
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
|
||||
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
127
app/Http/Controllers/API/LoginApiController.php
Normal file
@ -0,0 +1,127 @@
|
||||
<?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(),
|
||||
// ]);
|
||||
// }
|
||||
}
|
82
app/Http/Controllers/Admin/AdminDashboardController.php
Normal file
@ -0,0 +1,82 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Carbon\Carbon;
|
||||
use App\Models\Transactions;
|
||||
use App\Models\Transaction;
|
||||
use App\Models\Refund;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class AdminDashboardController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
$transactions = Transactions::allTransactions();
|
||||
$currentMonth = Carbon::now()->month;
|
||||
$currentYear = Carbon::now()->year;
|
||||
|
||||
$countSuccess = Transaction::where('status', 'settlement')
|
||||
->whereMonth('updated_at', $currentMonth)
|
||||
->whereYear('updated_at', $currentYear)
|
||||
->count();
|
||||
|
||||
$countPending = Transaction::where('status', 'pending')
|
||||
->whereMonth('updated_at', $currentMonth)
|
||||
->whereYear('updated_at', $currentYear)
|
||||
->count();
|
||||
|
||||
$countCancelled = Transaction::where('status', 'cancel')
|
||||
->whereMonth('updated_at', $currentMonth)
|
||||
->whereYear('updated_at', $currentYear)
|
||||
->count();
|
||||
|
||||
$countRefund = Transaction::where('status', 'refund')
|
||||
->whereMonth('updated_at', $currentMonth)
|
||||
->whereYear('updated_at', $currentYear)
|
||||
->count();
|
||||
|
||||
$totalTransaction = Transaction::whereMonth('updated_at', $currentMonth)
|
||||
->whereYear('updated_at', $currentYear)
|
||||
->count();
|
||||
|
||||
$dataChartTransaction = [];
|
||||
$dataChartRefund = [];
|
||||
|
||||
$totalRefund = Transaction::where('status', 'refund')->count();
|
||||
$dataChartTotalRefund = [];
|
||||
|
||||
$totalUser = User::where('status', 'Finished')->count();
|
||||
$dataChartTotalUser = [];
|
||||
|
||||
for ($bulan = 1; $bulan <= 12; $bulan++) {
|
||||
$transaction = Transaction::whereMonth('updated_at', $bulan)
|
||||
->whereYear('updated_at', $currentYear)
|
||||
->where('status', 'settlement')
|
||||
->sum('total_bayar');
|
||||
|
||||
$refund = Transaction::whereMonth('updated_at', $bulan)
|
||||
->whereYear('updated_at', $currentYear)
|
||||
->where('status', 'partial refund')
|
||||
->sum('total_harga');
|
||||
|
||||
$dataChartTransaction[] = intval($transaction);
|
||||
$dataChartRefund[] = intval($refund);
|
||||
}
|
||||
|
||||
return view('admin.index', compact('transactions', 'countSuccess', 'countPending', 'countCancelled', 'countRefund', 'totalRefund', 'totalUser', 'totalTransaction', 'dataChartTransaction', 'dataChartRefund', 'dataChartTotalUser', 'dataChartTotalRefund'));
|
||||
}
|
||||
|
||||
public function getChartByMonth()
|
||||
{
|
||||
$dataChartLaporan = [];
|
||||
$tahun = Carbon::now()->year;
|
||||
}
|
||||
|
||||
public function getCharByYear()
|
||||
{
|
||||
}
|
||||
}
|
47
app/Http/Controllers/Admin/AdminRefundController.php
Normal file
@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Models\Refund;
|
||||
use App\Models\Refunds;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\RefundDescription;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class AdminRefundController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return view('admin.refund.index',[
|
||||
"refunds" => Refund::latest()->get()
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
$refund = Refund::find($id);
|
||||
$refundDescription = RefundDescription::where('refund_id',$id)->get();
|
||||
return view('admin.refund.detail-refund',[
|
||||
"refund"=> $refund,
|
||||
'descriptions' => $refundDescription
|
||||
]);
|
||||
}
|
||||
|
||||
public function aprroveRefund($id){
|
||||
$query = Refund::where('id',$id)->update([
|
||||
|
||||
]);
|
||||
}
|
||||
|
||||
public function denyRefund($id){
|
||||
$query = Refund::where('id',$id)->update([
|
||||
|
||||
]);
|
||||
}
|
||||
}
|
88
app/Http/Controllers/Admin/AdminSettingController.php
Normal file
@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Models\Setting;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Throwable;
|
||||
|
||||
class AdminSettingController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$settings = Setting::all();
|
||||
return view('admin.setting.index', [
|
||||
'settings' => $settings,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
try{
|
||||
DB::beginTransaction();
|
||||
|
||||
Setting::updateOrCreate(
|
||||
['bulan' => $request->bulan, 'tahun' => $request->tahun],
|
||||
['persentase' => $request->persentase]
|
||||
);
|
||||
|
||||
DB::commit();
|
||||
|
||||
return response()->json(['status' => true, 'message' => 'Berhasil menambah']);
|
||||
|
||||
}catch(Throwable $e){
|
||||
DB::rollBack();
|
||||
|
||||
Log::error($e->getMessage());
|
||||
|
||||
return response()->json(['status' => false, 'message' => 'Terjadi Kesalahan pada sisi server', 'data' => $request]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function activeSetting(Request $request)
|
||||
{
|
||||
$setting = Setting::findOrFail($request->id);
|
||||
if ($setting->status == 'Active') {
|
||||
$setting->status = 'Nonactive';
|
||||
$result = $setting->save();
|
||||
if ($result) {
|
||||
return response()->json([
|
||||
'message' => "Berhasil update kebijakan",
|
||||
'status' => true,
|
||||
]);
|
||||
} else {
|
||||
return response()->json([
|
||||
'message' => "Gagal update kebijakan",
|
||||
'status' => true,
|
||||
]);
|
||||
}
|
||||
} else {
|
||||
$setting->status = 'Active';
|
||||
$result = $setting->save();
|
||||
if ($result) {
|
||||
return response()->json([
|
||||
'message' => "Berhasil update kebijakan",
|
||||
'status' => true,
|
||||
]);
|
||||
} else {
|
||||
return response()->json([
|
||||
'message' => "Gagal update kebijakan",
|
||||
'status' => true,
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
35
app/Http/Controllers/Admin/AdminTransactionController.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Models\Transaction;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\TransactionDescription;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class AdminTransactionController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return view('admin.transaction.index', [
|
||||
'transactions' => Transaction::latest()
|
||||
->get(),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
return view('admin.transaction.detail-transaction', [
|
||||
'transaction' => Transaction::findOrFail($id),
|
||||
'trackings' => TransactionDescription::where('transaction_id', $id)
|
||||
->latest()
|
||||
->get(),
|
||||
]);
|
||||
}
|
||||
}
|
88
app/Http/Controllers/Admin/AdminUserController.php
Normal file
@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class AdminUserController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$users = User::where('role', 'User')
|
||||
->orderByRaw("CASE WHEN status = 'Progress' THEN 1 WHEN status = 'Finished' THEN 2 WHEN status = 'Rejected' THEN 3 ELSE 4 END ASC")
|
||||
->latest()
|
||||
->get();
|
||||
return view('admin.users.index', ['users' => $users]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
$user = User::find($id);
|
||||
return view('admin.users.detail-user', ['user' => $user]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
try {
|
||||
$result = User::destroy($id);
|
||||
if ($result) {
|
||||
return response()->json([
|
||||
'message' => 'Berhasil hapus data',
|
||||
'status' => true,
|
||||
]);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
return response()->json([
|
||||
'message' => 'Gagal hapus data, karena ' . $e,
|
||||
'status' => false,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function approveUser($id)
|
||||
{
|
||||
$user = User::findOrFail($id);
|
||||
$user->status = 'Finished';
|
||||
$result = $user->save();
|
||||
if ($result) {
|
||||
return response()->json([
|
||||
'message' => 'Akun telah disetujui dan dapat digunakan',
|
||||
'status' => true,
|
||||
]);
|
||||
} else {
|
||||
return response()->json([
|
||||
'message' => 'Akun gagal disetujui karena ' + $result,
|
||||
'status' => false,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function denyUser($id)
|
||||
{
|
||||
$user = User::findOrFail($id);
|
||||
$user->status = 'Rejected';
|
||||
$result = $user->save();
|
||||
if ($result) {
|
||||
return response()->json([
|
||||
'message' => 'Akun telah ditolak dan tidak dapat digunakan',
|
||||
'status' => true,
|
||||
]);
|
||||
} else {
|
||||
return response()->json([
|
||||
'message' => 'Akun gagal ditolak karena ' + $result,
|
||||
'status' => false,
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
336
app/Http/Controllers/Login/LoginController.php
Normal file
@ -0,0 +1,336 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Login;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Mail\verificationMail;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Mail;
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use thiagoalessio\TesseractOCR\TesseractOCR;
|
||||
use Intervention\Image\ImageManagerStatic as Image;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use Laravolt\Indonesia\Models\City;
|
||||
use Laravolt\Indonesia\Models\District;
|
||||
use Laravolt\Indonesia\Models\Province;
|
||||
use Laravolt\Indonesia\Models\Village;
|
||||
use Ramsey\Uuid\Uuid;
|
||||
|
||||
class LoginController extends Controller
|
||||
{
|
||||
public function login()
|
||||
{
|
||||
return view('index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a JWT via given credentials.
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function authenticate(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.',
|
||||
]
|
||||
);
|
||||
|
||||
if (Auth::attempt($credentials)) {
|
||||
if (Auth::user()->status == 'Finished') {
|
||||
$request->session()->regenerate();
|
||||
if (ucwords(Auth::user()->role) == 'Admin') {
|
||||
return redirect()->intended('admin');
|
||||
} else {
|
||||
return redirect()->intended('user');
|
||||
}
|
||||
} else if(Auth::user()->status == 'Rejected'){
|
||||
Session::flash('message', 'Akun ditolak karena tidak memenuhi persyaratan');
|
||||
return redirect()->back();
|
||||
} else {
|
||||
Session::flash('message', 'Akun tidak ditemukan atau sedang dalam pengajuan');
|
||||
return redirect()->back();
|
||||
}
|
||||
}else{
|
||||
return redirect()
|
||||
->back()
|
||||
->withErrors($credentials)
|
||||
->onlyInput('email');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Log the user out (Invalidate the token).
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function logout(Request $request)
|
||||
{
|
||||
Auth::logout();
|
||||
|
||||
$request->session()->invalidate();
|
||||
|
||||
$request->session()->regenerateToken();
|
||||
|
||||
return redirect()->route('login');
|
||||
}
|
||||
|
||||
public function register(Request $request)
|
||||
{
|
||||
$nama_depan = $request->get('nama-depan');
|
||||
$nama_belakang = $request->get('nama-belakang');
|
||||
$tanggal_lahir = $request->get('tanggal-lahir');
|
||||
$new_password = $request->get('new-password');
|
||||
$nik = $request->get('nik');
|
||||
$email = $request->get('email');
|
||||
$nohp = $request->get('nohp');
|
||||
$alamat = $request->get('alamat');
|
||||
$foto_ktp = '';
|
||||
$foto_wajah = '';
|
||||
$persentase_kemiripan = 0;
|
||||
$gender = $request->get('gender');
|
||||
$kode_kelurahan = $request->get('kode-kelurahan');
|
||||
|
||||
$ktpBase64 = $request->request->get('ktp');
|
||||
$wajahBase64 = $request->request->get('wajah');
|
||||
|
||||
$validatedData['email_verified_at'] = now();
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
//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';
|
||||
// }
|
||||
} catch (\Exception $e) {
|
||||
// $status = 'Progress';
|
||||
}
|
||||
//OCR
|
||||
|
||||
//Deteksi wajah belum
|
||||
|
||||
$password = Hash::make($new_password);
|
||||
|
||||
$result = User::create([
|
||||
'id' => Uuid::uuid4(),
|
||||
'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,
|
||||
'foto_profile' => null,
|
||||
'persentase_kemiripan' => $persentase_kemiripan,
|
||||
'gender' => $gender,
|
||||
'kode_kelurahan' => $kode_kelurahan,
|
||||
'remember_token' => Str::random(10),
|
||||
]);
|
||||
|
||||
if ($result) {
|
||||
return response()->json([
|
||||
'status' => true,
|
||||
'message' => 'Akun anda sudah terdaftar dan butuh verifikasi hingga maksimal 1 hari kerja',
|
||||
]);
|
||||
} else {
|
||||
return response()->json([
|
||||
'status' => false,
|
||||
'message' => 'Akun anda gagal terdaftar. Coba lagi! ' + $result,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function accountStatus($email)
|
||||
{
|
||||
$result = User::where('email', $email)->get();
|
||||
if ($result->isNotEmpty()) {
|
||||
return response()->json([
|
||||
'status' => true,
|
||||
'message' => $result,
|
||||
]);
|
||||
} else {
|
||||
return response()->json([
|
||||
'status' => false,
|
||||
'message' => $result,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function searchProvince()
|
||||
{
|
||||
$data = Province::where('name', 'LIKE', '%' . strtoupper(request('q')) . '%')->paginate(10);
|
||||
|
||||
return response()->json($data);
|
||||
}
|
||||
|
||||
public function searchCity($code)
|
||||
{
|
||||
$data = City::where('province_code', $code)
|
||||
->where('name', 'LIKE', '%' . strtoupper(request('q')) . '%')
|
||||
->paginate(10);
|
||||
|
||||
return response()->json($data);
|
||||
}
|
||||
|
||||
public function searchDistrict($code)
|
||||
{
|
||||
$data = District::where('city_code', $code)
|
||||
->where('name', 'LIKE', '%' . strtoupper(request('q')) . '%')
|
||||
->paginate(10);
|
||||
|
||||
return response()->json($data);
|
||||
}
|
||||
|
||||
public function searchVillage($code)
|
||||
{
|
||||
$data = Village::where('district_code', $code)
|
||||
->where('name', 'LIKE', '%' . strtoupper(request('q')) . '%')
|
||||
->paginate(10);
|
||||
|
||||
return response()->json($data);
|
||||
}
|
||||
|
||||
public function sendVerificationCode(Request $request)
|
||||
{
|
||||
$email = $request->get('email');
|
||||
$code = $request->get('code');
|
||||
|
||||
$verificationEmail = [
|
||||
'code' => $code,
|
||||
'email' => $email,
|
||||
];
|
||||
try {
|
||||
Mail::to($email)->send(new verificationMail($verificationEmail));
|
||||
return response()->json([
|
||||
'message' => 'Kode verifikasi berhasil dikirim ke email. Silahkan cek di email anda.',
|
||||
'status' => true,
|
||||
]);
|
||||
} catch (\Exception $e) {
|
||||
return response()->json([
|
||||
'message' => 'Kode verifikasi gagal dikirim ke email. ' . $e,
|
||||
'status' => false,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function getOcr()
|
||||
{
|
||||
//OCR
|
||||
// dd(phpinfo());
|
||||
try {
|
||||
$fotoKTP = public_path('storage/foto-ktp/ktp.jpg');
|
||||
|
||||
$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);
|
||||
$nikOCR = '';
|
||||
$namaOCR = '';
|
||||
$nikInputan = '3471140209790001';
|
||||
$namaInputan = 'RIYANTO. SE';
|
||||
|
||||
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';
|
||||
|
||||
dd([$persentase_kemiripan, $lines]);
|
||||
|
||||
// if (similar_text($nikInputan, $nikOCR, $percent) >= 70 && similar_text($namaOCR, $namaOCR, $percent) >= 70) {
|
||||
// $status = 'Progress';
|
||||
// } else {
|
||||
// $status = 'Progress';
|
||||
// }
|
||||
} catch (\Exception $e) {
|
||||
// $status = 'Progress';
|
||||
dd($e);
|
||||
}
|
||||
//OCR
|
||||
}
|
||||
}
|
105
app/Http/Controllers/Profile/ProfileController.php
Normal file
@ -0,0 +1,105 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Profile;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Throwable;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Laravolt\Indonesia\Models\City;
|
||||
use Laravolt\Indonesia\Models\District;
|
||||
use Laravolt\Indonesia\Models\Provinsi;
|
||||
use Laravolt\Indonesia\Models\Village;
|
||||
|
||||
class ProfileController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
$provinces = Provinsi::all();
|
||||
$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();
|
||||
return view('profile.index', compact('provinces', 'cities', 'districts', 'villages'));
|
||||
}
|
||||
|
||||
public function updateProfile(Request $request)
|
||||
{
|
||||
$nama_depan = str_replace(' ', '_', $request->nama_depan);
|
||||
$nama_belakang = str_replace(' ', '_', $request->nama_belakang);
|
||||
$nohp = $request->nohp;
|
||||
$kode_kelurahan = $request->kelurahan;
|
||||
$alamat = $request->alamat;
|
||||
$nama_bank = $request->nama_bank;
|
||||
$no_rek = $request->no_rek;
|
||||
$foto_profile = '';
|
||||
if ($request->hasFile('foto')) {
|
||||
$file = $request->file('foto');
|
||||
$foto_profile = 'Foto_Profil_' . $nama_depan . '_' . $nama_belakang .'.'. $file->getClientOriginalExtension();
|
||||
$path = 'foto-profile/' . $foto_profile;
|
||||
|
||||
Storage::disk('public')->put($path, file_get_contents($file));
|
||||
}
|
||||
|
||||
try {
|
||||
DB::beginTransaction();
|
||||
|
||||
User::where('id', Auth::user()->id)->update([
|
||||
'nama_depan' => $nama_depan,
|
||||
'nama_belakang' => $nama_belakang,
|
||||
'nohp' => $nohp,
|
||||
'kode_kelurahan' => $kode_kelurahan,
|
||||
'alamat' => $alamat,
|
||||
'nama_bank' => $nama_bank,
|
||||
'no_rek' => $no_rek,
|
||||
'foto_profile' => $foto_profile,
|
||||
]);
|
||||
|
||||
DB::commit();
|
||||
|
||||
return response()->json(['status' => true, 'message' => 'Data Profile berhasil diupdate']);
|
||||
} catch (Throwable $e) {
|
||||
DB::rollBack();
|
||||
|
||||
Log::error($e->getMessage());
|
||||
|
||||
return response()->json(['status' => false, 'message' => 'Terjadi Kesalahan pada sisi server']);
|
||||
}
|
||||
}
|
||||
|
||||
public function changePassword(Request $request){
|
||||
$currentPassword = $request->currentPassword;
|
||||
$newPassword = $request->newPassword;
|
||||
$renewPassword = $request->renewPassword;
|
||||
|
||||
if(!Hash::check($currentPassword, auth()->user()->password)){
|
||||
return response()->json(['status' => false, 'message' => 'Password sekarang tidak sama','password' => $currentPassword]);
|
||||
}
|
||||
|
||||
if($renewPassword != $newPassword){
|
||||
return response()->json(['status' => false, 'message' => 'Ketikan ulang password baru']);
|
||||
}
|
||||
|
||||
try{
|
||||
DB::beginTransaction();
|
||||
|
||||
User::where('id', auth()->user()->id)->update([
|
||||
'password' => Hash::make($newPassword)
|
||||
]);
|
||||
|
||||
DB::commit();
|
||||
|
||||
return response()->json(['status' => true, 'message' => 'Password Berhasil diubah']);
|
||||
}catch(Throwable $e){
|
||||
DB::rollBack();
|
||||
|
||||
Log::error($e->getMessage());
|
||||
|
||||
return response()->json(['status' => false, 'message' => 'Terjadi Kesalahan pada sisi server']);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Refund;
|
||||
use App\Http\Requests\StoreRefundRequest;
|
||||
use App\Http\Requests\UpdateRefundRequest;
|
||||
|
||||
class RefundController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$refundData = Refund::all();
|
||||
return view('Admin.refund.history-refund', ['history_refund' => $refundData]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(StoreRefundRequest $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*/
|
||||
public function show(Refund $refund)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit(Refund $refund)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(UpdateRefundRequest $request, Refund $refund)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy(Refund $refund)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
@ -2,11 +2,10 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Users;
|
||||
use App\Http\Requests\StoreUsersRequest;
|
||||
use App\Http\Requests\UpdateUsersRequest;
|
||||
use App\Models\RefundDescription;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class UsersController extends Controller
|
||||
class RefundDescriptionController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
@ -27,7 +26,7 @@ class UsersController extends Controller
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(StoreUsersRequest $request)
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
@ -35,7 +34,7 @@ class UsersController extends Controller
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*/
|
||||
public function show(Users $users)
|
||||
public function show(RefundDescription $refundDescription)
|
||||
{
|
||||
//
|
||||
}
|
||||
@ -43,7 +42,7 @@ class UsersController extends Controller
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit(Users $users)
|
||||
public function edit(RefundDescription $refundDescription)
|
||||
{
|
||||
//
|
||||
}
|
||||
@ -51,7 +50,7 @@ class UsersController extends Controller
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(UpdateUsersRequest $request, Users $users)
|
||||
public function update(Request $request, RefundDescription $refundDescription)
|
||||
{
|
||||
//
|
||||
}
|
||||
@ -59,7 +58,7 @@ class UsersController extends Controller
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy(Users $users)
|
||||
public function destroy(RefundDescription $refundDescription)
|
||||
{
|
||||
//
|
||||
}
|
@ -1,66 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\transaction;
|
||||
use App\Http\Requests\StoretransactionRequest;
|
||||
use App\Http\Requests\UpdatetransactionRequest;
|
||||
|
||||
class TransactionController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(StoretransactionRequest $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*/
|
||||
public function show(transaction $transaction)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit(transaction $transaction)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(UpdatetransactionRequest $request, transaction $transaction)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy(transaction $transaction)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
@ -2,11 +2,10 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Setting;
|
||||
use App\Http\Requests\StoreSettingRequest;
|
||||
use App\Http\Requests\UpdateSettingRequest;
|
||||
use App\Models\TransactionDescription;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class SettingController extends Controller
|
||||
class TransactionDescriptionController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
@ -27,7 +26,7 @@ class SettingController extends Controller
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(StoreSettingRequest $request)
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
@ -35,7 +34,7 @@ class SettingController extends Controller
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*/
|
||||
public function show(Setting $setting)
|
||||
public function show(TransactionDescription $transactionDescription)
|
||||
{
|
||||
//
|
||||
}
|
||||
@ -43,7 +42,7 @@ class SettingController extends Controller
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit(Setting $setting)
|
||||
public function edit(TransactionDescription $transactionDescription)
|
||||
{
|
||||
//
|
||||
}
|
||||
@ -51,7 +50,7 @@ class SettingController extends Controller
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(UpdateSettingRequest $request, Setting $setting)
|
||||
public function update(Request $request, TransactionDescription $transactionDescription)
|
||||
{
|
||||
//
|
||||
}
|
||||
@ -59,7 +58,7 @@ class SettingController extends Controller
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy(Setting $setting)
|
||||
public function destroy(TransactionDescription $transactionDescription)
|
||||
{
|
||||
//
|
||||
}
|
112
app/Http/Controllers/User/UserContactController.php
Normal file
@ -0,0 +1,112 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\User;
|
||||
|
||||
use App\Models\Contact;
|
||||
use App\Models\User;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class UserContactController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$contacts = Contact::where('pemilik_kontak', Auth::user()->email)->get();
|
||||
return view('user.contact.index', ['contacts' => $contacts]);
|
||||
}
|
||||
|
||||
public function getContact()
|
||||
{
|
||||
$data = DB::table('contacts')
|
||||
->select('contacts.relasi_kontak', 'users.nama_depan', 'users.nama_belakang')
|
||||
->join('users', 'contacts.relasi_kontak', '=', 'users.email')
|
||||
->where('contacts.pemilik_kontak','=',Auth::user()->email)
|
||||
->paginate(10);
|
||||
return response()->json($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
$email_relasi = $request->input('email');
|
||||
if ($email_relasi == Auth::user()->email) {
|
||||
return response()->json([
|
||||
'status' => false,
|
||||
'message' => 'Kontak yang ingin didaftarkan tidak boleh sama',
|
||||
]);
|
||||
} else {
|
||||
$result = Contact::create([
|
||||
'pemilik_kontak' => Auth::user()->email,
|
||||
'relasi_kontak' => $request->input('email'),
|
||||
]);
|
||||
|
||||
if ($result) {
|
||||
return response()->json([
|
||||
'status' => true,
|
||||
'message' => 'Akun berhasil masuk ke kontak',
|
||||
]);
|
||||
} else {
|
||||
return response()->json([
|
||||
'status' => false,
|
||||
'message' => 'Akun gagal masuk ke kontak',
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
try {
|
||||
$result = Contact::destroy($id);
|
||||
if ($result) {
|
||||
return response()->json([
|
||||
'message' => 'Berhasil hapus data',
|
||||
'status' => true,
|
||||
]);
|
||||
} else {
|
||||
return response()->json([
|
||||
'message' => 'Gagal hapus data karena ' . $result,
|
||||
'status' => false,
|
||||
]);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
return response()->json([
|
||||
'message' => 'Gagal hapus data, karena ' . $e,
|
||||
'status' => false,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function cekEmail($email)
|
||||
{
|
||||
$result = User::where('email', $email)->first();
|
||||
if ($result->isNotEmpty() && $result[0]->role == 'User' && $result[0]->status != 'Rejected') {
|
||||
if ($result[0]->status == 'Finished') {
|
||||
return response()->json([
|
||||
'status' => true,
|
||||
'message' => $result,
|
||||
]);
|
||||
} else {
|
||||
return response()->json([
|
||||
'status' => false,
|
||||
'message' => 'Akun dengen email ' . $email . ' tersedia dan belum diverifikasi',
|
||||
]);
|
||||
}
|
||||
} else {
|
||||
return response()->json([
|
||||
'status' => false,
|
||||
'message' => 'Akun dengen email ' . $email . ' tidak tersedia atau ditolak',
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
20
app/Http/Controllers/User/UserDashboardController.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\User;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\RefundUser;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Throwable;
|
||||
|
||||
class UserDashboardController extends Controller
|
||||
{
|
||||
public function index(){
|
||||
return view('user.index',[
|
||||
"refundUserss"=>RefundUser::HistoryRefundUser(),
|
||||
]);
|
||||
}
|
||||
}
|
@ -64,5 +64,7 @@ class Kernel extends HttpKernel
|
||||
'signed' => \App\Http\Middleware\ValidateSignature::class,
|
||||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
||||
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
|
||||
'admin' => \App\Http\Middleware\Admin::class,
|
||||
'user' => \App\Http\Middleware\User::class,
|
||||
];
|
||||
}
|
||||
|
24
app/Http/Middleware/Admin.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class Admin
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
|
||||
*/
|
||||
public function handle(Request $request, Closure $next): Response
|
||||
{
|
||||
if(Auth::user()->role != 'Admin'){
|
||||
return redirect()->back();
|
||||
}
|
||||
return $next($request);
|
||||
}
|
||||
}
|
24
app/Http/Middleware/User.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use Illuminate\Http\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class User
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
|
||||
*/
|
||||
public function handle(Request $request, Closure $next): Response
|
||||
{
|
||||
if(Auth::user()->role != 'User'){
|
||||
return redirect()->back();
|
||||
}
|
||||
return $next($request);
|
||||
}
|
||||
}
|
59
app/Mail/verificationMail.php
Normal file
@ -0,0 +1,59 @@
|
||||
<?php
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Contracts\Queue\ShouldQueue;
|
||||
use Illuminate\Mail\Mailable;
|
||||
use Illuminate\Mail\Mailables\Content;
|
||||
use Illuminate\Mail\Mailables\Envelope;
|
||||
use Illuminate\Queue\SerializesModels;
|
||||
|
||||
class verificationMail extends Mailable
|
||||
{
|
||||
use Queueable, SerializesModels;
|
||||
|
||||
public $verificationEmail;
|
||||
|
||||
/**
|
||||
* Create a new message instance.
|
||||
*/
|
||||
public function __construct($verificationEmail)
|
||||
{
|
||||
$this->verificationEmail = $verificationEmail;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the message envelope.
|
||||
*/
|
||||
// public function envelope(): Envelope
|
||||
// {
|
||||
// return new Envelope(
|
||||
// subject: 'Verification Mail',
|
||||
// );
|
||||
// }
|
||||
|
||||
/**
|
||||
* Get the message content definition.
|
||||
*/
|
||||
// public function content(): Content
|
||||
// {
|
||||
// return new Content(
|
||||
// view: 'view.name',
|
||||
// );
|
||||
// }
|
||||
|
||||
/**
|
||||
* Get the attachments for the message.
|
||||
*
|
||||
* @return array<int, \Illuminate\Mail\Mailables\Attachment>
|
||||
*/
|
||||
// public function attachments(): array
|
||||
// {
|
||||
// return [];
|
||||
// }
|
||||
|
||||
public function build(){
|
||||
return $this->subject('Kode Verifikasi')->view('email.verification-email');
|
||||
}
|
||||
}
|
37
app/Models/Contact.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Contact extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'pemilik_kontak',
|
||||
'relasi_kontak',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'id' => 'string',
|
||||
];
|
||||
|
||||
|
||||
//Relasi
|
||||
public function pemilikKontak(){
|
||||
return $this->belongsTo(User::class, 'pemilik_kontak', 'email');
|
||||
}
|
||||
|
||||
public function relasiKontak(){
|
||||
return $this->belongsTo(User::class, 'relasi_kontak', 'email');
|
||||
}
|
||||
|
||||
//Relasi
|
||||
}
|
@ -5,76 +5,30 @@ namespace App\Models;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
// class Refund extends Model{
|
||||
// protected $table = 'refund';
|
||||
// use HasFactory;
|
||||
// }
|
||||
class Refund
|
||||
class Refund extends Model
|
||||
{
|
||||
private static $history_refund=[
|
||||
[
|
||||
"no"=>"1",
|
||||
"orderId" => "INV-1234",
|
||||
"customer" => "Okta",
|
||||
"seller" => "dodo",
|
||||
"total" => "Rp. 15000",
|
||||
"date" => "July 19, 2023 ",
|
||||
"status"=>"Process Refund"
|
||||
],
|
||||
[
|
||||
"no"=>"2",
|
||||
"orderId" => "INV-0000",
|
||||
"customer" => "Selvi",
|
||||
"seller" => "dedo",
|
||||
"total" => "Rp. 11000",
|
||||
"date" => "August 19, 2023 ",
|
||||
"status"=>"Refund Success"
|
||||
],
|
||||
[
|
||||
"no"=>"3",
|
||||
"orderId" => "INV-2313",
|
||||
"customer" => "Septa",
|
||||
"seller" => "dido",
|
||||
"total" => "Rp. 15000",
|
||||
"date" => "July 29, 2023 ",
|
||||
"status"=>"Process Refund"
|
||||
],
|
||||
[
|
||||
"no"=>"4",
|
||||
"orderId" => "INV-5664",
|
||||
"customer" => "Padia",
|
||||
"seller" => "dedo",
|
||||
"total" => "Rp. 14000",
|
||||
"date" => "July 18, 2023 ",
|
||||
"status"=>"Refunds Refused"
|
||||
],
|
||||
[
|
||||
"no"=>"5",
|
||||
"orderId" => "INV-9090",
|
||||
"customer" => "hantu",
|
||||
"seller" => "dado",
|
||||
"total" => "Rp. 45000",
|
||||
"date" => "2023-08-14 ",
|
||||
"status"=>"Refunds Refused"
|
||||
]
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'transaction_id',
|
||||
'total',
|
||||
'due_date',
|
||||
'status',
|
||||
];
|
||||
|
||||
public static $detail_refund=[
|
||||
[
|
||||
"orderId" => "INV-9090",
|
||||
"customer" => "hantu",
|
||||
"seller" => "dado",
|
||||
"total" => "Rp. 45000",
|
||||
"date" => "2023-08-14 ",
|
||||
"complaint" =>" Lorem ipsum dolor sit, amet consectetur adipisicing elit. Aliquam inventore, sit enim iure itaque fuga voluptates alias, eveniet quos ex reiciendis! Dolore mollitia ea inventore, excepturi hic fugiat id, magnam molestias sint ut enim repellendus, cum dolorum dolores sapiente adipisci tempora nihil omnis! Accusantium, non perspiciatis? Molestias modi debitis perferendis reprehenderit excepturi voluptates? Sit incidunt consequuntur iusto odit sapiente inventore nemo commodi, quam vero magnam temporibus ducimus praesentium assumenda blanditiis possimus perferendis totam placeat maiores. Quae ut id libero atque pariatur veritatis rerum culpa tempore consequatur quod corrupti corporis nobis quia repellendus iste quidem illum, voluptates aspernatur cumque officia. Tenetur.",
|
||||
"image"=>"assets/images/dashboard/img_2.jpg"
|
||||
]
|
||||
protected $casts = [
|
||||
'id' => 'string',
|
||||
];
|
||||
public static function HistoryRefund(){
|
||||
return self::$history_refund;
|
||||
|
||||
|
||||
//Relasi
|
||||
public function transaction(){
|
||||
return $this->belongsTo(Transaction::class, 'transaction_id', 'id');
|
||||
}
|
||||
public static function DetailRefund(){
|
||||
return self::$detail_refund;
|
||||
}
|
||||
//Relasi
|
||||
}
|
28
app/Models/RefundDescription.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class RefundDescription extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'refund_id',
|
||||
'filename',
|
||||
'type',
|
||||
];
|
||||
|
||||
//Relasi
|
||||
public function refunds(){
|
||||
return $this->belongsTo(Refund::class, 'refund_id', 'id');
|
||||
}
|
||||
//Relasi
|
||||
}
|
44
app/Models/RefundUser.php
Normal file
@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class RefundUser
|
||||
{
|
||||
// use HasFactory;
|
||||
|
||||
private static $history_refundUser=[
|
||||
[
|
||||
"orderId" => "INV-1234",
|
||||
"Customer" => "npannisa",
|
||||
"seller" => "rayhan",
|
||||
"Total" => " Rp.200.000",
|
||||
"dueDate"=>"29 juni 2023",
|
||||
"status"=>"diterima",
|
||||
"uploadBukti" => "5.jpg"
|
||||
],
|
||||
[
|
||||
"orderId" => "INV-1234",
|
||||
"Customer" => "hantu",
|
||||
"seller" => "rayhan",
|
||||
"Total" => " Rp.200.000",
|
||||
"dueDate"=>"29 juni 2023",
|
||||
"status"=>"ditolak",
|
||||
"uploadBukti" => "5.jpg"
|
||||
],
|
||||
[
|
||||
"orderId" => "INV-1234",
|
||||
"Customer" => "pocong",
|
||||
"seller" => "rayhan",
|
||||
"Total" => " Rp.200.000",
|
||||
"dueDate"=>"29 juni 2023",
|
||||
"status"=>"diterima",
|
||||
"uploadBukti" => "5.jpg"
|
||||
],
|
||||
];
|
||||
public static function HistoryRefundUser(){
|
||||
return self::$history_refundUser;
|
||||
}
|
||||
}
|
80
app/Models/Refunds.php
Normal file
@ -0,0 +1,80 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
// class Refund extends Model{
|
||||
// protected $table = 'refund';
|
||||
// use HasFactory;
|
||||
// }
|
||||
class Refunds
|
||||
{
|
||||
private static $history_refund=[
|
||||
[
|
||||
"no"=>"1",
|
||||
"orderId" => "INV-1234",
|
||||
"customer" => "Okta",
|
||||
"seller" => "dodo",
|
||||
"total" => "Rp. 15000",
|
||||
"date" => "July 19, 2023 ",
|
||||
"status"=>"Process Refund"
|
||||
],
|
||||
[
|
||||
"no"=>"2",
|
||||
"orderId" => "INV-0000",
|
||||
"customer" => "Selvi",
|
||||
"seller" => "dedo",
|
||||
"total" => "Rp. 11000",
|
||||
"date" => "August 19, 2023 ",
|
||||
"status"=>"Refund Success"
|
||||
],
|
||||
[
|
||||
"no"=>"3",
|
||||
"orderId" => "INV-2313",
|
||||
"customer" => "Septa",
|
||||
"seller" => "dido",
|
||||
"total" => "Rp. 15000",
|
||||
"date" => "July 29, 2023 ",
|
||||
"status"=>"Process Refund"
|
||||
],
|
||||
[
|
||||
"no"=>"4",
|
||||
"orderId" => "INV-5664",
|
||||
"customer" => "Padia",
|
||||
"seller" => "dedo",
|
||||
"total" => "Rp. 14000",
|
||||
"date" => "July 18, 2023 ",
|
||||
"status"=>"Refunds Refused"
|
||||
],
|
||||
[
|
||||
"no"=>"5",
|
||||
"orderId" => "INV-9090",
|
||||
"customer" => "hantu",
|
||||
"seller" => "dado",
|
||||
"total" => "Rp. 45000",
|
||||
"date" => "2023-08-14 ",
|
||||
"status"=>"Refunds Refused"
|
||||
]
|
||||
];
|
||||
|
||||
public static $detail_refund=[
|
||||
[
|
||||
"orderId" => "INV-9090",
|
||||
"customer" => "hantu",
|
||||
"seller" => "dado",
|
||||
"total" => "Rp. 45000",
|
||||
"date" => "2023-08-14 ",
|
||||
"complaint" =>" Lorem ipsum dolor sit, amet consectetur adipisicing elit. Aliquam inventore, sit enim iure itaque fuga voluptates alias, eveniet quos ex reiciendis! Dolore mollitia ea inventore, excepturi hic fugiat id, magnam molestias sint ut enim repellendus, cum dolorum dolores sapiente adipisci tempora nihil omnis! Accusantium, non perspiciatis? Molestias modi debitis perferendis reprehenderit excepturi voluptates? Sit incidunt consequuntur iusto odit sapiente inventore nemo commodi, quam vero magnam temporibus ducimus praesentium assumenda blanditiis possimus perferendis totam placeat maiores. Quae ut id libero atque pariatur veritatis rerum culpa tempore consequatur quod corrupti corporis nobis quia repellendus iste quidem illum, voluptates aspernatur cumque officia. Tenetur.",
|
||||
"image"=>"assets/images/dashboard/img_2.jpg"
|
||||
]
|
||||
];
|
||||
public static function HistoryRefund(){
|
||||
return self::$history_refund;
|
||||
|
||||
}
|
||||
public static function DetailRefund(){
|
||||
return self::$detail_refund;
|
||||
}
|
||||
}
|
@ -5,46 +5,23 @@ namespace App\Models;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Setting
|
||||
class Setting extends Model
|
||||
{
|
||||
static $History_Setting=[
|
||||
[
|
||||
"no" => "1",
|
||||
"month" => "January",
|
||||
"year" =>"2021",
|
||||
"persentase" =>"50%",
|
||||
"status" =>"Active"
|
||||
],
|
||||
[
|
||||
"no" => "2",
|
||||
"month" => "February",
|
||||
"year" =>"2022",
|
||||
"persentase" =>"40%",
|
||||
"status" =>"Non Active"
|
||||
],
|
||||
[
|
||||
"no" => "3",
|
||||
"month" => "March",
|
||||
"year" =>"2023",
|
||||
"persentase" =>"30%",
|
||||
"status" =>"Non Active"
|
||||
],
|
||||
[
|
||||
"no" => "4",
|
||||
"month" => "April",
|
||||
"year" =>"2021",
|
||||
"persentase" =>"60%",
|
||||
"status" =>"Non Active"
|
||||
],
|
||||
[
|
||||
"no" => "5",
|
||||
"month" => "May",
|
||||
"year" =>"2023",
|
||||
"persentase" =>"20%",
|
||||
"status" =>"Non Active"
|
||||
]
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'bulan',
|
||||
'tahun',
|
||||
'persentase',
|
||||
];
|
||||
public static function HistorySetting(){
|
||||
return self::$History_Setting;
|
||||
}
|
||||
|
||||
protected $casts = [
|
||||
'id' => 'string',
|
||||
];
|
||||
|
||||
}
|
50
app/Models/Settings.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Settings
|
||||
{
|
||||
static $History_Setting=[
|
||||
[
|
||||
"no" => "1",
|
||||
"month" => "January",
|
||||
"year" =>"2021",
|
||||
"persentase" =>"50%",
|
||||
"status" =>"Active"
|
||||
],
|
||||
[
|
||||
"no" => "2",
|
||||
"month" => "February",
|
||||
"year" =>"2022",
|
||||
"persentase" =>"40%",
|
||||
"status" =>"Non Active"
|
||||
],
|
||||
[
|
||||
"no" => "3",
|
||||
"month" => "March",
|
||||
"year" =>"2023",
|
||||
"persentase" =>"30%",
|
||||
"status" =>"Non Active"
|
||||
],
|
||||
[
|
||||
"no" => "4",
|
||||
"month" => "April",
|
||||
"year" =>"2021",
|
||||
"persentase" =>"60%",
|
||||
"status" =>"Non Active"
|
||||
],
|
||||
[
|
||||
"no" => "5",
|
||||
"month" => "May",
|
||||
"year" =>"2023",
|
||||
"persentase" =>"20%",
|
||||
"status" =>"Non Active"
|
||||
]
|
||||
];
|
||||
public static function HistorySetting(){
|
||||
return self::$History_Setting;
|
||||
}
|
||||
}
|
36
app/Models/TransactionDescription.php
Normal file
@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class TransactionDescription extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'order_id',
|
||||
'user',
|
||||
'judul',
|
||||
'status',
|
||||
'status_code',
|
||||
'background',
|
||||
'deskripsi'
|
||||
];
|
||||
|
||||
//Relasi
|
||||
public function order(){
|
||||
return $this->belongsTo(Transaction::class, 'order_id', 'id');
|
||||
}
|
||||
|
||||
public function user(){
|
||||
return $this->belongsTo(User::class, 'email', 'user');
|
||||
}
|
||||
//Relasi
|
||||
}
|
57
app/Models/TransactionUser.php
Normal file
@ -0,0 +1,57 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
|
||||
class TransactionUser
|
||||
{
|
||||
private static $history_transaction=[
|
||||
[
|
||||
"userId" => "NPA-9876",
|
||||
"orderId" => "INV-1234",
|
||||
"Customer" => "Nurul Prima",
|
||||
"seller" => "Jilhan",
|
||||
"total" => "Rp.500.000",
|
||||
"dueDate"=>"29 juni 2023",
|
||||
"status"=>"OnProgress",
|
||||
"action" => ""
|
||||
],
|
||||
[
|
||||
"userId" => "NPA-9879",
|
||||
"orderId" => "INV-1234",
|
||||
"Customer" => "Nurul Prima Annisa",
|
||||
"seller" => "Raihan",
|
||||
"total" => "Rp.500.000",
|
||||
"dueDate"=>"29 juni 2025",
|
||||
"status"=>"Diterima",
|
||||
"action" => ""
|
||||
],
|
||||
|
||||
// [
|
||||
// "userId" => "NPA-9877",
|
||||
// "orderId" => "INV-1235",
|
||||
// "Customer" => "Nurul Annisa",
|
||||
// "seller" => "Rayhan",
|
||||
// "total" => "Rp.900.000",
|
||||
// "dueDate"=>"29 Juli 2023",
|
||||
// "status"=>"Pembeli",
|
||||
// "action" => ""
|
||||
// ],
|
||||
|
||||
// [
|
||||
// "userId" => "NPA-9878",
|
||||
// "orderId" => "INV-1236",
|
||||
// "Customer" => "Nurul Prima Annisa",
|
||||
// "seller" => "Rayhan",
|
||||
// "total" => "Rp.900.000",
|
||||
// "dueDate"=>"29 Juli 2023",
|
||||
// "status"=>"Pembeli",
|
||||
// "action" => ""
|
||||
// ],
|
||||
];
|
||||
public static function HistoryTransaction(){
|
||||
return self::$history_transaction;
|
||||
}
|
||||
}
|
90
app/Models/Transactions.php
Normal file
@ -0,0 +1,90 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Transactions
|
||||
{
|
||||
private static $list_transaction = [
|
||||
[
|
||||
'no' => '1',
|
||||
'orderId' => 'INV-1234',
|
||||
'customer' => 'Jilhan',
|
||||
'seller' => 'dodo',
|
||||
'total' => 'Rp. 15000',
|
||||
'date' => 'July 19, 2023 ',
|
||||
'status' => 'paid',
|
||||
],
|
||||
[
|
||||
'no' => '2',
|
||||
'orderId' => 'INV-0000',
|
||||
'customer' => 'hmmm',
|
||||
'seller' => 'dodo',
|
||||
'total' => 'Rp. 11000',
|
||||
'date' => 'August 19, 2023 ',
|
||||
'status' => 'pending',
|
||||
],
|
||||
[
|
||||
'no' => '3',
|
||||
'orderId' => 'INV-2313',
|
||||
'customer' => 'nurul',
|
||||
'seller' => 'dido',
|
||||
'total' => 'Rp. 15000',
|
||||
'date' => 'July 29, 2023 ',
|
||||
'status' => 'unpaid',
|
||||
],
|
||||
[
|
||||
'no' => '4',
|
||||
'orderId' => 'INV-5664',
|
||||
'customer' => 'raihan',
|
||||
'seller' => 'dedo',
|
||||
'total' => 'Rp. 14000',
|
||||
'date' => 'July 18, 2023 ',
|
||||
'status' => 'pending',
|
||||
],
|
||||
[
|
||||
'no' => '5',
|
||||
'orderId' => 'INV-9090',
|
||||
'customer' => 'testing',
|
||||
'seller' => 'dado',
|
||||
'total' => 'Rp. 45000',
|
||||
'date' => 'June 19, 2023 ',
|
||||
'status' => 'paid',
|
||||
],
|
||||
];
|
||||
|
||||
private static $detail_transaction = [
|
||||
[
|
||||
'idTransaction' => 'INV-76899',
|
||||
'side' => 'SELL',
|
||||
'marketPair' => 'IDR',
|
||||
'email' => 'JilhanHaura07@gmail.com',
|
||||
'amountTransaction' => 'Rp. 900000',
|
||||
'feeTransaction' => '10%',
|
||||
'total' => '68,00989.00 IDR',
|
||||
'paymentDetail' => 'Bank',
|
||||
'bankName' => 'BNI',
|
||||
'accountNumber' => '123',
|
||||
'statusTransaction' => 'Success',
|
||||
|
||||
// "tracking_number" => "09102919209",
|
||||
// "orderId" => "INV-9090",
|
||||
// "status"=>"Pending",
|
||||
// "estimated" => "June 20, 2023",
|
||||
// "tracking_detail1"=> "August 10: processed payment",
|
||||
// "tracking_detail2"=> "August 12: payment in system",
|
||||
// "tracking_detail3"=> "August 14: payment has been received by the seller",
|
||||
],
|
||||
];
|
||||
public static function allTransactions()
|
||||
{
|
||||
return self::$list_transaction;
|
||||
}
|
||||
|
||||
public static function allDetailTransactions()
|
||||
{
|
||||
return self::$detail_transaction;
|
||||
}
|
||||
}
|
@ -7,6 +7,8 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||
use Illuminate\Notifications\Notifiable;
|
||||
use Laravel\Sanctum\HasApiTokens;
|
||||
use Tymon\JWTAuth\Contracts\JWTSubject;
|
||||
use Illuminate\Database\Eloquent\Concerns\HasUuids;
|
||||
|
||||
class User extends Authenticatable
|
||||
{
|
||||
@ -18,9 +20,24 @@ class User extends Authenticatable
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'id',
|
||||
'nama_depan',
|
||||
'nama_belakang',
|
||||
'tanggal_lahir',
|
||||
'nik',
|
||||
'email',
|
||||
'password',
|
||||
'role',
|
||||
'nohp',
|
||||
'alamat',
|
||||
'foto_ktp',
|
||||
'foto_wajah',
|
||||
'foto_profile',
|
||||
'persentase_kemiripan',
|
||||
'status',
|
||||
'gender',
|
||||
'kode_kelurahan',
|
||||
'remember_token',
|
||||
];
|
||||
|
||||
/**
|
||||
@ -41,5 +58,72 @@ class User extends Authenticatable
|
||||
protected $casts = [
|
||||
'email_verified_at' => 'datetime',
|
||||
'password' => 'hashed',
|
||||
'id' => 'string',
|
||||
'status' => 'string',
|
||||
];
|
||||
|
||||
//JWT
|
||||
|
||||
/**
|
||||
* Get the identifier that will be stored in the subject claim of the JWT.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getJWTIdentifier()
|
||||
{
|
||||
return $this->getKey();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a key value array, containing any custom claims to be added to the JWT.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getJWTCustomClaims()
|
||||
{
|
||||
return [];
|
||||
}
|
||||
|
||||
//JWT
|
||||
|
||||
|
||||
//Relasi
|
||||
public function pemilik_kontak(){
|
||||
return $this->hasMany(Contact::class, 'email', 'pemilik_kontak');
|
||||
}
|
||||
|
||||
public function relasi_kontak(){
|
||||
return $this->hasMany(Contact::class, 'email', 'relasi_kontak');
|
||||
}
|
||||
|
||||
public function pembeli(){
|
||||
return $this->hasMany(Transaction::class, 'email', 'pembeli');
|
||||
}
|
||||
|
||||
public function penjual(){
|
||||
return $this->hasMany(Transaction::class, 'email', 'penjual');
|
||||
}
|
||||
|
||||
public function village(){
|
||||
return $this->belongsTo('Laravolt\Indonesia\Models\Village', 'kode_kelurahan', 'code');
|
||||
}
|
||||
//Relasi
|
||||
|
||||
//function alamat
|
||||
public function getVillageName(){
|
||||
return $this->village->name;
|
||||
}
|
||||
|
||||
public function getDistrictName(){
|
||||
return $this->village->district->name;
|
||||
}
|
||||
|
||||
public function getCityName(){
|
||||
return $this->village->district->city->name;
|
||||
}
|
||||
|
||||
public function getProvinceName(){
|
||||
return $this->village->district->city->province->name;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,55 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Users
|
||||
{
|
||||
private static $list_users=[
|
||||
[
|
||||
"no" => "1",
|
||||
"userId" => "U1290",
|
||||
"fullname" => "Tsalsabila Jilhan Haura",
|
||||
"email" => "jilhanhaura07@gmail.com",
|
||||
"gender" => "Female",
|
||||
"date" => "August 23, 2023",
|
||||
"status" => "Finished"
|
||||
],
|
||||
[
|
||||
"no" => "2",
|
||||
"userId" => "U4567",
|
||||
"fullname" => "Boncel",
|
||||
"email" => "boncel@gmail.com",
|
||||
"gender" => "Male",
|
||||
"date" => "August 22, 2023",
|
||||
"status" => "Progress"
|
||||
],
|
||||
|
||||
];
|
||||
public static function listUsers(){
|
||||
return self::$list_users;
|
||||
}
|
||||
|
||||
private static $detail_user=[
|
||||
[
|
||||
"userId" => "91029138",
|
||||
"nik" => "214141413414131414",
|
||||
"name" => "Jilhan Haura",
|
||||
"gender" => "Female",
|
||||
"religion" => "Muslim",
|
||||
"bloodType" => "AB",
|
||||
"email" => "jilhanhaura07@gmail.com",
|
||||
"phoneNumber" => "08909098102099",
|
||||
"province" => "Sumatera Barat",
|
||||
"city" => "Padang",
|
||||
"district" => "Padang",
|
||||
"village" => "Balai Baru",
|
||||
"detail" => "Jl Simpang komplek polda balai baru"
|
||||
]
|
||||
];
|
||||
public static function detailUser(){
|
||||
return self::$detail_user;
|
||||
}
|
||||
}
|
@ -5,58 +5,10 @@ namespace App\Models;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class transaction
|
||||
class Transaction extends Model
|
||||
{
|
||||
private static $list_transaction =[
|
||||
[
|
||||
"no"=>"1",
|
||||
"orderId" => "INV-1234",
|
||||
"customer" => "Jilhan",
|
||||
"seller" => "dodo",
|
||||
"total" => "Rp. 15000",
|
||||
"date" => "July 19, 2023 ",
|
||||
"status"=>"paid"
|
||||
],
|
||||
[
|
||||
"no"=>"2",
|
||||
"orderId" => "INV-0000",
|
||||
"customer" => "hmmm",
|
||||
"seller" => "dodo",
|
||||
"total" => "Rp. 11000",
|
||||
"date" => "August 19, 2023 ",
|
||||
"status"=>"pending"
|
||||
],
|
||||
[
|
||||
"no"=>"3",
|
||||
"orderId" => "INV-2313",
|
||||
"customer" => "nurul",
|
||||
"seller" => "dido",
|
||||
"total" => "Rp. 15000",
|
||||
"date" => "July 29, 2023 ",
|
||||
"status"=>"unpaid"
|
||||
],
|
||||
[
|
||||
"no"=>"4",
|
||||
"orderId" => "INV-5664",
|
||||
"customer" => "raihan",
|
||||
"seller" => "dedo",
|
||||
"total" => "Rp. 14000",
|
||||
"date" => "July 18, 2023 ",
|
||||
"status"=>"pending"
|
||||
],
|
||||
[
|
||||
"no"=>"5",
|
||||
"orderId" => "INV-9090",
|
||||
"customer" => "testing",
|
||||
"seller" => "dado",
|
||||
"total" => "Rp. 45000",
|
||||
"date" => "June 19, 2023 ",
|
||||
"status"=>"paid"
|
||||
]
|
||||
use HasFactory;
|
||||
|
||||
<<<<<<< Updated upstream
|
||||
];
|
||||
=======
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
@ -80,40 +32,33 @@ class transaction
|
||||
'batas_pengiriman_barang_awal',
|
||||
'batas_pengiriman_barang_akhir',
|
||||
];
|
||||
>>>>>>> Stashed changes
|
||||
|
||||
private static $detail_transaction=[
|
||||
[
|
||||
"idTransaction" => "INV-76899",
|
||||
"side" =>"SELL",
|
||||
"marketPair"=>"IDR",
|
||||
"email" =>"JilhanHaura07@gmail.com",
|
||||
"amountTransaction" => "Rp. 900000",
|
||||
"feeTransaction" =>"10%",
|
||||
"total" => "68,00989.00 IDR",
|
||||
"paymentDetail" => "Bank",
|
||||
"bankName" => "BNI",
|
||||
"accountNumber" => "123",
|
||||
"statusTransaction" => "Success"
|
||||
|
||||
|
||||
// "tracking_number" => "09102919209",
|
||||
// "orderId" => "INV-9090",
|
||||
// "status"=>"Pending",
|
||||
// "estimated" => "June 20, 2023",
|
||||
// "tracking_detail1"=> "August 10: processed payment",
|
||||
// "tracking_detail2"=> "August 12: payment in system",
|
||||
// "tracking_detail3"=> "August 14: payment has been received by the seller",
|
||||
],
|
||||
|
||||
/**
|
||||
* The attributes that should be cast.
|
||||
*
|
||||
* @var array<string, string>
|
||||
*/
|
||||
protected $casts = [
|
||||
'batas_pembayaran' => 'datetime',
|
||||
'batas_pengiriman_barang' => 'datetime',
|
||||
'id' => 'string',
|
||||
];
|
||||
public static function allTransactions()
|
||||
{
|
||||
return self::$list_transaction;
|
||||
|
||||
//Relasi
|
||||
public function data_pembeli(){
|
||||
return $this->belongsTo(User::class, 'pembeli', 'email');
|
||||
}
|
||||
|
||||
public static function allDetailTransactions()
|
||||
{
|
||||
return self::$detail_transaction;
|
||||
public function data_penjual(){
|
||||
return $this->belongsTo(User::class, 'penjual', 'email');
|
||||
}
|
||||
|
||||
public function refunds(){
|
||||
return $this->hasMany(Refund::class, 'transaction_id', 'id');
|
||||
}
|
||||
|
||||
public function transactionDescription(){
|
||||
return $this->hasMany(TransactionDescription::class, 'transaction_id', 'id');
|
||||
}
|
||||
//Relasi
|
||||
}
|
@ -2,14 +2,26 @@
|
||||
"name": "laravel/laravel",
|
||||
"type": "project",
|
||||
"description": "The skeleton application for the Laravel framework.",
|
||||
"keywords": ["laravel", "framework"],
|
||||
"keywords": [
|
||||
"laravel",
|
||||
"framework"
|
||||
],
|
||||
"license": "MIT",
|
||||
"require": {
|
||||
"php": "^8.1",
|
||||
"guzzlehttp/guzzle": "^7.2",
|
||||
"intervention/image": "^2.7",
|
||||
"laravel/framework": "^10.10",
|
||||
"laravel/sanctum": "^3.2",
|
||||
"laravel/tinker": "^2.8"
|
||||
"laravel/tinker": "^2.8",
|
||||
"laravolt/indonesia": "^0.34.0",
|
||||
"midtrans/midtrans-php": "^2.5",
|
||||
"nesbot/carbon": "^2.69",
|
||||
"pusher/pusher-php-server": "^7.2",
|
||||
"ramsey/uuid": "^4.7",
|
||||
"stichoza/google-translate-php": "^5.1",
|
||||
"thiagoalessio/tesseract_ocr": "^2.12",
|
||||
"tymon/jwt-auth": "^2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"fakerphp/faker": "^1.9.1",
|
||||
|
1717
composer.lock
generated
@ -70,7 +70,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'timezone' => 'UTC',
|
||||
'timezone' => 'Asia/Jakarta',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@ -109,7 +109,7 @@ return [
|
||||
|
|
||||
*/
|
||||
|
||||
'faker_locale' => 'en_US',
|
||||
'faker_locale' => 'id_ID',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -40,6 +40,10 @@ return [
|
||||
'driver' => 'session',
|
||||
'provider' => 'users',
|
||||
],
|
||||
'api' => [
|
||||
'driver' => 'jwt',
|
||||
'provider' => 'users',
|
||||
]
|
||||
],
|
||||
|
||||
/*
|
||||
|
@ -35,13 +35,17 @@ return [
|
||||
'key' => env('PUSHER_APP_KEY'),
|
||||
'secret' => env('PUSHER_APP_SECRET'),
|
||||
'app_id' => env('PUSHER_APP_ID'),
|
||||
// 'options' => [
|
||||
// 'cluster' => env('PUSHER_APP_CLUSTER'),
|
||||
// 'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com',
|
||||
// 'port' => env('PUSHER_PORT', 443),
|
||||
// 'scheme' => env('PUSHER_SCHEME', 'https'),
|
||||
// 'encrypted' => true,
|
||||
// 'useTLS' => env('PUSHER_SCHEME', 'https') === 'https',
|
||||
// ],
|
||||
'options' => [
|
||||
'cluster' => env('PUSHER_APP_CLUSTER'),
|
||||
'host' => env('PUSHER_HOST') ?: 'api-'.env('PUSHER_APP_CLUSTER', 'mt1').'.pusher.com',
|
||||
'port' => env('PUSHER_PORT', 443),
|
||||
'scheme' => env('PUSHER_SCHEME', 'https'),
|
||||
'encrypted' => true,
|
||||
'useTLS' => env('PUSHER_SCHEME', 'https') === 'https',
|
||||
'cluster' => 'ap1',
|
||||
'useTLS' => true,
|
||||
],
|
||||
'client_options' => [
|
||||
// Guzzle client options: https://docs.guzzlephp.org/en/stable/request-options.html
|
||||
|
80
config/flare.php
Normal file
@ -0,0 +1,80 @@
|
||||
<?php
|
||||
|
||||
use Spatie\FlareClient\FlareMiddleware\AddGitInformation;
|
||||
use Spatie\FlareClient\FlareMiddleware\RemoveRequestIp;
|
||||
use Spatie\FlareClient\FlareMiddleware\CensorRequestBodyFields;
|
||||
use Spatie\FlareClient\FlareMiddleware\CensorRequestHeaders;
|
||||
use Spatie\LaravelIgnition\FlareMiddleware\AddDumps;
|
||||
use Spatie\LaravelIgnition\FlareMiddleware\AddEnvironmentInformation;
|
||||
use Spatie\LaravelIgnition\FlareMiddleware\AddExceptionInformation;
|
||||
use Spatie\LaravelIgnition\FlareMiddleware\AddJobs;
|
||||
use Spatie\LaravelIgnition\FlareMiddleware\AddLogs;
|
||||
use Spatie\LaravelIgnition\FlareMiddleware\AddQueries;
|
||||
use Spatie\LaravelIgnition\FlareMiddleware\AddNotifierName;
|
||||
|
||||
return [
|
||||
/*
|
||||
|
|
||||
|--------------------------------------------------------------------------
|
||||
| Flare API key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify Flare's API key below to enable error reporting to the service.
|
||||
|
|
||||
| More info: https://flareapp.io/docs/general/projects
|
||||
|
|
||||
*/
|
||||
|
||||
'key' => env('FLARE_KEY'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Middleware
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| These middleware will modify the contents of the report sent to Flare.
|
||||
|
|
||||
*/
|
||||
|
||||
'flare_middleware' => [
|
||||
RemoveRequestIp::class,
|
||||
AddGitInformation::class,
|
||||
AddNotifierName::class,
|
||||
AddEnvironmentInformation::class,
|
||||
AddExceptionInformation::class,
|
||||
AddDumps::class,
|
||||
AddLogs::class => [
|
||||
'maximum_number_of_collected_logs' => 200,
|
||||
],
|
||||
AddQueries::class => [
|
||||
'maximum_number_of_collected_queries' => 200,
|
||||
'report_query_bindings' => true,
|
||||
],
|
||||
AddJobs::class => [
|
||||
'max_chained_job_reporting_depth' => 5,
|
||||
],
|
||||
CensorRequestBodyFields::class => [
|
||||
'censor_fields' => [
|
||||
'password',
|
||||
'password_confirmation',
|
||||
],
|
||||
],
|
||||
CensorRequestHeaders::class => [
|
||||
'headers' => [
|
||||
'API-KEY',
|
||||
]
|
||||
]
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Reporting log statements
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If this setting is `false` log statements won't be sent as events to Flare,
|
||||
| no matter which error level you specified in the Flare log channel.
|
||||
|
|
||||
*/
|
||||
|
||||
'send_logs_as_events' => true,
|
||||
];
|
279
config/ignition.php
Normal file
@ -0,0 +1,279 @@
|
||||
<?php
|
||||
|
||||
use Spatie\Ignition\Solutions\SolutionProviders\BadMethodCallSolutionProvider;
|
||||
use Spatie\Ignition\Solutions\SolutionProviders\MergeConflictSolutionProvider;
|
||||
use Spatie\Ignition\Solutions\SolutionProviders\UndefinedPropertySolutionProvider;
|
||||
use Spatie\LaravelIgnition\Recorders\DumpRecorder\DumpRecorder;
|
||||
use Spatie\LaravelIgnition\Recorders\JobRecorder\JobRecorder;
|
||||
use Spatie\LaravelIgnition\Recorders\LogRecorder\LogRecorder;
|
||||
use Spatie\LaravelIgnition\Recorders\QueryRecorder\QueryRecorder;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\DefaultDbNameSolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\GenericLaravelExceptionSolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\IncorrectValetDbCredentialsSolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\InvalidRouteActionSolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\MissingAppKeySolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\MissingColumnSolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\MissingImportSolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\MissingLivewireComponentSolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\MissingMixManifestSolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\MissingViteManifestSolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\RunningLaravelDuskInProductionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\TableNotFoundSolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\UndefinedViewVariableSolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\UnknownValidationSolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\ViewNotFoundSolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\OpenAiSolutionProvider;
|
||||
use Spatie\LaravelIgnition\Solutions\SolutionProviders\SailNetworkSolutionProvider;
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Editor
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Choose your preferred editor to use when clicking any edit button.
|
||||
|
|
||||
| Supported: "phpstorm", "vscode", "vscode-insiders", "textmate", "emacs",
|
||||
| "sublime", "atom", "nova", "macvim", "idea", "netbeans",
|
||||
| "xdebug", "phpstorm-remote"
|
||||
|
|
||||
*/
|
||||
|
||||
'editor' => env('IGNITION_EDITOR', 'phpstorm'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Theme
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify which theme Ignition should use.
|
||||
|
|
||||
| Supported: "light", "dark", "auto"
|
||||
|
|
||||
*/
|
||||
|
||||
'theme' => env('IGNITION_THEME', 'auto'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Sharing
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You can share local errors with colleagues or others around the world.
|
||||
| Sharing is completely free and doesn't require an account on Flare.
|
||||
|
|
||||
| If necessary, you can completely disable sharing below.
|
||||
|
|
||||
*/
|
||||
|
||||
'enable_share_button' => env('IGNITION_SHARING_ENABLED', true),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Register Ignition commands
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Ignition comes with an additional make command that lets you create
|
||||
| new solution classes more easily. To keep your default Laravel
|
||||
| installation clean, this command is not registered by default.
|
||||
|
|
||||
| You can enable the command registration below.
|
||||
|
|
||||
*/
|
||||
|
||||
'register_commands' => env('REGISTER_IGNITION_COMMANDS', false),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Solution Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may specify a list of solution providers (as fully qualified class
|
||||
| names) that shouldn't be loaded. Ignition will ignore these classes
|
||||
| and possible solutions provided by them will never be displayed.
|
||||
|
|
||||
*/
|
||||
|
||||
'solution_providers' => [
|
||||
// from spatie/ignition
|
||||
BadMethodCallSolutionProvider::class,
|
||||
MergeConflictSolutionProvider::class,
|
||||
UndefinedPropertySolutionProvider::class,
|
||||
|
||||
// from spatie/laravel-ignition
|
||||
IncorrectValetDbCredentialsSolutionProvider::class,
|
||||
MissingAppKeySolutionProvider::class,
|
||||
DefaultDbNameSolutionProvider::class,
|
||||
TableNotFoundSolutionProvider::class,
|
||||
MissingImportSolutionProvider::class,
|
||||
InvalidRouteActionSolutionProvider::class,
|
||||
ViewNotFoundSolutionProvider::class,
|
||||
RunningLaravelDuskInProductionProvider::class,
|
||||
MissingColumnSolutionProvider::class,
|
||||
UnknownValidationSolutionProvider::class,
|
||||
MissingMixManifestSolutionProvider::class,
|
||||
MissingViteManifestSolutionProvider::class,
|
||||
MissingLivewireComponentSolutionProvider::class,
|
||||
UndefinedViewVariableSolutionProvider::class,
|
||||
GenericLaravelExceptionSolutionProvider::class,
|
||||
OpenAiSolutionProvider::class,
|
||||
SailNetworkSolutionProvider::class,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Ignored Solution Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| You may specify a list of solution providers (as fully qualified class
|
||||
| names) that shouldn't be loaded. Ignition will ignore these classes
|
||||
| and possible solutions provided by them will never be displayed.
|
||||
|
|
||||
*/
|
||||
|
||||
'ignored_solution_providers' => [
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Runnable Solutions
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Some solutions that Ignition displays are runnable and can perform
|
||||
| various tasks. By default, runnable solutions are only enabled when your
|
||||
| app has debug mode enabled and the environment is `local` or
|
||||
| `development`.
|
||||
|
|
||||
| Using the `IGNITION_ENABLE_RUNNABLE_SOLUTIONS` environment variable, you
|
||||
| can override this behaviour and enable or disable runnable solutions
|
||||
| regardless of the application's environment.
|
||||
|
|
||||
| Default: env('IGNITION_ENABLE_RUNNABLE_SOLUTIONS')
|
||||
|
|
||||
*/
|
||||
|
||||
'enable_runnable_solutions' => env('IGNITION_ENABLE_RUNNABLE_SOLUTIONS'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Remote Path Mapping
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| If you are using a remote dev server, like Laravel Homestead, Docker, or
|
||||
| even a remote VPS, it will be necessary to specify your path mapping.
|
||||
|
|
||||
| Leaving one, or both of these, empty or null will not trigger the remote
|
||||
| URL changes and Ignition will treat your editor links as local files.
|
||||
|
|
||||
| "remote_sites_path" is an absolute base path for your sites or projects
|
||||
| in Homestead, Vagrant, Docker, or another remote development server.
|
||||
|
|
||||
| Example value: "/home/vagrant/Code"
|
||||
|
|
||||
| "local_sites_path" is an absolute base path for your sites or projects
|
||||
| on your local computer where your IDE or code editor is running on.
|
||||
|
|
||||
| Example values: "/Users/<name>/Code", "C:\Users\<name>\Documents\Code"
|
||||
|
|
||||
*/
|
||||
|
||||
'remote_sites_path' => env('IGNITION_REMOTE_SITES_PATH', base_path()),
|
||||
'local_sites_path' => env('IGNITION_LOCAL_SITES_PATH', ''),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Housekeeping Endpoint Prefix
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Ignition registers a couple of routes when it is enabled. Below you may
|
||||
| specify a route prefix that will be used to host all internal links.
|
||||
|
|
||||
*/
|
||||
|
||||
'housekeeping_endpoint_prefix' => '_ignition',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Settings File
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Ignition allows you to save your settings to a specific global file.
|
||||
|
|
||||
| If no path is specified, a file with settings will be saved to the user's
|
||||
| home directory. The directory depends on the OS and its settings but it's
|
||||
| typically `~/.ignition.json`. In this case, the settings will be applied
|
||||
| to all of your projects where Ignition is used and the path is not
|
||||
| specified.
|
||||
|
|
||||
| However, if you want to store your settings on a project basis, or you
|
||||
| want to keep them in another directory, you can specify a path where
|
||||
| the settings file will be saved. The path should be an existing directory
|
||||
| with correct write access.
|
||||
| For example, create a new `ignition` folder in the storage directory and
|
||||
| use `storage_path('ignition')` as the `settings_file_path`.
|
||||
|
|
||||
| Default value: '' (empty string)
|
||||
*/
|
||||
|
||||
'settings_file_path' => '',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Recorders
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Ignition registers a couple of recorders when it is enabled. Below you may
|
||||
| specify a recorders will be used to record specific events.
|
||||
|
|
||||
*/
|
||||
|
||||
'recorders' => [
|
||||
DumpRecorder::class,
|
||||
JobRecorder::class,
|
||||
LogRecorder::class,
|
||||
QueryRecorder::class,
|
||||
],
|
||||
|
||||
/*
|
||||
* When a key is set, we'll send your exceptions to Open AI to generate a solution
|
||||
*/
|
||||
'open_ai_key' => env('IGNITION_OPEN_AI_KEY'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Include arguments
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Ignition show you stack traces of exceptions with the arguments that were
|
||||
| passed to each method. This feature can be disabled here.
|
||||
|
|
||||
*/
|
||||
|
||||
'with_stack_frame_arguments' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Argument reducers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Ignition show you stack traces of exceptions with the arguments that were
|
||||
| passed to each method. To make these variables more readable, you can
|
||||
| specify a list of classes here which summarize the variables.
|
||||
|
|
||||
*/
|
||||
'argument_reducers' => [
|
||||
\Spatie\Backtrace\Arguments\Reducers\BaseTypeArgumentReducer::class,
|
||||
\Spatie\Backtrace\Arguments\Reducers\ArrayArgumentReducer::class,
|
||||
\Spatie\Backtrace\Arguments\Reducers\StdClassArgumentReducer::class,
|
||||
\Spatie\Backtrace\Arguments\Reducers\EnumArgumentReducer::class,
|
||||
\Spatie\Backtrace\Arguments\Reducers\ClosureArgumentReducer::class,
|
||||
\Spatie\Backtrace\Arguments\Reducers\DateTimeArgumentReducer::class,
|
||||
\Spatie\Backtrace\Arguments\Reducers\DateTimeZoneArgumentReducer::class,
|
||||
\Spatie\Backtrace\Arguments\Reducers\SymphonyRequestArgumentReducer::class,
|
||||
\Spatie\LaravelIgnition\ArgumentReducers\ModelArgumentReducer::class,
|
||||
\Spatie\LaravelIgnition\ArgumentReducers\CollectionArgumentReducer::class,
|
||||
\Spatie\Backtrace\Arguments\Reducers\StringableArgumentReducer::class,
|
||||
],
|
||||
];
|
20
config/image.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Image Driver
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Intervention Image supports "GD Library" and "Imagick" to process images
|
||||
| internally. You may choose one of them according to your PHP
|
||||
| configuration. By default PHP's "GD Library" implementation is used.
|
||||
|
|
||||
| Supported: "gd", "imagick"
|
||||
|
|
||||
*/
|
||||
|
||||
'driver' => 'gd'
|
||||
|
||||
];
|
301
config/jwt.php
Normal file
@ -0,0 +1,301 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of jwt-auth.
|
||||
*
|
||||
* (c) Sean Tymon <tymon148@gmail.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JWT Authentication Secret
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Don't forget to set this in your .env file, as it will be used to sign
|
||||
| your tokens. A helper command is provided for this:
|
||||
| `php artisan jwt:secret`
|
||||
|
|
||||
| Note: This will be used for Symmetric algorithms only (HMAC),
|
||||
| since RSA and ECDSA use a private/public key combo (See below).
|
||||
|
|
||||
*/
|
||||
|
||||
'secret' => env('JWT_SECRET'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JWT Authentication Keys
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The algorithm you are using, will determine whether your tokens are
|
||||
| signed with a random string (defined in `JWT_SECRET`) or using the
|
||||
| following public & private keys.
|
||||
|
|
||||
| Symmetric Algorithms:
|
||||
| HS256, HS384 & HS512 will use `JWT_SECRET`.
|
||||
|
|
||||
| Asymmetric Algorithms:
|
||||
| RS256, RS384 & RS512 / ES256, ES384 & ES512 will use the keys below.
|
||||
|
|
||||
*/
|
||||
|
||||
'keys' => [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Public Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| A path or resource to your public key.
|
||||
|
|
||||
| E.g. 'file://path/to/public/key'
|
||||
|
|
||||
*/
|
||||
|
||||
'public' => env('JWT_PUBLIC_KEY'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Private Key
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| A path or resource to your private key.
|
||||
|
|
||||
| E.g. 'file://path/to/private/key'
|
||||
|
|
||||
*/
|
||||
|
||||
'private' => env('JWT_PRIVATE_KEY'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Passphrase
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The passphrase for your private key. Can be null if none set.
|
||||
|
|
||||
*/
|
||||
|
||||
'passphrase' => env('JWT_PASSPHRASE'),
|
||||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JWT time to live
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the length of time (in minutes) that the token will be valid for.
|
||||
| Defaults to 1 hour.
|
||||
|
|
||||
| You can also set this to null, to yield a never expiring token.
|
||||
| Some people may want this behaviour for e.g. a mobile app.
|
||||
| This is not particularly recommended, so make sure you have appropriate
|
||||
| systems in place to revoke the token if necessary.
|
||||
| Notice: If you set this to null you should remove 'exp' element from 'required_claims' list.
|
||||
|
|
||||
*/
|
||||
|
||||
'ttl' => env('JWT_TTL', 60),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Refresh time to live
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the length of time (in minutes) that the token can be refreshed
|
||||
| within. I.E. The user can refresh their token within a 2 week window of
|
||||
| the original token being created until they must re-authenticate.
|
||||
| Defaults to 2 weeks.
|
||||
|
|
||||
| You can also set this to null, to yield an infinite refresh time.
|
||||
| Some may want this instead of never expiring tokens for e.g. a mobile app.
|
||||
| This is not particularly recommended, so make sure you have appropriate
|
||||
| systems in place to revoke the token if necessary.
|
||||
|
|
||||
*/
|
||||
|
||||
'refresh_ttl' => env('JWT_REFRESH_TTL', 20160),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JWT hashing algorithm
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the hashing algorithm that will be used to sign the token.
|
||||
|
|
||||
*/
|
||||
|
||||
'algo' => env('JWT_ALGO', Tymon\JWTAuth\Providers\JWT\Provider::ALGO_HS256),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Required Claims
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the required claims that must exist in any token.
|
||||
| A TokenInvalidException will be thrown if any of these claims are not
|
||||
| present in the payload.
|
||||
|
|
||||
*/
|
||||
|
||||
'required_claims' => [
|
||||
'iss',
|
||||
'iat',
|
||||
'exp',
|
||||
'nbf',
|
||||
'sub',
|
||||
'jti',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Persistent Claims
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the claim keys to be persisted when refreshing a token.
|
||||
| `sub` and `iat` will automatically be persisted, in
|
||||
| addition to the these claims.
|
||||
|
|
||||
| Note: If a claim does not exist then it will be ignored.
|
||||
|
|
||||
*/
|
||||
|
||||
'persistent_claims' => [
|
||||
// 'foo',
|
||||
// 'bar',
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Lock Subject
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This will determine whether a `prv` claim is automatically added to
|
||||
| the token. The purpose of this is to ensure that if you have multiple
|
||||
| authentication models e.g. `App\User` & `App\OtherPerson`, then we
|
||||
| should prevent one authentication request from impersonating another,
|
||||
| if 2 tokens happen to have the same id across the 2 different models.
|
||||
|
|
||||
| Under specific circumstances, you may want to disable this behaviour
|
||||
| e.g. if you only have one authentication model, then you would save
|
||||
| a little on token size.
|
||||
|
|
||||
*/
|
||||
|
||||
'lock_subject' => true,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Leeway
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This property gives the jwt timestamp claims some "leeway".
|
||||
| Meaning that if you have any unavoidable slight clock skew on
|
||||
| any of your servers then this will afford you some level of cushioning.
|
||||
|
|
||||
| This applies to the claims `iat`, `nbf` and `exp`.
|
||||
|
|
||||
| Specify in seconds - only if you know you need it.
|
||||
|
|
||||
*/
|
||||
|
||||
'leeway' => env('JWT_LEEWAY', 0),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Blacklist Enabled
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| In order to invalidate tokens, you must have the blacklist enabled.
|
||||
| If you do not want or need this functionality, then set this to false.
|
||||
|
|
||||
*/
|
||||
|
||||
'blacklist_enabled' => env('JWT_BLACKLIST_ENABLED', true),
|
||||
|
||||
/*
|
||||
| -------------------------------------------------------------------------
|
||||
| Blacklist Grace Period
|
||||
| -------------------------------------------------------------------------
|
||||
|
|
||||
| When multiple concurrent requests are made with the same JWT,
|
||||
| it is possible that some of them fail, due to token regeneration
|
||||
| on every request.
|
||||
|
|
||||
| Set grace period in seconds to prevent parallel request failure.
|
||||
|
|
||||
*/
|
||||
|
||||
'blacklist_grace_period' => env('JWT_BLACKLIST_GRACE_PERIOD', 0),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Cookies encryption
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| By default Laravel encrypt cookies for security reason.
|
||||
| If you decide to not decrypt cookies, you will have to configure Laravel
|
||||
| to not encrypt your cookie token by adding its name into the $except
|
||||
| array available in the middleware "EncryptCookies" provided by Laravel.
|
||||
| see https://laravel.com/docs/master/responses#cookies-and-encryption
|
||||
| for details.
|
||||
|
|
||||
| Set it to true if you want to decrypt cookies.
|
||||
|
|
||||
*/
|
||||
|
||||
'decrypt_cookies' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Providers
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the various providers used throughout the package.
|
||||
|
|
||||
*/
|
||||
|
||||
'providers' => [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| JWT Provider
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the provider that is used to create and decode the tokens.
|
||||
|
|
||||
*/
|
||||
|
||||
'jwt' => Tymon\JWTAuth\Providers\JWT\Lcobucci::class,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Provider
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the provider that is used to authenticate users.
|
||||
|
|
||||
*/
|
||||
|
||||
'auth' => Tymon\JWTAuth\Providers\Auth\Illuminate::class,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Storage Provider
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Specify the provider that is used to store tokens in the blacklist.
|
||||
|
|
||||
*/
|
||||
|
||||
'storage' => Tymon\JWTAuth\Providers\Storage\Illuminate::class,
|
||||
|
||||
],
|
||||
|
||||
];
|
16
config/laravolt/indonesia.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'table_prefix' => 'indonesia_',
|
||||
'route' => [
|
||||
'enabled' => false,
|
||||
'middleware' => ['web', 'auth'],
|
||||
'prefix' => 'indonesia',
|
||||
],
|
||||
'view' => [
|
||||
'layout' => 'ui::layouts.app',
|
||||
],
|
||||
'menu' => [
|
||||
'enabled' => false,
|
||||
],
|
||||
];
|
50
config/tinker.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Console Commands
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option allows you to add additional Artisan commands that should
|
||||
| be available within the Tinker environment. Once the command is in
|
||||
| this array you may execute the command in Tinker using its name.
|
||||
|
|
||||
*/
|
||||
|
||||
'commands' => [
|
||||
// App\Console\Commands\ExampleCommand::class,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Auto Aliased Classes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Tinker will not automatically alias classes in your vendor namespaces
|
||||
| but you may explicitly allow a subset of classes to get aliased by
|
||||
| adding the names of each of those classes to the following list.
|
||||
|
|
||||
*/
|
||||
|
||||
'alias' => [
|
||||
//
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Classes That Should Not Be Aliased
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Typically, Tinker automatically aliases classes as you require them in
|
||||
| Tinker. However, you may wish to never alias certain classes, which
|
||||
| you may accomplish by listing the classes in the following array.
|
||||
|
|
||||
*/
|
||||
|
||||
'dont_alias' => [
|
||||
'App\Nova',
|
||||
],
|
||||
|
||||
];
|
@ -1,23 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Refund>
|
||||
*/
|
||||
class RefundFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Setting>
|
||||
*/
|
||||
class SettingFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\transaction>
|
||||
*/
|
||||
class TransactionFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
@ -18,11 +18,22 @@ class UserFactory extends Factory
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => fake()->name(),
|
||||
'id' => Str::uuid(),
|
||||
'nama_depan' => $this->faker->firstName,
|
||||
'nama_belakang' => $this->faker->lastName,
|
||||
'tanggal_lahir' => $this->faker->date($format = 'Y-m-d', $max = 'now'),
|
||||
'email' => fake()->unique()->safeEmail(),
|
||||
'email_verified_at' => now(),
|
||||
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
|
||||
'remember_token' => Str::random(10),
|
||||
'role' => 'User',
|
||||
'nik' => $this->faker->nik($this->faker->randomElement(['male', 'female']),$this->faker->dateTimeBetween('-65 years', '-18 years')),
|
||||
'alamat'=> $this->faker->address,
|
||||
'nohp'=> $this->faker->phoneNumber(),
|
||||
'persentase_kemiripan' => random_int(0, 100),
|
||||
'status'=> $this->faker->randomElement(['Progress', 'Finished', 'Rejected']),
|
||||
'gender' => $this->faker->randomElement(['Laki-laki', 'Perempuan']),
|
||||
'kode_kelurahan' => '1101012002',
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -1,23 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Users>
|
||||
*/
|
||||
class UsersFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
@ -3,6 +3,7 @@
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
@ -12,13 +13,31 @@ return new class extends Migration
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->uuid('id')->default(DB::raw('uuid_generate_v4()'))->primary();
|
||||
$table->string('nama_depan',255);
|
||||
$table->string('nama_belakang',255);
|
||||
$table->date('tanggal_lahir');
|
||||
$table->string('email',50)->unique();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->enum('role',['Admin','User'])->default('User');
|
||||
$table->string('nohp',20);
|
||||
$table->string('nik',20)->unique();
|
||||
$table->string('alamat',255);
|
||||
$table->string('foto_ktp')->nullable();
|
||||
$table->string('foto_wajah')->nullable();
|
||||
$table->string('foto_profile')->nullable();
|
||||
$table->integer('persentase_kemiripan')->nullable();
|
||||
$table->enum('status',['Finished','Progress','Rejected'])->default('Progress');
|
||||
$table->string('gender',15);
|
||||
$table->char('kode_kelurahan',10);
|
||||
$table->string('no_rek')->nullable();
|
||||
$table->string('nama_bank')->nullable();
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
|
||||
$table->index('status');
|
||||
$table->index('kode_kelurahan');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateProvincesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create(config('laravolt.indonesia.table_prefix').'provinces', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->char('code', 2)->unique();
|
||||
$table->string('name', 255);
|
||||
$table->text('meta')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->index('code');
|
||||
$table->index('id');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop(config('laravolt.indonesia.table_prefix').'provinces');
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateCitiesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create(config('laravolt.indonesia.table_prefix').'cities', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->char('code', 4)->unique();
|
||||
$table->char('province_code', 2);
|
||||
$table->string('name', 255);
|
||||
$table->text('meta')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('province_code')
|
||||
->references('code')
|
||||
->on(config('laravolt.indonesia.table_prefix').'provinces')
|
||||
->onUpdate('cascade')->onDelete('restrict');
|
||||
$table->index('id');
|
||||
$table->index('code');
|
||||
$table->index('province_code');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop(config('laravolt.indonesia.table_prefix').'cities');
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateDistrictsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create(config('laravolt.indonesia.table_prefix') . 'districts', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->char('code', 7)->unique();
|
||||
$table->char('city_code', 4);
|
||||
$table->string('name', 255);
|
||||
$table->text('meta')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table
|
||||
->foreign('city_code')
|
||||
->references('code')
|
||||
->on(config('laravolt.indonesia.table_prefix') . 'cities')
|
||||
->onUpdate('cascade')
|
||||
->onDelete('restrict');
|
||||
$table->index('id');
|
||||
$table->index('code');
|
||||
$table->index('city_code');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop(config('laravolt.indonesia.table_prefix') . 'districts');
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
class CreateVillagesTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create(config('laravolt.indonesia.table_prefix') . 'villages', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->char('code', 10)->unique();
|
||||
$table->char('district_code', 7);
|
||||
$table->string('name', 255);
|
||||
$table->text('meta')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table
|
||||
->foreign('district_code')
|
||||
->references('code')
|
||||
->on(config('laravolt.indonesia.table_prefix') . 'districts')
|
||||
->onUpdate('cascade')
|
||||
->onDelete('restrict');
|
||||
$table->index('id');
|
||||
$table->index('code');
|
||||
$table->index('district_code');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop(config('laravolt.indonesia.table_prefix') . 'villages');
|
||||
}
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('transactions', function (Blueprint $table) {
|
||||
$table->uuid('id')->default(DB::raw('uuid_generate_v4()'))->primary(); //order_id
|
||||
$table->string('pembeli'); // untuk customer_details
|
||||
$table->string('penjual'); //merchant_name
|
||||
$table->string('nama_barang'); // item_details -> item_name
|
||||
$table->string('deskripsi_transaksi')->nullable();
|
||||
$table->string('satuan_barang');
|
||||
$table->double('harga_barang'); // harga sebelum penambahan
|
||||
$table->double('jumlah_barang');
|
||||
$table->double('persentase_keuntungan'); // persentase keuntungan
|
||||
$table->double('total_keuntungan'); // perolehan keuntungan
|
||||
$table->double('total_harga'); // gross amount
|
||||
$table->double('total_bayar');
|
||||
$table->string('signature_key')->nullable();
|
||||
$table->string('token');
|
||||
$table->string('metode_pembayaran')->nullable();
|
||||
$table->char('currency',3)->nullable();
|
||||
$table->string('fraud_status')->nullable();
|
||||
$table->string('merchant_id')->nullable();
|
||||
$table->enum('status',['settlement','capture','pending','cancel','refund', 'expire','failure','process','sending','sended','finished','created'])->default('created'); // transaction_status
|
||||
$table->timestamp('batas_pembayaran');
|
||||
$table->timestamp('batas_pengiriman_barang_awal');
|
||||
$table->timestamp('batas_pengiriman_barang_akhir');
|
||||
$table->timestamp('tanggal_transaksi')->nullable();
|
||||
$table->string('nama_bank_penjual');
|
||||
$table->string('no_rek_penjual');
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('pembeli')->on('users')->references('email');
|
||||
$table->foreign('penjual')->on('users')->references('email');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('transactions');
|
||||
}
|
||||
};
|
@ -2,6 +2,7 @@
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
@ -12,13 +13,14 @@ return new class extends Migration
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('refunds', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('orderId');
|
||||
$table->string('customerName');
|
||||
$table->string('sellerName');
|
||||
$table->string('total');
|
||||
$table->timestamp('dueDate');
|
||||
$table->string('status');
|
||||
$table->uuid('id')->default(DB::raw('uuid_generate_v4()'))->primary();
|
||||
$table->foreignUuid('transaction_id');
|
||||
$table->double('total',10);
|
||||
$table->timestamp('due_date');
|
||||
$table->enum('status',['partial refund','deny','pending'])->default('pending');
|
||||
$table->text('complaint');
|
||||
$table->timestamps();
|
||||
$table->foreign('transaction_id')->on('transactions')->references('id');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -1,27 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('users', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('users');
|
||||
}
|
||||
};
|
@ -2,6 +2,7 @@
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
@ -12,7 +13,12 @@ return new class extends Migration
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('settings', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->uuid('id')->default(DB::raw('uuid_generate_v4()'))->primary();
|
||||
$table->string('bulan',5);
|
||||
$table->string('tahun',5);
|
||||
$table->float('persentase');
|
||||
$table->enum('status',['Active', 'Nonactive'])->default('Active');
|
||||
$table->unique(['bulan','tahun']);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('contacts', function (Blueprint $table) {
|
||||
$table->uuid('id')->default(DB::raw('uuid_generate_v4()'))->primary();
|
||||
$table->string('pemilik_kontak');
|
||||
$table->string('relasi_kontak');
|
||||
$table->foreign('pemilik_kontak')->on('users')->references('email');
|
||||
$table->foreign('relasi_kontak')->on('users')->references('email');
|
||||
$table->unique(['pemilik_kontak','relasi_kontak']);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('contacts');
|
||||
}
|
||||
};
|
@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('transaction_descriptions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignUuid('transaction_id');
|
||||
$table->string('status',15);
|
||||
$table->string('user');
|
||||
$table->string('background');
|
||||
$table->string('judul');
|
||||
$table->string('deskripsi');
|
||||
$table->string('status_code')->nullable();
|
||||
$table->string('bukti_foto')->nullable();
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('transaction_id')->on('transactions')->references('id');
|
||||
$table->foreign('user')->on('users')->references('email');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('transaction_descriptions');
|
||||
}
|
||||
};
|
@ -11,9 +11,14 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('transactions', function (Blueprint $table) {
|
||||
Schema::create('refund_descriptions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignUuid('refund_id');
|
||||
$table->string('filename');
|
||||
$table->string('type');
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('refund_id')->on('refunds')->references('id');
|
||||
});
|
||||
}
|
||||
|
||||
@ -22,6 +27,6 @@ return new class extends Migration
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('transactions');
|
||||
Schema::dropIfExists('refund_descriptions');
|
||||
}
|
||||
};
|
@ -3,7 +3,22 @@
|
||||
namespace Database\Seeders;
|
||||
|
||||
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
|
||||
use App\Models\Refund;
|
||||
use App\Models\RefundDescription;
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\User;
|
||||
use Carbon\Carbon;
|
||||
use App\Models\Setting;
|
||||
use App\Models\Transaction;
|
||||
use App\Models\TransactionDescription;
|
||||
use Illuminate\Support\Str;
|
||||
use Faker\Factory as FakerFactory;
|
||||
use Faker\Provider\id_ID\Person as Person;
|
||||
use Laravolt\Indonesia\Seeds\CitiesSeeder;
|
||||
use Laravolt\Indonesia\Seeds\VillagesSeeder;
|
||||
use Laravolt\Indonesia\Seeds\DistrictsSeeder;
|
||||
use Laravolt\Indonesia\Seeds\ProvincesSeeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
@ -12,11 +27,150 @@ class DatabaseSeeder extends Seeder
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
// \App\Models\User::factory(10)->create();
|
||||
$faker = FakerFactory::create();
|
||||
$faker->addProvider(new Person($faker));
|
||||
|
||||
// \App\Models\User::factory()->create([
|
||||
// 'name' => 'Test User',
|
||||
// 'email' => 'test@example.com',
|
||||
// ]);
|
||||
User::factory()->create([
|
||||
'id' => Str::uuid(),
|
||||
'nama_depan' => $faker->firstName,
|
||||
'nama_belakang' => $faker->lastName,
|
||||
'tanggal_lahir' => $faker->date('Y-m-d', 'now'),
|
||||
'email' => 'admin@example.net',
|
||||
'email_verified_at' => now(),
|
||||
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
|
||||
'remember_token' => Str::random(10),
|
||||
'role' => 'Admin',
|
||||
'nik' => $faker->nik($faker->randomElement(['male', 'female']), $faker->dateTimeBetween('-65 years', '-18 years')),
|
||||
'alamat' => $faker->address,
|
||||
'nohp' => $faker->phoneNumber(),
|
||||
'status' => 'Finished',
|
||||
'persentase_kemiripan' => 100,
|
||||
'gender' => $faker->randomElement(['Laki-laki', 'Perempuan']),
|
||||
'kode_kelurahan' => '1101012002',
|
||||
]);
|
||||
|
||||
$user1 = User::factory()->create([
|
||||
'id' => Str::uuid(),
|
||||
'nama_depan' => $faker->firstName,
|
||||
'nama_belakang' => $faker->lastName,
|
||||
'tanggal_lahir' => $faker->date('Y-m-d', 'now'),
|
||||
'email' => $faker->email,
|
||||
'email_verified_at' => now(),
|
||||
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
|
||||
'remember_token' => Str::random(10),
|
||||
'role' => 'User',
|
||||
'nik' => $faker->nik($faker->randomElement(['male', 'female']), $faker->dateTimeBetween('-65 years', '-18 years')),
|
||||
'alamat' => $faker->address,
|
||||
'nohp' => $faker->phoneNumber(),
|
||||
'status' => 'Finished',
|
||||
'persentase_kemiripan' => 100,
|
||||
'gender' => $faker->randomElement(['Laki-laki', 'Perempuan']),
|
||||
'kode_kelurahan' => '1101012002',
|
||||
]);
|
||||
|
||||
$user2 = User::factory()->create([
|
||||
'id' => Str::uuid(),
|
||||
'nama_depan' => $faker->firstName,
|
||||
'nama_belakang' => $faker->lastName,
|
||||
'tanggal_lahir' => $faker->date('Y-m-d', 'now'),
|
||||
'email' => $faker->email(),
|
||||
'email_verified_at' => now(),
|
||||
'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
|
||||
'remember_token' => Str::random(10),
|
||||
'role' => 'User',
|
||||
'nik' => $faker->nik($faker->randomElement(['male', 'female']), $faker->dateTimeBetween('-65 years', '-18 years')),
|
||||
'alamat' => $faker->address,
|
||||
'nohp' => $faker->phoneNumber(),
|
||||
'status' => 'Finished',
|
||||
'persentase_kemiripan' => 100,
|
||||
'gender' => $faker->randomElement(['Laki-laki', 'Perempuan']),
|
||||
'kode_kelurahan' => '1101012002',
|
||||
]);
|
||||
// User::factory(20)->create();
|
||||
|
||||
$now = Carbon::now()->tz('Asia/Jakarta');
|
||||
$bulan = $now->format('n');
|
||||
$tahun = $now->year;
|
||||
Setting::create([
|
||||
'id' => Str::uuid(),
|
||||
'bulan' => $bulan,
|
||||
'tahun' => $tahun,
|
||||
'persentase' => 5,
|
||||
'status' => 'Active',
|
||||
]);
|
||||
|
||||
$transaction = Transaction::create([
|
||||
'id' => Str::uuid(),
|
||||
'pembeli' => $user1->email,
|
||||
'penjual' => $user2->email,
|
||||
'nama_barang' => 'hah',
|
||||
'deskripsi_transaksi' => null,
|
||||
'satuan_barang' => 'barang',
|
||||
'harga_barang' => 2000,
|
||||
'jumlah_barang' => 2,
|
||||
'persentase_keuntungan' => 2,
|
||||
'total_keuntungan' => 2,
|
||||
'total_harga' => 2,
|
||||
'total_bayar' => 2,
|
||||
'token' => 'asda',
|
||||
'status' => 'pending',
|
||||
'batas_pembayaran' => now(),
|
||||
'batas_pengiriman_barang_awal' => now(),
|
||||
'batas_pengiriman_barang_akhir' => now(),
|
||||
'nama_bank_penjual' => 'asd',
|
||||
'no_rek_penjual' => '21-',
|
||||
]);
|
||||
|
||||
TransactionDescription::create([
|
||||
'transaction_id' => $transaction->id,
|
||||
'status' => 'pending',
|
||||
'user' => $user1->email,
|
||||
'judul' => 'fa fa-plus',
|
||||
'background' => 'bg-buyer',
|
||||
'deskripsi' => $user1->nama_depan . ' telah membuat transaksi baru dengan ' . $user2->nama_depan,
|
||||
]);
|
||||
|
||||
$transactionRefund = Transaction::create([
|
||||
'id' => Str::uuid(),
|
||||
'pembeli' => $user1->email,
|
||||
'penjual' => $user2->email,
|
||||
'nama_barang' => 'hah',
|
||||
'deskripsi_transaksi' => null,
|
||||
'satuan_barang' => 'barang',
|
||||
'harga_barang' => 2000,
|
||||
'jumlah_barang' => 2,
|
||||
'persentase_keuntungan' => 2,
|
||||
'total_keuntungan' => 2,
|
||||
'total_harga' => 2,
|
||||
'total_bayar' => 2,
|
||||
'token' => 'asda',
|
||||
'status' => 'refund',
|
||||
'batas_pembayaran' => now(),
|
||||
'batas_pengiriman_barang_awal' => now(),
|
||||
'batas_pengiriman_barang_akhir' => now(),
|
||||
'nama_bank_penjual' => 'asd',
|
||||
'no_rek_penjual' => '21-',
|
||||
]);
|
||||
|
||||
$refund = Refund::create([
|
||||
'transaction_id' => $transactionRefund->id,
|
||||
'total' => $transactionRefund->total_harga,
|
||||
'due_date' => now(),
|
||||
'complaint' => 'ha',
|
||||
]);
|
||||
|
||||
RefundDescription::create([
|
||||
'refund_id' => $refund->id,
|
||||
'filename' => 'img_1.jpg',
|
||||
'type' => 'image'
|
||||
]);
|
||||
|
||||
RefundDescription::create([
|
||||
'refund_id' => $refund->id,
|
||||
'filename' => 'img_2.jpg',
|
||||
'type' => 'image'
|
||||
]);
|
||||
|
||||
$this->call([ProvincesSeeder::class, CitiesSeeder::class, DistrictsSeeder::class, VillagesSeeder::class]);
|
||||
}
|
||||
}
|
||||
|
@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class RefundSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class SettingSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class TransactionSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class UsersSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
59
docker/8.0/Dockerfile
Normal file
@ -0,0 +1,59 @@
|
||||
FROM ubuntu:20.04
|
||||
|
||||
LABEL maintainer="Taylor Otwell"
|
||||
|
||||
ARG WWWGROUP
|
||||
ARG NODE_VERSION=16
|
||||
ARG POSTGRES_VERSION=13
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
ENV TZ=UTC
|
||||
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 dnsutils librsvg2-bin fswatch \
|
||||
&& curl -sS 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c' | gpg --dearmor | tee /usr/share/keyrings/ppa_ondrej_php.gpg > /dev/null \
|
||||
&& echo "deb [signed-by=/usr/share/keyrings/ppa_ondrej_php.gpg] https://ppa.launchpadcontent.net/ondrej/php/ubuntu focal main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y php8.0-cli php8.0-dev \
|
||||
php8.0-pgsql php8.0-sqlite3 php8.0-gd php8.0-imagick \
|
||||
php8.0-curl php8.0-memcached \
|
||||
php8.0-imap php8.0-mysql php8.0-mbstring \
|
||||
php8.0-xml php8.0-zip php8.0-bcmath php8.0-soap \
|
||||
php8.0-intl php8.0-readline php8.0-pcov \
|
||||
php8.0-msgpack php8.0-igbinary php8.0-ldap \
|
||||
php8.0-redis php8.0-swoole php8.0-xdebug \
|
||||
&& curl -sLS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer \
|
||||
&& curl -sLS https://deb.nodesource.com/setup_$NODE_VERSION.x | bash - \
|
||||
&& apt-get install -y nodejs \
|
||||
&& npm install -g npm \
|
||||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /usr/share/keyrings/yarnkey.gpg >/dev/null \
|
||||
&& echo "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
|
||||
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /usr/share/keyrings/pgdg.gpg >/dev/null \
|
||||
&& echo "deb [signed-by=/usr/share/keyrings/pgdg.gpg] http://apt.postgresql.org/pub/repos/apt focal-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y yarn \
|
||||
&& apt-get install -y mysql-client \
|
||||
&& apt-get install -y postgresql-client-$POSTGRES_VERSION \
|
||||
&& apt-get -y autoremove \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
RUN update-alternatives --set php /usr/bin/php8.0
|
||||
|
||||
RUN setcap "cap_net_bind_service=+ep" /usr/bin/php8.0
|
||||
|
||||
RUN groupadd --force -g $WWWGROUP sail
|
||||
RUN useradd -ms /bin/bash --no-user-group -g $WWWGROUP -u 1337 sail
|
||||
|
||||
COPY start-container /usr/local/bin/start-container
|
||||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
COPY php.ini /etc/php/8.0/cli/conf.d/99-sail.ini
|
||||
RUN chmod +x /usr/local/bin/start-container
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
ENTRYPOINT ["start-container"]
|
7
docker/8.0/php.ini
Normal file
@ -0,0 +1,7 @@
|
||||
[PHP]
|
||||
post_max_size = 100M
|
||||
upload_max_filesize = 100M
|
||||
variables_order = EGPCS
|
||||
|
||||
[opcache]
|
||||
opcache.enable_cli=1
|
17
docker/8.0/start-container
Normal file
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ ! -z "$WWWUSER" ]; then
|
||||
usermod -u $WWWUSER sail
|
||||
fi
|
||||
|
||||
if [ ! -d /.composer ]; then
|
||||
mkdir /.composer
|
||||
fi
|
||||
|
||||
chmod -R ugo+rw /.composer
|
||||
|
||||
if [ $# -gt 0 ]; then
|
||||
exec gosu $WWWUSER "$@"
|
||||
else
|
||||
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
|
||||
fi
|
14
docker/8.0/supervisord.conf
Normal file
@ -0,0 +1,14 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
user=root
|
||||
logfile=/var/log/supervisor/supervisord.log
|
||||
pidfile=/var/run/supervisord.pid
|
||||
|
||||
[program:php]
|
||||
command=/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80
|
||||
user=sail
|
||||
environment=LARAVEL_SAIL="1"
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
58
docker/8.1/Dockerfile
Normal file
@ -0,0 +1,58 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
LABEL maintainer="Taylor Otwell"
|
||||
|
||||
ARG WWWGROUP
|
||||
ARG NODE_VERSION=18
|
||||
ARG POSTGRES_VERSION=15
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
ENV TZ=UTC
|
||||
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 dnsutils librsvg2-bin fswatch \
|
||||
&& curl -sS 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c' | gpg --dearmor | tee /usr/share/keyrings/ppa_ondrej_php.gpg > /dev/null \
|
||||
&& echo "deb [signed-by=/usr/share/keyrings/ppa_ondrej_php.gpg] https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y php8.1-cli php8.1-dev \
|
||||
php8.1-pgsql php8.1-sqlite3 php8.1-gd php8.1-imagick \
|
||||
php8.1-curl \
|
||||
php8.1-imap php8.1-mysql php8.1-mbstring \
|
||||
php8.1-xml php8.1-zip php8.1-bcmath php8.1-soap \
|
||||
php8.1-intl php8.1-readline \
|
||||
php8.1-ldap \
|
||||
php8.1-msgpack php8.1-igbinary php8.1-redis php8.1-swoole \
|
||||
php8.1-memcached php8.1-pcov php8.1-xdebug \
|
||||
&& curl -sLS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer \
|
||||
&& curl -sLS https://deb.nodesource.com/setup_$NODE_VERSION.x | bash - \
|
||||
&& apt-get install -y nodejs \
|
||||
&& npm install -g npm \
|
||||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /usr/share/keyrings/yarn.gpg >/dev/null \
|
||||
&& echo "deb [signed-by=/usr/share/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
|
||||
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /usr/share/keyrings/pgdg.gpg >/dev/null \
|
||||
&& echo "deb [signed-by=/usr/share/keyrings/pgdg.gpg] http://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y yarn \
|
||||
&& apt-get install -y mysql-client \
|
||||
&& apt-get install -y postgresql-client-$POSTGRES_VERSION \
|
||||
&& apt-get -y autoremove \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
RUN setcap "cap_net_bind_service=+ep" /usr/bin/php8.1
|
||||
|
||||
RUN groupadd --force -g $WWWGROUP sail
|
||||
RUN useradd -ms /bin/bash --no-user-group -g $WWWGROUP -u 1337 sail
|
||||
|
||||
COPY start-container /usr/local/bin/start-container
|
||||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
COPY php.ini /etc/php/8.1/cli/conf.d/99-sail.ini
|
||||
RUN chmod +x /usr/local/bin/start-container
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
ENTRYPOINT ["start-container"]
|
7
docker/8.1/php.ini
Normal file
@ -0,0 +1,7 @@
|
||||
[PHP]
|
||||
post_max_size = 100M
|
||||
upload_max_filesize = 100M
|
||||
variables_order = EGPCS
|
||||
|
||||
[opcache]
|
||||
opcache.enable_cli=1
|
17
docker/8.1/start-container
Normal file
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ ! -z "$WWWUSER" ]; then
|
||||
usermod -u $WWWUSER sail
|
||||
fi
|
||||
|
||||
if [ ! -d /.composer ]; then
|
||||
mkdir /.composer
|
||||
fi
|
||||
|
||||
chmod -R ugo+rw /.composer
|
||||
|
||||
if [ $# -gt 0 ]; then
|
||||
exec gosu $WWWUSER "$@"
|
||||
else
|
||||
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
|
||||
fi
|
14
docker/8.1/supervisord.conf
Normal file
@ -0,0 +1,14 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
user=root
|
||||
logfile=/var/log/supervisor/supervisord.log
|
||||
pidfile=/var/run/supervisord.pid
|
||||
|
||||
[program:php]
|
||||
command=/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80
|
||||
user=sail
|
||||
environment=LARAVEL_SAIL="1"
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
59
docker/8.2/Dockerfile
Normal file
@ -0,0 +1,59 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
LABEL maintainer="Taylor Otwell"
|
||||
|
||||
ARG WWWGROUP
|
||||
ARG NODE_VERSION=18
|
||||
ARG POSTGRES_VERSION=15
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
ENV DEBIAN_FRONTEND noninteractive
|
||||
ENV TZ=UTC
|
||||
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 dnsutils librsvg2-bin fswatch \
|
||||
&& curl -sS 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x14aa40ec0831756756d7f66c4f4ea0aae5267a6c' | gpg --dearmor | tee /etc/apt/keyrings/ppa_ondrej_php.gpg > /dev/null \
|
||||
&& echo "deb [signed-by=/etc/apt/keyrings/ppa_ondrej_php.gpg] https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y php8.2-cli php8.2-dev \
|
||||
php8.2-pgsql php8.2-sqlite3 php8.2-gd php8.2-imagick \
|
||||
php8.2-curl \
|
||||
php8.2-imap php8.2-mysql php8.2-mbstring \
|
||||
php8.2-xml php8.2-zip php8.2-bcmath php8.2-soap \
|
||||
php8.2-intl php8.2-readline \
|
||||
php8.2-ldap \
|
||||
php8.2-msgpack php8.2-igbinary php8.2-redis php8.2-swoole \
|
||||
php8.2-memcached php8.2-pcov php8.2-xdebug \
|
||||
&& curl -sLS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer \
|
||||
&& curl -sLS https://deb.nodesource.com/setup_$NODE_VERSION.x | bash - \
|
||||
&& apt-get install -y nodejs \
|
||||
&& npm install -g npm \
|
||||
&& npm install -g pnpm \
|
||||
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /etc/apt/keyrings/yarn.gpg >/dev/null \
|
||||
&& echo "deb [signed-by=/etc/apt/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
|
||||
&& curl -sS https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /etc/apt/keyrings/pgdg.gpg >/dev/null \
|
||||
&& echo "deb [signed-by=/etc/apt/keyrings/pgdg.gpg] http://apt.postgresql.org/pub/repos/apt jammy-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y yarn \
|
||||
&& apt-get install -y mysql-client \
|
||||
&& apt-get install -y postgresql-client-$POSTGRES_VERSION \
|
||||
&& apt-get -y autoremove \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
RUN setcap "cap_net_bind_service=+ep" /usr/bin/php8.2
|
||||
|
||||
RUN groupadd --force -g $WWWGROUP sail
|
||||
RUN useradd -ms /bin/bash --no-user-group -g $WWWGROUP -u 1337 sail
|
||||
|
||||
COPY start-container /usr/local/bin/start-container
|
||||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
COPY php.ini /etc/php/8.2/cli/conf.d/99-sail.ini
|
||||
RUN chmod +x /usr/local/bin/start-container
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
ENTRYPOINT ["start-container"]
|
7
docker/8.2/php.ini
Normal file
@ -0,0 +1,7 @@
|
||||
[PHP]
|
||||
post_max_size = 100M
|
||||
upload_max_filesize = 100M
|
||||
variables_order = EGPCS
|
||||
|
||||
[opcache]
|
||||
opcache.enable_cli=1
|
17
docker/8.2/start-container
Normal file
@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ ! -z "$WWWUSER" ]; then
|
||||
usermod -u $WWWUSER sail
|
||||
fi
|
||||
|
||||
if [ ! -d /.composer ]; then
|
||||
mkdir /.composer
|
||||
fi
|
||||
|
||||
chmod -R ugo+rw /.composer
|
||||
|
||||
if [ $# -gt 0 ]; then
|
||||
exec gosu $WWWUSER "$@"
|
||||
else
|
||||
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
|
||||
fi
|
14
docker/8.2/supervisord.conf
Normal file
@ -0,0 +1,14 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
user=root
|
||||
logfile=/var/log/supervisor/supervisord.log
|
||||
pidfile=/var/run/supervisord.pid
|
||||
|
||||
[program:php]
|
||||
command=/usr/bin/php -d variables_order=EGPCS /var/www/html/artisan serve --host=0.0.0.0 --port=80
|
||||
user=sail
|
||||
environment=LARAVEL_SAIL="1"
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
6
docker/mysql/create-testing-database.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
mysql --user=root --password="$MYSQL_ROOT_PASSWORD" <<-EOSQL
|
||||
CREATE DATABASE IF NOT EXISTS testing;
|
||||
GRANT ALL PRIVILEGES ON \`testing%\`.* TO '$MYSQL_USER'@'%';
|
||||
EOSQL
|
2
docker/pgsql/create-testing-database.sql
Normal file
@ -0,0 +1,2 @@
|
||||
SELECT 'CREATE DATABASE testing'
|
||||
WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'testing')\gexec
|
BIN
public/assets/audio/Renai Saiban_[Uwamono].mp3
Normal file
@ -76,7 +76,13 @@
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.01) 1%, rgba(0, 0, 0, 0.65) 98%, rgba(0, 0, 0, 0.65) 100%);
|
||||
background: linear-gradient(
|
||||
to bottom,
|
||||
rgba(0, 0, 0, 0) 0%,
|
||||
rgba(0, 0, 0, 0.01) 1%,
|
||||
rgba(0, 0, 0, 0.65) 98%,
|
||||
rgba(0, 0, 0, 0.65) 100%
|
||||
);
|
||||
padding: 10px;
|
||||
}
|
||||
.article .article-header .article-title h2 {
|
||||
@ -108,7 +114,11 @@
|
||||
border-radius: 30px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.article .article-header .article-badge .article-badge-item .ion, .article .article-header .article-badge .article-badge-item .fas, .article .article-header .article-badge .article-badge-item .far, .article .article-header .article-badge .article-badge-item .fab, .article .article-header .article-badge .article-badge-item .fal {
|
||||
.article .article-header .article-badge .article-badge-item .ion,
|
||||
.article .article-header .article-badge .article-badge-item .fas,
|
||||
.article .article-header .article-badge .article-badge-item .far,
|
||||
.article .article-header .article-badge .article-badge-item .fab,
|
||||
.article .article-header .article-badge .article-badge-item .fal {
|
||||
margin-right: 3px;
|
||||
}
|
||||
.article.article-style-b .article-details .article-title {
|
||||
@ -399,7 +409,8 @@
|
||||
table.dataTable {
|
||||
border-collapse: collapse !important;
|
||||
}
|
||||
table.dataTable thead th, table.dataTable thead td {
|
||||
table.dataTable thead th,
|
||||
table.dataTable thead td {
|
||||
border-bottom: 1px solid #ddd !important;
|
||||
}
|
||||
table.dataTable.no-footer {
|
||||
@ -440,7 +451,8 @@ div.dataTables_wrapper div.dataTables_processing {
|
||||
.daterangepicker .input-mini {
|
||||
padding-left: 28px !important;
|
||||
}
|
||||
.daterangepicker .calendar th, .daterangepicker .calendar td {
|
||||
.daterangepicker .calendar th,
|
||||
.daterangepicker .calendar td {
|
||||
padding: 5px;
|
||||
font-size: 12px;
|
||||
}
|
||||
@ -448,11 +460,13 @@ div.dataTables_wrapper div.dataTables_processing {
|
||||
.ranges li {
|
||||
color: #6777ef;
|
||||
}
|
||||
.ranges li:hover, .ranges li.active {
|
||||
.ranges li:hover,
|
||||
.ranges li.active {
|
||||
background-color: #6777ef;
|
||||
}
|
||||
|
||||
.daterangepicker td.active, .daterangepicker td.active:hover {
|
||||
.daterangepicker td.active,
|
||||
.daterangepicker td.active:hover {
|
||||
background-color: #6777ef;
|
||||
}
|
||||
|
||||
@ -510,7 +524,8 @@ div.dataTables_wrapper div.dataTables_processing {
|
||||
.fc-view > table {
|
||||
border-color: #f2f2f2;
|
||||
}
|
||||
.fc-view > table tr, .fc-view > table td {
|
||||
.fc-view > table tr,
|
||||
.fc-view > table td {
|
||||
border-color: #f2f2f2;
|
||||
}
|
||||
.fc-view > table th {
|
||||
@ -541,7 +556,8 @@ div.dataTables_wrapper div.dataTables_processing {
|
||||
top: -0.09em;
|
||||
}
|
||||
|
||||
.fc-basic-view .fc-day-number, .fc-basic-view .fc-week-number {
|
||||
.fc-basic-view .fc-day-number,
|
||||
.fc-basic-view .fc-week-number {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
@ -638,7 +654,8 @@ tr:first-child > td > .fc-day-grid-event {
|
||||
}
|
||||
|
||||
/* 1.14 Image Preview */
|
||||
.image-preview, #callback-preview {
|
||||
.image-preview,
|
||||
#callback-preview {
|
||||
width: 250px;
|
||||
height: 250px;
|
||||
border: 2px dashed #ddd;
|
||||
@ -649,7 +666,8 @@ tr:first-child > td > .fc-day-grid-event {
|
||||
color: #ecf0f1;
|
||||
}
|
||||
|
||||
.image-preview input, #callback-preview input {
|
||||
.image-preview input,
|
||||
#callback-preview input {
|
||||
line-height: 200px;
|
||||
font-size: 200px;
|
||||
position: absolute;
|
||||
@ -657,7 +675,8 @@ tr:first-child > td > .fc-day-grid-event {
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.image-preview label, #callback-preview label {
|
||||
.image-preview label,
|
||||
#callback-preview label {
|
||||
position: absolute;
|
||||
z-index: 5;
|
||||
opacity: 0.8;
|
||||
@ -743,7 +762,8 @@ tr:first-child > td > .fc-day-grid-event {
|
||||
z-index: 889;
|
||||
}
|
||||
|
||||
.jqvmap-zoomin, .jqvmap-zoomout {
|
||||
.jqvmap-zoomin,
|
||||
.jqvmap-zoomout {
|
||||
height: auto;
|
||||
width: auto;
|
||||
}
|
||||
@ -787,13 +807,19 @@ tr:first-child > td > .fc-day-grid-event {
|
||||
.profile-widget .profile-widget-items .profile-widget-item:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
.profile-widget .profile-widget-items .profile-widget-item .profile-widget-item-label {
|
||||
.profile-widget
|
||||
.profile-widget-items
|
||||
.profile-widget-item
|
||||
.profile-widget-item-label {
|
||||
font-weight: 600;
|
||||
font-size: 12px;
|
||||
letter-spacing: 0.5px;
|
||||
color: #34395e;
|
||||
}
|
||||
.profile-widget .profile-widget-items .profile-widget-item .profile-widget-item-value {
|
||||
.profile-widget
|
||||
.profile-widget-items
|
||||
.profile-widget-item
|
||||
.profile-widget-item-value {
|
||||
color: #000;
|
||||
font-weight: 600;
|
||||
font-size: 16px;
|
||||
@ -820,13 +846,17 @@ tr:first-child > td > .fc-day-grid-event {
|
||||
border-top: 1px solid #f2f2f2;
|
||||
}
|
||||
}
|
||||
/* 1.18 Select2 */
|
||||
.select2-container--default .select2-search--dropdown .select2-search__field:focus {
|
||||
|
||||
/* 1.18 Select2
|
||||
/* .select2-container--default
|
||||
.select2-search--dropdown
|
||||
.select2-search__field:focus {
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.select2-container .select2-selection--multiple, .select2-container .select2-selection--single {
|
||||
.select2-container .select2-selection--multiple,
|
||||
.select2-container .select2-selection--single {
|
||||
box-sizing: border-box;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
@ -848,7 +878,8 @@ tr:first-child > td > .fc-day-grid-event {
|
||||
background-color: #fefeff;
|
||||
border-color: #95a0f4;
|
||||
}
|
||||
.select2-container.select2-container--focus .select2-selection--multiple, .select2-container.select2-container--focus .select2-selection--single {
|
||||
.select2-container.select2-container--focus .select2-selection--multiple,
|
||||
.select2-container.select2-container--focus .select2-selection--single {
|
||||
background-color: #fefeff;
|
||||
border-color: #95a0f4;
|
||||
}
|
||||
@ -865,37 +896,53 @@ tr:first-child > td > .fc-day-grid-event {
|
||||
padding: 7px;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--single .select2-selection__rendered {
|
||||
.select2-container--default
|
||||
.select2-selection--single
|
||||
.select2-selection__rendered {
|
||||
min-height: 42px;
|
||||
line-height: 42px;
|
||||
padding-left: 20px;
|
||||
padding-right: 20px;
|
||||
}
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__arrow, .select2-container--default .select2-selection--single .select2-selection__arrow {
|
||||
.select2-container--default
|
||||
.select2-selection--multiple
|
||||
.select2-selection__arrow,
|
||||
.select2-container--default
|
||||
.select2-selection--single
|
||||
.select2-selection__arrow {
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
right: 1px;
|
||||
width: 40px;
|
||||
min-height: 42px;
|
||||
}
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice {
|
||||
.select2-container--default
|
||||
.select2-selection--multiple
|
||||
.select2-selection__choice {
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.03);
|
||||
color: #fff;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__rendered {
|
||||
.select2-container--default
|
||||
.select2-selection--multiple
|
||||
.select2-selection__rendered {
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
|
||||
.select2-container--default
|
||||
.select2-selection--multiple
|
||||
.select2-selection__choice__remove {
|
||||
margin-right: 5px;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.select2-container--default .select2-selection--multiple .select2-selection__choice,
|
||||
.select2-container--default .select2-results__option[aria-selected=true],
|
||||
.select2-container--default .select2-results__option--highlighted[aria-selected] {
|
||||
.select2-container--default
|
||||
.select2-selection--multiple
|
||||
.select2-selection__choice,
|
||||
.select2-container--default .select2-results__option[aria-selected="true"],
|
||||
.select2-container--default
|
||||
.select2-results__option--highlighted[aria-selected] {
|
||||
background-color: #6777ef;
|
||||
color: #fff;
|
||||
}
|
||||
@ -903,6 +950,7 @@ tr:first-child > td > .fc-day-grid-event {
|
||||
.select2-results__option {
|
||||
padding-right: 10px 15px;
|
||||
}
|
||||
*/
|
||||
|
||||
/* 1.19 Selectric */
|
||||
.selectric {
|
||||
@ -937,7 +985,8 @@ tr:first-child > td > .fc-day-grid-event {
|
||||
border-color: #6777ef;
|
||||
}
|
||||
|
||||
.selectric-above .selectric-items, .selectric-below .selectric-items {
|
||||
.selectric-above .selectric-items,
|
||||
.selectric-below .selectric-items {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
@ -954,13 +1003,14 @@ tr:first-child > td > .fc-day-grid-event {
|
||||
.selectric-items li:hover {
|
||||
background-color: #f2f2f2;
|
||||
}
|
||||
.selectric-items li.selected, .selectric-items li.highlighted {
|
||||
.selectric-items li.selected,
|
||||
.selectric-items li.highlighted {
|
||||
background-color: #6777ef;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* 1.20 Slider */
|
||||
.slider .owl-nav [class*=owl-] {
|
||||
.slider .owl-nav [class*="owl-"] {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 35px;
|
||||
@ -975,14 +1025,14 @@ tr:first-child > td > .fc-day-grid-event {
|
||||
line-height: 34px;
|
||||
opacity: 0.3;
|
||||
}
|
||||
.slider .owl-nav [class*=owl-]:hover {
|
||||
.slider .owl-nav [class*="owl-"]:hover {
|
||||
background-color: #000;
|
||||
}
|
||||
.slider .owl-nav .owl-next {
|
||||
right: 0;
|
||||
left: initial;
|
||||
}
|
||||
.slider:hover .owl-nav [class*=owl-] {
|
||||
.slider:hover .owl-nav [class*="owl-"] {
|
||||
opacity: 1;
|
||||
}
|
||||
.slider .slider-caption {
|
||||
@ -1010,11 +1060,15 @@ tr:first-child > td > .fc-day-grid-event {
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
.sparkline-bar, .sparkline-line, .sparkline-inline {
|
||||
.sparkline-bar,
|
||||
.sparkline-line,
|
||||
.sparkline-inline {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.sparkline-bar canvas, .sparkline-line canvas, .sparkline-inline canvas {
|
||||
.sparkline-bar canvas,
|
||||
.sparkline-line canvas,
|
||||
.sparkline-inline canvas {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
@ -1237,27 +1291,32 @@ tr:first-child > td > .fc-day-grid-event {
|
||||
}
|
||||
|
||||
@media (max-width: 575.98px) {
|
||||
.user-progress .media, .user-details .media {
|
||||
.user-progress .media,
|
||||
.user-details .media {
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.user-progress .media img, .user-details .media img {
|
||||
.user-progress .media img,
|
||||
.user-details .media img {
|
||||
margin: 0 !important;
|
||||
margin-bottom: 10px !important;
|
||||
}
|
||||
|
||||
.user-progress .media .media-body, .user-details .media .media-body {
|
||||
.user-progress .media .media-body,
|
||||
.user-details .media .media-body {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.user-progress .media .media-items, .user-details .media .media-items {
|
||||
.user-progress .media .media-items,
|
||||
.user-details .media .media-items {
|
||||
margin: 20px 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.user-progress .list-unstyled-noborder li:last-child, .user-details .list-unstyled-noborder li:last-child {
|
||||
.user-progress .list-unstyled-noborder li:last-child,
|
||||
.user-details .list-unstyled-noborder li:last-child {
|
||||
margin-bottom: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
@ -1363,7 +1422,8 @@ tr:first-child > td > .fc-day-grid-event {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.icon-wrap .icon, .new-icons ul li .wi {
|
||||
.icon-wrap .icon,
|
||||
.new-icons ul li .wi {
|
||||
font-size: 24px;
|
||||
margin-right: 15px;
|
||||
width: 30px;
|
||||
@ -1505,7 +1565,8 @@ tr:first-child > td > .fc-day-grid-event {
|
||||
background-color: #6777ef;
|
||||
border-bottom: none;
|
||||
}
|
||||
.tickets .ticket-items .ticket-item.active .ticket-title, .tickets .ticket-items .ticket-item.active .ticket-desc {
|
||||
.tickets .ticket-items .ticket-item.active .ticket-title,
|
||||
.tickets .ticket-items .ticket-item.active .ticket-desc {
|
||||
color: #fff !important;
|
||||
}
|
||||
.tickets .ticket-items .ticket-item .ticket-title h4 {
|
||||
@ -1844,7 +1905,11 @@ tr:first-child > td > .fc-day-grid-event {
|
||||
text-decoration: none;
|
||||
border-radius: 0 0 3px 3px;
|
||||
}
|
||||
.pricing .pricing-cta a .fas, .pricing .pricing-cta a .far, .pricing .pricing-cta a .fab, .pricing .pricing-cta a .fal, .pricing .pricing-cta a .ion {
|
||||
.pricing .pricing-cta a .fas,
|
||||
.pricing .pricing-cta a .far,
|
||||
.pricing .pricing-cta a .fab,
|
||||
.pricing .pricing-cta a .fal,
|
||||
.pricing .pricing-cta a .ion {
|
||||
margin-left: 5px;
|
||||
}
|
||||
.pricing .pricing-cta a:hover {
|
||||
@ -2059,7 +2124,11 @@ tr:first-child > td > .fc-day-grid-event {
|
||||
background-color: #3abaf4;
|
||||
color: #fff;
|
||||
}
|
||||
.wizard-steps .wizard-step .wizard-step-icon .fas, .wizard-steps .wizard-step .wizard-step-icon .far, .wizard-steps .wizard-step .wizard-step-icon .fab, .wizard-steps .wizard-step .wizard-step-icon .fal, .wizard-steps .wizard-step .wizard-step-icon .ion {
|
||||
.wizard-steps .wizard-step .wizard-step-icon .fas,
|
||||
.wizard-steps .wizard-step .wizard-step-icon .far,
|
||||
.wizard-steps .wizard-step .wizard-step-icon .fab,
|
||||
.wizard-steps .wizard-step .wizard-step-icon .fal,
|
||||
.wizard-steps .wizard-step .wizard-step-icon .ion {
|
||||
font-size: 34px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
1874
public/assets/css/components.min.css
vendored
990
public/assets/css/login_register/style.css
Normal file
@ -0,0 +1,990 @@
|
||||
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700;800&display=swap");
|
||||
|
||||
:root {
|
||||
--primary: #900c3e;
|
||||
--secondary: #bfc0c0;
|
||||
--white: #fff;
|
||||
--text-clr: #5b6475;
|
||||
--header-clr: #25273d;
|
||||
--next-btn-hover: #900c3e;
|
||||
--back-btn-hover: #8b8c8c;
|
||||
}
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body,
|
||||
input {
|
||||
font-family: "Poppins", sans-serif;
|
||||
}
|
||||
|
||||
input[type="text"] {
|
||||
border: none;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
video {
|
||||
background: primary;
|
||||
}
|
||||
|
||||
.container {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
min-height: 100vh;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.forms-container {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.signin-signup {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
left: 75%;
|
||||
width: 50%;
|
||||
transition: 1s 0.7s ease-in-out;
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
z-index: 3;
|
||||
}
|
||||
|
||||
.flex-input-btn {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-top: 3%;
|
||||
}
|
||||
|
||||
form.sign-up-form {
|
||||
display: flex;
|
||||
align-items: start;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
padding: 0rem 2rem 0 5rem;
|
||||
transition: all 0.2s 0.7s;
|
||||
overflow: hidden;
|
||||
grid-column: 1 / 2;
|
||||
grid-row: 1 / 2;
|
||||
opacity: 0;
|
||||
width: 110%;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
form.sign-in-form {
|
||||
display: flex;
|
||||
align-items: start;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
padding: 0 3rem;
|
||||
transition: all 0.2s 0.7s;
|
||||
overflow: hidden;
|
||||
grid-column: 1 / 2;
|
||||
grid-row: 1 / 2;
|
||||
width: 100%;
|
||||
z-index: 8;
|
||||
}
|
||||
|
||||
form p {
|
||||
font-size: 0.9rem;
|
||||
width: 110%;
|
||||
margin-bottom: 2%;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 2.2rem;
|
||||
color: #444;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.input-field-signin-flex,
|
||||
.input-field-signup-flex {
|
||||
width: 100%;
|
||||
height: 55px;
|
||||
margin-top: 2%;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 1rem;
|
||||
display: grid;
|
||||
grid-template-columns: 15% 85%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.input {
|
||||
width: 100%;
|
||||
height: 55px;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 1rem;
|
||||
display: grid;
|
||||
grid-template-columns: 15% 85%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
}
|
||||
.input input {
|
||||
width: 110%;
|
||||
height: 100%;
|
||||
background: none;
|
||||
outline: none;
|
||||
border: none;
|
||||
border-radius: 1rem;
|
||||
line-height: 1;
|
||||
font-weight: 600;
|
||||
margin-right: 1rem;
|
||||
font-size: 0.8rem;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.input i {
|
||||
padding: 0 1.5rem;
|
||||
color: #acacac;
|
||||
transition: 0.5s;
|
||||
}
|
||||
|
||||
.up {
|
||||
margin-top: 3%;
|
||||
}
|
||||
|
||||
.input-field-signin-flex input,
|
||||
.input-field-signup-flex input {
|
||||
width: 82%;
|
||||
height: 100%;
|
||||
background: none;
|
||||
outline: none;
|
||||
border: none;
|
||||
border-radius: 1rem;
|
||||
line-height: 1;
|
||||
font-weight: 600;
|
||||
margin-right: 1rem;
|
||||
font-size: 0.8rem;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.input-field-signin-flex i,
|
||||
.input-field-signup-flex i {
|
||||
padding: 0 1.5rem;
|
||||
color: #acacac;
|
||||
transition: 0.5s;
|
||||
}
|
||||
|
||||
.input-field {
|
||||
width: 100%;
|
||||
height: 55px;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 1rem;
|
||||
display: grid;
|
||||
grid-template-columns: 15% 85%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
margin-top: 17px;
|
||||
}
|
||||
|
||||
.input-field i,
|
||||
.input-field box-icon {
|
||||
padding: 0 1.5rem;
|
||||
color: #acacac;
|
||||
transition: 0.5s;
|
||||
}
|
||||
|
||||
.input-field input {
|
||||
width: 110%;
|
||||
height: 100%;
|
||||
background: none;
|
||||
outline: none;
|
||||
border: none;
|
||||
border-radius: 1rem;
|
||||
line-height: 1;
|
||||
font-weight: 600;
|
||||
margin-right: 1rem;
|
||||
font-size: 0.8rem;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.input-field input::placeholder {
|
||||
color: #aaa;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.error {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.validate {
|
||||
width: 120%;
|
||||
align-items: center;
|
||||
padding: 0.5rem 0.1rem;
|
||||
color: red;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.validate-text {
|
||||
margin-left: 1%;
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 100%;
|
||||
background-color: #900c3e;
|
||||
border: none;
|
||||
outline: none;
|
||||
height: 49px;
|
||||
border-radius: 1rem;
|
||||
color: #fff;
|
||||
text-transform: uppercase;
|
||||
font-weight: 600;
|
||||
margin: 10px 0;
|
||||
cursor: pointer;
|
||||
transition: 0.25s;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
-webkit-transform: translateY(-0.22em);
|
||||
transform: translateY(-0.252m);
|
||||
}
|
||||
|
||||
.btn-otp,
|
||||
.btn-foto {
|
||||
width: fit-content;
|
||||
height: fit-content;
|
||||
margin-left: 2%;
|
||||
font-size: 0.7rem;
|
||||
padding: 0.85rem 0.9rem;
|
||||
border: 1px solid #900c3e;
|
||||
color: #900c3e;
|
||||
background: none;
|
||||
outline: none;
|
||||
border-radius: 0.7rem;
|
||||
text-transform: uppercase;
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
transition: 0.25s;
|
||||
}
|
||||
|
||||
.btn-otp:hover {
|
||||
-webkit-transform: translateY(-0.22em);
|
||||
transform: translateY(-0.252m);
|
||||
}
|
||||
|
||||
.btn-otp:disabled {
|
||||
cursor: not-allowed; /* Mengganti cursor menjadi "not-allowed" saat tombol dinonaktifkan */
|
||||
opacity: 0.6; /* Mengurangi opasitas tombol saat dinonaktifkan */
|
||||
border-color: #ccc; /* Mengganti warna border saat dinonaktifkan */
|
||||
color: #ccc; /* Mengganti warna teks saat dinonaktifkan */
|
||||
pointer-events: none; /* Mencegah interaksi dengan tombol saat dinonaktifkan */
|
||||
}
|
||||
|
||||
.panels-container {
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
|
||||
.container:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
height: 2000px;
|
||||
width: 2000px;
|
||||
top: -10%;
|
||||
right: 48%;
|
||||
transform: translateY(-50%);
|
||||
background-image: linear-gradient(-45deg, #900c3e 0%, #900c3e 100%);
|
||||
transition: 1.8s ease-in-out;
|
||||
border-radius: 50%;
|
||||
z-index: 4;
|
||||
}
|
||||
|
||||
.image {
|
||||
width: 100%;
|
||||
transition: transform 1.1s ease-in-out;
|
||||
transition-delay: 0.4s;
|
||||
}
|
||||
|
||||
.panel {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-end;
|
||||
justify-content: space-around;
|
||||
text-align: center;
|
||||
z-index: 4;
|
||||
}
|
||||
|
||||
.left-panel {
|
||||
pointer-events: all;
|
||||
padding: 3rem 17% 2rem 12%;
|
||||
}
|
||||
|
||||
.right-panel {
|
||||
pointer-events: none;
|
||||
padding: 3rem 12% 2rem 17%;
|
||||
}
|
||||
|
||||
.panel .content {
|
||||
color: #fff;
|
||||
transition: transform 0.9s ease-in-out;
|
||||
transition-delay: 0.6s;
|
||||
}
|
||||
|
||||
.content a {
|
||||
cursor: pointer;
|
||||
color: white;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.panel h3 {
|
||||
font-weight: 600;
|
||||
line-height: 1;
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
.panel p {
|
||||
font-size: 1rem;
|
||||
padding: 0.7rem 0;
|
||||
}
|
||||
|
||||
.btn.transparent {
|
||||
margin: 0;
|
||||
background: none;
|
||||
border: 2px solid #fff;
|
||||
width: 130px;
|
||||
height: 41px;
|
||||
font-weight: 600;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
|
||||
.right-panel .image,
|
||||
.right-panel .content {
|
||||
transform: translateX(800px);
|
||||
}
|
||||
|
||||
/* ANIMATION */
|
||||
|
||||
.container.sign-up-mode:before {
|
||||
transform: translate(100%, -50%);
|
||||
right: 52%;
|
||||
}
|
||||
|
||||
.container.sign-up-mode .left-panel .image,
|
||||
.container.sign-up-mode .left-panel .content {
|
||||
transform: translateX(-800px);
|
||||
}
|
||||
|
||||
.container.sign-up-mode .signin-signup {
|
||||
left: 25%;
|
||||
}
|
||||
|
||||
.container.sign-up-mode form.sign-up-form {
|
||||
opacity: 1;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.container.sign-up-mode form.sign-in-form {
|
||||
opacity: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.container.sign-up-mode .right-panel .image,
|
||||
.container.sign-up-mode .right-panel .content {
|
||||
transform: translateX(0%);
|
||||
}
|
||||
|
||||
.container.sign-up-mode .left-panel {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.container.sign-up-mode .right-panel {
|
||||
pointer-events: all;
|
||||
}
|
||||
|
||||
@media (max-width: 1100px) {
|
||||
.container {
|
||||
min-height: 1000px;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
form.sign-in-form {
|
||||
justify-content: start;
|
||||
}
|
||||
|
||||
.header {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.header ul li div {
|
||||
padding: 0 1.2rem;
|
||||
}
|
||||
|
||||
.signin-signup {
|
||||
width: 100%;
|
||||
top: 95%;
|
||||
transform: translate(-50%, -100%);
|
||||
transition: 1s 0.8s ease-in-out;
|
||||
}
|
||||
|
||||
.signin-signup,
|
||||
.container.sign-up-mode .signin-signup {
|
||||
left: 50%;
|
||||
}
|
||||
|
||||
.panels-container {
|
||||
grid-template-columns: 1fr;
|
||||
grid-template-rows: 1fr 2fr 1fr;
|
||||
}
|
||||
|
||||
.panel {
|
||||
flex-direction: row;
|
||||
justify-content: space-around;
|
||||
grid-column: 1 / 2;
|
||||
}
|
||||
|
||||
.right-panel {
|
||||
grid-row: 3 / 4;
|
||||
}
|
||||
|
||||
.left-panel {
|
||||
grid-row: 1 / 2;
|
||||
}
|
||||
|
||||
.image {
|
||||
width: 200px;
|
||||
transition: transform 0.9s ease-in-out;
|
||||
transition-delay: 0.6s;
|
||||
}
|
||||
|
||||
.panel .content {
|
||||
padding-right: 15%;
|
||||
transition: transform 0.9s ease-in-out;
|
||||
transition-delay: 0.8s;
|
||||
}
|
||||
|
||||
.panel h3 {
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.panel p {
|
||||
font-size: 0.7rem;
|
||||
padding: 0.5rem 0;
|
||||
}
|
||||
|
||||
.btn.transparent {
|
||||
width: 110px;
|
||||
height: 35px;
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
|
||||
.container:before {
|
||||
width: 1500px;
|
||||
height: 1500px;
|
||||
transform: translateX(-50%);
|
||||
left: 30%;
|
||||
bottom: 68%;
|
||||
right: initial;
|
||||
top: initial;
|
||||
transition: 2s ease-in-out;
|
||||
}
|
||||
|
||||
.container.sign-up-mode:before {
|
||||
transform: translate(-50%, 100%);
|
||||
bottom: 26%;
|
||||
right: initial;
|
||||
}
|
||||
|
||||
.container.sign-up-mode .left-panel .image,
|
||||
.container.sign-up-mode .left-panel .content {
|
||||
transform: translateY(-300px);
|
||||
}
|
||||
|
||||
.container.sign-up-mode .right-panel .image,
|
||||
.container.sign-up-mode .right-panel .content {
|
||||
transform: translateY(0px);
|
||||
}
|
||||
|
||||
.right-panel .image,
|
||||
.right-panel .content {
|
||||
transform: translateY(300px);
|
||||
}
|
||||
|
||||
.container.sign-up-mode .signin-signup {
|
||||
top: 5%;
|
||||
transform: translate(-50%, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 740px) {
|
||||
.form_4 div {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.btns_wrap .common_btns.form_4_btns {
|
||||
width: 90%;
|
||||
}
|
||||
|
||||
.image {
|
||||
display: none;
|
||||
}
|
||||
.panel .content {
|
||||
padding: 0.5rem 1rem;
|
||||
}
|
||||
.container {
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
.container:before {
|
||||
bottom: 72%;
|
||||
left: 50%;
|
||||
}
|
||||
|
||||
.container.sign-up-mode:before {
|
||||
bottom: 28%;
|
||||
left: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
/* // MULTIPLE PROGGRESS BAR */
|
||||
.wrapper {
|
||||
width: fit-content;
|
||||
max-width: 100%;
|
||||
background: var(--white);
|
||||
margin: 0 auto 0;
|
||||
border-radius: 1rem;
|
||||
}
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.header ul {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.header ul li {
|
||||
margin-right: 50px;
|
||||
position: relative;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.header ul li:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.header ul li:before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
left: 55px;
|
||||
width: 130%;
|
||||
height: 4px;
|
||||
background: var(--secondary);
|
||||
}
|
||||
|
||||
.header ul li:last-child:before {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.header ul li div {
|
||||
padding: 1.2rem;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.header ul li p {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background: var(--secondary);
|
||||
color: var(--white);
|
||||
text-align: center;
|
||||
line-height: 50px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.header ul li.active:before {
|
||||
background: var(--primary);
|
||||
}
|
||||
|
||||
.header ul li.active p {
|
||||
background: var(--primary);
|
||||
}
|
||||
|
||||
.form_wrap h2 {
|
||||
color: var(--header-clr);
|
||||
text-align: start;
|
||||
text-transform: uppercase;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.form_wrap .input_wrap {
|
||||
width: 350px;
|
||||
max-width: 100%;
|
||||
margin: 0 auto 20px;
|
||||
}
|
||||
|
||||
.form_wrap .input_wrap:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.form_wrap .input_wrap label {
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.form_wrap .input_wrap .input {
|
||||
border: 2px solid var(--secondary);
|
||||
border-radius: 3px;
|
||||
padding: 10px;
|
||||
display: block;
|
||||
width: 100%;
|
||||
font-size: 16px;
|
||||
transition: 0.5s ease;
|
||||
}
|
||||
|
||||
.form_wrap .input_wrap .input:focus {
|
||||
border-color: var(--primary);
|
||||
}
|
||||
|
||||
.btns_wrap {
|
||||
width: 100%;
|
||||
margin: 4% auto;
|
||||
}
|
||||
|
||||
.btns_wrap .common_btns {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.btns_wrap .common_btns.form_1_btns {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.btns_wrap .common_btns.form_2_btns {
|
||||
width: 190%;
|
||||
margin-top: 10%;
|
||||
}
|
||||
|
||||
.btns_wrap .common_btns.form_3_btns {
|
||||
width: 60%;
|
||||
margin-top: 2%;
|
||||
}
|
||||
|
||||
.btns_wrap .common_btns button {
|
||||
position: relative;
|
||||
border: 0;
|
||||
padding: 12px 15px;
|
||||
background: var(--primary);
|
||||
color: var(--white);
|
||||
width: 135px;
|
||||
justify-content: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 0.8rem;
|
||||
border-radius: 1rem;
|
||||
transition: 0.5s ease;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btns_wrap .common_btns button.btn_back {
|
||||
background: var(--secondary);
|
||||
box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
|
||||
transition: 0.25s;
|
||||
}
|
||||
|
||||
.btns_wrap .common_btns button.btn_next {
|
||||
box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
|
||||
transition: 0.25s;
|
||||
}
|
||||
|
||||
.btns_wrap .common_btns button.btn_done {
|
||||
box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
|
||||
transition: 0.25s;
|
||||
}
|
||||
|
||||
.btns_wrap .common_btns button.btn_next .icon {
|
||||
display: flex;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.btns_wrap .common_btns button.btn_back .icon {
|
||||
display: flex;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.btns_wrap .common_btns button.btn_next:hover,
|
||||
.btns_wrap .common_btns button.btn_done:hover {
|
||||
background: var(--next-btn-hover);
|
||||
box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px,
|
||||
rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
|
||||
-webkit-transform: translateY(-0.22em);
|
||||
transform: translateY(-0.252m);
|
||||
}
|
||||
|
||||
.btns_wrap .common_btns button.btn_back:hover {
|
||||
background: var(--back-btn-hover);
|
||||
box-shadow: rgba(50, 50, 93, 0.25) 0px 6px 12px -2px,
|
||||
rgba(0, 0, 0, 0.3) 0px 3px 7px -3px;
|
||||
-webkit-transform: translateY(-0.22em);
|
||||
transform: translateY(-0.252m);
|
||||
}
|
||||
|
||||
.modal_wrapper {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
visibility: hidden;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
.modal_wrapper .shadow {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
opacity: 0;
|
||||
transition: 0.2s ease;
|
||||
}
|
||||
|
||||
.modal_wrapper .success_wrap {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -800px);
|
||||
background: var(--white);
|
||||
padding: 50px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-radius: 5px;
|
||||
transition: 0.5s ease;
|
||||
}
|
||||
|
||||
.modal_wrapper .success_wrap .modal_icon {
|
||||
margin-right: 20px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background: var(--primary);
|
||||
color: var(--white);
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 32px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.modal_wrapper.active {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.modal_wrapper.active .shadow {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.modal_wrapper.active .success_wrap {
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
/******************************************
|
||||
/* END DROPDOWN INPUT
|
||||
==================================================*/
|
||||
.select2-container .select2-selection--single {
|
||||
border: none;
|
||||
background: none;
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.select2-container .select2-selection--single:focus {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.select2-container .select2-selection--single .select2-selection__arrow {
|
||||
border: none;
|
||||
background: none;
|
||||
}
|
||||
|
||||
.select2-container--default.select2-container--open .select2-selection--single {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.select2-results {
|
||||
border-bottom: 1px solid #aaa;
|
||||
}
|
||||
|
||||
.select2-results__option {
|
||||
padding: 10px;
|
||||
color: #333;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.select2-container--default
|
||||
.select2-results
|
||||
> .select2-results__options
|
||||
.select2-results__option--highlighted {
|
||||
background-color: #900c3e !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.gender-select-menu,
|
||||
.select-menu {
|
||||
height: 100%;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
.gender-select-menu .gender-select-input,
|
||||
.select-menu .select-btn {
|
||||
width: 100%;
|
||||
height: 55px;
|
||||
background: #f0f0f0;
|
||||
border-radius: 1rem;
|
||||
grid-template-columns: 15% 85%;
|
||||
display: flex;
|
||||
padding: 0 1.2rem;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
.select-btn i {
|
||||
font-size: 25px;
|
||||
transition: 0.3s;
|
||||
}
|
||||
|
||||
.gender-select,
|
||||
.sBtn-text {
|
||||
font-size: 0.8rem;
|
||||
color: #aaa;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.gender-select-menu.active .select-btn i,
|
||||
.select-menu.active .select-btn i {
|
||||
transform: rotate(-180deg);
|
||||
}
|
||||
.gender-select-menu .gender-options,
|
||||
.select-menu .options {
|
||||
width: 100%;
|
||||
max-height: 200px;
|
||||
overflow-y: auto;
|
||||
position: absolute;
|
||||
padding: 0.5rem 0;
|
||||
margin-top: 10px;
|
||||
border-radius: 1rem;
|
||||
box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
|
||||
display: none;
|
||||
background: white;
|
||||
z-index: 7;
|
||||
}
|
||||
|
||||
.gender-select-menu.active .gender-options,
|
||||
.select-menu.active .options {
|
||||
display: block;
|
||||
}
|
||||
.options .gender-option,
|
||||
.options .option {
|
||||
display: flex;
|
||||
height: 55px;
|
||||
cursor: pointer;
|
||||
padding: 0 1.4rem;
|
||||
border-radius: 8px;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
}
|
||||
.options .gender-option:hover,
|
||||
.options .option:hover {
|
||||
background: #f2f2f2;
|
||||
}
|
||||
|
||||
.option .gender-option-text,
|
||||
.option .option-text {
|
||||
font-size: 0.8rem;
|
||||
color: #333;
|
||||
}
|
||||
/******************************************
|
||||
/* END DROPDOWN INPUT
|
||||
==================================================*/
|
||||
|
||||
/******************************************
|
||||
/* SLIDER
|
||||
==================================================*/
|
||||
.slider-container {
|
||||
position: relative;
|
||||
max-width: 60%;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.slider {
|
||||
display: flex;
|
||||
|
||||
transition: transform 0.5s ease-in-out;
|
||||
}
|
||||
|
||||
.slide {
|
||||
flex: 0 0 100%;
|
||||
}
|
||||
|
||||
.slider h3 {
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
.slide img {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.dots {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: fit-content;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
.dot {
|
||||
display: inline-block;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
margin: 0 5px;
|
||||
background-color: #bbb;
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.prev,
|
||||
.next {
|
||||
font-size: 1rem;
|
||||
background: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
margin: 0 1rem;
|
||||
}
|
||||
|
||||
.dot.active {
|
||||
background-color: #900c3e;
|
||||
}
|
||||
|
||||
#webcamKtp,
|
||||
#webcamEkyc {
|
||||
height: 30vh;
|
||||
border-radius: 1rem;
|
||||
}
|
||||
/******************************************
|
||||
/* END SLIDER
|
||||
==================================================*/
|
54
public/assets/css/main.css
Normal file
@ -0,0 +1,54 @@
|
||||
|
||||
/*--------------------------------------------------------------
|
||||
# Profie Page
|
||||
--------------------------------------------------------------*/
|
||||
.profile .profile-card img {
|
||||
max-width: 120px;
|
||||
}
|
||||
|
||||
.profile .profile-card h2 {
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
color: #2c384e;
|
||||
margin: 10px 0 0 0;
|
||||
}
|
||||
|
||||
.profile .profile-card h3 {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.profile .profile-card .social-links a {
|
||||
font-size: 20px;
|
||||
display: inline-block;
|
||||
color: rgba(1, 41, 112, 0.5);
|
||||
line-height: 0;
|
||||
margin-right: 10px;
|
||||
transition: 0.3s;
|
||||
}
|
||||
|
||||
.profile .profile-card .social-links a:hover {
|
||||
color: #012970;
|
||||
}
|
||||
|
||||
.profile .profile-overview .row {
|
||||
margin-bottom: 20px;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.profile .profile-overview .card-title {
|
||||
color: #012970;
|
||||
}
|
||||
|
||||
.profile .profile-overview .label {
|
||||
font-weight: 600;
|
||||
color: rgba(1, 41, 112, 0.6);
|
||||
}
|
||||
|
||||
.profile .profile-edit label {
|
||||
font-weight: 600;
|
||||
color: rgba(1, 41, 112, 0.6);
|
||||
}
|
||||
|
||||
.profile .profile-edit img {
|
||||
max-width: 120px;
|
||||
}
|
BIN
public/assets/images/dashboard/Asset 3.png
Normal file
After Width: | Height: | Size: 44 KiB |
BIN
public/assets/images/google-removebg-preview.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
public/assets/img/avatar/ok.jpg
Normal file
After Width: | Height: | Size: 183 KiB |
BIN
public/assets/img/avatar/rusak.jpeg
Normal file
After Width: | Height: | Size: 6.9 KiB |
After Width: | Height: | Size: 70 KiB |
BIN
public/assets/img/metode_pembayaran/alfamart.png
Normal file
After Width: | Height: | Size: 61 KiB |
BIN
public/assets/img/metode_pembayaran/bank_transfer.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
public/assets/img/metode_pembayaran/bca.png
Normal file
After Width: | Height: | Size: 103 KiB |
BIN
public/assets/img/metode_pembayaran/bri.png
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
public/assets/img/metode_pembayaran/bri_epay.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
public/assets/img/metode_pembayaran/gopay.png
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
public/assets/img/metode_pembayaran/indomaret.png
Normal file
After Width: | Height: | Size: 60 KiB |
BIN
public/assets/img/metode_pembayaran/mandiri.png
Normal file
After Width: | Height: | Size: 63 KiB |
BIN
public/assets/img/metode_pembayaran/qris.png
Normal file
After Width: | Height: | Size: 27 KiB |
578
public/assets/js/login_register/app.js
Normal file
@ -0,0 +1,578 @@
|
||||
/******************************************
|
||||
* ANIMATION BTN SIGN IN & SIGN UP
|
||||
******************************************/
|
||||
const sign_in_btn = document.querySelector("#sign-in-btn");
|
||||
const sign_up_btn = document.querySelector("#sign-up-btn");
|
||||
const container = document.querySelector(".container");
|
||||
|
||||
sign_up_btn.addEventListener("click", () => {
|
||||
container.classList.add("sign-up-mode");
|
||||
});
|
||||
|
||||
sign_in_btn.addEventListener("click", () => {
|
||||
container.classList.remove("sign-up-mode");
|
||||
});
|
||||
/******************************************
|
||||
* END ANIMATION BTN SIGN IN & SIGN UP
|
||||
******************************************/
|
||||
|
||||
/******************************************
|
||||
* PRELOADER
|
||||
******************************************/
|
||||
setTimeout(function () {
|
||||
$("#preloader").fadeToggle();
|
||||
}, 200);
|
||||
/******************************************
|
||||
* END PRELOADER
|
||||
******************************************/
|
||||
|
||||
/******************************************
|
||||
* MULTIPLE FORM
|
||||
******************************************/
|
||||
var form_1 = document.querySelector(".form_1");
|
||||
var form_2 = document.querySelector(".form_2");
|
||||
var form_3 = document.querySelector(".form_3");
|
||||
var form_4 = document.querySelector(".form_4");
|
||||
|
||||
var form_1_btns = document.querySelector(".form_1_btns");
|
||||
var form_2_btns = document.querySelector(".form_2_btns");
|
||||
var form_3_btns = document.querySelector(".form_3_btns");
|
||||
var form_4_btns = document.querySelector(".form_4_btns");
|
||||
|
||||
var form_1_next_btn = document.querySelector(".form_1_btns .btn_next");
|
||||
var form_2_back_btn = document.querySelector(".form_2_btns .btn_back");
|
||||
var form_2_next_btn = document.querySelector(".form_2_btns .btn_next");
|
||||
var form_3_back_btn = document.querySelector(".form_3_btns .btn_back");
|
||||
var form_3_next_btn = document.querySelector(".form_3_btns .btn_next");
|
||||
var form_4_back_btn = document.querySelector(".form_4_btns .btn_back");
|
||||
|
||||
var form_2_progessbar = document.querySelector(".form_2_progessbar");
|
||||
var form_3_progessbar = document.querySelector(".form_3_progessbar");
|
||||
var form_4_progessbar = document.querySelector(".form_4_progessbar");
|
||||
|
||||
var btn_done = document.querySelector(".btn_done");
|
||||
var modal_wrapper = document.querySelector(".modal_wrapper");
|
||||
var shadow = document.querySelector(".shadow");
|
||||
|
||||
form_1_next_btn.addEventListener("click", function () {
|
||||
form_1.style.display = "none";
|
||||
form_2.style.display = "block";
|
||||
|
||||
form_1_btns.style.display = "none";
|
||||
form_2_btns.style.display = "flex";
|
||||
|
||||
form_2_progessbar.classList.add("active");
|
||||
});
|
||||
|
||||
form_2_back_btn.addEventListener("click", function () {
|
||||
form_1.style.display = "block";
|
||||
form_2.style.display = "none";
|
||||
|
||||
form_1_btns.style.display = "flex";
|
||||
form_2_btns.style.display = "none";
|
||||
|
||||
form_2_progessbar.classList.remove("active");
|
||||
});
|
||||
|
||||
form_2_next_btn.addEventListener("click", function () {
|
||||
form_2.style.display = "none";
|
||||
form_3.style.display = "block";
|
||||
|
||||
form_3_btns.style.display = "flex";
|
||||
form_2_btns.style.display = "none";
|
||||
|
||||
form_3_progessbar.classList.add("active");
|
||||
});
|
||||
|
||||
form_3_next_btn.addEventListener("click", function () {
|
||||
form_3.style.display = "none";
|
||||
form_4.style.display = "block";
|
||||
|
||||
form_4_btns.style.display = "flex";
|
||||
form_3_btns.style.display = "none";
|
||||
|
||||
form_4_progessbar.classList.add("active");
|
||||
});
|
||||
|
||||
form_3_back_btn.addEventListener("click", function () {
|
||||
form_2.style.display = "block";
|
||||
form_3.style.display = "none";
|
||||
|
||||
form_3_btns.style.display = "none";
|
||||
form_2_btns.style.display = "flex";
|
||||
|
||||
form_3_progessbar.classList.remove("active");
|
||||
});
|
||||
|
||||
form_4_back_btn.addEventListener("click", function () {
|
||||
form_3.style.display = "block";
|
||||
form_4.style.display = "none";
|
||||
|
||||
form_4_btns.style.display = "none";
|
||||
form_3_btns.style.display = "flex";
|
||||
|
||||
form_4_progessbar.classList.remove("active");
|
||||
});
|
||||
|
||||
/******************************************
|
||||
* MULTIPLE FORM END
|
||||
******************************************/
|
||||
|
||||
/******************************************
|
||||
* KTP & E-KYC CAMERA
|
||||
******************************************/
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
const videoElementKtp = document.getElementById("webcamKtp");
|
||||
const captureButtonKtp = document.getElementById("captureButtonKtp");
|
||||
const fotoInputKtp = document.getElementById("fotoKtp");
|
||||
const startButtonKtp = document.getElementById("startButtonKtp");
|
||||
const refreshButtonKtp = document.getElementById("refreshButtonKtp");
|
||||
const imageHolderKtp = document.getElementById("imageHolderKtp");
|
||||
|
||||
const videoElementEkyc = document.getElementById("webcamEkyc");
|
||||
const captureButtonEkyc = document.getElementById("captureButtonEkyc");
|
||||
const fotoInputEkyc = document.getElementById("fotoEkyc");
|
||||
const startButtonEkyc = document.getElementById("startButtonEkyc");
|
||||
const refreshButtonEkyc = document.getElementById("refreshButtonEkyc");
|
||||
const imageHolderEkyc = document.getElementById("imageHolderEkyc");
|
||||
|
||||
// Inisialisasi status kamera
|
||||
let ktpStream = null;
|
||||
let ekycStream = null;
|
||||
|
||||
// Tampilan tombol capture dan refresh
|
||||
captureButtonKtp.style.display = "none";
|
||||
refreshButtonKtp.style.display = "none";
|
||||
videoElementKtp.style.display = "none";
|
||||
imageHolderKtp.style.display = "block";
|
||||
|
||||
captureButtonEkyc.style.display = "none";
|
||||
refreshButtonEkyc.style.display = "none";
|
||||
videoElementEkyc.style.display = "none";
|
||||
imageHolderEkyc.style.display = "block";
|
||||
|
||||
// Fungsi untuk menyalakan kamera
|
||||
function turnOnCamera(stream, videoElement, startButton) {
|
||||
videoElement.srcObject = stream;
|
||||
startButton.textContent = "Matikan Kamera";
|
||||
videoElement.style.display = "block"; // Tampilkan video
|
||||
}
|
||||
|
||||
// Fungsi untuk mematikan kamera
|
||||
function turnOffCamera(stream, videoElement, startButton) {
|
||||
if (stream) {
|
||||
stream.getTracks().forEach((track) => track.stop());
|
||||
videoElement.srcObject = null;
|
||||
}
|
||||
startButton.textContent = "Nyalakan Kamera";
|
||||
videoElement.style.display = "none"; // Sembunyikan video
|
||||
}
|
||||
|
||||
// Fungsi untuk menghapus hasil foto
|
||||
function clearPhoto(fotoInput, fotoPreview) {
|
||||
fotoInput.value = "";
|
||||
fotoPreview.innerHTML = "";
|
||||
}
|
||||
|
||||
startButtonKtp.addEventListener("click", function () {
|
||||
if (ktpStream) {
|
||||
// Matikan kamera jika sudah aktif
|
||||
turnOffCamera(ktpStream, videoElementKtp, startButtonKtp);
|
||||
// Hapus hasil foto
|
||||
clearPhoto(
|
||||
fotoInputKtp,
|
||||
document.getElementById("foto-preview-ktp")
|
||||
);
|
||||
ktpStream = null;
|
||||
imageHolderKtp.style.display = "block";
|
||||
captureButtonKtp.style.display = "none";
|
||||
} else {
|
||||
// Aktifkan kamera jika belum aktif
|
||||
navigator.mediaDevices
|
||||
.getUserMedia({ video: true })
|
||||
.then(function (stream) {
|
||||
ktpStream = stream;
|
||||
turnOnCamera(ktpStream, videoElementKtp, startButtonKtp);
|
||||
imageHolderKtp.style.display = "none";
|
||||
captureButtonKtp.style.display = "block";
|
||||
})
|
||||
.catch(function (error) {
|
||||
Swal.fire({
|
||||
title: "Gagal",
|
||||
text: "Gagal mengakses kamera, karena " + error,
|
||||
icon: "error",
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
startButtonEkyc.addEventListener("click", function () {
|
||||
if (ekycStream) {
|
||||
// Matikan kamera jika sudah aktif
|
||||
turnOffCamera(ekycStream, videoElementEkyc, startButtonEkyc);
|
||||
// Hapus hasil foto
|
||||
clearPhoto(
|
||||
fotoInputEkyc,
|
||||
document.getElementById("foto-preview-ekyc")
|
||||
);
|
||||
ekycStream = null;
|
||||
imageHolderEkyc.style.display = "block";
|
||||
captureButtonEkyc.style.display = "none";
|
||||
} else {
|
||||
// Aktifkan kamera jika belum aktif
|
||||
navigator.mediaDevices
|
||||
.getUserMedia({ video: true })
|
||||
.then(function (stream) {
|
||||
ekycStream = stream;
|
||||
turnOnCamera(ekycStream, videoElementEkyc, startButtonEkyc);
|
||||
imageHolderEkyc.style.display = "none";
|
||||
captureButtonEkyc.style.display = "block";
|
||||
})
|
||||
.catch(function (error) {
|
||||
Swal.fire({
|
||||
title: "Gagal",
|
||||
text: "Gagal mengakses kamera, karena " + error,
|
||||
icon: "error",
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
refreshButtonKtp.addEventListener("click", function () {
|
||||
// Hapus hasil foto jika tombol "Ulang Foto" ditekan
|
||||
clearPhoto(fotoInputKtp, document.getElementById("foto-preview-ktp"));
|
||||
|
||||
if (ktpStream) {
|
||||
// Matikan kamera jika sedang aktif
|
||||
turnOffCamera(ktpStream, videoElementKtp, startButtonKtp);
|
||||
ktpStream = null;
|
||||
}
|
||||
|
||||
// Menyalakan kembali kamera
|
||||
navigator.mediaDevices
|
||||
.getUserMedia({ video: true })
|
||||
.then(function (stream) {
|
||||
ktpStream = stream;
|
||||
turnOnCamera(ktpStream, videoElementKtp, startButtonKtp);
|
||||
})
|
||||
.catch(function (error) {
|
||||
Swal.fire({
|
||||
title: "Gagal",
|
||||
text: "Gagal mengakses kamera, karena " + error,
|
||||
icon: "error",
|
||||
});
|
||||
});
|
||||
refreshButtonKtp.style.display = "none";
|
||||
captureButtonKtp.style.display = "block";
|
||||
startButtonKtp.style.display = "block";
|
||||
});
|
||||
|
||||
refreshButtonEkyc.addEventListener("click", function () {
|
||||
// Hapus hasil foto jika tombol "Ulang Foto" ditekan
|
||||
clearPhoto(fotoInputEkyc, document.getElementById("foto-preview-ekyc"));
|
||||
|
||||
if (ekycStream) {
|
||||
// Matikan kamera jika sedang aktif
|
||||
turnOffCamera(ekycStream, videoElementEkyc, startButtonEkyc);
|
||||
ekycStream = null;
|
||||
}
|
||||
|
||||
// Menyalakan kembali kamera
|
||||
navigator.mediaDevices
|
||||
.getUserMedia({ video: true })
|
||||
.then(function (stream) {
|
||||
ekycStream = stream;
|
||||
turnOnCamera(ekycStream, videoElementEkyc, startButtonEkyc);
|
||||
})
|
||||
.catch(function (error) {
|
||||
Swal.fire({
|
||||
title: "Gagal",
|
||||
text: "Gagal mengakses kamera, karena " + error,
|
||||
icon: "error",
|
||||
});
|
||||
});
|
||||
refreshButtonEkyc.style.display = "none";
|
||||
captureButtonEkyc.style.display = "block";
|
||||
startButtonEkyc.style.display = "block";
|
||||
});
|
||||
|
||||
captureButtonKtp.addEventListener("click", function () {
|
||||
if (ktpStream) {
|
||||
const canvas = document.createElement("canvas");
|
||||
const context = canvas.getContext("2d");
|
||||
canvas.width = videoElementKtp.videoWidth;
|
||||
canvas.height = videoElementKtp.videoHeight;
|
||||
context.drawImage(
|
||||
videoElementKtp,
|
||||
0,
|
||||
0,
|
||||
canvas.width,
|
||||
canvas.height
|
||||
);
|
||||
const fotoDataUrl = canvas.toDataURL("image/jpeg");
|
||||
|
||||
fotoInputKtp.value = fotoDataUrl;
|
||||
|
||||
const fotoPreview = document.getElementById("foto-preview-ktp");
|
||||
fotoPreview.innerHTML =
|
||||
'<img src="' + fotoDataUrl + '" alt="Foto">';
|
||||
|
||||
// Matikan kamera setelah mengambil foto
|
||||
turnOffCamera(ktpStream, videoElementKtp, startButtonKtp);
|
||||
// Tombol ulang muncul
|
||||
refreshButtonKtp.style.display = "block";
|
||||
captureButtonKtp.style.display = "none";
|
||||
startButtonKtp.style.display = "none";
|
||||
}
|
||||
});
|
||||
|
||||
captureButtonEkyc.addEventListener("click", function () {
|
||||
if (ekycStream) {
|
||||
const canvas = document.createElement("canvas");
|
||||
const context = canvas.getContext("2d");
|
||||
canvas.width = videoElementEkyc.videoWidth;
|
||||
canvas.height = videoElementEkyc.videoHeight;
|
||||
context.drawImage(
|
||||
videoElementEkyc,
|
||||
0,
|
||||
0,
|
||||
canvas.width,
|
||||
canvas.height
|
||||
);
|
||||
const fotoDataUrl = canvas.toDataURL("image/jpeg");
|
||||
|
||||
fotoInputEkyc.value = fotoDataUrl;
|
||||
|
||||
const fotoPreview = document.getElementById("foto-preview-ekyc");
|
||||
fotoPreview.innerHTML =
|
||||
'<img src="' + fotoDataUrl + '" alt="Foto">';
|
||||
|
||||
// Matikan kamera setelah mengambil foto
|
||||
turnOffCamera(ekycStream, videoElementEkyc, startButtonEkyc);
|
||||
|
||||
refreshButtonEkyc.style.display = "block";
|
||||
captureButtonEkyc.style.display = "none";
|
||||
startButtonEkyc.style.display = "none";
|
||||
}
|
||||
});
|
||||
});
|
||||
/******************************************
|
||||
* END KTP & E-KYC CAMERA
|
||||
******************************************/
|
||||
|
||||
/******************************************
|
||||
* SLIDE KTP & E-KYC FORM 3
|
||||
******************************************/
|
||||
let slideIndex = 1;
|
||||
showSlide(slideIndex);
|
||||
|
||||
function plusSlide(n) {
|
||||
showSlide((slideIndex += n));
|
||||
}
|
||||
|
||||
function currentSlide(n) {
|
||||
showSlide((slideIndex = n));
|
||||
}
|
||||
|
||||
function showSlide(n) {
|
||||
let slides = document.querySelectorAll(".slide");
|
||||
let dots = document.querySelectorAll(".dot");
|
||||
|
||||
if (n > slides.length) {
|
||||
slideIndex = 1;
|
||||
}
|
||||
|
||||
if (n < 1) {
|
||||
slideIndex = slides.length;
|
||||
}
|
||||
|
||||
for (let i = 0; i < slides.length; i++) {
|
||||
slides[i].style.transform =
|
||||
"translateX(-" + (slideIndex - 1) * 100 + "%)";
|
||||
}
|
||||
|
||||
for (let i = 0; i < dots.length; i++) {
|
||||
dots[i].classList.remove("active");
|
||||
}
|
||||
|
||||
dots[slideIndex - 1].classList.add("active");
|
||||
}
|
||||
/******************************************
|
||||
* END SLIDE KTP & E-KYC FORM 3
|
||||
******************************************/
|
||||
|
||||
/******************************************
|
||||
* DROPDOWN SELECT GENDER
|
||||
******************************************/
|
||||
$(document).ready(function () {
|
||||
$("#gender-select").select2();
|
||||
});
|
||||
/******************************************
|
||||
* END DROPDOWN SELECT GENDER
|
||||
******************************************/
|
||||
|
||||
/******************************************
|
||||
* AJAX DROPDOWN SELECT PROVINSI, KABUPATEN & KECAMATAN
|
||||
******************************************/
|
||||
$(document).ready(function () {
|
||||
$("#selectProvince").select2({
|
||||
placeholder: "Pilih Provinsi",
|
||||
ajax: {
|
||||
url: $("#selectProvince").data("url"),
|
||||
processResults: function ({ data }) {
|
||||
return {
|
||||
results: $.map(data, function (item) {
|
||||
return {
|
||||
id: item.code,
|
||||
text: item.name,
|
||||
};
|
||||
}),
|
||||
};
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
$("#selectCity").select2({
|
||||
placeholder: "Pilih Kabupaten/Kota",
|
||||
ajax: {
|
||||
url: "", // Isi dengan URL yang sesuai
|
||||
processResults: function ({ data }) {
|
||||
return {
|
||||
results: $.map(data, function (item) {
|
||||
return {
|
||||
id: item.code,
|
||||
text: item.name,
|
||||
};
|
||||
}),
|
||||
};
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
$("#selectDistrict").select2({
|
||||
placeholder: "Pilih Kecamatan",
|
||||
ajax: {
|
||||
url: "", // Isi dengan URL yang sesuai
|
||||
processResults: function ({ data }) {
|
||||
return {
|
||||
results: $.map(data, function (item) {
|
||||
return {
|
||||
id: item.code,
|
||||
text: item.name,
|
||||
};
|
||||
}),
|
||||
};
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
$("#selectVillage").select2({
|
||||
placeholder: "Pilih Kelurahan",
|
||||
ajax: {
|
||||
url: "", // Isi dengan URL yang sesuai
|
||||
processResults: function ({ data }) {
|
||||
return {
|
||||
results: $.map(data, function (item) {
|
||||
return {
|
||||
id: item.code,
|
||||
text: item.name,
|
||||
};
|
||||
}),
|
||||
};
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
// Event Listener untuk selectProvince
|
||||
$("#selectProvince").change(function () {
|
||||
let code = $("#selectProvince").val();
|
||||
|
||||
// Mengosongkan pilihan di selectCity dan selectDistrict dan selectVillage
|
||||
$("#selectCity", "#selectDistrict", "#selectVillage").empty();
|
||||
|
||||
// Menghapus properti 'disabled' pada selectCity dan selectDistrict dan selectVillage
|
||||
$("#selectCity", "#selectDistrict", "#selectVillage").prop(
|
||||
"disable",
|
||||
false
|
||||
);
|
||||
|
||||
// Muat ulang data berdasarkan provinsi yang baru dipilih di selectProvince
|
||||
$("#selectCity").select2({
|
||||
placeholder: "Pilih Kabupaten/Kota",
|
||||
ajax: {
|
||||
url: "/cari-kota/" + code,
|
||||
processResults: function ({ data }) {
|
||||
return {
|
||||
results: $.map(data, function (item) {
|
||||
return {
|
||||
id: item.code,
|
||||
text: item.name,
|
||||
};
|
||||
}),
|
||||
};
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
// Event Listener untuk perubahan pada selectCity
|
||||
$("#selectCity").change(function () {
|
||||
let code = $("#selectCity").val();
|
||||
|
||||
// Mengosongkan pilihan di selectDistrict dan selectVillage
|
||||
$("#selectDristrict", "#selectVillage").empty();
|
||||
|
||||
// Menghapus properti 'disable' pada selectDistrict dan selectVillage
|
||||
$("#selectDistrict", "#selectVillage").prop("disabled", false);
|
||||
|
||||
// Memuat ulang data berdasarkan wilayah yang baru dipilih di selectCity
|
||||
$("#selectDistrict").select2({
|
||||
placeholder: "Pilih Kecamatan",
|
||||
ajax: {
|
||||
url: "/cari-kecamatan/" + code, // Isi dengan URL yang sesuai
|
||||
processResults: function ({ data }) {
|
||||
return {
|
||||
results: $.map(data, function (item) {
|
||||
return {
|
||||
id: item.code,
|
||||
text: item.name,
|
||||
};
|
||||
}),
|
||||
};
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
// Event Listener untuk selectDistrict
|
||||
$("#selectDistrict").change(function () {
|
||||
let code = $("#selectDistrict").val();
|
||||
|
||||
// Mengosongkan pilihan di selectVillage
|
||||
$("#selectVillage").empty();
|
||||
|
||||
// Menghapus properti 'disabled' pada selectVillage
|
||||
$("#selectVillage").prop("disabled", false);
|
||||
|
||||
// Memuat ulang data berdasarkan wilayah yang baru dipilih di selectDistrict
|
||||
$("#selectVillage").select2({
|
||||
placeholder: "Pilih Kelurahan",
|
||||
ajax: {
|
||||
url: "/cari-kelurahan/" + code, // Isi dengan URL yang sesuai
|
||||
processResults: function ({ data }) {
|
||||
return {
|
||||
results: $.map(data, function (item) {
|
||||
return {
|
||||
id: item.code,
|
||||
text: item.name,
|
||||
};
|
||||
}),
|
||||
};
|
||||
},
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
/******************************************
|
||||
* END AJAX DROPDOWN SELECT PROVINSI, KABUPATEN & KECAMATAN
|
||||
******************************************/
|