fix(:datatable): menyesuaikan kolom aksi yang ditampilkan berdasarkan permission yang dimiliki
This commit is contained in:
parent
878644c30d
commit
9a3b4a57e2
@ -128,7 +128,8 @@ class='flex items-center space-x-2 bg-gray-50 border border-gray-200 rounded-lg
|
||||
|
||||
return $actions;
|
||||
})
|
||||
->html(),
|
||||
->html()
|
||||
->hideIf(auth()->user()->cannot('update bottle') && auth()->user()->cannot('delete bottle')),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -93,7 +93,8 @@ public function columns(): array
|
||||
|
||||
return $actions;
|
||||
})
|
||||
->html(),
|
||||
->html()
|
||||
->hideIf(auth()->user()->cannot('update brand') && auth()->user()->cannot('delete brand')),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -84,7 +84,8 @@ public function columns(): array
|
||||
|
||||
return $actions;
|
||||
})
|
||||
->html(),
|
||||
->html()
|
||||
->hideIf(auth()->user()->cannot('update category') && auth()->user()->cannot('delete category')),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -132,7 +132,7 @@ class='flex items-center space-x-2 bg-gray-50 border border-gray-200 rounded-lg
|
||||
return $actions;
|
||||
})
|
||||
->html()
|
||||
->hideIf(auth()->user()->cannot('update perfume', 'delete perfume')),
|
||||
->hideIf(auth()->user()->cannot('update perfume') && auth()->user()->cannot('delete perfume')),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -120,7 +120,8 @@ class='flex items-center space-x-2 bg-gray-50 border border-gray-200 rounded-lg
|
||||
|
||||
return $actions;
|
||||
})
|
||||
->html(),
|
||||
->html()
|
||||
->hideIf(auth()->user()->cannot('update product') && auth()->user()->cannot('delete product')),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -86,7 +86,8 @@ public function columns(): array
|
||||
|
||||
return $actions;
|
||||
})
|
||||
->html(),
|
||||
->html()
|
||||
->hideIf(auth()->user()->cannot('update choose us') && auth()->user()->cannot('delete choose us')),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -86,7 +86,8 @@ public function columns(): array
|
||||
|
||||
return $actions;
|
||||
})
|
||||
->html(),
|
||||
->html()
|
||||
->hideIf(auth()->user()->cannot('update perfume feature') && auth()->user()->cannot('delete perfume feature')),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -54,7 +54,8 @@ public function columns(): array
|
||||
|
||||
return $actions;
|
||||
})
|
||||
->html(),
|
||||
->html()
|
||||
->hideIf(auth()->user()->cannot('update expense') && auth()->user()->cannot('delete expense')),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -90,7 +90,8 @@ public function columns(): array
|
||||
|
||||
return $actions;
|
||||
})
|
||||
->html(),
|
||||
->html()
|
||||
->hideIf(auth()->user()->cannot('update customer') && auth()->user()->cannot('delete customer')),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -124,7 +124,8 @@ public function columns(): array
|
||||
|
||||
return $actions;
|
||||
})
|
||||
->html(),
|
||||
->html()
|
||||
->hideIf(auth()->user()->cannot('update voucher') && auth()->user()->cannot('delete voucher')),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -55,7 +55,8 @@ public function columns(): array
|
||||
|
||||
return $actions;
|
||||
})
|
||||
->html(),
|
||||
->html()
|
||||
->hideIf(auth()->user()->cannot('update artcile') && auth()->user()->cannot('delete artcile')),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -84,7 +84,8 @@ public function columns(): array
|
||||
|
||||
return $actions;
|
||||
})
|
||||
->html(),
|
||||
->html()
|
||||
->hideIf(auth()->user()->cannot('update faq') && auth()->user()->cannot('delete faq')),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -130,7 +130,8 @@ public function columns(): array
|
||||
|
||||
return $actions;
|
||||
})
|
||||
->html(),
|
||||
->html()
|
||||
->hideIf(auth()->user()->cannot('show order') && auth()->user()->cannot('delete order')),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -71,7 +71,8 @@ public function columns(): array
|
||||
|
||||
return $actions;
|
||||
})
|
||||
->html(),
|
||||
->html()
|
||||
->hideIf(auth()->user()->cannot('update purchase')),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user