@@ -175,6 +175,14 @@ export default function Details() {
175
175
176
176
const allowedEditPanitia = [ "D01" , "D02" , "D05" , "D13" ] ; // divisi registrasi?
177
177
178
+ // exclude divisi D13 - Inspice (registrasi)
179
+ // cursed banget :(
180
+ const isSuntingAllowed =
181
+ auth . role === "organisator" ||
182
+ ( auth . role === "panit" &&
183
+ allowedEditPanitia . includes ( auth . user ?. divisiID ! ) &&
184
+ auth . user ?. divisiID !== "D13" ) ;
185
+
178
186
const columnsDetails : MUIDataTableColumn [ ] = [
179
187
{
180
188
label : "Nama" ,
@@ -231,6 +239,7 @@ export default function Details() {
231
239
disabled = {
232
240
auth . role !== "panit" ||
233
241
! allowedEditPanitia . includes ( auth . user ?. divisiID ! ) ||
242
+ auth . user ?. divisiID === "D05" ||
234
243
value
235
244
}
236
245
/>
@@ -272,6 +281,7 @@ export default function Details() {
272
281
disabled = {
273
282
auth . role !== "panit" ||
274
283
! allowedEditPanitia . includes ( auth . user ?. divisiID ! ) ||
284
+ auth . user ?. divisiID === "D05" ||
275
285
value
276
286
}
277
287
/>
@@ -290,9 +300,7 @@ export default function Details() {
290
300
showDashboardButton = { auth . role === "organisator" }
291
301
>
292
302
< Box w = { "full" } h = { "auto" } >
293
- { ( auth . role === "organisator" ||
294
- ( auth . role === "panit" &&
295
- allowedEditPanitia . includes ( auth . user ?. divisiID ! ) ) ) && (
303
+ { isSuntingAllowed && (
296
304
< Flex justifyContent = { "flex-end" } mb = { "2em" } >
297
305
< Button
298
306
h = { "2.25em" }
0 commit comments