pembelian voucher fix

dev
Aji Kamaludin 1 year ago
parent b94eaf966b
commit ad8d8abe08
No known key found for this signature in database
GPG Key ID: 19058F67F0083AD3

@ -2,25 +2,25 @@
## Note
Kerjakan dulu semua yang terkait penjualan normal, deposit normal dan bonus poin transaksi dan downline
baru setelah itu yang berhubungan dengan mitrawbb dan hutang
setelah itu baru penukaran voucher
[x] Kerjakan dulu semua yang terkait penjualan normal, deposit normal dan bonus poin transaksi dan downline
[ ] baru setelah itu yang berhubungan dengan mitrawbb dan hutang
[ ] setelah itu baru penukaran voucher
## Front
- [ ] transaksi pembelian
- [ ] transaksi pembelian + dapat poin downline
- [ ] [BUG] pembelian voucher lebih dari 1 mendapat kode yang sama
- [x] transaksi pembelian
- [x] transaksi pembelian + dapat poin downline
- [x] [BUG] pembelian voucher lebih dari 1 mendapat kode yang sama
- [ ] penuakaran voucher
- [ ] tambah metode topup deposit dengan setor tunai kantor wbb
- [x] tambah metode topup deposit dengan setor tunai kantor wbb
- [x] mengubah metode pembayaran deposit dengan daftar bank seperti deposit dan tampil logo bank
- [x] tampilan keranjang jadi lebih seperti tokped dengan metode pembayaran deposit atau hutang jika tersedia
- [x] tampilan transaksi deposit, hutang (mitra wbb), dan poin jadi satu tampilan
- [x] tambah screen untuk daftar setor tunai kantor wbb
- [x] halaman untuk menampilkan level customer
- [ ] expired time 2jam di deposit manual maupun kantor wbb
- [ ] ubah username dan password di detail transaksi dengan kode voucher saja
- [ ] format nomor transaksi di deposit , transaksi dan poin
- [x] expired time 2jam di deposit manual maupun kantor wbb
- [x] ubah username dan password di detail transaksi dengan kode voucher saja
- [x] format nomor transaksi di deposit , transaksi dan poin
# Back Office

