commit compras3 2911
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-11-29 16:03:11 +02:00
parent 7da8d6c87a
commit 30bfb1a773
72 changed files with 10998 additions and 98 deletions
@@ -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',