Skip to content

Commit 02215a3

Browse files
committed
Refactor Tindak Lanjut policy methods to enable triwulan checks for create, update, delete, and replicate actions
1 parent e64aaf3 commit 02215a3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/Policies/TindakLanjutPolicy.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function create(): bool
3939

4040
return Policy::make()
4141
->allowedFor('kasubbag,koordinator')
42-
// ->andEqual(Helper::is_triwulan($tw), true)
42+
->andEqual(Helper::is_triwulan($tw), true)
4343
->get();
4444
}
4545

@@ -53,7 +53,7 @@ public function update(User $user, TindakLanjut $tindak_lanjut): bool
5353
return Policy::make()
5454
->allowedFor('kasubbag,koordinator')
5555
->withYear($tindak_lanjut->tahun)
56-
// ->andEqual(Helper::is_triwulan($tw), true)
56+
->andEqual(Helper::is_triwulan($tw), true)
5757
->get();
5858
}
5959

@@ -66,7 +66,7 @@ public function delete(User $user, TindakLanjut $tindak_lanjut): bool
6666

6767
return Policy::make()
6868
->allowedFor('kasubbag,koordinator')
69-
// ->andEqual(Helper::is_triwulan($tw), true)
69+
->andEqual(Helper::is_triwulan($tw), true)
7070
->withYear($tindak_lanjut->tahun)
7171
->get();
7272
}
@@ -80,7 +80,7 @@ public function replicate(User $user, TindakLanjut $tindak_lanjut): bool
8080

8181
return Policy::make()
8282
->allowedFor('kasubbag,koordinator')
83-
// ->andEqual(Helper::is_triwulan($tw), true)
83+
->andEqual(Helper::is_triwulan($tw), true)
8484
->withYear($tindak_lanjut->tahun)
8585
->get();
8686
}

0 commit comments

Comments
 (0)