topup limit dan tenor
parent
9cd209dd33
commit
12f8d77c5e
@ -0,0 +1,101 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Customer;
|
||||
use App\Models\PaylaterHistory;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class PaylaterController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
// TODO show list of paylater repaymeny
|
||||
}
|
||||
|
||||
public function edit()
|
||||
{
|
||||
// TODO show detail repayment and confirmation
|
||||
}
|
||||
|
||||
public function update()
|
||||
{
|
||||
// TODO store update detail of repayment
|
||||
}
|
||||
|
||||
public function limit()
|
||||
{
|
||||
return inertia('Paylater/FormLimit');
|
||||
}
|
||||
|
||||
public function updateLimit(Request $request)
|
||||
{
|
||||
$request->validate([
|
||||
'customer_id' => 'required|exists:customers,id',
|
||||
'limit' => 'required|numeric',
|
||||
'description' => 'required|string',
|
||||
]);
|
||||
|
||||
DB::beginTransaction();
|
||||
$customer = Customer::find($request->customer_id);
|
||||
|
||||
$customer->paylater->update([
|
||||
'limit' => $customer->paylater->limit + $request->limit,
|
||||
]);
|
||||
|
||||
$customer->paylaterHistories()->create([
|
||||
'credit' => $request->limit,
|
||||
'description' => $request->description,
|
||||
'type' => PaylaterHistory::TYPE_UPGRADE,
|
||||
]);
|
||||
|
||||
DB::commit();
|
||||
|
||||
return redirect()->route('mitra.history.paylater_limit', $customer)
|
||||
->with('message', ['type' => 'success', 'message' => 'Item has beed saved']);
|
||||
}
|
||||
|
||||
public function tenor()
|
||||
{
|
||||
return inertia('Paylater/FormTenor');
|
||||
}
|
||||
|
||||
public function updateTenor(Request $request)
|
||||
{
|
||||
$request->validate([
|
||||
'customer_id' => 'required|exists:customers,id',
|
||||
'day_deadline' => 'required|numeric|max:365',
|
||||
'file_agreement' => 'required|file',
|
||||
]);
|
||||
|
||||
$file = $request->file('file_agreement');
|
||||
$file->store('uploads', 'public');
|
||||
$fileAgreement = $file->hashName('uploads');
|
||||
|
||||
DB::beginTransaction();
|
||||
$customer = Customer::find($request->customer_id);
|
||||
|
||||
$customer->paylater->update([
|
||||
'day_deadline' => $request->day_deadline,
|
||||
]);
|
||||
|
||||
$customer->partner()->updateOrCreate([
|
||||
'customer_id' => $customer->id,
|
||||
], [
|
||||
'file_agreement' => $fileAgreement,
|
||||
]);
|
||||
|
||||
$customer->paylaterTenorHistories()->create([
|
||||
'day_deadline' => $request->day_deadline,
|
||||
'file_agreement' => $fileAgreement,
|
||||
'description' => '',
|
||||
]);
|
||||
|
||||
DB::commit();
|
||||
|
||||
return redirect()->route('mitra.history.paylater_deadline', $customer)
|
||||
->with('message', ['type' => 'success', 'message' => 'Item has beed saved']);
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Casts\Attribute;
|
||||
use Illuminate\Support\Carbon;
|
||||
|
||||
class PaylaterTenorHistory extends Model
|
||||
{
|
||||
protected $fillable = [
|
||||
'customer_id',
|
||||
'day_deadline',
|
||||
'file_agreement',
|
||||
'description',
|
||||
];
|
||||
|
||||
protected $appends = ['format_created_at', 'file_agreement_url'];
|
||||
|
||||
public function customer()
|
||||
{
|
||||
return $this->belongsTo(Customer::class);
|
||||
}
|
||||
|
||||
public function formatCreatedAt(): Attribute
|
||||
{
|
||||
return Attribute::make(get: function () {
|
||||
return Carbon::parse($this->created_at)->translatedFormat('d F Y H:i:s');
|
||||
});
|
||||
}
|
||||
|
||||
public function fileAgreementUrl(): Attribute
|
||||
{
|
||||
return Attribute::make(get: function () {
|
||||
return asset($this->file_agreement);
|
||||
});
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('paylater_tenor_histories', function (Blueprint $table) {
|
||||
$table->ulid('id')->primary();
|
||||
|
||||
$table->ulid('customer_id')->nullable();
|
||||
$table->smallInteger('day_deadline')->nullable();
|
||||
$table->string('file_agreement')->nullable();
|
||||
$table->text('description')->nullable();
|
||||
|
||||
$table->timestamps();
|
||||
$table->softDeletes();
|
||||
$table->ulid('created_by')->nullable();
|
||||
$table->ulid('updated_by')->nullable();
|
||||
$table->ulid('deleted_by')->nullable();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('paylater_tenor_histories');
|
||||
}
|
||||
};
|
@ -0,0 +1,132 @@
|
||||
import React from 'react'
|
||||
import { Link, router } from '@inertiajs/react'
|
||||
import { Head } from '@inertiajs/react'
|
||||
|
||||
import AuthenticatedLayout from '@/Layouts/AuthenticatedLayout'
|
||||
import Pagination from '@/Components/Pagination'
|
||||
import Button from '@/Components/Button'
|
||||
import { HiRefresh } from 'react-icons/hi'
|
||||
import { formatIDR } from '@/utils'
|
||||
|
||||
export default function PaylaterLimitHistory(props) {
|
||||
const {
|
||||
query: { links, data },
|
||||
customer,
|
||||
} = props
|
||||
|
||||
return (
|
||||
<AuthenticatedLayout
|
||||
page={'Mitra WBB'}
|
||||
action={[customer.name, 'Riwayat Topup Limit']}
|
||||
parent={route('mitra.edit', customer)}
|
||||
>
|
||||
<Head title="Riwayat Topup Limit" />
|
||||
|
||||
<div>
|
||||
<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="w-full flex flex-row justify-between">
|
||||
<div>
|
||||
<Link href={route('paylater.update.limit')}>
|
||||
<Button color="primary" size="sm">
|
||||
Tambah
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
<div>
|
||||
<Button
|
||||
onClick={() =>
|
||||
router.visit(
|
||||
route(route().current(), customer)
|
||||
)
|
||||
}
|
||||
>
|
||||
<HiRefresh className="w-5 h-5" />
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="overflow-auto">
|
||||
<div>
|
||||
<table className="w-full text-sm text-left text-gray-500 dark:text-gray-400 mb-4">
|
||||
<thead className="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
|
||||
<tr>
|
||||
<th
|
||||
scope="col"
|
||||
className="py-3 px-6"
|
||||
>
|
||||
Customer
|
||||
</th>
|
||||
<th
|
||||
scope="col"
|
||||
className="py-3 px-6"
|
||||
>
|
||||
Tanggal
|
||||
</th>
|
||||
<th
|
||||
scope="col"
|
||||
className="py-3 px-6"
|
||||
>
|
||||
Limit
|
||||
</th>
|
||||
<th
|
||||
scope="col"
|
||||
className="py-3 px-6"
|
||||
>
|
||||
Keterangan
|
||||
</th>
|
||||
<th
|
||||
scope="col"
|
||||
className="py-3 px-6"
|
||||
>
|
||||
Creator
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{data.map((history) => (
|
||||
<tr
|
||||
className="bg-white border-b dark:bg-gray-800 dark:border-gray-700"
|
||||
key={history.id}
|
||||
>
|
||||
<td
|
||||
scope="row"
|
||||
className="py-4 px-6 font-medium text-gray-900 whitespace-nowrap dark:text-white"
|
||||
>
|
||||
<Link
|
||||
className="hover:underline"
|
||||
href={route(
|
||||
'mitra.edit',
|
||||
customer.id
|
||||
)}
|
||||
>
|
||||
{customer.name}
|
||||
</Link>
|
||||
</td>
|
||||
<td className="py-4 px-6">
|
||||
{history.format_created_at}
|
||||
</td>
|
||||
<td className="py-4 px-6">
|
||||
Rp.{' '}
|
||||
{formatIDR(history.credit)}
|
||||
</td>
|
||||
<td className="py-4 px-6">
|
||||
{history.description}
|
||||
</td>
|
||||
<td className="py-4 px-6">
|
||||
{history.creator.name}
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div className="w-full flex items-center justify-center">
|
||||
<Pagination links={links} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</AuthenticatedLayout>
|
||||
)
|
||||
}
|
@ -0,0 +1,139 @@
|
||||
import React from 'react'
|
||||
import { Link, router } from '@inertiajs/react'
|
||||
import { Head } from '@inertiajs/react'
|
||||
|
||||
import AuthenticatedLayout from '@/Layouts/AuthenticatedLayout'
|
||||
import Pagination from '@/Components/Pagination'
|
||||
import Button from '@/Components/Button'
|
||||
import { HiRefresh } from 'react-icons/hi'
|
||||
|
||||
export default function PaylaterTenorHistory(props) {
|
||||
const {
|
||||
query: { links, data },
|
||||
customer,
|
||||
} = props
|
||||
|
||||
return (
|
||||
<AuthenticatedLayout
|
||||
page={'Mitra WBB'}
|
||||
action={[customer.name, 'Riwayat Penambahan Tenor']}
|
||||
parent={route('mitra.edit', customer)}
|
||||
>
|
||||
<Head title="Riwayat Penambahan Tenor" />
|
||||
|
||||
<div>
|
||||
<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="w-full flex flex-row justify-between">
|
||||
<div>
|
||||
<Link href={route('paylater.update.tenor')}>
|
||||
<Button color="primary" size="sm">
|
||||
Tambah
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
<div>
|
||||
<Button
|
||||
onClick={() =>
|
||||
router.visit(
|
||||
route(route().current(), customer)
|
||||
)
|
||||
}
|
||||
>
|
||||
<HiRefresh className="w-5 h-5" />
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="overflow-auto">
|
||||
<div>
|
||||
<table className="w-full text-sm text-left text-gray-500 dark:text-gray-400 mb-4">
|
||||
<thead className="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
|
||||
<tr>
|
||||
<th
|
||||
scope="col"
|
||||
className="py-3 px-6"
|
||||
>
|
||||
Customer
|
||||
</th>
|
||||
<th
|
||||
scope="col"
|
||||
className="py-3 px-6"
|
||||
>
|
||||
Tanggal
|
||||
</th>
|
||||
<th
|
||||
scope="col"
|
||||
className="py-3 px-6"
|
||||
>
|
||||
Tenor
|
||||
</th>
|
||||
<th
|
||||
scope="col"
|
||||
className="py-3 px-6"
|
||||
>
|
||||
Surat Perjanjian
|
||||
</th>
|
||||
<th
|
||||
scope="col"
|
||||
className="py-3 px-6"
|
||||
>
|
||||
Creator
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{data.map((history) => (
|
||||
<tr
|
||||
className="bg-white border-b dark:bg-gray-800 dark:border-gray-700"
|
||||
key={history.id}
|
||||
>
|
||||
<td
|
||||
scope="row"
|
||||
className="py-4 px-6 font-medium text-gray-900 whitespace-nowrap dark:text-white"
|
||||
>
|
||||
<Link
|
||||
className="hover:underline"
|
||||
href={route(
|
||||
'mitra.edit',
|
||||
customer.id
|
||||
)}
|
||||
>
|
||||
{customer.name}
|
||||
</Link>
|
||||
</td>
|
||||
<td className="py-4 px-6">
|
||||
{history.format_created_at}
|
||||
</td>
|
||||
<td className="py-4 px-6">
|
||||
{history.day_deadline}
|
||||
</td>
|
||||
<td className="py-4 px-6">
|
||||
<a
|
||||
href={
|
||||
history.file_agreement_url
|
||||
}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="underline"
|
||||
>
|
||||
File Uploaded
|
||||
</a>
|
||||
</td>
|
||||
<td className="py-4 px-6">
|
||||
{history.creator.name}
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div className="w-full flex items-center justify-center">
|
||||
<Pagination links={links} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</AuthenticatedLayout>
|
||||
)
|
||||
}
|
@ -0,0 +1,141 @@
|
||||
import React from 'react'
|
||||
import { Link, router } from '@inertiajs/react'
|
||||
import { Head } from '@inertiajs/react'
|
||||
import { HiEye } from 'react-icons/hi2'
|
||||
|
||||
import AuthenticatedLayout from '@/Layouts/AuthenticatedLayout'
|
||||
import Pagination from '@/Components/Pagination'
|
||||
import { formatIDR } from '@/utils'
|
||||
import Button from '@/Components/Button'
|
||||
import { HiOutlineReply, HiRefresh } from 'react-icons/hi'
|
||||
|
||||
export default function SaleHistory(props) {
|
||||
const {
|
||||
query: { links, data },
|
||||
customer,
|
||||
} = props
|
||||
|
||||
return (
|
||||
<AuthenticatedLayout
|
||||
page={'Mitra WBB'}
|
||||
action={[customer.name, 'Riwayat Pembelian']}
|
||||
parent={route('mitra.edit', customer)}
|
||||
>
|
||||
<Head title="Riwayat Pembelian" />
|
||||
|
||||
<div>
|
||||
<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="w-full flex flex-row justify-end">
|
||||
<Button
|
||||
onClick={() =>
|
||||
router.visit(
|
||||
route(route().current(), customer)
|
||||
)
|
||||
}
|
||||
>
|
||||
<HiRefresh className="w-5 h-5" />
|
||||
</Button>
|
||||
</div>
|
||||
<div className="overflow-auto">
|
||||
<div>
|
||||
<table className="w-full text-sm text-left text-gray-500 dark:text-gray-400 mb-4">
|
||||
<thead className="text-xs text-gray-700 uppercase bg-gray-50 dark:bg-gray-700 dark:text-gray-400">
|
||||
<tr>
|
||||
<th
|
||||
scope="col"
|
||||
className="py-3 px-6"
|
||||
>
|
||||
#
|
||||
</th>
|
||||
<th
|
||||
scope="col"
|
||||
className="py-3 px-6"
|
||||
>
|
||||
Customer
|
||||
</th>
|
||||
<th
|
||||
scope="col"
|
||||
className="py-3 px-6"
|
||||
>
|
||||
Tanggal
|
||||
</th>
|
||||
<th
|
||||
scope="col"
|
||||
className="py-3 px-6"
|
||||
>
|
||||
Pembayaran
|
||||
</th>
|
||||
<th
|
||||
scope="col"
|
||||
className="py-3 px-6"
|
||||
>
|
||||
Total
|
||||
</th>
|
||||
<th
|
||||
scope="col"
|
||||
className="py-3 px-6"
|
||||
/>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{data.map((sale) => (
|
||||
<tr
|
||||
className="bg-white border-b dark:bg-gray-800 dark:border-gray-700"
|
||||
key={sale.id}
|
||||
>
|
||||
<td
|
||||
scope="row"
|
||||
className="py-4 px-6 font-medium text-gray-900 whitespace-nowrap dark:text-white"
|
||||
>
|
||||
{sale.code}
|
||||
</td>
|
||||
<td className="py-4 px-6">
|
||||
<Link
|
||||
className="hover:underline"
|
||||
href={route(
|
||||
'mitra.edit',
|
||||
customer.id
|
||||
)}
|
||||
>
|
||||
{customer.name}
|
||||
</Link>
|
||||
</td>
|
||||
<td className="py-4 px-6">
|
||||
{sale.format_created_at}
|
||||
</td>
|
||||
<td className="py-4 px-6">
|
||||
{sale.payment_with}
|
||||
</td>
|
||||
<td className="py-4 px-3">
|
||||
{`Rp ${formatIDR(
|
||||
sale.amount
|
||||
)}`}
|
||||
</td>
|
||||
<td className="py-4 px-6 flex justify-center">
|
||||
<Link
|
||||
href={route(
|
||||
'sale.show',
|
||||
sale
|
||||
)}
|
||||
className="flex space-x-1 items-center hover:underline"
|
||||
>
|
||||
<HiEye />
|
||||
<div>Lihat</div>
|
||||
</Link>
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div className="w-full flex items-center justify-center">
|
||||
<Pagination links={links} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</AuthenticatedLayout>
|
||||
)
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
import React from 'react'
|
||||
|
||||
import AuthenticatedLayout from '@/Layouts/AuthenticatedLayout'
|
||||
import FormInput from '@/Components/FormInput'
|
||||
import FormFile from '@/Components/FormFile'
|
||||
import Button from '@/Components/Button'
|
||||
import CustomerSelectionInput from '../Customer/SelectionInput'
|
||||
import { Head, useForm } from '@inertiajs/react'
|
||||
import { MUST_VERIFIED } from '@/constant'
|
||||
import FormInputNumeric from '@/Components/FormInputNumeric'
|
||||
|
||||
export default function FormLimit(props) {
|
||||
const { data, setData, post, processing, errors } = useForm({
|
||||
customer_id: null,
|
||||
limit: '',
|
||||
description: null,
|
||||
})
|
||||
|
||||
const handleOnChange = (event) => {
|
||||
setData(
|
||||
event.target.name,
|
||||
event.target.type === 'checkbox'
|
||||
? event.target.checked
|
||||
? 1
|
||||
: 0
|
||||
: event.target.value
|
||||
)
|
||||
}
|
||||
const handleSubmit = () => {
|
||||
post(route('paylater.update.limit'))
|
||||
}
|
||||
|
||||
return (
|
||||
<AuthenticatedLayout page={'Tambah Limit'} action={'Form'}>
|
||||
<Head title="Tambah Limit" />
|
||||
|
||||
<div>
|
||||
<div className="mx-auto sm:px-6 lg:px-8">
|
||||
<div className="overflow-hidden p-4 shadow-sm sm:rounded-lg bg-white dark:bg-gray-800 flex flex-col ">
|
||||
<div className="text-xl font-bold mb-4">
|
||||
Tambah Limit
|
||||
</div>
|
||||
<CustomerSelectionInput
|
||||
label="Customer"
|
||||
itemSelected={data.customer_id}
|
||||
onItemSelected={(id) => setData('customer_id', id)}
|
||||
placeholder="pilih customer"
|
||||
filter={{ levels: MUST_VERIFIED }}
|
||||
/>
|
||||
<div className="mt-2">
|
||||
<FormInputNumeric
|
||||
type="number"
|
||||
name="limit"
|
||||
value={data.limit}
|
||||
onChange={handleOnChange}
|
||||
label="Limit Hutang"
|
||||
error={errors.limit}
|
||||
/>
|
||||
</div>
|
||||
<FormInput
|
||||
name="description"
|
||||
value={data.description}
|
||||
onChange={handleOnChange}
|
||||
label="Keterangan"
|
||||
error={errors.description}
|
||||
/>
|
||||
<div className="mt-8">
|
||||
<Button
|
||||
onClick={handleSubmit}
|
||||
processing={processing}
|
||||
>
|
||||
Simpan
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</AuthenticatedLayout>
|
||||
)
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
import React from 'react'
|
||||
|
||||
import AuthenticatedLayout from '@/Layouts/AuthenticatedLayout'
|
||||
import FormInput from '@/Components/FormInput'
|
||||
import FormFile from '@/Components/FormFile'
|
||||
import Button from '@/Components/Button'
|
||||
import CustomerSelectionInput from '../Customer/SelectionInput'
|
||||
import { Head, useForm } from '@inertiajs/react'
|
||||
import { MUST_VERIFIED } from '@/constant'
|
||||
|
||||
export default function FormTenor(props) {
|
||||
const { data, setData, post, processing, errors } = useForm({
|
||||
customer_id: null,
|
||||
day_deadline: '',
|
||||
file_agreement: null,
|
||||
})
|
||||
|
||||
const handleOnChange = (event) => {
|
||||
setData(
|
||||
event.target.name,
|
||||
event.target.type === 'checkbox'
|
||||
? event.target.checked
|
||||
? 1
|
||||
: 0
|
||||
: event.target.value
|
||||
)
|
||||
}
|
||||
const handleSubmit = () => {
|
||||
post(route('paylater.update.tenor'))
|
||||
}
|
||||
|
||||
return (
|
||||
<AuthenticatedLayout page={'Tambah Tenor'} action={'Form'}>
|
||||
<Head title="Tambah Tenor" />
|
||||
|
||||
<div>
|
||||
<div className="mx-auto sm:px-6 lg:px-8">
|
||||
<div className="overflow-hidden p-4 shadow-sm sm:rounded-lg bg-white dark:bg-gray-800 flex flex-col ">
|
||||
<div className="text-xl font-bold mb-4">
|
||||
Tambah Tenor
|
||||
</div>
|
||||
<CustomerSelectionInput
|
||||
label="Customer"
|
||||
itemSelected={data.customer_id}
|
||||
onItemSelected={(id) => setData('customer_id', id)}
|
||||
placeholder="pilih customer"
|
||||
filter={{ levels: MUST_VERIFIED }}
|
||||
/>
|
||||
<div className="mt-2">
|
||||
<FormInput
|
||||
type="number"
|
||||
name="day_deadline"
|
||||
value={data.day_deadline}
|
||||
onChange={handleOnChange}
|
||||
label="Tenor (hari)"
|
||||
error={errors.day_deadline}
|
||||
/>
|
||||
</div>
|
||||
<FormFile
|
||||
label={'Surat Perjanjian'}
|
||||
onChange={(e) =>
|
||||
setData('file_agreement', e.target.files[0])
|
||||
}
|
||||
error={errors.file_agreement}
|
||||
/>
|
||||
<div className="mt-8">
|
||||
<Button
|
||||
onClick={handleSubmit}
|
||||
processing={processing}
|
||||
>
|
||||
Simpan
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</AuthenticatedLayout>
|
||||
)
|
||||
}
|
Loading…
Reference in New Issue