@ -121,7 +121,15 @@ class SettingController extends Controller
Setting::where('key', $key)->update(['value' => $value]);
}
$allowedLevel = collect($request->AFFILATE_ALLOWED_LEVELS)->toArray();
$allowedLevel = collect($request->AFFILATE_ALLOWED_LEVELS)
->map(function ($item) {
return [
'id' => $item['id'],
'key' => $item['key'],
'name' => $item['name'],
];
})
->toArray();
Setting::where('key', 'AFFILATE_ALLOWED_LEVELS')->update([
'value' => json_encode($allowedLevel)

@ -109,7 +109,7 @@ class VoucherController extends Controller
public function edit(Voucher $voucher)
{
return inertia('Voucher/Form', [
'voucher' => $voucher->load(['prices.level']),
'voucher' => $voucher->load(['locationProfile']),
'levels' => CustomerLevel::all(),
]);
}

@ -10,7 +10,8 @@ class LocationProfileController extends Controller
{
public function index(Request $request)
{
$query = LocationProfile::with(['location'])->orderBy('updated_at', 'desc');
$query = LocationProfile::with(['location'])
->orderBy('updated_at', 'desc');
if ($request->q != '') {
$query->where('name', 'like', "%$request->q%")

@ -7,6 +7,7 @@ use App\Mail\CustomerVerification;
use App\Models\Customer;
use App\Models\Setting;
use App\Services\AsyncService;
use App\Services\GeneralService;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
@ -133,7 +134,7 @@ class AuthController extends Controller
session()->put('referral_code', $request->referral_code);
$code = $request->referral_code;
} else {
$code = session('referral_code', ' ');
$code = session('referral_code', '');
}
return inertia('Auth/Register', [
@ -209,17 +210,20 @@ class AuthController extends Controller
session()->forget('referral_code');
return;
}
$refferal->customerRefferals()->create([
'refferal_id' => $customer->id,
'customer_code' => $refferal->referral_code,
]);
$affilateEnabled = Setting::getByKey('AFFILATE_ENABLED');
if ($affilateEnabled == 1) {
$bonuspoin = Setting::getByKey('AFFILATE_poin_AMOUNT');
$isAllowAffilate = GeneralService::isAllowAffilate($refferal->level->key);
if ($affilateEnabled == 1 && $isAllowAffilate) {
$bonuspoin = Setting::getByKey('AFFILATE_POIN_AMOUNT');
$poin = $refferal->poins()->create([
'debit' => $bonuspoin,
'description' => 'Bonus Refferal #' . Str::random(5),
'description' => GeneralService::generateBonusPoinCode(),
'narration' => 'Bonus Poin Affilate (Register)'
]);
$poin->update_customer_balance();

@ -7,6 +7,7 @@ use App\Models\Customer;
use App\Models\DepositHistory;
use App\Models\PoinReward;
use App\Models\Sale;
use App\Models\Setting;
use App\Models\Voucher;
use App\Services\GeneralService;
use Illuminate\Http\Request;
@ -100,7 +101,6 @@ class CartController extends Controller
],
]);
DB::beginTransaction();
$customer = $request->user('customer');
$carts = $customer->carts->load(['voucher.locationProfile.location']);
@ -126,6 +126,7 @@ class CartController extends Controller
return $item->quantity * $item->voucher->validate_price;
});
DB::beginTransaction();
// create sale
$sale = $customer->sales()->create([
'date_time' => now(),
@ -148,50 +149,17 @@ class CartController extends Controller
]);
$voucher->update(['is_sold' => Voucher::SOLD]);
$voucher->check_stock_notification();
$voucher->create_bonus_poin($customer);
}
}
// create sale notification
$sale->create_payment();
$sale->create_notification();
// payed with deposit
if ($sale->payed_with == Sale::PAYED_WITH_DEPOSIT) {
$deposit = $customer->deposites()->create([
'credit' => $total,
'description' => $sale->code,
'related_type' => Sale::class,
'related_id' => $sale->id,
'is_valid' => DepositHistory::STATUS_VALID,
]);
$deposit->update_customer_balance();
}
// payed with paylater
if ($sale->payed_with == Sale::PAYED_WITH_PAYLATER) {
$paylater = $customer->paylaterHistories()->create([
'debit' => $total,
'description' => $sale->code,
]);
$paylater->update_customer_paylater();
}
// bonus poin by reward
$bonus = PoinReward::where('customer_level_id', $customer->customer_level_id)
->where('amount_buy', '<=', $total)
->orderBy('bonus_poin', 'desc')
->first();
if ($bonus != null) {
$poin = $customer->poins()->create([
'debit' => $bonus->bonus_poin,
'description' => 'Bonus Pembelian #' . $sale->code,
]);
$poin->update_customer_balance();
}
// TODO : bonus poin by downline
$sale->create_poin_reward();
$sale->create_poin_affilate();
// remove carts
$customer->carts()->delete();

