@@ -33,6 +33,8 @@ export function procurementNavigation(
|
||||
payables: boolean,
|
||||
publicPaths?: string[],
|
||||
orderCancellation = false,
|
||||
operationalOrders = false,
|
||||
privateAudit = false,
|
||||
): ProcurementGroup[] {
|
||||
const groups: ProcurementGroup[] = [
|
||||
{
|
||||
@@ -71,6 +73,18 @@ export function procurementNavigation(
|
||||
path: '/requisicoes?view=all',
|
||||
},
|
||||
{ id: 'planning', label: 'Planeamento', path: '/planeamento' },
|
||||
{
|
||||
id: 'operational_orders',
|
||||
label: 'Ordens de produção e manutenção',
|
||||
path: '/ordens-operacionais',
|
||||
roles: [
|
||||
'admin',
|
||||
'procurement',
|
||||
'requester',
|
||||
'production_order_prepare',
|
||||
'maintenance_order_prepare',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -501,6 +515,17 @@ export function procurementNavigation(
|
||||
path: '/auditoria/eventos',
|
||||
roles: ['audit_metadata_read'],
|
||||
},
|
||||
{
|
||||
id: 'audit_private',
|
||||
label: 'Exportação privada',
|
||||
path: '/auditoria/privada',
|
||||
roles: [
|
||||
'audit_private_purchasing_read',
|
||||
'audit_private_stock_read',
|
||||
'audit_private_finance_read',
|
||||
'audit_private_configuration_read',
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -568,6 +593,9 @@ export function procurementNavigation(
|
||||
)
|
||||
: (entry.id !== 'issued_order_cancellations' ||
|
||||
orderCancellation) &&
|
||||
(entry.id !== 'audit_private' || privateAudit) &&
|
||||
(entry.id !== 'operational_orders' ||
|
||||
operationalOrders) &&
|
||||
(entry.id !== 'new_request' ||
|
||||
!Array.isArray(role) ||
|
||||
role.includes('requester')) &&
|
||||
|
||||
Reference in New Issue
Block a user