fix: policy delete verified, navigationLabel divisi & iuran
This commit is contained in:
@@ -17,6 +17,7 @@ class DivisionResource extends Resource
|
|||||||
protected static ?string $model = Division::class;
|
protected static ?string $model = Division::class;
|
||||||
protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-rectangle-group';
|
protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-rectangle-group';
|
||||||
protected static string|\UnitEnum|null $navigationGroup = 'Organisasi';
|
protected static string|\UnitEnum|null $navigationGroup = 'Organisasi';
|
||||||
|
protected static ?string $navigationLabel = 'Divisi';
|
||||||
protected static ?string $modelLabel = 'Divisi';
|
protected static ?string $modelLabel = 'Divisi';
|
||||||
|
|
||||||
public static function form(Schema $form): Schema
|
public static function form(Schema $form): Schema
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class MemberDueResource extends Resource
|
|||||||
protected static ?string $model = MemberDue::class;
|
protected static ?string $model = MemberDue::class;
|
||||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedRectangleStack;
|
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedRectangleStack;
|
||||||
protected static string|\UnitEnum|null $navigationGroup = 'Organisasi';
|
protected static string|\UnitEnum|null $navigationGroup = 'Organisasi';
|
||||||
|
protected static ?string $navigationLabel = 'Iuran Anggota';
|
||||||
protected static ?string $modelLabel = 'Iuran Anggota';
|
protected static ?string $modelLabel = 'Iuran Anggota';
|
||||||
protected static ?string $pluralModelLabel = 'Iuran Anggota';
|
protected static ?string $pluralModelLabel = 'Iuran Anggota';
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class CashRecordPolicy
|
|||||||
|
|
||||||
public function delete(AuthUser $authUser, CashRecord $cashRecord): bool
|
public function delete(AuthUser $authUser, CashRecord $cashRecord): bool
|
||||||
{
|
{
|
||||||
return $authUser->can('Delete:CashRecord');
|
return $authUser->can('Delete:CashRecord') && $cashRecord->verified_at === null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function deleteAny(AuthUser $authUser): bool
|
public function deleteAny(AuthUser $authUser): bool
|
||||||
|
|||||||
Reference in New Issue
Block a user