@ -12,6 +12,7 @@ class PoinController extends Controller
public function index(Request $request)
{
$poins = PoinHistory::where('customer_id', auth()->id())
->orderBy('description', 'desc')
->orderBy('updated_at', 'desc');
$start_date = now()->startOfMonth();

@ -15,7 +15,7 @@ class PoinExchangeController extends Controller
public function index(Request $request)
{
$locations = Location::get();
$vouchers = Voucher::with(['locationProfile'])
$vouchers = Voucher::with(['locationProfile.location'])
->whereHas('locationProfile', function ($q) {
$q->where('price_poin', '!=', 0)
->where('price_poin', '!=', null);
@ -58,7 +58,7 @@ class PoinExchangeController extends Controller
'payed_with' => Sale::PAYED_WITH_POIN,
]);
$voucher = $voucher->shuffle_unsold();
$voucher = $voucher->shuffle_unsold(1);
$sale->items()->create([
'entity_type' => $voucher::class,
'entity_id' => $voucher->id,

@ -0,0 +1,31 @@
<?php
namespace App\Jobs;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
class ExpiredCustomerPoinJob implements ShouldQueue
{
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
/**
* Create a new job instance.
*/
public function __construct()
{
//
}
/**
* Execute the job.
*/
public function handle(): void
{
// TODO: select from customer that expired than make 0 zero the poin
}
}

@ -11,6 +11,7 @@ class PoinHistory extends Model
'debit',
'credit',
'description',
'narration',
'customer_id',
'related_type',
'related_id',
@ -52,9 +53,18 @@ class PoinHistory extends Model
return $this->belongsTo(Customer::class);
}
public function update_customer_balance()
public function update_customer_balance($updateExpired = false)
{
$customer = Customer::find($this->customer_id);
$customer->update(['poin_balance' => $customer->poin_balance + $this->debit - $this->credit]);
$maxExpired = Setting::getByKey('MAX_POINT_EXPIRED');
if ($customer->poin_expired_at == null || $updateExpired) {
$customer->poin_expired_at = now()->addDays($maxExpired);
}
$customer->update([
'poin_balance' => $customer->poin_balance + $this->debit - $this->credit,
'poin_expired_at' => $customer->poin_expired_at
]);
}
}

@ -73,7 +73,7 @@ class Sale extends Model
public function displayAmount(): Attribute
{
return Attribute::make(get: function () {
return 'Rp' . number_format($this->amount, is_float($this->amount) ? 2 : 0, ',', '.');
return 'Rp ' . number_format($this->amount, is_float($this->amount) ? 2 : 0, ',', '.');
});
}
@ -103,4 +103,67 @@ class Sale extends Model
'description' => 'Transaksi pembelian anda ' . $this->code . ' sebesar ' . $this->display_amount . ' berhasil',
]);
}
public function create_payment()
{
// payed with deposit
if ($this->payed_with == Sale::PAYED_WITH_DEPOSIT) {
$deposit = $this->customer->deposites()->create([
'credit' => $this->amount,
'description' => $this->code,
'related_type' => self::class,
'related_id' => $this->id,
'is_valid' => DepositHistory::STATUS_VALID,
]);
$deposit->update_customer_balance();
}
// payed with paylater
if ($this->payed_with == Sale::PAYED_WITH_PAYLATER) {
$paylater = $this->customer->paylaterHistories()->create([
'debit' => $this->amount,
'description' => $this->code,
]);
$paylater->update_customer_paylater();
}
}
public function create_poin_reward()
{
$bonus = PoinReward::where('customer_level_id', $this->customer->customer_level_id)
->where('amount_buy', '<=', $this->amount)
->orderBy('bonus_poin', 'desc')
->first();
if ($bonus != null) {
$poin = $this->customer->poins()->create([
'debit' => $bonus->bonus_poin,
'description' => GeneralService::generateBonusPoinCode(),
'narration' => 'Bonus Poin Reward'
]);
$poin->update_customer_balance();
}
}
public function create_poin_affilate()
{
$affilateEnabled = Setting::getByKey('AFFILATE_ENABLED');
$isAllowAffilate = GeneralService::isAllowAffilate($this->customer->level->key);
if ($affilateEnabled == 1 && $isAllowAffilate) {
$bonus = Setting::getByKey('AFFILATE_DOWNLINE_POIN_AMOUNT');
if ($bonus > 0) {
$code = CustomerRefferal::where('refferal_id', $this->customer_id)->value('customer_code');
$customer = Customer::where('referral_code', $code)->first();
$poin = $customer->poins()->create([
'debit' => $bonus,
'description' => GeneralService::generateBonusPoinCode(),
'narration' => 'Bonus Poin Affilate (Downline)'
]);
$poin->update_customer_balance();
}
}
}
}

@ -2,6 +2,7 @@
namespace App\Models;
use App\Services\GeneralService;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Support\Facades\Auth;
@ -26,6 +27,8 @@ class Voucher extends Model
protected $appends = [
'validate_price',
'validate_display_price',
'validate_price_poin',
'validate_bonus_poin',
'discount',
'status',
'created_at_formated'
@ -81,6 +84,38 @@ class Voucher extends Model
});
}
public function validateBonusPoin(): Attribute
{
return Attribute::make(get: function () {
if ($this->locationProfile->prices->count() > 0) {
$price = $this->locationProfile->prices;
if (auth()->guard('customer')->check()) {
$customer = self::getInstance()['customer'];
return $price->where('customer_level_id', $customer->customer_level_id)
->value('bonus_poin');
}
return $price->max('bonus_poin');
}
return $this->locationProfile->bonus_poin;
});
}
public function validatePricePoin(): Attribute
{
return Attribute::make(get: function () {
if ($this->locationProfile->prices->count() > 0) {
$price = $this->locationProfile->prices;
if (auth()->guard('customer')->check()) {
$customer = self::getInstance()['customer'];
return $price->where('customer_level_id', $customer->customer_level_id)
->value('price_poin');
}
return $price->max('price_poin');
}
return $this->locationProfile->price_poin;
});
}
public function discount(): Attribute
{
return Attribute::make(get: function () {
@ -190,4 +225,20 @@ class Voucher extends Model
'sum_voucher_unsold' => $sum_voucher_unsold,
];
}
public function create_bonus_poin(Customer $customer)
{
$bonus = $this->validate_bonus_poin;
if ($bonus > 0) {
$customer = Customer::find($customer->id);
$poin = $customer->poins()->create([
'debit' => $bonus,
'description' => GeneralService::generateBonusPoinCode(),
'narration' => 'Bonus Poin Pembelian Voucher'
]);
$poin->update_customer_balance();
}
}
}

