fix(component): menyesuaikan path pemanggilan component
This commit is contained in:
parent
77d91b977f
commit
07fd37f193
@ -116,14 +116,14 @@ class='flex items-center space-x-2 bg-gray-50 border border-gray-200 rounded-lg
|
||||
$actions = '';
|
||||
|
||||
if (auth()->user()->can('update bottle')) {
|
||||
$actions .= view('components.datatables.edit', [
|
||||
$actions .= view('components.actions.table.edit', [
|
||||
'id' => $row->hash,
|
||||
'editRoute' => route('studio.catalog.bottle.edit', $row->hash),
|
||||
])->render();
|
||||
}
|
||||
|
||||
if (auth()->user()->can('delete bottle')) {
|
||||
$actions .= view('components.datatables.delete', [
|
||||
$actions .= view('components.actions.table.delete', [
|
||||
'id' => $row->hash,
|
||||
'deleteRoute' => route('studio.catalog.bottle.delete', $row->hash),
|
||||
])->render();
|
||||
|
||||
@ -36,7 +36,7 @@ public function columns(): array
|
||||
|
||||
if (auth()->user()->can('update brand')) {
|
||||
if ($row->sort_order > 1) {
|
||||
$actions .= view('components.datatables.sort-button', [
|
||||
$actions .= view('components.actions.table.sort-button', [
|
||||
'id' => $row->hash,
|
||||
'module' => 'brand',
|
||||
'direction' => 'up',
|
||||
@ -45,7 +45,7 @@ public function columns(): array
|
||||
'icon' => 'arrow-up',
|
||||
])->render();
|
||||
|
||||
$actions .= view('components.datatables.sort-button', [
|
||||
$actions .= view('components.actions.table.sort-button', [
|
||||
'id' => $row->hash,
|
||||
'module' => 'brand',
|
||||
'direction' => 'first',
|
||||
@ -56,7 +56,7 @@ public function columns(): array
|
||||
}
|
||||
|
||||
if ($row->sort_order < $maxSortOrder) {
|
||||
$actions .= view('components.datatables.sort-button', [
|
||||
$actions .= view('components.actions.table.sort-button', [
|
||||
'id' => $row->hash,
|
||||
'module' => 'brand',
|
||||
'direction' => 'down',
|
||||
@ -65,7 +65,7 @@ public function columns(): array
|
||||
'icon' => 'arrow-down',
|
||||
])->render();
|
||||
|
||||
$actions .= view('components.datatables.sort-button', [
|
||||
$actions .= view('components.actions.table.sort-button', [
|
||||
'id' => $row->hash,
|
||||
'module' => 'brand',
|
||||
'direction' => 'last',
|
||||
@ -77,7 +77,7 @@ public function columns(): array
|
||||
}
|
||||
|
||||
if (auth()->user()->can('update brand')) {
|
||||
$actions .= view('components.datatables.edit-modal', [
|
||||
$actions .= view('components.actions.table.edit-modal', [
|
||||
'id' => $row->hash,
|
||||
'method' => 'update',
|
||||
'modalTitle' => 'Ubah Kategori',
|
||||
@ -85,7 +85,7 @@ public function columns(): array
|
||||
}
|
||||
|
||||
if (auth()->user()->can('delete brand')) {
|
||||
$actions .= view('components.datatables.delete', [
|
||||
$actions .= view('components.actions.table.delete', [
|
||||
'id' => $row->hash,
|
||||
'deleteRoute' => route('studio.catalog.brand.delete', $row->hash),
|
||||
])->render();
|
||||
|
||||
@ -27,7 +27,7 @@ public function columns(): array
|
||||
|
||||
if (auth()->user()->can('update category')) {
|
||||
if ($row->sort_order > 1) {
|
||||
$actions .= view('components.datatables.sort-button', [
|
||||
$actions .= view('components.actions.table.sort-button', [
|
||||
'id' => $row->hash,
|
||||
'module' => 'category',
|
||||
'direction' => 'up',
|
||||
@ -36,7 +36,7 @@ public function columns(): array
|
||||
'icon' => 'arrow-up',
|
||||
])->render();
|
||||
|
||||
$actions .= view('components.datatables.sort-button', [
|
||||
$actions .= view('components.actions.table.sort-button', [
|
||||
'id' => $row->hash,
|
||||
'module' => 'category',
|
||||
'direction' => 'first',
|
||||
@ -47,7 +47,7 @@ public function columns(): array
|
||||
}
|
||||
|
||||
if ($row->sort_order < $maxSortOrder) {
|
||||
$actions .= view('components.datatables.sort-button', [
|
||||
$actions .= view('components.actions.table.sort-button', [
|
||||
'id' => $row->hash,
|
||||
'module' => 'category',
|
||||
'direction' => 'down',
|
||||
@ -56,7 +56,7 @@ public function columns(): array
|
||||
'icon' => 'arrow-down',
|
||||
])->render();
|
||||
|
||||
$actions .= view('components.datatables.sort-button', [
|
||||
$actions .= view('components.actions.table.sort-button', [
|
||||
'id' => $row->hash,
|
||||
'module' => 'category',
|
||||
'direction' => 'last',
|
||||
@ -68,7 +68,7 @@ public function columns(): array
|
||||
}
|
||||
|
||||
if (auth()->user()->can('update category')) {
|
||||
$actions .= view('components.datatables.edit-modal', [
|
||||
$actions .= view('components.actions.table.edit-modal', [
|
||||
'id' => $row->hash,
|
||||
'method' => 'update',
|
||||
'modalTitle' => 'Ubah Kategori',
|
||||
@ -76,7 +76,7 @@ public function columns(): array
|
||||
}
|
||||
|
||||
if (auth()->user()->can('delete category')) {
|
||||
$actions .= view('components.datatables.delete', [
|
||||
$actions .= view('components.actions.table.delete', [
|
||||
'id' => $row->hash,
|
||||
'deleteRoute' => route('studio.catalog.category.delete', $row->hash),
|
||||
])->render();
|
||||
|
||||
@ -119,14 +119,14 @@ class='flex items-center space-x-2 bg-gray-50 border border-gray-200 rounded-lg
|
||||
$actions = '';
|
||||
|
||||
if (auth()->user()->can('update perfume')) {
|
||||
$actions .= view('components.datatables.edit', [
|
||||
$actions .= view('components.actions.table.edit', [
|
||||
'id' => $row->hash,
|
||||
'editRoute' => route('studio.catalog.perfume.edit', $row->hash),
|
||||
])->render();
|
||||
}
|
||||
|
||||
if (auth()->user()->can('delete perfume')) {
|
||||
$actions .= view('components.datatables.delete', [
|
||||
$actions .= view('components.actions.table.delete', [
|
||||
'id' => $row->hash,
|
||||
'deleteRoute' => route('studio.catalog.perfume.delete', $row->hash),
|
||||
])->render();
|
||||
|
||||
@ -108,14 +108,14 @@ class='flex items-center space-x-2 bg-gray-50 border border-gray-200 rounded-lg
|
||||
$actions = '';
|
||||
|
||||
if (auth()->user()->can('update product')) {
|
||||
$actions .= view('components.datatables.edit', [
|
||||
$actions .= view('components.actions.table.edit', [
|
||||
'id' => $row->hash,
|
||||
'editRoute' => route('studio.catalog.product.edit', $row->hash),
|
||||
])->render();
|
||||
}
|
||||
|
||||
if (auth()->user()->can('delete product')) {
|
||||
$actions .= view('components.datatables.delete', [
|
||||
$actions .= view('components.actions.table.delete', [
|
||||
'id' => $row->hash,
|
||||
'deleteRoute' => route('studio.catalog.product.delete', $row->hash),
|
||||
])->render();
|
||||
|
||||
@ -41,7 +41,7 @@ public function columns(): array
|
||||
|
||||
if ($row->user_id == auth()->id() || auth()->user()->hasAnyRole(['Developer', 'Owner'])) {
|
||||
if (auth()->user()->can('update expense')) {
|
||||
$actions .= view('components.datatables.edit-modal', [
|
||||
$actions .= view('components.actions.table.edit-modal', [
|
||||
'id' => $row->hash,
|
||||
'method' => 'update',
|
||||
'modalTitle' => 'Ubah Kategori',
|
||||
@ -49,7 +49,7 @@ public function columns(): array
|
||||
}
|
||||
|
||||
if (auth()->user()->can('delete expense')) {
|
||||
$actions .= view('components.datatables.delete', [
|
||||
$actions .= view('components.actions.table.delete', [
|
||||
'id' => $row->hash,
|
||||
'deleteRoute' => route('studio.finance.expense.delete', $row->hash),
|
||||
])->render();
|
||||
|
||||
@ -61,7 +61,7 @@ public function columns(): array
|
||||
$actions = '';
|
||||
|
||||
if (auth()->user()->can('approve price request') && $row->status === PriceRequestStatus::PENDING) {
|
||||
$actions .= view('components.datatables.confirm', [
|
||||
$actions .= view('components.actions.table.confirm', [
|
||||
'id' => $row->hash,
|
||||
'message' => 'Pemohon yang diterima bisa melihat data harga beli.',
|
||||
'confirmButtonText' => 'Ya, Terima',
|
||||
@ -73,7 +73,7 @@ public function columns(): array
|
||||
}
|
||||
|
||||
if (auth()->user()->can('reject price request') && $row->status === PriceRequestStatus::PENDING) {
|
||||
$actions .= view('components.datatables.confirm', [
|
||||
$actions .= view('components.actions.table.confirm', [
|
||||
'id' => $row->hash,
|
||||
'message' => 'Jika ditolak, pomohon tidak dapat melihat data harga beli.',
|
||||
'confirmButtonText' => 'Ya, Tolak',
|
||||
|
||||
@ -74,7 +74,7 @@ public function columns(): array
|
||||
$actions = '';
|
||||
|
||||
if (auth()->user()->can('update customer')) {
|
||||
$actions .= view('components.datatables.edit-modal', [
|
||||
$actions .= view('components.actions.table.edit-modal', [
|
||||
'id' => $row->hash,
|
||||
'method' => 'update',
|
||||
'modalTitle' => 'Ubah Customer',
|
||||
@ -82,7 +82,7 @@ public function columns(): array
|
||||
}
|
||||
|
||||
if (auth()->user()->can('delete customer')) {
|
||||
$actions .= view('components.datatables.delete', [
|
||||
$actions .= view('components.actions.table.delete', [
|
||||
'id' => $row->hash,
|
||||
'deleteRoute' => route('studio.loyalty.customer.delete', $row->hash),
|
||||
])->render();
|
||||
|
||||
@ -113,14 +113,14 @@ public function columns(): array
|
||||
$actions = '';
|
||||
|
||||
if (auth()->user()->can('update voucher')) {
|
||||
$actions .= view('components.datatables.edit', [
|
||||
$actions .= view('components.actions.table.edit', [
|
||||
'id' => $row->hash,
|
||||
'editRoute' => route('studio.loyalty.voucher.edit', $row->hash),
|
||||
])->render();
|
||||
}
|
||||
|
||||
if (auth()->user()->can('delete voucher')) {
|
||||
$actions .= view('components.datatables.delete', [
|
||||
$actions .= view('components.actions.table.delete', [
|
||||
'id' => $row->hash,
|
||||
'deleteRoute' => route('studio.loyalty.voucher.delete', $row->hash),
|
||||
])->render();
|
||||
|
||||
@ -40,14 +40,14 @@ public function columns(): array
|
||||
$actions = '';
|
||||
|
||||
if (auth()->user()->can('update article')) {
|
||||
$actions .= view('components.datatables.edit', [
|
||||
$actions .= view('components.actions.table.edit', [
|
||||
'id' => $row->hash,
|
||||
'editRoute' => route('studio.manage.article.edit', $row->hash),
|
||||
])->render();
|
||||
}
|
||||
|
||||
if (auth()->user()->can('delete article')) {
|
||||
$actions .= view('components.datatables.delete', [
|
||||
$actions .= view('components.actions.table.delete', [
|
||||
'id' => $row->hash,
|
||||
'deleteRoute' => route('studio.manage.article.delete', $row->hash),
|
||||
])->render();
|
||||
|
||||
@ -115,20 +115,20 @@ public function columns(): array
|
||||
$actions = '';
|
||||
|
||||
if (auth()->user()->can('create order') && auth()->user()->can('show order')) {
|
||||
$actions .= view('components.datatables.print', [
|
||||
$actions .= view('components.actions.table.print', [
|
||||
'id' => $row->hash,
|
||||
])->render();
|
||||
}
|
||||
|
||||
if (auth()->user()->can('show order')) {
|
||||
$actions .= view('components.datatables.show', [
|
||||
$actions .= view('components.actions.table.show', [
|
||||
'id' => $row->hash,
|
||||
'showRoute' => route('studio.manage.order.show', $row->hash),
|
||||
])->render();
|
||||
}
|
||||
|
||||
if (auth()->user()->can('delete order')) {
|
||||
$actions .= view('components.datatables.delete', [
|
||||
$actions .= view('components.actions.table.delete', [
|
||||
'id' => $row->hash,
|
||||
'deleteRoute' => route('studio.manage.order.delete', $row->hash),
|
||||
])->render();
|
||||
|
||||
@ -63,7 +63,7 @@ public function columns(): array
|
||||
$actions = '';
|
||||
|
||||
if (auth()->user()->can('delete purchase')) {
|
||||
$actions .= view('components.datatables.delete', [
|
||||
$actions .= view('components.actions.table.delete', [
|
||||
'id' => $row->hash,
|
||||
'deleteRoute' => route('studio.manage.purchase.delete', $row->hash),
|
||||
])->render();
|
||||
|
||||
@ -32,7 +32,7 @@ public function columns(): array
|
||||
$actions = '';
|
||||
|
||||
if (auth()->user()->can('show stock opname')) {
|
||||
$actions .= view('components.datatables.new-page-action', [
|
||||
$actions .= view('components.actions.table.new-page-action', [
|
||||
'label' => 'Lihat',
|
||||
'route' => route('studio.manage.stock_opname.show', ['stockOpname', $row->hash]),
|
||||
'buttonColor' => 'blue',
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<flux:modal.trigger name="confirmation-modal">
|
||||
<flux:modal.trigger name="delete-confirmation">
|
||||
<flux:tooltip content="{{ $title }}">
|
||||
<flux:button variant="primary" color="{{ $confirmButtonColor }}" icon="{{ $icon }}" size="sm"
|
||||
wire:click="$dispatch('fn:confirmAction', {
|
||||
|
||||
@ -26,7 +26,7 @@ class="text-sm">
|
||||
</div>
|
||||
|
||||
@include('components.modals.confirmation', [
|
||||
'modalName' => 'confirmation-modal',
|
||||
'modalName' => 'delete-confirmation',
|
||||
'modalTitle' => 'Apakah Anda yakin?',
|
||||
'modalMessage' => 'Data yang berelasi dengan data ini juga akan ikut terhapus.',
|
||||
'buttonVariant' => 'primary',
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
</div>
|
||||
|
||||
@include('components.modals.confirmation', [
|
||||
'modalName' => 'confirmation-modal',
|
||||
'modalName' => 'delete-confirmation',
|
||||
'modalTitle' => 'Apakah Anda yakin?',
|
||||
'modalMessage' => 'Data yang berelasi dengan data ini juga akan ikut terhapus.',
|
||||
'buttonVariant' => 'primary',
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
</div>
|
||||
|
||||
@include('components.modals.confirmation', [
|
||||
'modalName' => 'confirmation-modal',
|
||||
'modalName' => 'delete-confirmation',
|
||||
'modalTitle' => 'Apakah Anda yakin?',
|
||||
'modalMessage' => 'Data yang berelasi dengan data ini juga akan ikut terhapus.',
|
||||
'buttonVariant' => 'primary',
|
||||
|
||||
@ -26,7 +26,7 @@ class="text-sm">
|
||||
</div>
|
||||
|
||||
@include('components.modals.confirmation', [
|
||||
'modalName' => 'confirmation-modal',
|
||||
'modalName' => 'delete-confirmation',
|
||||
'modalTitle' => 'Apakah Anda yakin?',
|
||||
'modalMessage' => 'Data yang berelasi dengan data ini juga akan ikut terhapus.',
|
||||
'buttonVariant' => 'primary',
|
||||
|
||||
@ -26,7 +26,7 @@ class="text-sm">
|
||||
</div>
|
||||
|
||||
@include('components.modals.confirmation', [
|
||||
'modalName' => 'confirmation-modal',
|
||||
'modalName' => 'delete-confirmation',
|
||||
'modalTitle' => 'Apakah Anda yakin?',
|
||||
'modalMessage' => 'Data yang berelasi dengan data ini juga akan ikut terhapus.',
|
||||
'buttonVariant' => 'primary',
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
</div>
|
||||
|
||||
@include('components.modals.confirmation', [
|
||||
'modalName' => 'confirmation-modal',
|
||||
'modalName' => 'delete-confirmation',
|
||||
'modalTitle' => 'Apakah Anda yakin?',
|
||||
'modalMessage' => 'Data yang berelasi dengan data ini juga akan ikut terhapus.',
|
||||
'buttonVariant' => 'primary',
|
||||
|
||||
@ -88,7 +88,7 @@ class="font-bold {{ $item->type->value == \App\Enums\SalaryAdjustmentType::DEDUC
|
||||
</div>
|
||||
|
||||
@include('components.modals.confirmation', [
|
||||
'modalName' => 'confirmation-modal',
|
||||
'modalName' => 'delete-confirmation',
|
||||
'modalTitle' => 'Apakah Anda yakin?',
|
||||
'modalMessage' => 'Data yang berelasi dengan data ini juga akan ikut terhapus.',
|
||||
'buttonVariant' => 'primary',
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
</div>
|
||||
|
||||
@include('components.modals.confirmation', [
|
||||
'modalName' => 'confirmation-modal',
|
||||
'modalName' => 'delete-confirmation',
|
||||
'modalTitle' => 'Apakah Anda yakin?',
|
||||
'modalMessage' => 'Data yang berelasi dengan data ini juga akan ikut terhapus.',
|
||||
'buttonVariant' => 'primary',
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
</div>
|
||||
|
||||
@include('components.modals.confirmation', [
|
||||
'modalName' => 'confirmation-modal',
|
||||
'modalName' => 'delete-confirmation',
|
||||
'modalTitle' => 'Apakah Anda yakin?',
|
||||
'modalMessage' => 'Data yang berelasi dengan data ini juga akan ikut terhapus.',
|
||||
'buttonVariant' => 'primary',
|
||||
|
||||
@ -83,7 +83,7 @@
|
||||
</flux:modal>
|
||||
|
||||
@include('components.modals.confirmation', [
|
||||
'modalName' => 'confirmation-modal',
|
||||
'modalName' => 'delete-confirmation',
|
||||
'modalTitle' => 'Apakah Anda yakin?',
|
||||
'modalMessage' => 'Data yang berelasi dengan data ini juga akan ikut terhapus.',
|
||||
'buttonVariant' => 'primary',
|
||||
|
||||
@ -29,7 +29,7 @@ class="text-sm">
|
||||
</div>
|
||||
|
||||
@include('components.modals.confirmation', [
|
||||
'modalName' => 'confirmation-modal',
|
||||
'modalName' => 'delete-confirmation',
|
||||
'modalTitle' => 'Apakah Anda yakin?',
|
||||
'modalMessage' => 'Data yang berelasi dengan data ini juga akan ikut terhapus.',
|
||||
'buttonVariant' => 'primary',
|
||||
|
||||
@ -18,7 +18,7 @@ class="text-sm">
|
||||
</div>
|
||||
|
||||
@include('components.modals.confirmation', [
|
||||
'modalName' => 'confirmation-modal',
|
||||
'modalName' => 'delete-confirmation',
|
||||
'modalTitle' => 'Apakah Anda yakin?',
|
||||
'modalMessage' => 'Data yang berelasi dengan data ini juga akan ikut terhapus.',
|
||||
'buttonVariant' => 'primary',
|
||||
|
||||
@ -21,7 +21,7 @@ class="text-sm">
|
||||
</div>
|
||||
|
||||
@include('components.modals.confirmation', [
|
||||
'modalName' => 'confirmation-modal',
|
||||
'modalName' => 'delete-confirmation',
|
||||
'modalTitle' => 'Apakah Anda yakin?',
|
||||
'modalMessage' => 'Data yang berelasi dengan data ini juga akan ikut terhapus.',
|
||||
'buttonVariant' => 'primary',
|
||||
|
||||
@ -25,7 +25,7 @@ class="text-sm">
|
||||
</div>
|
||||
|
||||
@include('components.modals.confirmation', [
|
||||
'modalName' => 'confirmation-modal',
|
||||
'modalName' => 'delete-confirmation',
|
||||
'modalTitle' => 'Apakah Anda yakin?',
|
||||
'modalMessage' => 'Data yang berelasi dengan data ini juga akan ikut terhapus.',
|
||||
'buttonVariant' => 'primary',
|
||||
|
||||
@ -62,7 +62,7 @@
|
||||
</flux:tooltip>
|
||||
|
||||
@if ($item->progress_percent == 100)
|
||||
<flux:modal.trigger name="confirmation-modal">
|
||||
<flux:modal.trigger name="delete-confirmation">
|
||||
<flux:tooltip content="Ajukan Persetujuan">
|
||||
<flux:button variant="primary" color="emerald" icon="document-check"
|
||||
size="sm"
|
||||
@ -80,7 +80,7 @@
|
||||
@endif
|
||||
|
||||
@if ($item->status === \App\Enums\StockOpnameStatus::PENDING_APPROVAL && auth()->user()->can('approve stock opname'))
|
||||
<flux:modal.trigger name="confirmation-modal">
|
||||
<flux:modal.trigger name="delete-confirmation">
|
||||
<flux:tooltip content="Setujui">
|
||||
<flux:button variant="primary" color="emerald" icon="check-circle" size="sm"
|
||||
wire:click="$dispatch('fn:confirmAction', {
|
||||
@ -103,7 +103,7 @@
|
||||
</div>
|
||||
|
||||
@include('components.modals.confirmation', [
|
||||
'modalName' => 'confirmation-modal',
|
||||
'modalName' => 'delete-confirmation',
|
||||
'modalTitle' => 'Apakah Anda yakin?',
|
||||
'modalMessage' => 'Data yang berelasi dengan data ini juga akan ikut terhapus.',
|
||||
'buttonVariant' => 'primary',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user