feat(tranasction): crud,route model binidng,customer js dan lainnya yang berkaitan dengan fitur transaksi
This commit is contained in:
parent
b1a8aff56e
commit
9eb8e757dd
101
app/Http/Controllers/Admin/Manage/TransactionController.php
Normal file
101
app/Http/Controllers/Admin/Manage/TransactionController.php
Normal file
@ -0,0 +1,101 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin\Manage;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Requests\Admin\Manage\TransactionRequest;
|
||||
use App\Models\Customer;
|
||||
use App\Models\Service;
|
||||
use App\Models\Transaction;
|
||||
use App\Traits\UploadAttachment;
|
||||
use Illuminate\Contracts\View\View;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
class TransactionController extends Controller
|
||||
{
|
||||
use UploadAttachment;
|
||||
|
||||
public function index(): View
|
||||
{
|
||||
return view('pages.admin.manage.transaction.index', [
|
||||
'pageTitle' => 'Transaksi',
|
||||
'transactions' => Transaction::latest()->get(),
|
||||
]);
|
||||
}
|
||||
|
||||
public function create(): View
|
||||
{
|
||||
return view('pages.admin.manage.transaction.create', [
|
||||
'pageTitle' => 'Tambah Transaksi',
|
||||
'services' => Service::latest()->get(),
|
||||
'customers' => Customer::latest()->get(),
|
||||
]);
|
||||
}
|
||||
|
||||
public function store(TransactionRequest $request): RedirectResponse
|
||||
{
|
||||
$validatedData = $request->validated();
|
||||
DB::transaction(function () use ($validatedData) {
|
||||
$newTransaction = Transaction::create(array_merge($validatedData, [
|
||||
'user_id' => Auth::id(),
|
||||
'barbershop_id' => Auth::user()->barbershop_id,
|
||||
'service_id' => $validatedData['service'],
|
||||
'customer_id' => $validatedData['customer'],
|
||||
]));
|
||||
$this->uploadAttachment($validatedData['image'], 'transactions', Transaction::class, $newTransaction->id);
|
||||
});
|
||||
|
||||
notify()->success('Data berhasil ditambahkan', 'Berhasil');
|
||||
|
||||
return redirect('dashboard/manage/transactions');
|
||||
}
|
||||
|
||||
public function edit(Transaction $transaction): View
|
||||
{
|
||||
return view('pages.admin.manage.transaction.edit', [
|
||||
'pageTitle' => 'Edit Transaksi',
|
||||
'transaction' => $transaction,
|
||||
]);
|
||||
}
|
||||
|
||||
public function update(Transaction $transaction, TransactionRequest $request): RedirectResponse
|
||||
{
|
||||
$validatedData = $request->validated();
|
||||
|
||||
$transaction->update($validatedData);
|
||||
|
||||
notify()->success('Data berhasil diubah', 'Berhasil');
|
||||
|
||||
return redirect('dashboard/manage/transactions');
|
||||
}
|
||||
|
||||
public function delete(Transaction $transaction): RedirectResponse
|
||||
{
|
||||
$transaction->delete();
|
||||
|
||||
notify()->success('Data berhasil dihapus', 'Berhasil');
|
||||
|
||||
return back();
|
||||
}
|
||||
|
||||
public function getPrice(string $serviceId): JsonResponse
|
||||
{
|
||||
$service = Service::find($serviceId);
|
||||
|
||||
if (! $service) {
|
||||
return response()->json([
|
||||
'status' => false,
|
||||
'message' => 'Service not found',
|
||||
], 404);
|
||||
}
|
||||
|
||||
return response()->json([
|
||||
'status' => true,
|
||||
'message' => 'Data retrieved successfully',
|
||||
'data' => decimalToInteger($service->price),
|
||||
], 200);
|
||||
}
|
||||
}
|
||||
50
app/Http/Requests/Admin/Manage/TransactionRequest.php
Normal file
50
app/Http/Requests/Admin/Manage/TransactionRequest.php
Normal file
@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Admin\Manage;
|
||||
|
||||
use App\Traits\NotificationTrait;
|
||||
use Illuminate\Contracts\Validation\Validator;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Validation\Rule;
|
||||
|
||||
class TransactionRequest extends FormRequest
|
||||
{
|
||||
use NotificationTrait;
|
||||
|
||||
public function authorize(): bool
|
||||
{
|
||||
return Auth::check();
|
||||
}
|
||||
|
||||
protected function prepareForValidation(): void
|
||||
{
|
||||
$this->merge([
|
||||
'price' => removeRupiahFormatting($this->price),
|
||||
'discount' => removeRupiahFormatting($this->discount),
|
||||
'total' => removeRupiahFormatting($this->total),
|
||||
]);
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
$isEdit = $this->isMethod('put');
|
||||
|
||||
return [
|
||||
'service' => ['required', Rule::exists('services', 'id')],
|
||||
'customer' => ['required', Rule::exists('customers', 'id')],
|
||||
'price' => ['required', 'numeric', 'min:0', 'max:999999.99'],
|
||||
'discount' => ['required', 'numeric', 'min:0', 'max:999999.99'],
|
||||
'total' => ['required', 'numeric', 'min:0', 'max:999999.99'],
|
||||
'image' => $isEdit
|
||||
? ['nullable', 'image', 'mimes:jpeg,png,jpg,gif,svg', 'max:2048']
|
||||
: ['required', 'image', 'mimes:jpeg,png,jpg,gif,svg', 'max:2048'],
|
||||
'payment_method' => ['required', Rule::in(['1', '2', '3'])],
|
||||
];
|
||||
}
|
||||
|
||||
protected function failedValidation(Validator $validator): void
|
||||
{
|
||||
$this->handleValidationFailure($validator);
|
||||
}
|
||||
}
|
||||
@ -9,6 +9,7 @@
|
||||
use App\Models\Inventory;
|
||||
use App\Models\Payroll;
|
||||
use App\Models\Service;
|
||||
use App\Models\Transaction;
|
||||
use App\Models\User;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
@ -36,5 +37,6 @@ public function boot(): void
|
||||
Route::bind('payroll', fn (string $payroll) => Payroll::findOrFail(decryptId($payroll)));
|
||||
Route::bind('cash', fn (string $cash) => Cash::findOrFail(decryptId($cash)));
|
||||
Route::bind('inventory', fn (string $inventory) => Inventory::findOrFail(decryptId($inventory)));
|
||||
Route::bind('transaction', fn (string $transaction) => Transaction::findOrFail(decryptId($transaction)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -10096,7 +10096,7 @@ .radio-wrapper,
|
||||
.checkbox-wrapper {
|
||||
display: flex;
|
||||
gap: calc(8px + 8 * (100vw - 320px) / 1600);
|
||||
flex-wrap: wrap;
|
||||
/* flex-wrap: wrap; */
|
||||
/* justify-content: center; */
|
||||
}
|
||||
|
||||
|
||||
44
public/assets/admin/js/custom/transaction.js
Normal file
44
public/assets/admin/js/custom/transaction.js
Normal file
@ -0,0 +1,44 @@
|
||||
$(document).ready(function () {
|
||||
// Ketika service berubah
|
||||
$('#service').on('change', function () {
|
||||
let serviceId = $(this).val();
|
||||
|
||||
// Lakukan AJAX untuk mendapatkan harga
|
||||
$.ajax({
|
||||
url: `/dashboard/manage/transaction/get-price/${serviceId}`,
|
||||
method: 'GET',
|
||||
success: function (response) {
|
||||
if (response.status) {
|
||||
// Masukkan harga ke field price (read-only)
|
||||
$('#price').val(response.data || '0');
|
||||
|
||||
// Hitung total
|
||||
calculateTotal();
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
Swal.fire({
|
||||
icon: 'error',
|
||||
title: 'Oops...',
|
||||
text: 'Terjadi kesalahan saat mengambil data layanan! Silakan coba lagi. Jika masalah berlanjut, hubungi administrator.',
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Fungsi untuk menghitung total
|
||||
function calculateTotal() {
|
||||
let price = parseFloat($('#price').val().replace(/[^0-9]/g, '') || 0);
|
||||
let discount = parseFloat($('#discount').val().replace(/[^0-9]/g, '') || 0);
|
||||
|
||||
let total = price - discount;
|
||||
|
||||
// Tampilkan hasil dalam format rupiah
|
||||
$('#total').val('Rp' + total.toLocaleString('id-ID'));
|
||||
}
|
||||
|
||||
// Jalankan perhitungan setiap kali discount berubah
|
||||
$('#discount').on('input', function () {
|
||||
calculateTotal();
|
||||
});
|
||||
});
|
||||
146
resources/views/pages/admin/manage/transaction/create.blade.php
Normal file
146
resources/views/pages/admin/manage/transaction/create.blade.php
Normal file
@ -0,0 +1,146 @@
|
||||
@extends('layouts.admin')
|
||||
@section('styles')
|
||||
<link rel="stylesheet" href="{{ asset('assets/admin/css/vendors/select2.css') }}">
|
||||
@endsection
|
||||
@section('app')
|
||||
<div class="container-fluid">
|
||||
<div class="list-product-header">
|
||||
<div>
|
||||
<a class="btn btn-dark" href="{{ route('manage.transactions') }}">Kembali</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form class="row g-3 custom-input" action="{{ route('manage.transaction.store') }}" method="post"
|
||||
enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="col-lg-6 position-relative">
|
||||
<label class="form-label" for="customer">Pelanggan
|
||||
</label>
|
||||
<select name="customer" class="form-control @error('customer') is-invalid @enderror select2"
|
||||
id="customer">
|
||||
<option value=""></option>
|
||||
@foreach ($customers as $customer)
|
||||
<option value="{{ $customer->id }}" @selected(old('customer') == $customer->id)>
|
||||
{{ $customer->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@error('customer')
|
||||
<div class="invalid-feedback">
|
||||
{{ $message }}
|
||||
</div>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="col-lg-6 position-relative">
|
||||
<label class="form-label" for="service">Layanan
|
||||
</label>
|
||||
<select name="service" class="form-control @error('service') is-invalid @enderror select2"
|
||||
id="service">
|
||||
<option value=""></option>
|
||||
@foreach ($services as $service)
|
||||
<option value="{{ $service->id }}" @selected(old('service') == $service->id)>
|
||||
{{ $service->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@error('service')
|
||||
<div class="invalid-feedback">
|
||||
{{ $message }}
|
||||
</div>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="col-lg-6 position-relative">
|
||||
<label class="form-label" for="price">Harga</label>
|
||||
<input name="price" class="form-control rupiah-format @error('price') is-invalid @enderror"
|
||||
id="price" type="text" placeholder="Masukan Harga" value="{{ old('price') }}"
|
||||
inputmode="numeric" readonly>
|
||||
@error('price')
|
||||
<div class="invalid-feedback">
|
||||
{{ $message }}
|
||||
</div>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="col-lg-6 position-relative">
|
||||
<label class="form-label" for="discount">Diskon</label>
|
||||
<input name="discount" class="form-control rupiah-format @error('discount') is-invalid @enderror"
|
||||
id="discount" type="text" placeholder="Masukan Diskon" value="{{ old('discount') }}"
|
||||
inputmode="numeric">
|
||||
@error('discount')
|
||||
<div class="invalid-feedback">
|
||||
{{ $message }}
|
||||
</div>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="col-lg-6 position-relative">
|
||||
<label class="form-label" for="total">Total</label>
|
||||
<input name="total" class="form-control rupiah-format @error('total') is-invalid @enderror"
|
||||
id="total" type="text" placeholder="Masukan Total" value="{{ old('total') }}"
|
||||
inputmode="numeric">
|
||||
@error('total')
|
||||
<div class="invalid-feedback">
|
||||
{{ $message }}
|
||||
</div>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="col-lg-6 position-relative">
|
||||
<label class="form-label" for="image">Gambar
|
||||
<span class="form-span"><i>(.jpeg,.png,.jpg,.gif,.svg)</i></span>
|
||||
</label>
|
||||
<input name="image" class="form-control @error('image') is-invalid @enderror" id="image"
|
||||
type="file" value="{{ old('image') }}"
|
||||
accept="image/jpeg,image/png,image/jpg,image/gif,image/svg">
|
||||
@error('image')
|
||||
<div class="invalid-feedback">
|
||||
{{ $message }}
|
||||
</div>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="col-lg-12 position-relative">
|
||||
<label class="form-label" for="payment_method">Metode Pembayaran</label>
|
||||
<div class="form-check radio ps-0">
|
||||
<ul class="radio-wrapper">
|
||||
<li>
|
||||
<input class="form-check-input" id="radio-cash" type="radio" name="payment_method"
|
||||
value="1" @checked(old('payment_method') == '1')>
|
||||
<label class="form-check-label" for="radio-cash">
|
||||
Tunai
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<input class="form-check-input" id="radio-qris" type="radio" name="payment_method"
|
||||
value="2" @checked(old('payment_method') == '2')>
|
||||
<label class="form-check-label" for="radio-qris">
|
||||
Qris
|
||||
</label>
|
||||
</li>
|
||||
<li>
|
||||
<input class="form-check-input" id="radio-other" type="radio" name="payment_method"
|
||||
value="3" @checked(old('payment_method') == '3')>
|
||||
<label class="form-check-label" for="radio-other">
|
||||
Lainnya
|
||||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@error('payment_method')
|
||||
<div class="invalid-feedback">
|
||||
{{ $message }}
|
||||
</div>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<button class="btn btn-primary button-disable" type="submit">Simpan</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@section('afterScripts')
|
||||
<script src="{{ asset('assets/js/forms/button-disable.js?ver=1.0.0') }}"></script>
|
||||
<script src="{{ asset('assets/js/forms/rupiah-format.js?ver=1.0.0') }}"></script>
|
||||
<script src="{{ asset('assets/admin/js/select2/select2.js') }}"></script>
|
||||
<script src="{{ asset('assets/admin/js/select2/select2-config.js?ver=1.0.0') }}"></script>
|
||||
<script src="{{ asset('assets/admin/js/custom/transaction.js?ver=1.0.0') }}"></script>
|
||||
@endsection
|
||||
@ -0,0 +1,59 @@
|
||||
@extends('layouts.admin')
|
||||
@section('styles')
|
||||
@endsection
|
||||
@section('app')
|
||||
<div class="container-fluid">
|
||||
<div class="list-product-header">
|
||||
<div>
|
||||
<a class="btn btn-dark" href="{{ route('master.services') }}">Kembali</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<form class="row g-3 custom-input" action="{{ route('master.service.update', encryptId($service->id)) }}"
|
||||
method="post">
|
||||
@csrf
|
||||
@method('put')
|
||||
<div class="col-lg-6 position-relative">
|
||||
<label class="form-label" for="name">Nama</label>
|
||||
<input name="name" class="form-control @error('name') is-invalid @enderror" id="name"
|
||||
type="text" placeholder="Masukan Nama" value="{{ old('name', $service->name) }}">
|
||||
@error('name')
|
||||
<div class="invalid-feedback">
|
||||
{{ $message }}
|
||||
</div>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="col-lg-6 position-relative">
|
||||
<label class="form-label" for="price">Harga</label>
|
||||
<input name="price" class="form-control rupiah-format @error('price') is-invalid @enderror"
|
||||
id="price" type="text" placeholder="Masukan Harga"
|
||||
value="{{ old('price', formatToRupiah($service->price)) }}" inputmode="numeric">
|
||||
@error('price')
|
||||
<div class="invalid-feedback">
|
||||
{{ $message }}
|
||||
</div>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="col-lg-12 position-relative">
|
||||
<label class="form-label" for="description">Deskripsi</label>
|
||||
<textarea name="description" class="form-control @error('description') is-invalid @enderror" id="description"
|
||||
rows="3" placeholder="Masukan Deskripsi">{{ old('description', $service->description) }}</textarea>
|
||||
@error('description')
|
||||
<div class="invalid-feedback">
|
||||
{{ $message }}
|
||||
</div>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="col-12">
|
||||
<button class="btn btn-primary button-disable" type="submit">Simpan</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@section('afterScripts')
|
||||
<script src="{{ asset('assets/js/forms/button-disable.js?ver=1.0.0') }}"></script>
|
||||
<script src="{{ asset('assets/js/forms/rupiah-format.js?ver=1.0.0') }}"></script>
|
||||
@endsection
|
||||
@ -0,0 +1,95 @@
|
||||
@extends('layouts.admin')
|
||||
@section('styles')
|
||||
<link rel="stylesheet" type="text/css" href="{{ asset('assets/admin/css/vendors/datatables.css') }}">
|
||||
@endsection
|
||||
@section('app')
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="list-product-header">
|
||||
<div>
|
||||
<a class="btn btn-primary" href="{{ route('manage.transaction.create') }}">Tambah</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="table-responsive">
|
||||
<table class="display" id="datatable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>No</th>
|
||||
<th>Pelanggan</th>
|
||||
<th>Layanan</th>
|
||||
<th>Harga</th>
|
||||
<th>Diskon</th>
|
||||
<th>Total</th>
|
||||
<th>Gambar</th>
|
||||
<th>Tanggal</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($transactions as $transaction)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $transaction->customer->name }}</td>
|
||||
<td>{{ $transaction->service->name }}</td>
|
||||
<td>{{ formatToRupiah($transaction->price) }}</td>
|
||||
<td>{{ formatToRupiah($transaction->discount) }}</td>
|
||||
<td>{{ formatToRupiah($transaction->total) }}</td>
|
||||
<td>
|
||||
@if ($transaction->attachment && $transaction->attachment->formatted_attachment)
|
||||
<a
|
||||
href="{{ Storage::url("transactions/{$transaction->attachment->formatted_attachment}") }}">
|
||||
<img src="{{ Storage::url("transactions/{$transaction->attachment->formatted_attachment}") }}"
|
||||
alt="{{ $transaction->name }}" width="77" height="77">
|
||||
</a>
|
||||
@else
|
||||
<a href="{{ asset('assets/images/no-imge.png') }}">
|
||||
<img src="{{ asset('assets/images/no-imge.png') }}"
|
||||
alt="Default Image" style="width: 77px; height: 77px">
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>{{ formatDateIndo($transaction->created_at) }}</td>
|
||||
<td>
|
||||
<ul class="action">
|
||||
<li class="edit">
|
||||
<a href="{{ route('manage.transaction.edit', encryptId($transaction->id)) }}"
|
||||
data-bs-toggle="tooltip" data-bs-placement="left"
|
||||
data-bs-title="Edit">
|
||||
<i data-feather="edit"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="delete">
|
||||
<form
|
||||
action="{{ route('manage.transaction.delete', encryptId($transaction->id)) }}"
|
||||
method="post">
|
||||
@csrf
|
||||
@method('delete')
|
||||
<a href="javascript:void(0)" class="delete-data"
|
||||
data-bs-toggle="tooltip" data-bs-placement="left"
|
||||
data-bs-title="Hapus">
|
||||
<i data-feather="trash-2"></i>
|
||||
</a>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@section('afterScripts')
|
||||
<script src="{{ asset('assets/admin/js/datatable/jquery.dataTables.min.js?ver=1.0.0') }}"></script>
|
||||
<script src="{{ asset('assets/admin/js/datatable/client-side.js?ver=1.0.0') }}"></script>
|
||||
<script src="{{ asset('assets/js/interactions/confirmation.js?ver=1.0.0') }}"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
|
||||
@endsection
|
||||
@ -120,6 +120,13 @@
|
||||
<span>Kehadiran</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="sidebar-list">
|
||||
<i class="fa fa-thumb-tack"></i>
|
||||
<a class="sidebar-link sidebar-title link-nav" href="{{ route('manage.transactions') }}">
|
||||
<i data-feather="scissors"></i>
|
||||
<span>Transaksi</span>
|
||||
</a>
|
||||
</li>
|
||||
<li class="sidebar-list">
|
||||
<i class="fa fa-thumb-tack"></i>
|
||||
<a class="sidebar-link sidebar-title link-nav" href="{{ route('manage.inventory') }}">
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
use App\Http\Controllers\Admin\Finance\PayrollController;
|
||||
use App\Http\Controllers\Admin\Manage\AttendanceController;
|
||||
use App\Http\Controllers\Admin\Manage\InventoryController;
|
||||
use App\Http\Controllers\Admin\Manage\TransactionController;
|
||||
use App\Http\Controllers\Admin\Master\BarbershopController;
|
||||
use App\Http\Controllers\Admin\Master\CustomerController;
|
||||
use App\Http\Controllers\Admin\Master\ServiceController;
|
||||
@ -98,6 +99,16 @@
|
||||
Route::delete('delete/{attendance}', [AttendanceController::class, 'delete'])->name('manage.attendance.delete');
|
||||
});
|
||||
|
||||
Route::get('/transactions', [TransactionController::class, 'index'])->name('manage.transactions');
|
||||
Route::prefix('transaction')->group(function () {
|
||||
Route::get('create', [TransactionController::class, 'create'])->name('manage.transaction.create');
|
||||
Route::post('store', [TransactionController::class, 'store'])->name('manage.transaction.store');
|
||||
Route::get('edit/{transaction}', [TransactionController::class, 'edit'])->name('manage.transaction.edit');
|
||||
Route::put('update/{transaction}', [TransactionController::class, 'update'])->name('manage.transaction.update');
|
||||
Route::delete('delete/{transaction}', [TransactionController::class, 'delete'])->name('manage.transaction.delete');
|
||||
Route::get('get-price/{serviceId}', [TransactionController::class, 'getPrice'])->name('manage.transaction.getPrice');
|
||||
});
|
||||
|
||||
Route::get('/inventory', [InventoryController::class, 'index'])->name('manage.inventory');
|
||||
Route::prefix('inventory')->group(function () {
|
||||
Route::post('store', [InventoryController::class, 'store'])->name('manage.inventory.store');
|
||||
|
||||
Loading…
Reference in New Issue
Block a user