@ -26,17 +26,17 @@ class AppServiceProvider extends ServiceProvider
public function boot()
{
// for optimize in development log every query
if (app()->isProduction() == false) {
DB::listen(function ($query) {
Log::info(
$query->sql,
[
'bindings' => $query->bindings,
'time' => $query->time,
'connectionName' => $query->connectionName,
]
);
});
}
// if (app()->isProduction() == false) {
// DB::listen(function ($query) {
// Log::info(
// $query->sql,
// [
// 'bindings' => $query->bindings,
// 'time' => $query->time,
// 'connectionName' => $query->connectionName,
// ]
// );
// });
// }
}
}

@ -5,6 +5,7 @@ namespace App\Services;
use App\Models\Customer;
use App\Models\DepositHistory;
use App\Models\DepositLocation;
use App\Models\PoinHistory;
use App\Models\Sale;
use App\Models\Setting;
use Illuminate\Support\Carbon;
@ -164,6 +165,13 @@ class GeneralService
return 'Invoice #VCR' . now()->format('dmy') . GeneralService::formatNumberCode($code);
}
public static function generateBonusPoinCode()
{
$code = PoinHistory::whereDate('created_at', now())->count() + 1;
return 'Invoice #BPN' . now()->format('dmy') . GeneralService::formatNumberCode($code);
}
public static function formatNumberCode($number)
{
if ($number < 10) {
@ -177,4 +185,16 @@ class GeneralService
}
return $number;
}
public static function isAllowAffilate($key)
{
$isAllow = false;
$levels = json_decode(Setting::getByKey('AFFILATE_ALLOWED_LEVELS'));
foreach($levels as $level) {
if ($key == $level->key) {
$isAllow = true;
}
}
return $isAllow;
}
}

@ -16,7 +16,8 @@ return new class extends Migration
$table->decimal('debit', 20, 2)->default(0);
$table->decimal('credit', 20, 2)->default(0);
$table->text('description')->nullable();
$table->string('description')->nullable();
$table->text('narration')->nullable();
$table->ulid('customer_id')->nullable();
$table->string('related_type')->nullable();
$table->string('related_id')->nullable();

