fix template prepare paylater repayment

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

@ -24,4 +24,12 @@ class PaylaterController extends Controller
'paylater' => $paylater,
]);
}
public function create()
{
}
public function store()
{
}
}

@ -22,6 +22,8 @@ class DepositHistory extends Model
const STATUS_EXPIRED = 6;
const STATUS_HIDDEN = 7;
const TYPE_DEPOSIT = 0;
const TYPE_REPAYMENT = 1;
@ -98,10 +100,10 @@ class DepositHistory extends Model
{
return Attribute::make(get: function () {
if ($this->credit == 0) {
return 'Rp '.number_format($this->debit, is_float($this->debit) ? 2 : 0, ',', '.');
return 'Rp ' . number_format($this->debit, is_float($this->debit) ? 2 : 0, ',', '.');
}
return '-Rp '.number_format($this->credit, is_float($this->credit) ? 2 : 0, ',', '.');
return '-Rp ' . number_format($this->credit, is_float($this->credit) ? 2 : 0, ',', '.');
});
}
@ -142,7 +144,7 @@ class DepositHistory extends Model
}
Notification::create([
'entity_type' => User::class,
'description' => $this->customer->fullname.' melakukan deposit transfer manual sebesar : '.$this->amount.$status,
'description' => $this->customer->fullname . ' melakukan deposit transfer manual sebesar : ' . $this->amount . $status,
]);
}
@ -153,14 +155,14 @@ class DepositHistory extends Model
}
Notification::create([
'entity_type' => User::class,
'description' => $this->customer->fullname.' melakukan deposit manual sebesar : '.$this->amount.$status,
'description' => $this->customer->fullname . ' melakukan deposit manual sebesar : ' . $this->amount . $status,
]);
}
if ($this->payment_channel == Setting::PAYMENT_MIDTRANS) {
Notification::create([
'entity_type' => User::class,
'description' => $this->customer->fullname.' melakukan deposit via midtrans sebesar : '.$this->amount,
'description' => $this->customer->fullname . ' melakukan deposit via midtrans sebesar : ' . $this->amount,
]);
}
}
@ -169,7 +171,7 @@ class DepositHistory extends Model
{
Notification::create([
'entity_id' => $this->customer_id,
'description' => 'Deposit '.$this->description.' sebesar '.$this->amount.' sudah sukses diterima',
'description' => 'Deposit ' . $this->description . ' sebesar ' . $this->amount . ' sudah sukses diterima',
]);
}
}

@ -74,10 +74,10 @@ class PaylaterHistory extends Model
{
return Attribute::make(get: function () {
if ($this->credit == 0) {
return 'Rp'.number_format($this->debit, is_float($this->debit) ? 2 : 0, ',', '.');
return 'Rp' . number_format($this->debit, is_float($this->debit) ? 2 : 0, ',', '.');
}
return '-Rp'.number_format($this->credit, is_float($this->credit) ? 2 : 0, ',', '.');
return '-Rp' . number_format($this->credit, is_float($this->credit) ? 2 : 0, ',', '.');
});
}
}

@ -190,17 +190,15 @@ export default function Authenticated({
</div>
</nav>
<div className="flex-1 flex flex-row">
<div className="flex flex-row">
<div
className={`w-fit ${
showingNavigationDropdown
? 'absolute h-screen z-10'
: 'md:block hidden'
className={`w-fit h-screen md:h-full absolute z-10 ${
!showingNavigationDropdown && 'collapse md:visible'
}`}
>
<SidebarNav user={auth.user} />
</div>
<main className="w-full">
<main className="md:pl-64 w-full">
{page !== '' && (
<Breadcrumb
className="bg-gray-200 py-3 px-5 mb-2 dark:bg-gray-700"

@ -38,7 +38,7 @@ export default function Info(props) {
<Head title="Banner" />
<div>
<div className="mx-auto sm:px-6 lg:px-8 ">
<div className="mx-auto sm:px-6 lg:px-8">
<div className="p-6 overflow-hidden shadow-sm sm:rounded-lg bg-gray-200 dark:bg-gray-800 space-y-4">
<div className="flex justify-between">
{canCreate && (

@ -92,9 +92,9 @@ export default function Customer(props) {
<AuthenticatedLayout page={'Customer'} action={''}>
<Head title="Customer" />
<div className="w-full lg:max-w-[1100px] 2xl:max-w-full">
<div className="mx-auto sm:px-6 lg:px-8">
<div className="w-full grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-2 mb-2">
<div>
<div className="w-full mx-auto sm:px-6 lg:px-8">
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-2 mb-2">
<div className="border rounded-md shadow bg-white px-4 py-2 flex flex-col">
<div className="text-gray-600 text-lg">Basic</div>
<div className="font-bold text-xl pt-2">
@ -122,7 +122,7 @@ export default function Customer(props) {
</div>
</div>
</div>
<div className="p-6 overflow-hidden shadow-sm sm:rounded-lg bg-gray-200 dark:bg-gray-800 space-y-4">
<div className="p-6 shadow-sm sm:rounded-lg bg-gray-200 dark:bg-gray-800 space-y-4">
<div className="flex justify-between">
{canCreate && (
<Link href={route('customer.create')}>
@ -384,6 +384,7 @@ export default function Customer(props) {
</div>
</div>
</div>
<ModalConfirm modalState={confirmModal} onConfirm={onDelete} />
</AuthenticatedLayout>
)

@ -48,10 +48,10 @@ export default function SelectionInput(props) {
setIsSelected(true)
if (type === 'id') {
onItemSelected(item.id)
setSelected(item.name)
} else {
onItemSelected(item)
}
setSelected(item.name)
setIsOpen(false)
}

@ -49,7 +49,7 @@ export default function ModalFilter(props) {
<div className="flex flex-row w-full gap-1 flex-wrap mb-2">
{locations.map((location) => (
<div
className="px-2 py-1 border rounded-md flex flex-row items-center gap-1"
className="px-2 py-1 border border-gray-300 rounded-md bg-gray-100 flex flex-row items-center gap-1"
key={location.id}
>
<div className="">{location.name}</div>

@ -16,7 +16,7 @@
@vite(['resources/js/admin.jsx', "resources/js/Pages/{$page['component']}.jsx"])
@inertiaHead
</head>
<body class="font-sans antialiased" creator="aji.kamaludin2021@gmail.com">
<body class="font-sans antialiased bg-gray-100" creator="aji.kamaludin2021@gmail.com">
@inertia
</body>
</html>

Loading…
Cancel
Save