Enhance WorkersRelationManager actions to clear cache before editing and detaching workers; update BasicCarousel button classes for improved visibility on larger screens.
This commit is contained in:
+12
-5
@@ -150,19 +150,23 @@ class WorkersRelationManager extends RelationManager
|
||||
->before(function () {
|
||||
app(DivisionCacheService::class)->clearAllCacheByModel();
|
||||
})
|
||||
|
||||
])
|
||||
->actions([
|
||||
Tables\Actions\EditAction::make()
|
||||
->iconButton()
|
||||
->tooltip('Редактировать данные сотрудника'),
|
||||
|
||||
->tooltip('Редактировать данные сотрудника')
|
||||
->before(function () {
|
||||
app(DivisionCacheService::class)->clearAllCacheByModel();
|
||||
}),
|
||||
Tables\Actions\DetachAction::make()
|
||||
->iconButton()
|
||||
->tooltip('Убрать из подразделения')
|
||||
->modalHeading('Подтверждение удаления')
|
||||
->modalSubmitActionLabel('Убрать')
|
||||
->modalDescription('Вы уверены, что хотите убрать этого сотрудника из подразделения?'),
|
||||
->modalDescription('Вы уверены, что хотите убрать этого сотрудника из подразделения?')
|
||||
->before(function () {
|
||||
app(DivisionCacheService::class)->clearAllCacheByModel();
|
||||
})
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\BulkActionGroup::make([
|
||||
@@ -170,7 +174,10 @@ class WorkersRelationManager extends RelationManager
|
||||
->label('Убрать выбранных')
|
||||
->modalHeading('Подтверждение удаления')
|
||||
->modalSubmitActionLabel('Убрать')
|
||||
->modalDescription('Вы уверены, что хотите убрать выбранных сотрудников из подразделения?'),
|
||||
->modalDescription('Вы уверены, что хотите убрать выбранных сотрудников из подразделения?')
|
||||
->before(function () {
|
||||
app(DivisionCacheService::class)->clearAllCacheByModel();
|
||||
}),
|
||||
]),
|
||||
])
|
||||
->emptyStateActions([
|
||||
|
||||
@@ -26,14 +26,14 @@
|
||||
<button
|
||||
@click.stop="prev"
|
||||
:disabled="currentIndex === 0"
|
||||
class="absolute top-1/2 left-0 transform -translate-y-1/2 -ml-4 md:-ml-10 bg-gray-700/70 text-white p-2 rounded-full hover:bg-gray-600/90 focus:outline-none z-20 disabled:opacity-30 disabled:cursor-not-allowed transition-opacity"
|
||||
class="hidden md:absolute top-1/2 left-0 transform -translate-y-1/2 -ml-4 md:-ml-10 bg-gray-700/70 text-white p-2 rounded-full hover:bg-gray-600/90 focus:outline-none z-100000 disabled:opacity-30 disabled:cursor-not-allowed transition-opacity"
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" d="M15.75 19.5L8.25 12l7.5-7.5" /></svg>
|
||||
</button>
|
||||
<button
|
||||
@click.stop="next"
|
||||
:disabled="currentIndex >= maxScrollIndex"
|
||||
class="absolute top-1/2 right-0 transform -translate-y-1/2 -mr-4 md:-mr-10 bg-gray-700/70 text-white p-2 rounded-full hover:bg-gray-600/90 focus:outline-none z-20 disabled:opacity-30 disabled:cursor-not-allowed transition-opacity"
|
||||
class="hidden md:absolute top-1/2 right-0 transform -translate-y-1/2 -mr-4 md:-mr-10 bg-gray-700/70 text-white p-2 rounded-full hover:bg-gray-600/90 focus:outline-none z-100000 disabled:opacity-30 disabled:cursor-not-allowed transition-opacity"
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 4.5l7.5 7.5-7.5 7.5" /></svg>
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user