feat: Implement soft deletes for customer, invoice, order, and transaction models, and add customer edit and trash management to the admin panel.

This commit is contained in:
pbao9
2026-02-16 17:04:27 +07:00
parent 4dae15ffca
commit 31cbdf323f
22 changed files with 560 additions and 34 deletions
@@ -7,9 +7,9 @@
@section('breadcrumb')
@php
$breadcrumbItems = [
['label' => 'Customers', 'active' => true],
];
$breadcrumbItems = [
['label' => 'Customers', 'active' => true],
];
@endphp
<x-admin-breadcrumb :items="$breadcrumbItems" />
@endsection
@@ -18,19 +18,20 @@
@if (auth()->guard('admins')->user()->can('manager customer'))
<div class="card card-primary card-outline rounded-3 border-primary-subtle">
<div class="card-header d-flex justify-content-end gap-2">
@include('administrator.pages.block.customer.btn')
</div>
<div class="card-body">
<x-datatable id="customerTable" ajax="{{ route('customer.datatable') }}" :columns="[
['key' => 'fullname', 'label' => 'Fullname'],
['key' => 'company', 'label' => 'Company'],
['key' => 'email', 'label' => 'Email'],
['key' => 'hosting_count', 'label' => 'Hosting'],
['key' => 'vps_count', 'label' => 'VPS'],
['key' => 'domain_count', 'label' => 'Domain'],
['key' => 'created_at', 'label' => 'Created'],
['key' => 'status', 'label' => 'Status'],
['key' => 'action', 'label' => 'Action'],
]" />
['key' => 'fullname', 'label' => 'Fullname'],
['key' => 'company', 'label' => 'Company'],
['key' => 'email', 'label' => 'Email'],
['key' => 'hosting_count', 'label' => 'Hosting'],
['key' => 'vps_count', 'label' => 'VPS'],
['key' => 'domain_count', 'label' => 'Domain'],
['key' => 'created_at', 'label' => 'Created'],
['key' => 'status', 'label' => 'Status'],
['key' => 'action', 'label' => 'Action'],
]" />
</div>
</div>
@else