@ -121,7 +121,7 @@ class DummySeeder extends Seeder
'display_price' => $disply_price,
'discount' => $discount,
'price_poin' => $price,
'bonus_poin' => 0,
'bonus_poin' => $count == 1 ? 10 : 0,
]);
if ($count == 3) {
@ -133,6 +133,7 @@ class DummySeeder extends Seeder
foreach (CustomerLevel::LEVELS as $index => $level) {
if ($index != 0) {
$disc += 5;
$bp += 5;
}
$p = $dp - ($dp * ($disc / 100));
@ -175,10 +176,10 @@ class DummySeeder extends Seeder
{
DepositLocation::create([
'name' => 'Location 1',
'address' => 'Address Lengkap Alamat',
'address' => 'Gedung Sebaguna Kota Alele, Jl. Address Lengkap No.20 Kota Kabupaten',
'phone' => '83840745543',
'gmap_url' => 'https://goo.gl/maps/iyJ8nq32pJ2BbfUf6',
'image' => 'sample/banner.jpg',
'image' => 'sample/location.png',
'description' => '<h1>lokasi favoorite</h1>',
'open_hour' => '00:00',
'close_hour' => '23:59',
@ -187,10 +188,10 @@ class DummySeeder extends Seeder
DepositLocation::create([
'name' => 'Location 2',
'address' => 'Address Lengkap Alamat',
'address' => 'Jl. Address Lengkap No.20 Kota Kabupaten',
'phone' => '83840745543',
'gmap_url' => 'https://goo.gl/maps/iyJ8nq32pJ2BbfUf6',
'image' => 'sample/banner.jpg',
'image' => 'sample/location.png',
'description' => '<h1>lokasi favoorite</h1>',
'open_hour' => '14:00',
'close_hour' => '18:59',

Binary file not shown.

Before

Width:  |  Height:  |  Size: 779 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

@ -43,7 +43,10 @@ export default function Index(props) {
<div key={level.id} className="flex flex-col h-40">
<div className="h-36 rounded-lg border p-2 flex flex-row gap-2 items-center shadow-lg">
<div>
<img src={level.logo_url} />
<img
src={level.logo_url}
loading="lazy"
/>
</div>
<div className=" flex-1 flex flex-col">
<div className="text-2xl font-bold">

@ -64,6 +64,7 @@ export const FormUploadCashDeposit = () => {
<div className="font-bold">Bukti Pembayaran</div>
<img
src={`${imageUrl}`}
loading="lazy"
className="w-full h-52 mb-1"
alt="bukti Pembayaran"
/>
@ -97,6 +98,7 @@ export const FormUploadCashDeposit = () => {
<img
src={location.image_url}
alt="image location"
loading="lazy"
className="object-fill h-36 w-32"
/>
</div>
@ -137,6 +139,7 @@ export const FormUploadCashDeposit = () => {
<img
src={location.image_url}
alt="image location"
loading="lazy"
className="object-fill h-36 w-32"
/>
</div>
@ -252,6 +255,7 @@ export const FormUploadCashDeposit = () => {
{isEmpty(data.image_url) == false && (
<img
src={`${data.image_url}`}
loading="lazy"
className="w-full h-52 mb-1"
alt="bukti Pembayaran"
/>

@ -64,6 +64,7 @@ export const FormUploadManual = () => {
<div className="font-bold">Bukti Transfer</div>
<img
src={`${imageUrl}`}
loading="lazy"
className="w-full h-52 mb-1"
alt="bukti transfer"
/>
@ -98,6 +99,7 @@ export const FormUploadManual = () => {
src={account.logo_url}
alt="logo bank"
className="h-10"
loading="lazy"
/>
</div>
<div>
@ -124,6 +126,7 @@ export const FormUploadManual = () => {
src={account.logo_url}
alt="logo bank"
className="h-10"
loading="lazy"
/>
</div>
<div>
@ -231,6 +234,7 @@ export const FormUploadManual = () => {
src={`${data.image_url}`}
className="w-full h-52 mb-1"
alt="bukti transfer"
loading="lazy"
/>
)}
</div>

@ -124,6 +124,7 @@ export default function Topup({ payments }) {
<img
src={payment.logo}
className="h-7 pt-1 object-cover"
loading="lazy"
/>
)}
{+payment.admin_fee !== 0 && (

@ -48,6 +48,7 @@ export default function Index({ locations: { data, next_page_url } }) {
<img
src={location.image_url}
className="object-fill h-36 w-32"
loading="lazy"
/>
<div className="flex flex-col w-full">
<div className="font-bold">{location.name}</div>

@ -19,6 +19,7 @@ export default function Banner({ banner }) {
<img
src={banner.image_url}
className="object-fill w-full h-32"
loading="lazy"
/>
<div className="mt-4 mb-2 text-2xl font-bold">
{banner.title}

@ -30,6 +30,13 @@ export default function Detail({ poin }) {
</div>
</div>
</div>
<div className="w-full px-5">
<div className="my-5">
<div className="bg-blue-50 text-blue-700 p-3 border rounded-md">
{poin.narration}
</div>
</div>
</div>
</div>
</CustomerLayout>
)

@ -68,7 +68,7 @@ export default function Exhange(props) {
return (
<CustomerLayout>
<Head title="poin" />
<Head title="Poin" />
<div className="flex flex-col min-h-[calc(95dvh)]">
<div className="pt-5 text-2xl px-5 font-bold">Tukar poin</div>
<div className="px-5 text-gray-400 text-sm">

@ -69,7 +69,7 @@ export default function Index(props) {
return (
<CustomerLayout>
<Head title="poin" />
<Head title="Poin" />
<div className="flex flex-col w-full min-h-[calc(90dvh)]">
<HeaderTrx enable="poin" dates={dates} setDates={setDates} />
{_poins.length <= 0 && <EmptyHere />}

@ -64,7 +64,7 @@ export default function VoucherCard({ voucher }) {
onClick={() => setShow(true)}
>
<div className="text-base font-bold">
{voucher.location_profile.name}
{voucher.location_profile.location.name}
</div>
<div className="w-full border border-dashed"></div>
<div className="flex flex-row justify-between items-center">
@ -73,8 +73,7 @@ export default function VoucherCard({ voucher }) {
{voucher.location_profile.display_note}
</div>
<div className="text-xl font-bold">
{formatIDR(voucher.location_profile.price_poin)}{' '}
poin
{formatIDR(voucher.validate_price_poin)} poin
</div>
</div>
<div className="flex flex-col justify-end text-right">
@ -82,7 +81,7 @@ export default function VoucherCard({ voucher }) {
{voucher.location_profile.quota}
</div>
<div className="text-gray-400 ">
{voucher.location_profile.display_expired}
{voucher.location_profile.diplay_expired}
</div>
</div>
</div>

@ -156,6 +156,7 @@ export default function Index({ auth: { user }, flash }) {
src={`${data.image_url}`}
className="w-20 h-20 mb-1 rounded-full"
alt="profile image"
loading="lazy"
/>
}
/>

@ -50,6 +50,7 @@ export default function Index({
src={user.image_url}
alt="profile image"
className="rounded-full object-cover h-14 w-14"
loading="lazy"
/>
) : (
<HiOutlineUserCircle className="text-white h-14 w-14" />

@ -45,6 +45,7 @@ const VerificationForm = () => {
src={`${user.identity_image_url}`}
className="w-full object-fill h-48 mb-1 "
alt="ktp image"
loading="lazy"
/>
}
/>

@ -119,6 +119,7 @@ export default function Authenticated({
src={auth.user.photo_url}
alt="user profile image"
className="h-10 rounded-full border border-gray-100"
loading="lazy"
/>
{auth.user.name}
<HiChevronDown />

@ -99,6 +99,7 @@ export default function Form(props) {
src={data.logo_url}
className="mb-1 h-24 object-cover"
alt="preview"
loading="lazy"
/>
)
}

@ -104,6 +104,7 @@ export default function Account(props) {
src={account.logo_url}
alt="bank logo alt"
className="h-5"
loading="lazy"
/>
</td>
<td className="py-4 px-6 flex justify-end">

@ -74,6 +74,7 @@ export default function Form(props) {
src={data.image_url}
className="mb-1 h-24 w-full object-cover"
alt="preview"
loading="lazy"
/>
)
}

@ -134,6 +134,7 @@ const Profile = () => {
src={data.image_url}
className="mb-1 h-24 w-24 object-cover rounded-full"
alt="preview"
loading="lazy"
/>
)
}
@ -164,6 +165,7 @@ const Identity = () => {
alt="identity"
src={customer?.identity_image_url}
className="w-full object-fill h-96"
loading="lazy"
/>
</div>
)

@ -76,6 +76,7 @@ export default function Form(props) {
src={data.logo_url}
className="mb-1 h-24 object-cover"
alt="preview"
loading="lazy"
/>
)
}

@ -62,6 +62,7 @@ export default function Info(props) {
src={level.logo_url}
className="h-20"
alt="logo alt"
loading="lazy"
/>
</td>
<td className="py-4 px-6">

@ -150,6 +150,7 @@ export default function FormModal(props) {
<img
src={data.image_prove_url}
className="w-full object-fill h-96"
loading="lazy"
/>
</a>
</div>

@ -148,6 +148,7 @@ export default function Form(props) {
src={data.image_url}
className="mb-1 h-24 object-cover "
alt="preview"
loading="lazy"
/>
)
}

@ -93,6 +93,7 @@ export default function General(props) {
src={`${data.MIDTRANS_LOGO_URL}`}
className="w-40 mb-1"
alt="site logo"
loading="lazy"
/>
}
/>

@ -132,6 +132,7 @@ export default function Form(props) {
src={data.photo_url}
className="mb-1 h-24 w-24 object-cover rounded-full"
alt="preview"
loading="lazy"
/>
)
}

@ -131,6 +131,7 @@ export default function User(props) {
<img
src={user.photo_url}
alt="photo profile"
loading="lazy"
className="w-20 h-20 rounded-full"
/>
</td>

@ -77,6 +77,7 @@ export default function Form(props) {
<img
src={customer.identity_image_url}
className="w-full object-fill h-96"
loading="lazy"
/>
</div>

@ -38,7 +38,7 @@ export default function Form(props) {
if (isEmpty(voucher) === false) {
setData({
username: voucher.username,
location_profile_id: voucher.location_id,
location_profile_id: voucher.location_profile_id,
})
}
}, [voucher])

Loading…
Cancel
Save