update
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(),
|
||||
// ]);
|
||||
// }
|
||||
}
|
40
app/Http/Controllers/Admin/AdminDashboardController.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?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 Illuminate\Support\Facades\Auth;
|
||||
|
||||
class AdminDashboardController extends Controller
|
||||
{
|
||||
public function index(){
|
||||
$sumSettlement = 0;
|
||||
$sumCancelled = 0;
|
||||
$sumRefund = 0;
|
||||
$currentYear = Carbon::now()->year;
|
||||
$dataChartTransaction = [];
|
||||
$dataChartRefund = [];
|
||||
for($bulan = 1; $bulan <= 12; $bulan++){
|
||||
$transaction = Transaction::whereMonth('created_at',$bulan)->whereYear('created_at', $currentYear)->sum('total_bayar');
|
||||
// $transaction = Transaction::where('status','finished')->whereMonth('created_at',$bulan)->whereYear('created_at', $currentYear)->sum('total_bayar');
|
||||
// $refund = Refund::whereMonth('created_at',$bulan)->whereYear('created_at', $currentYear)->sum('total');
|
||||
// $refund = Refund::where('status','Partial Refund')->whereMonth('created_at',$bulan)->whereYear('created_at', $currentYear)->sum('total');
|
||||
$dataChartTransaction[] = intval($transaction);
|
||||
// $dataChartRefund[] = intval($refund);
|
||||
}
|
||||
return view('admin.index',[
|
||||
"transaction"=>Transactions::allTransactions(),
|
||||
"dataChartTransaction" => $dataChartTransaction,
|
||||
// "dataChartRefund" => $dataChartRefund
|
||||
]);
|
||||
}
|
||||
|
||||
public function profile(){
|
||||
return view('admin.profile.index');
|
||||
}
|
||||
}
|
73
app/Http/Controllers/Admin/AdminRefundController.php
Normal file
@ -0,0 +1,73 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Models\Refund;
|
||||
use App\Models\Refunds;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class AdminRefundController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
// $refundData = Refund::all();
|
||||
// return view('Admin.refund.history-refund', ['history_refund' => $refundData]);
|
||||
return view('admin.refund.index',[
|
||||
"refunds" => Refunds::HistoryRefund()
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*/
|
||||
public function show(Refund $refund)
|
||||
{
|
||||
return view('admin.refund.detail-refund',[
|
||||
"detail_refund"=> Refunds::DetailRefund()
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit(Refund $refund)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, Refund $refund)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy(Refund $refund)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
101
app/Http/Controllers/Admin/AdminSettingController.php
Normal file
@ -0,0 +1,101 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Models\Setting;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
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)
|
||||
{
|
||||
// dd($request->persentase);
|
||||
[$tahun, $bulan] = explode('-', $request->bulan_tahun);
|
||||
Setting::create([
|
||||
'bulan' => $bulan,
|
||||
'tahun' => $tahun,
|
||||
'persentase' => $request->persentase,
|
||||
'status' => 'Active',
|
||||
]);
|
||||
return redirect()->route('admin-setting.index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*/
|
||||
public function show(Setting $setting)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit(Setting $setting)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
// dd($setting['status'] );
|
||||
$setting = Setting::findOrFail($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,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
// return response()->json($id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy(Setting $setting)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
71
app/Http/Controllers/Admin/AdminTransactionController.php
Normal file
@ -0,0 +1,71 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Models\Transaction;
|
||||
use App\Models\Transactions;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class AdminTransactionController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return view('admin.transaction.index', [
|
||||
'transactions' => Transaction::all(),
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*/
|
||||
public function show(transaction $transaction)
|
||||
{
|
||||
return view('admin.transaction.detail-transaction',[
|
||||
'detail_transaction' => Transactions::allDetailTransactions()
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit(transaction $transaction)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, transaction $transaction)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy(transaction $transaction)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
127
app/Http/Controllers/Admin/AdminUserController.php
Normal file
@ -0,0 +1,127 @@
|
||||
<?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("FIELD(status, 'Progress', 'Finished', 'Rejected') ASC")
|
||||
// ->latest()
|
||||
// ->get();
|
||||
$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]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
$user = User::find($id);
|
||||
return view('admin.users.detail-user', ['user' => $user]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit(User $user)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
return response()->json([
|
||||
'user' => $request,
|
||||
'id' => $id,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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,
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
352
app/Http/Controllers/Login/LoginController.php
Normal file
@ -0,0 +1,352 @@
|
||||
<?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
|
||||
{
|
||||
// /**
|
||||
// * Create a new AuthController instance.
|
||||
// *
|
||||
// * @return void
|
||||
// */
|
||||
// public function __construct()
|
||||
// {
|
||||
// $this->middleware('auth:api', ['except' => ['login', 'authenticate', 'register', 'hai']]);
|
||||
// }
|
||||
|
||||
public function login()
|
||||
{
|
||||
return view('index');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a JWT via given credentials.
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function authenticate(Request $request)
|
||||
{
|
||||
// dd($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()->route('admin.index');
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
// $error = $credentials->errors();
|
||||
// ->withInput($request->except('key'))
|
||||
// ->withErrors($validator)
|
||||
|
||||
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_profil' => 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 statusAkun($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 cariProvinsi()
|
||||
{
|
||||
$data = Province::where('name', 'LIKE', '%' . strtoupper(request('q')) . '%')->paginate(10);
|
||||
|
||||
return response()->json($data);
|
||||
}
|
||||
|
||||
public function cariKota($code)
|
||||
{
|
||||
$data = City::where('province_code', $code)
|
||||
->where('name', 'LIKE', '%' . strtoupper(request('q')) . '%')
|
||||
->paginate(10);
|
||||
|
||||
return response()->json($data);
|
||||
}
|
||||
|
||||
public function cariKecamatan($code)
|
||||
{
|
||||
$data = District::where('city_code', $code)
|
||||
->where('name', 'LIKE', '%' . strtoupper(request('q')) . '%')
|
||||
->paginate(10);
|
||||
|
||||
return response()->json($data);
|
||||
}
|
||||
|
||||
public function cariKelurahan($code)
|
||||
{
|
||||
$data = Village::where('district_code', $code)
|
||||
->where('name', 'LIKE', '%' . strtoupper(request('q')) . '%')
|
||||
->paginate(10);
|
||||
|
||||
return response()->json($data);
|
||||
}
|
||||
|
||||
public function kirimKodeVerifikasi(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
|
||||
}
|
||||
}
|
@ -2,11 +2,10 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Refund;
|
||||
use App\Http\Requests\StoreRefundRequest;
|
||||
use App\Http\Requests\UpdateRefundRequest;
|
||||
use App\Models\RefundDescription;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class RefundController extends Controller
|
||||
class RefundDescriptionController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
@ -27,7 +26,7 @@ class RefundController extends Controller
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(StoreRefundRequest $request)
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
@ -35,7 +34,7 @@ class RefundController extends Controller
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*/
|
||||
public function show(Refund $refund)
|
||||
public function show(RefundDescription $refundDescription)
|
||||
{
|
||||
//
|
||||
}
|
||||
@ -43,7 +42,7 @@ class RefundController extends Controller
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit(Refund $refund)
|
||||
public function edit(RefundDescription $refundDescription)
|
||||
{
|
||||
//
|
||||
}
|
||||
@ -51,7 +50,7 @@ class RefundController extends Controller
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(UpdateRefundRequest $request, Refund $refund)
|
||||
public function update(Request $request, RefundDescription $refundDescription)
|
||||
{
|
||||
//
|
||||
}
|
||||
@ -59,7 +58,7 @@ class RefundController extends Controller
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy(Refund $refund)
|
||||
public function destroy(RefundDescription $refundDescription)
|
||||
{
|
||||
//
|
||||
}
|
@ -2,11 +2,10 @@
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\transaction;
|
||||
use App\Http\Requests\StoretransactionRequest;
|
||||
use App\Http\Requests\UpdatetransactionRequest;
|
||||
use App\Models\TransactionDescription;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class TransactionController extends Controller
|
||||
class TransactionDescriptionController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
@ -27,7 +26,7 @@ class TransactionController extends Controller
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function store(StoretransactionRequest $request)
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
@ -35,7 +34,7 @@ class TransactionController extends Controller
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*/
|
||||
public function show(transaction $transaction)
|
||||
public function show(TransactionDescription $transactionDescription)
|
||||
{
|
||||
//
|
||||
}
|
||||
@ -43,7 +42,7 @@ class TransactionController extends Controller
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit(transaction $transaction)
|
||||
public function edit(TransactionDescription $transactionDescription)
|
||||
{
|
||||
//
|
||||
}
|
||||
@ -51,7 +50,7 @@ class TransactionController extends Controller
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(UpdatetransactionRequest $request, transaction $transaction)
|
||||
public function update(Request $request, TransactionDescription $transactionDescription)
|
||||
{
|
||||
//
|
||||
}
|
||||
@ -59,7 +58,7 @@ class TransactionController extends Controller
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy(transaction $transaction)
|
||||
public function destroy(TransactionDescription $transactionDescription)
|
||||
{
|
||||
//
|
||||
}
|
144
app/Http/Controllers/User/UserContactController.php
Normal file
@ -0,0 +1,144 @@
|
||||
<?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]);
|
||||
// dd($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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* 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',
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*/
|
||||
public function show(Contact $contact)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit(Contact $contact)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(Request $request, Contact $contact)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy(Contact $contact, $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)->get();
|
||||
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;
|
||||
|
||||
class UserDashboardController extends Controller
|
||||
{
|
||||
public function index(){
|
||||
return view('user.index',[
|
||||
"refundUserss"=>RefundUser::HistoryRefundUser()
|
||||
]);
|
||||
}
|
||||
|
||||
public function profile(){
|
||||
return view('user.profile.index');
|
||||
}
|
||||
}
|
30
app/Http/Controllers/User/UserRefundController.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\User;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\RefundUser;
|
||||
|
||||
class UserRefundController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
return view('user.refund.index', [
|
||||
'name' => 'npannisa',
|
||||
'refundUserss' => RefundUser::HistoryRefundUser(),
|
||||
]);
|
||||
}
|
||||
|
||||
public function createRefund(Request $request)
|
||||
{
|
||||
return view('user.refund.new-refund');
|
||||
}
|
||||
|
||||
public function historyRefund($id){
|
||||
return view('user.transaction.pembeli.history-refund',[
|
||||
'name'=>'npannisa',
|
||||
"refundUserss"=>RefundUser::HistoryRefundUser()
|
||||
]);
|
||||
}
|
||||
}
|
280
app/Http/Controllers/User/UserTransactionController.php
Normal file
@ -0,0 +1,280 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\User;
|
||||
|
||||
use App\Models\Transaction;
|
||||
use App\Models\TransactionDescription;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Setting;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\TransactionUser;
|
||||
use App\Models\User;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Ramsey\Uuid\Uuid;
|
||||
use Midtrans\Config;
|
||||
use Midtrans\Snap;
|
||||
use Midtrans\Transaction as Trans;
|
||||
|
||||
class UserTransactionController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
|
||||
public function indexPembeli()
|
||||
{
|
||||
return view('user.transaction.pembeli.index', [
|
||||
'transactions' => Transaction::where('pembeli', Auth::user()->email)
|
||||
->latest()
|
||||
->get(),
|
||||
]);
|
||||
// dd(Transaction::where('pembeli',Auth::user()->email)->get());
|
||||
}
|
||||
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*/
|
||||
public function indexPenjual()
|
||||
{
|
||||
return view('user.transaction.penjual.index', [
|
||||
'transactions' => Transaction::where('penjual', Auth::user()->email)->get(),
|
||||
]);
|
||||
}
|
||||
|
||||
public function detailTransaction($id)
|
||||
{
|
||||
return view('user.transaction.pembeli.detail-transaction', [
|
||||
'transaction' => Transaction::findOrFail($id),
|
||||
'trackings' => TransactionDescription::where('order_id', $id)->get(),
|
||||
]);
|
||||
|
||||
// dd(Transaction::findOrFail($id));
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*/
|
||||
public function createTransaction(Request $request)
|
||||
{
|
||||
return view('user.transaction.pembeli.new-transaction');
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*/
|
||||
public function invoiceTransaction($id)
|
||||
{
|
||||
return view('user.transaction.pembeli.invoice-transaction', [
|
||||
'name' => 'npannisa',
|
||||
'TransactionUser' => TransactionUser::HistoryTransaction(),
|
||||
]);
|
||||
}
|
||||
|
||||
public function storeTransaction(Request $request)
|
||||
{
|
||||
$pembeli = Auth::user()->email;
|
||||
$penjual = $request->get('email_penjual');
|
||||
$nama_barang = $request->get('nama_barang');
|
||||
$satuan_barang = $request->get('satuan_barang');
|
||||
$deskripsi_transaksi = $request->get('deskripsi');
|
||||
$harga_barang = $request->get('harga_barang');
|
||||
$jumlah_barang = $request->get('jumlah_barang');
|
||||
|
||||
$nama_depan_pembeli = Auth::user()->nama_depan;
|
||||
$nama_belakang_pembeli = Auth::user()->nama_belakang;
|
||||
$nohp_pembeli = Auth::user()->nohp;
|
||||
$nama_penjual = User::where('email', $penjual)->value('nama_depan');
|
||||
$alamat = ucwords(strtolower(Auth::user()->alamat));
|
||||
$id = Uuid::uuid4();
|
||||
|
||||
$now = Carbon::now()->tz('Asia/Jakarta');
|
||||
$bulan = $now->format('F');
|
||||
$tahun = $now->year;
|
||||
|
||||
// $persentase_keuntungan = Setting::where('status','Active')
|
||||
// ->where('bulan','=',$bulan)
|
||||
// ->where('tahun','=',$tahun)->get();
|
||||
$persentase_keuntungan = $request->get('persentase_keuntungan');
|
||||
|
||||
$total_harga = $request->get('total_harga');
|
||||
$total_keuntungan = $request->get('total_keuntungan');
|
||||
$total_bayar = $request->get('total_bayar');
|
||||
|
||||
$batas_pembayaran = $now->addDays(1)->toDateTimeString();
|
||||
$batas_pengiriman_barang_awal = $now->addDays(2)->toDateTimeString();
|
||||
$batas_pengiriman_barang_akhir = $now->addDays(5)->toDateTimeString();
|
||||
|
||||
$params = [
|
||||
'transaction_details' => [
|
||||
'order_id' => $id,
|
||||
'gross_amount' => $total_bayar,
|
||||
],
|
||||
'item_details' => [
|
||||
[
|
||||
'id' => $nama_barang . time(),
|
||||
'price' => $harga_barang,
|
||||
'quantity' => $jumlah_barang,
|
||||
'name' => $nama_barang,
|
||||
],
|
||||
[
|
||||
'id' => 'BA01',
|
||||
'price' => $total_keuntungan,
|
||||
'quantity' => 1,
|
||||
'name' => 'Biaya Admin',
|
||||
],
|
||||
],
|
||||
'customer_details' => [
|
||||
'firts_name' => $nama_depan_pembeli,
|
||||
'last_name' => $nama_belakang_pembeli,
|
||||
'email' => $pembeli,
|
||||
'phone' => $nohp_pembeli,
|
||||
'billing' => [
|
||||
'first_name' => $nama_depan_pembeli,
|
||||
'last_name' => $nama_belakang_pembeli,
|
||||
'email' => $pembeli,
|
||||
'phone' => $nohp_pembeli,
|
||||
'address' => Auth::user()->alamat,
|
||||
'city' => Auth::user()->village->district->city->name,
|
||||
'country_code' => 'IDN',
|
||||
],
|
||||
],
|
||||
'callbacks' => [
|
||||
'finish' => 'http://127.0.0.1:8000/user/user-transaction-pembeli/',
|
||||
],
|
||||
'expiry' => [
|
||||
'start_time' => $now->format('Y-m-d H:i:s P'),
|
||||
'unit' => 'hours',
|
||||
'duration' => 24,
|
||||
],
|
||||
];
|
||||
|
||||
Config::$serverKey = 'SB-Mid-server-8rydZAwKoWuoQ6g_3ot0-K7p';
|
||||
Config::$isProduction = false;
|
||||
// Set sanitization on (default)
|
||||
Config::$isSanitized = true;
|
||||
// Set 3DS transaction for credit card to true
|
||||
Config::$is3ds = true;
|
||||
|
||||
$snap_token = Snap::getSnapToken($params);
|
||||
$token = $snap_token;
|
||||
$status = 'pending';
|
||||
$query = Transaction::create([
|
||||
'id' => $id,
|
||||
'pembeli' => $pembeli,
|
||||
'penjual' => $penjual,
|
||||
'nama_barang' => $nama_barang,
|
||||
'deskripsi_transaksi' => $deskripsi_transaksi,
|
||||
'satuan_barang' => $satuan_barang,
|
||||
'harga_barang' => $harga_barang,
|
||||
'jumlah_barang' => $jumlah_barang,
|
||||
'persentase_keuntungan' => $persentase_keuntungan,
|
||||
'total_keuntungan' => $total_keuntungan,
|
||||
'total_harga' => $total_harga,
|
||||
'total_bayar' => $total_bayar,
|
||||
'token' => $token,
|
||||
'status' => $status,
|
||||
'batas_pembayaran' => $batas_pembayaran,
|
||||
'batas_pengiriman_barang_awal' => $batas_pengiriman_barang_awal,
|
||||
'batas_pengiriman_barang_akhir' => $batas_pengiriman_barang_akhir,
|
||||
]);
|
||||
|
||||
if ($query) {
|
||||
TransactionDescription::create([
|
||||
'order_id' => $id,
|
||||
'status' => $status,
|
||||
'user' => $pembeli,
|
||||
'judul' => 'fa fa-plus',
|
||||
'background' => 'bg-buyer',
|
||||
'deskripsi' => $nama_depan_pembeli . ' telah membuat transaksi baru dengan ' . $nama_penjual,
|
||||
]);
|
||||
return response()->json([
|
||||
'status' => true,
|
||||
'message' => 'Berhasil menambahkan transaksi. Silahkan lakukan pembayaran.',
|
||||
]);
|
||||
} else {
|
||||
return response()->json([
|
||||
'status' => false,
|
||||
'message' => 'Gagal menambahkan transaksi.',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
public function updateStatusTransaction(Request $request)
|
||||
{
|
||||
}
|
||||
|
||||
public function acceptTransaction(Request $request)
|
||||
{
|
||||
}
|
||||
|
||||
public function paymentTransaction(Request $request, $id)
|
||||
{
|
||||
Config::$serverKey = 'SB-Mid-server-8rydZAwKoWuoQ6g_3ot0-K7p';
|
||||
Config::$isProduction = false;
|
||||
// Set sanitization on (default)
|
||||
Config::$isSanitized = true;
|
||||
// Set 3DS transaction for credit card to true
|
||||
Config::$is3ds = true;
|
||||
|
||||
$payment = Trans::status($id);
|
||||
$result = json_decode(json_encode($payment), true);
|
||||
$query = Transaction::where('id', $id)->update([
|
||||
'acquire' => $result['acquirer'],
|
||||
'currency' => $result['currency'],
|
||||
'fraud_status' => $result['fraud_status'],
|
||||
'issuer' => $result['issuer'],
|
||||
'merchant_id' => $result['merchant_id'],
|
||||
'metode_pembayaran' => $result['payment_type'],
|
||||
'tanggal_pembayaran' => $result['settlement_time'],
|
||||
'signature_key' => $result['signature_key'],
|
||||
'status' => $result['transaction_status'],
|
||||
'tipe_transaction' => $result['transaction_type'],
|
||||
'status_code' => $result['status_code'],
|
||||
]);
|
||||
if ($query) {
|
||||
return response()->json([
|
||||
'status' => true,
|
||||
'message' => 'Pembayaran sukses. Proses akan dilanjutkan ke penjual',
|
||||
]);
|
||||
} else {
|
||||
return response()->json([
|
||||
'status' => false,
|
||||
'message' => 'Pembayaran gagal',
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 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(Request $request, Transaction $transaction)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy(Transaction $transaction)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
@ -1,66 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Users;
|
||||
use App\Http\Requests\StoreUsersRequest;
|
||||
use App\Http\Requests\UpdateUsersRequest;
|
||||
|
||||
class UsersController 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(StoreUsersRequest $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*/
|
||||
public function show(Users $users)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*/
|
||||
public function edit(Users $users)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*/
|
||||
public function update(UpdateUsersRequest $request, Users $users)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*/
|
||||
public function destroy(Users $users)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
@ -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);
|
||||
}
|
||||
}
|
28
app/Http/Requests/StoreSettingRequest.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class StoreSettingRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
28
app/Http/Requests/UpdateSettingRequest.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class UpdateSettingRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*/
|
||||
public function authorize(): bool
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, \Illuminate\Contracts\Validation\ValidationRule|array|string>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
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');
|
||||
}
|
||||
}
|
32
app/Models/Contact.php
Normal file
@ -0,0 +1,32 @@
|
||||
<?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',
|
||||
];
|
||||
|
||||
//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,67 +5,25 @@ namespace App\Models;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Refund
|
||||
class Refund extends Model
|
||||
{
|
||||
private static $history_refund=[
|
||||
[
|
||||
"orderId" => "INV-1234",
|
||||
"customer" => "Okta",
|
||||
"seller" => "dodo",
|
||||
"total" => "Rp. 15000",
|
||||
"date" => "July 19, 2023 ",
|
||||
"status"=>"Process Refund"
|
||||
],
|
||||
[
|
||||
"orderId" => "INV-0000",
|
||||
"customer" => "Selvi",
|
||||
"seller" => "dedo",
|
||||
"total" => "Rp. 11000",
|
||||
"date" => "August 19, 2023 ",
|
||||
"status"=>"Process Refund"
|
||||
],
|
||||
[
|
||||
"orderId" => "INV-2313",
|
||||
"customer" => "Septa",
|
||||
"seller" => "dido",
|
||||
"total" => "Rp. 15000",
|
||||
"date" => "July 29, 2023 ",
|
||||
"status"=>"Process Refund"
|
||||
],
|
||||
[
|
||||
"orderId" => "INV-5664",
|
||||
"customer" => "Padia",
|
||||
"seller" => "dedo",
|
||||
"total" => "Rp. 14000",
|
||||
"date" => "July 18, 2023 ",
|
||||
"status"=>"Process Refund"
|
||||
],
|
||||
[
|
||||
"orderId" => "INV-9090",
|
||||
"customer" => "hantu",
|
||||
"seller" => "dado",
|
||||
"total" => "Rp. 45000",
|
||||
"date" => "June 19, 2023 ",
|
||||
"status"=>"Process Refund"
|
||||
]
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'order_id',
|
||||
'total',
|
||||
'due_date',
|
||||
'status',
|
||||
];
|
||||
|
||||
public static $detail_refund=[
|
||||
[
|
||||
"orderId" => "INV-9090",
|
||||
"customer" => "hantu",
|
||||
"seller" => "dado",
|
||||
"total" => "Rp. 45000",
|
||||
"date" => "June 19, 2023 ",
|
||||
"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;
|
||||
//Relasi
|
||||
public function orders(){
|
||||
return $this->belongsTo(Transaction::class, 'id', 'order_id');
|
||||
}
|
||||
//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;
|
||||
}
|
||||
}
|
23
app/Models/Setting.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Setting extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'bulan',
|
||||
'tahun',
|
||||
'persentase',
|
||||
'status',
|
||||
];
|
||||
}
|
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;
|
||||
}
|
||||
}
|
35
app/Models/TransactionDescription.php
Normal file
@ -0,0 +1,35 @@
|
||||
<?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',
|
||||
'background',
|
||||
'deskripsi'
|
||||
];
|
||||
|
||||
//Relasi
|
||||
public function order(){
|
||||
return $this->belongsTo(Transaction::class, 'id', 'order_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_profil',
|
||||
'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,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Users
|
||||
{
|
||||
private static $list_users=[
|
||||
[
|
||||
"userId" => "U1290",
|
||||
"nik" => "214141413414131414",
|
||||
"fullname" => "Tsalsabila Jilhan Haura",
|
||||
"email" => "jilhanhaura07@gmail.com",
|
||||
"gender" => "Female",
|
||||
"date" => "August 23, 2023",
|
||||
"status" => "Finished"
|
||||
]
|
||||
];
|
||||
public static function listUsers(){
|
||||
return self::$list_users;
|
||||
}
|
||||
}
|
@ -5,73 +5,57 @@ namespace App\Models;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class transaction
|
||||
class Transaction extends Model
|
||||
{
|
||||
private static $list_transaction =[
|
||||
[
|
||||
"orderId" => "INV-1234",
|
||||
"customer" => "Jilhan",
|
||||
"seller" => "dodo",
|
||||
"total" => "Rp. 15000",
|
||||
"date" => "July 19, 2023 ",
|
||||
"status"=>"paid"
|
||||
],
|
||||
[
|
||||
"orderId" => "INV-0000",
|
||||
"customer" => "hmmm",
|
||||
"seller" => "dodo",
|
||||
"total" => "Rp. 11000",
|
||||
"date" => "August 19, 2023 ",
|
||||
"status"=>"pending"
|
||||
],
|
||||
[
|
||||
"orderId" => "INV-2313",
|
||||
"customer" => "nurul",
|
||||
"seller" => "dido",
|
||||
"total" => "Rp. 15000",
|
||||
"date" => "July 29, 2023 ",
|
||||
"status"=>"unpaid"
|
||||
],
|
||||
[
|
||||
"orderId" => "INV-5664",
|
||||
"customer" => "raihan",
|
||||
"seller" => "dedo",
|
||||
"total" => "Rp. 14000",
|
||||
"date" => "July 18, 2023 ",
|
||||
"status"=>"pending"
|
||||
],
|
||||
[
|
||||
"orderId" => "INV-9090",
|
||||
"customer" => "testing",
|
||||
"seller" => "dado",
|
||||
"total" => "Rp. 45000",
|
||||
"date" => "June 19, 2023 ",
|
||||
"status"=>"paid"
|
||||
]
|
||||
use HasFactory;
|
||||
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array<int, string>
|
||||
*/
|
||||
protected $fillable = [
|
||||
'id',
|
||||
'pembeli',
|
||||
'penjual',
|
||||
'nama_barang',
|
||||
'deskripsi_transaksi',
|
||||
'satuan_barang',
|
||||
'harga_barang',
|
||||
'jumlah_barang',
|
||||
'persentase_keuntungan',
|
||||
'total_keuntungan',
|
||||
'total_harga',
|
||||
'total_bayar',
|
||||
'token',
|
||||
'status',
|
||||
'batas_pembayaran',
|
||||
'batas_pengiriman_barang_awal',
|
||||
'batas_pengiriman_barang_akhir',
|
||||
];
|
||||
|
||||
private static $detail_transaction=[
|
||||
[
|
||||
"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, 'order_id', 'id');
|
||||
}
|
||||
//Relasi
|
||||
}
|
66
app/Policies/SettingPolicy.php
Normal file
@ -0,0 +1,66 @@
|
||||
<?php
|
||||
|
||||
namespace App\Policies;
|
||||
|
||||
use App\Models\Setting;
|
||||
use App\Models\User;
|
||||
use Illuminate\Auth\Access\Response;
|
||||
|
||||
class SettingPolicy
|
||||
{
|
||||
/**
|
||||
* Determine whether the user can view any models.
|
||||
*/
|
||||
public function viewAny(User $user): bool
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can view the model.
|
||||
*/
|
||||
public function view(User $user, Setting $setting): bool
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can create models.
|
||||
*/
|
||||
public function create(User $user): bool
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can update the model.
|
||||
*/
|
||||
public function update(User $user, Setting $setting): bool
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can delete the model.
|
||||
*/
|
||||
public function delete(User $user, Setting $setting): bool
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can restore the model.
|
||||
*/
|
||||
public function restore(User $user, Setting $setting): bool
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine whether the user can permanently delete the model.
|
||||
*/
|
||||
public function forceDelete(User $user, Setting $setting): bool
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
@ -2,14 +2,25 @@
|
||||
"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",
|
||||
"thiagoalessio/tesseract_ocr": "^2.12",
|
||||
"tymon/jwt-auth": "^2.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"fakerphp/faker": "^1.9.1",
|
||||
|
1223
composer.lock
generated
@ -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\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 [
|
||||
//
|
||||
];
|
||||
}
|
||||
}
|
@ -12,13 +12,28 @@ 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')->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);
|
||||
$table->string('alamat',255);
|
||||
$table->string('foto_ktp')->nullable();
|
||||
$table->string('foto_wajah')->nullable();
|
||||
$table->string('foto_profil')->nullable();
|
||||
$table->string('persentase_kemiripan')->nullable();
|
||||
$table->enum('status',['Finished','Progress','Rejected'])->default('Progress');
|
||||
$table->string('gender',15);
|
||||
$table->char('kode_kelurahan',10);
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
|
||||
// $table->foreign('kode_kelurahan')->on('villages')->references('code');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,34 @@
|
||||
<?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();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop(config('laravolt.indonesia.table_prefix').'provinces');
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
<?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');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop(config('laravolt.indonesia.table_prefix').'cities');
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
<?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');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::drop(config('laravolt.indonesia.table_prefix').'districts');
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
<?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');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 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\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('transactions', function (Blueprint $table) {
|
||||
$table->uuid('id')->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->string('acquire')->nullable();
|
||||
$table->string('issuer')->nullable();
|
||||
$table->char('currency',3)->nullable();
|
||||
$table->string('fraud_status')->nullable();
|
||||
$table->string('merchant_id')->nullable();
|
||||
$table->string('status_code')->nullable();
|
||||
$table->string('tipe_transaction')->nullable();
|
||||
$table->enum('status',['settlement','capture','pending','cancel','refund','expire','failure','progress','failed','sending','sended','finished'])->default('pending'); // transaction_status
|
||||
$table->timestamp('batas_pembayaran');
|
||||
$table->timestamp('batas_pengiriman_barang_awal');
|
||||
$table->timestamp('batas_pengiriman_barang_akhir');
|
||||
$table->timestamp('tanggal_pembayaran')->nullable();
|
||||
$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');
|
||||
}
|
||||
};
|
@ -13,7 +13,12 @@ return new class extends Migration
|
||||
{
|
||||
Schema::create('refunds', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignUuid('order_id');
|
||||
$table->double('total',10);
|
||||
$table->timestamp('due_date');
|
||||
$table->enum('status',['partial refund','deny','pending'])->default('Pending');
|
||||
$table->timestamps();
|
||||
$table->foreign('order_id')->on('transactions')->references('id');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -11,8 +11,12 @@ return new class extends Migration
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('transactions', function (Blueprint $table) {
|
||||
Schema::create('settings', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('bulan',20);
|
||||
$table->string('tahun',5);
|
||||
$table->integer('persentase');
|
||||
$table->enum('status',['Active', 'Nonactive']);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
@ -22,6 +26,6 @@ return new class extends Migration
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('transactions');
|
||||
Schema::dropIfExists('settings');
|
||||
}
|
||||
};
|
@ -0,0 +1,32 @@
|
||||
<?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('contacts', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$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,36 @@
|
||||
<?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('order_id');
|
||||
$table->string('status',15);
|
||||
$table->string('user');
|
||||
$table->string('background');
|
||||
$table->string('judul');
|
||||
$table->string('deskripsi');
|
||||
$table->timestamps();
|
||||
|
||||
$table->foreign('order_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('users', function (Blueprint $table) {
|
||||
Schema::create('refund_descriptions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('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('users');
|
||||
Schema::dropIfExists('refund_descriptions');
|
||||
}
|
||||
};
|
@ -4,6 +4,16 @@ namespace Database\Seeders;
|
||||
|
||||
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\User;
|
||||
use Carbon\Carbon;
|
||||
use App\Models\Setting;
|
||||
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 +22,39 @@ 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($format = 'Y-m-d', $max = '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',
|
||||
]);
|
||||
User::factory(20)->create();
|
||||
|
||||
$now = Carbon::now()->tz('Asia/Jakarta');
|
||||
$bulan = $now->format('F');
|
||||
$tahun = $now->year;
|
||||
Setting::create([
|
||||
'bulan' => $bulan,
|
||||
'tahun' => $tahun,
|
||||
'persentase' => 5,
|
||||
'status' => 'Active'
|
||||
]);
|
||||
|
||||
$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 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
|
1075
package-lock.json
generated
Normal file
@ -9,5 +9,8 @@
|
||||
"axios": "^1.1.2",
|
||||
"laravel-vite-plugin": "^0.8.0",
|
||||
"vite": "^4.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"datatables.net-dt": "^1.13.6"
|
||||
}
|
||||
}
|
||||
|
@ -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/bg-web.png
Normal file
After Width: | Height: | Size: 10 KiB |
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 |
26
public/assets/images/illustration_backgrounds.svg
Normal file
@ -0,0 +1,26 @@
|
||||
<svg width="1181" height="244" viewBox="0 0 1181 244" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<mask id="mask0_227_12316" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="2" y="2" width="1179" height="242">
|
||||
<path d="M2.8894 2.35156H1181V243.142H2.8894V2.35156Z" fill="white"/>
|
||||
</mask>
|
||||
<g mask="url(#mask0_227_12316)">
|
||||
<path d="M1047.44 17.0875C1000.64 13.9376 966.174 38.9274 930.591 63.2079C886.889 93.0366 837.228 111.561 782.195 95.7215C733.176 81.6131 695.878 46.0322 650.202 24.7491C604.332 3.37598 549.896 -2.843 499.505 7.53667C471.21 13.3679 444.55 24.1316 417.42 33.3847C286.246 78.1415 140.375 101.152 3.34485 73.9184V242.829H1180.92V49.9374C1119.63 42.2464 1093.74 20.2007 1047.44 17.0875Z" fill="#BA2760"/>
|
||||
</g>
|
||||
<mask id="mask1_227_12316" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="1181" height="244">
|
||||
<path d="M0 0H1181V243.143H0V0Z" fill="white"/>
|
||||
</mask>
|
||||
<g mask="url(#mask1_227_12316)">
|
||||
<path d="M1180.92 126.055C1120.33 126.752 1051.84 122.492 993.029 113.329C965.292 109.008 937.504 103.523 911.953 92.9371C878.967 79.2697 850.169 57.3029 815.202 48.4247C785.959 40.9983 753.686 43.5951 726.394 55.5754C700.444 66.9659 679.614 86.0914 654.123 98.2813C615.362 116.81 569.504 117.787 525.578 118.34C465.212 119.098 401.172 119.004 349.667 90.7961C299.114 63.1139 263.649 9.92367 205.131 1.54533C167.852 -3.79152 131.066 11.0502 96.9417 25.5134C65.7421 38.7379 34.5466 51.9624 3.34695 65.1869V242.828H-0.0294189H1180.92V126.055Z" fill="#A10949"/>
|
||||
</g>
|
||||
<mask id="mask2_227_12316" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="2" y="66" width="1179" height="178">
|
||||
<path d="M2.8894 66.8062H1181V243.143H2.8894V66.8062Z" fill="white"/>
|
||||
</mask>
|
||||
<g mask="url(#mask2_227_12316)">
|
||||
<path d="M1176.51 108.389C1149.17 95.7745 1120.38 82.7264 1089.45 79.2549C1056.69 75.5757 1028.02 88.7561 999.993 102.401C940.96 131.14 823.249 186.828 758.371 145.317C742.628 135.248 732.954 119.329 719.086 107.246C618.726 19.8181 495.283 96.471 394.189 134.843C354.655 149.849 310.079 160.625 266.999 154.675C188.409 143.825 117.684 85.5309 3.34485 88.2765V242.828H1180.92V110.624C1179.46 109.804 1177.96 109.056 1176.51 108.389Z" fill="#900C3F"/>
|
||||
</g>
|
||||
<mask id="mask3_227_12316" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="2" y="139" width="1179" height="105">
|
||||
<path d="M2.8894 139.258H1181V243.143H2.8894V139.258Z" fill="white"/>
|
||||
</mask>
|
||||
<g mask="url(#mask3_227_12316)">
|
||||
<path d="M1180.82 213.266C1119.27 219.913 1062.06 182.737 1000.24 178.531C959.072 175.73 918.199 187.734 876.928 186.709C793.596 184.634 716.622 130.023 634.201 141.231C595.196 146.539 560.446 166.221 522.163 174.765C427.877 195.805 331.776 147.074 234.606 146.778C161.556 146.555 74.6445 171.731 3.34485 156.233V242.828H1180.92L1180.82 213.266Z" fill="#900C3F"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.7 KiB |
BIN
public/assets/images/sampul.jpg
Normal file
After Width: | Height: | Size: 52 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 |
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
|
||||
******************************************/
|
5791
public/assets/js/login_register/jquery.js
vendored
Normal file
70
public/assets/js/login_register/script.js
Normal file
@ -0,0 +1,70 @@
|
||||
/******************************************
|
||||
* PROGRESS BAR MULTIPLE FORM
|
||||
******************************************/
|
||||
"use strict";
|
||||
//jQuery time
|
||||
var current_fs, next_fs, previous_fs; //fieldsets
|
||||
var left, opacity, scale; //fieldset properties which we will animate
|
||||
var animating; //flag to prevent quick multi-click glitches
|
||||
|
||||
$(".next").click(function () {
|
||||
if (animating) return false;
|
||||
animating = true;
|
||||
|
||||
current_fs = $(this).parent();
|
||||
next_fs = $(this).parent().next();
|
||||
|
||||
//activate next step on progressbar using the index of next_fs
|
||||
$("#progressbar li").eq($("fieldset").index(next_fs)).addClass("active");
|
||||
|
||||
//show the next fieldset
|
||||
next_fs.show();
|
||||
});
|
||||
|
||||
$(".previous").click(function () {
|
||||
if (animating) return false;
|
||||
animating = true;
|
||||
|
||||
current_fs = $(this).parent();
|
||||
previous_fs = $(this).parent().prev();
|
||||
|
||||
//de-activate current step on progressbar
|
||||
$("#progressbar li")
|
||||
.eq($("fieldset").index(current_fs))
|
||||
.removeClass("active");
|
||||
});
|
||||
/******************************************
|
||||
* END PROGRESS BAR MULTIPLE FORM
|
||||
******************************************/
|
||||
|
||||
/******************************************
|
||||
* HIDE & SEE PASSWORD PIN DAN KONFIR PIN
|
||||
******************************************/
|
||||
function togglePinVisibility() {
|
||||
var pin = document.getElementById("pin");
|
||||
var toggleIconPin = document.getElementById("toggle-pin");
|
||||
|
||||
if (pin.type === "password") {
|
||||
pin.type = "text";
|
||||
toggleIconPin.className = "fa fa-eye-slash password-toggle-icon";
|
||||
} else {
|
||||
pin.type = "password";
|
||||
toggleIconPin.className = "fa fa-eye password-toggle-icon";
|
||||
}
|
||||
}
|
||||
|
||||
function toggleKonfirPinVisibility() {
|
||||
var pin = document.getElementById("konfir-pin");
|
||||
var toggleIconKonfirPin = document.getElementById("toggle-konfir-pin");
|
||||
|
||||
if (pin.type === "password") {
|
||||
pin.type = "text";
|
||||
toggleIconKonfirPin.className = "fa fa-eye-slash password-toggle-icon";
|
||||
} else {
|
||||
pin.type = "password";
|
||||
toggleIconKonfirPin.className = "fa fa-eye password-toggle-icon";
|
||||
}
|
||||
}
|
||||
/******************************************
|
||||
* END HIDE & SEE PASSWORD PIN DAN KONFIR PIN
|
||||
******************************************/
|
321
public/assets/js/main.js
Normal file
@ -0,0 +1,321 @@
|
||||
/**
|
||||
* Template Name: NiceAdmin
|
||||
* Updated: Aug 30 2023 with Bootstrap v5.3.1
|
||||
* Template URL: https://bootstrapmade.com/nice-admin-bootstrap-admin-html-template/
|
||||
* Author: BootstrapMade.com
|
||||
* License: https://bootstrapmade.com/license/
|
||||
*/
|
||||
(function() {
|
||||
"use strict";
|
||||
|
||||
/**
|
||||
* Easy selector helper function
|
||||
*/
|
||||
const select = (el, all = false) => {
|
||||
el = el.trim()
|
||||
if (all) {
|
||||
return [...document.querySelectorAll(el)]
|
||||
} else {
|
||||
return document.querySelector(el)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Easy event listener function
|
||||
*/
|
||||
const on = (type, el, listener, all = false) => {
|
||||
if (all) {
|
||||
select(el, all).forEach(e => e.addEventListener(type, listener))
|
||||
} else {
|
||||
select(el, all).addEventListener(type, listener)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Easy on scroll event listener
|
||||
*/
|
||||
const onscroll = (el, listener) => {
|
||||
el.addEventListener('scroll', listener)
|
||||
}
|
||||
|
||||
/**
|
||||
* Sidebar toggle
|
||||
*/
|
||||
if (select('.toggle-sidebar-btn')) {
|
||||
on('click', '.toggle-sidebar-btn', function(e) {
|
||||
select('body').classList.toggle('toggle-sidebar')
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Search bar toggle
|
||||
*/
|
||||
if (select('.search-bar-toggle')) {
|
||||
on('click', '.search-bar-toggle', function(e) {
|
||||
select('.search-bar').classList.toggle('search-bar-show')
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Navbar links active state on scroll
|
||||
*/
|
||||
let navbarlinks = select('#navbar .scrollto', true)
|
||||
const navbarlinksActive = () => {
|
||||
let position = window.scrollY + 200
|
||||
navbarlinks.forEach(navbarlink => {
|
||||
if (!navbarlink.hash) return
|
||||
let section = select(navbarlink.hash)
|
||||
if (!section) return
|
||||
if (position >= section.offsetTop && position <= (section.offsetTop + section.offsetHeight)) {
|
||||
navbarlink.classList.add('active')
|
||||
} else {
|
||||
navbarlink.classList.remove('active')
|
||||
}
|
||||
})
|
||||
}
|
||||
window.addEventListener('load', navbarlinksActive)
|
||||
onscroll(document, navbarlinksActive)
|
||||
|
||||
/**
|
||||
* Toggle .header-scrolled class to #header when page is scrolled
|
||||
*/
|
||||
let selectHeader = select('#header')
|
||||
if (selectHeader) {
|
||||
const headerScrolled = () => {
|
||||
if (window.scrollY > 100) {
|
||||
selectHeader.classList.add('header-scrolled')
|
||||
} else {
|
||||
selectHeader.classList.remove('header-scrolled')
|
||||
}
|
||||
}
|
||||
window.addEventListener('load', headerScrolled)
|
||||
onscroll(document, headerScrolled)
|
||||
}
|
||||
|
||||
/**
|
||||
* Back to top button
|
||||
*/
|
||||
let backtotop = select('.back-to-top')
|
||||
if (backtotop) {
|
||||
const toggleBacktotop = () => {
|
||||
if (window.scrollY > 100) {
|
||||
backtotop.classList.add('active')
|
||||
} else {
|
||||
backtotop.classList.remove('active')
|
||||
}
|
||||
}
|
||||
window.addEventListener('load', toggleBacktotop)
|
||||
onscroll(document, toggleBacktotop)
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiate tooltips
|
||||
*/
|
||||
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
|
||||
var tooltipList = tooltipTriggerList.map(function(tooltipTriggerEl) {
|
||||
return new bootstrap.Tooltip(tooltipTriggerEl)
|
||||
})
|
||||
|
||||
/**
|
||||
* Initiate quill editors
|
||||
*/
|
||||
if (select('.quill-editor-default')) {
|
||||
new Quill('.quill-editor-default', {
|
||||
theme: 'snow'
|
||||
});
|
||||
}
|
||||
|
||||
if (select('.quill-editor-bubble')) {
|
||||
new Quill('.quill-editor-bubble', {
|
||||
theme: 'bubble'
|
||||
});
|
||||
}
|
||||
|
||||
if (select('.quill-editor-full')) {
|
||||
new Quill(".quill-editor-full", {
|
||||
modules: {
|
||||
toolbar: [
|
||||
[{
|
||||
font: []
|
||||
}, {
|
||||
size: []
|
||||
}],
|
||||
["bold", "italic", "underline", "strike"],
|
||||
[{
|
||||
color: []
|
||||
},
|
||||
{
|
||||
background: []
|
||||
}
|
||||
],
|
||||
[{
|
||||
script: "super"
|
||||
},
|
||||
{
|
||||
script: "sub"
|
||||
}
|
||||
],
|
||||
[{
|
||||
list: "ordered"
|
||||
},
|
||||
{
|
||||
list: "bullet"
|
||||
},
|
||||
{
|
||||
indent: "-1"
|
||||
},
|
||||
{
|
||||
indent: "+1"
|
||||
}
|
||||
],
|
||||
["direction", {
|
||||
align: []
|
||||
}],
|
||||
["link", "image", "video"],
|
||||
["clean"]
|
||||
]
|
||||
},
|
||||
theme: "snow"
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiate TinyMCE Editor
|
||||
*/
|
||||
const useDarkMode = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
const isSmallScreen = window.matchMedia('(max-width: 1023.5px)').matches;
|
||||
|
||||
tinymce.init({
|
||||
selector: 'textarea.tinymce-editor',
|
||||
plugins: 'preview importcss searchreplace autolink autosave save directionality code visualblocks visualchars fullscreen image link media template codesample table charmap pagebreak nonbreaking anchor insertdatetime advlist lists wordcount help charmap quickbars emoticons',
|
||||
editimage_cors_hosts: ['picsum.photos'],
|
||||
menubar: 'file edit view insert format tools table help',
|
||||
toolbar: 'undo redo | bold italic underline strikethrough | fontfamily fontsize blocks | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist | forecolor backcolor removeformat | pagebreak | charmap emoticons | fullscreen preview save print | insertfile image media template link anchor codesample | ltr rtl',
|
||||
toolbar_sticky: true,
|
||||
toolbar_sticky_offset: isSmallScreen ? 102 : 108,
|
||||
autosave_ask_before_unload: true,
|
||||
autosave_interval: '30s',
|
||||
autosave_prefix: '{path}{query}-{id}-',
|
||||
autosave_restore_when_empty: false,
|
||||
autosave_retention: '2m',
|
||||
image_advtab: true,
|
||||
link_list: [{
|
||||
title: 'My page 1',
|
||||
value: 'https://www.tiny.cloud'
|
||||
},
|
||||
{
|
||||
title: 'My page 2',
|
||||
value: 'http://www.moxiecode.com'
|
||||
}
|
||||
],
|
||||
image_list: [{
|
||||
title: 'My page 1',
|
||||
value: 'https://www.tiny.cloud'
|
||||
},
|
||||
{
|
||||
title: 'My page 2',
|
||||
value: 'http://www.moxiecode.com'
|
||||
}
|
||||
],
|
||||
image_class_list: [{
|
||||
title: 'None',
|
||||
value: ''
|
||||
},
|
||||
{
|
||||
title: 'Some class',
|
||||
value: 'class-name'
|
||||
}
|
||||
],
|
||||
importcss_append: true,
|
||||
file_picker_callback: (callback, value, meta) => {
|
||||
/* Provide file and text for the link dialog */
|
||||
if (meta.filetype === 'file') {
|
||||
callback('https://www.google.com/logos/google.jpg', {
|
||||
text: 'My text'
|
||||
});
|
||||
}
|
||||
|
||||
/* Provide image and alt text for the image dialog */
|
||||
if (meta.filetype === 'image') {
|
||||
callback('https://www.google.com/logos/google.jpg', {
|
||||
alt: 'My alt text'
|
||||
});
|
||||
}
|
||||
|
||||
/* Provide alternative source and posted for the media dialog */
|
||||
if (meta.filetype === 'media') {
|
||||
callback('movie.mp4', {
|
||||
source2: 'alt.ogg',
|
||||
poster: 'https://www.google.com/logos/google.jpg'
|
||||
});
|
||||
}
|
||||
},
|
||||
templates: [{
|
||||
title: 'New Table',
|
||||
description: 'creates a new table',
|
||||
content: '<div class="mceTmpl"><table width="98%%" border="0" cellspacing="0" cellpadding="0"><tr><th scope="col"> </th><th scope="col"> </th></tr><tr><td> </td><td> </td></tr></table></div>'
|
||||
},
|
||||
{
|
||||
title: 'Starting my story',
|
||||
description: 'A cure for writers block',
|
||||
content: 'Once upon a time...'
|
||||
},
|
||||
{
|
||||
title: 'New list with dates',
|
||||
description: 'New List with dates',
|
||||
content: '<div class="mceTmpl"><span class="cdate">cdate</span><br><span class="mdate">mdate</span><h2>My List</h2><ul><li></li><li></li></ul></div>'
|
||||
}
|
||||
],
|
||||
template_cdate_format: '[Date Created (CDATE): %m/%d/%Y : %H:%M:%S]',
|
||||
template_mdate_format: '[Date Modified (MDATE): %m/%d/%Y : %H:%M:%S]',
|
||||
height: 600,
|
||||
image_caption: true,
|
||||
quickbars_selection_toolbar: 'bold italic | quicklink h2 h3 blockquote quickimage quicktable',
|
||||
noneditable_class: 'mceNonEditable',
|
||||
toolbar_mode: 'sliding',
|
||||
contextmenu: 'link image table',
|
||||
skin: useDarkMode ? 'oxide-dark' : 'oxide',
|
||||
content_css: useDarkMode ? 'dark' : 'default',
|
||||
content_style: 'body { font-family:Helvetica,Arial,sans-serif; font-size:16px }'
|
||||
});
|
||||
|
||||
/**
|
||||
* Initiate Bootstrap validation check
|
||||
*/
|
||||
var needsValidation = document.querySelectorAll('.needs-validation')
|
||||
|
||||
Array.prototype.slice.call(needsValidation)
|
||||
.forEach(function(form) {
|
||||
form.addEventListener('submit', function(event) {
|
||||
if (!form.checkValidity()) {
|
||||
event.preventDefault()
|
||||
event.stopPropagation()
|
||||
}
|
||||
|
||||
form.classList.add('was-validated')
|
||||
}, false)
|
||||
})
|
||||
|
||||
/**
|
||||
* Initiate Datatables
|
||||
*/
|
||||
const datatables = select('.datatable', true)
|
||||
datatables.forEach(datatable => {
|
||||
new simpleDatatables.DataTable(datatable);
|
||||
})
|
||||
|
||||
/**
|
||||
* Autoresize echart charts
|
||||
*/
|
||||
const mainContainer = select('#main');
|
||||
if (mainContainer) {
|
||||
setTimeout(() => {
|
||||
new ResizeObserver(function() {
|
||||
select('.echart', true).forEach(getEchart => {
|
||||
echarts.getInstanceByDom(getEchart).resize();
|
||||
})
|
||||
}).observe(mainContainer);
|
||||
}, 200);
|
||||
}
|
||||
|
||||
})();
|
@ -1,101 +1,118 @@
|
||||
"use strict";
|
||||
// Set new default font family and font color to mimic Bootstrap's default styling
|
||||
Chart.defaults.global.defaultFontFamily = 'Nunito', '-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif';
|
||||
Chart.defaults.global.defaultFontColor = '#858796';
|
||||
|
||||
var statistics_chart = document.getElementById("myChart").getContext('2d');
|
||||
function number_format(number, decimals, dec_point, thousands_sep) {
|
||||
// * example: number_format(1234.56, 2, ',', ' ');
|
||||
// * return: '1 234,56'
|
||||
number = (number + '').replace(',', '').replace(' ', '');
|
||||
var n = !isFinite(+number) ? 0 : +number,
|
||||
prec = !isFinite(+decimals) ? 0 : Math.abs(decimals),
|
||||
sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep,
|
||||
dec = (typeof dec_point === 'undefined') ? '.' : dec_point,
|
||||
s = '',
|
||||
toFixedFix = function (n, prec) {
|
||||
var k = Math.pow(10, prec);
|
||||
return '' + Math.round(n * k) / k;
|
||||
};
|
||||
// Fix for IE parseFloat(0.55).toFixed(0) = 0;
|
||||
s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.');
|
||||
if (s[0].length > 3) {
|
||||
s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep);
|
||||
}
|
||||
if ((s[1] || '').length < prec) {
|
||||
s[1] = s[1] || '';
|
||||
s[1] += new Array(prec - s[1].length + 1).join('0');
|
||||
}
|
||||
return s.join(dec);
|
||||
}
|
||||
|
||||
var myChart = new Chart(statistics_chart, {
|
||||
// Area Chart Example
|
||||
var ctx = document.getElementById("myChart1");
|
||||
var myLineChart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: {
|
||||
labels: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
|
||||
labels: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
|
||||
datasets: [{
|
||||
label: 'Statistics',
|
||||
data: [640, 387, 530, 302, 430, 270, 488],
|
||||
borderWidth: 5,
|
||||
borderColor: '#6777ef',
|
||||
backgroundColor: 'transparent',
|
||||
pointBackgroundColor: '#fff',
|
||||
pointBorderColor: '#6777ef',
|
||||
pointRadius: 4
|
||||
}]
|
||||
label: "Earnings",
|
||||
lineTension: 0.3,
|
||||
backgroundColor: "rgba(78, 115, 223, 0.05)",
|
||||
borderColor: "rgba(78, 115, 223, 1)",
|
||||
pointRadius: 3,
|
||||
pointBackgroundColor: "rgba(78, 115, 223, 1)",
|
||||
pointBorderColor: "rgba(78, 115, 223, 1)",
|
||||
pointHoverRadius: 3,
|
||||
pointHoverBackgroundColor: "rgba(78, 115, 223, 1)",
|
||||
pointHoverBorderColor: "rgba(78, 115, 223, 1)",
|
||||
pointHitRadius: 10,
|
||||
pointBorderWidth: 2,
|
||||
data: [0, 10000, 5000, 15000, 10000, 20000, 15000, 25000, 20000, 30000, 25000, 40000],
|
||||
}],
|
||||
},
|
||||
options: {
|
||||
maintainAspectRatio: false,
|
||||
layout: {
|
||||
padding: {
|
||||
left: 10,
|
||||
right: 25,
|
||||
top: 25,
|
||||
bottom: 0
|
||||
}
|
||||
},
|
||||
scales: {
|
||||
xAxes: [{
|
||||
time: {
|
||||
unit: 'date'
|
||||
},
|
||||
gridLines: {
|
||||
display: false,
|
||||
drawBorder: false
|
||||
},
|
||||
ticks: {
|
||||
maxTicksLimit: 7
|
||||
}
|
||||
}],
|
||||
yAxes: [{
|
||||
ticks: {
|
||||
maxTicksLimit: 5,
|
||||
padding: 10,
|
||||
// Include a dollar sign in the ticks
|
||||
callback: function (value, index, values) {
|
||||
return 'Rp.' + number_format(value);
|
||||
}
|
||||
},
|
||||
gridLines: {
|
||||
color: "rgb(234, 236, 244)",
|
||||
zeroLineColor: "rgb(234, 236, 244)",
|
||||
drawBorder: false,
|
||||
borderDash: [2],
|
||||
zeroLineBorderDash: [2]
|
||||
}
|
||||
}],
|
||||
},
|
||||
legend: {
|
||||
display: false
|
||||
},
|
||||
scales: {
|
||||
yAxes: [{
|
||||
gridLines: {
|
||||
display: false,
|
||||
drawBorder: false,
|
||||
},
|
||||
ticks: {
|
||||
stepSize: 150
|
||||
}
|
||||
}],
|
||||
xAxes: [{
|
||||
gridLines: {
|
||||
color: '#fbfbfb',
|
||||
lineWidth: 2
|
||||
}
|
||||
}]
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
$('#visitorMap').vectorMap(
|
||||
{
|
||||
map: 'world_en',
|
||||
backgroundColor: '#ffffff',
|
||||
borderColor: '#f2f2f2',
|
||||
borderOpacity: .8,
|
||||
tooltips: {
|
||||
backgroundColor: "rgb(255,255,255)",
|
||||
bodyFontColor: "#858796",
|
||||
titleMarginBottom: 10,
|
||||
titleFontColor: '#6e707e',
|
||||
titleFontSize: 14,
|
||||
borderColor: '#dddfeb',
|
||||
borderWidth: 1,
|
||||
hoverColor: '#000',
|
||||
hoverOpacity: .8,
|
||||
color: '#ddd',
|
||||
normalizeFunction: 'linear',
|
||||
selectedRegions: false,
|
||||
showTooltip: true,
|
||||
pins: {
|
||||
id: '<div class="jqvmap-circle"></div>',
|
||||
my: '<div class="jqvmap-circle"></div>',
|
||||
th: '<div class="jqvmap-circle"></div>',
|
||||
sy: '<div class="jqvmap-circle"></div>',
|
||||
eg: '<div class="jqvmap-circle"></div>',
|
||||
ae: '<div class="jqvmap-circle"></div>',
|
||||
nz: '<div class="jqvmap-circle"></div>',
|
||||
tl: '<div class="jqvmap-circle"></div>',
|
||||
ng: '<div class="jqvmap-circle"></div>',
|
||||
si: '<div class="jqvmap-circle"></div>',
|
||||
pa: '<div class="jqvmap-circle"></div>',
|
||||
au: '<div class="jqvmap-circle"></div>',
|
||||
ca: '<div class="jqvmap-circle"></div>',
|
||||
tr: '<div class="jqvmap-circle"></div>',
|
||||
},
|
||||
});
|
||||
|
||||
// weather
|
||||
getWeather();
|
||||
setInterval(getWeather, 600000);
|
||||
|
||||
function getWeather() {
|
||||
$.simpleWeather({
|
||||
location: 'Bogor, Indonesia',
|
||||
unit: 'c',
|
||||
success: function(weather) {
|
||||
var html = '';
|
||||
html += '<div class="weather">';
|
||||
html += '<div class="weather-icon text-primary"><span class="wi wi-yahoo-' + weather.code + '"></span></div>';
|
||||
html += '<div class="weather-desc">';
|
||||
html += '<h4>' + weather.temp + '°' + weather.units.temp + '</h4>';
|
||||
html += '<div class="weather-text">' + weather.currently + '</div>';
|
||||
html += '<ul><li>' + weather.city + ', ' + weather.region + '</li>';
|
||||
html += '<li> <i class="wi wi-strong-wind"></i> ' + weather.wind.speed+' '+weather.units.speed + '</li></ul>';
|
||||
html += '</div>';
|
||||
html += '</div>';
|
||||
|
||||
$("#myWeather").html(html);
|
||||
},
|
||||
error: function(error) {
|
||||
$("#myWeather").html('<div class="alert alert-danger">'+error+'</div>');
|
||||
xPadding: 15,
|
||||
yPadding: 15,
|
||||
displayColors: false,
|
||||
intersect: false,
|
||||
mode: 'index',
|
||||
caretPadding: 10,
|
||||
callbacks: {
|
||||
label: function (tooltipItem, chart) {
|
||||
var datasetLabel = chart.datasets[tooltipItem.datasetIndex].label || '';
|
||||
return datasetLabel + ': Rp. ' + number_format(tooltipItem.yLabel);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
"use strict";
|
||||
|
||||
var ctx = document.getElementById("myChart").getContext('2d');
|
||||
var ctx = document.getElementById("myChart1").getContext('2d');
|
||||
var myChart = new Chart(ctx, {
|
||||
type: 'line',
|
||||
data: {
|
||||
|