pint format

dev
Aji Kamaludin 1 year ago
parent 394e4bb40b
commit 53af55bf98
No known key found for this signature in database
GPG Key ID: 19058F67F0083AD3

@ -41,4 +41,4 @@
- [x] ubah filter di mitra list dan customer list menjadi seperti di sale index
- [x] untuk detail mitra nanti akan ada button untuk (transaksi mitra dengan cakupan: pembelian voucher, pembayaran hutang,
topuplimit, penambahan batas bayar, history deposit)
- [ ] tambah floating button untuk notifikasi deposit (angka saja), di dashboard tambahkan list deposit terbaru
- [ ] di dashboard tambahkan list deposit terbaru

@ -55,7 +55,7 @@ class PaylaterController extends Controller
public function show(PaylaterHistory $paylater)
{
return inertia('Paylater/Detail', [
'paylater' => $paylater->load(['customer'])
'paylater' => $paylater->load(['customer']),
]);
}

@ -102,7 +102,7 @@ class DepositController extends Controller
'direct' => $request->direct,
'bank_admin_fee' => Setting::getByKey('ADMINFEE_MANUAL_TRANSFER'),
'cash_admin_fee' => Setting::getByKey('ADMINFEE_CASH_DEPOSIT'),
'back' => $request->back ?? 'transactions.deposit.index'
'back' => $request->back ?? 'transactions.deposit.index',
]);
}

@ -3,10 +3,7 @@
namespace App\Http\Controllers\Customer;
use App\Http\Controllers\Controller;
use App\Models\Account;
use App\Models\Customer;
use App\Models\DepositHistory;
use App\Models\DepositLocation;
use App\Models\PaylaterHistory;
use App\Models\Setting;
use App\Services\GeneralService;
@ -35,7 +32,7 @@ class PaylaterController extends Controller
if (! in_array($deposit->is_valid, [DepositHistory::STATUS_VALID])) {
return redirect()->route('transactions.deposit.show', [
'deposit' => $deposit,
'back' => 'customer.paylater.index'
'back' => 'customer.paylater.index',
]);
}
}
@ -75,7 +72,7 @@ class PaylaterController extends Controller
$repayment = DepositHistory::query()
->where([
['customer_id', '=', $customer->id],
['type', '=', DepositHistory::TYPE_REPAYMENT]
['type', '=', DepositHistory::TYPE_REPAYMENT],
])->where(function ($query) {
$query->where('is_valid', '!=', DepositHistory::STATUS_VALID)
->where('is_valid', '!=', DepositHistory::STATUS_REJECT)
@ -130,7 +127,7 @@ class PaylaterController extends Controller
return redirect()->route('transactions.deposit.show', [
'deposit' => $deposit->id,
'direct' => 'true',
'back' => 'customer.paylater.index'
'back' => 'customer.paylater.index',
]);
}
}

@ -52,7 +52,7 @@ class DepositHistory extends Model
'format_created_at',
'amount',
'image_prove_url',
'admin_fee'
'admin_fee',
];
protected static function booted(): void

@ -17,7 +17,7 @@ class PaylaterCustomer extends Model
];
protected $appends = [
'paylater_description'
'paylater_description',
];
public function customer()
@ -30,10 +30,11 @@ class PaylaterCustomer extends Model
return Attribute::make(get: function () {
if ($this->day_deadline_at != null) {
$deadlineAt = Carbon::parse($this->day_deadline_at)->translatedFormat('d F Y');
return "lunasi pinjaman kamu sebelum jatuh tempo pada {$deadlineAt}";
}
return "yuk gunakan terus saldo yang tersedia";
return 'yuk gunakan terus saldo yang tersedia';
});
}
}

Loading…
Cancel
Save