Compare commits

...

48 Commits
okta ... master

Author SHA1 Message Date
0c47be8e7f Memperbaiki landing page 2024-01-23 18:31:43 +07:00
6029c96a2f Penambahan homepage 2024-01-16 17:17:47 +07:00
1319ff356c Merge branch 'oktaaa' of https://git.abbauf.com/MAGANG_TB_dan_PNP_2023/Aplikasi_Rekber 2024-01-02 09:47:22 +07:00
oktaviaramadani
6bdf00c399 perubahan api provinsi 2023-12-26 14:42:07 +07:00
9dff31200a Penambahan Logo 2023-12-22 16:55:16 +07:00
oktaviaramadani
4a1cdf1882 Merge branch 'master' of https://git.abbauf.com/MAGANG_TB_dan_PNP_2023/Aplikasi_Rekber into oktaaa 2023-12-22 15:10:07 +07:00
oktaviaramadani
87c2b38a29 loginApi 2023-12-22 15:09:54 +07:00
1decd84a3a API 2023-12-22 15:09:39 +07:00
bf163bce1e Perbaiki login api 2023-12-19 15:03:28 +07:00
6e4d6f561c Login API Controller 2023-12-19 10:30:29 +07:00
7d04d0272c Perbaiki server python 2023-12-19 09:57:24 +07:00
e9f52bed7a Penambahan Server Python 2023-12-15 15:25:02 +07:00
2ec7008f61 Memperbaiki api 2023-12-15 15:16:57 +07:00
181f1cc236 Merge branch 'oktaaa' of https://git.abbauf.com/MAGANG_TB_dan_PNP_2023/Aplikasi_Rekber 2023-12-15 15:15:41 +07:00
oktaviaramadani
eeea527d03 update api 2023-12-15 15:13:25 +07:00
1b57781980 Memperbaiki OCR 2023-12-13 16:58:12 +07:00
6c5edf8997 Memperbaiki tampilan 2023-12-12 16:43:39 +07:00
ec95715177 penambahan notifikasi api 2023-12-12 09:38:50 +07:00
e700439ecf Tambahan ambil foto 2023-12-11 10:53:14 +07:00
oktaviaramadani
7034f1a669 perubahan gambar 2023-12-08 15:19:01 +07:00
oktaviaramadani
f0588b77fe perubahan 2023-12-07 10:55:45 +07:00
1095ed940c Perbaiki tampilan transaksi baru 2023-12-06 16:22:54 +07:00
fc7db3e110 Notifikasi, email dan dashboard 2023-12-06 11:40:38 +07:00
oktaviaramadani
1860cb111c perubahan dashboard 2023-11-27 11:46:29 +07:00
oktaviaramadani
783c542f2d Merge branch 'master' of https://git.abbauf.com/MAGANG_TB_dan_PNP_2023/Aplikasi_Rekber into oktaaa 2023-11-27 09:08:33 +07:00
oktaviaramadani
ed06b9fd91 perubahan 2023-11-27 09:08:24 +07:00
d501cefc46 Notifikasi 2023-11-27 09:06:28 +07:00
85dec7d3c0 API Flutter Patch 3 2023-11-21 13:48:29 +07:00
1f7ecb22be API Flutter Patch 2 2023-11-20 15:05:27 +07:00
59aa63be93 API Flutter 2023-11-20 15:01:37 +07:00
oktaviaramadani
c353a83bd4 perubahan part 7 2023-11-17 10:46:13 +07:00
oktaviaramadani
3c691c089a Merge branch 'master' of https://git.abbauf.com/MAGANG_TB_dan_PNP_2023/Aplikasi_Rekber into oktaaa 2023-11-17 10:08:21 +07:00
fe5e2952c0 Api Flutter 2023-11-17 09:46:30 +07:00
oktaviaramadani
a6897b3f15 Merge branch 'master' of https://git.abbauf.com/MAGANG_TB_dan_PNP_2023/Aplikasi_Rekber into oktaaa 2023-11-15 16:28:22 +07:00
645c20a1d2 Email dan Invoice 2023-11-15 16:17:02 +07:00
oktaviaramadani
b93a3be3fc Merge branch 'master' of https://git.abbauf.com/MAGANG_TB_dan_PNP_2023/Aplikasi_Rekber into oktaaa 2023-11-14 14:12:10 +07:00
oktaviaramadani
f963618e1c prubahan part5 2023-11-14 14:11:55 +07:00
dde663e95a Invoice dan email 2023-11-14 11:59:09 +07:00
c1a837ca88 Tambah invoice 2023-11-13 16:49:06 +07:00
oktaviaramadani
eac701c324 perubaha datatable part4 2023-11-13 09:31:46 +07:00
676f05a162 DataTable Server Side 2023-11-13 09:22:34 +07:00
0d50202f43 Merge branch 'oktaaa' of https://git.abbauf.com/MAGANG_TB_dan_PNP_2023/Aplikasi_Rekber 2023-11-10 15:21:42 +07:00
603d91c845 Revisi list admin refund 2023-11-10 15:20:26 +07:00
oktaviaramadani
0b4139c92c perubahan datatable part 4 2023-11-10 14:22:21 +07:00
oktaviaramadani
ad36cc126f perubahan datatable part 3 2023-11-10 14:07:23 +07:00
oktaviaramadani
68860ef77d Merge branch 'master' of https://git.abbauf.com/MAGANG_TB_dan_PNP_2023/Aplikasi_Rekber into oktaaa 2023-11-10 13:13:21 +07:00
fbd0e5b006 Refund admin 2023-11-10 11:41:58 +07:00
oktaviaramadani
98fc236be2 perubahan datatable part 2 2023-11-10 11:21:13 +07:00
174 changed files with 67999 additions and 6169 deletions

BIN
R.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

View File

@ -0,0 +1,161 @@
<?php
namespace App\Http\Controllers\API\Contact;
use Throwable;
use App\Models\User;
use App\Models\Contact;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth;
use Tymon\JWTAuth\Facades\JWTAuth;
use Yajra\DataTables\Facades\DataTables;
class ContactApiController extends Controller
{
public function getListContact(Request $request)
{
$data = DB::table('contacts')
->join('users', 'contacts.relasi_kontak', '=', 'users.email')
->select('contacts.relasi_kontak', DB::raw("CONCAT(users.nama_depan, ' ', users.nama_belakang) as nama_lengkap") )
->where('contacts.pemilik_kontak', '=', auth()->user()->email)
->whereRaw("LOWER(CONCAT(users.nama_depan, ' ', users.nama_belakang)) LIKE ?", ['%' . strtolower($request->input('search')) . '%'])
->paginate(10);
return response()->json([
'data' => $data
]);
}
public function storeContact(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',
]);
}
try {
DB::beginTransaction();
Contact::create([
'pemilik_kontak' => Auth::user()->email,
'relasi_kontak' => $email_relasi,
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Kontak berhasil ditambahkan.',
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Terjadi error di bagian server atau kontak sudah didaftarkan',
]);
}
}
public function deleteContact(Request $request)
{
try {
DB::beginTransaction();
Contact::destroy($request->input('id'));
DB::commit();
return response()->json([
'message' => 'Berhasil hapus data',
'status' => true,
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Terjadi error di bagian server.',
]);
}
}
public function checkContact(Request $request)
{
$result = User::where('email', $request->input('email'))
->where('role', 'User')
->first();
if ($result) {
if ($result->status == 'Finished') {
return response()->json([
'status' => true,
'message' => $result,
]);
} else {
return response()->json([
'status' => false,
'message' => 'Akun dengen email ' . $request->input('email') . ' tersedia dan belum diverifikasi',
]);
}
} else {
return response()->json([
'status' => false,
'message' => 'Akun dengen email ' . $request->input('email') . ' tidak tersedia atau ditolak',
]);
}
}
public function detailContact(Request $request)
{
$data = Contact::join('users', 'contacts.relasi_kontak', '=', 'users.email')
->join('indonesia_villages', 'users.kode_kelurahan', '=', 'indonesia_villages.code')
->join('indonesia_districts', 'indonesia_villages.district_code', '=', 'indonesia_districts.code')
->join('indonesia_cities', 'indonesia_districts.city_code', '=', 'indonesia_cities.code')
->join('indonesia_provinces', 'indonesia_cities.province_code', '=', 'indonesia_provinces.code')
->where('contacts.id', $request->input('id'))
->select(DB::raw("CONCAT(users.nama_depan,' ',users.nama_belakang) as nama_lengkap"), 'users.alamat', 'users.email', 'users.nohp', 'indonesia_villages.name as kelurahan', 'indonesia_districts.name as kecamatan', 'indonesia_cities.name as kota', 'indonesia_provinces.name as provinsi')
->first();
return response()->json([
'data' => $data,
]);
}
public function listContact(Request $request)
{
try {
$subQuery = Contact::join('users', 'contacts.relasi_kontak', '=', 'users.email')
->where('pemilik_kontak', Auth::user()->email)
->select('contacts.id', DB::raw("CONCAT(users.nama_depan, ' ', users.nama_belakang) as nama_lengkap"));
if ($request->has('search') && !empty($request->search)) {
$searchContact = $request->search;
$subQuery->where(function ($a) use ($searchContact) {
$a->whereRaw("LOWER(CONCAT(users.nama_depan,' ',users.nama_belakang)) LIKE ?", ['%' . strtolower($searchContact) . '%']);
});
}
$queryContact = Contact::from(DB::raw("({$subQuery->toSql()}) as tmp"))
->mergeBindings($subQuery->getQuery())
->select('*')
->get();
return response()->json($queryContact);
} catch (Throwable $e) {
Log::error($e->getMessage());
return response()->json(['success' => false, 'message' => 'Terjadi Kesalahan pada sisi server']);
}
}
}

View File

@ -0,0 +1,27 @@
<?php
namespace App\Http\Controllers\API\Invoice;
use App\Http\Controllers\Controller;
use App\Models\Transaction;
use Illuminate\Http\Request;
class InvoiceApiController extends Controller
{
public function getInvoice(Request $request)
{
return response()->json([
'transaction' => Transaction::findOrFail($request->input('id')),
]);
}
public function exportInvoice(Request $request)
{
// $transaction = Transaction::findOrFail($request->id);
// $pdf = Pdf::loadView('invoice.export-invoice',compact('transaction'))->setPaper('A4','Portrait');
// return $pdf->download("invoice-$request->id.pdf");
return response()->json([
'transaction' => Transaction::findOrFail($request->input('id')),
]);
}
}

View File

@ -0,0 +1,322 @@
<?php
namespace App\Http\Controllers\API\Login;
use App\Http\Controllers\Controller;
use App\Mail\verificationMail;
use Illuminate\Http\Request;
use Tymon\JWTAuth\Facades\JWTFactory;
use Illuminate\Support\Facades\Hash;
use App\Models\User;
use GuzzleHttp\Client;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Str;
use Laravolt\Indonesia\Models\City;
use Laravolt\Indonesia\Models\District;
use Laravolt\Indonesia\Models\Province;
use Laravolt\Indonesia\Models\Village;
use Pusher\Pusher;
use Tymon\JWTAuth\Facades\JWTAuth;
use function PHPUnit\Framework\isEmpty;
class LoginApiController extends Controller
{
/**
* Create a new AuthController instance.
*
* @return void
*/
/**
* Get a JWT via given credentials.
*
* @return \Illuminate\Http\JsonResponse
*/
public function login(Request $request)
{
$credentials = $request->only(['email', 'password']);
$user = User::where('email', $credentials['email'])->first();
if($user == ''){
return response()->json(['error' => 'Email atau password salah'], 401);
} else if ($user['status'] == 'Progress'){
return response()->json(['error' => 'Akun sedang dalam progres persetujuan '], 201);
} else if ($user['status'] == 'Rejected'){
return response()->json(['error' => 'Akun ditolak karena '.$user['keterangan']], 201);
}
$token = Auth::guard('api')->attempt($credentials);
if (!$token) {
return response()->json(['error' => 'Email atau password salah'], 401);
}
return $this->respondWithToken($token);
}
/**
* Get the authenticated User.
*
* @return \Illuminate\Http\JsonResponse
*/
public function me()
{
$token = JWTAuth::getToken();
return response()->json(JWTAuth::user($token));
}
public function test(Request $request)
{
return response()->json([
'message' => 'Hello from API',
'data' => $request->all(),
]);
}
/**
* Log the user out (Invalidate the token).
*
* @return \Illuminate\Http\JsonResponse
*/
public function logout()
{
auth()->logout();
return response()->json(['message' => 'Successfully logged out']);
}
/**
* Refresh a token.
*
* @return \Illuminate\Http\JsonResponse
*/
public function refresh()
{
return $this->respondWithToken(Auth::refresh());
}
/**
* Get the token array structure.
*
* @param string $token
*
* @return \Illuminate\Http\JsonResponse
*/
protected function respondWithToken($token)
{
return response()->json([
'access_token' => $token,
'token_type' => 'bearer',
'expires_in' => JWTFactory::getTTL() * 60,
'status' => true,
], 200);
}
public function register(Request $request)
{
$nama_depan = $request->input('nama_depan');
$nama_belakang = $request->input('nama_belakang');
$tanggal_lahir = $request->input('tanggal_lahir');
$new_password = $request->input('new_password');
$nik = $request->input('nik');
$email = $request->input('new_email');
$nohp = $request->input('nohp');
$alamat = $request->input('alamat');
$foto_ktp = '';
$foto_wajah = '';
$persentase_kemiripan = 0;
$gender = $request->input('gender');
$kode_kelurahan = $request->input('village_code');
if ($request->hasFile('ktp') && $request->hasFile('wajah')) {
$fileKtp = $request->file('ktp');
$fileWajah = $request->file('wajah');
$foto_ktp = 'Foto-KTP-' . $email . '.' . $fileKtp->getClientOriginalExtension();
$foto_wajah = 'Foto-Wajah' . $email . '.' . $fileWajah->getClientOriginalExtension();
$pathKtp = 'foto-ktp/' . $foto_ktp;
$pathWajah = 'foto-wajah/' . $foto_wajah;
Storage::disk('public')->put($pathKtp, file_get_contents($fileKtp));
Storage::disk('public')->put($pathWajah, file_get_contents($fileWajah));
}
//OCR
try {
// OCR
$client = new Client();
$response = $client->request('POST', 'https://raihansurya4000.pythonanywhere.com/process-image', [
'multipart' => [
[
'name' => 'image',
'contents' => fopen(public_path('storage/foto-ktp/' . $foto_ktp), 'r'),
'filename' => $foto_ktp,
],
],
'verify' => false,
]);
$result = $response->getBody()->getContents();
$lines = json_decode($result, true);
$namaKTP = str_replace(' ', '', strtolower($nama_depan . $nama_belakang));
$nikKTP = $nik;
$persentaseNama = 0;
$persentaseNik = 0;
foreach ($lines['result'] as $line) {
$teks = str_replace(' ', '', strtolower($line));
$persentaseNamaSementara = 0;
$persentaseNikSementara = 0;
similar_text($teks, $namaKTP, $persentaseNamaSementara);
similar_text($teks, $nikKTP, $persentaseNikSementara);
if ($persentaseNamaSementara > 0) {
if ($persentaseNamaSementara > $persentaseNama) {
$persentaseNama = $persentaseNamaSementara;
}
}
if ($persentaseNikSementara > 0) {
if ($persentaseNikSementara > $persentaseNik) {
$persentaseNik = $persentaseNikSementara;
}
}
}
$persentase_kemiripan = ($persentaseNama + $persentaseNik) / 2;
$status = 'Progress';
if ($persentase_kemiripan >= 50) {
$status = 'Finished';
} elseif ($persentase_kemiripan <= 35) {
return response()->json([
'status' => false,
'message' => 'Sistem tidak dapat mendeteksi foto KTP. Kemungkinan foto tidak jelas atau buram, silahkan upload foto KTP yang jelas. Persentase kemiripan inputan : ' . $persentase_kemiripan . '%',
]);
}
DB::beginTransaction();
$password = Hash::make($new_password);
User::create([
'nama_depan' => $nama_depan,
'nama_belakang' => $nama_belakang,
'tanggal_lahir' => $tanggal_lahir,
'email' => $email,
'email_verified_at' => now(),
'password' => $password,
'nohp' => $nohp,
'nik' => $nik,
'alamat' => $alamat,
'foto_ktp' => $foto_ktp,
'foto_wajah' => $foto_wajah,
'persentase_kemiripan' => $persentase_kemiripan,
'gender' => $gender,
'kode_kelurahan' => $kode_kelurahan,
'remember_token' => Str::random(10),
'status' => $status,
]);
DB::commit();
$options = [
'cluster' => 'ap1',
'useTLS' => true,
];
$pusher = new Pusher('3e5bdc20dddd7fbc655e', 'f2274c37c616d29ff590', '1659859', $options);
$payload = [
'service' => 'User',
];
$pusher->trigger('chanel-update-notifikasi-untuk-admin', 'event-update-notifikasi-untuk-admin', $payload);
if ($status == 'Finished') {
return response()->json([
'status' => true,
'message' => 'Akun anda sudah terdaftar dan dapat digunakan',
]);
} else {
return response()->json([
'status' => true,
'message' => 'Akun anda sudah terdaftar dan butuh verifikasi hingga maksimal 1 hari kerja',
]);
}
} catch (\Exception $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Akun anda gagal terdaftar. Coba lagi!',
]);
}
}
public function verificationCode(Request $request)
{
$email = $request->input('email');
$code = $request->input('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 searchProvince()
{
$data = Province::where('name', 'LIKE', '%' . strtoupper(request('q')) . '%')->paginate(34);
return response()->json($data);
}
public function searchCity(Request $request)
{
$data = City::where('province_code', $request->input('code'))
->where('name', 'LIKE', '%' . strtoupper(request('q')) . '%')
->paginate(10);
return response()->json($data);
}
public function searchDistrict(Request $request)
{
$data = District::where('city_code', $request->input('code'))
->where('name', 'LIKE', '%' . strtoupper(request('q')) . '%')
->paginate(10);
return response()->json($data);
}
public function searchVillage(Request $request)
{
$data = Village::where('district_code', $request->input('code'))
->where('name', 'LIKE', '%' . strtoupper(request('q')) . '%')
->paginate(10);
return response()->json($data);
}
}

View File

@ -1,127 +0,0 @@
<?php
namespace App\Http\Controllers\API;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
use App\Models\User;
class LoginApiController extends Controller
{
/**
* Create a new AuthController instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth:api', ['except' => ['login', 'register', 'hai']]);
}
/**
* Get a JWT via given credentials.
*
* @return \Illuminate\Http\JsonResponse
*/
public function login()
{
// $request->validate([
// 'email' => 'required|string|email',
// 'password' => 'required',
// ]);
$credentials = request(['email', 'password']);
if (!($token = auth()->attempt($credentials))) {
return response()->json(['error' => 'Unauthorized'], 401);
}
return $this->respondWithToken($token);
}
/**
* Get the authenticated User.
*
* @return \Illuminate\Http\JsonResponse
*/
public function me()
{
return response()->json(Auth::user());
}
public function hai()
{
return response()->json([
'message' => 'Hello from API',
]);
}
/**
* Log the user out (Invalidate the token).
*
* @return \Illuminate\Http\JsonResponse
*/
public function logout()
{
auth()->logout();
return response()->json(['message' => 'Successfully logged out']);
}
/**
* Refresh a token.
*
* @return \Illuminate\Http\JsonResponse
*/
public function refresh()
{
return $this->respondWithToken(Auth::refresh());
}
/**
* Get the token array structure.
*
* @param string $token
*
* @return \Illuminate\Http\JsonResponse
*/
protected function respondWithToken($token)
{
return response()->json([
'user' => auth()->user(),
'access_token' => $token,
'token_type' => 'bearer',
'expires_in' => Auth::factory()->getTTL() * 60,
// 'status' => auth()->check(),
]);
}
public function register(Request $request)
{
$request->validate([
'name' => 'required|string|max:255',
'email' => 'required|string|email|unique:users',
'password' => 'required|string|min:8',
]);
$user = User::create([
'name' => $request->name,
'email' => $request->email,
'password' => Hash::make($request->password),
]);
return response()->json([
'message' => 'User created successfully',
'user' => $user,
]);
}
// public function check()
// {
// return response()->json([
// 'status' => auth()->check(),
// ]);
// }
}

View File

@ -0,0 +1,102 @@
<?php
namespace App\Http\Controllers\API\Notification;
use App\Http\Controllers\Controller;
use App\Models\Notification;
use App\Models\NotificationReceiver;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Pusher\Pusher;
use Throwable;
class NotificationApiController extends Controller
{
public function listNotification(Request $request){
try {
$subQuery = Notification::join('notification_receivers','notifications.id','=','notification_receivers.notification_id')
->where('notification_receivers.receiver','=',auth()->user()->email)
->latest('notification_receivers.updated_at')
->select('notifications.id', 'notifications.title', 'notifications.teaser', 'notification_receivers.created_at', 'notification_receivers.status');
if ($request->has('search') && !empty($request->search)) {
$searchNotif = $request->search;
$subQuery->where(function ($a) use ($searchNotif) {
$a->whereRaw('LOWER(notifications.title) LIKE ?', ['%' . strtolower($searchNotif) . '%'])
->orWhereRaw('LOWER(notifications.teaser) LIKE ?', ['%' . strtolower($searchNotif) . '%']);
});
}
$queryNotif = Notification::from(DB::raw("({$subQuery->toSql()}) as tmp"))
->mergeBindings($subQuery->getQuery())
->select('*')
->get();
return response()->json($queryNotif);
} catch (Throwable $e) {
Log::error($e->getMessage());
return response()->json(['success' => false, 'message' => 'Terjadi Kesalahan pada sisi server']);
}
}
public function getDetailNotification(Request $request){
$notification = Notification::where('id', $request->input('id'))->get();
return response()->json([
'data' => $notification
]);
}
public function markAllAsRead(){
$result = NotificationReceiver::where('receiver', auth()->user()->email)->update([
'status' => 'read'
]);
if($result){
return response()->json([
'status' => true,
'message' => 'Berhasil'
]);
}else{
return response()->json([
'status' => false,
'message' => 'Gagal'
]);
Log::error($result);
}
}
public function updateNotificationToAdmin(Request $request){
$options = [
'cluster' => 'ap1',
'useTLS' => true,
];
$pusher = new Pusher('3e5bdc20dddd7fbc655e', 'f2274c37c616d29ff590', '1659859', $options);
$payload = [
'service' => $request->input('service')
];
$pusher->trigger('chanel-update-notifikasi-untuk-admin', 'event-update-notifikasi-untuk-admin', $payload);
}
public function updateNewNotification(Request $request){
$options = [
'cluster' => 'ap1',
'useTLS' => true,
];
$pusher = new Pusher('3e5bdc20dddd7fbc655e', 'f2274c37c616d29ff590', '1659859', $options);
$payload = [
'receivers' => $request->input('receiver'),
];
$pusher->trigger('chanel-update-notifikasi', 'event-update-notifikasi', $payload);
}
}

View File

@ -1,67 +1,29 @@
<?php
namespace App\Http\Controllers\User;
namespace App\Http\Controllers\API\Pembeli;
use App\Models\Transaction;
use App\Models\TransactionDescription;
use App\Http\Controllers\Controller;
use Throwable;
use Carbon\Carbon;
use App\Models\User;
use App\Models\Refund;
use GuzzleHttp\Client;
use App\Models\Contact;
use App\Models\Setting;
use App\Models\Transaction;
use Illuminate\Http\Request;
use App\Models\TransactionUser;
use App\Models\User;
use Carbon\Carbon;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
use Ramsey\Uuid\Uuid;
use GuzzleHttp\Client;
use Stichoza\GoogleTranslate\GoogleTranslate;
use Throwable;
use App\Http\Controllers\Controller;
use App\Models\Notification;
use App\Models\NotificationReceiver;
use Illuminate\Support\Facades\Http;
use App\Models\TransactionDescription;
use Pusher\Pusher;
use Yajra\DataTables\Facades\DataTables;
class UserTransactionController extends Controller
class PembeliApiController 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(),
]);
}
/**
* Display a listing of the resource.
*/
public function indexPenjual()
{
return view('user.transaction.penjual.index', [
'transactions' => Transaction::where('penjual', Auth::user()->email)
->latest()
->get(),
]);
}
public function show($id)
{
return view('user.transaction.pembeli.detail-transaction', [
'transaction' => Transaction::findOrFail($id),
'trackings' => TransactionDescription::where('transaction_id', $id)
->latest()
->get(),
]);
}
/**
* Show the form for creating a new resource.
*/
public function create()
public function createTransaction()
{
$now = Carbon::now();
$bulan = $now->format('F');
@ -75,34 +37,25 @@ class UserTransactionController extends Controller
->latest()
->value('persentase');
}
return view('user.transaction.pembeli.new-transaction', [
'persentase_keuntungan' => $persentase_keuntungan,
return response()->json([
'persentase_keuntungan' => $persentase_keuntungan
]);
}
/**
* Store a newly created resource in storage.
*/
public function invoiceTransaction()
public function storeTransaction(Request $request)
{
return view('user.transaction.pembeli.invoice-transaction', [
'TransactionUser' => TransactionUser::HistoryTransaction(),
]);
}
$pembeli = auth()->user()->email;
$penjual = $request->input('email_penjual');
$nama_barang = $request->input('nama_barang');
$satuan_barang = $request->input('satuan_barang');
$deskripsi_transaksi = $request->input('deskripsi');
$harga_barang = $request->input('harga_barang');
$jumlah_barang = $request->input('jumlah_barang');
public function store(Request $request)
{
$pembeli = Auth::user()->email;
$penjual = $request->email_penjual;
$nama_barang = $request->nama_barang;
$satuan_barang = $request->satuan_barang;
$deskripsi_transaksi = $request->deskripsi;
$harga_barang = $request->harga_barang;
$jumlah_barang = $request->jumlah_barang;
$nama_depan_pembeli = Auth::user()->nama_depan;
$nama_belakang_pembeli = Auth::user()->nama_belakang;
$nohp_pembeli = Auth::user()->nohp;
$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');
$bank_penjual = User::where('email', $penjual)->value('nama_bank');
$no_rek_penjual = User::where('email', $penjual)->value('no_rek');
@ -114,15 +67,15 @@ class UserTransactionController extends Controller
]);
}
$alamat = ucwords(strtolower(Auth::user()->alamat));
$alamat = ucwords(strtolower(auth()->user()->alamat));
$now = Carbon::now();
$persentase_keuntungan = $request->persentase_keuntungan;
$persentase_keuntungan = $request->input('persentase_keuntungan');
$total_harga = $request->total_harga;
$total_keuntungan = $request->total_keuntungan;
$total_bayar = $request->total_bayar;
$total_harga = $request->input('total_harga');
$total_keuntungan = $request->input('total_keuntungan');
$total_bayar = $request->input('total_bayar');
$batas_pembayaran = $now->addDays(1)->toTimeString();
$batas_konfirmasi_transaksi = $now->addDays(2)->toDateTimeString();
@ -185,7 +138,7 @@ class UserTransactionController extends Controller
'email' => $pembeli,
'phone' => $nohp_pembeli,
'address' => $alamat,
'city' => Auth::user()->village->district->city->name,
'city' => auth()->user()->village->district->city->name,
'country_code' => 'IDN',
],
],
@ -241,6 +194,7 @@ class UserTransactionController extends Controller
return response()->json([
'status' => true,
'message' => 'Berhasil menambahkan transaksi. Silahkan lakukan pembayaran.',
'url' => $result['redirect_url']
]);
} catch (Throwable $e) {
DB::rollBack();
@ -254,155 +208,46 @@ class UserTransactionController extends Controller
}
}
public function acceptTransaction(Request $request)
{
try {
DB::beginTransaction();
Transaction::where('id', $request->id)->update([
'status_transaksi' => 'process',
]);
TransactionDescription::create([
'transaction_id' => $request->id,
'status' => 'process',
'background' => 'bg-seller',
'user' => Auth::user()->email,
'judul' => 'fas fa-handshake',
'deskripsi' => 'Transaksi telah diterima oleh ' . Auth::user()->nama_depan,
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Transaksi telah diterima. Siapkan pesanan untuk dikirim ke penjual.',
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Gagal update status karena kesalahan server.',
]);
}
}
public function sendingOrder(Request $request)
{
try {
DB::beginTransaction();
Transaction::where('id', $request->id)->update([
'status_transaksi' => 'sending',
]);
TransactionDescription::create([
'transaction_id' => $request->id,
'status' => 'sending',
'background' => 'bg-seller',
'user' => Auth::user()->email,
'judul' => 'fas fa-truck-moving',
'deskripsi' => 'Pesanan telah dikirim oleh ' . Auth::user()->nama_depan . ' dan sedang dalam perjalanan menuju pembeli.',
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Pesanan sedang dikirim dan menuju pembeli.',
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Gagal update status karena kesalahan server.',
]);
}
}
public function sentOrder(Request $request)
{
try {
DB::beginTransaction();
Transaction::where('id', $request->transaction_id)->update([
'status_transaksi' => 'sent',
]);
$bukti_foto = '';
if ($request->hasFile('bukti_foto')) {
$file = $request->file('bukti_foto');
$bukti_foto = time() . '.' . $file->getClientOriginalExtension();
$path = 'bukti-foto/' . $bukti_foto;
Storage::disk('public')->put($path, file_get_contents($file));
}
TransactionDescription::create([
'transaction_id' => $request->transaction_id,
'status' => 'sent',
'background' => 'bg-seller',
'user' => Auth::user()->email,
'judul' => 'fas fa-check',
'deskripsi' => 'Pesanan telah sampai di tempat pembeli. Keterangan: '.$request->keterangan_bukti,
'bukti_foto' => $bukti_foto,
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Pesanan telah sampai di tempat pembeli.',
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Gagal update status karena kesalahan server.',
]);
}
return response([
'status' => true,
'message' => 'Sukses kirim data.',
'data' => $request
]);
}
public function finishTransaction(Request $request)
{
$transactionDetail = Transaction::where('id', $request->id)->first();
try {
DB::beginTransaction();
Transaction::where('id', $request->id)->update([
Transaction::where('id', $request->input('id'))->update([
'status_transaksi' => 'finished',
'status_pembayaran' => 'settlement',
]);
TransactionDescription::create([
'transaction_id' => $request->id,
'transaction_id' => $request->input('id'),
'status' => 'finished',
'background' => 'bg-buyer',
'user' => Auth::user()->email,
'user' => auth()->user()->email,
'judul' => 'fas fa-check',
'deskripsi' => 'Pesanan telah diselesaikan oleh ' . auth()->user()->nama_depan . '.',
]);
$url = route('user-transaction.show', ['id' => $transactionDetail->id]);
$notif = Notification::create([
'title' => 'Transaksi Selesai',
'content' => auth()->user()->nama_depan.' telah menyelesaikan transaksi. Silahkan terima uang anda. <a href="'.$url.'">Klik disini</a> untuk langsung ke detail transaksi.',
'teaser' => auth()->user()->nama_depan.' telah...'
]);
NotificationReceiver::create([
'receiver' => $transactionDetail->penjual,
'notification_id' => $notif->id
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Pesanan telah diselesaikan oleh ' . auth()->user()->nama_depan . '.',
'receiver' => $transactionDetail->penjual
]);
} catch (Throwable $e) {
DB::rollBack();
@ -416,10 +261,13 @@ class UserTransactionController extends Controller
}
}
public function payTransaction(Request $request)
public function payPayment(Request $request)
{
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
$transactionDetail = Transaction::where('id', $request->id)->first();
$response = Http::withOptions([
'verify' => false,
])
@ -427,7 +275,7 @@ class UserTransactionController extends Controller
'Content-Type' => 'application/json',
'Authorization' => "Basic $auth",
])
->get('https://api.sandbox.midtrans.com/v2/' . $request->id . '/status');
->get('https://api.sandbox.midtrans.com/v2/' . $request->input('id') . '/status');
$result = json_decode($response->body(), true);
@ -440,8 +288,8 @@ class UserTransactionController extends Controller
return response()->json([
'status' => false,
'message' => 'Terjadi error di server.',
'data' => $result,
]);
Log::error($result);
} else {
if ($result['transaction_status'] == 'settlement') {
$transaction = 'success';
@ -455,7 +303,7 @@ class UserTransactionController extends Controller
$transaction = 'failure';
}
Transaction::where('id', $request->id)->update([
Transaction::where('id', $request->input('id'))->update([
'metode_pembayaran' => $result['payment_type'],
'tanggal_transaksi' => $result['transaction_time'],
'status_transaksi' => $transaction,
@ -466,23 +314,38 @@ class UserTransactionController extends Controller
if ($transaction == 'success') {
TransactionDescription::create([
'transaction_id' => $request->id,
'transaction_id' => $request->input('id'),
'status' => 'success',
'background' => 'bg-buyer',
'judul' => 'fas fa-money-bill',
'deskripsi' => Auth::user()->nama_depan . ' telah sukses melakukan pembayaran. Transaksi diteruskan ke penjual.',
'deskripsi' => auth()->user()->nama_depan . ' telah sukses melakukan pembayaran. Transaksi diteruskan ke penjual.',
'user' => auth()->user()->email,
]);
$url = route('user-transaction.show', ['id' => $transactionDetail->id]);
$notif = Notification::create([
'title' => 'Pembayaran Sukses',
'content' => auth()->user()->nama_depan.' telah membayar transaksi. Silahkan proses transaksi ini jika memang dituju kepada anda. <a href="'.$url.'">Klik disini</a> untuk langsung ke detail transaksi.',
'teaser' => auth()->user()->nama_depan.' telah...'
]);
NotificationReceiver::create([
'receiver' => $transactionDetail->penjual,
'notification_id' => $notif->id
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Pembayaran sukses',
'receiver' => $transactionDetail->penjual
]);
} elseif ($transaction == 'challenge') {
TransactionDescription::create([
'transaction_id' => $request->id,
'transaction_id' => $request->input('id'),
'status' => 'challenge',
'background' => 'bg-primary',
'judul' => 'fas fa-clock',
@ -491,6 +354,19 @@ class UserTransactionController extends Controller
'keterangan' => $result['status_message'],
]);
$options = [
'cluster' => 'ap1',
'useTLS' => true,
];
$pusher = new Pusher('3e5bdc20dddd7fbc655e', 'f2274c37c616d29ff590', '1659859', $options);
$payload = [
'service' => 'Transaksi'
];
$pusher->trigger('chanel-update-notifikasi-untuk-admin', 'event-update-notifikasi-untuk-admin', $payload);
DB::commit();
return response()->json([
@ -499,7 +375,7 @@ class UserTransactionController extends Controller
]);
} else {
TransactionDescription::create([
'transaction_id' => $request->id,
'transaction_id' => $request->input('id'),
'status' => 'failure',
'background' => 'bg-primary',
'judul' => 'fas fa-exclamation',
@ -526,11 +402,9 @@ class UserTransactionController extends Controller
'message' => 'Transaksi pembayaran gagal.',
]);
}
return response()->json();
}
public function cancelTransaction(Request $request)
public function cancelPayment(Request $request)
{
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
@ -541,27 +415,27 @@ class UserTransactionController extends Controller
'Content-Type' => 'application/json',
'Authorization' => "Basic $auth",
])
->post('https://api.sandbox.midtrans.com/v2/' . $request->id . '/cancel');
->post('https://api.sandbox.midtrans.com/v2/' . $request->input('id') . '/cancel');
$result = json_decode($response->body(), true);
$code = substr($result['status_code'], 0, 1);
if ($code == '4') {
if (in_array($result['status_code'], ['412','401'])) {
return response()->json([
'status' => false,
'message' => 'Transaksi gagal.',
]);
Log::error($result);
} else {
try {
DB::beginTransaction();
Transaction::where('id', $request->id)->update([
Transaction::where('id', $request->input('id'))->update([
'status_transaksi' => 'failure',
'status_pembayaran' => $result['transaction_status'],
'status_pembayaran' => 'cancel'
]);
TransactionDescription::create([
'transaction_id' => $request->id,
'transaction_id' => $request->input('id'),
'status' => 'cancel',
'background' => 'bg-buyer',
'judul' => 'fas fa-exclamation',
@ -588,7 +462,97 @@ class UserTransactionController extends Controller
}
}
public function pendingTransaction(Request $request)
public function cancelTransaction(Request $request){
$transaction = Transaction::where('id', $request->input('id'))->first();
$params = [
'refund_key' => $request->input('id') . '-ref1',
'amount' => $transaction->total_bayar,
'reason' => $request->input('complaint'),
];
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
$response = Http::withOptions([
'verify' => false,
])
->withHeaders([
'Content-Type' => 'application/json',
'Authorization' => "Basic $auth",
])
->post('https://api.sandbox.midtrans.com/v2/' . $request->input('id') . '/refund', $params);
$result = json_decode($response->body(), true);
$code = $result['status_code'];
$code = '200';
if ($code == '200') {
try {
DB::beginTransaction();
Transaction::where('id', $request->input('id'))->update([
'status_transaksi' => 'failure',
'status_pembayaran' => 'refund',
]);
Refund::create([
'transaction_id' => $request->input('id'),
'total' => $transaction->total_bayar,
'due_date' => now(),
'status' => 'refund',
'complaint' => $request->input('complaint'),
]);
TransactionDescription::create([
'transaction_id' => $request->input('id'),
'status' => 'refund',
'background' => 'bg-seller',
'user' => auth()->user()->email,
'judul' => 'fas fa-times',
'deskripsi' => 'Transaksi dibatalkan oleh ' . auth()->user()->nama_depan . '. Alasan : ' . $request->input('complaint'),
]);
$url = route('user-transaction.show', ['id' => $transaction->id]);
$notif = Notification::create([
'title' => 'Transaksi Dibatalkan',
'content' => auth()->user()->nama_depan.' telah membatalkan transaksi. <a href="'.$url.'">Klik disini</a> untuk langsung ke detail transaksi.',
'teaser' => auth()->user()->nama_depan.' telah...'
]);
NotificationReceiver::create([
'receiver' => $transaction->penjual,
'notification_id' => $notif->id
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Transaksi telah dibatalkan.',
'receiver' => $transaction->penjual
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Gagal update status karena kesalahan server.',
]);
}
} else {
Log::error($result['status_message']);
return response()->json([
'status' => false,
'message' => 'Transaksi gagal',
]);
}
}
public function pendingPayment(Request $request)
{
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
@ -599,14 +563,14 @@ class UserTransactionController extends Controller
'Content-Type' => 'application/json',
'Authorization' => "Basic $auth",
])
->get('https://api.sandbox.midtrans.com/v2/' . $request->id . '/status');
->get('https://api.sandbox.midtrans.com/v2/' . $request->input('id') . '/status');
$result = json_decode($response->body(), true);
try {
DB::beginTransaction();
Transaction::where('id', $request->id)->update([
Transaction::where('id', $request->input('id'))->update([
'status_pembayaran' => $result['transaction_status'],
]);
@ -614,7 +578,7 @@ class UserTransactionController extends Controller
return response()->json([
'status' => true,
'message' => 'Pembayaran di-pending, silahkan masuk lagi dan bayar secepat mungkin.',
'message' => 'Pembayaran di-pending, silahkan lalukan pembayaran lagi.',
]);
} catch (Throwable $e) {
DB::rollBack();
@ -630,10 +594,12 @@ class UserTransactionController extends Controller
public function complaintTransaction($id)
{
return view('user.refund.new-refund', compact('id'));
return response()->json([
'id' => $id
]);
}
public function onErrorTransaction(Request $request)
public function errorPayment(Request $request)
{
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
@ -644,20 +610,20 @@ class UserTransactionController extends Controller
'Content-Type' => 'application/json',
'Authorization' => "Basic $auth",
])
->get('https://api.sandbox.midtrans.com/v2/' . $request->id . '/status');
->get('https://api.sandbox.midtrans.com/v2/' . $request->input('id') . '/status');
$result = json_decode($response->body(), true);
try {
DB::beginTransaction();
Transaction::where('id', $request->id)->update([
Transaction::where('id', $request->input('id'))->update([
'status_pembayaran' => $result['transaction_status'],
]);
if ($result['transaction_status'] == 'expire') {
TransactionDescription::create([
'transaction_id' => $request->id,
'transaction_id' => $request->input('id'),
'status' => 'cancel',
'background' => 'bg-buyer',
'judul' => 'fas fa-exclamation',
@ -671,9 +637,9 @@ class UserTransactionController extends Controller
'status' => false,
'message' => 'Pembayaran sudah expire, silahkan buat transaksi baru.',
]);
} elseif ($result['transaction'] == 'failure') {
} elseif ($result['transaction_status'] == 'failure') {
TransactionDescription::create([
'transaction_id' => $request->id,
'transaction_id' => $request->input('id'),
'status' => 'failure',
'background' => 'bg-buyer',
'judul' => 'fas fa-exclamation',
@ -690,7 +656,7 @@ class UserTransactionController extends Controller
]);
} else {
TransactionDescription::create([
'transaction_id' => $request->id,
'transaction_id' => $request->input('id'),
'status' => $result['transaction_status'],
'background' => 'bg-primary',
'judul' => 'fas fa-exclamation',
@ -719,7 +685,7 @@ class UserTransactionController extends Controller
}
}
public function onCloseTransaction(Request $request)
public function closePayment(Request $request)
{
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
@ -734,12 +700,12 @@ class UserTransactionController extends Controller
$result = json_decode($response->body(), true);
$status = $result['transaction_status'] == null ? '' : $result['transaction_status'];
$status = $result['status_code'] == '404' ? '' : $result['transaction_status'];
if ($status == '') {
return response()->json([
'status' => true,
'message' => 'On Close',
'message' => 'Halaman pembayaran telah ditutup. Silahkan lakukan pembayaran lagi.',
]);
} else {
try {
@ -817,12 +783,55 @@ class UserTransactionController extends Controller
return response()->json([
'status' => false,
'message' => 'Terjadi error di bagian server.',
'data' => $result
]);
}
}
}
public function listTransaction(Request $request){
public function listPembeli(Request $request)
{
try{
$subQuery = Transaction::join('users','transactions.penjual','=','users.email')
->where('transactions.pembeli',auth()->user()->email)
->select(
'transactions.id',
DB::raw("CONCAT(users.nama_depan,' ',users.nama_belakang) as nama_penjual"),
'transactions.nama_barang',
'transactions.total_harga',
'transactions.created_at',
'transactions.status_transaksi',
'transactions.token'
);
if($request->has('search') && !empty($request->search)){
$searchPembeli = $request->search;
if(!is_numeric($searchPembeli)){
$subQuery->where(function($a) use ($searchPembeli){
$a->whereRaw("LOWER(CONCAT(users.nama_depan,' ',users.nama_belakang)) LIKE ?",['%'.strtolower($searchPembeli).'%'])
->orWhereRaw('LOWER(transactions.nama_barang) LIKE ?',['%'.strtolower($searchPembeli).'%'])
->orWhereRaw('LOWER(transactions.status_transaksi) LIKE ?',['%'.strtolower($searchPembeli).'%']);
});
}else{
$subQuery->where(function($a) use ($searchPembeli){
$a->where('transactions.total_harga','=',$searchPembeli);
});
}
}
$queryPembeli = Transaction::from(DB::raw("({$subQuery->toSql()}) as tmp"))
->mergeBindings($subQuery->getQuery()) // Menggabungkan binding parameters
->select('*')
->get();
return response()->json($queryPembeli);
}catch(Throwable $e){
Log::error($e->getMessage());
return response()->json(['success' => false, 'message' => 'Terjadi Kesalahan pada sisi server']);
}
}
}

View File

@ -0,0 +1,343 @@
<?php
namespace App\Http\Controllers\API\Penjual;
use Throwable;
use App\Models\Refund;
use App\Models\transaction;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use App\Http\Controllers\Controller;
use App\Models\Notification;
use App\Models\NotificationReceiver;
use Illuminate\Support\Facades\Http;
use App\Models\TransactionDescription;
use Illuminate\Support\Facades\Storage;
use Yajra\DataTables\Facades\DataTables;
class PenjualApiController extends Controller
{
public function acceptTransaction(Request $request)
{
$transactionDetail = Transaction::where('id', $request->id)->first();
try {
DB::beginTransaction();
Transaction::where('id', $request->input('id'))->update([
'status_transaksi' => 'process',
]);
TransactionDescription::create([
'transaction_id' => $request->input('id'),
'status' => 'process',
'background' => 'bg-seller',
'user' => auth()->user()->email,
'judul' => 'fas fa-handshake',
'deskripsi' => 'Transaksi telah diterima oleh ' . auth()->user()->nama_depan,
]);
$url = route('user-transaction.show', ['id' => $transactionDetail->id]);
$notif = Notification::create([
'title' => 'Transaksi Diproses',
'content' => auth()->user()->nama_depan.' telah menerima dan memproses transaksi. <a href="'.$url.'">Klik disini</a> untuk langsung ke detail transaksi.',
'teaser' => auth()->user()->nama_depan.' telah...'
]);
NotificationReceiver::create([
'receiver' => $transactionDetail->pembeli,
'notification_id' => $notif->id
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Transaksi telah diterima. Siapkan pesanan untuk dikirim ke penjual.',
'receiver' => $transactionDetail->pembeli
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Gagal update status karena kesalahan server.',
]);
}
}
public function rejectTransaction(Request $request)
{
$transaction = Transaction::where('id', $request->input('id'))->first();
$params = [
'refund_key' => $request->input('id') . '-ref1',
'amount' => $transaction->total_bayar,
'reason' => $request->input('complaint'),
];
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
$response = Http::withOptions([
'verify' => false,
])
->withHeaders([
'Content-Type' => 'application/json',
'Authorization' => "Basic $auth",
])
->post('https://api.sandbox.midtrans.com/v2/' . $request->input('id') . '/refund', $params);
$result = json_decode($response->body(), true);
$code = $result['status_code'];
$code = '200';
if ($code == '200') {
try {
DB::beginTransaction();
Transaction::where('id', $request->input('id'))->update([
'status_transaksi' => 'failure',
'status_pembayaran' => 'refund',
]);
Refund::create([
'transaction_id' => $request->input('id'),
'total' => $transaction->total_bayar,
'due_date' => now(),
'status' => 'refund',
'complaint' => $request->input('complaint'),
]);
TransactionDescription::create([
'transaction_id' => $request->input('id'),
'status' => 'refund',
'background' => 'bg-seller',
'user' => auth()->user()->email,
'judul' => 'fas fa-times',
'deskripsi' => 'Transaksi ditolak ' . auth()->user()->nama_depan . ', uang akan dikembalikan ke pembeli. Alasan : ' . $request->input('complaint'),
]);
$url = route('user-transaction.show', ['id' => $transaction->id]);
$notif = Notification::create([
'title' => 'Transaksi Diproses',
'content' => auth()->user()->nama_depan.' telah menolak transaksi.<a href="'.$url.'">Klik disini</a> untuk langsung ke detail transaksi.',
'teaser' => auth()->user()->nama_depan.' telah...'
]);
NotificationReceiver::create([
'receiver' => $transaction->pembeli,
'notification_id' => $notif->id
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Transaksi telah ditolak. Uang akan dikirimkan ke pembeli.',
'receiver' => $transaction->pembeli
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Gagal update status karena kesalahan server.',
]);
}
} else {
Log::error($result['status_message']);
return response()->json([
'status' => false,
'message' => 'Transaksi gagal',
]);
}
}
public function sendingOrder(Request $request)
{
try {
DB::beginTransaction();
Transaction::where('id', $request->input('id'))->update([
'status_transaksi' => 'sending',
]);
TransactionDescription::create([
'transaction_id' => $request->input('id'),
'status' => 'sending',
'background' => 'bg-seller',
'user' => auth()->user()->email,
'judul' => 'fas fa-truck-moving',
'deskripsi' => 'Pesanan telah dikirim oleh ' . auth()->user()->nama_depan . ' dan sedang dalam perjalanan menuju pembeli.',
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Pesanan sedang dikirim dan menuju pembeli.',
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Gagal update status karena kesalahan server.',
]);
}
}
public function sentOrder(Request $request)
{
$transactionDetail = Transaction::where('id', $request->transaction_id)->first();
try {
DB::beginTransaction();
Transaction::where('id', $request->input('id'))->update([
'status_transaksi' => 'sent',
]);
$bukti_foto = '';
if ($request->hasFile('bukti_foto')) {
$file = $request->file('bukti_foto');
$bukti_foto = time() . '.' . $file->getClientOriginalExtension();
$path = 'bukti-foto/' . $bukti_foto;
Storage::disk('public')->put($path, file_get_contents($file));
}
TransactionDescription::create([
'transaction_id' => $request->input('id'),
'status' => 'sent',
'background' => 'bg-seller',
'user' => auth()->user()->email,
'judul' => 'fas fa-check',
'deskripsi' => 'Pesanan telah sampai di tempat pembeli. Keterangan: ' . $request->keterangan_bukti,
'bukti_foto' => $bukti_foto,
]);
$url = route('user-transaction.show', ['id' => $transactionDetail->id]);
$notif = Notification::create([
'title' => 'Transaksi Sudah Tiba',
'content' => 'Transaksi sudah tiba dan silahkan periksa terlebih dahulu sebelum menyelesaikan transaksi atau mengajukan refund. <a href="'.$url.'">Klik disini</a> untuk langsung ke detail transaksi.',
'teaser' => 'Transaksi sudah tiba dan silahkan per...',
]);
NotificationReceiver::create([
'receiver' => $transactionDetail->pembeli,
'notification_id' => $notif->id
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Pesanan telah sampai di tempat pembeli.',
'receiver' => $transactionDetail->pembeli
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Gagal update status karena kesalahan server.',
]);
}
return response([
'status' => true,
'message' => 'Sukses kirim data.',
'data' => $request,
]);
}
public function listPenjual(Request $request)
{
try {
$subQuery = Transaction::join('users', 'transactions.pembeli', '=', 'users.email')
->where('transactions.penjual', auth()->user()->email)
->select('transactions.id', DB::raw("CONCAT(users.nama_depan,' ',users.nama_belakang) as nama_pembeli"), 'transactions.nama_barang', 'transactions.total_harga', 'transactions.created_at', 'transactions.status_transaksi');
if ($request->has('search') && !empty($request->search)) {
$searchPenjual = $request->search;
if (!is_numeric($searchPenjual)) {
$subQuery->where(function ($a) use ($searchPenjual) {
$a->whereRaw("LOWER(CONCAT(users.nama_depan,' ',users.nama_belakang)) LIKE ?", ['%' . strtolower($searchPenjual) . '%'])
->orWhereRaw('LOWER(transactions.nama_barang) LIKE ?', ['%' . strtolower($searchPenjual) . '%'])
->orWhereRaw('LOWER(transactions.status_transaksi) LIKE ?', ['%' . strtolower($searchPenjual) . '%']);
});
} else {
$subQuery->where(function ($a) use ($searchPenjual) {
$a->whereDay('transactions.created_at', '=', $searchPenjual)
->orWhereMonth('transactions.created_at', '=', $searchPenjual)
->orWhereYear('transactions.created_at', '=', $searchPenjual)
->orWhere('transactions.total_harga', '=', $searchPenjual);
});
}
}
$queryPenjual = Transaction::from(DB::raw("({$subQuery->toSql()}) as tmp"))
->mergeBindings($subQuery->getQuery()) // Menggabungkan binding parameters
->select('*')
->get();
return response()->json($queryPenjual);
} catch (Throwable $e) {
Log::error($e->getMessage());
return response()->json(['success' => false, 'message' => 'Terjadi Kesalahan pada sisi server']);
}
}
public function acceptResult(Request $request){
try{
DB::beginTransaction();
Transaction::where('id', $request->input('id'))->update([
'status_transaction' => 'done'
]);
TransactionDescription::create([
'transaction_id' => $request->input('id'),
'status' => 'sent',
'background' => 'bg-seller',
'user' => auth()->user()->email,
'judul' => 'fas fa-money-bill',
'deskripsi' => auth()->user()->nama_depan.' telah menerima uang.',
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Uang akan dikirim ke bank anda. Terima kasih telah menggunakan Rekber.'
]);
}catch(Throwable $e){
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Gagal update status karena kesalahan server.',
]);
}
}
}

View File

@ -0,0 +1,105 @@
<?php
namespace App\Http\Controllers\API\Profile;
use App\Http\Controllers\Controller;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
use Laravolt\Indonesia\Models\City;
use Laravolt\Indonesia\Models\District;
use Laravolt\Indonesia\Models\Provinsi;
use Laravolt\Indonesia\Models\Village;
use Throwable;
use Tymon\JWTAuth\Facades\JWTAuth;
class ProfileApiController extends Controller
{
public function getProfile()
{
$token = JWTAuth::getToken();
$user = JWTAuth::user($token);
return response()->json([
'user' => $user,
]);
}
public function updateProfile(Request $request)
{
$nama_depan = $request->input('nama_depan');
$nama_belakang = $request->input('nama_belakang');
$nohp = $request->input('nohp');
$kode_kelurahan = $request->input('kelurahan');
$alamat = $request->input('alamat');
$nama_bank = $request->input('nama_bank');
$no_rek = $request->input('no_rek');
$foto_profile = '';
if ($request->hasFile('foto')) {
$file = $request->file('foto');
$foto_profile = 'Foto_Profil_' . str_replace(' ', '_', $request->input('nama_depan')) . '_' . str_replace(' ', '_', $request->input('nama_belakang')).'.'. $file->getClientOriginalExtension();
$path = 'foto-profile/' . $foto_profile;
Storage::disk('public')->put($path, file_get_contents($file));
}
try {
DB::beginTransaction();
User::where('id', auth()->user()->id)->update([
'nama_depan' => $nama_depan,
'nama_belakang' => $nama_belakang,
'nohp' => $nohp,
'kode_kelurahan' => $kode_kelurahan,
'alamat' => $alamat,
'nama_bank' => $nama_bank,
'no_rek' => $no_rek,
'foto_profile' => $foto_profile,
]);
DB::commit();
return response()->json(['status' => true, 'message' => 'Data Profile berhasil diupdate']);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json(['status' => false, 'message' => 'Terjadi Kesalahan pada sisi server']);
}
}
public function updateProfilePassword(Request $request){
$currentPassword = $request->input('current_password');
$newPassword = $request->input('new_password');
$renewPassword = $request->input('renew_password');
if(!Hash::check($currentPassword, auth()->user()->password)){
return response()->json(['status' => false, 'message' => 'Password sekarang tidak sama']);
}
if($renewPassword != $newPassword){
return response()->json(['status' => false, 'message' => 'Ketikan ulang password baru']);
}
try{
DB::beginTransaction();
User::where('id', auth()->user()->id)->update([
'password' => Hash::make($newPassword)
]);
DB::commit();
return response()->json(['status' => true, 'message' => 'Password Berhasil diubah']);
}catch(Throwable $e){
DB::rollBack();
Log::error($e->getMessage());
return response()->json(['status' => false, 'message' => 'Terjadi Kesalahan pada sisi server']);
}
}
}

View File

@ -0,0 +1,149 @@
<?php
namespace App\Http\Controllers\API\Refund;
use Throwable;
use Carbon\Carbon;
use App\Models\Refund;
use App\Models\Transaction;
use Illuminate\Http\Request;
use App\Models\RefundDescription;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use App\Http\Controllers\Controller;
use App\Models\TransactionDescription;
use Yajra\DataTables\Facades\DataTables;
class RefundApiController extends Controller
{
public function createRefund(Request $request)
{
return response()->json(['transaction_id' => $request->input('id')]);
}
public function storeRefund(Request $request){
$now = Carbon::now();
$due_date = $now->addDays(2)->toDateTimeString();
try{
DB::beginTransaction();
$transaction = Transaction::where('id',$request->input('id'))->first();
Transaction::where('id', $request->input('id'))->update([
'status_transaksi' => 'refund'
]);
$refund = Refund::create([
'transaction_id' => $request->input('id'),
'total' => $transaction->total_harga,
'due_date' => $due_date,
'complaint' => $request->input('complaint')
]);
if ($request->hasFile('files')) {
$files = $request->file('files');
foreach ($files as $file) {
$filename = $file->getClientOriginalName();
$mime = $file->getClientMimeType();
if (strpos($mime, 'image') !== false) {
$type = 'image';
$file->storeAs('public/refund-image/', $filename);
} elseif (strpos($mime, 'video') !== false) {
$type = 'video';
$file->storeAs('public/refund-video/', $filename);
} else {
$type = 'Other';
}
RefundDescription::create([
'refund_id' => $refund->id,
'filename' => $filename,
'type' => $type
]);
}
}
TransactionDescription::create([
'transaction_id' => $request->input('id'),
'status' => 'pending',
'user' => auth()->user()->email,
'judul' => 'fas fa-clock',
'background' => 'bg-buyer',
'deskripsi' => auth()->user()->nama_depan.' mengajukan refund.',
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Permintaan refund anda telah dikirim ke admin untuk direview. Mohon tunggu maksimal 2 hari.',
]);
}catch(Throwable $e){
DB::rollback();
Log::error($e->getMessage());
return response()->json(['success' => false, 'message' => 'Terjadi kesalahan pada sisi server']);
}
}
public function getDetailRefund(Request $request){
$refund = Refund::find($request->input('id'));
$refundDescription = RefundDescription::where('refund_id',$request->input('id'))->get();
return response()->json([
'refund' => $refund,
'descriptions' => $refundDescription
]);
}
public function listRefund(Request $request)
{
try{
$subQuery = Refund::join('transactions', 'refunds.transaction_id', '=', 'transactions.id')
->join('users as s', 'transactions.penjual','=','s.email')
->select(
'refunds.id',
'refunds.total',
'refunds.due_date',
'refunds.created_at',
'refunds.status',
'transactions.nama_barang',
DB::raw("CONCAT(s.nama_depan,' ',s.nama_belakang) as nama_penjual"),
);
if($request->has('search') && !empty($request->search['value'])){
$searchRefund = $request->search['value'];
if(!is_numeric($searchRefund)){
$subQuery->where(function($a) use ($searchRefund){
$a->whereRaw("LOWER(CONCAT(s.nama_depan,' ',s.nama_belakang)) LIKE ?",['%'.strtolower($searchRefund).'%'])
->orWhereRaw('LOWER(transactions.nama_barang) LIKE ?',['%'.strtolower($searchRefund).'%'])
->orWhereRaw('LOWER(refunds.status) LIKE ?',['%'.strtolower($searchRefund).'%']);
});
}else{
$subQuery->where(function($a) use ($searchRefund){
$a->whereDay('refunds.created_at', '=', $searchRefund)
->orWhereMonth('refunds.created_at', '=', $searchRefund)
->orWhereYear('refunds.created_at', '=', $searchRefund)
->orWhereDay('refunds.due_date', '=', $searchRefund)
->orWhereMonth('refunds.due_date', '=', $searchRefund)
->orWhereYear('refunds.due_date', '=', $searchRefund)
->orWhere('refunds.total', '=', $searchRefund);
});
}
}
$queryRefund = Refund::from(DB::raw("({$subQuery->toSql()}) as tmp"))
->mergeBindings($subQuery->getQuery()) // Menggabungkan binding parameters
->select('*')
->get();
return response()->json($queryRefund);
}catch(Throwable $e){
Log::error($e->getMessage());
return response()->json(['success' => false, 'message' => 'Terjadi Kesalahan pada sisi server']);
}
}
}

View File

@ -0,0 +1,29 @@
<?php
namespace App\Http\Controllers\API\Transaction;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\TransactionDescription;
use App\Models\Transaction;
class TransactionApiController extends Controller
{
public function getTrackingTransaction(Request $request){
$data = TransactionDescription::where('transaction_id', $request->input('id'))->get();
return response()->json([
'data' => $data
]);
}
public function getDetailTransaction(Request $request)
{
return response()->json([
'transaction' => Transaction::findOrFail($request->input('id')),
'trackings' => TransactionDescription::where('transaction_id', $request->input('id'))
->latest()
->get(),
]);
}
}

View File

@ -1,85 +0,0 @@
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Carbon\Carbon;
use App\Models\Transactions;
use App\Models\Transaction;
use App\Models\Refund;
use App\Models\User;
use Illuminate\Support\Facades\Auth;
class AdminDashboardController extends Controller
{
public function index()
{
$transactions = Transactions::allTransactions();
$currentMonth = Carbon::now()->month;
$currentYear = Carbon::now()->year;
$countSuccess = Transaction::where('status_pembayaran', 'settlement')
->whereMonth('updated_at', $currentMonth)
->whereYear('updated_at', $currentYear)
->count();
$countPending = Transaction::where('status_pembayaran', 'pending')
->whereMonth('updated_at', $currentMonth)
->whereYear('updated_at', $currentYear)
->count();
$countCancelled = Transaction::where('status_pembayaran', 'cancel')
->whereMonth('updated_at', $currentMonth)
->whereYear('updated_at', $currentYear)
->count();
$countRefund = Transaction::where('status_pembayaran', 'refund')
->whereMonth('updated_at', $currentMonth)
->whereYear('updated_at', $currentYear)
->count();
$totalTransaction = Transaction::whereMonth('updated_at', $currentMonth)
->whereYear('updated_at', $currentYear)
->count();
$dataChartTransaction = [];
$dataChartRefund = [];
$totalRefund = Transaction::where('status_pembayaran', 'refund')->count();
$dataChartTotalRefund = [];
$totalUser = User::where('status', 'Finished')->count();
$dataChartTotalUser = [];
for ($bulan = 1; $bulan <= 12; $bulan++) {
$transaction = Transaction::whereMonth('updated_at', $bulan)
->whereYear('updated_at', $currentYear)
->where('status_pembayaran', 'settlement')
->sum('total_bayar')/100;
$refund = Transaction::whereMonth('updated_at', $bulan)
->whereYear('updated_at', $currentYear)
->where('status_pembayaran', 'refund')
->sum('total_harga')/100;
$dataChartTransaction[] = intval($transaction);
$dataChartRefund[] = intval($refund);
}
$transactions = Transaction::latest()
->get();
return view('admin.index', compact('transactions', 'countSuccess', 'countPending', 'countCancelled', 'countRefund', 'totalRefund', 'totalUser', 'totalTransaction', 'dataChartTransaction', 'dataChartRefund', 'dataChartTotalUser', 'dataChartTotalRefund', 'transactions'));
}
public function getChartByMonth()
{
$dataChartLaporan = [];
$tahun = Carbon::now()->year;
}
public function getCharByYear()
{
}
}

View File

@ -1,176 +0,0 @@
<?php
namespace App\Http\Controllers\Admin;
use Throwable;
use App\Models\Refund;
use App\Models\Transaction;
use Illuminate\Http\Request;
use Yajra\DataTables\DataTables;
use App\Models\RefundDescription;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use App\Http\Controllers\Controller;
use App\Models\TransactionDescription;
class AdminRefundController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
return view('admin.refund.index', [
'refunds' => Refund::latest()->get(),
]);
}
/**
* Display the specified resource.
*/
public function show($id)
{
$refund = Refund::find($id);
$refundDescription = RefundDescription::where('refund_id', $id)->get();
return view('admin.refund.detail-refund', [
'refund' => $refund,
'descriptions' => $refundDescription,
]);
}
public function approveRefund(Request $request)
{
$refund = Refund::where('id', $request->id)->first();
$params = [
'refund_key' => $request->id . '-ref1',
'amount' => $refund->total,
'reason' => $refund->complaint,
];
// $refundMidtrans = Trans::refund($request->id, $params);
try {
Transaction::where('id', $refund->transaction_id)->update([
'status_transaksi' => 'refund',
'status_pembayaran' => 'refund'
]);
Refund::where('id', $request->id)->update([
'status' => 'refund',
]);
TransactionDescription::create([
'transaction_id' => $refund->transaction_id,
'status' => 'refund',
'user' => auth()->user()->email,
'judul' => 'fas fa-long-arrow-alt-left',
'background' => 'bg-primary',
'deskripsi' => 'Admin telah menyetujui refund.',
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Refund berhasil dilakukan. Uang akan dikembalikan ke pembeli.',
// 'refundMidtrans' => $refundMidtrans,
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Refund gagal dilakukan',
// 'refundMidtrans' => $refundMidtrans
]);
}
}
public function denyRefund(Request $request)
{
$refund = Refund::where('id', $request->id)->first();
try {
Transaction::where('id', $refund->transaction_id)->update([
'status_transaksi' => 'finished',
'status_pembayaran' => 'settlement'
]);
Refund::where('id', $request->id)->update([
'status' => 'deny',
]);
TransactionDescription::create([
'transaction_id' => $refund->transaction_id,
'status' => 'deny',
'user' => auth()->user()->email,
'judul' => 'fas fa-long-arrow-alt-right',
'background' => 'bg-primary',
'deskripsi' => 'Admin telah menolak refund. Transaksi akan diteruskan ke penjual',
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Refund berhasil ditolak. Transaksi diselesaikan dan uang disampaikan ke penjual.'
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Refund gagal dilakukan',
]);
}
}
public function listRefund(Request $request)
{
$subQuery = Refund::with('transaction')
->select('id', 'pembeli', 'nama_barang', 'penjual', 'total', 'tanggal_transaksi', 'batas_konfirmasi_transaksi', 'status');
if ($request->has('search') && !empty($request->search['value'])) {
$searchRefund = $request->search['value'];
$subQuery->where(function ($a) use ($searchRefund) {
$a->whereRaw('pembeli LIKE ?', ['%' . $searchRefund . '%'])
->orWhereRaw('nama_barang LIKE ?', ['%' . $searchRefund . '%'])
->orWhereRaw('penjual LIKE ?', ['%' . $searchRefund . '%']);
});
}
$queryRefund = Refund::from(DB::raw("({$subQuery->toSql()}) as tmp"))
->mergeBindings($subQuery->getQuery()) // Menggabungkan binding parameters
->select('*')
->get();
if ($request->ajax()) {
return DataTables::of($queryRefund)
->addIndexColumn()
->addColumn('aksi', function ($row) {
$url = route('admin-refund.show', ['id' => $row->id]);
$html_code = '
<div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
....
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item"
href="'.$url.'">Detail</a>
</li>
</ul>
</div>';
return $html_code;
})
->rawColumns(['aksi'])
->make(true);
}
}
}

View File

@ -1,56 +0,0 @@
<?php
namespace App\Http\Controllers\Admin;
use App\Models\Transaction;
use App\Http\Controllers\Controller;
use App\Models\TransactionDescription;
use Illuminate\Http\Request;
use Throwable;
class AdminTransactionController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
return view('admin.transaction.index', [
'transactions' => Transaction::latest()
->get(),
]);
}
/**
* Display the specified resource.
*/
public function show($id)
{
return view('admin.transaction.detail-transaction', [
'transaction' => Transaction::findOrFail($id),
'trackings' => TransactionDescription::where('transaction_id', $id)
->latest()
->get(),
]);
}
public function aprroveTransaction($id){
try{
}catch(Throwable $e){
}
}
public function denyTransaction($id){
try{
}catch(Throwable $e){
}
}
public function listTransaction(Request $request){
}
}

View File

@ -0,0 +1,376 @@
<?php
namespace App\Http\Controllers\Admin\Dashboard;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Carbon\Carbon;
use App\Models\Transaction;
use App\Models\Refund;
use App\Models\User;
use DateInterval;
use DateTime;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
class AdminDashboardController extends Controller
{
public function index()
{
$today = new DateTime();
$todayDate = $today->format('Y-m-d');
$pickDate = new DateTime();
$interval = new DateInterval('P29D');
$start = $pickDate->sub($interval);
$startDate = $start->format('Y-m-d');
$intervalBefore = new DateInterval('P1D');
$intervalBeforeStart = new DateInterval('P29D');
$endBefore = $pickDate->sub($intervalBefore);
$endBeforeDate = $endBefore->format('Y-m-d');
$startBefore = $pickDate->sub($intervalBeforeStart);
$startBeforeDate = $startBefore->format('Y-m-d');
$countSuccess = Transaction::whereIn('status_transaksi', ['done'])
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->count(); // selesai
$countProcessed = Transaction::whereIn('status_transaksi', ['process', 'sending', 'sent', 'success', 'finished'])
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->count(); // diproses
$countCancelled = Transaction::where('status_transaksi', 'failure')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->count(); //gagal
$countIndicated = Transaction::where('status_transaksi', 'challenge')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->count(); // terindikasi
$countWaiting = Transaction::where('status_transaksi', 'created_at')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->count(); // terindikasi
$totalTransaction = Transaction::whereNotIn('status_transaksi', ['refund'])
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->count(); // transaksi
$totalTransactionSebelum = Transaction::whereNotIn('status_transaksi', ['refund', 'created'])
->whereDate('created_at', '>=', $startBeforeDate)
->whereDate('created_at', '<=', $endBeforeDate)
->count(); // transaksi sebelum
$rateTransaction = floatval((floatval($totalTransaction)-floatval($totalTransactionSebelum))*100)/ ($totalTransactionSebelum == 0 ? 1 : floatval($totalTransactionSebelum));
$countPending = Refund::where('status', 'pending')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->count(); //ajuan
$countApprove = Refund::where('status', 'refund')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->count(); // disetujui
$countDeny = Refund::where('status', 'deny')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->count(); // ditolak
$totalRefund = Refund::whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->count(); // refund
$totalRefundSebelum = Refund::whereDate('created_at', '>=', $startBeforeDate)
->whereDate('created_at', '<=', $endBeforeDate)
->count(); // refund sebelum
$rateRefund = floatval((floatval($totalRefund)-floatval($totalRefundSebelum))*100)/ ($totalRefundSebelum == 0 ? 1 : floatval($totalRefundSebelum));
$totalUser = User::where('role', 'User')
->where('status', 'Finished')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->count();
$totalUserSebelum = User::where('role', 'User')
->where('status', 'Finished')
->whereDate('created_at', '>=', $startBeforeDate)
->whereDate('created_at', '<=', $endBeforeDate)
->count();
$rateUser = floatval((floatval($totalUser)-floatval($totalUserSebelum))*100)/ ($totalUserSebelum == 0 ? 1 : floatval($totalUserSebelum));
$totalProfit = Transaction::whereIn('status_transaksi', ['done', 'finished'])
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->sum('total_keuntungan');
$totalProfitSebelum = Transaction::whereIn('status_transaksi', ['done', 'finished'])
->whereDate('created_at', '>=', $startBeforeDate)
->whereDate('created_at', '<=', $endBeforeDate)
->sum('total_keuntungan');
$rateProfit = floatval((floatval($totalProfit)-floatval($totalProfitSebelum))*100)/ ($totalProfitSebelum == 0 ? 1 : floatval($totalProfitSebelum));
$dataChartTransaction = [];
$dataChartRefund = [];
$dataChartUser = [];
$dataLabel = [];
$startDate = $start;
$intervalDate = new DateInterval('P1D');
$todayDate = $today;
$endDate = $todayDate->add($intervalDate);
for ($date = clone $startDate; $date <= $endDate; $date->modify('+1 day')) {
$transaction = Transaction::whereIn('status_transaksi', ['done', 'finished'])
->whereDate('created_at', $date->format('Y-m-d'))
->sum('total_keuntungan');
$refund = Transaction::where('status_transaksi', 'refund')
->whereDate('created_at', $date->format('Y-m-d'))
->sum('total_keuntungan');
$user = User::where('role', 'User')
->where('status', 'Finished')
->whereDate('created_at', $date->format('Y-m-d'))
->count();
$dataChartTransaction[] = floatval($transaction) / 1000;
$dataChartRefund[] = floatval($refund) / 1000;
$dataChartUser[] = intval($user);
$dataLabel[] = $date->format('d/m/Y');
}
$dataTopUsers = Transaction::selectRaw(
"
CONCAT(users.nama_depan,' ',users.nama_belakang) AS nama_lengkap,
COUNT(CASE WHEN transactions.status_transaksi = 'done' OR refunds.status = 'refund' THEN 1 ELSE NULL END) AS jumlah_transaksi,
COUNT(CASE WHEN transactions.status_transaksi = 'done' THEN 1 ELSE NULL END) AS jumlah_transaksi_berhasil,
COUNT(CASE WHEN refunds.status = 'refund' THEN 1 ELSE NULL END) AS jumlah_refund_berhasil,
SUM(CASE WHEN refunds.status = 'refund' THEN refunds.total ELSE 0 END) AS total_refund_berhasil,
SUM(CASE WHEN transactions.status_transaksi = 'done' THEN transactions.total_harga ELSE 0 END) AS total_transaksi_berhasil,
users.foto_profile
",
)
->leftJoin('refunds', 'refunds.transaction_id', '=', 'transactions.id')
->leftJoin('users', 'users.email', '=', 'transactions.pembeli')
->groupBy('nama_lengkap', 'users.foto_profile')
->orderBy('total_transaksi_berhasil', 'DESC')
->orderBy('total_refund_berhasil', 'ASC')
->whereDate('transactions.created_at', '>=', $startDate)
->whereDate('transactions.created_at', '<=', $todayDate)
->limit(5)
->get();
return view('admin.index', compact(
'countSuccess',
'countProcessed',
'countCancelled',
'countIndicated',
'countWaiting',
'totalTransaction',
'rateTransaction',
'countPending',
'countApprove',
'countDeny',
'totalRefund',
'rateRefund',
'totalUser',
'rateUser',
'rateProfit',
'dataChartTransaction',
'dataChartRefund',
'dataChartUser',
'dataLabel',
'dataTopUsers'
));
}
public function getDataBySearch(Request $request)
{
$startDate = $request->startDate; // 0
$endDate = $request->endDate; // 29
$pickDate = new DateTime($request->startDate);
$startDateTime = new DateTime($request->startDate);
$endDateTime = new DateTime($request->endDate);
$interval = $startDateTime->diff($endDateTime);
$intervalBefore = new DateInterval('P1D');
$intervalBeforeStart = new DateInterval('P'.$interval->format('%a').'D');
$endBefore = $pickDate->sub($intervalBefore);
$endBeforeDate = $endBefore->format('Y-m-d'); // -1
$startBefore = $pickDate->sub($intervalBeforeStart);
$startBeforeDate = $startBefore->format('Y-m-d'); // -29
$countSuccess = Transaction::whereIn('status_transaksi', ['done'])
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $endDate)
->count(); // selesai
$countProcessed = Transaction::whereIn('status_transaksi', ['process', 'sending', 'sent', 'success', 'finished'])
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $endDate)
->count(); // diproses
$countCancelled = Transaction::where('status_transaksi', 'failure')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $endDate)
->count(); //gagal
$countIndicated = Transaction::where('status_transaksi', 'challenge')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $endDate)
->count(); // terindikasi
$countWaiting = Transaction::where('status_transaksi', 'created')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $endDate)
->count(); // terindikasi
$totalTransaction = Transaction::whereNotIn('status_transaksi', ['refund'])
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $endDate)
->count(); // transaksi
$totalTransactionSebelum = Transaction::whereNotIn('status_transaksi', ['refund'])
->whereDate('created_at', '>=', $startBeforeDate)
->whereDate('created_at', '<=', $endBeforeDate)
->count(); // transaksi
$rateTransaction = floatval((floatval($totalTransaction)-floatval($totalTransactionSebelum))*100)/ ($totalTransactionSebelum == 0 ? 1 : floatval($totalTransactionSebelum));
$countPending = Refund::where('status', 'pending')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $endDate)
->count(); //ajuan
$countApprove = Refund::where('status', 'refund')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $endDate)
->count(); // disetujui
$countDeny = Refund::where('status', 'deny')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $endDate)
->count(); // ditolak
$totalRefund = Refund::whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $endDate)
->count(); // refund
$totalRefundSebelum = Refund::whereDate('created_at', '>=', $startBeforeDate)
->whereDate('created_at', '<=', $endBeforeDate)
->count();
$rateRefund = floatval((floatval($totalRefund)-floatval($totalRefundSebelum))*100)/ ($totalRefundSebelum == 0 ? 1 : floatval($totalRefundSebelum));
$totalUser = User::where('role', 'User')
->where('status', 'Finished')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $endDate)
->count();
$totalUserSebelum = User::where('role', 'User')
->where('status', 'Finished')
->whereDate('created_at', '>=', $startBeforeDate)
->whereDate('created_at', '<=', $endBeforeDate)
->count();
$rateUser = floatval((floatval($totalUser)-floatval($totalUserSebelum))*100)/ ($totalUserSebelum == 0 ? 1 : floatval($totalUserSebelum));
$totalProfit = Transaction::where('status_transaksi', 'done')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $endDate)
->sum('total_keuntungan');
$totalProfitSebelum = Transaction::where('status_transaksi', 'done')
->whereDate('created_at', '>=', $startBeforeDate)
->whereDate('created_at', '<=', $endBeforeDate)
->sum('total_keuntungan');
$rateProfit = floatval((floatval($totalProfit)-floatval($totalProfitSebelum))*100)/ ($totalProfitSebelum == 0 ? 1 : floatval($totalProfitSebelum));
$dataChartTransaction = [];
$dataChartRefund = [];
$dataChartUser = [];
$dataLabel = [];
$first = $startDateTime;
$intervalDate = new DateInterval('P1D');
$endPlus1 = $endDateTime;
$last = $endPlus1->add($intervalDate);
for ($date = clone $first; $date <= $last; $date->modify('+1 day')) {
$transaction = Transaction::where('status_transaksi', 'done')
->whereDate('created_at', $date->format('Y-m-d'))
->sum('total_keuntungan');
$refund = Transaction::where('status_transaksi', 'refund')
->whereDate('created_at', $date->format('Y-m-d'))
->sum('total_keuntungan');
$user = User::where('role', 'User')
->where('status', 'Finished')
->whereDate('created_at', $date->format('Y-m-d'))
->count();
$dataChartTransaction[] = floatval($transaction);
$dataChartRefund[] = floatval($refund);
$dataChartUser[] = intval($user);
$dataLabel[] = $date->format('d/m/Y');
}
$dataTopUsers = Transaction::selectRaw(
"
CONCAT(users.nama_depan,' ',users.nama_belakang) AS nama_lengkap,
COUNT(CASE WHEN transactions.status_transaksi = 'done' OR refunds.status = 'refund' THEN 1 ELSE NULL END) AS jumlah_transaksi,
COUNT(CASE WHEN transactions.status_transaksi = 'done' THEN 1 ELSE NULL END) AS jumlah_transaksi_berhasil,
COUNT(CASE WHEN refunds.status = 'refund' THEN 1 ELSE NULL END) AS jumlah_refund_berhasil,
SUM(CASE WHEN refunds.status = 'refund' THEN refunds.total ELSE 0 END) AS total_refund_berhasil,
SUM(CASE WHEN transactions.status_transaksi = 'done' THEN transactions.total_harga ELSE 0 END) AS total_transaksi_berhasil,
users.foto_profile
",
)
->leftJoin('refunds', 'refunds.transaction_id', '=', 'transactions.id')
->leftJoin('users', 'users.email', 'transactions.pembeli')
->groupBy('nama_lengkap', 'users.foto_profile')
->orderBy('total_transaksi_berhasil', 'DESC')
->orderBy('total_refund_berhasil', 'ASC')
->whereDate('transactions.created_at', '>=', $startDate)
->whereDate('transactions.created_at', '<=', $endDate)
->limit(5)
->get();
return response()->json([
'countSuccess' => $countSuccess,
'countProcessed' => $countProcessed,
'countCancelled' => $countCancelled,
'countIndicated' => $countIndicated,
'countWaiting' => $countWaiting,
'totalTransaction' => $totalTransaction,
'rateTransaction' => $rateTransaction,
'countPending' => $countPending,
'countApprove' => $countApprove,
'countDeny' => $countDeny,
'totalRefund' => $totalRefund,
'rateRefund' => $rateRefund,
'totalUser' => $totalUser,
'rateUser' => $rateUser,
'rateProfit' => $rateProfit,
'dataChartTransaction' => $dataChartTransaction,
'dataChartRefund' => $dataChartRefund,
'dataChartUser' => $dataChartUser,
'dataLabel' => $dataLabel,
'dataTopUser' => $dataTopUsers,
'endDate' => $request->endDate,
]);
}
}

View File

@ -0,0 +1,326 @@
<?php
namespace App\Http\Controllers\Admin\Notification;
use App\Http\Controllers\Controller;
use App\Models\Notification;
use App\Models\NotificationReceiver;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Throwable;
use Yajra\DataTables\Facades\DataTables;
use Illuminate\Support\Str;
use Pusher\Pusher;
class AdminNotification extends Controller
{
public function index()
{
return view('admin.notification.index');
}
public function create()
{
return view('admin.notification.create');
}
public function show(Request $request)
{
$notification = Notification::where('id', $request->id)->first();
return view('admin.notification.show', compact('notification'));
}
public function selectAllUser()
{
$users = User::where('role', 'User')
->where('status', 'Finished')
->pluck('email')
->toArray();
return response()->json([
'users' => $users,
]);
}
public function listNotification(Request $request)
{
try {
$subQuery = Notification::latest('notifications.updated_at')->select('notifications.id', 'notifications.title', 'notifications.teaser', 'notifications.created_at', 'notifications.updated_at');
if ($request->has('search') && !empty($request->search['value'])) {
$searchNotif = $request->search['value'];
$subQuery->where(function ($a) use ($searchNotif) {
$a->whereRaw('LOWER(notifications.title) LIKE ?', ['%' . strtolower($searchNotif) . '%'])
->orWhereRaw('LOWER(notifications.teaser) LIKE ?', ['%' . strtolower($searchNotif) . '%']);
});
}
$queryNotif = Notification::from(DB::raw("({$subQuery->toSql()}) as tmp"))
->mergeBindings($subQuery->getQuery())
->select('*')
->get();
if ($request->ajax()) {
return DataTables::of($queryNotif)
->addIndexColumn()
->addColumn('action', function ($row) {
$detail = route('admin-notification.show', ['id' => $row->id]);
$edit = route('admin-notification.edit', ['id' => $row->id]);
$html_code =
'
<div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
....
</button>
<ul class="dropdown-menu">
<li>
<a class="dropdown-item" href="' .
$detail .
'">Detail</a>
</li>
<li>
<a class="dropdown-item" href="' .
$edit .
'">Edit</a>
</li>
<li>
<a class="dropdown-item" id="deleteNotif" data-id="' .
$row->id .
'">Hapus</a>
</li>
</ul>
</div>
';
return $html_code;
})
->rawColumns(['action'])
->make(true);
}
} catch (Throwable $e) {
Log::error($e->getMessage());
return response()->json(['success' => false, 'message' => 'Terjadi Kesalahan pada sisi server']);
}
}
public function listUserForShow(Request $request)
{
try {
$subQuery = NotificationReceiver::join('users', 'notification_receivers.receiver', '=', 'users.email')
->join('notifications', 'notification_receivers.notification_id', '=', 'notifications.id')
->where('notification_receivers.notification_id', $request->id)
->latest()
->select(DB::raw("CONCAT(users.nama_depan,' ', users.nama_belakang) as nama_lengkap"), 'notification_receivers.created_at', 'notification_receivers.updated_at', 'notification_receivers.receiver');
if ($request->has('search') && !empty($request->search['value'])) {
$searchNotif = $request->search['value'];
if (!is_numeric($searchNotif)) {
$subQuery->where(function ($a) use ($searchNotif) {
$a->whereRaw("LOWER(CONCAT(users.nama_depan,' ',users.nama_belakang)) LIKE ?", ['%' . strtolower($searchNotif) . '%']);
});
} else {
}
}
$queryNotif = NotificationReceiver::from(DB::raw("({$subQuery->toSql()}) as tmp"))
->mergeBindings($subQuery->getQuery())
->select('*')
->get();
if ($request->ajax()) {
return DataTables::of($queryNotif)
->addIndexColumn()
->make(true);
}
} catch (Throwable $e) {
Log::error($e->getMessage());
return response()->json(['success' => false, 'message' => 'Terjadi Kesalahan pada sisi server']);
}
}
public function listUserForCreateEdit(Request $request)
{
try {
$subQuery = User::latest()
->where('users.status', '=', 'Finished')
->where('users.role', '=', 'User')
->select(DB::raw("CONCAT(users.nama_depan,' ', users.nama_belakang) as nama_lengkap"), 'users.email');
if ($request->has('search') && !empty($request->search['value'])) {
$searchUser = $request->search['value'];
$subQuery->where(function ($a) use ($searchUser) {
$a->whereRaw("LOWER(CONCAT(users.nama_depan,' ',users.nama_belakang)) LIKE ?", ['%' . strtolower($searchUser) . '%'])->orWhereRaw('LOWER(users.email) LIKE ?', ['%' . strtolower($searchUser) . '%']);
});
}
$queryUser = User::from(DB::raw("({$subQuery->toSql()}) as tmp"))
->mergeBindings($subQuery->getQuery())
->select('*')
->get();
if ($request->ajax()) {
return DataTables::of($queryUser)
->addIndexColumn()
->make(true);
}
} catch (Throwable $e) {
Log::error($e->getMessage());
return response()->json(['success' => false, 'message' => 'Terjadi Kesalahan pada sisi server']);
}
}
public function store(Request $request)
{
try {
DB::beginTransaction();
$notif = Notification::create([
'title' => $request->title,
'content' => $request->content,
'teaser' => Str::limit($request->content, 20, '...'),
]);
foreach ($request->receivers as $receiver) {
NotificationReceiver::create([
'receiver' => $receiver,
'notification_id' => $notif->id,
]);
}
DB::commit();
return response()->json([
'status' => true,
'message' => 'Berhasil membuat notifikasi dan akan dikirim ke pengguna.',
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Terjadi kesalahan di server.',
]);
}
}
public function delete(Request $request)
{
try {
DB::beginTransaction();
Notification::destroy($request->id);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Berhasil menghapus notifikasi.',
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Terjadi kesalahan di server.',
]);
}
}
public function deleteAll()
{
try {
DB::beginTransaction();
Notification::truncate();
DB::commit();
return response()->json([
'status' => true,
'message' => 'Berhasil menghapus semua notifikasi.',
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Terjadi kesalahan di server.',
]);
}
}
public function edit(Request $request)
{
$notification = Notification::where('id', $request->id)->first();
$email = NotificationReceiver::where('notification_id', $request->id)
->pluck('receiver')
->toArray();
return view('admin.notification.edit', compact('notification', 'email'));
}
public function update(Request $request)
{
try {
DB::beginTransaction();
Notification::where('id', $request->id)->update([
'title' => $request->title,
'content' => $request->content,
'teaser' => Str::limit($request->content, 20, '...'),
]);
NotificationReceiver::where('notification_id', $request->id)->delete();
foreach ($request->receivers as $receiver) {
NotificationReceiver::create([
'receiver' => $receiver,
'notification_id' => $request->id,
]);
}
DB::commit();
return response()->json([
'status' => true,
'message' => 'Berhasil update notifikasi dan akan dikirim ke pengguna.',
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Terjadi kesalahan di server.',
]);
}
}
public function updateNewNotification(Request $request)
{
$options = [
'cluster' => 'ap1',
'useTLS' => true,
];
$pusher = new Pusher('3e5bdc20dddd7fbc655e', 'f2274c37c616d29ff590', '1659859', $options);
$payload = [
'receivers' => $request->receivers,
];
$pusher->trigger('chanel-update-notifikasi', 'event-update-notifikasi', $payload);
}
}

View File

@ -0,0 +1,269 @@
<?php
namespace App\Http\Controllers\Admin\Refund;
use Throwable;
use App\Models\Refund;
use App\Models\Transaction;
use Illuminate\Http\Request;
use Yajra\DataTables\DataTables;
use App\Models\RefundDescription;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use App\Http\Controllers\Controller;
use App\Models\Notification;
use App\Models\NotificationReceiver;
use App\Models\TransactionDescription;
use Carbon\Carbon;
use Illuminate\Support\Facades\Http;
class AdminRefundController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
return view('admin.refund.index', [
'refunds' => Refund::latest()->get(),
]);
}
/**
* Display the specified resource.
*/
public function show($id)
{
$refund = Refund::find($id);
$refundDescription = RefundDescription::where('refund_id', $id)->get();
return view('admin.refund.detail-refund', [
'refund' => $refund,
'descriptions' => $refundDescription,
]);
}
public function approveRefund(Request $request)
{
$refund = Refund::where('id', $request->id)->first();
$transactionDetail = Transaction::where('id', $refund->transaction_id)->first();
$params = [
'refund_key' => $request->id . '-ref1',
'amount' => $refund->total,
'reason' => $refund->complaint,
];
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
$response = Http::withOptions([
'verify' => false,
])
->withHeaders([
'Content-Type' => 'application/json',
'Authorization' => "Basic $auth",
])
->post('https://api.sandbox.midtrans.com/v2/'.$refund->transaction_id.'/refund', $params);
$result = json_decode($response->body(), true);
$code = $result['status_code'];
if($code == '200'){
try {
Transaction::where('id', $refund->transaction_id)->update([
'status_transaksi' => 'refund',
'status_pembayaran' => 'refund',
]);
Refund::where('id', $request->id)->update([
'status' => 'refund',
]);
TransactionDescription::create([
'transaction_id' => $refund->transaction_id,
'status' => 'refund',
'user' => auth()->user()->email,
'judul' => 'fas fa-long-arrow-alt-left',
'background' => 'bg-primary',
'deskripsi' => 'Admin telah menyetujui refund.',
]);
$url = route('user-transaction.show', ['id' => $transactionDetail->id]);
$notif = Notification::create([
'title' => 'Refund Diterima',
'content' => 'Refund telah diterima dan uang akan dikembalikan ke pembeli. <a href="'.$url.'">Klik disini</a> untuk langsung ke detail transaksi.',
'teaser' => 'Refund telah diterima...',
]);
NotificationReceiver::create([
'receiver' => [
$transactionDetail->pembeli,
$transactionDetail->penjual
],
'notification_id' => $notif->id
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Refund berhasil dilakukan. Uang akan dikembalikan ke pembeli.',
'receivers' => [
$transactionDetail->pembeli,
$transactionDetail->penjual
]
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Refund gagal dilakukan'
]);
}
}else{
Log::error($result['status_message']);
return response()->json([
'status' => false,
'message' => 'Refund gagal dilakukan',
]);
}
}
public function denyRefund(Request $request)
{
$refund = Refund::where('id', $request->id)->first();
$transactionDetail = Transaction::where('id', $refund->transaction_id)->first();
try {
Transaction::where('id', $refund->transaction_id)->update([
'status_transaksi' => 'finished',
'status_pembayaran' => 'settlement',
]);
Refund::where('id', $request->id)->update([
'status' => 'deny',
]);
TransactionDescription::create([
'transaction_id' => $refund->transaction_id,
'status' => 'deny',
'user' => auth()->user()->email,
'judul' => 'fas fa-long-arrow-alt-right',
'background' => 'bg-primary',
'deskripsi' => 'Admin telah menolak refund. Transaksi akan diteruskan ke penjual. Alasan: '.$request->complaint,
]);
$url = route('user-transaction.show', ['id' => $transactionDetail->id]);
$notif = Notification::create([
'title' => 'Refund Diterima',
'content' => 'Refund ditolak dan transaksi akan diteruskan ke penjual. <a href="'.$url.'">Klik disini</a> untuk langsung ke detail transaksi.',
'teaser' => 'Refund ditolak...',
]);
NotificationReceiver::create([
'receiver' => [
$transactionDetail->pembeli,
$transactionDetail->penjual
],
'notification_id' => $notif->id
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Refund berhasil ditolak. Transaksi diselesaikan dan uang disampaikan ke penjual.',
'receivers' => [
$transactionDetail->pembeli,
$transactionDetail->penjual
]
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Refund gagal dilakukan',
]);
}
}
public function listRefund(Request $request)
{
try {
$subQuery = Refund::join('transactions', 'refunds.transaction_id', '=', 'transactions.id')
->join('users as b', 'transactions.pembeli', '=', 'b.email')
->join('users as s', 'transactions.penjual', '=', 's.email')
->latest('refunds.updated_at')
->select('refunds.id as id', DB::raw("CONCAT(b.nama_depan,' ', b.nama_belakang) as pembeli"), DB::raw("CONCAT(s.nama_depan,' ', s.nama_belakang) as penjual"), 'transactions.nama_barang as nama_barang', 'refunds.total as total', 'refunds.created_at', 'refunds.due_date', 'refunds.status');
if ($request->has('search') && !empty($request->search['value'])) {
$searchRefund = $request->search['value'];
if (!is_numeric($searchRefund)) {
$subQuery->where(function ($a) use ($searchRefund) {
$a->whereRaw("LOWER(CONCAT(b.nama_depan,' ',b.nama_belakang)) LIKE ?", ['%' . strtolower($searchRefund) . '%'])
->orWhereRaw("LOWER(CONCAT(s.nama_depan,' ',s.nama_belakang)) LIKE ?", ['%' . strtolower($searchRefund) . '%'])
->orWhereRaw('LOWER(transactions.nama_barang) LIKE ?', ['%' . strtolower($searchRefund) . '%'])
->orWhereRaw('LOWER(refunds.status) LIKE ?', ['%' . strtolower($searchRefund) . '%']);
});
} else {
$subQuery->where(function ($a) use ($searchRefund) {
$a->whereDay('refunds.created_at', '=', $searchRefund)
->orWhereMonth('refunds.created_at', '=', $searchRefund)
->orWhereYear('refunds.created_at', '=', $searchRefund)
->orWhereDay('refunds.due_date', '=', $searchRefund)
->orWhereMonth('refunds.due_date', '=', $searchRefund)
->orWhereYear('refunds.due_date', '=', $searchRefund)
->orWhere('refunds.total', '=', $searchRefund);
});
}
}
$queryRefund = Refund::from(DB::raw("({$subQuery->toSql()}) as tmp"))
->mergeBindings($subQuery->getQuery()) // Menggabungkan binding parameters
->select('*')
->get();
if ($request->ajax()) {
return DataTables::of($queryRefund)
->addIndexColumn()
->addColumn('action', function ($row) {
$url = route('admin-refund.show', ['id' => $row->id]);
$html_code =
'
<div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
....
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item"
href="' .
$url .
'">Detail</a>
</li>
</ul>
</div>';
return $html_code;
})
->rawColumns(['action'])
->make(true);
}
} catch (Throwable $e) {
Log::error($e->getMessage());
return response()->json(['success' => false, 'message' => 'Terjadi Kesalahan pada sisi server']);
}
}
}

View File

@ -1,6 +1,6 @@
<?php
namespace App\Http\Controllers\Admin;
namespace App\Http\Controllers\Admin\Setting;
use App\Models\Setting;
use Illuminate\Http\Request;
@ -86,7 +86,7 @@ class AdminSettingController extends Controller
public function listSetting(Request $request){
try{
$subQuery = Setting::latest()->select('id','bulan','tahun','persentase','status');
$subQuery = Setting::select('id','bulan','tahun','persentase','status')->orderBy('tahun', 'DESC')->orderBy('bulan', 'DESC');
if($request->has('search') && !empty($request->search['value'])){
$searchSetting = $request->search['value'];
@ -113,7 +113,7 @@ class AdminSettingController extends Controller
return DataTables::of($querySetting)
->addIndexColumn()
->addColumn('action', function($row){
$status = $row->status ? 'checked' : '';
$status = $row->status == 'Active' ? 'checked' : '';
$html_code = '<label class="switch">
<input type="checkbox" '.$status.'
data-id="'. $row->id.'">

View File

@ -0,0 +1,283 @@
<?php
namespace App\Http\Controllers\Admin\Transaction;
use App\Models\Transaction;
use App\Http\Controllers\Controller;
use App\Models\Notification;
use App\Models\NotificationReceiver;
use App\Models\TransactionDescription;
use App\Models\TransactionUser;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
use Throwable;
use Yajra\DataTables\DataTables;
class AdminTransactionController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
{
return view('admin.transaction.index');
}
/**
* Display the specified resource.
*/
public function show($id)
{
return view('admin.transaction.detail-transaction', [
'transaction' => Transaction::findOrFail($id),
'trackings' => TransactionDescription::where('transaction_id', $id)
->latest()
->get(),
]);
}
public function approveTransaction(Request $request)
{
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
$response = Http::withOptions([
'verify' => false,
])
->withHeaders([
'Content-Type' => 'application/json',
'Authorization' => "Basic $auth",
])
->post('https://api.sandbox.midtrans.com/v2/'.$request->id.'/approve');
$result = json_decode($response->body(), true);
$code = $result['status_code'];
$transactionDetail = Transaction::where('id', $request->id)->first();
if($code == '200'){
try {
DB::beginTransaction();
Transaction::where('id', $request->id)->update([
'status_transaksi' => 'success',
'status_pembayaran' => 'settlement',
'fraud_status' => 'accept'
]);
TransactionDescription::create([
'transaction_id' => $request->id,
'status' => 'success',
'user' => auth()->user()->email,
'judul' => 'fa fa-check',
'background' => 'bg-primary',
'deskripsi' => 'Admin telah menerima pembayaran transaksi dan dilanjutkan ke penjual.',
]);
$url = route('user-transaction.show', ['id' => $transactionDetail->id]);
$notif = Notification::create([
'title' => 'Transaksi Diterima',
'content' => 'Transaksi telah diterima dan akan dilanjutkan. <a href="'.$url.'">Klik disini</a> untuk langsung ke detail transaksi.',
'teaser' => 'Transaksi telah diterima...',
]);
NotificationReceiver::create([
'receiver' => $transactionDetail->penjual,
'notification_id' => $notif->id
]);
NotificationReceiver::create([
'receiver' => $transactionDetail->pembeli,
'notification_id' => $notif->id
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Transaksi telah diterima.',
'receivers' => [
$transactionDetail->penjual,
$transactionDetail->pembeli
]
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Terjadi kesalahan di bagian server.',
]);
}
}else{
return response()->json([
'status' => false,
'message' => 'Terjadi kesalahan di bagian server.',
]);
}
}
public function denyTransaction(Request $request)
{
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
$response = Http::withOptions([
'verify' => false,
])
->withHeaders([
'Content-Type' => 'application/json',
'Authorization' => "Basic $auth",
])
->post('https://api.sandbox.midtrans.com/v2/'.$request->id.'/deny');
$result = json_decode($response->body(), true);
$code = $result['status_code'];
$transactionDetail = Transaction::where('id', $request->id)->first();
if($code == '200'){
try {
DB::beginTransaction();
Transaction::where('id', $request->id)->update([
'status_transaksi' => 'failure',
'status_pembayaran' => 'failure',
'fraud_status' => 'deny'
]);
TransactionDescription::create([
'transaction_id' => $request->id,
'status' => 'failure',
'user' => auth()->user()->email,
'judul' => 'fa fa-times',
'background' => 'bg-primary',
'deskripsi' => 'Admin telah menolak pembayaran. Alasan: '.$request->compaint,
]);
$url = route('user-transaction.show', ['id' => $transactionDetail->id]);
$notif = Notification::create([
'title' => 'Transaksi Ditolak',
'content' => 'Transaksi anda ditolak oleh Admin. <a href="'.$url.'">Klik disini</a> untuk langsung ke detail transaksi.',
'teaser' => 'Transaksi anda ditolak...',
]);
NotificationReceiver::create([
'receiver' => $transactionDetail->pembeli,
'notification_id' => $notif->id
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Transaksi telah ditolak.',
'receivers' => $transactionDetail->pembeli
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Terjadi kesalahan di bagian server.',
]);
}
}else{
return response()->json([
'status' => false,
'message' => 'Terjadi kesalahan di bagian server.',
]);
}
}
public function listTransaction(Request $request)
{
try {
$subQuery = Transaction::join('users as b', 'transactions.pembeli', '=', 'b.email')
->join('users as s', 'transactions.penjual', '=', 's.email')
->latest('transactions.updated_at')
->select('transactions.id', 'transactions.nama_barang', DB::raw("CONCAT(b.nama_depan,' ',b.nama_belakang) as nama_pembeli"), DB::raw("CONCAT(s.nama_depan,' ',s.nama_belakang) as nama_penjual"), 'transactions.total_harga', 'transactions.created_at', 'transactions.status_transaksi');
if ($request->has('search') && !empty($request->search['value'])) {
$searchTransaksi = $request->search['value'];
if (!is_numeric($searchTransaksi)) {
$subQuery->where(function ($a) use ($searchTransaksi) {
$a->whereRaw("LOWER(CONCAT(s.nama_depan,' ',s.nama_belakang)) LIKE ?", ['%' . strtolower($searchTransaksi) . '%'])
->orWhereRaw("LOWER(CONCAT(b.nama_depan,' ',b.nama_belakang)) LIKE ?", ['%' . strtolower($searchTransaksi) . '%'])
->orWhereRaw('LOWER(transactions.nama_barang) LIKE ?', ['%' . strtolower($searchTransaksi) . '%'])
->orWhereRaw('LOWER(transactions.status_transaksi) LIKE ?', ['%' . strtolower($searchTransaksi) . '%']);
});
} else {
$subQuery->where(function ($a) use ($searchTransaksi) {
$a->whereDay('transactions.created_at', '=', $searchTransaksi)
->orWhereMonth('transactions.created_at', '=', $searchTransaksi)
->orWhereYear('transactions.created_at', '=', $searchTransaksi)
->orWhere('transactions.total_harga', '=', $searchTransaksi);
});
}
}
$queryTransaction = Transaction::from(DB::raw("({$subQuery->toSql()}) as tmp"))
->mergeBindings($subQuery->getQuery()) // Menggabungkan binding parameters
->select('*')
->get();
if ($request->ajax()) {
return DataTables::of($queryTransaction)
->addIndexColumn()
->addColumn('action', function ($row) {
$url = route('admin-transaction.show', ['id' => $row->id]);
$invoice = route('invoice.get',['id' => $row->id]);
$html_code =
'
<div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
....
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item"
href="'.$url.'">Detail</a>
</li>
<li><a class="dropdown-item"
href="'.$invoice.'">Invoice</a>
</li>
<li><a class="dropdown-item" data-toggle="modal"
data-target="#modalTracking"
data-id="'.$row->id.'"
href="#">Tracking</a>
</li>
';
$html_code .= '
</ul>
</div>
';
return $html_code;
})
->rawColumns(['action'])
->make(true);
}
} catch (Throwable $e) {
Log::error($e->getMessage());
return response()->json(['success' => false, 'message' => 'Terjadi Kesalahan pada sisi server']);
}
}
public function transactionTracking(Request $request)
{
$data = TransactionDescription::where('transaction_id', $request->id)->get();
return response()->json([
'data' => $data,
]);
}
}

View File

@ -1,12 +1,15 @@
<?php
namespace App\Http\Controllers\Admin;
namespace App\Http\Controllers\Admin\User;
use App\Models\User;
use App\Http\Controllers\Controller;
use App\Mail\approveUser;
use App\Mail\denyUser;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Mail;
use Yajra\DataTables\DataTables;
use Throwable;
@ -32,57 +35,93 @@ class AdminUserController extends Controller
/**
* Remove the specified resource from storage.
*/
public function destroy($id)
public function destroy(Request $request)
{
try {
$result = User::destroy($id);
if ($result) {
return response()->json([
'message' => 'Berhasil hapus data',
'status' => true,
]);
}
} catch (\Exception $e) {
DB::beginTransaction();
User::destroy($request->id);
DB::commit();
return response()->json([
'message' => 'Gagal hapus data, karena ' . $e,
'message' => 'Berhasil hapus data',
'status' => true,
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'message' => 'Terjadi kesalahan di server',
'status' => false,
]);
}
}
public function approveUser($id)
public function approveUser(Request $request)
{
$user = User::findOrFail($id);
$user->status = 'Finished';
$result = $user->save();
if ($result) {
$user = User::where('id', $request->id)->first();
$email = $user->email;
$content = [
'email' => $email,
];
try {
DB::beginTransaction();
User::where('id', $request->id)->update([
'status' => 'Finished',
]);
Mail::to($email)->send(new approveUser($content));
DB::commit();
return response()->json([
'message' => 'Akun telah disetujui dan dapat digunakan',
'status' => true,
]);
} else {
return response()->json([
'message' => 'Akun gagal disetujui karena ' + $result,
'status' => false,
]);
} catch (Throwable $e) {
Log::error($e->getMessage());
return response()->json(['success' => false, 'message' => 'Terjadi Kesalahan pada sisi server']);
}
}
public function denyUser($id)
public function denyUser(Request $request)
{
$user = User::findOrFail($id);
$user->status = 'Rejected';
$result = $user->save();
if ($result) {
$user = User::where('id', $request->id)->first();
$email = $user->email;
$keterangan = $request->keterangan;
$content = [
'keterangan' => $keterangan,
'email' => $email,
];
try {
DB::beginTransaction();
User::where('id', $request->id)->update([
'status' => 'Rejected',
'keterangan' => $request->keterangan,
]);
Mail::to($email)->send(new denyUser($content));
DB::commit();
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,
]);
} catch (Throwable $e) {
Log::error($e->getMessage());
return response()->json(['success' => false, 'message' => 'Terjadi Kesalahan pada sisi server']);
}
}
@ -91,17 +130,19 @@ class AdminUserController extends Controller
try {
$subQuery = User::where('role', 'User')
->orderByRaw("CASE WHEN status = 'Progress' THEN 1 WHEN status = 'Finished' THEN 2 WHEN status = 'Rejected' THEN 3 ELSE 4 END ASC")
->latest()
->latest('users.updated_at')
->select('users.id', DB::raw("CONCAT(users.nama_depan, ' ', users.nama_belakang) as nama_lengkap"), 'users.email', 'users.foto_profile', 'users.status', 'users.created_at as tanggal_daftar');
if ($request->has('search') && !empty($request->search['value'])) {
$searchUser = $request->search['value'];
$subQuery->where(function ($a) use ($searchUser) {
$a->whereRaw('LOWER(email) LIKE ?', ['%' . strtolower($searchUser) . '%'])
->orWhereRaw('LOWER(nama_depan) LIKE ?', ['%' . strtolower($searchUser) . '%'])
->orWhereRaw('LOWER(nama_belakang) LIKE ?', ['%' . strtolower($searchUser) . '%'])
->orWhereRaw('LOWER(status) LIKE ?',['%'.strtolower($searchUser).'%']);
});
if (!is_numeric($searchUser)) {
$subQuery->where(function ($a) use ($searchUser) {
$a->whereRaw('LOWER(email) LIKE ?', ['%' . strtolower($searchUser) . '%'])
->orWhereRaw("LOWER(CONCAT(users.nama_depan,' ',users.nama_belakang)) LIKE ?", ['%' . strtolower($searchUser) . '%'])
->orWhereRaw('LOWER(status) LIKE ?', ['%' . strtolower($searchUser) . '%']);
});
} else {
}
}
$queryUser = User::from(DB::raw("({$subQuery->toSql()}) as tmp"))
@ -114,7 +155,8 @@ class AdminUserController extends Controller
->addIndexColumn()
->addColumn('action', function ($row) {
$url = route('admin-user.show', ['id' => $row->id]);
$html_code = '
$html_code =
'
<div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
@ -123,8 +165,21 @@ class AdminUserController extends Controller
<ul class="dropdown-menu">
<li><a class="dropdown-item"
href="'.$url.'">Detail</a>
href="' .
$url .
'">Detail</a>
</li>
';
if($row->status == 'Rejected'){
$html_code .= '
<li><a class="dropdown-item"
id="deleteUser"
href="javascript: void(0);"
data-id="'.$row->id.'">Hapus</a>
</li>
';
}
$html_code .= '
</ul>
</div>';
return $html_code;

View File

@ -0,0 +1,28 @@
<?php
namespace App\Http\Controllers\Invoice;
use App\Http\Controllers\Controller;
use App\Models\Transaction;
use Barryvdh\DomPDF\Facade\Pdf;
use Illuminate\Http\Request;
class InvoiceController extends Controller
{
public function getInvoice($id)
{
return view('invoice.invoice-transaction', [
'transaction' => Transaction::findOrFail($id),
]);
}
public function exportInvoice(Request $request)
{
$transaction = Transaction::findOrFail($request->id);
$pdf = Pdf::loadView('invoice.export-invoice',compact('transaction'))->setPaper('A4','Portrait');
return $pdf->download("invoice-".uniqid().".pdf");
// return view('invoice.export-invoice', [
// 'transaction' => Transaction::findOrFail($request->id),
// ]);
}
}

View File

@ -4,10 +4,16 @@ namespace App\Http\Controllers\Login;
use App\Http\Controllers\Controller;
use App\Mail\verificationMail;
use App\Models\Transaction;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
use App\Models\User;
use Barryvdh\DomPDF\Facade\Pdf;
use Carbon\Carbon;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Str;
use Illuminate\Support\Facades\Storage;
@ -18,13 +24,15 @@ use Laravolt\Indonesia\Models\City;
use Laravolt\Indonesia\Models\District;
use Laravolt\Indonesia\Models\Province;
use Laravolt\Indonesia\Models\Village;
use Pusher\Pusher;
use Ramsey\Uuid\Uuid;
use GuzzleHttp\Client;
class LoginController extends Controller
{
public function login()
{
return view('index');
return view('login.index');
}
/**
@ -44,7 +52,7 @@ class LoginController extends Controller
'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)) {
@ -55,18 +63,18 @@ class LoginController extends Controller
} else {
return redirect()->intended('user');
}
} else if(Auth::user()->status == 'Rejected'){
Session::flash('message', 'Akun ditolak karena tidak memenuhi persyaratan');
} elseif (Auth::user()->status == 'Rejected') {
Session::flash('message', 'Akun ditolak. Alasan: ' . Auth::user()->keterangan);
return redirect()->back();
} else {
Session::flash('message', 'Akun tidak ditemukan atau sedang dalam pengajuan');
return redirect()->back();
}
}else{
} else {
return redirect()
->back()
->withErrors($credentials)
->onlyInput('email');
->back()
->withErrors('Email atau password salah')
->onlyInput('email');
}
}
@ -88,127 +96,226 @@ class LoginController extends Controller
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');
$request->validate(
[
'nama_depan' => ['required'],
'nama_belakang' => ['required'],
'nik' => ['required', 'min:16'],
'new_email' => ['required', 'email'],
'email_verification' => ['required'],
'gender' => ['required'],
'tanggal_lahir' => [
'required',
function ($attribute, $value, $fail) {
$minimumBirthYear = Carbon::now()
->subYears(18)
->format('Y');
if ($value > $minimumBirthYear) {
$fail('Anda harus berusia minimal 18 tahun.');
}
},
],
'alamat' => ['required'],
'village_code' => ['required'],
'new_password' => ['required', 'min:8'],
'confirm_password' => ['required', 'same:new_password'],
'kode_verifikasi' => ['required', 'same:email_verification'],
'wajah' => ['required'],
'ktp' => ['required'],
'nohp' => ['required', 'min:10'],
'verification_status' => ['in:true'],
],
[
'nama_depan.required' => 'Nama depan harus diisi.',
'nama_belakang.required' => 'Nama belakang harus diisi. Jika nama hanya satu kata, boleh ketik ulang.',
'nik.required' => 'Nomor NIK harus diisi.',
'nik.min' => 'Nomor NIK harus 16 angka.',
'new_email.required' => 'Email harus diisi.',
'new_email.email' => 'Email harus memiliki @.',
'email_verification.required' => 'Email harus diverifikasi.',
'gender.required' => 'Jenis kelamin harus diisi.',
'tanggal_lahir.required' => 'Tanggal lahir harus diisi.',
'alamat.required' => 'Alamat harus diisi',
'village_code.required' => 'Alamat harus diisi.',
'new_password.required' => 'Password harus diisi.',
'new_password.min' => 'Password minimal 8 karakter.',
'confirm_password.required' => 'Konfirmasi password harus diisi.',
'confirm_password.same' => 'Konfirmasi password harus sama dengan password.',
'kode_verifikasi.required' => 'Silahkan verifikasi email.',
'kode_verifikasi.same' => 'Kode verifikasi tidak sama. Coba masukkan yang benar.',
'wajah.required' => 'Silahkan ambil foto wajah anda.',
'ktp.required' => 'Silahkan ambil foto ktp anda.',
'nohp.required' => 'No HP harus dimasukan.',
'nohp.min' => 'No HP memiliki minimal 10 angka.',
'verification_status.in' => 'Masa berlaku kode verifikasi sudah habis. Silahkan lakukan verifikasi lagi.',
],
);
$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');
$email = $request->get('new_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');
$kode_kelurahan = $request->get('village_code');
$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';
$foto_ktp = 'Foto-KTP-' . $email . '.jpg';
$foto_wajah = 'Foto-Wajah-' . $email . '.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);
// OCR
$client = new Client();
$response = $client->request('POST', 'https://raihansurya4000.pythonanywhere.com/process-image', [
'multipart' => [
[
'name' => 'image',
'contents' => fopen(public_path('storage/foto-ktp/'.$foto_ktp), 'r'),
'filename' => $foto_ktp,
],
],
'verify' => false
]);
$image = Image::make($fotoKTP);
$result = $response->getBody()->getContents();
$image->greyscale(); // Convert to grayscale
$image->contrast(10); // Increase contrast, adjust the value as needed
$lines = json_decode($result,true);
$preprocessedfotoKTP = public_path('storage/preprocessed/preprocessed_image.jpg');
$image->save($preprocessedfotoKTP);
$namaKTP = str_replace(' ','',strtolower($nama_depan.$nama_belakang));
$nikKTP = $nik;
$persentaseNama = 0;
$persentaseNik = 0;
$result = (new TesseractOCR($preprocessedfotoKTP))->run();
foreach($lines['result'] as $line){
$teks = str_replace(' ','',strtolower($line));
$persentaseNamaSementara = 0;
$persentaseNikSementara = 0;
similar_text($teks,$namaKTP,$persentaseNamaSementara);
similar_text($teks,$nikKTP,$persentaseNikSementara);
// (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);
if($persentaseNamaSementara > 0){
if($persentaseNamaSementara > $persentaseNama){
$persentaseNama = $persentaseNamaSementara;
}
}
// Mencari nama
if (strpos($line, $namaInputan) !== false) {
$namaOCR = trim(substr($line, strpos($line, ':') + 1));
if($persentaseNikSementara > 0){
if($persentaseNikSementara > $persentaseNik){
$persentaseNik = $persentaseNikSementara;
}
}
}
//Selesai
$persentase_kemiripan = ($persentaseNama + $persentaseNik)/2;
$persentase_kemiripan = (similar_text($nikInputan, $nikOCR, $percent) + similar_text($namaOCR, $namaOCR, $percent)) / 2;
// $status = 'Progress';
$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
if($status >= 50){
$status = 'Finished';
}else if($status <= 35){
return response()->json([
'status' => false,
'message' => 'Sistem tidak dapat mendeteksi foto KTP. Kemungkinan foto tidak jelas atau buram, silahkan upload foto KTP yang jelas. Persentase kemiripan inputan : '.$persentase_kemiripan.'%'
]);
}
//Deteksi wajah belum
DB::beginTransaction();
$password = Hash::make($new_password);
$password = Hash::make($new_password);
$result = User::create([
'id' => Uuid::uuid4(),
'nama_depan' => $nama_depan,
'nama_belakang' => $nama_belakang,
'tanggal_lahir' => $tanggal_lahir,
'email' => $email,
'email_verified_at' => now(),
'password' => $password,
'nohp' => $nohp,
'nik' => $nik,
'alamat' => $alamat,
'foto_ktp' => $foto_ktp,
'foto_wajah' => $foto_wajah,
'foto_profile' => null,
'persentase_kemiripan' => $persentase_kemiripan,
'gender' => $gender,
'kode_kelurahan' => $kode_kelurahan,
'remember_token' => Str::random(10),
]);
if ($result) {
return response()->json([
'status' => true,
'message' => 'Akun anda sudah terdaftar dan butuh verifikasi hingga maksimal 1 hari kerja',
User::create([
'nama_depan' => $nama_depan,
'nama_belakang' => $nama_belakang,
'tanggal_lahir' => $tanggal_lahir,
'email' => $email,
'email_verified_at' => now(),
'password' => $password,
'nohp' => $nohp,
'nik' => $nik,
'alamat' => $alamat,
'foto_ktp' => $foto_ktp,
'foto_wajah' => $foto_wajah,
'foto_profile' => null,
'persentase_kemiripan' => $persentase_kemiripan,
'gender' => $gender,
'kode_kelurahan' => $kode_kelurahan,
'remember_token' => Str::random(10),
'status' => $status
]);
} else {
DB::commit();
$options = [
'cluster' => 'ap1',
'useTLS' => true,
];
$pusher = new Pusher('3e5bdc20dddd7fbc655e', 'f2274c37c616d29ff590', '1659859', $options);
$payload = [
'service' => 'User',
];
$pusher->trigger('chanel-update-notifikasi-untuk-admin', 'event-update-notifikasi-untuk-admin', $payload);
if($status == 'Finished'){
return response()->json([
'status' => true,
'message' => 'Akun anda sudah terdaftar dan dapat digunakan',
]);
}else{
return response()->json([
'status' => true,
'message' => 'Akun anda sudah terdaftar dan butuh verifikasi hingga maksimal 1 hari kerja',
]);
}
} catch (\Exception $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Akun anda gagal terdaftar. Coba lagi! ' + $result,
'message' => 'Akun anda gagal terdaftar. Coba lagi!',
]);
}
}
public function accountStatus($email)
public function accountStatus(Request $request)
{
$result = User::where('email', $email)->get();
if ($result->isNotEmpty()) {
$result = User::where('email', $request->email)->first();
if ($result) {
return response()->json([
'status' => true,
'message' => $result,
@ -216,7 +323,7 @@ class LoginController extends Controller
} else {
return response()->json([
'status' => false,
'message' => $result,
'message' => 'Akun dengan email ' . $request->email . ' tidak tersedia',
]);
}
}
@ -228,27 +335,27 @@ class LoginController extends Controller
return response()->json($data);
}
public function searchCity($code)
public function searchCity(Request $request)
{
$data = City::where('province_code', $code)
$data = City::where('province_code', $request->code)
->where('name', 'LIKE', '%' . strtoupper(request('q')) . '%')
->paginate(10);
return response()->json($data);
}
public function searchDistrict($code)
public function searchDistrict(Request $request)
{
$data = District::where('city_code', $code)
$data = District::where('city_code', $request->code)
->where('name', 'LIKE', '%' . strtoupper(request('q')) . '%')
->paginate(10);
return response()->json($data);
}
public function searchVillage($code)
public function searchVillage(Request $request)
{
$data = Village::where('district_code', $code)
$data = Village::where('district_code', $request->code)
->where('name', 'LIKE', '%' . strtoupper(request('q')) . '%')
->paginate(10);
@ -280,57 +387,35 @@ class LoginController extends Controller
public function getOcr()
{
//OCR
// dd(phpinfo());
try {
$fotoKTP = public_path('storage/foto-ktp/ktp.jpg');
$client = new Client();
$response = $client->request('POST', 'http://localhost:8888/process-image', [
'multipart' => [
[
'name' => 'image',
'contents' => fopen(public_path('storage/foto-ktp/foto_ktp.jpg'), 'r'),
'filename' => 'foto_ktp.jpg',
],
],
]);
$image = Image::make($fotoKTP);
dd($response->getBody()->getContents());
}
$image->greyscale(); // Convert to grayscale
$image->contrast(10); // Increase contrast, adjust the value as needed
public function email()
{
$verificationEmail = [
'email' => 'Halo',
'code' => 'kode',
];
return view('email.verification-email', compact('verificationEmail'));
}
$preprocessedfotoKTP = public_path('storage/preprocessed/preprocessed_image.jpg');
$image->save($preprocessedfotoKTP);
public function invoice()
{
// return view('invoice.export-invoice');
$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
// $transaction = Transaction::findOrFail('80d9b19b-ba17-4aea-8cad-c3b4661d33bc');
$pdf = Pdf::loadView('invoice.export-invoice')->setPaper('A4', 'portrait');
return $pdf->download('invoice-' . uniqid() . '.pdf');
}
}

View File

@ -13,14 +13,14 @@ use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Storage;
use Laravolt\Indonesia\Models\City;
use Laravolt\Indonesia\Models\District;
use Laravolt\Indonesia\Models\Provinsi;
use Laravolt\Indonesia\Models\Province;
use Laravolt\Indonesia\Models\Village;
class ProfileController extends Controller
{
public function index()
{
$provinces = Provinsi::all();
$provinces = Province::all();
$cities = City::where('province_code', auth()->user()->village->district->city->province->code)->get();
$districts = District::where('city_code', auth()->user()->village->district->city->code)->get();
$villages = Village::where('district_code', auth()->user()->village->district->code)->get();

View File

@ -1,65 +0,0 @@
<?php
namespace App\Http\Controllers;
use App\Models\RefundDescription;
use Illuminate\Http\Request;
class RefundDescriptionController 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(Request $request)
{
//
}
/**
* Display the specified resource.
*/
public function show(RefundDescription $refundDescription)
{
//
}
/**
* Show the form for editing the specified resource.
*/
public function edit(RefundDescription $refundDescription)
{
//
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, RefundDescription $refundDescription)
{
//
}
/**
* Remove the specified resource from storage.
*/
public function destroy(RefundDescription $refundDescription)
{
//
}
}

View File

@ -1,65 +0,0 @@
<?php
namespace App\Http\Controllers;
use App\Models\TransactionDescription;
use Illuminate\Http\Request;
class TransactionDescriptionController 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(Request $request)
{
//
}
/**
* Display the specified resource.
*/
public function show(TransactionDescription $transactionDescription)
{
//
}
/**
* Show the form for editing the specified resource.
*/
public function edit(TransactionDescription $transactionDescription)
{
//
}
/**
* Update the specified resource in storage.
*/
public function update(Request $request, TransactionDescription $transactionDescription)
{
//
}
/**
* Remove the specified resource from storage.
*/
public function destroy(TransactionDescription $transactionDescription)
{
//
}
}

View File

@ -1,6 +1,6 @@
<?php
namespace App\Http\Controllers\User;
namespace App\Http\Controllers\User\Contact;
use Throwable;
use App\Models\User;
@ -22,13 +22,23 @@ class UserContactController extends Controller
return view('user.contact.index');
}
public function getContact()
public function getContact(Request $request)
{
$data = DB::table('contacts')
if($request->input == '' || $request->input == null){
$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);
}else{
$data = DB::table('contacts')
->join('users', 'contacts.relasi_kontak', '=', 'users.email')
->select('contacts.relasi_kontak', 'users.nama_depan', 'users.nama_belakang')
->where('contacts.pemilik_kontak', '=', Auth::user()->email)
->where('contacts.pemilik_kontak', '=', auth()->user()->email)
->whereRaw(DB::raw("LOWER(CONCAT(users.nama_depan,' ',users.nama_belakang)) LIKE ?",['%'.strtolower($request->input).'%']))
->paginate(10);
}
return response()->json($data);
}
@ -75,12 +85,12 @@ class UserContactController extends Controller
/**
* Remove the specified resource from storage.
*/
public function destroy($id)
public function destroy(Request $request)
{
try {
DB::beginTransaction();
Contact::destroy($id);
Contact::destroy($request->id);
DB::commit();
@ -101,9 +111,9 @@ class UserContactController extends Controller
}
}
public function cekEmail($email)
public function cekEmail(Request $request)
{
$result = User::where('email', $email)
$result = User::where('email', $request->email)
->where('role', 'User')
->first();
if ($result) {
@ -115,13 +125,13 @@ class UserContactController extends Controller
} else {
return response()->json([
'status' => false,
'message' => 'Akun dengen email ' . $email . ' tersedia dan belum diverifikasi',
'message' => 'Akun dengen email ' . $request->email . ' tersedia dan belum diverifikasi',
]);
}
} else {
return response()->json([
'status' => false,
'message' => 'Akun dengen email ' . $email . ' tidak tersedia atau ditolak',
'message' => 'Akun dengen email ' . $request->email . ' tidak tersedia atau ditolak',
]);
}
}
@ -129,18 +139,17 @@ class UserContactController extends Controller
public function listContact(Request $request){
try{
$subQuery = Contact::join('users','contacts.relasi_kontak','=','users.email')
->join('indonesia_villages','users.kode_kelurahan','=','indonesia_villages.code')
->join('indonesia_districts','indonesia_villages.district_code','=','indonesia_districts.code')
->join('indonesia_cities', 'indonesia_districts.city_code','=','indonesia_cities.code')
->join('indonesia_provinces','indonesia_cities.province_code','=','indonesia_provinces.code')
->where('pemilik_kontak', Auth::user()->email)
->select('contacts.id', 'users.email as email as email', 'users.nohp as nohp', 'users.alamat as alamat', DB::raw("CONCAT(users.nama_depan, ' ', users.nama_belakang) as nama_lengkap"),'indonesia_villages.name as kelurahan','indonesia_districts.name as kecamatan','indonesia_cities.name as kota','indonesia_provinces.name as provinsi');
->select(
'contacts.id',
DB::raw("CONCAT(users.nama_depan, ' ', users.nama_belakang) as nama_lengkap"),
)
->orderBy('nama_lengkap');
if($request->has('search') && !empty($request->search['value'])){
$searchContact = $request->search['value'];
$subQuery->where(function($a) use ($searchContact){
$a->whereRaw('LOWER(users.nama_depan) LIKE ?',['%'.strtolower($searchContact).'%'])
->orWhereRaw('LOWER(users.nama_belakang) LIKE ?',['%'.strtolower($searchContact).'%']);
$a->whereRaw("LOWER(CONCAT(users.nama_depan,' ',users.nama_belakang)) LIKE ?",['%'.strtolower($searchContact).'%']);
});
}
@ -153,21 +162,10 @@ class UserContactController extends Controller
return DataTables::of($queryContact)
->addIndexColumn()
->addColumn('action', function($row){
$village = $row->kelurahan;
$city = $row->kota;
$district = $row->kecamatan;
$province = $row->provinsi;
$html_code = '
<button class="btn btn-info open-detail-modal" data-toggle="modal"
data-target="#modaldetail" id="detailContact"
data-nama="'.$row->nama_lengkap.'"
data-nohp="'.$row->nohp.'"
data-alamat="'.$row->alamat.'"
data-email="'.$row->email.'"
data-province="'.$province.'"
data-city="'.$city.'"
data-district="'.$district.'"
data-village="'.$village.'">Detail</button>
data-id="'.$row->id.'">Detail</button>
<button class="btn btn-danger open-detail-modal" id="deleteContact"
data-id="'.$row->id.'">Hapus</button>
';
@ -182,4 +180,27 @@ class UserContactController extends Controller
return response()->json(['success' => false, 'message' => 'Terjadi Kesalahan pada sisi server']);
}
}
public function detailContact(Request $request){
$data = Contact::join('users','contacts.relasi_kontak','=','users.email')
->join('indonesia_villages','users.kode_kelurahan','=','indonesia_villages.code')
->join('indonesia_districts','indonesia_villages.district_code','=','indonesia_districts.code')
->join('indonesia_cities','indonesia_districts.city_code','=','indonesia_cities.code')
->join('indonesia_provinces','indonesia_cities.province_code','=','indonesia_provinces.code')
->where('contacts.id',$request->id)
->select(
DB::raw("CONCAT(users.nama_depan,' ',users.nama_belakang) as nama_lengkap"),
'users.alamat',
'users.email',
'users.nohp',
'indonesia_villages.name as kelurahan',
'indonesia_districts.name as kecamatan',
'indonesia_cities.name as kota',
'indonesia_provinces.name as provinsi'
)
->first();
return response()->json([
'data' => $data
]);
}
}

View File

@ -0,0 +1,652 @@
<?php
namespace App\Http\Controllers\User\Dashboard;
use App\Http\Controllers\Controller;
use App\Models\Refund;
use Illuminate\Http\Request;
use App\Models\Transaction;
use Carbon\Carbon;
use DateInterval;
use DateTime;
class UserDashboardController extends Controller
{
public function index()
{
$today = new DateTime();
$todayDate = $today->format('Y-m-d');
$pickDate = new DateTime();
$interval = new DateInterval('P29D');
$start = $pickDate->sub($interval);
$startDate = $start->format('Y-m-d');
$intervalBefore = new DateInterval('P1D');
$intervalBeforeStart = new DateInterval('P29D');
$endBefore = $pickDate->sub($intervalBefore);
$endBeforeDate = $endBefore->format('Y-m-d');
$startBefore = $pickDate->sub($intervalBeforeStart);
$startBeforeDate = $startBefore->format('Y-m-d');
// Semua
$countAllFinished = Transaction::whereIn('status_transaksi', ['finished', 'done'])
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where(function ($a) {
$a->where('pembeli', auth()->user()->email)->orWhere('penjual', auth()->user()->email);
})
->count();
$countAllPending = Transaction::where('status_transaksi', 'created')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where(function ($a) {
$a->where('pembeli', auth()->user()->email)->orWhere('penjual', auth()->user()->email);
})
->count();
$countAllProcessed = Transaction::whereIn('status_transaksi', ['process', 'sending', 'sent'])
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where(function ($a) {
$a->where('pembeli', auth()->user()->email)->orWhere('penjual', auth()->user()->email);
})
->count();
$countAllCanceled = Transaction::where('status_transaksi', 'failure')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where(function ($a) {
$a->where('pembeli', auth()->user()->email)->orWhere('penjual', auth()->user()->email);
})
->count();
$countAllRefund = Transaction::where('status_transaksi', 'refund')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where(function ($a) {
$a->where('pembeli', auth()->user()->email)->orWhere('penjual', auth()->user()->email);
})
->count();
$countAllIndicated = Transaction::where('status_transaksi', 'challenge')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where(function ($a) {
$a->where('pembeli', auth()->user()->email)->orWhere('penjual', auth()->user()->email);
})
->count();
// Pembeli
$countBuyerFinished = Transaction::whereIn('status_transaksi', ['finished', 'done'])
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('pembeli', auth()->user()->email)
->count();
$countBuyerPaid = Transaction::where('status_transaksi', 'success')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('pembeli', auth()->user()->email)
->count();
$countBuyerPending = Transaction::where('status_transaksi', 'created')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('pembeli', auth()->user()->email)
->count();
$countBuyerProcessed = Transaction::whereIn('status_transaksi', ['process', 'sending', 'sent'])
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('pembeli', auth()->user()->email)
->count();
$countBuyerCancelled = Transaction::where('status_transaksi', 'failure')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('pembeli', auth()->user()->email)
->count();
$countBuyerRefundPending = Transaction::join('refunds', 'refunds.transaction_id', '=', 'transactions.id')
->where('refunds.status', 'pending')
->where('transactions.status_transaksi', 'refund')
->whereDate('transactions.created_at', '>=', $startDate)
->whereDate('transactions.created_at', '<=', $todayDate)
->where('pembeli', auth()->user()->email)
->count();
$countBuyerRefundApproved = Transaction::join('refunds', 'refunds.transaction_id', '=', 'transactions.id')
->where('refunds.status', 'refund')
->where('transactions.status_transaksi', 'refund')
->whereDate('transactions.created_at', '>=', $startDate)
->whereDate('transactions.created_at', '<=', $todayDate)
->where('pembeli', auth()->user()->email)
->count();
$countBuyerRefundDenied = Transaction::join('refunds', 'refunds.transaction_id', '=', 'transactions.id')
->where('refunds.status', 'deny')
->whereDate('transactions.created_at', '>=', $startDate)
->whereDate('transactions.created_at', '<=', $todayDate)
->where('pembeli', auth()->user()->email)
->count();
$countBuyerIndicated = Transaction::where('status_transaksi', 'challenge')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('pembeli', auth()->user()->email)
->count();
// Penjual
$countSellerPending = Transaction::where('status_transaksi', 'success')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('penjual', auth()->user()->email)
->count();
$countSellerFinished = Transaction::whereIn('status_transaksi', ['done', 'finished'])
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('penjual', auth()->user()->email)
->count();
$countSellerProcessed = Transaction::where('status_transaksi', 'process')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('penjual', auth()->user()->email)
->count();
$countSellerSending = Transaction::where('status_transaksi', 'sending')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('penjual', auth()->user()->email)
->count();
$countSellerSent = Transaction::where('status_transaksi', 'sent')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('penjual', auth()->user()->email)
->count();
$countSellerCancelled = Transaction::where('status_transaksi', 'failure')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('penjual', auth()->user()->email)
->count();
$countSellerRefund = Transaction::where('status_transaksi', 'refund')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('penjual', auth()->user()->email)
->count();
$countSellerIndicated = Transaction::where('status_transaksi', 'challenge')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('penjual', auth()->user()->email)
->count();
$totalTransaction = Transaction::whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where(function ($a) {
$a->where('pembeli', auth()->user()->email)->orWhere('penjual', auth()->user()->email);
})
->count();
$totalTransactionSebelum = Transaction::whereDate('created_at', '>=', $startBeforeDate)
->whereDate('created_at', '<=', $endBeforeDate)
->where(function ($a) {
$a->where('pembeli', auth()->user()->email)->orWhere('penjual', auth()->user()->email);
})
->count();
$rateTransaction = floatval((floatval($totalTransaction) - floatval($totalTransactionSebelum)) * 100) / ($totalTransactionSebelum == 0 ? 1 : floatval($totalTransactionSebelum));
$totalPemasukan = Transaction::where('status_transaksi', 'done')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('penjual', auth()->user()->email)
->sum('total_harga');
$totalPemasukanSebelum = Transaction::where('status_transaksi', 'done')
->whereDate('created_at', '>=', $startBeforeDate)
->whereDate('created_at', '<=', $endBeforeDate)
->where('penjual', auth()->user()->email)
->sum('total_harga');
$ratePemasukan = floatval((floatval($totalPemasukan) - floatval($totalPemasukanSebelum)) * 100) / ($totalPemasukanSebelum == 0 ? 1 : floatval($totalPemasukanSebelum));
$totalPengeluaran = Transaction::whereIn('status_transaksi', ['finished','done'])
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('pembeli', auth()->user()->email)
->sum('total_harga');
$totalPengeluaranSebelum = Transaction::whereIn('status_transaksi', ['finished','done'])
->whereDate('created_at', '>=', $startBeforeDate)
->whereDate('created_at', '<=', $endBeforeDate)
->where('pembeli', auth()->user()->email)
->sum('total_harga');
$ratePengeluaran = floatval(((floatval($totalPengeluaran) - floatval($totalPengeluaranSebelum)) * 100) / ($totalPengeluaranSebelum == 0 ? 1 : floatval($totalPengeluaranSebelum)));
$totalProfit = Transaction::whereIn('status_transaksi', ['done', 'finished'])
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where(function ($a) {
$a->where('pembeli', auth()->user()->email)->orWhere('penjual', auth()->user()->email);
})
->sum('total_harga');
$totalProfitSebelum = Transaction::whereIn('status_transaksi', ['done', 'finished'])
->whereDate('created_at', '>=', $startBeforeDate)
->whereDate('created_at', '<=', $endBeforeDate)
->where(function ($a) {
$a->where('pembeli', auth()->user()->email)->orWhere('penjual', auth()->user()->email);
})
->sum('total_harga');
$rateProfit = floatval(((floatval($totalProfit) - floatval($totalProfitSebelum))*100)/($totalProfitSebelum == 0 ? 1 : floatval($totalProfitSebelum)));
$dataLabel = [];
$dataChartTransaction = [];
$dataChartRefund = [];
$dataChartPemasukan = [];
$dataChartPengeluaran = [];
$startDate = $start;
$intervalDate = new DateInterval('P1D');
$todayDate = $today;
$endDate = $todayDate->add($intervalDate);
for ($date = clone $startDate; $date <= $endDate; $date->modify('+1 day')) {
$transaction = Transaction::whereIn('status_transaksi', ['done', 'finished'])
->whereDate('created_at', $date->format('Y-m-d'))
->where(function ($a) {
$a->where('pembeli', auth()->user()->email)->orWhere('penjual', auth()->user()->email);
})
->sum('total_keuntungan');
$refund = Transaction::join('refunds','refunds.transaction_id','=','transactions.id')
->where('status_transaksi', 'refund')
->where('status','refund')
->whereDate('transactions.created_at', $date->format('Y-m-d'))
->where(function ($a) {
$a->where('pembeli', auth()->user()->email)->orWhere('penjual', auth()->user()->email);
})
->sum('total_keuntungan');
$pemasukan = Transaction::whereIn('status_transaksi', ['done', 'finished'])
->where('penjual', auth()->user()->email)
->whereDate('created_at', $date->format('Y-m-d'))
->sum('total_harga');
$pengeluaran = Transaction::whereIn('status_transaksi', ['done', 'finished'])
->where('pembeli', auth()->user()->email)
->whereDate('created_at', $date->format('Y-m-d'))
->sum('total_harga');
$dataChartTransaction[] = floatval($transaction);
$dataChartRefund[] = floatval($refund);
$dataChartPemasukan[] = floatval($pemasukan);
$dataChartPengeluaran[] = floatval($pengeluaran);
$dataLabel[] = $date->format('d/m/Y');
}
return view('user.index', compact(
'countAllFinished',
'countAllPending',
'countAllProcessed',
'countAllCanceled',
'countAllRefund',
'countAllIndicated',
'countBuyerFinished',
'countBuyerPaid',
'countBuyerPending',
'countBuyerProcessed',
'countBuyerCancelled',
'countBuyerRefundPending',
'countBuyerRefundApproved',
'countBuyerRefundDenied',
'countBuyerIndicated',
'countSellerPending',
'countSellerFinished',
'countSellerProcessed',
'countSellerSending',
'countSellerSent',
'countSellerCancelled',
'countSellerRefund',
'countSellerIndicated',
'totalTransaction',
'rateTransaction',
'totalPemasukan',
'ratePemasukan',
'totalPengeluaran',
'ratePengeluaran',
'rateProfit',
'dataLabel',
'dataChartTransaction',
'dataChartRefund',
'dataChartPemasukan',
'dataChartPengeluaran'
));
}
public function getDataBySearch(Request $request)
{
$startDate = $request->startDate;
$todayDate = $request->endDate;
$pickDate = new DateTime($startDate);
$start = new DateTime($startDate);
$today = new DateTime($todayDate);
$interval = $start->diff($today);
$intervalBefore = new DateInterval('P1D');
$intervalBeforeStart = new DateInterval('P'.$interval->format('%a').'D');
$endBefore = $pickDate->sub($intervalBefore);
$endBeforeDate = $endBefore->format('Y-m-d');
$startBefore = $pickDate->sub($intervalBeforeStart);
$startBeforeDate = $startBefore->format('Y-m-d');
// Semua
$countAllFinished = Transaction::where('status_transaksi', 'Finished')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where(function ($a) {
$a->where('pembeli', auth()->user()->email)->orWhere('penjual', auth()->user()->email);
})
->count();
$countAllPending = Transaction::where('status_transaksi', 'created')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where(function ($a) {
$a->where('pembeli', auth()->user()->email)->orWhere('penjual', auth()->user()->email);
})
->count();
$countAllProcessed = Transaction::whereIn('status_transaksi', ['process', 'sending', 'sent'])
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where(function ($a) {
$a->where('pembeli', auth()->user()->email)->orWhere('penjual', auth()->user()->email);
})
->count();
$countAllCanceled = Transaction::where('status_transaksi', 'failure')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where(function ($a) {
$a->where('pembeli', auth()->user()->email)->orWhere('penjual', auth()->user()->email);
})
->count();
$countAllRefund = Transaction::where('status_transaksi', 'refund')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where(function ($a) {
$a->where('pembeli', auth()->user()->email)->orWhere('penjual', auth()->user()->email);
})
->count();
$countAllIndicated = Transaction::where('status_transaksi', 'challenge')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where(function ($a) {
$a->where('pembeli', auth()->user()->email)->orWhere('penjual', auth()->user()->email);
})
->count();
// Pembeli
$countBuyerFinished = Transaction::where('status_transaksi', 'finished')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('pembeli', auth()->user()->email)
->count();
$countBuyerPaid = Transaction::where('status_transaksi', 'success')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('pembeli', auth()->user()->email)
->count();
$countBuyerPending = Transaction::where('status_transaksi', 'created')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('pembeli', auth()->user()->email)
->count();
$countBuyerProcessed = Transaction::whereIn('status_transaksi', ['process', 'sending', 'sent'])
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('pembeli', auth()->user()->email)
->count();
$countBuyerCancelled = Transaction::where('status_transaksi', 'failure')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('pembeli', auth()->user()->email)
->count();
$countBuyerRefundPending = Transaction::join('refunds', 'refunds.transaction_id', '=', 'transactions.id')
->where('refunds.status', 'pending')
->whereDate('transactions.created_at', '>=', $startDate)
->whereDate('transactions.created_at', '<=', $todayDate)
->where('pembeli', auth()->user()->email)
->count();
$countBuyerRefundApproved = Transaction::join('refunds', 'refunds.transaction_id', '=', 'transactions.id')
->where('refunds.status', 'refund')
->whereDate('transactions.created_at', '>=', $startDate)
->whereDate('transactions.created_at', '<=', $todayDate)
->where('pembeli', auth()->user()->email)
->count();
$countBuyerRefundDenied = Transaction::join('refunds', 'refunds.transaction_id', '=', 'transactions.id')
->where('refunds.status', 'deny')
->whereDate('transactions.created_at', '>=', $startDate)
->whereDate('transactions.created_at', '<=', $todayDate)
->where('pembeli', auth()->user()->email)
->count();
$countBuyerIndicated = Transaction::where('status_transaksi', 'challenge')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('pembeli', auth()->user()->email)
->count();
// Penjual
$countSellerPending = Transaction::where('status_transaksi', 'success')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('penjual', auth()->user()->email)
->count();
$countSellerFinished = Transaction::where('status_transaksi', 'done')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('penjual', auth()->user()->email)
->count();
$countSellerProcessed = Transaction::where('status_transaksi', 'process')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('penjual', auth()->user()->email)
->count();
$countSellerSending = Transaction::where('status_transaksi', 'sending')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('penjual', auth()->user()->email)
->count();
$countSellerSent = Transaction::where('status_transaksi', 'sent')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('penjual', auth()->user()->email)
->count();
$countSellerCancelled = Transaction::where('status_transaksi', 'failure')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('penjual', auth()->user()->email)
->count();
$countSellerRefund = Transaction::where('status_transaksi', 'refund')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('penjual', auth()->user()->email)
->count();
$countSellerIndicated = Transaction::where('status_transaksi', 'challenge')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('penjual', auth()->user()->email)
->count();
$totalTransaction = Transaction::whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where(function ($a) {
$a->where('pembeli', auth()->user()->email)->orWhere('penjual', auth()->user()->email);
})
->count();
$totalTransactionSebelum = Transaction::whereDate('created_at', '>=', $startBeforeDate)
->whereDate('created_at', '<=', $endBeforeDate)
->where(function ($a) {
$a->where('pembeli', auth()->user()->email)->orWhere('penjual', auth()->user()->email);
})
->count();
$rateTransaction = floatval((floatval($totalTransaction) - floatval($totalTransactionSebelum)) * 100) / ($totalTransactionSebelum == 0 ? 1 : floatval($totalTransactionSebelum));
$totalPemasukan = Transaction::where('status_transaksi', 'done')
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('penjual', auth()->user()->email)
->sum('total_harga');
$totalPemasukanSebelum = Transaction::where('status_transaksi', 'done')
->whereDate('created_at', '>=', $startBeforeDate)
->whereDate('created_at', '<=', $endBeforeDate)
->where('penjual', auth()->user()->email)
->sum('total_harga');
$ratePemasukan = floatval((floatval($totalPemasukan) - floatval($totalPemasukanSebelum)) * 100) / ($totalPemasukanSebelum == 0 ? 1 : floatval($totalPemasukanSebelum));
$totalPengeluaran = Transaction::whereIn('status_transaksi', ['finished','done'])
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where('pembeli', auth()->user()->email)
->sum('total_harga');
$totalPengeluaranSebelum = Transaction::whereIn('status_transaksi', ['finished','done'])
->whereDate('created_at', '>=', $startBeforeDate)
->whereDate('created_at', '<=', $endBeforeDate)
->where('pembeli', auth()->user()->email)
->sum('total_harga');
$ratePengeluaran = floatval(((floatval($totalPengeluaran) - floatval($totalPengeluaranSebelum)) * 100) / ($totalPengeluaranSebelum == 0 ? 1 : floatval($totalPengeluaranSebelum)));
$totalProfit = Transaction::whereIn('status_transaksi', ['done', 'finished'])
->whereDate('created_at', '>=', $startDate)
->whereDate('created_at', '<=', $todayDate)
->where(function ($a) {
$a->where('pembeli', auth()->user()->email)->orWhere('penjual', auth()->user()->email);
})
->sum('total_harga');
$totalProfitSebelum = Transaction::whereIn('status_transaksi', ['done', 'finished'])
->whereDate('created_at', '>=', $startBeforeDate)
->whereDate('created_at', '<=', $endBeforeDate)
->where(function ($a) {
$a->where('pembeli', auth()->user()->email)->orWhere('penjual', auth()->user()->email);
})
->sum('total_harga');
$rateProfit = floatval(((floatval($totalProfit) - floatval($totalProfitSebelum))*100)/($totalProfitSebelum == 0 ? 1 : floatval($totalProfitSebelum)));
$dataLabel = [];
$dataChartTransaction = [];
$dataChartRefund = [];
$dataChartPemasukan = [];
$dataChartPengeluaran = [];
$first = $start;
$intervalDate = new DateInterval('P1D');
$lastDate = $today;
$last = $lastDate->add($intervalDate);
for ($date = clone $first; $date <= $last; $date->modify('+1 day')) {
$transaction = Transaction::whereIn('status_transaksi', ['done', 'finished'])
->whereDate('created_at', $date->format('Y-m-d'))
->where(function ($a) {
$a->where('pembeli', auth()->user()->email)->orWhere('penjual', auth()->user()->email);
})
->sum('total_keuntungan');
$refund = Transaction::join('refunds','refunds.transaction_id','=','transactions.id')
->where('status_transaksi', 'refund')
->where('status','refund')
->whereDate('transactions.created_at', $date->format('Y-m-d'))
->where(function ($a) {
$a->where('pembeli', auth()->user()->email)->orWhere('penjual', auth()->user()->email);
})
->sum('total_keuntungan');
$pemasukan = Transaction::whereIn('status_transaksi', ['done', 'finished'])
->where('penjual', auth()->user()->email)
->whereDate('created_at', $date->format('Y-m-d'))
->sum('total_harga');
$pengeluaran = Transaction::whereIn('status_transaksi', ['done', 'finished'])
->where('pembeli', auth()->user()->email)
->whereDate('created_at', $date->format('Y-m-d'))
->sum('total_harga');
$dataChartTransaction[] = floatval($transaction);
$dataChartRefund[] = floatval($refund);
$dataChartPemasukan[] = floatval($pemasukan);
$dataChartPengeluaran[] = floatval($pengeluaran);
$dataLabel[] = $date->format('d/m/Y');
}
return response()->json([
'countAllFinished' => $countAllFinished,
'countAllPending' => $countAllPending,
'countAllProcessed' => $countAllProcessed,
'countAllCanceled' => $countAllCanceled,
'countAllRefund' => $countAllRefund,
'countAllIndicated' => $countAllIndicated,
'countBuyerFinished' => $countBuyerFinished,
'countBuyerPaid' => $countBuyerPaid,
'countBuyerPending' => $countBuyerPending,
'countBuyerProcessed' => $countBuyerProcessed,
'countBuyerCancelled' => $countBuyerCancelled,
'countBuyerRefundPending' => $countBuyerRefundPending,
'countBuyerRefundApproved' => $countBuyerRefundApproved,
'countBuyerRefundDenied' => $countBuyerRefundDenied,
'countBuyerIndicated' => $countBuyerIndicated,
'countSellerPending' => $countSellerPending,
'countSellerFinished' => $countSellerFinished,
'countSellerProcessed' => $countSellerProcessed,
'countSellerSending' => $countSellerSending,
'countSellerSent' => $countSellerSent,
'countSellerCancelled' => $countSellerCancelled,
'countSellerRefund' => $countSellerRefund,
'countSellerIndicated' => $countSellerIndicated,
'totalTransaction' => $totalTransaction,
'rateTransaction' => $rateTransaction,
'totalPemasukan' => $totalPemasukan,
'ratePemasukan' => $ratePemasukan,
'totalPengeluaran' => $totalPengeluaran,
'ratePengeluaran' => $ratePengeluaran,
'rateProfit' => $rateProfit,
'dataLabel' => $dataLabel,
'dataChartTransaction' => $dataChartTransaction,
'dataChartRefund' => $dataChartRefund,
'dataChartPemasukan' => $dataChartPemasukan,
'dataChartPengeluaran' => $dataChartPengeluaran
]);
}
}

View File

@ -0,0 +1,167 @@
<?php
namespace App\Http\Controllers\User\Notification;
use App\Http\Controllers\Controller;
use App\Models\Notification;
use App\Models\NotificationReceiver;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Pusher\Pusher;
use Throwable;
use Yajra\DataTables\Facades\DataTables;
class UserNotification extends Controller
{
public function index()
{
return view('user.notification.index');
}
public function ListNotification(Request $request)
{
try {
$subQuery = Notification::join('notification_receivers','notifications.id','=','notification_receivers.notification_id')
->where('notification_receivers.receiver','=',auth()->user()->email)
->latest('notification_receivers.updated_at')
->select('notifications.id', 'notifications.title', 'notifications.teaser', 'notification_receivers.created_at', 'notification_receivers.status', 'notification_receivers.updated_at');
if ($request->has('search') && !empty($request->search['value'])) {
$searchNotif = $request->search['value'];
$subQuery->where(function ($a) use ($searchNotif) {
$a->whereRaw('LOWER(notifications.title) LIKE ?', ['%' . strtolower($searchNotif) . '%'])
->orWhereRaw('LOWER(notifications.teaser) LIKE ?', ['%' . strtolower($searchNotif) . '%']);
});
}
$queryNotif = Notification::from(DB::raw("({$subQuery->toSql()}) as tmp"))
->mergeBindings($subQuery->getQuery())
->select('*')
->get();
if ($request->ajax()) {
return DataTables::of($queryNotif)
->addIndexColumn()
->addColumn('action', function ($row) {
$detail = route('user-notifiaction.detail-notification', ['id' => $row->id]);
$html_code =
'
<div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
....
</button>
<ul class="dropdown-menu">
<li>
<a class="dropdown-item" href="' .
$detail .
'">Detail</a>
</li>
</ul>
</div>
';
return $html_code;
})
->rawColumns(['action'])
->make(true);
}
} catch (Throwable $e) {
Log::error($e->getMessage());
return response()->json(['success' => false, 'message' => 'Terjadi Kesalahan pada sisi server']);
}
}
public function show($id)
{
try {
DB::beginTransaction();
$notification = Notification::where('id', $id)->first();
NotificationReceiver::where('notification_id', $id)
->where('receiver', auth()->user()->email)
->update([
'status' => 'read',
]);
DB::commit();
return view('user.notification.detail-notification', compact('notification'));
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return redirect()->back();
}
}
public function latestNotification()
{
$notifications = NotificationReceiver::join('notifications', 'notification_receivers.notification_id', '=', 'notifications.id')
->where('receiver', auth()->user()->email)
->where('status', 'unread')
->select('notifications.id', 'notifications.title', 'notifications.teaser', 'notifications.updated_at')
->latest('notifications.updated_at')
->limit(4)
->get();
return response()->json([
'notifications' => $notifications,
]);
}
public function markAllAsRead()
{
$result = NotificationReceiver::where('receiver', auth()->user()->email)->update([
'status' => 'read',
]);
if($result){
return response()->json([
'status' => true,
'message' => 'Berhasil',
]);
}else{
return response()->json([
'status' => false,
'message' => 'Gagal',
]);
Log::error($result);
}
}
public function updateNewNotification(Request $request)
{
$options = [
'cluster' => 'ap1',
'useTLS' => true,
];
$pusher = new Pusher('3e5bdc20dddd7fbc655e', 'f2274c37c616d29ff590', '1659859', $options);
$payload = [
'receivers' => $request->receiver,
];
$pusher->trigger('chanel-update-notifikasi', 'event-update-notifikasi', $payload);
}
public function updateNotificationToAdmin(Request $request)
{
$options = [
'cluster' => 'ap1',
'useTLS' => true,
];
$pusher = new Pusher('3e5bdc20dddd7fbc655e', 'f2274c37c616d29ff590', '1659859', $options);
$payload = [
'service' => $request->service
];
$pusher->trigger('chanel-update-notifikasi-untuk-admin', 'event-update-notifikasi-untuk-admin', $payload);
}
}

View File

@ -0,0 +1,922 @@
<?php
namespace App\Http\Controllers\User\Pembeli;
use App\Http\Controllers\Controller;
use App\Models\Contact;
use App\Models\Notification;
use App\Models\NotificationReceiver;
use App\Models\Refund;
use App\Models\Setting;
use App\Models\Transaction;
use App\Models\TransactionDescription;
use App\Models\User;
use Carbon\Carbon;
use GuzzleHttp\Client;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
use Pusher\Pusher;
use Throwable;
use Yajra\DataTables\DataTables;
class PembeliController extends Controller
{
public function indexPembeli()
{
return view('user.transaction.pembeli.index');
}
public function create()
{
$now = Carbon::now();
$bulan = $now->format('F');
$tahun = $now->year;
$persentase_keuntungan = Setting::where('status', 'Active')
->where('bulan', '=', $bulan)
->where('tahun', '=', $tahun)
->value('persentase');
if (is_null($persentase_keuntungan)) {
$persentase_keuntungan = Setting::where('status', 'Active')
->latest()
->value('persentase');
}
return view('user.transaction.pembeli.new-transaction', [
'persentase_keuntungan' => $persentase_keuntungan,
]);
}
/**
* Store a newly created resource in storage.
*/
public function store(Request $request)
{
$request->validate(
[
'nama_barang' => ['required'],
'harga_barang' => ['required'],
'satuan_barang' => ['required'],
'jumlah_barang' => ['required'],
'email_penjual' => ['required'],
'persentase_keuntungan' => ['required'],
'total_keuntungan' => ['required'],
'total_bayar' => ['required'],
'total_harga' => ['required']
],[
'nama_barang.required' => 'Isi nama barang',
'harga_barang.required' => 'Isi harga barang',
'satuan_barang.required' => 'Isi satuan barang',
'jumlah_barang.required' => 'Isi jumlah barang',
'email_penjual.required' => 'Isi email penjual. Bisa dari kontak atau masukan email',
'persentase_keuntungan.required' => 'Terjadi kesalahan di server',
'total_keuntungan.required' => 'Terjadi kesalahan di server',
'total_bayar.required' => 'Terjadi kesalahan di server',
'total_harga.required' => 'Terjadi kesalahan di server'
]
);
$pembeli = auth()->user()->email;
$penjual = $request->email_penjual;
$nama_barang = $request->nama_barang;
$satuan_barang = $request->satuan_barang;
$deskripsi_transaksi = $request->deskripsi;
$harga_barang = $request->harga_barang;
$jumlah_barang = $request->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');
$bank_penjual = User::where('email', $penjual)->value('nama_bank');
$no_rek_penjual = User::where('email', $penjual)->value('no_rek');
if ($bank_penjual == '' && $no_rek_penjual == '') {
return response()->json([
'status' => false,
'message' => 'Penjual belum memiliki/memasukan nomor rek bank',
]);
}
$alamat = ucwords(strtolower(auth()->user()->alamat));
$now = Carbon::now();
$persentase_keuntungan = $request->persentase_keuntungan;
$total_harga = $request->total_harga;
$total_keuntungan = $request->total_keuntungan;
$total_bayar = $request->total_bayar;
$batas_pembayaran = $now->addDays(1)->toTimeString();
$batas_konfirmasi_transaksi = $now->addDays(2)->toDateTimeString();
$batas_pengiriman_barang_akhir = $now->addDays(4)->toDateTimeString();
$status = 'created';
try {
DB::beginTransaction();
$query = Transaction::create([
'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,
'nama_bank_penjual' => $bank_penjual,
'no_rek_penjual' => $no_rek_penjual,
'status_transaksi' => $status,
'batas_pembayaran' => $batas_pembayaran,
'batas_konfirmasi_transaksi' => $batas_konfirmasi_transaksi,
'batas_pengiriman_barang_akhir' => $batas_pengiriman_barang_akhir,
]);
$params = [
'transaction_details' => [
'order_id' => $query->id,
'gross_amount' => $total_bayar,
],
'item_details' => [
[
'id' => $nama_barang . time(),
'price' => $harga_barang,
'quantity' => $jumlah_barang,
'name' => $nama_barang,
],
[
'id' => 'BA'.random_int(1,9),
'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' => $alamat,
'city' => auth()->user()->village->district->city->name,
'country_code' => 'IDN',
],
],
'callbacks' => [
'finish' => route('user-pembeli.index'),
],
'enabled_payments' => ['credit_card', 'shopeepay', 'gopay', 'other_qris'],
];
$client = new Client([
'verify' => false,
]);
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
$response = $client->request('POST', 'https://app.sandbox.midtrans.com/snap/v1/transactions', [
'body' => json_encode($params),
'headers' => [
'accept' => 'application/json',
'authorization' => 'Basic ' . $auth,
'content-type' => 'application/json',
],
]);
$result = json_decode($response->getBody(), true);
Transaction::where('id', $query->id)->update([
'token' => $result['token'],
]);
$contact = Contact::where('pemilik_kontak', $pembeli)
->where('relasi_kontak', $penjual)
->count();
if ($contact == 0) {
Contact::create([
'pemilik_kontak' => $pembeli,
'relasi_kontak' => $penjual,
]);
}
TransactionDescription::create([
'transaction_id' => $query->id,
'status' => $status,
'user' => $pembeli,
'judul' => 'fa fa-plus',
'background' => 'bg-buyer',
'deskripsi' => $nama_depan_pembeli . ' telah membuat transaksi baru dengan ' . $nama_penjual,
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Berhasil menambahkan transaksi. Silahkan lakukan pembayaran.',
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Gagal menambahkan transaksi.',
]);
}
}
public function finishTransaction(Request $request)
{
$transactionDetail = Transaction::where('id', $request->id)->first();
try {
DB::beginTransaction();
Transaction::where('id', $request->id)->update([
'status_transaksi' => 'finished',
'status_pembayaran' => 'settlement',
]);
TransactionDescription::create([
'transaction_id' => $request->id,
'status' => 'finished',
'background' => 'bg-buyer',
'user' => auth()->user()->email,
'judul' => 'fas fa-check',
'deskripsi' => 'Pesanan telah diselesaikan oleh ' . auth()->user()->nama_depan . '. Uang akan dikirim ke penjual.',
]);
$url = route('user-transaction.show', ['id' => $transactionDetail->id]);
$notif = Notification::create([
'title' => 'Transaksi Selesai',
'content' => auth()->user()->nama_depan.' telah menyelesaikan transaksi. Silahkan terima uang anda. <a href="'.$url.'">Klik disini</a> untuk langsung ke detail transaksi.',
'teaser' => auth()->user()->nama_depan.' telah...'
]);
NotificationReceiver::create([
'receiver' => $transactionDetail->penjual,
'notification_id' => $notif->id
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Pesanan anda selesai dan uang akan dikirim ke penjual. Terima kasih telah menggunakan Rekber.',
'receiver' => $transactionDetail->penjual
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Gagal update status karena kesalahan server.',
]);
}
}
public function payTransaction(Request $request)
{
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
$transactionDetail = Transaction::where('id', $request->id)->first();
$response = Http::withOptions([
'verify' => false,
])
->withHeaders([
'Content-Type' => 'application/json',
'Authorization' => "Basic $auth",
])
->get('https://api.sandbox.midtrans.com/v2/' . $request->id . '/status');
$result = json_decode($response->body(), true);
$code = substr($result['status_code'], 0, 1);
try {
DB::beginTransaction();
if ($code == '4') {
return response()->json([
'status' => false,
'message' => 'Terjadi error di server.',
'data' => $result,
]);
} else {
if ($result['transaction_status'] == 'settlement') {
$transaction = 'success';
} elseif ($result['transaction_status'] == 'capture') {
if ($result['fraud_status'] == 'accept') {
$transaction = 'success';
} elseif ($result['fraud_status'] == 'challenge') {
$transaction = 'challenge';
}
} else {
$transaction = 'failure';
}
Transaction::where('id', $request->id)->update([
'metode_pembayaran' => $result['payment_type'],
'tanggal_transaksi' => $result['transaction_time'],
'status_transaksi' => $transaction,
'status_pembayaran' => $result['transaction_status'],
'fraud_status' => $result['fraud_status'],
'signature_key' => $result['signature_key'],
]);
if ($transaction == 'success') {
TransactionDescription::create([
'transaction_id' => $request->id,
'status' => 'success',
'background' => 'bg-buyer',
'judul' => 'fas fa-money-bill',
'deskripsi' => auth()->user()->nama_depan . ' telah sukses melakukan pembayaran. Transaksi diteruskan ke penjual.',
'user' => auth()->user()->email,
]);
$url = route('user-transaction.show', ['id' => $transactionDetail->id]);
$notif = Notification::create([
'title' => 'Pembayaran Sukses',
'content' => auth()->user()->nama_depan.' telah membayar transaksi. Silahkan proses transaksi ini jika memang dituju kepada anda. <a href="'.$url.'">Klik disini</a> untuk langsung ke detail transaksi.',
'teaser' => auth()->user()->nama_depan.' telah...'
]);
NotificationReceiver::create([
'receiver' => $transactionDetail->penjual,
'notification_id' => $notif->id
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Pembayaran sukses',
'receiver' => $transactionDetail->penjual
]);
} elseif ($transaction == 'challenge') {
TransactionDescription::create([
'transaction_id' => $request->id,
'status' => 'challenge',
'background' => 'bg-primary',
'judul' => 'fas fa-clock',
'deskripsi' => 'Transaksi ' . auth()->user()->email . ' terindikasi masalah/penipuan, tunggu sesaat hingga admin menyetujui pembayaran.',
'user' => 'admin@example.net',
'keterangan' => $result['status_message'],
]);
$options = [
'cluster' => 'ap1',
'useTLS' => true,
];
$pusher = new Pusher('3e5bdc20dddd7fbc655e', 'f2274c37c616d29ff590', '1659859', $options);
$payload = [
'service' => 'Transaksi'
];
$pusher->trigger('chanel-update-notifikasi-untuk-admin', 'event-update-notifikasi-untuk-admin', $payload);
DB::commit();
return response()->json([
'status' => false,
'message' => 'Pembayaran ditunda hingga disetujui oleh admin.',
]);
} else {
TransactionDescription::create([
'transaction_id' => $request->id,
'status' => 'failure',
'background' => 'bg-primary',
'judul' => 'fas fa-exclamation',
'deskripsi' => 'Terjadi kegagalan pembayaran.',
'user' => 'admin@example.net',
'keterangan' => $result['status_message'],
]);
DB::commit();
return response()->json([
'status' => false,
'message' => 'Transaksi pembayaran gagal',
]);
}
}
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Transaksi pembayaran gagal.',
]);
}
return response()->json();
}
public function cancelPayment(Request $request)
{
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
$response = Http::withOptions([
'verify' => false,
])
->withHeaders([
'Content-Type' => 'application/json',
'Authorization' => "Basic $auth",
])
->post('https://api.sandbox.midtrans.com/v2/' . $request->id . '/cancel');
$result = json_decode($response->body(), true);
if (in_array($result['status_code'], ['412','401'])) {
return response()->json([
'status' => false,
'message' => 'Transaksi gagal.',
'data' => $result
]);
} else {
try {
DB::beginTransaction();
Transaction::where('id', $request->id)->update([
'status_transaksi' => 'failure',
'status_pembayaran' => 'cancel'
]);
TransactionDescription::create([
'transaction_id' => $request->id,
'status' => 'cancel',
'background' => 'bg-buyer',
'judul' => 'fas fa-exclamation',
'deskripsi' => auth()->user()->nama_depan . ' telah membatalkan transaksi.',
'user' => auth()->user()->email,
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Transaksi berhasil dibatalkan',
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Transaksi gagal dibatalkan',
]);
}
}
}
public function cancelTransaction(Request $request){
$transaction = Transaction::where('id', $request->id)->first();
$params = [
'refund_key' => $request->id . '-ref1',
'amount' => $transaction->total_bayar,
'reason' => $request->complaint,
];
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
$response = Http::withOptions([
'verify' => false,
])
->withHeaders([
'Content-Type' => 'application/json',
'Authorization' => "Basic $auth",
])
->post('https://api.sandbox.midtrans.com/v2/' . $request->id . '/refund', $params);
$result = json_decode($response->body(), true);
$code = $result['status_code'];
$code = '200';
if ($code == '200') {
try {
DB::beginTransaction();
Transaction::where('id', $request->id)->update([
'status_transaksi' => 'failure',
'status_pembayaran' => 'refund',
]);
Refund::create([
'transaction_id' => $request->id,
'total' => $transaction->total_bayar,
'due_date' => now(),
'status' => 'refund',
'complaint' => $request->complaint,
]);
TransactionDescription::create([
'transaction_id' => $request->id,
'status' => 'refund',
'background' => 'bg-seller',
'user' => auth()->user()->email,
'judul' => 'fas fa-times',
'deskripsi' => 'Transaksi dibatalkan oleh ' . auth()->user()->nama_depan . '. Alasan : ' . $request->complaint,
]);
$url = route('user-transaction.show', ['id' => $transaction->id]);
$notif = Notification::create([
'title' => 'Transaksi Dibatalkan',
'content' => auth()->user()->nama_depan.' telah membatalkan transaksi. <a href="'.$url.'">Klik disini</a> untuk langsung ke detail transaksi.',
'teaser' => auth()->user()->nama_depan.' telah...'
]);
NotificationReceiver::create([
'receiver' => $transaction->penjual,
'notification_id' => $notif->id
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Transaksi telah dibatalkan.',
'receiver' => $transaction->penjual
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Gagal update status karena kesalahan server.',
]);
}
} else {
Log::error($result['status_message']);
return response()->json([
'status' => false,
'message' => 'Transaksi gagal',
]);
}
}
public function pendingTransaction(Request $request)
{
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
$response = Http::withOptions([
'verify' => false,
])
->withHeaders([
'Content-Type' => 'application/json',
'Authorization' => "Basic $auth",
])
->get('https://api.sandbox.midtrans.com/v2/' . $request->id . '/status');
$result = json_decode($response->body(), true);
try {
DB::beginTransaction();
Transaction::where('id', $request->id)->update([
'status_pembayaran' => $result['transaction_status'],
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Pembayaran di-pending, silahkan masuk lagi dan bayar secepat mungkin.',
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Terjadi error di bagian server.',
]);
}
}
public function onErrorTransaction(Request $request)
{
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
$response = Http::withOptions([
'verify' => false,
])
->withHeaders([
'Content-Type' => 'application/json',
'Authorization' => "Basic $auth",
])
->get('https://api.sandbox.midtrans.com/v2/' . $request->id . '/status');
$result = json_decode($response->body(), true);
try {
DB::beginTransaction();
Transaction::where('id', $request->id)->update([
'status_pembayaran' => $result['transaction_status'],
]);
if ($result['transaction_status'] == 'expire') {
TransactionDescription::create([
'transaction_id' => $request->id,
'status' => 'cancel',
'background' => 'bg-buyer',
'judul' => 'fas fa-exclamation',
'deskripsi' => 'Pembayaran sudah expire',
'user' => 'admin@example.net',
]);
DB::commit();
return response()->json([
'status' => false,
'message' => 'Pembayaran sudah expire, silahkan buat transaksi baru.',
]);
} elseif ($result['transaction'] == 'failure') {
TransactionDescription::create([
'transaction_id' => $request->id,
'status' => 'failure',
'background' => 'bg-buyer',
'judul' => 'fas fa-exclamation',
'deskripsi' => auth()->user()->nama_depan . ' telah membatalkan transaksi.',
'user' => 'admin@example.net',
]);
DB::commit();
return response()->json([
'status' => false,
'message' => 'Terjadi kesalahan di server saat pembayaran.',
'data' => $result,
]);
} else {
TransactionDescription::create([
'transaction_id' => $request->id,
'status' => $result['transaction_status'],
'background' => 'bg-primary',
'judul' => 'fas fa-exclamation',
'deskripsi' => 'Status tidak diketahui',
'user' => 'admin@example.net',
'keterangan' => $result['status_message'],
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Terjadi kesalahan di server',
'data' => $result,
]);
}
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Terjadi error di bagian server.',
]);
}
}
public function onCloseTransaction(Request $request)
{
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
$response = Http::withOptions([
'verify' => false,
])
->withHeaders([
'Content-Type' => 'application/json',
'Authorization' => "Basic $auth",
])
->get('https://api.sandbox.midtrans.com/v2/' . $request->id . '/status');
$result = json_decode($response->body(), true);
$status = $result['status_code'] == '404' ? '' : $result['transaction_status'];
if ($status == '') {
return response()->json([
'status' => true,
'message' => 'Halaman pembayaran telah ditutup. Silahkan lakukan pembayaran lagi.',
]);
} else {
try {
DB::beginTransaction();
if ($result['transaction_status'] == 'expire') {
Transaction::where('id', $request->id)->update([
'status_pembayaran' => $result['transaction_status'],
'status_transaksi' => 'failure',
]);
TransactionDescription::create([
'transaction_id' => $request->id,
'status' => 'cancel',
'background' => 'bg-buyer',
'judul' => 'fas fa-exclamation',
'deskripsi' => 'Pembayaran sudah expire',
'user' => 'admin@example.net',
]);
DB::commit();
return response()->json([
'status' => false,
'message' => 'Pembayaran sudah expire, silahkan buat transaksi baru.',
]);
} elseif ($result['transaction'] == 'failure') {
Transaction::where('id', $request->id)->update([
'status_pembayaran' => $result['transaction_status'],
'status_transaksi' => 'failure',
]);
TransactionDescription::create([
'transaction_id' => $request->id,
'status' => 'failure',
'background' => 'bg-buyer',
'judul' => 'fas fa-exclamation',
'deskripsi' => auth()->user()->nama_depan . ' telah membatalkan transaksi.',
'user' => 'admin@example.net',
]);
DB::commit();
return response()->json([
'status' => false,
'message' => 'Terjadi kesalahan di server saat pembayaran.',
]);
} else {
Transaction::where('id', $request->id)->update([
'status_pembayaran' => $result['transaction_status'],
'status_transaksi' => 'failure',
]);
TransactionDescription::create([
'transaction_id' => $request->id,
'status' => $result['transaction_status'],
'background' => 'bg-primary',
'judul' => 'fas fa-exclamation',
'deskripsi' => 'Status tidak diketahui.',
'user' => 'admin@example.net',
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Terjadi kesalahan di server',
]);
}
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Terjadi error di bagian server.',
'data' => $result
]);
}
}
}
public function listPembeli(Request $request)
{
try{
$subQuery = Transaction::join('users','transactions.penjual','=','users.email')
->where('transactions.pembeli',auth()->user()->email)
->select(
'transactions.id',
DB::raw("CONCAT(users.nama_depan,' ',users.nama_belakang) as nama_penjual"),
'transactions.nama_barang',
'transactions.total_harga',
'transactions.created_at',
'transactions.status_transaksi',
'transactions.token'
)
->latest('transactions.updated_at');
if($request->has('search') && !empty($request->search['value'])){
$searchPembeli = $request->search['value'];
if(!is_numeric($searchPembeli)){
$subQuery->where(function($a) use ($searchPembeli){
$a->whereRaw("LOWER(CONCAT(users.nama_depan,' ',users.nama_belakang)) LIKE ?",['%'.strtolower($searchPembeli).'%'])
->orWhereRaw('LOWER(transactions.nama_barang) LIKE ?',['%'.strtolower($searchPembeli).'%'])
->orWhereRaw('LOWER(transactions.status_transaksi) LIKE ?',['%'.strtolower($searchPembeli).'%']);
});
}else{
$subQuery->where(function($a) use ($searchPembeli){
$a->where('transactions.total_harga','=',$searchPembeli);
});
}
}
$queryPembeli = Transaction::from(DB::raw("({$subQuery->toSql()}) as tmp"))
->mergeBindings($subQuery->getQuery()) // Menggabungkan binding parameters
->select('*')
->get();
if ($request->ajax()) {
return DataTables::of($queryPembeli)
->addIndexColumn()
->addColumn('action', function ($row) {
$url = route('user-transaction.show', ['id' => $row->id]);
$invoice = route('invoice.get',['id' => $row->id]);
$html_code = '
<div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
....
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item"
href="'.$url.'">Detail</a>
</li>
<li><a class="dropdown-item"
href="'.$invoice.'">Invoice</a>
</li>
<li><a class="dropdown-item" data-toggle="modal"
data-target="#modalTracking"
data-id="'.$row->id.'"
href="#">Tracking</a>
</li>';
if($row->status_transaksi == 'created'){
$html_code .= '
<li><a class="dropdown-item" id="bayar"
data-id="'.$row->id.'"
data-token="'.$row->token.'"
href="#">Bayar</a>
</li>
<li><a href="#" data-id="'.$row->id.'"
id="cancelPayment" class="dropdown-item">Batal Pembayaran</a>
</li>
';
}
if($row->status_transaksi == 'success'){
$html_code .= '
<li><a href="#" data-id="'.$row->id.'"
id="cancelTransaction" class="dropdown-item">Batal Transaksi</a>
</li>
';
}
if($row->status_transaksi == 'sent'){
$html_code .= '
<li><a class="dropdown-item" data-toggle="modal"
data-target="#modalFinish"
data-id="'.$row->id.'"
href="#">Selesaikan</a>
</li>
';
}
$html_code .= '
</ul>
</div>';
return $html_code;
})
->rawColumns(['action'])
->make(true);
}
}catch(Throwable $e){
Log::error($e->getMessage());
return response()->json(['success' => false, 'message' => 'Terjadi Kesalahan pada sisi server']);
}
}
}

View File

@ -0,0 +1,437 @@
<?php
namespace App\Http\Controllers\User\Penjual;
use App\Http\Controllers\Controller;
use App\Models\Notification;
use App\Models\NotificationReceiver;
use App\Models\Refund;
use App\Models\Transaction;
use App\Models\TransactionDescription;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Storage;
use Throwable;
use Yajra\DataTables\DataTables;
class PenjualController extends Controller
{
public function indexPenjual()
{
return view('user.transaction.penjual.index');
}
public function listPenjual(Request $request)
{
try {
$subQuery = Transaction::join('users', 'transactions.pembeli', '=', 'users.email')
->where('transactions.penjual', auth()->user()->email)
->select('transactions.id', DB::raw("CONCAT(users.nama_depan,' ',users.nama_belakang) as nama_pembeli"), 'transactions.nama_barang', 'transactions.total_harga', 'transactions.created_at', 'transactions.status_transaksi')
->latest('transactions.updated_at');
if ($request->has('search') && !empty($request->search['value'])) {
$searchPenjual = $request->search['value'];
if (!is_numeric($searchPenjual)) {
$subQuery->where(function ($a) use ($searchPenjual) {
$a->whereRaw("LOWER(CONCAT(users.nama_depan,' ',users.nama_belakang)) LIKE ?", ['%' . strtolower($searchPenjual) . '%'])
->orWhereRaw('LOWER(transactions.nama_barang) LIKE ?', ['%' . strtolower($searchPenjual) . '%'])
->orWhereRaw('LOWER(transactions.status_transaksi) LIKE ?', ['%' . strtolower($searchPenjual) . '%']);
});
} else {
$subQuery->where(function ($a) use ($searchPenjual) {
$a->whereDay('transactions.created_at', '=', $searchPenjual)
->orWhereMonth('transactions.created_at', '=', $searchPenjual)
->orWhereYear('transactions.created_at', '=', $searchPenjual)
->orWhere('transactions.total_harga', '=', $searchPenjual);
});
}
}
$queryPenjual = Transaction::from(DB::raw("({$subQuery->toSql()}) as tmp"))
->mergeBindings($subQuery->getQuery()) // Menggabungkan binding parameters
->select('*')
->get();
if ($request->ajax()) {
return DataTables::of($queryPenjual)
->addIndexColumn()
->addColumn('action', function ($row) {
$url = route('user-transaction.show', ['id' => $row->id]);
$invoice = route('invoice.get', ['id' => $row->id]);
$html_code =
'
<div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
....
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item"
href="' .
$url .
'">Detail</a>
</li>
<li><a class="dropdown-item"
href="' .
$invoice .
'">Invoice</a>
</li>
<li><a class="dropdown-item" data-toggle="modal"
data-target="#modalTracking"
data-id="' .
$row->id .
'"
href="#">Tracking</a>
</li>';
if ($row->status_transaksi == 'success') {
$html_code .=
'
<li><a class="dropdown-item" id="processTransaction"
data-id="' .
$row->id .
'"
href="#">Proses Transaksi</a>
</li>
<li><a class="dropdown-item" id="denyTransaction"
data-id="' .
$row->id .
'"
href="#">Tolak Transaksi</a>
</li>
';
}
if ($row->status_transaksi == 'process') {
$html_code .=
'
<li><a class="dropdown-item" id="sendOrder"
data-id="' .
$row->id .
'"
href="#">Kirim barang</a>
</li>
';
}
if ($row->status_transaksi == 'sending') {
$html_code .=
'
<li><a class="dropdown-item" data-toggle="modal"
data-target="#modalOrderSent"
data-id="' .
$row->id .
'"
href="#">Barang sudah sampai</a>
</li>
';
}
if ($row->status_transaksi == 'finished') {
$html_code .=
'
<li><a class="dropdown-item" id="acceptResult"
data-id="' .
$row->id .
'"
href="#">Terima Uang</a>
</li>
';
}
$html_code .= '
</ul>
</div>';
return $html_code;
})
->rawColumns(['action'])
->make(true);
}
} catch (Throwable $e) {
Log::error($e->getMessage());
return response()->json(['success' => false, 'message' => 'Terjadi Kesalahan pada sisi server']);
}
}
public function acceptTransaction(Request $request)
{
$transactionDetail = Transaction::where('id', $request->id)->first();
try {
DB::beginTransaction();
Transaction::where('id', $request->id)->update([
'status_transaksi' => 'process',
]);
TransactionDescription::create([
'transaction_id' => $request->id,
'status' => 'process',
'background' => 'bg-seller',
'user' => auth()->user()->email,
'judul' => 'fas fa-handshake',
'deskripsi' => 'Transaksi telah diterima oleh ' . auth()->user()->nama_depan,
]);
$url = route('user-transaction.show', ['id' => $transactionDetail->id]);
$notif = Notification::create([
'title' => 'Transaksi Diproses',
'content' => auth()->user()->nama_depan.' telah menerima dan memproses transaksi. <a href="'.$url.'">Klik disini</a> untuk langsung ke detail transaksi.',
'teaser' => auth()->user()->nama_depan.' telah...'
]);
NotificationReceiver::create([
'receiver' => $transactionDetail->pembeli,
'notification_id' => $notif->id
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Transaksi telah diterima. Siapkan pesanan untuk dikirim ke penjual.',
'receiver' => $transactionDetail->pembeli
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Gagal update status karena kesalahan server.',
]);
}
}
public function denyTransaction(Request $request)
{
$transaction = Transaction::where('id', $request->id)->first();
$params = [
'refund_key' => $request->id . '-ref1',
'amount' => $transaction->total_bayar,
'reason' => $request->complaint,
];
$auth = base64_encode(env('MIDTRANS_SERVER_KEY'));
$response = Http::withOptions([
'verify' => false,
])
->withHeaders([
'Content-Type' => 'application/json',
'Authorization' => "Basic $auth",
])
->post('https://api.sandbox.midtrans.com/v2/' . $request->id . '/refund', $params);
$result = json_decode($response->body(), true);
$code = $result['status_code'];
$code = '200';
if ($code == '200') {
try {
DB::beginTransaction();
Transaction::where('id', $request->id)->update([
'status_transaksi' => 'failure',
'status_pembayaran' => 'refund',
]);
Refund::create([
'transaction_id' => $request->id,
'total' => $transaction->total_bayar,
'due_date' => now(),
'status' => 'refund',
'complaint' => $request->complaint,
]);
TransactionDescription::create([
'transaction_id' => $request->id,
'status' => 'refund',
'background' => 'bg-seller',
'user' => auth()->user()->email,
'judul' => 'fas fa-times',
'deskripsi' => 'Transaksi ditolak ' . auth()->user()->nama_depan . ', uang akan dikembalikan ke pembeli. Alasan : ' . $request->complaint,
]);
$url = route('user-transaction.show', ['id' => $transaction->id]);
$notif = Notification::create([
'title' => 'Transaksi Diproses',
'content' => auth()->user()->nama_depan.' telah menolak transaksi.<a href="'.$url.'">Klik disini</a> untuk langsung ke detail transaksi.',
'teaser' => auth()->user()->nama_depan.' telah...'
]);
NotificationReceiver::create([
'receiver' => $transaction->pembeli,
'notification_id' => $notif->id
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Transaksi telah ditolak. Uang akan dikirimkan ke pembeli.',
'receiver' => $transaction->pembeli
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Gagal update status karena kesalahan server.',
]);
}
} else {
Log::error($result['status_message']);
return response()->json([
'status' => false,
'message' => 'Transaksi gagal',
]);
}
}
public function sendingOrder(Request $request)
{
try {
DB::beginTransaction();
Transaction::where('id', $request->id)->update([
'status_transaksi' => 'sending',
]);
TransactionDescription::create([
'transaction_id' => $request->id,
'status' => 'sending',
'background' => 'bg-seller',
'user' => auth()->user()->email,
'judul' => 'fas fa-truck-moving',
'deskripsi' => 'Pesanan telah dikirim oleh ' . auth()->user()->nama_depan . ' dan sedang dalam perjalanan menuju pembeli.',
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Pesanan sedang dikirim dan menuju pembeli.',
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Gagal update status karena kesalahan server.',
]);
}
}
public function sentOrder(Request $request)
{
$transactionDetail = Transaction::where('id', $request->transaction_id)->first();
try {
DB::beginTransaction();
Transaction::where('id', $request->transaction_id)->update([
'status_transaksi' => 'sent',
]);
$bukti_foto = '';
if ($request->hasFile('bukti_foto')) {
$file = $request->file('bukti_foto');
$bukti_foto = time() . '.' . $file->getClientOriginalExtension();
$path = 'bukti-foto/' . $bukti_foto;
Storage::disk('public')->put($path, file_get_contents($file));
}
TransactionDescription::create([
'transaction_id' => $request->transaction_id,
'status' => 'sent',
'background' => 'bg-seller',
'user' => auth()->user()->email,
'judul' => 'fas fa-check',
'deskripsi' => 'Pesanan telah sampai di tempat pembeli. Keterangan: ' . $request->keterangan_bukti,
'bukti_foto' => $bukti_foto,
]);
$url = route('user-transaction.show', ['id' => $transactionDetail->id]);
$notif = Notification::create([
'title' => 'Transaksi Sudah Tiba',
'content' => 'Transaksi sudah tiba dan silahkan periksa terlebih dahulu sebelum menyelesaikan transaksi atau mengajukan refund. <a href="'.$url.'">Klik disini</a> untuk langsung ke detail transaksi.',
'teaser' => 'Transaksi sudah tiba dan silahkan per...',
]);
NotificationReceiver::create([
'receiver' => $transactionDetail->pembeli,
'notification_id' => $notif->id
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Pesanan telah sampai di tempat pembeli.',
'receiver' => $transactionDetail->pembeli
]);
} catch (Throwable $e) {
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Gagal update status karena kesalahan server.',
]);
}
}
public function acceptResult(Request $request)
{
try{
DB::beginTransaction();
Transaction::where('id', $request->id)->update([
'status_transaction' => 'done'
]);
TransactionDescription::create([
'transaction_id' => $request->id,
'status' => 'sent',
'background' => 'bg-seller',
'user' => auth()->user()->email,
'judul' => 'fas fa-money-bill',
'deskripsi' => auth()->user()->nama_depan.' telah menerima uang.',
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Uang akan dikirim ke bank anda. Terima kasih telah menggunakan Rekber.'
]);
}catch(Throwable $e){
DB::rollBack();
Log::error($e->getMessage());
return response()->json([
'status' => false,
'message' => 'Gagal update status karena kesalahan server.',
]);
}
}
}

View File

@ -0,0 +1,177 @@
<?php
namespace App\Http\Controllers\User\Refund;
use Throwable;
use Carbon\Carbon;
use App\Models\Refund;
use App\Models\Transaction;
use Illuminate\Http\Request;
use Yajra\DataTables\DataTables;
use App\Models\RefundDescription;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use App\Http\Controllers\Controller;
use App\Models\TransactionDescription;
class UserRefundController extends Controller
{
public function index()
{
return view('user.refund.index');
}
public function create($id)
{
return view('user.refund.new-refund',['transaction_id' => $id]);
}
public function store(Request $request){
$now = Carbon::now();
$due_date = $now->addDays(2)->toDateTimeString();
try{
DB::beginTransaction();
$transaction = Transaction::where('id',$request->id)->first();
Transaction::where('id', $request->id)->update([
'status_transaksi' => 'refund'
]);
$refund = Refund::create([
'transaction_id' => $request->id,
'total' => $transaction->total_harga,
'due_date' => $due_date,
'complaint' => $request->complaint
]);
if ($request->hasFile('files')) {
$files = $request->file('files');
foreach ($files as $file) {
$filename = $file->getClientOriginalName();
$mime = $file->getClientMimeType();
if (strpos($mime, 'image') !== false) {
$type = 'image';
$file->storeAs('public/refund-image/', $filename);
} elseif (strpos($mime, 'video') !== false) {
$type = 'video';
$file->storeAs('public/refund-video/', $filename);
} else {
$type = 'Other';
}
RefundDescription::create([
'refund_id' => $refund->id,
'filename' => $filename,
'type' => $type
]);
}
}
TransactionDescription::create([
'transaction_id' => $request->id,
'status' => 'pending',
'user' => auth()->user()->email,
'judul' => 'fas fa-clock',
'background' => 'bg-buyer',
'deskripsi' => auth()->user()->nama_depan.' mengajukan refund.',
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Permintaan refund anda telah dikirim ke admin untuk direview. Mohon tunggu maksimal 2 hari.',
'service' => 'Refund'
]);
}catch(Throwable $e){
DB::rollback();
Log::error($e->getMessage());
return response()->json(['success' => false, 'message' => 'Terjadi Kesalahan pada sisi server']);
}
}
public function show($id){
$refund = Refund::find($id);
$refundDescription = RefundDescription::where('refund_id',$id)->get();
return view('user.refund.detail-refund',[
'refund' => $refund,
'descriptions' => $refundDescription
]);
}
public function listRefund(Request $request)
{
try{
$subQuery = Refund::join('transactions', 'refunds.transaction_id', '=', 'transactions.id')
->join('users as s', 'transactions.penjual','=','s.email')
->select(
'refunds.id',
'refunds.total',
'refunds.due_date',
'refunds.created_at',
'refunds.status',
'transactions.nama_barang',
DB::raw("CONCAT(s.nama_depan,' ',s.nama_belakang) as nama_penjual"),
)
->latest('refunds.updated_at');
if($request->has('search') && !empty($request->search['value'])){
$searchRefund = $request->search['value'];
if(!is_numeric($searchRefund)){
$subQuery->where(function($a) use ($searchRefund){
$a->whereRaw("LOWER(CONCAT(s.nama_depan,' ',s.nama_belakang)) LIKE ?",['%'.strtolower($searchRefund).'%'])
->orWhereRaw('LOWER(transactions.nama_barang) LIKE ?',['%'.strtolower($searchRefund).'%'])
->orWhereRaw('LOWER(refunds.status) LIKE ?',['%'.strtolower($searchRefund).'%']);
});
}else{
$subQuery->where(function($a) use ($searchRefund){
$a->whereDay('refunds.created_at', '=', $searchRefund)
->orWhereMonth('refunds.created_at', '=', $searchRefund)
->orWhereYear('refunds.created_at', '=', $searchRefund)
->orWhereDay('refunds.due_date', '=', $searchRefund)
->orWhereMonth('refunds.due_date', '=', $searchRefund)
->orWhereYear('refunds.due_date', '=', $searchRefund)
->orWhere('refunds.total', '=', $searchRefund);
});
}
}
$queryRefund = Refund::from(DB::raw("({$subQuery->toSql()}) as tmp"))
->mergeBindings($subQuery->getQuery()) // Menggabungkan binding parameters
->select('*')
->get();
if ($request->ajax()) {
return DataTables::of($queryRefund)
->addIndexColumn()
->addColumn('action', function ($row) {
$url = route('user-refund.show', ['id' => $row->id]);
$html_code = '
<div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
....
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item"
href="'.$url.'">Detail</a>
</li>
</ul>
</div>';
return $html_code;
})
->rawColumns(['action'])
->make(true);
}
}catch(Throwable $e){
Log::error($e->getMessage());
return response()->json(['success' => false, 'message' => 'Terjadi Kesalahan pada sisi server']);
}
}
}

View File

@ -0,0 +1,44 @@
<?php
namespace App\Http\Controllers\User\Transaction;
use Throwable;
use Carbon\Carbon;
use App\Models\User;
use Ramsey\Uuid\Uuid;
use GuzzleHttp\Client;
use App\Models\Contact;
use App\Models\Setting;
use App\Models\Transaction;
use Illuminate\Http\Request;
use App\Models\TransactionUser;
use Yajra\DataTables\DataTables;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Http;
use App\Models\TransactionDescription;
use Illuminate\Support\Facades\Storage;
use Stichoza\GoogleTranslate\GoogleTranslate;
class UserTransactionController extends Controller
{
public function show($id)
{
return view('user.transaction.pembeli.detail-transaction', [
'transaction' => Transaction::findOrFail($id),
'trackings' => TransactionDescription::where('transaction_id', $id)
->latest()
->get(),
]);
}
public function transactionTracking(Request $request){
$data = TransactionDescription::where('transaction_id', $request->id)->get();
return response()->json([
'data' => $data
]);
}
}

View File

@ -1,20 +0,0 @@
<?php
namespace App\Http\Controllers\User;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\RefundUser;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use Throwable;
class UserDashboardController extends Controller
{
public function index(){
return view('user.index',[
"refundUserss"=>RefundUser::HistoryRefundUser(),
]);
}
}

View File

@ -1,154 +0,0 @@
<?php
namespace App\Http\Controllers\User;
use Throwable;
use Carbon\Carbon;
use App\Models\Refund;
use App\Models\RefundUser;
use App\Models\Transaction;
use Illuminate\Http\Request;
use Yajra\DataTables\DataTables;
use App\Models\RefundDescription;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
use App\Http\Controllers\Controller;
use App\Models\TransactionDescription;
class UserRefundController extends Controller
{
public function index()
{
$refunds = Refund::join('transactions', 'refunds.transaction_id', '=', 'transactions.id')
->where('transactions.pembeli', auth()->user()->email)
->get('refunds.*');
return view('user.refund.index', [
'refunds' => $refunds
]);
}
public function create($id)
{
return view('user.refund.new-refund',['id' => $id]);
}
public function store(Request $request){
$now = Carbon::now();
$due_date = $now->addDays(2)->toDateTimeString();
try{
DB::beginTransaction();
$transaction = Transaction::where('id',$request->id)->first();
Transaction::where('id', $request->id)->update([
'status_transaksi' => 'refund'
]);
$refund = Refund::create([
'transaction_id' => $request->id,
'total' => $transaction->total_harga,
'due_date' => $due_date,
'complaint' => $request->complaint
]);
if ($request->hasFile('files')) {
$files = $request->file('files');
foreach ($files as $file) {
$filename = $file->getClientOriginalName();
$mime = $file->getClientMimeType();
if (strpos($mime, 'image') !== false) {
$type = 'image';
$file->storeAs('public/refund-image/', $filename);
} elseif (strpos($mime, 'video') !== false) {
$type = 'video';
$file->storeAs('public/refund-video/', $filename);
} else {
$type = 'Other';
}
RefundDescription::create([
'refund_id' => $refund->id,
'filename' => $filename,
'type' => $type
]);
}
}
TransactionDescription::create([
'transaction_id' => $request->id,
'status' => 'pending',
'user' => auth()->user()->email,
'judul' => 'fas fa-clock',
'background' => 'bg-buyer',
'deskripsi' => auth()->user()->nama_depan.' mengajukan refund.',
]);
DB::commit();
return response()->json([
'status' => true,
'message' => 'Permintaan refund anda telah dikirim ke admin untuk direview. Mohon tunggu maksimal 2 hari.',
]);
}catch(Throwable $e){
DB::rollback();
Log::error($e->getMessage());
return response()->json(['success' => false, 'message' => 'Terjadi Kesalahan pada sisi server']);
}
}
public function show($id){
$refund = Refund::find($id);
$refundDescription = RefundDescription::where('refund_id',$id)->get();
return view('user.refund.detail-refund',[
'refund' => $refund,
'descriptions' => $refundDescription
]);
}
public function listRefund(Request $request)
{
$subQuery = Refund::with('transaction')
->select('*');
if ($request->has('search') && !empty($request->search['value'])) {
$searchRefund = $request->search['value'];
$subQuery->where(function ($a) use ($searchRefund) {
$a->whereRaw('pembeli LIKE ?', ['%' . $searchRefund . '%'])
->orWhereRaw('nama_barang LIKE ?', ['%' . $searchRefund . '%'])
->orWhereRaw('penjual LIKE ?', ['%' . $searchRefund . '%']);
});
}
$queryRefund = Refund::from(DB::raw("({$subQuery->toSql()}) as tmp"))
->mergeBindings($subQuery->getQuery()) // Menggabungkan binding parameters
->select('*')
->get();
if ($request->ajax()) {
return DataTables::of($queryRefund)
->addIndexColumn()
->addColumn('aksi', function ($row) {
$url = route('user-refund.show', ['id' => $row->id]);
$html_code = '
<div class="btn-group">
<button type="button" class="btn btn-primary dropdown-toggle"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
....
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item"
href="'.$url.'">Detail</a>
</li>
</ul>
</div>';
return $html_code;
})
->rawColumns(['aksi'])
->make(true);
}
}
}

59
app/Mail/approveUser.php Normal file
View 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 approveUser extends Mailable
{
use Queueable, SerializesModels;
public $content;
/**
* Create a new message instance.
*/
public function __construct($content)
{
$this->content = $content;
}
/**
* Get the message envelope.
*/
// public function envelope(): Envelope
// {
// return new Envelope(
// subject: 'Approve User',
// );
// }
/**
* 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('Pendaftaran Akun Sukses')->view('email.approve-user-email');
}
}

59
app/Mail/denyUser.php Normal file
View 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 denyUser extends Mailable
{
use Queueable, SerializesModels;
public $content;
/**
* Create a new message instance.
*/
public function __construct($content)
{
$this->content = $content;
}
/**
* Get the message envelope.
*/
// public function envelope(): Envelope
// {
// return new Envelope(
// subject: 'Deny User',
// );
// }
/**
* 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('Pendaftaran Akun Gagal')->view('email.deny-user-email');
}
}

View File

@ -0,0 +1,27 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Notification extends Model
{
use HasFactory;
protected $fillable = [
'title',
'teaser',
'content',
];
protected $casts = [
'id' => 'string',
];
// Relasi
public function notifications(){
return $this->hasMany(NotificationReceiver::class, 'id', 'notification_id');
}
// Relasi
}

View File

@ -0,0 +1,30 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class NotificationReceiver extends Model
{
use HasFactory;
protected $fillable = [
'notification_id',
'receiver',
];
protected $casts = [
'id' => 'string',
];
//Relasi
public function data_receiver(){
return $this->belongsTo(User::class, 'receiver', 'email');
}
public function notifications(){
return $this->belongsTo(Notification::class, 'notification_id', 'id');
}
//Relasi
}

View File

@ -1,44 +0,0 @@
<?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;
}
}

View File

@ -1,80 +0,0 @@
<?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;
}
}

View File

@ -1,50 +0,0 @@
<?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;
}
}

View File

@ -1,57 +0,0 @@
<?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;
}
}

View File

@ -1,90 +0,0 @@
<?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;
}
}

View File

@ -10,7 +10,7 @@ use Laravel\Sanctum\HasApiTokens;
use Tymon\JWTAuth\Contracts\JWTSubject;
use Illuminate\Database\Eloquent\Concerns\HasUuids;
class User extends Authenticatable
class User extends Authenticatable implements JWTSubject
{
use HasApiTokens, HasFactory, Notifiable;
@ -20,7 +20,6 @@ class User extends Authenticatable
* @var array<int, string>
*/
protected $fillable = [
'id',
'nama_depan',
'nama_belakang',
'tanggal_lahir',
@ -111,19 +110,19 @@ class User extends Authenticatable
//function alamat
public function getVillageName(){
return $this->village->name;
return ucwords(strtolower($this->village->name));
}
public function getDistrictName(){
return $this->village->district->name;
return ucwords(strtolower($this->village->district->name));
}
public function getCityName(){
return $this->village->district->city->name;
return ucwords(strtolower($this->village->district->city->name));
}
public function getProvinceName(){
return $this->village->district->city->province->name;
return ucwords(strtolower($this->village->district->city->province->name));
}
public function contacts()

View File

@ -30,7 +30,6 @@ class Transaction extends Model
'status_transaksi',
'status_pembayaran',
'batas_pembayaran',
'batas_pengiriman_barang_awal',
'batas_pengiriman_barang_akhir',
'nama_bank_penjual',
'no_rek_penjual'
@ -57,11 +56,11 @@ class Transaction extends Model
}
public function refunds(){
return $this->hasMany(Refund::class, 'transaction_id', 'id');
return $this->hasMany(Refund::class, 'id', 'transaction_id');
}
public function transactionDescription(){
return $this->hasMany(TransactionDescription::class, 'transaction_id', 'id');
return $this->hasMany(TransactionDescription::class, 'id', 'transaction_id');
}
//Relasi
}

View File

@ -9,6 +9,7 @@
"license": "MIT",
"require": {
"php": "^8.1",
"barryvdh/laravel-dompdf": "^2.0",
"guzzlehttp/guzzle": "^7.2",
"intervention/image": "^2.7",
"laravel/framework": "^10.10",

1095
composer.lock generated

File diff suppressed because it is too large Load Diff

284
config/dompdf.php Normal file
View File

@ -0,0 +1,284 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| Settings
|--------------------------------------------------------------------------
|
| Set some default values. It is possible to add all defines that can be set
| in dompdf_config.inc.php. You can also override the entire config file.
|
*/
'show_warnings' => false, // Throw an Exception on warnings from dompdf
'public_path' => null, // Override the public path if needed
/*
* Dejavu Sans font is missing glyphs for converted entities, turn it off if you need to show and £.
*/
'convert_entities' => true,
'options' => array(
/**
* The location of the DOMPDF font directory
*
* The location of the directory where DOMPDF will store fonts and font metrics
* Note: This directory must exist and be writable by the webserver process.
* *Please note the trailing slash.*
*
* Notes regarding fonts:
* Additional .afm font metrics can be added by executing load_font.php from command line.
*
* Only the original "Base 14 fonts" are present on all pdf viewers. Additional fonts must
* be embedded in the pdf file or the PDF may not display correctly. This can significantly
* increase file size unless font subsetting is enabled. Before embedding a font please
* review your rights under the font license.
*
* Any font specification in the source HTML is translated to the closest font available
* in the font directory.
*
* The pdf standard "Base 14 fonts" are:
* Courier, Courier-Bold, Courier-BoldOblique, Courier-Oblique,
* Helvetica, Helvetica-Bold, Helvetica-BoldOblique, Helvetica-Oblique,
* Times-Roman, Times-Bold, Times-BoldItalic, Times-Italic,
* Symbol, ZapfDingbats.
*/
"font_dir" => storage_path('fonts'), // advised by dompdf (https://github.com/dompdf/dompdf/pull/782)
/**
* The location of the DOMPDF font cache directory
*
* This directory contains the cached font metrics for the fonts used by DOMPDF.
* This directory can be the same as DOMPDF_FONT_DIR
*
* Note: This directory must exist and be writable by the webserver process.
*/
"font_cache" => storage_path('fonts'),
/**
* The location of a temporary directory.
*
* The directory specified must be writeable by the webserver process.
* The temporary directory is required to download remote images and when
* using the PFDLib back end.
*/
"temp_dir" => sys_get_temp_dir(),
/**
* ==== IMPORTANT ====
*
* dompdf's "chroot": Prevents dompdf from accessing system files or other
* files on the webserver. All local files opened by dompdf must be in a
* subdirectory of this directory. DO NOT set it to '/' since this could
* allow an attacker to use dompdf to read any files on the server. This
* should be an absolute path.
* This is only checked on command line call by dompdf.php, but not by
* direct class use like:
* $dompdf = new DOMPDF(); $dompdf->load_html($htmldata); $dompdf->render(); $pdfdata = $dompdf->output();
*/
"chroot" => realpath(base_path()),
/**
* Protocol whitelist
*
* Protocols and PHP wrappers allowed in URIs, and the validation rules
* that determine if a resouce may be loaded. Full support is not guaranteed
* for the protocols/wrappers specified
* by this array.
*
* @var array
*/
'allowed_protocols' => [
"file://" => ["rules" => []],
"http://" => ["rules" => []],
"https://" => ["rules" => []]
],
/**
* @var string
*/
'log_output_file' => null,
/**
* Whether to enable font subsetting or not.
*/
"enable_font_subsetting" => false,
/**
* The PDF rendering backend to use
*
* Valid settings are 'PDFLib', 'CPDF' (the bundled R&OS PDF class), 'GD' and
* 'auto'. 'auto' will look for PDFLib and use it if found, or if not it will
* fall back on CPDF. 'GD' renders PDFs to graphic files. {@link
* Canvas_Factory} ultimately determines which rendering class to instantiate
* based on this setting.
*
* Both PDFLib & CPDF rendering backends provide sufficient rendering
* capabilities for dompdf, however additional features (e.g. object,
* image and font support, etc.) differ between backends. Please see
* {@link PDFLib_Adapter} for more information on the PDFLib backend
* and {@link CPDF_Adapter} and lib/class.pdf.php for more information
* on CPDF. Also see the documentation for each backend at the links
* below.
*
* The GD rendering backend is a little different than PDFLib and
* CPDF. Several features of CPDF and PDFLib are not supported or do
* not make any sense when creating image files. For example,
* multiple pages are not supported, nor are PDF 'objects'. Have a
* look at {@link GD_Adapter} for more information. GD support is
* experimental, so use it at your own risk.
*
* @link http://www.pdflib.com
* @link http://www.ros.co.nz/pdf
* @link http://www.php.net/image
*/
"pdf_backend" => "CPDF",
/**
* PDFlib license key
*
* If you are using a licensed, commercial version of PDFlib, specify
* your license key here. If you are using PDFlib-Lite or are evaluating
* the commercial version of PDFlib, comment out this setting.
*
* @link http://www.pdflib.com
*
* If pdflib present in web server and auto or selected explicitely above,
* a real license code must exist!
*/
//"DOMPDF_PDFLIB_LICENSE" => "your license key here",
/**
* html target media view which should be rendered into pdf.
* List of types and parsing rules for future extensions:
* http://www.w3.org/TR/REC-html40/types.html
* screen, tty, tv, projection, handheld, print, braille, aural, all
* Note: aural is deprecated in CSS 2.1 because it is replaced by speech in CSS 3.
* Note, even though the generated pdf file is intended for print output,
* the desired content might be different (e.g. screen or projection view of html file).
* Therefore allow specification of content here.
*/
"default_media_type" => "screen",
/**
* The default paper size.
*
* North America standard is "letter"; other countries generally "a4"
*
* @see CPDF_Adapter::PAPER_SIZES for valid sizes ('letter', 'legal', 'A4', etc.)
*/
"default_paper_size" => "a4",
/**
* The default paper orientation.
*
* The orientation of the page (portrait or landscape).
*
* @var string
*/
'default_paper_orientation' => "portrait",
/**
* The default font family
*
* Used if no suitable fonts can be found. This must exist in the font folder.
* @var string
*/
"default_font" => "serif",
/**
* Image DPI setting
*
* This setting determines the default DPI setting for images and fonts. The
* DPI may be overridden for inline images by explictly setting the
* image's width & height style attributes (i.e. if the image's native
* width is 600 pixels and you specify the image's width as 72 points,
* the image will have a DPI of 600 in the rendered PDF. The DPI of
* background images can not be overridden and is controlled entirely
* via this parameter.
*
* For the purposes of DOMPDF, pixels per inch (PPI) = dots per inch (DPI).
* If a size in html is given as px (or without unit as image size),
* this tells the corresponding size in pt.
* This adjusts the relative sizes to be similar to the rendering of the
* html page in a reference browser.
*
* In pdf, always 1 pt = 1/72 inch
*
* Rendering resolution of various browsers in px per inch:
* Windows Firefox and Internet Explorer:
* SystemControl->Display properties->FontResolution: Default:96, largefonts:120, custom:?
* Linux Firefox:
* about:config *resolution: Default:96
* (xorg screen dimension in mm and Desktop font dpi settings are ignored)
*
* Take care about extra font/image zoom factor of browser.
*
* In images, <img> size in pixel attribute, img css style, are overriding
* the real image dimension in px for rendering.
*
* @var int
*/
"dpi" => 96,
/**
* Enable inline PHP
*
* If this setting is set to true then DOMPDF will automatically evaluate
* inline PHP contained within <script type="text/php"> ... </script> tags.
*
* Enabling this for documents you do not trust (e.g. arbitrary remote html
* pages) is a security risk. Set this option to false if you wish to process
* untrusted documents.
*
* @var bool
*/
"enable_php" => false,
/**
* Enable inline Javascript
*
* If this setting is set to true then DOMPDF will automatically insert
* JavaScript code contained within <script type="text/javascript"> ... </script> tags.
*
* @var bool
*/
"enable_javascript" => true,
/**
* Enable remote file access
*
* If this setting is set to true, DOMPDF will access remote sites for
* images and CSS files as required.
* This is required for part of test case www/test/image_variants.html through www/examples.php
*
* Attention!
* This can be a security risk, in particular in combination with DOMPDF_ENABLE_PHP and
* allowing remote access to dompdf.php or on allowing remote html code to be passed to
* $dompdf = new DOMPDF(, $dompdf->load_html(...,
* This allows anonymous users to download legally doubtful internet content which on
* tracing back appears to being downloaded by your server, or allows malicious php code
* in remote html pages to be executed by your server with your account privileges.
*
* @var bool
*/
"enable_remote" => true,
/**
* A ratio applied to the fonts height to be more like browsers' line height
*/
"font_height_ratio" => 1.1,
/**
* Use the HTML5 Lib parser
*
* @deprecated This feature is now always on in dompdf 2.x
* @var bool
*/
"enable_html5_parser" => true,
),
);

View File

@ -34,6 +34,8 @@ class UserFactory extends Factory
'status'=> $this->faker->randomElement(['Progress', 'Finished', 'Rejected']),
'gender' => $this->faker->randomElement(['Laki-laki', 'Perempuan']),
'kode_kelurahan' => '1101012002',
'keterangan' => $this->faker->sentence,
'foto_profile' => 'face'.random_int(1,10).'.jpg'
];
}

View File

@ -27,12 +27,13 @@ return new class extends Migration
$table->string('foto_ktp')->nullable();
$table->string('foto_wajah')->nullable();
$table->string('foto_profile')->nullable();
$table->integer('persentase_kemiripan')->nullable();
$table->float('persentase_kemiripan')->nullable();
$table->enum('status',['Finished','Progress','Rejected'])->default('Progress');
$table->string('gender',15);
$table->char('kode_kelurahan',10);
$table->string('no_rek')->nullable();
$table->string('nama_bank')->nullable();
$table->string('keterangan')->nullable();
$table->rememberToken();
$table->timestamps();

View File

@ -29,15 +29,16 @@ return new class extends Migration
$table->string('token')->nullable();
$table->string('metode_pembayaran')->nullable();
$table->string('fraud_status')->nullable();
$table->enum('status_transaksi',['success','challenge','failure','process','sending','sent','finished','created', 'refund'])->default('created'); // transaction_status
$table->enum('status_transaksi',['success','challenge','failure','process','sending','sent','finished','created', 'refund', 'done'])->default('created'); // transaction_status
$table->enum('status_pembayaran',['settlement','capture','pending','expire','failure','cancel','refund'])->nullable(); // status transaksi dari midtrans
$table->timestamp('batas_pembayaran')->nullable();
$table->timestamp('batas_pembatalan_transaksi')->nullable();
$table->timestamp('batas_konfirmasi_transaksi')->nullable();
$table->timestamp('batas_pengiriman_barang_awal');
$table->timestamp('batas_pengiriman_barang_akhir');
$table->timestamp('tanggal_transaksi')->nullable();
$table->string('nama_bank_penjual');
$table->string('no_rek_penjual');
$table->string('keterangan')->nullable();
$table->timestamps();
$table->foreign('pembeli')->on('users')->references('email');

View File

@ -20,6 +20,7 @@ return new class extends Migration
$table->enum('status',['refund','deny','pending'])->default('pending');
$table->text('complaint');
$table->timestamps();
$table->foreign('transaction_id')->on('transactions')->references('id');
});
}

View File

@ -0,0 +1,31 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('notifications', function (Blueprint $table) {
$table->uuid('id')->default(DB::raw('uuid_generate_v4()'))->primary();
$table->string('title'); // judul notifikasi
$table->string('teaser'); // cuplikan dari isi notifikasi
$table->string('content'); // isi notifikasi
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('notifications');
}
};

View File

@ -0,0 +1,34 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('notification_receivers', function (Blueprint $table) {
$table->uuid('id')->default(DB::raw('uuid_generate_v4()'))->primary();
$table->foreignUuid('notification_id');
$table->string('receiver');
$table->enum('status',['unread', 'read'])->default('unread');
$table->timestamps();
$table->foreign('receiver')->on('users')->references('email');
$table->foreign('notification_id')->on('notifications')->references('id');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('notification_receivers');
}
};

View File

@ -5,6 +5,8 @@ namespace Database\Seeders;
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use App\Models\Contact;
use App\Models\Notification;
use App\Models\NotificationReceiver;
use App\Models\Refund;
use App\Models\RefundDescription;
use Illuminate\Database\Seeder;
@ -48,6 +50,7 @@ class DatabaseSeeder extends Seeder
'persentase_kemiripan' => 100,
'gender' => $faker->randomElement(['Laki-laki', 'Perempuan']),
'kode_kelurahan' => '1101012002',
'foto_profile' => 'face1.jpg'
]);
$user1 = User::factory()->create([
@ -68,7 +71,9 @@ class DatabaseSeeder extends Seeder
'gender' => $faker->randomElement(['Laki-laki', 'Perempuan']),
'kode_kelurahan' => '1101012002',
'nama_bank' => 'mandiri',
'no_rek' => '019809210873'
'no_rek' => '019809210873',
'keterangan' => $faker->sentence(),
'foto_profile' => 'face2.jpg'
]);
$user2 = User::factory()->create([
@ -89,7 +94,9 @@ class DatabaseSeeder extends Seeder
'gender' => $faker->randomElement(['Laki-laki', 'Perempuan']),
'kode_kelurahan' => '1101012002',
'nama_bank' => 'bca',
'no_rek' => '01980921'
'no_rek' => '01980921',
'keterangan' => $faker->sentence(),
'foto_profile' => 'face3.jpg'
]);
User::factory(100)->create();
@ -121,7 +128,6 @@ class DatabaseSeeder extends Seeder
'token' => 'asda',
'status_transaksi' => 'created',
'batas_pembayaran' => now(),
'batas_pengiriman_barang_awal' => now(),
'batas_pengiriman_barang_akhir' => now(),
'nama_bank_penjual' => $user2->nama_bank,
'no_rek_penjual' => $user2->no_rek,
@ -136,6 +142,36 @@ class DatabaseSeeder extends Seeder
'deskripsi' => $user1->nama_depan . ' telah membuat transaksi baru dengan ' . $user2->nama_depan,
]);
$transaction = Transaction::create([
'id' => Str::uuid(),
'pembeli' => $user2->email,
'penjual' => $user1->email,
'nama_barang' => 'hah',
'deskripsi_transaksi' => null,
'satuan_barang' => 'barang',
'harga_barang' => 2000,
'jumlah_barang' => 2,
'persentase_keuntungan' => 2,
'total_keuntungan' => 2,
'total_harga' => 2,
'total_bayar' => 2,
'token' => 'asda',
'status_transaksi' => 'created',
'batas_pembayaran' => now(),
'batas_pengiriman_barang_akhir' => now(),
'nama_bank_penjual' => $user1->nama_bank,
'no_rek_penjual' => $user1->no_rek,
]);
TransactionDescription::create([
'transaction_id' => $transaction->id,
'status' => 'pending',
'user' => $user2->email,
'judul' => 'fa fa-plus',
'background' => 'bg-buyer',
'deskripsi' => $user2->nama_depan . ' telah membuat transaksi baru dengan ' . $user1->nama_depan,
]);
$transactionRefund = Transaction::create([
'id' => Str::uuid(),
'pembeli' => $user1->email,
@ -153,7 +189,6 @@ class DatabaseSeeder extends Seeder
'status_transaksi' => 'success',
'status_pembayaran' => 'refund',
'batas_pembayaran' => now(),
'batas_pengiriman_barang_awal' => now(),
'batas_pengiriman_barang_akhir' => now(),
'nama_bank_penjual' => $user2->nama_bank,
'no_rek_penjual' => $user2->no_rek,
@ -188,6 +223,22 @@ class DatabaseSeeder extends Seeder
'relasi_kontak' => $user1->email
]);
$notification1 = Notification::create([
'title' => 'Selamat Datang di Rekber',
'content' => 'Hai, selamat datang di Rekber. Anda dapat menikmati bertransaksi disini',
'teaser' => 'Hai, selamat datang di Rekber. ...'
]);
NotificationReceiver::create([
'notification_id' => $notification1->id,
'receiver' => $user1->email
]);
NotificationReceiver::create([
'notification_id' => $notification1->id,
'receiver' => $user2->email
]);
$this->call([ProvincesSeeder::class, CitiesSeeder::class, DistrictsSeeder::class, VillagesSeeder::class]);
}
}

11774
public/assets/css/home/bootstrap.min.css vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,168 @@
/* default.css
/* COLOR */
.post-meta a:hover,
.blog-post-title:hover,
.text-primary,
.btn-outline-primary,
.dropdown .dropdown-menu .dropdown-item:hover,
.dropdown .dropdown-menu .dropdown-item:active,
.dropdown .dropdown-menu .dropdown-item:focus,
.dropdown .dropdown-menu .dropdown-item.active,
.dropup .dropdown-menu .dropdown-item:hover,
.dropup .dropdown-menu .dropdown-item:active,
.dropup .dropdown-menu .dropdown-item:focus,
.dropup .dropdown-menu .dropdown-item.active,
.dropright .dropdown-menu .dropdown-item:hover,
.dropright .dropdown-menu .dropdown-item:active,
.dropright .dropdown-menu .dropdown-item:focus,
.dropright .dropdown-menu .dropdown-item.active,
.dropleft .dropdown-menu .dropdown-item:hover,
.dropleft .dropdown-menu .dropdown-item:active,
.dropleft .dropdown-menu .dropdown-item:focus,
.dropleft .dropdown-menu .dropdown-item.active,
.link-post-content i {
color: #900c3f !important;
}
/* BACKGROUND */
.bg-primary {
background-color: #900c3f !important;
}
.bg-secondary {
background-color: #fdebed !important;
}
.btn-primary,
.service-box:hover .icon,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary.active,
.tags a:hover,
.pagination > li > a:hover,
.pagination > li > a:focus,
.pagination > li > span:hover,
.pagination > li > span:focus,
.pagination > .active > a,
.pagination > .active > a:focus,
.pagination > .active > a:hover,
.pagination > .active > span,
.pagination > .active > span:focus,
.pagination > .active > span:hover {
background-color: #900c3f !important;
}
/* BORDER-COLOR */
.btn-primary,
.btn-outline-primary,
.pagination > li > a:hover,
.pagination > li > a:focus,
.pagination > li > span:hover,
.pagination > li > span:focus,
.pagination > .active > a,
.pagination > .active > a:focus,
.pagination > .active > a:hover,
.pagination > .active > span,
.pagination > .active > span:focus,
.pagination > .active > span:hover,
.left-sidebar-title h4,
.custom-form .form-control:focus,
.popular-border,
.blockquote,
.link-post-content,
.border-primary {
border-color: #900c3f !important;
}
.navbar-custom .navbar-nav li.active a,
.navbar-custom .navbar-nav li a:hover,
.navbar-custom .navbar-nav li a:focus,
.navbar-custom .navbar-nav li a:active {
color: #ffffff !important;
}
@media (min-width: 200px) and (max-width: 991px) {
.navbar-custom .navbar-nav li.active a,
.navbar-custom .navbar-nav li a:hover,
.navbar-custom .navbar-nav li a:active {
color: #900c3f !important;
}
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.btn-primary.focus,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled):active:focus,
.btn-primary .open > .dropdown-toggle.btn-primary {
box-shadow: 0px 8px 20px -6px rgba(1, 123, 145);
}
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary.active,
.btn-outline-primary.focus,
.btn-outline-primary:not(:disabled):not(.disabled):active,
.btn-outline-primary:not(:disabled):not(.disabled):active:focus,
.btn-outline-primary .open > .dropdown-toggle.btn-primary {
box-shadow: 0px 8px 20px -6px rgba(1, 123, 145);
/* transform: translateY(-6px); */
color: #fff !important;
}
.nav-sticky.navbar-custom .navbar-nav li.active a,
.nav-sticky.navbar-custom .navbar-nav li a:hover,
.nav-sticky.navbar-custom .navbar-nav li a:focus,
.nav-sticky.navbar-custom .navbar-nav li a:active {
color: #900c3f !important;
}
#scrollToTopBtn {
display: none;
position: fixed;
bottom: 2rem;
right: 2rem;
z-index: 5;
border: none;
outline: none;
background-color: #d24556;
color: white;
cursor: pointer;
padding: 1.8rem;
border-radius: 0.8rem;
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
transition: 0.25s;
}
#scrollToTopBtn:hover {
-webkit-transform: translateY(-0.22em);
transform: translateY(-0.252m);
box-shadow: rgba(0, 0, 0, 0.24) -2px 7px 20px;
}
.bottom-item a {
font-size: 1rem;
font-weigh: 600;
color: rgba(0, 0, 0, 0.8) !important;
}
.ml-4 {
margin-left: 4%;
}
@media screen and (max-width: 992px) {
.ml-4 {
margin: 0px;
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,542 @@
.preloader {
background-color: #f7f7f7;
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 999999;
-webkit-transition: 0.6s;
-o-transition: 0.6s;
transition: 0.6s;
margin: 0 auto;
}
.preloader .preloader-circle {
width: 100px;
height: 100px;
position: relative;
border-style: solid;
border-width: 3px;
border-top-color: #900C3F;
border-bottom-color: transparent;
border-left-color: transparent;
border-right-color: transparent;
z-index: 10;
border-radius: 50%;
-webkit-box-shadow: 0 1px 5px 0 rgba(35, 181, 185, 0.15);
box-shadow: 0 1px 5px 0 rgba(35, 181, 185, 0.15);
background-color: #ffffff;
-webkit-animation: zoom 2000ms infinite ease;
animation: zoom 2000ms infinite ease;
-webkit-transition: 0.6s;
-o-transition: 0.6s;
transition: 0.6s;
}
.preloader .preloader-circle2 {
border-top-color: #0078ff;
}
.preloader .preloader-img {
position: absolute;
top: 50%;
z-index: 200;
left: 0;
right: 0;
margin: 0 auto;
text-align: center;
display: inline-block;
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
transform: translateY(-50%);
padding-top: 6px;
-webkit-transition: 0.6s;
-o-transition: 0.6s;
transition: 0.6s;
}
.preloader .preloader-img img {
max-width: 55px;
}
.preloader .pere-text strong {
font-weight: 800;
color: #dca73a;
text-transform: uppercase;
}
@-webkit-keyframes zoom {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
-webkit-transition: 0.6s;
-o-transition: 0.6s;
transition: 0.6s;
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
-webkit-transition: 0.6s;
-o-transition: 0.6s;
transition: 0.6s;
}
}
@keyframes zoom {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
-webkit-transition: 0.6s;
-o-transition: 0.6s;
transition: 0.6s;
}
100% {
-webkit-transform: rotate(360deg);
transform: rotate(360deg);
-webkit-transition: 0.6s;
-o-transition: 0.6s;
transition: 0.6s;
}
}
.section-padding2 {
padding-top: 200px;
padding-bottom: 200px;
}
@media only screen and (min-width: 1200px) and (max-width: 1600px) {
.section-padding2 {
padding-top: 200px;
padding-bottom: 200px;
}
}
@media only screen and (min-width: 992px) and (max-width: 1199px) {
.section-padding2 {
padding-top: 200px;
padding-bottom: 200px;
}
}
@media only screen and (min-width: 768px) and (max-width: 991px) {
.section-padding2 {
padding-top: 100px;
padding-bottom: 100px;
}
}
@media only screen and (min-width: 576px) and (max-width: 767px) {
.section-padding2 {
padding-top: 70px;
padding-bottom: 70px;
}
}
@media (max-width: 767px) {
.section-padding2 {
padding-top: 70px;
padding-bottom: 70px;
}
}
.support-padding {
padding-top: 200px;
padding-bottom: 100px;
}
@media only screen and (min-width: 1200px) and (max-width: 1600px) {
.support-padding {
padding-top: 200px;
padding-bottom: 100px;
}
}
@media only screen and (min-width: 992px) and (max-width: 1199px) {
.support-padding {
padding-top: 200px;
padding-bottom: 100px;
}
}
@media only screen and (min-width: 768px) and (max-width: 991px) {
.support-padding {
padding-top: 100px;
padding-bottom: 100px;
}
}
@media only screen and (min-width: 576px) and (max-width: 767px) {
.support-padding {
padding-top: 70px;
padding-bottom: 70px;
}
}
@media (max-width: 767px) {
.support-padding {
padding-top: 70px;
padding-bottom: 70px;
}
}
.team-padding {
padding-top: 160px;
padding-bottom: 130px;
}
@media only screen and (min-width: 1200px) and (max-width: 1600px) {
.team-padding {
padding-top: 160px;
padding-bottom: 130px;
}
}
@media only screen and (min-width: 992px) and (max-width: 1199px) {
.team-padding {
padding-top: 110px;
padding-bottom: 80px;
}
}
@media only screen and (min-width: 768px) and (max-width: 991px) {
.team-padding {
padding-top: 100px;
padding-bottom: 80px;
}
}
@media (max-width: 767px) {
.team-padding {
padding-top: 100px;
padding-bottom: 80px;
}
}
.section-padding30 {
padding-top: 200px;
padding-bottom: 170px;
}
@media only screen and (min-width: 1200px) and (max-width: 1600px) {
.section-padding30 {
padding-top: 200px;
padding-bottom: 170px;
}
}
@media only screen and (min-width: 992px) and (max-width: 1199px) {
.section-padding30 {
padding-top: 150px;
padding-bottom: 120px;
}
}
@media only screen and (min-width: 768px) and (max-width: 991px) {
.section-padding30 {
padding-top: 100px;
padding-bottom: 70px;
}
}
@media only screen and (min-width: 576px) and (max-width: 767px) {
.section-padding30 {
padding-top: 60px;
padding-bottom: 28px;
}
}
@media (max-width: 767px) {
.section-padding30 {
padding-top: 60px;
padding-bottom: 28px;
}
}
.place-padding {
padding-top: 170px;
padding-bottom: 170px;
}
@media only screen and (min-width: 1200px) and (max-width: 1600px) {
.place-padding {
padding-top: 170px;
padding-bottom: 170px;
}
}
@media only screen and (min-width: 992px) and (max-width: 1199px) {
.place-padding {
padding-top: 120px;
padding-bottom: 120px;
}
}
@media only screen and (min-width: 768px) and (max-width: 991px) {
.place-padding {
padding-top: 70px;
padding-bottom: 70px;
}
}
@media only screen and (min-width: 576px) and (max-width: 767px) {
.place-padding {
padding-top: 28px;
padding-bottom: 28px;
}
}
@media (max-width: 767px) {
.place-padding {
padding-top: 28px;
padding-bottom: 28px;
}
}
.servic-padding {
padding-top: 200px;
}
@media only screen and (min-width: 1200px) and (max-width: 1600px) {
.servic-padding {
padding-top: 200px;
}
}
@media only screen and (min-width: 992px) and (max-width: 1199px) {
.servic-padding {
padding-top: 150px;
}
}
@media only screen and (min-width: 768px) and (max-width: 991px) {
.servic-padding {
padding-top: 100px;
}
}
@media only screen and (min-width: 576px) and (max-width: 767px) {
.servic-padding {
padding-top: 70px;
}
}
@media (max-width: 767px) {
.servic-padding {
padding-top: 70px;
}
}
.section-padding3 {
padding-top: 200px;
padding-bottom: 200px;
}
@media only screen and (min-width: 1200px) and (max-width: 1600px) {
.section-padding3 {
padding-top: 200px;
padding-bottom: 200px;
}
}
@media only screen and (min-width: 992px) and (max-width: 1199px) {
.section-padding3 {
padding-top: 150px;
padding-bottom: 150px;
}
}
@media only screen and (min-width: 768px) and (max-width: 991px) {
.section-padding3 {
padding-top: 50px;
padding-bottom: 100px;
}
}
@media only screen and (min-width: 576px) and (max-width: 767px) {
.section-padding3 {
padding-top: 60px;
padding-bottom: 60px;
}
}
@media (max-width: 767px) {
.section-padding3 {
padding-top: 40px;
padding-bottom: 70px;
}
}
.section-paddingt {
padding-top: 185px;
padding-bottom: 170px;
}
@media only screen and (min-width: 1200px) and (max-width: 1600px) {
.section-paddingt {
padding-top: 185px;
padding-bottom: 170px;
}
}
@media only screen and (min-width: 992px) and (max-width: 1199px) {
.section-paddingt {
padding-top: 150px;
padding-bottom: 120px;
}
}
@media only screen and (min-width: 768px) and (max-width: 991px) {
.section-paddingt {
padding-top: 100px;
padding-bottom: 70px;
}
}
@media only screen and (min-width: 576px) and (max-width: 767px) {
.section-paddingt {
padding-top: 60px;
padding-bottom: 28px;
}
}
@media (max-width: 767px) {
.section-paddingt {
padding-top: 60px;
padding-bottom: 28px;
}
}
.section-paddingt2 {
padding-bottom: 170px;
}
@media only screen and (min-width: 1200px) and (max-width: 1600px) {
.section-paddingt2 {
padding-bottom: 170px;
}
}
@media only screen and (min-width: 992px) and (max-width: 1199px) {
.section-paddingt2 {
padding-bottom: 120px;
}
}
@media only screen and (min-width: 768px) and (max-width: 991px) {
.section-paddingt2 {
padding-bottom: 70px;
}
}
@media only screen and (min-width: 576px) and (max-width: 767px) {
.section-paddingt2 {
padding-bottom: 28px;
}
}
@media (max-width: 767px) {
.section-paddingt2 {
padding-bottom: 28px;
}
}
.trusted-padding {
padding-top: 200px;
}
@media only screen and (min-width: 1200px) and (max-width: 1600px) {
.trusted-padding {
padding-top: 200px;
}
}
@media only screen and (min-width: 992px) and (max-width: 1199px) {
.trusted-padding {
padding-top: 100px;
}
}
@media only screen and (min-width: 768px) and (max-width: 991px) {
.trusted-padding {
padding-top: 100px;
}
}
@media only screen and (min-width: 576px) and (max-width: 767px) {
.trusted-padding {
padding-top: 0px;
}
}
@media (max-width: 767px) {
.trusted-padding {
padding-top: 0px;
}
}
.section-padd-top30 {
padding-top: 170px;
padding-bottom: 200px;
}
@media only screen and (min-width: 1200px) and (max-width: 1600px) {
.section-padd-top30 {
padding-top: 170px;
padding-bottom: 200px;
}
}
@media only screen and (min-width: 992px) and (max-width: 1199px) {
.section-padd-top30 {
padding-top: 170px;
padding-bottom: 200px;
}
}
@media only screen and (min-width: 768px) and (max-width: 991px) {
.section-padd-top30 {
padding-top: 100px;
padding-bottom: 160px;
}
}
@media only screen and (min-width: 576px) and (max-width: 767px) {
.section-padd-top30 {
padding-top: 50px;
padding-bottom: 90px;
}
}
@media (max-width: 767px) {
.section-padd-top30 {
padding-top: 35px;
padding-bottom: 90px;
}
}
.testimonial-padding {
padding-top: 157px;
padding-bottom: 157px;
}
@media only screen and (min-width: 1200px) and (max-width: 1600px) {
.testimonial-padding {
padding-top: 157px;
padding-bottom: 157px;
}
}
@media only screen and (min-width: 992px) and (max-width: 1199px) {
.testimonial-padding {
padding-top: 120px;
padding-bottom: 120px;
}
}
@media only screen and (min-width: 768px) and (max-width: 991px) {
.testimonial-padding {
padding-top: 100px;
padding-bottom: 100px;
}
}
@media only screen and (min-width: 576px) and (max-width: 767px) {
.testimonial-padding {
padding-top: 80px;
padding-bottom: 60px;
}
}
@media (max-width: 767px) {
.testimonial-padding {
padding-top: 80px;
padding-bottom: 60px;
}
}
.w-padding {
padding-top: 80px;
padding-bottom: 80px;
}
@media only screen and (min-width: 1200px) and (max-width: 1600px) {
.w-padding {
padding-top: 80px;
padding-bottom: 80px;
}
}
@media only screen and (min-width: 992px) and (max-width: 1199px) {
.w-padding {
padding-top: 80px;
padding-bottom: 80px;
}
}
@media only screen and (min-width: 768px) and (max-width: 991px) {
.w-padding {
padding-top: 80px;
padding-bottom: 80px;
}
}
@media only screen and (min-width: 576px) and (max-width: 767px) {
.w-padding {
padding-top: 70px;
padding-bottom: 70px;
}
}
@media (max-width: 767px) {
.w-padding {
padding-top: 70px;
padding-bottom: 70px;
}
}
.footer-padding {
padding-top: 170px;
padding-bottom: 170px;
}
@media only screen and (min-width: 1200px) and (max-width: 1600px) {
.footer-padding {
padding-top: 170px;
padding-bottom: 170px;
}
}
@media only screen and (min-width: 992px) and (max-width: 1199px) {
.footer-padding {
padding-top: 170px;
padding-bottom: 170px;
}
}
@media only screen and (min-width: 768px) and (max-width: 991px) {
.footer-padding {
padding-top: 100px;
padding-bottom: 100px;
}
}
@media only screen and (min-width: 576px) and (max-width: 767px) {
.footer-padding {
padding-top: 80px;
padding-bottom: 60px;
}
}

File diff suppressed because it is too large Load Diff

2397
public/assets/css/home/style.min.css vendored Normal file

File diff suppressed because it is too large Load Diff

620
public/assets/css/home/swiper.min.css vendored Normal file
View File

@ -0,0 +1,620 @@
.swiper-container {
margin-left: auto;
margin-right: auto;
position: relative;
overflow: hidden;
z-index: 1;
}
.swiper-container-no-flexbox .swiper-slide {
float: left;
}
.swiper-container-vertical > .swiper-wrapper {
-webkit-box-orient: vertical;
-moz-box-orient: vertical;
-ms-flex-direction: column;
-webkit-flex-direction: column;
flex-direction: column;
}
.swiper-wrapper {
position: relative;
width: 100%;
height: 100%;
z-index: 1;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-transition-property: -webkit-transform;
-moz-transition-property: -moz-transform;
-o-transition-property: -o-transform;
-ms-transition-property: -ms-transform;
transition-property: transform;
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
}
.swiper-container-android .swiper-slide,
.swiper-wrapper {
-webkit-transform: translate3d(0, 0, 0);
-moz-transform: translate3d(0, 0, 0);
-o-transform: translate(0, 0);
-ms-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.swiper-container-multirow > .swiper-wrapper {
-webkit-box-lines: multiple;
-moz-box-lines: multiple;
-ms-flex-wrap: wrap;
-webkit-flex-wrap: wrap;
flex-wrap: wrap;
}
.swiper-container-free-mode > .swiper-wrapper {
-webkit-transition-timing-function: ease-out;
-moz-transition-timing-function: ease-out;
-ms-transition-timing-function: ease-out;
-o-transition-timing-function: ease-out;
transition-timing-function: ease-out;
margin: 0 auto;
}
.swiper-slide {
-webkit-flex-shrink: 0;
-ms-flex: 0 0 auto;
flex-shrink: 0;
width: 100%;
height: 100%;
position: relative;
}
.swiper-container-autoheight,
.swiper-container-autoheight .swiper-slide {
height: auto;
}
.swiper-container-autoheight .swiper-wrapper {
-webkit-box-align: start;
-ms-flex-align: start;
-webkit-align-items: flex-start;
align-items: flex-start;
-webkit-transition-property: -webkit-transform, height;
-moz-transition-property: -moz-transform;
-o-transition-property: -o-transform;
-ms-transition-property: -ms-transform;
transition-property: transform, height;
}
.swiper-container .swiper-notification {
position: absolute;
left: 0;
top: 0;
pointer-events: none;
opacity: 0;
z-index: -1000;
}
.swiper-wp8-horizontal {
-ms-touch-action: pan-y;
touch-action: pan-y;
}
.swiper-wp8-vertical {
-ms-touch-action: pan-x;
touch-action: pan-x;
}
.swiper-button-next,
.swiper-button-prev {
position: absolute;
top: 50%;
width: 27px;
height: 44px;
margin-top: -22px;
z-index: 10;
cursor: pointer;
-moz-background-size: 27px 44px;
-webkit-background-size: 27px 44px;
background-size: 27px 44px;
background-position: center;
background-repeat: no-repeat;
}
.swiper-button-next.swiper-button-disabled,
.swiper-button-prev.swiper-button-disabled {
opacity: 0.35;
cursor: auto;
pointer-events: none;
}
.swiper-button-prev,
.swiper-container-rtl .swiper-button-next {
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");
left: 10px;
right: auto;
}
.swiper-button-prev.swiper-button-black,
.swiper-container-rtl .swiper-button-next.swiper-button-black {
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E");
}
.swiper-button-prev.swiper-button-white,
.swiper-container-rtl .swiper-button-next.swiper-button-white {
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E");
}
.swiper-button-next,
.swiper-container-rtl .swiper-button-prev {
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23007aff'%2F%3E%3C%2Fsvg%3E");
right: 10px;
left: auto;
}
.swiper-button-next.swiper-button-black,
.swiper-container-rtl .swiper-button-prev.swiper-button-black {
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23000000'%2F%3E%3C%2Fsvg%3E");
}
.swiper-button-next.swiper-button-white,
.swiper-container-rtl .swiper-button-prev.swiper-button-white {
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23ffffff'%2F%3E%3C%2Fsvg%3E");
}
.swiper-pagination {
position: absolute;
text-align: center;
-webkit-transition: 0.3s;
-moz-transition: 0.3s;
-o-transition: 0.3s;
transition: 0.3s;
-webkit-transform: translate3d(0, 0, 0);
-ms-transform: translate3d(0, 0, 0);
-o-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
z-index: 10;
}
.swiper-pagination.swiper-pagination-hidden {
opacity: 0;
}
.swiper-container-horizontal > .swiper-pagination-bullets,
.swiper-pagination-custom,
.swiper-pagination-fraction {
bottom: 10px;
left: 0;
width: 100%;
}
.swiper-pagination-bullet {
width: 8px;
height: 8px;
display: inline-block;
border-radius: 100%;
background: #BFBFBF;
opacity: 0.2;
}
button.swiper-pagination-bullet {
border: none;
margin: 0;
padding: 0;
box-shadow: none;
-moz-appearance: none;
-ms-appearance: none;
-webkit-appearance: none;
appearance: none;
}
.swiper-pagination-clickable .swiper-pagination-bullet {
cursor: pointer;
}
.swiper-pagination-white .swiper-pagination-bullet {
background: #fff;
}
.swiper-pagination-bullet-active {
opacity: 1;
background: #007aff;
}
.swiper-pagination-white .swiper-pagination-bullet-active {
background: #fff;
}
.swiper-pagination-black .swiper-pagination-bullet-active {
background: #000;
}
.swiper-container-vertical > .swiper-pagination-bullets {
right: 10px;
top: 50%;
-webkit-transform: translate3d(0, -50%, 0);
-moz-transform: translate3d(0, -50%, 0);
-o-transform: translate(0, -50%);
-ms-transform: translate3d(0, -50%, 0);
transform: translate3d(0, -50%, 0);
}
.swiper-container-vertical
> .swiper-pagination-bullets
.swiper-pagination-bullet {
margin: 5px 0;
display: block;
}
.swiper-container-horizontal
> .swiper-pagination-bullets
.swiper-pagination-bullet {
margin: 0 5px;
}
.swiper-pagination-progress {
background: rgba(0, 0, 0, 0.25);
position: absolute;
}
.swiper-pagination-progress .swiper-pagination-progressbar {
background: #007aff;
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
-webkit-transform: scale(0);
-ms-transform: scale(0);
-o-transform: scale(0);
transform: scale(0);
-webkit-transform-origin: left top;
-moz-transform-origin: left top;
-ms-transform-origin: left top;
-o-transform-origin: left top;
transform-origin: left top;
}
.swiper-container-rtl
.swiper-pagination-progress
.swiper-pagination-progressbar {
-webkit-transform-origin: right top;
-moz-transform-origin: right top;
-ms-transform-origin: right top;
-o-transform-origin: right top;
transform-origin: right top;
}
.swiper-container-horizontal > .swiper-pagination-progress {
width: 100%;
height: 4px;
left: 0;
top: 0;
}
.swiper-container-vertical > .swiper-pagination-progress {
width: 4px;
height: 100%;
left: 0;
top: 0;
}
.swiper-pagination-progress.swiper-pagination-white {
background: rgba(255, 255, 255, 0.5);
}
.swiper-pagination-progress.swiper-pagination-white
.swiper-pagination-progressbar {
background: #fff;
}
.swiper-pagination-progress.swiper-pagination-black
.swiper-pagination-progressbar {
background: #000;
}
.swiper-container-3d {
-webkit-perspective: 1200px;
-moz-perspective: 1200px;
-o-perspective: 1200px;
perspective: 1200px;
}
.swiper-container-3d .swiper-cube-shadow,
.swiper-container-3d .swiper-slide,
.swiper-container-3d .swiper-slide-shadow-bottom,
.swiper-container-3d .swiper-slide-shadow-left,
.swiper-container-3d .swiper-slide-shadow-right,
.swiper-container-3d .swiper-slide-shadow-top,
.swiper-container-3d .swiper-wrapper {
-webkit-transform-style: preserve-3d;
-moz-transform-style: preserve-3d;
-ms-transform-style: preserve-3d;
transform-style: preserve-3d;
}
.swiper-container-3d .swiper-slide-shadow-bottom,
.swiper-container-3d .swiper-slide-shadow-left,
.swiper-container-3d .swiper-slide-shadow-right,
.swiper-container-3d .swiper-slide-shadow-top {
position: absolute;
left: 0;
top: 0;
width: 230px;
height: auto;
pointer-events: none;
z-index: 10;
}
.swiper-container-3d .swiper-slide-shadow-left {
background-image: -webkit-gradient(
linear,
left top,
right top,
from(rgba(0, 0, 0, 0.5)),
to(rgba(0, 0, 0, 0))
);
background-image: -webkit-linear-gradient(
right,
rgba(0, 0, 0, 0.5),
rgba(0, 0, 0, 0)
);
background-image: -moz-linear-gradient(
right,
rgba(0, 0, 0, 0.5),
rgba(0, 0, 0, 0)
);
background-image: -o-linear-gradient(
right,
rgba(0, 0, 0, 0.5),
rgba(0, 0, 0, 0)
);
background-image: linear-gradient(
to left,
rgba(0, 0, 0, 0.5),
rgba(0, 0, 0, 0)
);
}
.swiper-container-3d .swiper-slide-shadow-right {
background-image: -webkit-gradient(
linear,
right top,
left top,
from(rgba(0, 0, 0, 0.5)),
to(rgba(0, 0, 0, 0))
);
background-image: -webkit-linear-gradient(
left,
rgba(0, 0, 0, 0.5),
rgba(0, 0, 0, 0)
);
background-image: -moz-linear-gradient(
left,
rgba(0, 0, 0, 0.5),
rgba(0, 0, 0, 0)
);
background-image: -o-linear-gradient(
left,
rgba(0, 0, 0, 0.5),
rgba(0, 0, 0, 0)
);
background-image: linear-gradient(
to right,
rgba(0, 0, 0, 0.5),
rgba(0, 0, 0, 0)
);
}
.swiper-container-3d .swiper-slide-shadow-top {
background-image: -webkit-gradient(
linear,
left top,
left bottom,
from(rgba(0, 0, 0, 0.5)),
to(rgba(0, 0, 0, 0))
);
background-image: -webkit-linear-gradient(
bottom,
rgba(0, 0, 0, 0.5),
rgba(0, 0, 0, 0)
);
background-image: -moz-linear-gradient(
bottom,
rgba(0, 0, 0, 0.5),
rgba(0, 0, 0, 0)
);
background-image: -o-linear-gradient(
bottom,
rgba(0, 0, 0, 0.5),
rgba(0, 0, 0, 0)
);
background-image: linear-gradient(
to top,
rgba(0, 0, 0, 0.5),
rgba(0, 0, 0, 0)
);
}
.swiper-container-3d .swiper-slide-shadow-bottom {
background-image: -webkit-gradient(
linear,
left bottom,
left top,
from(rgba(0, 0, 0, 0.5)),
to(rgba(0, 0, 0, 0))
);
background-image: -webkit-linear-gradient(
top,
rgba(0, 0, 0, 0.5),
rgba(0, 0, 0, 0)
);
background-image: -moz-linear-gradient(
top,
rgba(0, 0, 0, 0.5),
rgba(0, 0, 0, 0)
);
background-image: -o-linear-gradient(
top,
rgba(0, 0, 0, 0.5),
rgba(0, 0, 0, 0)
);
background-image: linear-gradient(
to bottom,
rgba(0, 0, 0, 0.5),
rgba(0, 0, 0, 0)
);
}
.swiper-container-coverflow .swiper-wrapper,
.swiper-container-flip .swiper-wrapper {
-ms-perspective: 1200px;
}
.swiper-container-cube,
.swiper-container-flip {
overflow: visible;
}
.swiper-container-cube .swiper-slide,
.swiper-container-flip .swiper-slide {
pointer-events: none;
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-ms-backface-visibility: hidden;
backface-visibility: hidden;
z-index: 1;
}
.swiper-container-cube .swiper-slide .swiper-slide,
.swiper-container-flip .swiper-slide .swiper-slide {
pointer-events: none;
}
.swiper-container-cube .swiper-slide-active,
.swiper-container-cube .swiper-slide-active .swiper-slide-active,
.swiper-container-flip .swiper-slide-active,
.swiper-container-flip .swiper-slide-active .swiper-slide-active {
pointer-events: auto;
}
.swiper-container-cube .swiper-slide-shadow-bottom,
.swiper-container-cube .swiper-slide-shadow-left,
.swiper-container-cube .swiper-slide-shadow-right,
.swiper-container-cube .swiper-slide-shadow-top,
.swiper-container-flip .swiper-slide-shadow-bottom,
.swiper-container-flip .swiper-slide-shadow-left,
.swiper-container-flip .swiper-slide-shadow-right,
.swiper-container-flip .swiper-slide-shadow-top {
z-index: 0;
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-ms-backface-visibility: hidden;
backface-visibility: hidden;
}
.swiper-container-cube .swiper-slide {
visibility: hidden;
-webkit-transform-origin: 0 0;
-moz-transform-origin: 0 0;
-ms-transform-origin: 0 0;
transform-origin: 0 0;
width: 100%;
height: 100%;
}
.swiper-container-cube.swiper-container-rtl .swiper-slide {
-webkit-transform-origin: 100% 0;
-moz-transform-origin: 100% 0;
-ms-transform-origin: 100% 0;
transform-origin: 100% 0;
}
.swiper-container-cube .swiper-slide-active,
.swiper-container-cube .swiper-slide-next,
.swiper-container-cube .swiper-slide-next + .swiper-slide,
.swiper-container-cube .swiper-slide-prev {
pointer-events: auto;
visibility: visible;
}
.swiper-container-cube .swiper-cube-shadow {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 100%;
background: #000;
opacity: 0.6;
-webkit-filter: blur(50px);
filter: blur(50px);
z-index: 0;
}
.swiper-container-fade.swiper-container-free-mode .swiper-slide {
-webkit-transition-timing-function: ease-out;
-moz-transition-timing-function: ease-out;
-ms-transition-timing-function: ease-out;
-o-transition-timing-function: ease-out;
transition-timing-function: ease-out;
}
.swiper-container-fade .swiper-slide {
pointer-events: none;
-webkit-transition-property: opacity;
-moz-transition-property: opacity;
-o-transition-property: opacity;
transition-property: opacity;
}
.swiper-container-fade .swiper-slide .swiper-slide {
pointer-events: none;
}
.swiper-container-fade .swiper-slide-active,
.swiper-container-fade .swiper-slide-active .swiper-slide-active {
pointer-events: auto;
}
.swiper-zoom-container {
width: 100%;
height: 100%;
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
display: -webkit-flex;
display: flex;
-webkit-box-pack: center;
-moz-box-pack: center;
-ms-flex-pack: center;
-webkit-justify-content: center;
justify-content: center;
-webkit-box-align: center;
-moz-box-align: center;
-ms-flex-align: center;
-webkit-align-items: center;
align-items: center;
text-align: center;
}
.swiper-zoom-container > canvas,
.swiper-zoom-container > img,
.swiper-zoom-container > svg {
max-width: 100%;
max-height: 100%;
object-fit: contain;
}
.swiper-scrollbar {
border-radius: 10px;
position: relative;
-ms-touch-action: none;
background: rgba(0, 0, 0, 0.1);
}
.swiper-container-horizontal > .swiper-scrollbar {
position: absolute;
left: 1%;
bottom: 3px;
z-index: 50;
height: 5px;
width: 98%;
}
.swiper-container-vertical > .swiper-scrollbar {
position: absolute;
right: 3px;
top: 1%;
z-index: 50;
width: 5px;
height: 98%;
}
.swiper-scrollbar-drag {
height: 100%;
width: 100%;
position: relative;
background: rgba(0, 0, 0, 0.5);
border-radius: 10px;
left: 0;
top: 0;
}
.swiper-scrollbar-cursor-drag {
cursor: move;
}
.swiper-lazy-preloader {
width: 42px;
height: 42px;
position: absolute;
left: 50%;
top: 50%;
margin-left: -21px;
margin-top: -21px;
z-index: 10;
-webkit-transform-origin: 50%;
-moz-transform-origin: 50%;
transform-origin: 50%;
-webkit-animation: swiper-preloader-spin 1s steps(12, end) infinite;
-moz-animation: swiper-preloader-spin 1s steps(12, end) infinite;
animation: swiper-preloader-spin 1s steps(12, end) infinite;
}
.swiper-lazy-preloader:after {
display: block;
content: "";
width: 100%;
height: 100%;
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%236c6c6c'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
background-position: 50%;
-webkit-background-size: 100%;
background-size: 100%;
background-repeat: no-repeat;
}
.swiper-lazy-preloader-white:after {
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg%20viewBox%3D'0%200%20120%20120'%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20xmlns%3Axlink%3D'http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink'%3E%3Cdefs%3E%3Cline%20id%3D'l'%20x1%3D'60'%20x2%3D'60'%20y1%3D'7'%20y2%3D'27'%20stroke%3D'%23fff'%20stroke-width%3D'11'%20stroke-linecap%3D'round'%2F%3E%3C%2Fdefs%3E%3Cg%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(30%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(60%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(90%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(120%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.27'%20transform%3D'rotate(150%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.37'%20transform%3D'rotate(180%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.46'%20transform%3D'rotate(210%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.56'%20transform%3D'rotate(240%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.66'%20transform%3D'rotate(270%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.75'%20transform%3D'rotate(300%2060%2C60)'%2F%3E%3Cuse%20xlink%3Ahref%3D'%23l'%20opacity%3D'.85'%20transform%3D'rotate(330%2060%2C60)'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
}
@-webkit-keyframes swiper-preloader-spin {
100% {
-webkit-transform: rotate(360deg);
}
}
@keyframes swiper-preloader-spin {
100% {
transform: rotate(360deg);
}
}

View File

@ -0,0 +1,140 @@
.tns-outer {
padding: 0 !important;
}
.tns-outer [hidden] {
display: none !important;
}
.tns-outer [aria-controls],
.tns-outer [data-action] {
cursor: pointer;
}
.tns-slider {
-webkit-transition: all 0s;
-moz-transition: all 0s;
transition: all 0s;
}
.tns-slider > .tns-item {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.tns-horizontal.tns-subpixel {
white-space: nowrap;
}
.tns-horizontal.tns-subpixel > .tns-item {
display: inline-block;
vertical-align: top;
white-space: normal;
}
.tns-horizontal.tns-no-subpixel:after {
content: "";
display: table;
clear: both;
}
.tns-horizontal.tns-no-subpixel > .tns-item {
float: left;
}
.tns-horizontal.tns-carousel.tns-no-subpixel > .tns-item {
margin-right: -100%;
}
.tns-no-calc {
position: relative;
left: 0;
}
.tns-gallery {
position: relative;
left: 0;
min-height: 1px;
}
.tns-gallery > .tns-item {
position: absolute;
left: -100%;
-webkit-transition: transform 0s, opacity 0s;
-moz-transition: transform 0s, opacity 0s;
transition: transform 0s, opacity 0s;
}
.tns-gallery > .tns-slide-active {
position: relative;
left: auto !important;
}
.tns-gallery > .tns-moving {
-webkit-transition: all 0.25s;
-moz-transition: all 0.25s;
transition: all 0.25s;
}
.tns-autowidth {
display: inline-block;
}
.tns-lazy-img {
-webkit-transition: opacity 0.6s;
-moz-transition: opacity 0.6s;
transition: opacity 0.6s;
opacity: 0.6;
}
.tns-lazy-img.tns-complete {
opacity: 1;
}
.tns-ah {
-webkit-transition: height 0s;
-moz-transition: height 0s;
transition: height 0s;
}
.tns-ovh {
overflow: hidden;
}
.tns-visually-hidden {
position: absolute;
left: -10000em;
}
.tns-transparent {
opacity: 0;
visibility: hidden;
}
.tns-fadeIn {
opacity: 1;
filter: alpha(opacity=100);
z-index: 0;
}
.tns-normal,
.tns-fadeOut {
opacity: 0;
filter: alpha(opacity=0);
z-index: -1;
}
.tns-vpfix {
white-space: nowrap;
}
.tns-vpfix > div,
.tns-vpfix > li {
display: inline-block;
}
.tns-t-subp2 {
margin: 0 auto;
width: 310px;
position: relative;
height: 10px;
overflow: hidden;
}
.tns-t-ct {
width: 2333.3333333%;
width: -webkit-calc(100% * 70 / 3);
width: -moz-calc(100% * 70 / 3);
width: calc(100% * 70 / 3);
position: absolute;
right: 0;
}
.tns-t-ct:after {
content: "";
display: table;
clear: both;
}
.tns-t-ct > div {
width: 1.4285714%;
width: -webkit-calc(100% / 70);
width: -moz-calc(100% / 70);
width: calc(100% / 70);
height: 10px;
float: left;
}
/*# sourceMappingURL=sourcemaps/tiny-slider.css.map */

View File

@ -26,10 +26,19 @@ input[type="text"] {
outline: 0;
}
select {
width: 100%;
}
video {
background: primary;
}
.flex {
width: 100%;
display: flex;
align-items: center;
}
.container {
position: relative;
width: 100%;
@ -80,6 +89,11 @@ form.sign-up-form {
z-index: 1;
}
.form_3 {
flex-direction: column;
align-items: center;
}
form.sign-in-form {
display: flex;
align-items: start;
@ -120,6 +134,10 @@ form p {
position: relative;
}
.left {
margin-left: 15px;
}
.input {
width: 100%;
height: 55px;
@ -152,7 +170,7 @@ form p {
}
.up {
margin-top: 3%;
margin-top: 17px;
}
.input-field-signin-flex input,
@ -180,6 +198,7 @@ form p {
.input-field {
width: 100%;
height: 55px;
padding: 0rem 1.5rem;
background-color: #f0f0f0;
border-radius: 1rem;
display: grid;
@ -242,7 +261,7 @@ form p {
color: #fff;
text-transform: uppercase;
font-weight: 600;
margin: 10px 0;
margin: 20px 0;
cursor: pointer;
transition: 0.25s;
}
@ -256,9 +275,9 @@ form p {
.btn-foto {
width: fit-content;
height: fit-content;
margin-left: 2%;
margin-left: 12px;
font-size: 0.7rem;
padding: 0.85rem 0.9rem;
padding: 0.7rem 0.9rem;
border: 1px solid #900c3e;
color: #900c3e;
background: none;
@ -409,15 +428,15 @@ form p {
pointer-events: all;
}
@media (max-width: 1100px) {
@media (max-width: 1150px) {
.container {
min-height: 1000px;
height: 100vh;
min-height: 1100px;
/* height: 100vh; */
}
form.sign-in-form {
/* form.sign-in-form {
justify-content: start;
}
} */
.header {
padding: 0;
@ -427,6 +446,10 @@ form p {
padding: 0 1.2rem;
}
.header ul li {
width: 120px;
}
.signin-signup {
width: 100%;
top: 95%;
@ -532,6 +555,10 @@ form p {
width: 90%;
}
.header ul li {
width: 90px;
}
.image {
display: none;
}
@ -565,10 +592,13 @@ form p {
.header {
display: flex;
justify-content: center;
width: 100%;
margin-right: 10%;
}
.header ul {
display: flex;
justify-content: center;
}
.header ul li {
@ -619,6 +649,10 @@ form p {
background: var(--primary);
}
.form_wrap {
width: 90%;
}
.form_wrap h2 {
color: var(--header-clr);
text-align: start;
@ -657,7 +691,7 @@ form p {
.btns_wrap {
width: 100%;
margin: 4% auto;
margin: 24px auto;
}
.btns_wrap .common_btns {
@ -669,13 +703,8 @@ form p {
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%;
width: 100%;
margin-top: 2%;
}
@ -840,12 +869,13 @@ form p {
color: #fff !important;
}
.gender-select-menu,
/* .gender-select-menu,
.select-menu {
height: 100%;
font-size: 0.9rem;
}
.gender-select-menu .gender-select-input,
} */
/* .gender-select-menu .gender-select-input,
.select-menu .select-btn {
width: 100%;
height: 55px;
@ -858,14 +888,17 @@ form p {
justify-content: space-between;
position: relative;
cursor: pointer;
}
.select-btn i {
} */
/* .select-btn i {
font-size: 25px;
transition: 0.3s;
}
} */
.gender-select,
.sBtn-text {
width: 100%;
height: 55px;
font-size: 0.8rem;
color: #aaa;
font-weight: 500;
@ -946,8 +979,10 @@ form p {
}
.slide img {
width: 100%;
height: auto;
height: 30vh;
border-radius: 1rem;
/* width: 100%;
height: auto; */
}
.dots {

View File

@ -1,54 +1,53 @@
/*--------------------------------------------------------------
# Profie Page
--------------------------------------------------------------*/
.profile .profile-card img {
max-width: 120px;
max-width: 120px;
}
.profile .profile-card h2 {
font-size: 24px;
font-weight: 700;
color: #2c384e;
margin: 10px 0 0 0;
font-size: 24px;
font-weight: 700;
color: #2c384e;
margin: 10px 0 0 0;
}
.profile .profile-card h3 {
font-size: 18px;
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;
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;
color: #012970;
}
.profile .profile-overview .row {
margin-bottom: 20px;
font-size: 15px;
margin-bottom: 20px;
font-size: 15px;
}
.profile .profile-overview .card-title {
color: #012970;
color: #012970;
}
.profile .profile-overview .label {
font-weight: 600;
color: rgba(1, 41, 112, 0.6);
font-weight: 600;
color: rgba(1, 41, 112, 0.6);
}
.profile .profile-edit label {
font-weight: 600;
color: rgba(1, 41, 112, 0.6);
font-weight: 600;
color: rgba(1, 41, 112, 0.6);
}
.profile .profile-edit img {
max-width: 120px;
max-width: 120px;
}

View File

@ -1271,9 +1271,9 @@ select.form-control:not([size]):not([multiple]) {
margin-bottom: -15px;
}
.card.card-statistic-2 .card-chart canvas {
/* .card.card-statistic-2 .card-chart canvas {
height: 90px !important;
}
} */
.card .card-stats {
width: 100%;
@ -1776,7 +1776,7 @@ h6 .badge {
.btn {
font-weight: 600;
font-size: 12px;
font-size: 18px;
line-height: 24px;
padding: 0.3rem 0.8rem;
letter-spacing: 0.5px;
@ -3090,7 +3090,7 @@ a.dropdown-item.active {
body {
background-color: #fafdfb;
font-size: 14px;
font-size: 18px;
font-weight: 400;
font-family: "Nunito", "Segoe UI", arial;
color: #6c757d;

File diff suppressed because one or more lines are too long

BIN
public/assets/images/bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1,10 @@
<svg width="301" height="137" viewBox="0 0 301 137" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1481_5)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M0.501953 8.96289V136.298H300.362V7.21246C300.362 7.21246 290.451 12.0684 278.186 12.0684C265.92 12.0684 247.033 0.107422 199.812 0.107422C152.592 0.107422 127.672 9.50586 101.432 9.50586C75.1914 9.50586 55.1602 0.955078 41.6309 0.955078C28.1016 0.955078 0.501953 8.96289 0.501953 8.96289Z" fill="#D24556"/>
</g>
<defs>
<clipPath id="clip0_1481_5">
<rect width="301" height="137" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 606 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -0,0 +1,80 @@
<svg width="116" height="37" viewBox="0 0 116 37" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M38.7439 10.0799C39.5969 10.9318 39.5969 12.3123 38.7439 13.1653C37.8909 14.0162 36.5072 14.0162 35.6543 13.1653C34.8013 12.3123 34.8013 10.9318 35.6543 10.0799C36.5072 9.22794 37.8909 9.22794 38.7439 10.0799Z" fill="white"/>
<mask id="mask0_1477_2" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="8" width="55" height="26">
<path d="M0 8.3042H54.388V33.9797H0V8.3042Z" fill="white"/>
</mask>
<g mask="url(#mask0_1477_2)">
<mask id="mask1_1477_2" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="8" width="55" height="26">
<path d="M46.2006 10.2557C50.2496 12.5324 52.7158 15.5494 52.7158 18.8612C52.7158 25.9482 41.4197 31.6926 27.4847 31.6926C13.5497 31.6926 2.25359 25.9482 2.25359 18.8612C2.25359 14.4963 6.53951 10.64 13.0874 8.32227C5.2432 10.7485 0.00427246 15.1366 0.00427246 20.147C0.00427246 27.7848 12.1786 33.9757 27.1962 33.9757C42.2148 33.9757 54.3891 27.7848 54.3891 20.147C54.3891 16.2707 51.2521 12.7661 46.2006 10.2557Z" fill="white"/>
</mask>
<g mask="url(#mask1_1477_2)">
<mask id="mask2_1477_2" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="8" width="55" height="26">
<path d="M46.2006 10.2557C50.2496 12.5313 52.7158 15.5494 52.7158 18.8612C52.7158 25.9482 41.4197 31.6926 27.4847 31.6926C13.5507 31.6926 2.25359 25.9482 2.25359 18.8612C2.25359 14.4963 6.53951 10.64 13.0874 8.32227C5.2432 10.7485 0.00427246 15.1366 0.00427246 20.147C0.00427246 27.7837 12.1786 33.9757 27.1962 33.9757C42.2148 33.9757 54.3891 27.7837 54.3891 20.147C54.3891 16.2707 51.2531 12.7661 46.2006 10.2557Z" fill="white"/>
</mask>
<g mask="url(#mask2_1477_2)">
<mask id="mask3_1477_2" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="-11" y="-15" width="77" height="72">
<path d="M41.9347 56.7964L65.1829 14.1973L12.4587 -14.4973L-10.7906 28.1007L41.9347 56.7964Z" fill="white"/>
</mask>
<g mask="url(#mask3_1477_2)">
<path d="M41.9347 56.7953L65.1829 14.1973L12.4576 -14.4973L-10.7906 28.1018L41.9347 56.7953Z" fill="url(#paint0_linear_1477_2)"/>
</g>
</g>
</g>
</g>
<path d="M5.59489 24.3842L8.5666 27.3507C13.1895 30.0138 19.9511 31.6924 27.4847 31.6924C29.9214 31.6924 32.2771 31.5165 34.5054 31.189L48.7974 16.917C49.6114 16.1051 49.6114 14.7878 48.7974 13.9759C29.7266 31.4365 9.0689 23.705 9.0689 23.705C8.42338 24.3505 7.34927 24.3063 6.76167 23.5744C6.26463 22.9542 6.34571 22.0507 6.90804 21.4894L26.6675 1.7573C26.8549 1.56986 26.8549 1.26553 26.6675 1.07808C26.4801 0.890639 26.1757 0.890639 25.9883 1.07808L5.59489 21.443C4.78193 22.255 4.78193 23.5723 5.59489 24.3842Z" fill="white"/>
<mask id="mask4_1477_2" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="9" y="0" width="31" height="26">
<path d="M9.04358 0H39.283V25.4502H9.04358V0Z" fill="white"/>
</mask>
<g mask="url(#mask4_1477_2)">
<mask id="mask5_1477_2" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="9" y="-1" width="31" height="27">
<path d="M39.2588 4.45031L35.5047 0.701447C34.5654 -0.235769 33.0448 -0.235769 32.1055 0.701447L9.06891 23.7054C9.06891 23.7054 15.8706 26.2506 25.2712 25.1217C24.2318 4.02488 39.2588 4.45031 39.2588 4.45031Z" fill="white"/>
</mask>
<g mask="url(#mask5_1477_2)">
<mask id="mask6_1477_2" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="9" y="-1" width="31" height="27">
<path d="M39.2588 4.45031L35.5047 0.701447C34.5654 -0.235769 33.0448 -0.235769 32.1055 0.701447L9.06891 23.7054C9.06891 23.7054 15.8706 26.2506 25.2712 25.1217C24.2318 4.02488 39.2588 4.45031 39.2588 4.45031Z" fill="white"/>
</mask>
<g mask="url(#mask6_1477_2)">
<mask id="mask7_1477_2" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="-2" y="-13" width="53" height="52">
<path d="M-1.86176 20.505L32.7099 38.6754L50.1906 5.50952L15.6179 -12.6609L-1.86176 20.505Z" fill="white"/>
</mask>
<g mask="url(#mask7_1477_2)">
<path d="M-1.4342 19.9292L32.7099 37.8753L49.7631 5.5213L15.6179 -12.4248L-1.4342 19.9292Z" fill="url(#paint1_linear_1477_2)"/>
</g>
</g>
</g>
</g>
<path d="M44.2893 9.47316L39.5768 14.1782C38.1879 15.5651 35.9364 15.5651 34.5475 14.1782C33.1585 12.7913 33.1585 10.542 34.5475 9.15514L34.9034 8.79921C34.9529 8.7297 35.0077 8.66336 35.0698 8.60229L38.9598 4.71758C39.0208 4.6565 39.0861 4.60279 39.1535 4.55541L39.2588 4.4501C39.2588 4.4501 24.2318 4.02467 25.2711 25.1215C32.2529 24.2833 40.6689 21.4179 48.7974 13.976L44.2893 9.47316Z" fill="white"/>
<mask id="mask8_1477_2" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="2" y="29" width="51" height="8">
<path d="M2.42413 29.2463H52.7379V37H2.42413V29.2463Z" fill="white"/>
</mask>
<g mask="url(#mask8_1477_2)">
<mask id="mask9_1477_2" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="2" y="29" width="51" height="8">
<path d="M2.4588 29.2537C2.4588 29.2537 2.50408 29.2789 2.59149 29.3284C2.67889 29.3769 2.80947 29.4464 2.98111 29.5359C3.32336 29.716 3.82882 29.9697 4.47961 30.2741C4.80605 30.4257 5.1683 30.59 5.56425 30.7627C5.96125 30.9333 6.3909 31.1176 6.85424 31.3029C7.31758 31.4861 7.80936 31.6831 8.33483 31.8715C8.40117 31.8968 8.46646 31.92 8.5328 31.9453C8.59915 31.9684 8.66654 31.9926 8.73394 32.0169C8.86873 32.0643 9.00457 32.1138 9.14252 32.1632C9.42053 32.257 9.70169 32.357 9.99339 32.4507C11.1539 32.8372 12.4238 33.21 13.777 33.5543C14.4552 33.7197 15.1512 33.8924 15.8684 34.0387C16.2264 34.1167 16.5908 34.183 16.9562 34.2578C17.1394 34.2946 17.3247 34.3252 17.5101 34.3599C17.6954 34.3926 17.8807 34.4284 18.0682 34.4578C19.5677 34.7043 21.1241 34.9085 22.7121 35.0307C22.9101 35.0465 23.1091 35.0612 23.3082 35.077C23.5083 35.0886 23.7073 35.1002 23.9074 35.1118C24.3075 35.1392 24.7098 35.1508 25.1121 35.1687C25.3132 35.1781 25.5143 35.1802 25.7165 35.1844C25.9176 35.1887 26.1198 35.1929 26.321 35.1971C26.5231 35.1981 26.7253 35.1981 26.9275 35.1981C27.1297 35.1981 27.3319 35.2013 27.533 35.195C29.1505 35.176 30.7669 35.0834 32.3518 34.9233C33.9377 34.7632 35.4909 34.5358 36.9873 34.2599C38.4826 33.9819 39.919 33.6544 41.2722 33.3016C41.6102 33.21 41.9451 33.1257 42.2726 33.0341C42.599 32.9393 42.9202 32.8435 43.2372 32.7551C43.3972 32.7108 43.5531 32.6624 43.7068 32.615C43.8627 32.5666 44.0154 32.5192 44.1681 32.4718C44.3197 32.4244 44.4703 32.3781 44.6198 32.3317C44.6946 32.3096 44.7683 32.2843 44.842 32.2601C44.9157 32.2349 44.9884 32.2117 45.0611 32.1875C45.3517 32.0916 45.6371 31.9979 45.9161 31.9063C46.1941 31.8115 46.4627 31.7125 46.728 31.622C46.8597 31.5756 46.9903 31.5304 47.1187 31.4851C47.184 31.463 47.2472 31.4398 47.3104 31.4177C47.3746 31.3945 47.4367 31.3713 47.4989 31.3471C47.7463 31.2534 47.9875 31.1639 48.2223 31.0775C48.3403 31.0344 48.4551 30.9912 48.5688 30.9501C48.6825 30.908 48.7931 30.8627 48.9015 30.8206C49.1185 30.7332 49.3291 30.6521 49.5302 30.5731C49.6313 30.5342 49.7303 30.4952 49.8272 30.4584C49.8767 30.4394 49.9241 30.4204 49.9714 30.4025C50.0188 30.3825 50.0652 30.3636 50.1104 30.3446C50.2947 30.2688 50.4695 30.1961 50.6359 30.1287C50.8034 30.0603 50.9613 29.9961 51.1098 29.935C51.1835 29.9044 51.2562 29.876 51.3267 29.8476C51.3952 29.8181 51.4615 29.7897 51.5268 29.7612C51.7837 29.6507 52.0028 29.558 52.1818 29.4822C52.5398 29.3337 52.7304 29.2537 52.7304 29.2537C52.7304 29.2537 52.5567 29.3653 52.2313 29.5748C51.9038 29.7833 51.4247 30.0908 50.797 30.452C50.6412 30.5437 50.4759 30.6405 50.3032 30.7416C50.26 30.7669 50.2158 30.7911 50.1715 30.8174C50.1273 30.8417 50.082 30.8669 50.0357 30.8922C49.9441 30.9428 49.8503 30.9933 49.7545 31.047C49.5629 31.1523 49.3628 31.2608 49.1553 31.3735C49.0511 31.4282 48.9458 31.4872 48.8373 31.543C48.7288 31.5988 48.6183 31.6557 48.5056 31.7125C48.0559 31.9432 47.5758 32.1875 47.0608 32.4265C46.8039 32.5476 46.5406 32.6729 46.2689 32.7961C45.9951 32.9151 45.7161 33.0383 45.4296 33.1626C45.2864 33.2247 45.1432 33.2911 44.9958 33.35C44.8473 33.4101 44.6988 33.4701 44.5482 33.5301C44.3976 33.5912 44.246 33.6523 44.0912 33.7144C43.9385 33.7765 43.7837 33.8386 43.6258 33.8966C43.3109 34.0156 42.9887 34.1335 42.6622 34.2546C42.3347 34.3715 41.9988 34.4821 41.6597 34.599C40.2981 35.0507 38.8417 35.4709 37.3127 35.8226C35.7847 36.1775 34.1851 36.4629 32.5466 36.6619C30.908 36.8609 29.2316 36.9736 27.5541 36.9946C27.3445 36.9999 27.1339 36.9957 26.9244 36.9957C26.7148 36.9946 26.5052 36.9936 26.2957 36.9925C26.0861 36.9862 25.8766 36.9799 25.6681 36.9746C25.4585 36.9673 25.2489 36.9641 25.0404 36.9515C24.6234 36.9304 24.2064 36.9125 23.7926 36.8767C23.5851 36.8609 23.3777 36.8451 23.1713 36.8293C22.9649 36.8093 22.7595 36.7893 22.5542 36.7693C20.9104 36.6082 19.3045 36.3481 17.7691 36.0195C17.5764 35.9816 17.3858 35.9363 17.1963 35.8932C17.0067 35.8489 16.8182 35.8079 16.6308 35.7626C16.2559 35.6699 15.8852 35.5804 15.5219 35.4783C15.3397 35.4277 15.1586 35.3814 14.9785 35.3287C14.7995 35.2771 14.6215 35.2255 14.4446 35.1739C14.0908 35.0707 13.7433 34.9612 13.4011 34.8506C13.0609 34.7369 12.7239 34.6263 12.3965 34.5084C12.2322 34.4505 12.0679 34.3957 11.9068 34.3346C11.7467 34.2746 11.5877 34.2156 11.4287 34.1556C10.8 33.9124 10.1935 33.6723 9.62166 33.4195C8.47383 32.9225 7.44921 32.4107 6.55833 31.9274C5.66745 31.443 4.91241 30.9859 4.3048 30.5889C4.15211 30.4899 4.00995 30.3941 3.87621 30.3036C3.74247 30.213 3.61716 30.1266 3.50238 30.0456C3.27176 29.8844 3.0801 29.7412 2.9253 29.6233C2.76945 29.5074 2.65467 29.4137 2.57569 29.3505C2.49882 29.2874 2.4588 29.2537 2.4588 29.2537Z" fill="white"/>
</mask>
<g mask="url(#mask9_1477_2)">
<mask id="mask10_1477_2" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="2" y="29" width="51" height="8">
<path d="M2.4588 29.2537C2.4588 29.2537 2.50408 29.2789 2.59149 29.3284C2.67889 29.3769 2.80947 29.4464 2.98111 29.5359C3.32336 29.716 3.82882 29.9697 4.47961 30.2741C4.80605 30.4257 5.1683 30.59 5.56425 30.7627C5.96125 30.9333 6.3909 31.1176 6.85424 31.3029C7.31758 31.4861 7.80936 31.6831 8.33483 31.8715C8.40117 31.8968 8.46646 31.92 8.5328 31.9453C8.59915 31.9684 8.66654 31.9926 8.73394 32.0169C8.86873 32.0643 9.00457 32.1138 9.14252 32.1632C9.42053 32.257 9.70169 32.357 9.99339 32.4507C11.1539 32.8372 12.4238 33.21 13.777 33.5543C14.4552 33.7197 15.1512 33.8924 15.8684 34.0387C16.2264 34.1167 16.5908 34.183 16.9562 34.2578C17.1394 34.2946 17.3247 34.3252 17.5101 34.3599C17.6954 34.3926 17.8807 34.4284 18.0682 34.4578C19.5677 34.7043 21.1241 34.9085 22.7121 35.0307C22.9101 35.0465 23.1091 35.0612 23.3082 35.077C23.5083 35.0886 23.7073 35.1002 23.9074 35.1118C24.3075 35.1392 24.7098 35.1508 25.1121 35.1687C25.3132 35.1781 25.5143 35.1802 25.7165 35.1844C25.9176 35.1887 26.1198 35.1929 26.321 35.1971C26.5231 35.1981 26.7253 35.1981 26.9275 35.1981C27.1297 35.1981 27.3319 35.2013 27.533 35.195C29.1505 35.176 30.7669 35.0834 32.3518 34.9233C33.9377 34.7632 35.4909 34.5358 36.9873 34.2599C38.4826 33.9819 39.919 33.6544 41.2722 33.3016C41.6102 33.21 41.9451 33.1257 42.2726 33.0341C42.599 32.9393 42.9202 32.8435 43.2372 32.7551C43.3972 32.7108 43.5531 32.6624 43.7068 32.615C43.8627 32.5666 44.0154 32.5192 44.1681 32.4718C44.3197 32.4244 44.4703 32.3781 44.6198 32.3317C44.6946 32.3096 44.7683 32.2843 44.842 32.2601C44.9157 32.2349 44.9884 32.2117 45.0611 32.1875C45.3517 32.0916 45.6371 31.9979 45.9161 31.9063C46.1941 31.8115 46.4627 31.7125 46.728 31.622C46.8597 31.5756 46.9903 31.5304 47.1187 31.4851C47.184 31.463 47.2472 31.4398 47.3104 31.4177C47.3746 31.3945 47.4367 31.3713 47.4989 31.3471C47.7463 31.2534 47.9875 31.1639 48.2223 31.0775C48.3403 31.0344 48.4551 30.9912 48.5688 30.9501C48.6825 30.908 48.7931 30.8627 48.9015 30.8206C49.1185 30.7332 49.3291 30.6521 49.5302 30.5731C49.6313 30.5342 49.7303 30.4952 49.8272 30.4584C49.8767 30.4394 49.9241 30.4204 49.9714 30.4025C50.0188 30.3825 50.0652 30.3636 50.1104 30.3446C50.2947 30.2688 50.4695 30.1961 50.6359 30.1287C50.8034 30.0603 50.9613 29.9961 51.1098 29.935C51.1835 29.9044 51.2562 29.876 51.3267 29.8476C51.3952 29.8181 51.4615 29.7897 51.5268 29.7612C51.7837 29.6507 52.0028 29.558 52.1818 29.4822C52.5398 29.3337 52.7304 29.2537 52.7304 29.2537C52.7304 29.2537 52.5567 29.3653 52.2313 29.5748C51.9038 29.7833 51.4247 30.0908 50.797 30.452C50.6412 30.5437 50.4759 30.6405 50.3032 30.7416C50.26 30.7669 50.2158 30.7911 50.1715 30.8174C50.1273 30.8417 50.082 30.8669 50.0357 30.8922C49.9441 30.9428 49.8503 30.9933 49.7545 31.047C49.5629 31.1523 49.3628 31.2608 49.1553 31.3735C49.0511 31.4282 48.9458 31.4872 48.8373 31.543C48.7288 31.5988 48.6183 31.6557 48.5056 31.7125C48.0559 31.9432 47.5758 32.1875 47.0608 32.4265C46.8039 32.5476 46.5406 32.6729 46.2689 32.7961C45.9951 32.9151 45.7161 33.0383 45.4296 33.1626C45.2864 33.2247 45.1432 33.2911 44.9958 33.35C44.8473 33.4101 44.6988 33.4701 44.5482 33.5301C44.3976 33.5912 44.246 33.6523 44.0912 33.7144C43.9385 33.7765 43.7837 33.8386 43.6258 33.8966C43.3109 34.0156 42.9887 34.1335 42.6622 34.2546C42.3347 34.3715 41.9988 34.4821 41.6597 34.599C40.2981 35.0507 38.8417 35.4709 37.3127 35.8226C35.7847 36.1775 34.1851 36.4629 32.5466 36.6619C30.908 36.8609 29.2316 36.9736 27.5541 36.9946C27.3445 36.9999 27.1339 36.9957 26.9244 36.9957C26.7148 36.9946 26.5052 36.9936 26.2957 36.9925C26.0861 36.9862 25.8766 36.9799 25.6681 36.9746C25.4585 36.9673 25.2489 36.9641 25.0404 36.9515C24.6234 36.9304 24.2064 36.9125 23.7926 36.8767C23.5851 36.8609 23.3777 36.8451 23.1713 36.8293C22.9649 36.8093 22.7595 36.7893 22.5542 36.7693C20.9104 36.6082 19.3045 36.3481 17.7691 36.0195C17.5764 35.9816 17.3858 35.9363 17.1963 35.8932C17.0067 35.8489 16.8182 35.8079 16.6308 35.7626C16.2559 35.6699 15.8852 35.5804 15.5219 35.4783C15.3397 35.4277 15.1586 35.3814 14.9785 35.3287C14.7995 35.2771 14.6215 35.2255 14.4446 35.1739C14.0908 35.0707 13.7433 34.9612 13.4011 34.8506C13.0609 34.7369 12.7239 34.6263 12.3965 34.5084C12.2322 34.4505 12.0679 34.3957 11.9068 34.3346C11.7467 34.2746 11.5877 34.2156 11.4287 34.1556C10.8 33.9124 10.1935 33.6723 9.62166 33.4195C8.47383 32.9225 7.44921 32.4107 6.55833 31.9274C5.66745 31.443 4.91241 30.9859 4.3048 30.5889C4.15211 30.4899 4.00995 30.3941 3.87621 30.3036C3.74247 30.213 3.61716 30.1266 3.50238 30.0456C3.27176 29.8844 3.0801 29.7412 2.9253 29.6233C2.76945 29.5074 2.65467 29.4137 2.57569 29.3505C2.49882 29.2874 2.4588 29.2537 2.4588 29.2537Z" fill="white"/>
</mask>
<g mask="url(#mask10_1477_2)">
<mask id="mask11_1477_2" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="-1" y="8" width="57" height="51">
<path d="M41.2185 58.0946L55.9896 31.028L13.9718 8.15991L-0.800415 35.2265L41.2185 58.0946Z" fill="white"/>
</mask>
<g mask="url(#mask11_1477_2)">
<path d="M41.2185 58.0935L55.9896 31.028L13.9707 8.15991L-0.800415 35.2265L41.2185 58.0935Z" fill="white"/>
</g>
</g>
</g>
</g>
<path d="M67.7297 24L65.5397 20.025H64.9247V24H62.3597V13.47H66.6647C67.4947 13.47 68.1997 13.615 68.7797 13.905C69.3697 14.195 69.8097 14.595 70.0997 15.105C70.3897 15.605 70.5347 16.165 70.5347 16.785C70.5347 17.485 70.3347 18.11 69.9347 18.66C69.5447 19.21 68.9647 19.6 68.1947 19.83L70.6247 24H67.7297ZM64.9247 18.21H66.5147C66.9847 18.21 67.3347 18.095 67.5647 17.865C67.8047 17.635 67.9247 17.31 67.9247 16.89C67.9247 16.49 67.8047 16.175 67.5647 15.945C67.3347 15.715 66.9847 15.6 66.5147 15.6H64.9247V18.21ZM80.0348 19.68C80.0348 19.92 80.0198 20.17 79.9898 20.43H74.1848C74.2248 20.95 74.3898 21.35 74.6798 21.63C74.9798 21.9 75.3448 22.035 75.7748 22.035C76.4148 22.035 76.8598 21.765 77.1098 21.225H79.8398C79.6998 21.775 79.4448 22.27 79.0748 22.71C78.7148 23.15 78.2598 23.495 77.7098 23.745C77.1598 23.995 76.5448 24.12 75.8648 24.12C75.0448 24.12 74.3148 23.945 73.6748 23.595C73.0348 23.245 72.5348 22.745 72.1748 22.095C71.8148 21.445 71.6348 20.685 71.6348 19.815C71.6348 18.945 71.8098 18.185 72.1598 17.535C72.5198 16.885 73.0198 16.385 73.6598 16.035C74.2998 15.685 75.0348 15.51 75.8648 15.51C76.6748 15.51 77.3948 15.68 78.0248 16.02C78.6548 16.36 79.1448 16.845 79.4948 17.475C79.8548 18.105 80.0348 18.84 80.0348 19.68ZM77.4098 19.005C77.4098 18.565 77.2598 18.215 76.9598 17.955C76.6598 17.695 76.2848 17.565 75.8348 17.565C75.4048 17.565 75.0398 17.69 74.7398 17.94C74.4498 18.19 74.2698 18.545 74.1998 19.005H77.4098ZM86.503 24L83.953 20.49V24H81.388V12.9H83.953V19.035L86.488 15.63H89.653L86.173 19.83L89.683 24H86.503ZM93.2255 16.815C93.4655 16.425 93.8105 16.11 94.2605 15.87C94.7105 15.63 95.2255 15.51 95.8055 15.51C96.4955 15.51 97.1205 15.685 97.6805 16.035C98.2405 16.385 98.6805 16.885 99.0005 17.535C99.3305 18.185 99.4955 18.94 99.4955 19.8C99.4955 20.66 99.3305 21.42 99.0005 22.08C98.6805 22.73 98.2405 23.235 97.6805 23.595C97.1205 23.945 96.4955 24.12 95.8055 24.12C95.2155 24.12 94.7005 24.005 94.2605 23.775C93.8205 23.535 93.4755 23.22 93.2255 22.83V24H90.6605V12.9H93.2255V16.815ZM96.8855 19.8C96.8855 19.16 96.7055 18.66 96.3455 18.3C95.9955 17.93 95.5605 17.745 95.0405 17.745C94.5305 17.745 94.0955 17.93 93.7355 18.3C93.3855 18.67 93.2105 19.175 93.2105 19.815C93.2105 20.455 93.3855 20.96 93.7355 21.33C94.0955 21.7 94.5305 21.885 95.0405 21.885C95.5505 21.885 95.9855 21.7 96.3455 21.33C96.7055 20.95 96.8855 20.44 96.8855 19.8ZM108.731 19.68C108.731 19.92 108.716 20.17 108.686 20.43H102.881C102.921 20.95 103.086 21.35 103.376 21.63C103.676 21.9 104.041 22.035 104.471 22.035C105.111 22.035 105.556 21.765 105.806 21.225H108.536C108.396 21.775 108.141 22.27 107.771 22.71C107.411 23.15 106.956 23.495 106.406 23.745C105.856 23.995 105.241 24.12 104.561 24.12C103.741 24.12 103.011 23.945 102.371 23.595C101.731 23.245 101.231 22.745 100.871 22.095C100.511 21.445 100.331 20.685 100.331 19.815C100.331 18.945 100.506 18.185 100.856 17.535C101.216 16.885 101.716 16.385 102.356 16.035C102.996 15.685 103.731 15.51 104.561 15.51C105.371 15.51 106.091 15.68 106.721 16.02C107.351 16.36 107.841 16.845 108.191 17.475C108.551 18.105 108.731 18.84 108.731 19.68ZM106.106 19.005C106.106 18.565 105.956 18.215 105.656 17.955C105.356 17.695 104.981 17.565 104.531 17.565C104.101 17.565 103.736 17.69 103.436 17.94C103.146 18.19 102.966 18.545 102.896 19.005H106.106ZM112.649 17.025C112.949 16.565 113.324 16.205 113.774 15.945C114.224 15.675 114.724 15.54 115.274 15.54V18.255H114.569C113.929 18.255 113.449 18.395 113.129 18.675C112.809 18.945 112.649 19.425 112.649 20.115V24H110.084V15.63H112.649V17.025Z" fill="white"/>
<defs>
<linearGradient id="paint0_linear_1477_2" x1="53.5382" y1="14.0498" x2="1.17207" y2="15.5662" gradientUnits="userSpaceOnUse">
<stop stop-color="white"/>
<stop offset="0.479167" stop-color="white"/>
<stop offset="1" stop-color="white"/>
</linearGradient>
<linearGradient id="paint1_linear_1477_2" x1="35.0382" y1="1.21114" x2="14.4153" y2="24.1592" gradientUnits="userSpaceOnUse">
<stop offset="0.251902" stop-color="white"/>
<stop offset="1" stop-color="white"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -0,0 +1,83 @@
<svg width="270" height="184" viewBox="0 0 270 184" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M192.328 50.3645C196.547 54.578 196.547 61.4062 192.328 65.6249C188.109 69.8333 181.266 69.8333 177.047 65.6249C172.828 61.4062 172.828 54.578 177.047 50.3645C181.266 46.151 188.109 46.151 192.328 50.3645Z" fill="#AC1A53"/>
<mask id="mask0_1476_112" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="41" width="270" height="128">
<path d="M0.703125 41.5833H269.703V168.573H0.703125V41.5833Z" fill="white"/>
</mask>
<g mask="url(#mask0_1476_112)">
<mask id="mask1_1476_112" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="41" width="270" height="128">
<path d="M229.208 51.2344C249.234 62.4948 261.432 77.4167 261.432 93.7969C261.432 128.849 205.563 157.26 136.641 157.26C67.7188 157.26 11.849 128.849 11.849 93.7969C11.849 72.2083 33.0469 53.1354 65.4323 41.6719C26.6354 53.6719 0.723969 75.375 0.723969 100.156C0.723969 137.932 60.9375 168.552 135.214 168.552C209.495 168.552 269.708 137.932 269.708 100.156C269.708 80.9844 254.193 63.651 229.208 51.2344Z" fill="white"/>
</mask>
<g mask="url(#mask1_1476_112)">
<mask id="mask2_1476_112" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="41" width="270" height="128">
<path d="M229.208 51.2344C249.234 62.4896 261.432 77.4167 261.432 93.7969C261.432 128.849 205.563 157.26 136.641 157.26C67.724 157.26 11.849 128.849 11.849 93.7969C11.849 72.2083 33.0469 53.1354 65.4323 41.6719C26.6354 53.6719 0.723969 75.375 0.723969 100.156C0.723969 137.927 60.9375 168.552 135.214 168.552C209.495 168.552 269.708 137.927 269.708 100.156C269.708 80.9844 254.198 63.651 229.208 51.2344Z" fill="white"/>
</mask>
<g mask="url(#mask2_1476_112)">
<mask id="mask3_1476_112" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="-53" y="-72" width="377" height="354">
<path d="M208.109 281.422L323.094 70.7292L62.3229 -71.1926L-52.6667 139.495L208.109 281.422Z" fill="white"/>
</mask>
<g mask="url(#mask3_1476_112)">
<path d="M208.109 281.417L323.094 70.7292L62.3177 -71.1926L-52.6667 139.5L208.109 281.417Z" fill="url(#paint0_linear_1476_112)"/>
</g>
</g>
</g>
</g>
<path d="M28.375 121.115L43.0729 135.786C65.9375 148.958 99.3802 157.26 136.641 157.26C148.693 157.26 160.344 156.391 171.365 154.771L242.052 84.1823C246.078 80.1667 246.078 73.651 242.052 69.6354C147.729 155.995 45.5573 117.755 45.5573 117.755C42.3646 120.948 37.0521 120.729 34.1458 117.109C31.6875 114.042 32.0885 109.573 34.8698 106.797L132.599 9.20312C133.526 8.27604 133.526 6.77083 132.599 5.84375C131.672 4.91667 130.167 4.91667 129.24 5.84375L28.375 106.568C24.3542 110.583 24.3542 117.099 28.375 121.115Z" fill="#900C3F"/>
<mask id="mask4_1476_112" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="45" y="0" width="150" height="127">
<path d="M45.4323 0.510498H194.995V126.385H45.4323V0.510498Z" fill="white"/>
</mask>
<g mask="url(#mask4_1476_112)">
<mask id="mask5_1476_112" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="45" y="0" width="150" height="127">
<path d="M194.875 22.5209L176.307 3.97925C171.661 -0.656169 164.141 -0.656169 159.495 3.97925L45.5573 117.755C45.5573 117.755 79.1979 130.344 125.693 124.76C120.552 20.4167 194.875 22.5209 194.875 22.5209Z" fill="white"/>
</mask>
<g mask="url(#mask5_1476_112)">
<mask id="mask6_1476_112" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="45" y="0" width="150" height="127">
<path d="M194.875 22.5209L176.307 3.97925C171.661 -0.656169 164.141 -0.656169 159.495 3.97925L45.5573 117.755C45.5573 117.755 79.1979 130.344 125.693 124.76C120.552 20.4167 194.875 22.5209 194.875 22.5209Z" fill="white"/>
</mask>
<g mask="url(#mask6_1476_112)">
<mask id="mask7_1476_112" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="-9" y="-63" width="258" height="255">
<path d="M-8.50522 101.927L162.484 191.797L248.943 27.7604L77.9479 -62.1094L-8.50522 101.927Z" fill="white"/>
</mask>
<g mask="url(#mask7_1476_112)">
<path d="M-6.39062 99.0782L162.484 187.839L246.828 27.8178L77.9479 -60.9426L-6.39062 99.0782Z" fill="url(#paint1_linear_1476_112)"/>
</g>
</g>
</g>
</g>
<path d="M219.755 47.3645L196.448 70.6353C189.578 77.4947 178.443 77.4947 171.573 70.6353C164.703 63.776 164.703 52.6509 171.573 45.7916L173.333 44.0312C173.578 43.6874 173.849 43.3593 174.156 43.0572L193.396 23.8437C193.698 23.5416 194.021 23.2759 194.354 23.0416L194.875 22.5207C194.875 22.5207 120.552 20.4166 125.693 124.76C160.224 120.614 201.849 106.443 242.052 69.6353L219.755 47.3645Z" fill="#AC1A53"/>
<mask id="mask8_1476_112" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="12" y="145" width="250" height="39">
<path d="M12.6927 145.161H261.542V183.51H12.6927V145.161Z" fill="white"/>
</mask>
<g mask="url(#mask8_1476_112)">
<mask id="mask9_1476_112" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="12" y="145" width="250" height="39">
<path d="M12.8646 145.198C12.8646 145.198 13.0885 145.323 13.5208 145.568C13.9531 145.807 14.5989 146.151 15.4479 146.594C17.1406 147.484 19.6406 148.739 22.8594 150.245C24.4739 150.995 26.2656 151.807 28.2239 152.661C30.1875 153.505 32.3125 154.417 34.6041 155.333C36.8958 156.239 39.3281 157.213 41.9271 158.146C42.2552 158.271 42.5781 158.385 42.9062 158.51C43.2344 158.625 43.5677 158.745 43.901 158.864C44.5677 159.099 45.2396 159.344 45.9219 159.588C47.2969 160.052 48.6875 160.547 50.1302 161.01C55.8698 162.922 62.151 164.765 68.8437 166.469C72.1979 167.286 75.6406 168.14 79.1875 168.864C80.9583 169.25 82.7604 169.578 84.5677 169.948C85.4739 170.13 86.3906 170.281 87.3073 170.453C88.2239 170.614 89.1406 170.792 90.0677 170.937C97.4844 172.156 105.182 173.167 113.036 173.771C114.016 173.849 115 173.922 115.984 174C116.974 174.057 117.958 174.114 118.948 174.172C120.927 174.307 122.917 174.364 124.906 174.453C125.901 174.5 126.896 174.51 127.896 174.531C128.891 174.552 129.891 174.573 130.885 174.594C131.885 174.599 132.885 174.599 133.885 174.599C134.885 174.599 135.885 174.614 136.88 174.583C144.88 174.489 152.875 174.031 160.714 173.239C168.557 172.448 176.24 171.323 183.641 169.958C191.036 168.583 198.141 166.963 204.833 165.219C206.505 164.765 208.161 164.349 209.781 163.896C211.396 163.427 212.984 162.953 214.552 162.515C215.344 162.297 216.115 162.057 216.875 161.823C217.646 161.583 218.401 161.349 219.156 161.114C219.906 160.88 220.651 160.651 221.391 160.422C221.76 160.312 222.125 160.187 222.49 160.068C222.854 159.943 223.214 159.828 223.573 159.708C225.01 159.234 226.422 158.771 227.802 158.318C229.177 157.849 230.505 157.359 231.818 156.911C232.469 156.682 233.115 156.458 233.75 156.234C234.073 156.125 234.385 156.01 234.698 155.901C235.016 155.786 235.323 155.672 235.63 155.552C236.854 155.088 238.047 154.646 239.208 154.219C239.792 154.005 240.359 153.792 240.922 153.588C241.484 153.38 242.031 153.156 242.568 152.948C243.641 152.515 244.682 152.114 245.677 151.724C246.177 151.531 246.667 151.338 247.146 151.156C247.391 151.062 247.625 150.969 247.859 150.88C248.094 150.781 248.323 150.687 248.547 150.594C249.458 150.219 250.323 149.859 251.146 149.526C251.974 149.187 252.755 148.87 253.49 148.568C253.854 148.417 254.214 148.276 254.562 148.135C254.901 147.989 255.229 147.849 255.552 147.708C256.823 147.161 257.906 146.703 258.792 146.328C260.562 145.594 261.505 145.198 261.505 145.198C261.505 145.198 260.646 145.75 259.036 146.786C257.417 147.818 255.047 149.338 251.943 151.125C251.172 151.578 250.354 152.057 249.5 152.557C249.286 152.682 249.068 152.802 248.849 152.932C248.63 153.052 248.406 153.177 248.177 153.302C247.724 153.552 247.26 153.802 246.786 154.068C245.839 154.588 244.849 155.125 243.823 155.682C243.307 155.953 242.786 156.245 242.25 156.521C241.714 156.797 241.167 157.078 240.609 157.359C238.385 158.5 236.01 159.708 233.464 160.89C232.193 161.489 230.891 162.109 229.547 162.719C228.193 163.307 226.812 163.917 225.396 164.531C224.687 164.838 223.979 165.167 223.25 165.458C222.516 165.755 221.781 166.052 221.036 166.349C220.292 166.651 219.542 166.953 218.776 167.26C218.021 167.568 217.255 167.875 216.474 168.161C214.917 168.75 213.323 169.333 211.708 169.932C210.089 170.51 208.427 171.057 206.75 171.635C200.016 173.87 192.812 175.948 185.25 177.687C177.693 179.443 169.781 180.854 161.677 181.838C153.573 182.823 145.281 183.38 136.984 183.484C135.948 183.51 134.906 183.489 133.87 183.489C132.833 183.484 131.797 183.479 130.76 183.474C129.724 183.443 128.687 183.411 127.656 183.385C126.62 183.349 125.583 183.333 124.552 183.271C122.49 183.167 120.427 183.078 118.38 182.901C117.354 182.823 116.328 182.745 115.307 182.667C114.286 182.568 113.271 182.469 112.255 182.37C104.125 181.573 96.1823 180.286 88.5885 178.661C87.6354 178.474 86.6927 178.25 85.7552 178.036C84.8177 177.818 83.8854 177.614 82.9583 177.39C81.1041 176.932 79.2708 176.489 77.4739 175.984C76.5729 175.734 75.6771 175.505 74.7864 175.245C73.901 174.989 73.0208 174.734 72.1458 174.479C70.3958 173.969 68.6771 173.427 66.9844 172.88C65.3021 172.318 63.6354 171.771 62.0156 171.187C61.2031 170.901 60.3906 170.63 59.5937 170.328C58.8021 170.031 58.0156 169.739 57.2291 169.443C54.1198 168.239 51.1198 167.052 48.2916 165.802C42.6146 163.344 37.5469 160.812 33.1406 158.422C28.7344 156.026 25 153.765 21.9948 151.802C21.2396 151.312 20.5364 150.838 19.875 150.39C19.2135 149.943 18.5937 149.515 18.026 149.114C16.8854 148.318 15.9375 147.609 15.1719 147.026C14.401 146.453 13.8333 145.989 13.4427 145.677C13.0625 145.364 12.8646 145.198 12.8646 145.198Z" fill="white"/>
</mask>
<g mask="url(#mask9_1476_112)">
<mask id="mask10_1476_112" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="12" y="145" width="250" height="39">
<path d="M12.8646 145.198C12.8646 145.198 13.0885 145.323 13.5208 145.568C13.9531 145.807 14.5989 146.151 15.4479 146.594C17.1406 147.484 19.6406 148.739 22.8594 150.245C24.4739 150.995 26.2656 151.807 28.2239 152.661C30.1875 153.505 32.3125 154.417 34.6041 155.333C36.8958 156.239 39.3281 157.213 41.9271 158.146C42.2552 158.271 42.5781 158.385 42.9062 158.51C43.2344 158.625 43.5677 158.745 43.901 158.864C44.5677 159.099 45.2396 159.344 45.9219 159.588C47.2969 160.052 48.6875 160.547 50.1302 161.01C55.8698 162.922 62.151 164.765 68.8437 166.469C72.1979 167.286 75.6406 168.14 79.1875 168.864C80.9583 169.25 82.7604 169.578 84.5677 169.948C85.4739 170.13 86.3906 170.281 87.3073 170.453C88.2239 170.614 89.1406 170.792 90.0677 170.937C97.4844 172.156 105.182 173.167 113.036 173.771C114.016 173.849 115 173.922 115.984 174C116.974 174.057 117.958 174.114 118.948 174.172C120.927 174.307 122.917 174.364 124.906 174.453C125.901 174.5 126.896 174.51 127.896 174.531C128.891 174.552 129.891 174.573 130.885 174.594C131.885 174.599 132.885 174.599 133.885 174.599C134.885 174.599 135.885 174.614 136.88 174.583C144.88 174.489 152.875 174.031 160.714 173.239C168.557 172.448 176.24 171.323 183.641 169.958C191.036 168.583 198.141 166.963 204.833 165.219C206.505 164.765 208.161 164.349 209.781 163.896C211.396 163.427 212.984 162.953 214.552 162.515C215.344 162.297 216.115 162.057 216.875 161.823C217.646 161.583 218.401 161.349 219.156 161.114C219.906 160.88 220.651 160.651 221.391 160.422C221.76 160.312 222.125 160.187 222.49 160.068C222.854 159.943 223.214 159.828 223.573 159.708C225.01 159.234 226.422 158.771 227.802 158.318C229.177 157.849 230.505 157.359 231.818 156.911C232.469 156.682 233.115 156.458 233.75 156.234C234.073 156.125 234.385 156.01 234.698 155.901C235.016 155.786 235.323 155.672 235.63 155.552C236.854 155.088 238.047 154.646 239.208 154.219C239.792 154.005 240.359 153.792 240.922 153.588C241.484 153.38 242.031 153.156 242.568 152.948C243.641 152.515 244.682 152.114 245.677 151.724C246.177 151.531 246.667 151.338 247.146 151.156C247.391 151.062 247.625 150.969 247.859 150.88C248.094 150.781 248.323 150.687 248.547 150.594C249.458 150.219 250.323 149.859 251.146 149.526C251.974 149.187 252.755 148.87 253.49 148.568C253.854 148.417 254.214 148.276 254.562 148.135C254.901 147.989 255.229 147.849 255.552 147.708C256.823 147.161 257.906 146.703 258.792 146.328C260.562 145.594 261.505 145.198 261.505 145.198C261.505 145.198 260.646 145.75 259.036 146.786C257.417 147.818 255.047 149.338 251.943 151.125C251.172 151.578 250.354 152.057 249.5 152.557C249.286 152.682 249.068 152.802 248.849 152.932C248.63 153.052 248.406 153.177 248.177 153.302C247.724 153.552 247.26 153.802 246.786 154.068C245.839 154.588 244.849 155.125 243.823 155.682C243.307 155.953 242.786 156.245 242.25 156.521C241.714 156.797 241.167 157.078 240.609 157.359C238.385 158.5 236.01 159.708 233.464 160.89C232.193 161.489 230.891 162.109 229.547 162.719C228.193 163.307 226.812 163.917 225.396 164.531C224.687 164.838 223.979 165.167 223.25 165.458C222.516 165.755 221.781 166.052 221.036 166.349C220.292 166.651 219.542 166.953 218.776 167.26C218.021 167.568 217.255 167.875 216.474 168.161C214.917 168.75 213.323 169.333 211.708 169.932C210.089 170.51 208.427 171.057 206.75 171.635C200.016 173.87 192.812 175.948 185.25 177.687C177.693 179.443 169.781 180.854 161.677 181.838C153.573 182.823 145.281 183.38 136.984 183.484C135.948 183.51 134.906 183.489 133.87 183.489C132.833 183.484 131.797 183.479 130.76 183.474C129.724 183.443 128.687 183.411 127.656 183.385C126.62 183.349 125.583 183.333 124.552 183.271C122.49 183.167 120.427 183.078 118.38 182.901C117.354 182.823 116.328 182.745 115.307 182.667C114.286 182.568 113.271 182.469 112.255 182.37C104.125 181.573 96.1823 180.286 88.5885 178.661C87.6354 178.474 86.6927 178.25 85.7552 178.036C84.8177 177.818 83.8854 177.614 82.9583 177.39C81.1041 176.932 79.2708 176.489 77.4739 175.984C76.5729 175.734 75.6771 175.505 74.7864 175.245C73.901 174.989 73.0208 174.734 72.1458 174.479C70.3958 173.969 68.6771 173.427 66.9844 172.88C65.3021 172.318 63.6354 171.771 62.0156 171.187C61.2031 170.901 60.3906 170.63 59.5937 170.328C58.8021 170.031 58.0156 169.739 57.2291 169.443C54.1198 168.239 51.1198 167.052 48.2916 165.802C42.6146 163.344 37.5469 160.812 33.1406 158.422C28.7344 156.026 25 153.765 21.9948 151.802C21.2396 151.312 20.5364 150.838 19.875 150.39C19.2135 149.943 18.5937 149.515 18.026 149.114C16.8854 148.318 15.9375 147.609 15.1719 147.026C14.401 146.453 13.8333 145.989 13.4427 145.677C13.0625 145.364 12.8646 145.198 12.8646 145.198Z" fill="white"/>
</mask>
<g mask="url(#mask10_1476_112)">
<mask id="mask11_1476_112" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="-4" y="40" width="282" height="248">
<path d="M204.568 287.844L277.625 153.974L69.8073 40.8696L-3.25522 174.739L204.568 287.844Z" fill="white"/>
</mask>
<g mask="url(#mask11_1476_112)">
<path d="M204.568 287.838L277.625 153.974L69.8021 40.8696L-3.25522 174.739L204.568 287.838Z" fill="url(#paint2_linear_1476_112)"/>
</g>
</g>
</g>
</g>
<defs>
<linearGradient id="paint0_linear_1476_112" x1="265.5" y1="70" x2="6.49999" y2="77.5" gradientUnits="userSpaceOnUse">
<stop stop-color="#900C3F"/>
<stop offset="0.479167" stop-color="#BA3468"/>
<stop offset="1" stop-color="#AC1A53"/>
</linearGradient>
<linearGradient id="paint1_linear_1476_112" x1="174" y1="6.49999" x2="72" y2="120" gradientUnits="userSpaceOnUse">
<stop offset="0.251902" stop-color="#900C3F"/>
<stop offset="1" stop-color="#AC1A53"/>
</linearGradient>
<linearGradient id="paint2_linear_1476_112" x1="137.185" y1="40.8696" x2="137.185" y2="287.838" gradientUnits="userSpaceOnUse">
<stop offset="0.25" stop-color="#900C3F"/>
<stop offset="1" stop-color="#DCA5BB"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -0,0 +1,84 @@
<svg width="116" height="37" viewBox="0 0 116 37" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M38.7439 10.0799C39.5969 10.9318 39.5969 12.3123 38.7439 13.1653C37.8909 14.0162 36.5072 14.0162 35.6543 13.1653C34.8013 12.3123 34.8013 10.9318 35.6543 10.0799C36.5072 9.22794 37.8909 9.22794 38.7439 10.0799Z" fill="#AC1A53"/>
<mask id="mask0_1476_225" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="8" width="55" height="26">
<path d="M0 8.3042H54.388V33.9797H0V8.3042Z" fill="white"/>
</mask>
<g mask="url(#mask0_1476_225)">
<mask id="mask1_1476_225" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="8" width="55" height="26">
<path d="M46.2006 10.2557C50.2496 12.5324 52.7158 15.5494 52.7158 18.8612C52.7158 25.9482 41.4197 31.6926 27.4847 31.6926C13.5497 31.6926 2.25359 25.9482 2.25359 18.8612C2.25359 14.4963 6.53951 10.64 13.0874 8.32227C5.2432 10.7485 0.00427246 15.1366 0.00427246 20.147C0.00427246 27.7848 12.1786 33.9757 27.1962 33.9757C42.2148 33.9757 54.3891 27.7848 54.3891 20.147C54.3891 16.2707 51.2521 12.7661 46.2006 10.2557Z" fill="white"/>
</mask>
<g mask="url(#mask1_1476_225)">
<mask id="mask2_1476_225" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="8" width="55" height="26">
<path d="M46.2006 10.2557C50.2496 12.5313 52.7158 15.5494 52.7158 18.8612C52.7158 25.9482 41.4197 31.6926 27.4847 31.6926C13.5507 31.6926 2.25359 25.9482 2.25359 18.8612C2.25359 14.4963 6.53951 10.64 13.0874 8.32227C5.2432 10.7485 0.00427246 15.1366 0.00427246 20.147C0.00427246 27.7837 12.1786 33.9757 27.1962 33.9757C42.2148 33.9757 54.3891 27.7837 54.3891 20.147C54.3891 16.2707 51.2531 12.7661 46.2006 10.2557Z" fill="white"/>
</mask>
<g mask="url(#mask2_1476_225)">
<mask id="mask3_1476_225" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="-11" y="-15" width="77" height="72">
<path d="M41.9347 56.7964L65.1829 14.1973L12.4587 -14.4973L-10.7906 28.1007L41.9347 56.7964Z" fill="white"/>
</mask>
<g mask="url(#mask3_1476_225)">
<path d="M41.9347 56.7953L65.1829 14.1973L12.4576 -14.4973L-10.7906 28.1018L41.9347 56.7953Z" fill="url(#paint0_linear_1476_225)"/>
</g>
</g>
</g>
</g>
<path d="M5.59489 24.3842L8.5666 27.3507C13.1895 30.0138 19.9511 31.6924 27.4847 31.6924C29.9214 31.6924 32.2771 31.5165 34.5054 31.189L48.7974 16.917C49.6114 16.1051 49.6114 14.7878 48.7974 13.9759C29.7266 31.4365 9.0689 23.705 9.0689 23.705C8.42338 24.3505 7.34927 24.3063 6.76167 23.5744C6.26463 22.9542 6.34571 22.0507 6.90804 21.4894L26.6675 1.7573C26.8549 1.56986 26.8549 1.26553 26.6675 1.07808C26.4801 0.890639 26.1757 0.890639 25.9883 1.07808L5.59489 21.443C4.78193 22.255 4.78193 23.5723 5.59489 24.3842Z" fill="#900C3F"/>
<mask id="mask4_1476_225" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="9" y="0" width="31" height="26">
<path d="M9.04358 0H39.283V25.4502H9.04358V0Z" fill="white"/>
</mask>
<g mask="url(#mask4_1476_225)">
<mask id="mask5_1476_225" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="9" y="-1" width="31" height="27">
<path d="M39.2588 4.45031L35.5047 0.701447C34.5654 -0.235769 33.0448 -0.235769 32.1055 0.701447L9.06891 23.7054C9.06891 23.7054 15.8706 26.2506 25.2712 25.1217C24.2318 4.02488 39.2588 4.45031 39.2588 4.45031Z" fill="white"/>
</mask>
<g mask="url(#mask5_1476_225)">
<mask id="mask6_1476_225" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="9" y="-1" width="31" height="27">
<path d="M39.2588 4.45031L35.5047 0.701447C34.5654 -0.235769 33.0448 -0.235769 32.1055 0.701447L9.06891 23.7054C9.06891 23.7054 15.8706 26.2506 25.2712 25.1217C24.2318 4.02488 39.2588 4.45031 39.2588 4.45031Z" fill="white"/>
</mask>
<g mask="url(#mask6_1476_225)">
<mask id="mask7_1476_225" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="-2" y="-13" width="53" height="52">
<path d="M-1.86176 20.505L32.7099 38.6754L50.1906 5.50952L15.6179 -12.6609L-1.86176 20.505Z" fill="white"/>
</mask>
<g mask="url(#mask7_1476_225)">
<path d="M-1.4342 19.9292L32.7099 37.8753L49.7631 5.5213L15.6179 -12.4248L-1.4342 19.9292Z" fill="url(#paint1_linear_1476_225)"/>
</g>
</g>
</g>
</g>
<path d="M44.2893 9.47316L39.5768 14.1782C38.1879 15.5651 35.9364 15.5651 34.5475 14.1782C33.1585 12.7913 33.1585 10.542 34.5475 9.15514L34.9034 8.79921C34.9529 8.7297 35.0077 8.66336 35.0698 8.60229L38.9598 4.71758C39.0208 4.6565 39.0861 4.60279 39.1535 4.55541L39.2588 4.4501C39.2588 4.4501 24.2318 4.02467 25.2711 25.1215C32.2529 24.2833 40.6689 21.4179 48.7974 13.976L44.2893 9.47316Z" fill="#AC1A53"/>
<mask id="mask8_1476_225" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="2" y="29" width="51" height="8">
<path d="M2.42413 29.2463H52.7379V37H2.42413V29.2463Z" fill="white"/>
</mask>
<g mask="url(#mask8_1476_225)">
<mask id="mask9_1476_225" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="2" y="29" width="51" height="8">
<path d="M2.4588 29.2537C2.4588 29.2537 2.50408 29.2789 2.59149 29.3284C2.67889 29.3769 2.80947 29.4464 2.98111 29.5359C3.32336 29.716 3.82882 29.9697 4.47961 30.2741C4.80605 30.4257 5.1683 30.59 5.56425 30.7627C5.96125 30.9333 6.3909 31.1176 6.85424 31.3029C7.31758 31.4861 7.80936 31.6831 8.33483 31.8715C8.40117 31.8968 8.46646 31.92 8.5328 31.9453C8.59915 31.9684 8.66654 31.9926 8.73394 32.0169C8.86873 32.0643 9.00457 32.1138 9.14252 32.1632C9.42053 32.257 9.70169 32.357 9.99339 32.4507C11.1539 32.8372 12.4238 33.21 13.777 33.5543C14.4552 33.7197 15.1512 33.8924 15.8684 34.0387C16.2264 34.1167 16.5908 34.183 16.9562 34.2578C17.1394 34.2946 17.3247 34.3252 17.5101 34.3599C17.6954 34.3926 17.8807 34.4284 18.0682 34.4578C19.5677 34.7043 21.1241 34.9085 22.7121 35.0307C22.9101 35.0465 23.1091 35.0612 23.3082 35.077C23.5083 35.0886 23.7073 35.1002 23.9074 35.1118C24.3075 35.1392 24.7098 35.1508 25.1121 35.1687C25.3132 35.1781 25.5143 35.1802 25.7165 35.1844C25.9176 35.1887 26.1198 35.1929 26.321 35.1971C26.5231 35.1981 26.7253 35.1981 26.9275 35.1981C27.1297 35.1981 27.3319 35.2013 27.533 35.195C29.1505 35.176 30.7669 35.0834 32.3518 34.9233C33.9377 34.7632 35.4909 34.5358 36.9873 34.2599C38.4826 33.9819 39.919 33.6544 41.2722 33.3016C41.6102 33.21 41.9451 33.1257 42.2726 33.0341C42.599 32.9393 42.9202 32.8435 43.2372 32.7551C43.3972 32.7108 43.5531 32.6624 43.7068 32.615C43.8627 32.5666 44.0154 32.5192 44.1681 32.4718C44.3197 32.4244 44.4703 32.3781 44.6198 32.3317C44.6946 32.3096 44.7683 32.2843 44.842 32.2601C44.9157 32.2349 44.9884 32.2117 45.0611 32.1875C45.3517 32.0916 45.6371 31.9979 45.9161 31.9063C46.1941 31.8115 46.4627 31.7125 46.728 31.622C46.8597 31.5756 46.9903 31.5304 47.1187 31.4851C47.184 31.463 47.2472 31.4398 47.3104 31.4177C47.3746 31.3945 47.4367 31.3713 47.4989 31.3471C47.7463 31.2534 47.9875 31.1639 48.2223 31.0775C48.3403 31.0344 48.4551 30.9912 48.5688 30.9501C48.6825 30.908 48.7931 30.8627 48.9015 30.8206C49.1185 30.7332 49.3291 30.6521 49.5302 30.5731C49.6313 30.5342 49.7303 30.4952 49.8272 30.4584C49.8767 30.4394 49.9241 30.4204 49.9714 30.4025C50.0188 30.3825 50.0652 30.3636 50.1104 30.3446C50.2947 30.2688 50.4695 30.1961 50.6359 30.1287C50.8034 30.0603 50.9613 29.9961 51.1098 29.935C51.1835 29.9044 51.2562 29.876 51.3267 29.8476C51.3952 29.8181 51.4615 29.7897 51.5268 29.7612C51.7837 29.6507 52.0028 29.558 52.1818 29.4822C52.5398 29.3337 52.7304 29.2537 52.7304 29.2537C52.7304 29.2537 52.5567 29.3653 52.2313 29.5748C51.9038 29.7833 51.4247 30.0908 50.797 30.452C50.6412 30.5437 50.4759 30.6405 50.3032 30.7416C50.26 30.7669 50.2158 30.7911 50.1715 30.8174C50.1273 30.8417 50.082 30.8669 50.0357 30.8922C49.9441 30.9428 49.8503 30.9933 49.7545 31.047C49.5629 31.1523 49.3628 31.2608 49.1553 31.3735C49.0511 31.4282 48.9458 31.4872 48.8373 31.543C48.7288 31.5988 48.6183 31.6557 48.5056 31.7125C48.0559 31.9432 47.5758 32.1875 47.0608 32.4265C46.8039 32.5476 46.5406 32.6729 46.2689 32.7961C45.9951 32.9151 45.7161 33.0383 45.4296 33.1626C45.2864 33.2247 45.1432 33.2911 44.9958 33.35C44.8473 33.4101 44.6988 33.4701 44.5482 33.5301C44.3976 33.5912 44.246 33.6523 44.0912 33.7144C43.9385 33.7765 43.7837 33.8386 43.6258 33.8966C43.3109 34.0156 42.9887 34.1335 42.6622 34.2546C42.3347 34.3715 41.9988 34.4821 41.6597 34.599C40.2981 35.0507 38.8417 35.4709 37.3127 35.8226C35.7847 36.1775 34.1851 36.4629 32.5466 36.6619C30.908 36.8609 29.2316 36.9736 27.5541 36.9946C27.3445 36.9999 27.1339 36.9957 26.9244 36.9957C26.7148 36.9946 26.5052 36.9936 26.2957 36.9925C26.0861 36.9862 25.8766 36.9799 25.6681 36.9746C25.4585 36.9673 25.2489 36.9641 25.0404 36.9515C24.6234 36.9304 24.2064 36.9125 23.7926 36.8767C23.5851 36.8609 23.3777 36.8451 23.1713 36.8293C22.9649 36.8093 22.7595 36.7893 22.5542 36.7693C20.9104 36.6082 19.3045 36.3481 17.7691 36.0195C17.5764 35.9816 17.3858 35.9363 17.1963 35.8932C17.0067 35.8489 16.8182 35.8079 16.6308 35.7626C16.2559 35.6699 15.8852 35.5804 15.5219 35.4783C15.3397 35.4277 15.1586 35.3814 14.9785 35.3287C14.7995 35.2771 14.6215 35.2255 14.4446 35.1739C14.0908 35.0707 13.7433 34.9612 13.4011 34.8506C13.0609 34.7369 12.7239 34.6263 12.3965 34.5084C12.2322 34.4505 12.0679 34.3957 11.9068 34.3346C11.7467 34.2746 11.5877 34.2156 11.4287 34.1556C10.8 33.9124 10.1935 33.6723 9.62166 33.4195C8.47383 32.9225 7.44921 32.4107 6.55833 31.9274C5.66745 31.443 4.91241 30.9859 4.3048 30.5889C4.15211 30.4899 4.00995 30.3941 3.87621 30.3036C3.74247 30.213 3.61716 30.1266 3.50238 30.0456C3.27176 29.8844 3.0801 29.7412 2.9253 29.6233C2.76945 29.5074 2.65467 29.4137 2.57569 29.3505C2.49882 29.2874 2.4588 29.2537 2.4588 29.2537Z" fill="white"/>
</mask>
<g mask="url(#mask9_1476_225)">
<mask id="mask10_1476_225" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="2" y="29" width="51" height="8">
<path d="M2.4588 29.2537C2.4588 29.2537 2.50408 29.2789 2.59149 29.3284C2.67889 29.3769 2.80947 29.4464 2.98111 29.5359C3.32336 29.716 3.82882 29.9697 4.47961 30.2741C4.80605 30.4257 5.1683 30.59 5.56425 30.7627C5.96125 30.9333 6.3909 31.1176 6.85424 31.3029C7.31758 31.4861 7.80936 31.6831 8.33483 31.8715C8.40117 31.8968 8.46646 31.92 8.5328 31.9453C8.59915 31.9684 8.66654 31.9926 8.73394 32.0169C8.86873 32.0643 9.00457 32.1138 9.14252 32.1632C9.42053 32.257 9.70169 32.357 9.99339 32.4507C11.1539 32.8372 12.4238 33.21 13.777 33.5543C14.4552 33.7197 15.1512 33.8924 15.8684 34.0387C16.2264 34.1167 16.5908 34.183 16.9562 34.2578C17.1394 34.2946 17.3247 34.3252 17.5101 34.3599C17.6954 34.3926 17.8807 34.4284 18.0682 34.4578C19.5677 34.7043 21.1241 34.9085 22.7121 35.0307C22.9101 35.0465 23.1091 35.0612 23.3082 35.077C23.5083 35.0886 23.7073 35.1002 23.9074 35.1118C24.3075 35.1392 24.7098 35.1508 25.1121 35.1687C25.3132 35.1781 25.5143 35.1802 25.7165 35.1844C25.9176 35.1887 26.1198 35.1929 26.321 35.1971C26.5231 35.1981 26.7253 35.1981 26.9275 35.1981C27.1297 35.1981 27.3319 35.2013 27.533 35.195C29.1505 35.176 30.7669 35.0834 32.3518 34.9233C33.9377 34.7632 35.4909 34.5358 36.9873 34.2599C38.4826 33.9819 39.919 33.6544 41.2722 33.3016C41.6102 33.21 41.9451 33.1257 42.2726 33.0341C42.599 32.9393 42.9202 32.8435 43.2372 32.7551C43.3972 32.7108 43.5531 32.6624 43.7068 32.615C43.8627 32.5666 44.0154 32.5192 44.1681 32.4718C44.3197 32.4244 44.4703 32.3781 44.6198 32.3317C44.6946 32.3096 44.7683 32.2843 44.842 32.2601C44.9157 32.2349 44.9884 32.2117 45.0611 32.1875C45.3517 32.0916 45.6371 31.9979 45.9161 31.9063C46.1941 31.8115 46.4627 31.7125 46.728 31.622C46.8597 31.5756 46.9903 31.5304 47.1187 31.4851C47.184 31.463 47.2472 31.4398 47.3104 31.4177C47.3746 31.3945 47.4367 31.3713 47.4989 31.3471C47.7463 31.2534 47.9875 31.1639 48.2223 31.0775C48.3403 31.0344 48.4551 30.9912 48.5688 30.9501C48.6825 30.908 48.7931 30.8627 48.9015 30.8206C49.1185 30.7332 49.3291 30.6521 49.5302 30.5731C49.6313 30.5342 49.7303 30.4952 49.8272 30.4584C49.8767 30.4394 49.9241 30.4204 49.9714 30.4025C50.0188 30.3825 50.0652 30.3636 50.1104 30.3446C50.2947 30.2688 50.4695 30.1961 50.6359 30.1287C50.8034 30.0603 50.9613 29.9961 51.1098 29.935C51.1835 29.9044 51.2562 29.876 51.3267 29.8476C51.3952 29.8181 51.4615 29.7897 51.5268 29.7612C51.7837 29.6507 52.0028 29.558 52.1818 29.4822C52.5398 29.3337 52.7304 29.2537 52.7304 29.2537C52.7304 29.2537 52.5567 29.3653 52.2313 29.5748C51.9038 29.7833 51.4247 30.0908 50.797 30.452C50.6412 30.5437 50.4759 30.6405 50.3032 30.7416C50.26 30.7669 50.2158 30.7911 50.1715 30.8174C50.1273 30.8417 50.082 30.8669 50.0357 30.8922C49.9441 30.9428 49.8503 30.9933 49.7545 31.047C49.5629 31.1523 49.3628 31.2608 49.1553 31.3735C49.0511 31.4282 48.9458 31.4872 48.8373 31.543C48.7288 31.5988 48.6183 31.6557 48.5056 31.7125C48.0559 31.9432 47.5758 32.1875 47.0608 32.4265C46.8039 32.5476 46.5406 32.6729 46.2689 32.7961C45.9951 32.9151 45.7161 33.0383 45.4296 33.1626C45.2864 33.2247 45.1432 33.2911 44.9958 33.35C44.8473 33.4101 44.6988 33.4701 44.5482 33.5301C44.3976 33.5912 44.246 33.6523 44.0912 33.7144C43.9385 33.7765 43.7837 33.8386 43.6258 33.8966C43.3109 34.0156 42.9887 34.1335 42.6622 34.2546C42.3347 34.3715 41.9988 34.4821 41.6597 34.599C40.2981 35.0507 38.8417 35.4709 37.3127 35.8226C35.7847 36.1775 34.1851 36.4629 32.5466 36.6619C30.908 36.8609 29.2316 36.9736 27.5541 36.9946C27.3445 36.9999 27.1339 36.9957 26.9244 36.9957C26.7148 36.9946 26.5052 36.9936 26.2957 36.9925C26.0861 36.9862 25.8766 36.9799 25.6681 36.9746C25.4585 36.9673 25.2489 36.9641 25.0404 36.9515C24.6234 36.9304 24.2064 36.9125 23.7926 36.8767C23.5851 36.8609 23.3777 36.8451 23.1713 36.8293C22.9649 36.8093 22.7595 36.7893 22.5542 36.7693C20.9104 36.6082 19.3045 36.3481 17.7691 36.0195C17.5764 35.9816 17.3858 35.9363 17.1963 35.8932C17.0067 35.8489 16.8182 35.8079 16.6308 35.7626C16.2559 35.6699 15.8852 35.5804 15.5219 35.4783C15.3397 35.4277 15.1586 35.3814 14.9785 35.3287C14.7995 35.2771 14.6215 35.2255 14.4446 35.1739C14.0908 35.0707 13.7433 34.9612 13.4011 34.8506C13.0609 34.7369 12.7239 34.6263 12.3965 34.5084C12.2322 34.4505 12.0679 34.3957 11.9068 34.3346C11.7467 34.2746 11.5877 34.2156 11.4287 34.1556C10.8 33.9124 10.1935 33.6723 9.62166 33.4195C8.47383 32.9225 7.44921 32.4107 6.55833 31.9274C5.66745 31.443 4.91241 30.9859 4.3048 30.5889C4.15211 30.4899 4.00995 30.3941 3.87621 30.3036C3.74247 30.213 3.61716 30.1266 3.50238 30.0456C3.27176 29.8844 3.0801 29.7412 2.9253 29.6233C2.76945 29.5074 2.65467 29.4137 2.57569 29.3505C2.49882 29.2874 2.4588 29.2537 2.4588 29.2537Z" fill="white"/>
</mask>
<g mask="url(#mask10_1476_225)">
<mask id="mask11_1476_225" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="-1" y="8" width="57" height="51">
<path d="M41.2185 58.0946L55.9896 31.028L13.9718 8.15991L-0.800415 35.2265L41.2185 58.0946Z" fill="white"/>
</mask>
<g mask="url(#mask11_1476_225)">
<path d="M41.2185 58.0935L55.9896 31.028L13.9707 8.15991L-0.800415 35.2265L41.2185 58.0935Z" fill="url(#paint2_linear_1476_225)"/>
</g>
</g>
</g>
</g>
<path d="M67.7297 24L65.5397 20.025H64.9247V24H62.3597V13.47H66.6647C67.4947 13.47 68.1997 13.615 68.7797 13.905C69.3697 14.195 69.8097 14.595 70.0997 15.105C70.3897 15.605 70.5347 16.165 70.5347 16.785C70.5347 17.485 70.3347 18.11 69.9347 18.66C69.5447 19.21 68.9647 19.6 68.1947 19.83L70.6247 24H67.7297ZM64.9247 18.21H66.5147C66.9847 18.21 67.3347 18.095 67.5647 17.865C67.8047 17.635 67.9247 17.31 67.9247 16.89C67.9247 16.49 67.8047 16.175 67.5647 15.945C67.3347 15.715 66.9847 15.6 66.5147 15.6H64.9247V18.21ZM80.0348 19.68C80.0348 19.92 80.0198 20.17 79.9898 20.43H74.1848C74.2248 20.95 74.3898 21.35 74.6798 21.63C74.9798 21.9 75.3448 22.035 75.7748 22.035C76.4148 22.035 76.8598 21.765 77.1098 21.225H79.8398C79.6998 21.775 79.4448 22.27 79.0748 22.71C78.7148 23.15 78.2598 23.495 77.7098 23.745C77.1598 23.995 76.5448 24.12 75.8648 24.12C75.0448 24.12 74.3148 23.945 73.6748 23.595C73.0348 23.245 72.5348 22.745 72.1748 22.095C71.8148 21.445 71.6348 20.685 71.6348 19.815C71.6348 18.945 71.8098 18.185 72.1598 17.535C72.5198 16.885 73.0198 16.385 73.6598 16.035C74.2998 15.685 75.0348 15.51 75.8648 15.51C76.6748 15.51 77.3948 15.68 78.0248 16.02C78.6548 16.36 79.1448 16.845 79.4948 17.475C79.8548 18.105 80.0348 18.84 80.0348 19.68ZM77.4098 19.005C77.4098 18.565 77.2598 18.215 76.9598 17.955C76.6598 17.695 76.2848 17.565 75.8348 17.565C75.4048 17.565 75.0398 17.69 74.7398 17.94C74.4498 18.19 74.2698 18.545 74.1998 19.005H77.4098ZM86.503 24L83.953 20.49V24H81.388V12.9H83.953V19.035L86.488 15.63H89.653L86.173 19.83L89.683 24H86.503ZM93.2255 16.815C93.4655 16.425 93.8105 16.11 94.2605 15.87C94.7105 15.63 95.2255 15.51 95.8055 15.51C96.4955 15.51 97.1205 15.685 97.6805 16.035C98.2405 16.385 98.6805 16.885 99.0005 17.535C99.3305 18.185 99.4955 18.94 99.4955 19.8C99.4955 20.66 99.3305 21.42 99.0005 22.08C98.6805 22.73 98.2405 23.235 97.6805 23.595C97.1205 23.945 96.4955 24.12 95.8055 24.12C95.2155 24.12 94.7005 24.005 94.2605 23.775C93.8205 23.535 93.4755 23.22 93.2255 22.83V24H90.6605V12.9H93.2255V16.815ZM96.8855 19.8C96.8855 19.16 96.7055 18.66 96.3455 18.3C95.9955 17.93 95.5605 17.745 95.0405 17.745C94.5305 17.745 94.0955 17.93 93.7355 18.3C93.3855 18.67 93.2105 19.175 93.2105 19.815C93.2105 20.455 93.3855 20.96 93.7355 21.33C94.0955 21.7 94.5305 21.885 95.0405 21.885C95.5505 21.885 95.9855 21.7 96.3455 21.33C96.7055 20.95 96.8855 20.44 96.8855 19.8ZM108.731 19.68C108.731 19.92 108.716 20.17 108.686 20.43H102.881C102.921 20.95 103.086 21.35 103.376 21.63C103.676 21.9 104.041 22.035 104.471 22.035C105.111 22.035 105.556 21.765 105.806 21.225H108.536C108.396 21.775 108.141 22.27 107.771 22.71C107.411 23.15 106.956 23.495 106.406 23.745C105.856 23.995 105.241 24.12 104.561 24.12C103.741 24.12 103.011 23.945 102.371 23.595C101.731 23.245 101.231 22.745 100.871 22.095C100.511 21.445 100.331 20.685 100.331 19.815C100.331 18.945 100.506 18.185 100.856 17.535C101.216 16.885 101.716 16.385 102.356 16.035C102.996 15.685 103.731 15.51 104.561 15.51C105.371 15.51 106.091 15.68 106.721 16.02C107.351 16.36 107.841 16.845 108.191 17.475C108.551 18.105 108.731 18.84 108.731 19.68ZM106.106 19.005C106.106 18.565 105.956 18.215 105.656 17.955C105.356 17.695 104.981 17.565 104.531 17.565C104.101 17.565 103.736 17.69 103.436 17.94C103.146 18.19 102.966 18.545 102.896 19.005H106.106ZM112.649 17.025C112.949 16.565 113.324 16.205 113.774 15.945C114.224 15.675 114.724 15.54 115.274 15.54V18.255H114.569C113.929 18.255 113.449 18.395 113.129 18.675C112.809 18.945 112.649 19.425 112.649 20.115V24H110.084V15.63H112.649V17.025Z" fill="#900C3F"/>
<defs>
<linearGradient id="paint0_linear_1476_225" x1="53.5382" y1="14.0498" x2="1.17207" y2="15.5662" gradientUnits="userSpaceOnUse">
<stop stop-color="#900C3F"/>
<stop offset="0.479167" stop-color="#BA3468"/>
<stop offset="1" stop-color="#AC1A53"/>
</linearGradient>
<linearGradient id="paint1_linear_1476_225" x1="35.0382" y1="1.21114" x2="14.4153" y2="24.1592" gradientUnits="userSpaceOnUse">
<stop offset="0.251902" stop-color="#900C3F"/>
<stop offset="1" stop-color="#AC1A53"/>
</linearGradient>
<linearGradient id="paint2_linear_1476_225" x1="27.5946" y1="8.15991" x2="27.5946" y2="58.0935" gradientUnits="userSpaceOnUse">
<stop offset="0.25" stop-color="#900C3F"/>
<stop offset="1" stop-color="#DCA5BB"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -0,0 +1,16 @@
<svg width="69" height="48" viewBox="0 0 69 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<mask id="mask0_1365_1878" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="69" height="21">
<path d="M0 0H68.7922V20.7256H0V0Z" fill="white"/>
</mask>
<g mask="url(#mask0_1365_1878)">
<path d="M67.569 13.8023C63.0887 9.30412 57.8658 5.82217 52.0452 3.4493C46.4232 1.15948 40.4854 -0.00170898 34.3944 -0.00170898C28.305 -0.00170898 22.3672 1.15948 16.7452 3.4493C10.9246 5.82217 5.70168 9.30412 1.22139 13.8023C-0.276922 15.3072 -0.276922 17.7468 1.22139 19.2516C2.72133 20.7565 5.15121 20.7565 6.64952 19.2516C21.9486 3.89228 46.8418 3.89228 62.1409 19.2516C62.89 20.004 63.8721 20.3802 64.8541 20.3802C65.8362 20.3802 66.8182 20.004 67.569 19.2516C69.0673 17.7468 69.0673 15.3072 67.569 13.8023Z" fill="#61D67A"/>
</g>
<path d="M34.391 13.6409C24.9924 13.6409 16.1523 17.3199 9.49947 23.9988C8.00115 25.5036 8.00115 27.9433 9.49947 29.4481C10.9978 30.9529 13.4277 30.9529 14.926 29.4481C25.6585 18.6733 43.122 18.6733 53.8528 29.4481C54.602 30.2005 55.5857 30.5767 56.5677 30.5767C57.5497 30.5767 58.5318 30.2005 59.281 29.4481C60.7793 27.9433 60.7793 25.5036 59.281 23.9988C52.6265 17.3199 43.7864 13.6409 34.3894 13.6409H34.391Z" fill="#61D67A"/>
<path d="M34.3912 27.5752C28.6471 27.5752 23.245 29.8243 19.1784 33.9056C17.6801 35.4104 17.6801 37.85 19.1784 39.3549C20.6767 40.8597 23.1066 40.8597 24.6066 39.3549C30.0005 33.9381 38.7803 33.9381 44.1758 39.3549C44.925 40.1073 45.907 40.4835 46.8891 40.4835C47.8711 40.4835 48.8532 40.1073 49.6023 39.3549C51.1023 37.85 51.1023 35.4104 49.6023 33.9056C45.5373 29.8243 40.1353 27.5752 34.3912 27.5752Z" fill="#61D67A"/>
<mask id="mask1_1365_1878" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="30" y="40" width="8" height="8">
<path d="M30.8521 40.7378H37.9397V47.174H30.8521V40.7378Z" fill="white"/>
</mask>
<g mask="url(#mask1_1365_1878)">
<path d="M37.5618 43.9771C37.5618 44.1871 37.5423 44.3956 37.5016 44.6008C37.4609 44.8076 37.399 45.008 37.3192 45.2018C37.2394 45.3956 37.1417 45.5796 37.0244 45.7555C36.9088 45.9298 36.7769 46.091 36.6287 46.2392C36.4805 46.389 36.3192 46.5209 36.145 46.6382C35.9723 46.7555 35.7883 46.8532 35.5945 46.933C35.4007 47.0144 35.202 47.0747 34.9968 47.1154C34.7916 47.1561 34.5848 47.1773 34.3747 47.1773C34.1662 47.1773 33.9578 47.1561 33.7525 47.1154C33.5473 47.0747 33.3487 47.0144 33.1549 46.933C32.961 46.8532 32.7786 46.7555 32.6044 46.6382C32.4301 46.5209 32.2689 46.389 32.1207 46.2392C31.9725 46.091 31.8406 45.9298 31.7249 45.7555C31.6077 45.5796 31.51 45.3956 31.4302 45.2018C31.3504 45.008 31.2901 44.8076 31.2494 44.6008C31.2087 44.3956 31.1875 44.1871 31.1875 43.9771C31.1875 43.767 31.2087 43.5585 31.2494 43.3533C31.2901 43.1465 31.3504 42.9462 31.4302 42.7523C31.51 42.5585 31.6077 42.3745 31.7249 42.2003C31.8406 42.0244 31.9725 41.8631 32.1207 41.7149C32.2689 41.5667 32.4301 41.4332 32.6044 41.3159C32.7786 41.2003 32.961 41.1009 33.1549 41.0211C33.3487 40.9413 33.5473 40.8795 33.7525 40.8387C33.9578 40.798 34.1662 40.7769 34.3747 40.7769C34.5848 40.7769 34.7916 40.798 34.9968 40.8387C35.202 40.8795 35.4007 40.9413 35.5945 41.0211C35.7883 41.1009 35.9723 41.2003 36.145 41.3159C36.3192 41.4332 36.4805 41.5667 36.6287 41.7149C36.7769 41.8631 36.9088 42.0244 37.0244 42.2003C37.1417 42.3745 37.2394 42.5585 37.3192 42.7523C37.399 42.9462 37.4609 43.1465 37.5016 43.3533C37.5423 43.5585 37.5618 43.767 37.5618 43.9771Z" fill="#61D67A"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -0,0 +1,23 @@
<svg width="68" height="67" viewBox="0 0 68 67" fill="none" xmlns="http://www.w3.org/2000/svg">
<mask id="mask0_1365_1834" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="37" y="59" width="21" height="8">
<path d="M37.3524 59.0166H57.2407V66.57H37.3524V59.0166Z" fill="white"/>
</mask>
<g mask="url(#mask0_1365_1834)">
<path d="M37.4653 66.57H56.9511V59.4258H37.4653V66.57Z" fill="#FFCB27"/>
</g>
<path d="M67.621 24.6905C67.621 23.5735 66.8035 22.5963 65.6805 22.3632C64.434 22.1077 63.1362 22.964 62.7743 24.2762L59.4248 36.4824C60.2247 38.6319 59.3065 41.1059 57.1454 42.3248L50.3246 46.168C49.7385 46.4926 48.9969 46.2975 48.6632 45.7295C48.3259 45.158 48.5254 44.4329 49.1063 44.1014L55.9324 40.26C57.1277 39.5901 57.6221 38.1381 57.0412 37.0314C56.6139 36.2165 55.7999 35.7279 54.8677 35.7279C54.4386 35.7279 54.0202 35.835 53.6494 36.0456L45.3296 40.8176C42.7306 42.3058 41.1185 45.0596 41.1185 48.005V57.0431H53.298V55.6619C53.298 53.9216 54.0731 52.2711 55.4239 51.1403L61.104 46.3821C61.6654 45.9107 62.0645 45.2927 62.2552 44.59L67.5415 25.3086C67.5927 25.1135 67.621 24.9132 67.621 24.6905Z" fill="#FFCB27"/>
<path d="M1.94222 22.3632C0.819263 22.5963 0 23.5735 0 24.6905C0 24.9081 0.0300162 25.1135 0.0812201 25.3086L5.36759 44.5952C5.55828 45.2927 5.95732 45.9108 6.51879 46.3821L12.1989 51.1403C13.5496 52.2712 14.3247 53.9217 14.3247 55.662V57.0432H26.5042V48.005C26.5042 45.0596 24.8904 42.3059 22.2931 40.8176L13.9628 36.0405C13.6026 35.835 13.1841 35.728 12.7551 35.728C11.8175 35.728 11.0053 36.2166 10.5763 37.0315C10.0007 38.1381 10.495 39.5901 11.6904 40.26L18.5111 44.1014C19.0973 44.4329 19.2968 45.158 18.9596 45.7295C18.6259 46.2975 17.879 46.4978 17.2981 46.168L10.4774 42.3249C8.31623 41.106 7.39809 38.6319 8.19793 36.4773L4.84848 24.2762C4.48653 22.9641 3.18347 22.1129 1.94222 22.3632Z" fill="#FFCB27"/>
<mask id="mask1_1365_1834" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="10" y="59" width="21" height="8">
<path d="M10.2319 59.0166H30.5723V66.57H10.2319V59.0166Z" fill="white"/>
</mask>
<g mask="url(#mask1_1365_1834)">
<path d="M30.1574 59.4258H10.6716V66.57H30.1574V59.4258Z" fill="#FFCB27"/>
</g>
<mask id="mask2_1365_1834" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="16" y="0" width="35" height="40">
<path d="M16.5601 0H50.9126V39.1273H16.5601V0Z" fill="white"/>
</mask>
<g mask="url(#mask2_1365_1834)">
<path d="M46.9505 4.70989C47.3072 4.63565 47.6885 4.7237 47.9746 4.94814C48.2589 5.17604 48.4266 5.51443 48.4266 5.87872V13.698C48.4266 22.9502 43.2356 31.4065 34.8858 35.7607L34.3826 36.0214C34.206 36.1147 34.0065 36.1613 33.8105 36.1613C33.6163 36.1613 33.4168 36.1147 33.2402 36.0214L32.737 35.7607C24.3872 31.4065 19.1962 22.9502 19.1962 13.698V5.87354C19.1962 5.51443 19.3639 5.17604 19.6482 4.94814C19.9342 4.7237 20.3103 4.63565 20.6723 4.70989C24.7015 5.56622 29.0203 5.02756 32.6981 3.22684L33.2649 2.95233C33.6075 2.78486 34.0118 2.78486 34.3543 2.95233L34.9246 3.23029C38.6025 5.02756 42.9072 5.56622 46.9505 4.70989ZM36.014 1.09981L33.807 0.020752L31.6087 1.09635C26.8944 3.40294 21.3521 3.26827 16.7614 0.742423V13.698C16.7614 23.8342 22.4415 33.0916 31.5893 37.8636L33.8105 39.0221L36.0335 37.8636C45.1813 33.095 50.8614 23.8342 50.8614 13.698V0.742423C46.2707 3.26827 40.7283 3.40812 36.014 1.09981Z" fill="#FFCB27"/>
</g>
<path d="M42.4216 11.7071C42.8983 12.1715 42.8983 12.926 42.4216 13.3904L32.2373 23.3505C31.999 23.5818 31.69 23.6992 31.3757 23.6992C31.0614 23.6992 30.7524 23.5818 30.5141 23.3505L25.8527 18.7908C25.376 18.3264 25.376 17.5719 25.8527 17.1075C26.3277 16.6413 27.0993 16.6413 27.5742 17.1075L31.3757 20.8246L40.7001 11.7071C41.1751 11.2409 41.9467 11.2409 42.4216 11.7071ZM33.807 5.34668L33.7876 5.35704C30.062 7.18021 25.7662 7.8639 21.6328 7.29588V13.6977C21.6328 22.0435 26.2994 29.6711 33.8105 33.6213C41.3234 29.6711 45.99 22.0435 45.99 13.6977V7.29588C41.8513 7.86908 37.5608 7.18021 33.8405 5.36049L33.807 5.34668Z" fill="#FFCB27"/>
</svg>

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -0,0 +1,30 @@
<svg width="55" height="70" viewBox="0 0 55 70" fill="none" xmlns="http://www.w3.org/2000/svg">
<mask id="mask0_1365_1853" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="25" y="0" width="5" height="7">
<path d="M25.8889 0.258057H29.3117V6.70985H25.8889V0.258057Z" fill="white"/>
</mask>
<g mask="url(#mask0_1365_1853)">
<path d="M27.5006 6.61921C28.2999 6.61921 28.9476 5.97151 28.9476 5.17079V1.70943C28.9476 0.908713 28.2999 0.259521 27.5006 0.259521C26.7014 0.259521 26.0537 0.908713 26.0537 1.70943V5.17079C26.0537 5.97151 26.7014 6.61921 27.5006 6.61921Z" fill="#75CFF5"/>
</g>
<path d="M11.0958 14.8049C11.6603 14.2389 11.6603 13.3223 11.0958 12.7563L9.05459 10.7137C8.49008 10.1492 7.57349 10.1492 7.00897 10.7137C6.44297 11.2797 6.44297 12.1963 7.00897 12.7623L9.04865 14.8049C9.61465 15.3709 10.5298 15.3709 11.0958 14.8049Z" fill="#75CFF5"/>
<mask id="mask1_1365_1853" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="29" width="7" height="4">
<path d="M0 29.5278H6.49339V32.9506H0V29.5278Z" fill="white"/>
</mask>
<g mask="url(#mask1_1365_1853)">
<path d="M4.92756 29.7761H1.46918C0.669943 29.7761 0.020752 30.4238 0.020752 31.2245C0.020752 32.0253 0.669943 32.673 1.46918 32.673H4.92756C6.84097 32.673 6.84394 29.7761 4.92756 29.7761Z" fill="#75CFF5"/>
</g>
<mask id="mask2_1365_1853" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="48" y="29" width="7" height="4">
<path d="M48.3269 29.5278H55.0001V32.9506H48.3269V29.5278Z" fill="white"/>
</mask>
<g mask="url(#mask2_1365_1853)">
<path d="M53.5324 29.7747H50.0725C49.2733 29.7747 48.6256 30.4224 48.6256 31.2231C48.6256 32.0238 49.2733 32.6715 50.0725 32.6715H53.5324C54.3317 32.6715 54.9794 32.0238 54.9794 31.2231C54.9794 30.4224 54.3317 29.7747 53.5324 29.7747Z" fill="#75CFF5"/>
</g>
<path d="M45.9455 10.7137L43.9043 12.7563C43.3398 13.3223 43.3398 14.2389 43.9043 14.8049C44.4689 15.3709 45.3869 15.3724 45.9514 14.8049L47.9911 12.7623C48.5571 12.1963 48.5571 11.2797 47.9911 10.7137C47.4266 10.1492 46.5085 10.1492 45.9455 10.7137Z" fill="#75CFF5"/>
<path d="M35.6223 56.739H19.3792C18.58 56.739 17.9323 57.3867 17.9323 58.1874C17.9323 58.9882 18.58 59.6359 19.3792 59.6359H35.6223C36.4216 59.6359 37.0708 58.9882 37.0708 58.1874C37.0708 57.3867 36.4216 56.739 35.6223 56.739Z" fill="#75CFF5"/>
<mask id="mask3_1365_1853" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="17" y="62" width="21" height="8">
<path d="M17.9025 62.2341H37.298V69.7912H17.9025V62.2341Z" fill="white"/>
</mask>
<g mask="url(#mask3_1365_1853)">
<path d="M37.0663 63.7348C37.0663 64.5311 36.4156 65.1832 35.6194 65.1832H32.9424C32.4937 67.7904 30.2357 69.79 27.4993 69.79C24.7644 69.79 22.5063 67.7904 22.0725 65.1832H19.3792C18.5844 65.1832 17.9323 64.5311 17.9323 63.7348C17.9323 62.9237 18.5844 62.2864 19.3792 62.2864C19.8442 62.2864 35.7649 62.2864 35.6194 62.2864C36.4156 62.2864 37.0663 62.9237 37.0663 63.7348Z" fill="#75CFF5"/>
</g>
<path d="M28.5555 8.38538C11.6246 7.5401 1.90007 26.9222 11.9989 39.9774C14.9359 43.773 17.0068 48.2638 17.9753 52.9433C18.1061 53.6089 18.7003 54.1006 19.3941 54.1006H26.0434V28.5415H20.7845C19.9853 28.5415 19.3376 27.8938 19.3376 27.0931C19.3376 26.2924 19.9853 25.6446 20.7845 25.6446H34.2363C35.0355 25.6446 35.6847 26.2924 35.6847 27.0931C35.6847 27.8938 35.0355 28.5415 34.2363 28.5415H28.9373V54.1006H35.6342C36.3146 54.1006 36.9073 53.6237 37.0529 52.9433C38.0364 48.2787 40.1058 43.8606 43.1601 39.7902C52.6261 27.2951 44.1465 9.18907 28.5555 8.38538Z" fill="#75CFF5"/>
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

Some files were not shown because too many files have changed in this diff Show More