@@ -24,6 +24,11 @@ export type ProcurementGroup = {
|
||||
icon: LucideIcon;
|
||||
entries: ProcurementEntry[];
|
||||
};
|
||||
export type CommonFinanceNavigation = {
|
||||
payments?: boolean;
|
||||
ledger?: boolean;
|
||||
configuration?: boolean;
|
||||
};
|
||||
const readers = ['admin', 'procurement', 'finance', 'department_head'];
|
||||
const finance = ['admin', 'finance'];
|
||||
const inventory = [...readers, 'warehouse'];
|
||||
@@ -36,6 +41,7 @@ export function procurementNavigation(
|
||||
operationalOrders = false,
|
||||
privateAudit = false,
|
||||
capitalRegister = false,
|
||||
commonFinance: CommonFinanceNavigation = {},
|
||||
): ProcurementGroup[] {
|
||||
const groups: ProcurementGroup[] = [
|
||||
{
|
||||
@@ -455,6 +461,28 @@ export function procurementNavigation(
|
||||
},
|
||||
]
|
||||
: []),
|
||||
...(commonFinance.payments === true
|
||||
? [
|
||||
{
|
||||
id: 'supplier_settlements',
|
||||
label: 'Pagamentos e afectações a facturas',
|
||||
path: '/supplier-payments',
|
||||
roles: finance,
|
||||
fullPage: true,
|
||||
},
|
||||
]
|
||||
: []),
|
||||
...(commonFinance.ledger === true
|
||||
? [
|
||||
{
|
||||
id: 'general_ledger',
|
||||
label: 'Diário, balancete e razão',
|
||||
path: '/general-ledger/cycle',
|
||||
roles: finance,
|
||||
fullPage: true,
|
||||
},
|
||||
]
|
||||
: []),
|
||||
{
|
||||
id: 'payments',
|
||||
label: 'Pagamentos externos',
|
||||
@@ -480,6 +508,16 @@ export function procurementNavigation(
|
||||
label: 'Administração e controlo',
|
||||
icon: ShieldCheck,
|
||||
entries: [
|
||||
...(commonFinance.configuration === true
|
||||
? [
|
||||
{
|
||||
id: 'finance_configuration',
|
||||
label: 'Configuração financeira',
|
||||
path: '/administracao/financeiro',
|
||||
roles: ['admin'],
|
||||
},
|
||||
]
|
||||
: []),
|
||||
{
|
||||
id: 'company',
|
||||
label: 'Empresa, equipa e centros',
|
||||
|
||||
Reference in New Issue
Block a user