Files
kulakpos_web/Modules/Business/resources/views/parties/datas.blade.php
eko54r 05fd3230b8
All checks were successful
Build, Push and Deploy / build-and-push (push) Successful in 5m14s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 17s
Build, Push and Deploy / deploy-staging (push) Successful in 41s
Build, Push and Deploy / deploy-production (push) Has been skipped
update marketing
2026-05-14 11:55:22 +07:00

108 lines
6.7 KiB
PHP

<div class="responsive-table m-0">
<table class="table" id="datatable">
<thead>
<tr>
@usercan('parties.delete')
<th class="w-60">
<div class="d-flex align-items-center gap-3">
<input type="checkbox" class="select-all-delete multi-delete">
</div>
</th>
@endusercan
<th> {{ __('SL') }}. </th>
<th> {{ __('Image') }} </th>
<th> {{ __('Name') }} </th>
<th> {{ __('Type') }} </th>
<th> {{ __('Phone') }} </th>
<th> {{ __('Due') }} </th>
<th> {{ __('Credit Limit') }} </th>
<th> {{ __('Action') }} </th>
</tr>
</thead>
<tbody>
@foreach ($parties as $party)
<tr>
@usercan('parties.delete')
<td class="w-60 checkbox">
<input type="checkbox" name="ids[]" class="delete-checkbox-item multi-delete"
value="{{ $party->id }}" @if (!$party->canBeDeleted()) disabled @endif>
</td>
@endusercan
<td>{{ ($parties->currentPage() - 1) * $parties->perPage() + $loop->iteration }}</td>
<td>
<img src="{{ asset($party->image ?? 'assets/images/logo/upload2.jpg') }}" alt="Img"
class="table-product-img">
</td>
<td>{{ $party->name }}</td>
@if ($party->type == 'Retailer')
<td>{{ __('Customer') }}</td>
@else
<td>{{ $party->type }}</td>
@endif
<td>{{ $party->phone }}</td>
<td class="text-danger">
{{ currency_format($party->due, currency: business_currency()) }}
</td>
<td class="text-success">
{{ currency_format($party->credit_limit, currency: business_currency()) }}
</td>
<td class="d-print-none">
<div class="dropdown table-action">
<button type="button" data-bs-toggle="dropdown">
<i class="far fa-ellipsis-v"></i>
</button>
<ul class="dropdown-menu">
<li>
@usercan('parties.read')
<a href="#parties-view" class="parties-view-btn" data-bs-toggle="modal"
data-name="{{ $party->name }}" data-email="{{ $party->email }}"
data-phone="{{ $party->phone }}" data-type="{{ $party->type }}"
data-due="{{ currency_format($party->due, currency: business_currency()) }}"
data-address="{{ $party->address }}">
<i class="fal fa-eye"></i>
{{ __('View') }}
</a>
@endusercan
</li>
<li>
<a href="{{ route('business.parties.advance-payments', [$party->id, 'type' => request('type')]) }}">
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" class="pt-1 me-0" xmlns="http://www.w3.org/2000/svg">
<path d="M1.66602 3.75H7.29715C7.96019 3.75 8.5961 4.01339 9.06493 4.48223L11.666 7.08333" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M4.16602 11.25H1.66602" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M7.08268 6.25L8.74935 7.91667C9.2096 8.37692 9.2096 9.12308 8.74935 9.58333C8.28912 10.0436 7.54292 10.0436 7.08268 9.58333L5.83268 8.33333C5.11544 9.05058 3.97994 9.13125 3.16847 8.52267L2.91602 8.33333" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M4.16602 9.16536V12.9154C4.16602 14.4867 4.16602 15.2724 4.65417 15.7605C5.14232 16.2487 5.928 16.2487 7.49935 16.2487H14.9993C16.5707 16.2487 17.3563 16.2487 17.8445 15.7605C18.3327 15.2724 18.3327 14.4867 18.3327 12.9154V10.4154C18.3327 8.84403 18.3327 8.05834 17.8445 7.57019C17.3563 7.08203 16.5707 7.08203 14.9993 7.08203H7.91602" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M12.7077 11.6654C12.7077 12.4708 12.0548 13.1237 11.2493 13.1237C10.4439 13.1237 9.79102 12.4708 9.79102 11.6654C9.79102 10.8599 10.4439 10.207 11.2493 10.207C12.0548 10.207 12.7077 10.8599 12.7077 11.6654Z" stroke="black" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
{{ $party->type == 'Supplier' ? __('Advance Pay') : __('Advance Collect') }}
</a>
</li>
<li>
<a href="{{ route('business.parties.edit', [$party->id, 'type' => request('type')]) }}">
<i class="fal fa-edit"></i>{{ __('Edit') }}
</a>
</li>
<li>
@usercan('parties.delete')
@if ($party->canBeDeleted())
<a href="{{ route('business.parties.destroy', $party->id) }}"
class="confirm-action" data-method="DELETE">
<i class="fal fa-trash-alt"></i>
{{ __('Delete') }}
</a>
@endif
@endusercan
</li>
</ul>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="mt-3">
{{ $parties->links('vendor.pagination.bootstrap-5') }}
</div>