@@ -32,6 +32,7 @@ export function procurementNavigation(
|
||||
role: string | string[],
|
||||
payables: boolean,
|
||||
publicPaths?: string[],
|
||||
orderCancellation = false,
|
||||
): ProcurementGroup[] {
|
||||
const groups: ProcurementGroup[] = [
|
||||
{
|
||||
@@ -108,6 +109,18 @@ export function procurementNavigation(
|
||||
path: '/ordens',
|
||||
roles: readers,
|
||||
},
|
||||
{
|
||||
id: 'issued_order_cancellations',
|
||||
label: 'Cancelamento de ordens',
|
||||
path: '/ordens/cancelamentos',
|
||||
roles: [
|
||||
'admin',
|
||||
'procurement',
|
||||
'finance',
|
||||
'requester',
|
||||
'department_head',
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'purchase_review',
|
||||
label: 'Revisão e cancelamento',
|
||||
@@ -472,6 +485,19 @@ export function procurementNavigation(
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'audit',
|
||||
label: 'Auditoria',
|
||||
icon: ShieldCheck,
|
||||
entries: [
|
||||
{
|
||||
id: 'audit_metadata',
|
||||
label: 'Eventos dos módulos',
|
||||
path: '/auditoria/eventos',
|
||||
roles: ['audit_metadata_read'],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
id: 'reports',
|
||||
label: 'Relatórios',
|
||||
@@ -535,7 +561,9 @@ export function procurementNavigation(
|
||||
? publicPaths.includes(
|
||||
new URL(entry.path, 'http://local').pathname,
|
||||
)
|
||||
: (entry.id !== 'new_request' ||
|
||||
: (entry.id !== 'issued_order_cancellations' ||
|
||||
orderCancellation) &&
|
||||
(entry.id !== 'new_request' ||
|
||||
!Array.isArray(role) ||
|
||||
role.includes('requester')) &&
|
||||
(!entry.roles ||
|
||||
|
||||
Reference in New Issue
Block a user