Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd5166bd11 |
@@ -739,5 +739,445 @@
|
|||||||
"fiscal_acceptance_column": true,
|
"fiscal_acceptance_column": true,
|
||||||
"active_database_changed": false
|
"active_database_changed": false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"authorised_fiscal_rollout_execution_20261021": {
|
||||||
|
"recorded_utc": "2026-10-21T10:57:04.072315+00:00",
|
||||||
|
"authorisation": "Tempo authorised incorporating 4a4d1212 and the remaining source/rule registration, publication and consumer activation in current conversation",
|
||||||
|
"integrated_delta": "4a4d1212751726da6a71d465b3ea2266e720cf28",
|
||||||
|
"integration_completed": true,
|
||||||
|
"served_revision": {
|
||||||
|
"commit": "d3fe8a02ec7f5dcd01984c4f4a1eba18b5a0cf19",
|
||||||
|
"branch": "main",
|
||||||
|
"built_at": "2026-10-21T10:48:46.529930+00:00",
|
||||||
|
"manifest_sha256": "f417509cfa060240801c6a956a787a90d0e283c3c08e77b5be655d63394a4cb9"
|
||||||
|
},
|
||||||
|
"team_merge": "d3fe8a02 includes 4a4d1212; fiscal files unchanged; additional team navigation/presentation changes preserved",
|
||||||
|
"backup_restore": {
|
||||||
|
"utc": "2026-10-21T10:43:03.077516+00:00",
|
||||||
|
"source_database": "teste_investidor",
|
||||||
|
"served_commit": "226fd308dd45d2805ef4678b20ca4398d7fef6c6",
|
||||||
|
"backup_directory": "/var/backups/investmoz/iva-rollout-20261021_104253",
|
||||||
|
"dump_sha256": "b37bf4aad0abd839bc81d70adf802535ad7738fabe75fda61d74f39dfc11e74b",
|
||||||
|
"dump_bytes": 4584693,
|
||||||
|
"environment_backup_sha256": "537eff52f0f28b83ccc56bf9a9b85c2d8fca1da2f678c30b929b46c67c09491b",
|
||||||
|
"environment_path": "/var/www/html/teste-investidor.tempo.co.mz/.env",
|
||||||
|
"restore_database": "iva_rollout_20261021_104253_test",
|
||||||
|
"restore_database_public_connect": false,
|
||||||
|
"restore_equal": true,
|
||||||
|
"table_count": 171,
|
||||||
|
"method": "Exported repeatable-read snapshot, custom pg_dump, isolated restore, all public table counts and canonical row hashes compared",
|
||||||
|
"active_data_writes": false,
|
||||||
|
"qa_fixture_imported": false
|
||||||
|
},
|
||||||
|
"schema_operation": {
|
||||||
|
"utc": "2026-10-21T10:44:11.639087+00:00",
|
||||||
|
"operation": "Explicit authenticated destination schema application of reviewed QA DDL; QA migration not executed or weakened",
|
||||||
|
"authorisation": "Tempo current conversation",
|
||||||
|
"ssh_actor": "root",
|
||||||
|
"database": "teste_investidor",
|
||||||
|
"migration": "2026_10_21_130000_correct_fiscal_maintenance_actor_constraints",
|
||||||
|
"migration_sha256": "66102bc9f2f546c9a76df5c3cc03b0bf14e0b9f7afbcf4b2c75db6a047b223f9",
|
||||||
|
"ddl_sha256": "89125b27f5a8ce3855c9a4c0d8abe4e5821a298f54a8e084607212bc10956cd2",
|
||||||
|
"backup_directory": "/var/backups/investmoz/iva-rollout-20261021_104253",
|
||||||
|
"existing_rows_preserved": true,
|
||||||
|
"unrelated_constraints_preserved": true,
|
||||||
|
"qa_fixture_imported": false
|
||||||
|
},
|
||||||
|
"schema_contract": {
|
||||||
|
"utc": "2026-10-21T10:46:20.853594+00:00",
|
||||||
|
"target": "4a4d1212751726da6a71d465b3ea2266e720cf28",
|
||||||
|
"reviewed_schema_delta": [
|
||||||
|
"database/migrations/2026_10_21_130000_correct_fiscal_maintenance_actor_constraints.php"
|
||||||
|
],
|
||||||
|
"compatibility_decision": "Tempo authorised correction; reviewed destination DDL applied with restored backup and preserved existing rows. Consumer remains off. Executor retains no-migration policy.",
|
||||||
|
"schema_contract_sha256": "4bf1ed9c79a795e55f83785efad54ed6b5beb4ac205644887a9a672a352917ae"
|
||||||
|
},
|
||||||
|
"consumer_availability": {
|
||||||
|
"enabled": true,
|
||||||
|
"coverage_start": "2026-01-01",
|
||||||
|
"coverage_end": "2026-12-31",
|
||||||
|
"message": "IVA geral sobre base líquida disponível; enquadramento declarado."
|
||||||
|
},
|
||||||
|
"rule_publication_completed": true,
|
||||||
|
"consumer_activation_completed": true,
|
||||||
|
"qa_fixture_imported": false,
|
||||||
|
"accepted_calculation_export_proofs_repeated": false,
|
||||||
|
"user_local_file_review_claimed": false,
|
||||||
|
"legal_opinion_attributed_to_user": false,
|
||||||
|
"authentication_note": "Normal portal login and MFA completed by user through loopback-only browser helper. Real account nala@tempo.co.mz (ID15) performed source registration and all governance stages through existing HTTPS endpoints. Cookies remained in memory; password/MFA not logged or saved. Synthetic QA session not used. Tool-created console not visible to user and Edge automation timeouts were limitations of tooling; browser helper access succeeded manually.",
|
||||||
|
"real_rule": {
|
||||||
|
"id": "01a15e1a-5338-700f-8a45-f87707d696a7",
|
||||||
|
"rule_code": "IVA-GERAL-BASE-LIQUIDA",
|
||||||
|
"rule_version": 1,
|
||||||
|
"component": "IVA",
|
||||||
|
"scope_key": "mz.internal-general-net.mzn",
|
||||||
|
"valid_from": "2023-01-01",
|
||||||
|
"valid_until": null,
|
||||||
|
"status": "published",
|
||||||
|
"rule_definition": {
|
||||||
|
"nodes": {
|
||||||
|
"base": {
|
||||||
|
"op": "input",
|
||||||
|
"key": "base_tributavel"
|
||||||
|
},
|
||||||
|
"rate": {
|
||||||
|
"op": "parameter",
|
||||||
|
"key": "iva_general_rate"
|
||||||
|
},
|
||||||
|
"hundred": {
|
||||||
|
"op": "literal",
|
||||||
|
"value": "100"
|
||||||
|
},
|
||||||
|
"product": {
|
||||||
|
"op": "multiply",
|
||||||
|
"args": [
|
||||||
|
"base",
|
||||||
|
"rate"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"intermediate": {
|
||||||
|
"op": "divide",
|
||||||
|
"args": [
|
||||||
|
"product",
|
||||||
|
"hundred"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": "intermediate",
|
||||||
|
"language": "investmoz.tax.v1"
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"IVA_GENERAL_RATE": {
|
||||||
|
"unit": "percent",
|
||||||
|
"value": "16",
|
||||||
|
"conditions": {
|
||||||
|
"currency": "MZN",
|
||||||
|
"operation": "internal_general_net"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rounding_policy": {
|
||||||
|
"ties": "not_applicable_without_rounding",
|
||||||
|
"method": "none",
|
||||||
|
"status": "not_applied",
|
||||||
|
"purpose": "operation_tax_not_payment",
|
||||||
|
"evidence": "Orientação expressa Tempo: calcular este lote IVA sem arredondamento automático; ficha v1.2",
|
||||||
|
"precision": "exact_decimal",
|
||||||
|
"aggregation": "single_declared_taxable_base",
|
||||||
|
"coverage_end": "2026-12-31",
|
||||||
|
"coverage_start": "2026-01-01"
|
||||||
|
},
|
||||||
|
"legal_source_id": "01a15e1a-44a8-7316-82ba-008c432609ef",
|
||||||
|
"source_version_no": 1,
|
||||||
|
"source_sha256": "ea1b0dc6f5cf6e595f6d9a19e7042f398999e0087caef1785f6e8fac571b5f53",
|
||||||
|
"author_id": 15,
|
||||||
|
"reviewer_id": 15,
|
||||||
|
"approver_id": 15,
|
||||||
|
"publisher_id": 15,
|
||||||
|
"review_evidence": "Manutenção fiscal autorizada pela Tempo nesta conversa; ficha v1.2 e fontes oficiais aceites em08/10/2026. Mesma conta autorizada, sem parecer jurídico ou revisão independente. civa2016=01a15e1a-3f26-713b-8964-3511cb2fea08 SHA256 b90dc7c14ecea2e378c4a62e8e5a47d54a5644c457baeb8b8053b92fd2a5710b; iva2022=01a15e1a-44a8-7316-82ba-008c432609ef SHA256 ea1b0dc6f5cf6e595f6d9a19e7042f398999e0087caef1785f6e8fac571b5f53; iva2025=01a15e1a-4dc2-7021-bbd4-6052db9fcf36 SHA256 ccf2a8deeca820f2dd076b4b2141b1efe3f6a806568c3a587ca59a8e92f4c251. Conferência técnica do cadastro contra a ficha e os exemplares já documentados. Excluídos preço comIVA incluído, taxas reduzidas, isenções, regimes especiais, importações, digitais não residentes, dedução/crédito/reembolso, incentivos, pagamento/declaração e outros impostos. Não certifica elegibilidade individual.",
|
||||||
|
"approval_evidence": "Manutenção fiscal autorizada pela Tempo nesta conversa; ficha v1.2 e fontes oficiais aceites em08/10/2026. Mesma conta autorizada, sem parecer jurídico ou revisão independente. civa2016=01a15e1a-3f26-713b-8964-3511cb2fea08 SHA256 b90dc7c14ecea2e378c4a62e8e5a47d54a5644c457baeb8b8053b92fd2a5710b; iva2022=01a15e1a-44a8-7316-82ba-008c432609ef SHA256 ea1b0dc6f5cf6e595f6d9a19e7042f398999e0087caef1785f6e8fac571b5f53; iva2025=01a15e1a-4dc2-7021-bbd4-6052db9fcf36 SHA256 ccf2a8deeca820f2dd076b4b2141b1efe3f6a806568c3a587ca59a8e92f4c251. Aprovação operacional do lote delimitado já autorizada pela Tempo; não é validação jurídica atribuída ao utilizador. Estimativa de IVA calculado sobre base declarada, sem apuramento final do imposto a pagar. Precisão calculada distinta de apresentação monetária.",
|
||||||
|
"publication_evidence": "Manutenção fiscal autorizada pela Tempo nesta conversa; ficha v1.2 e fontes oficiais aceites em08/10/2026. Mesma conta autorizada, sem parecer jurídico ou revisão independente. civa2016=01a15e1a-3f26-713b-8964-3511cb2fea08 SHA256 b90dc7c14ecea2e378c4a62e8e5a47d54a5644c457baeb8b8053b92fd2a5710b; iva2022=01a15e1a-44a8-7316-82ba-008c432609ef SHA256 ea1b0dc6f5cf6e595f6d9a19e7042f398999e0087caef1785f6e8fac571b5f53; iva2025=01a15e1a-4dc2-7021-bbd4-6052db9fcf36 SHA256 ccf2a8deeca820f2dd076b4b2141b1efe3f6a806568c3a587ca59a8e92f4c251. Publicação apenas da versão1 fundamentada. Taxa eficaz desde01/01/2023, cobertura do consumidor01/01/2026–31/12/2026. Activação continua separada. Suspensão recusa novas admissões; execuções admitidas conservam versão congelada, históricos e relatórios.",
|
||||||
|
"closure_evidence": null,
|
||||||
|
"submitted_at": "2026-10-21 10:55:47+00",
|
||||||
|
"reviewed_at": "2026-10-21T10:55:49.000000Z",
|
||||||
|
"approved_at": "2026-10-21T10:55:51.000000Z",
|
||||||
|
"published_at": "2026-10-21T10:55:53.000000Z",
|
||||||
|
"suspended_at": null,
|
||||||
|
"archived_at": null,
|
||||||
|
"version_no": 5,
|
||||||
|
"created_at": "2026-10-21T10:55:45.000000Z",
|
||||||
|
"updated_at": "2026-10-21T10:55:53.000000Z"
|
||||||
|
},
|
||||||
|
"real_sources": {
|
||||||
|
"civa2016": {
|
||||||
|
"id": "01a15e1a-3f26-713b-8964-3511cb2fea08",
|
||||||
|
"title": "Lei n.º 13/2016 — CIVA republicado",
|
||||||
|
"url": "https://www.inm.gov.mz/pt-br/content/suplemento-n%C2%BA-10-de-301216-pag-1426-259-290-br-n%C2%BA-156-boletim-da-rep%C3%BAblica-i-serie",
|
||||||
|
"diploma": "Lei 13/2016",
|
||||||
|
"article": "Arts. 1–4, 6–7, 15, 17(2), 27 do CIVA; art. 4 da Lei",
|
||||||
|
"competent_entity": "Assembleia da República de Moçambique",
|
||||||
|
"valid_from": "2017-01-01",
|
||||||
|
"valid_until": null,
|
||||||
|
"validation_status": "pending",
|
||||||
|
"owner_id": 15,
|
||||||
|
"validator_id": null,
|
||||||
|
"validated_at": null,
|
||||||
|
"version_no": 1,
|
||||||
|
"created_at": "2026-10-21T10:55:40.000000Z",
|
||||||
|
"updated_at": "2026-10-21T10:55:40.000000Z",
|
||||||
|
"fiscal_acceptance": {
|
||||||
|
"basis": "Tempo-official-sources-20261008",
|
||||||
|
"scope": "fiscal_parameters",
|
||||||
|
"sha256": "b90dc7c14ecea2e378c4a62e8e5a47d54a5644c457baeb8b8053b92fd2a5710b",
|
||||||
|
"citation": "BR156, 10.º suplemento, 30/12/2016. PDF6–8,13–14,17–18: âmbito, base tributável declarada e cálculo. Taxa histórica 17% não utilizada. Consulta dirigida da ficha v1.2; não certifica anexos ou elegibilidade individual.",
|
||||||
|
"accepted_at": "2026-10-21T10:55:40.836454Z",
|
||||||
|
"legal_opinion": false,
|
||||||
|
"official_origin": "Boletim da República; exemplar do acervo oficial já aceite pela decisão Tempo de 08/10/2026, arquivado em docs/investmoz/simulations/source-archive/Lei-13-2016-CIVA-BR-156-10-suplemento.pdf. Cadastro fiscal rastreável; sem atribuição de parecer jurídico ou revisão independente à Tempo.",
|
||||||
|
"independent_review": false,
|
||||||
|
"responsible_user_id": 15
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"iva2022": {
|
||||||
|
"id": "01a15e1a-44a8-7316-82ba-008c432609ef",
|
||||||
|
"title": "Lei n.º 22/2022 — republicação oficial do IVA",
|
||||||
|
"url": "https://www.inm.gov.mz/pt-br/content/assembleia-da-rep%C3%BAblica-suplemento-n%C2%BA-2-de-281222-pag-2252-25-42-br-n%C2%BA-250-boletim-da",
|
||||||
|
"diploma": "Lei 22/2022",
|
||||||
|
"article": "Art. 17(1) do CIVA e art. 6 da Lei",
|
||||||
|
"competent_entity": "Assembleia da República de Moçambique",
|
||||||
|
"valid_from": "2023-01-01",
|
||||||
|
"valid_until": null,
|
||||||
|
"validation_status": "pending",
|
||||||
|
"owner_id": 15,
|
||||||
|
"validator_id": null,
|
||||||
|
"validated_at": null,
|
||||||
|
"version_no": 1,
|
||||||
|
"created_at": "2026-10-21T10:55:42.000000Z",
|
||||||
|
"updated_at": "2026-10-21T10:55:42.000000Z",
|
||||||
|
"fiscal_acceptance": {
|
||||||
|
"basis": "Tempo-official-sources-20261008",
|
||||||
|
"scope": "fiscal_parameters",
|
||||||
|
"sha256": "ea1b0dc6f5cf6e595f6d9a19e7042f398999e0087caef1785f6e8fac571b5f53",
|
||||||
|
"citation": "BR250, 2.º suplemento, 28/12/2022; PDF3/BR2252-(27): taxa geral 16%; PDF4, art.6: eficácia 01/01/2023. Exemplar republicado; publicação inicial sem efeito. Aplicação delimitada à base líquida declarada em MZN e cobertura do consumidor 2026, ficha v1.2.",
|
||||||
|
"accepted_at": "2026-10-21T10:55:42.246583Z",
|
||||||
|
"legal_opinion": false,
|
||||||
|
"official_origin": "Boletim da República; exemplar do acervo oficial já aceite pela decisão Tempo de 08/10/2026, arquivado em docs/investmoz/simulations/source-archive/Lei-22-2022-IVA-republicada-BR-250-2-suplemento.pdf. Cadastro fiscal rastreável; sem atribuição de parecer jurídico ou revisão independente à Tempo.",
|
||||||
|
"independent_review": false,
|
||||||
|
"responsible_user_id": 15
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"iva2025": {
|
||||||
|
"id": "01a15e1a-4dc2-7021-bbd4-6052db9fcf36",
|
||||||
|
"title": "Lei n.º 10/2025 — alterações ao CIVA, BR248 suplemento1",
|
||||||
|
"url": "https://www.at.gov.mz/api/webdav?path=%2FLEGISLA%C3%87%C3%83O%2FLEGISLA%C3%87%C3%83O%20FISCAL%2FLEI%2FBR_248_I_SERIE_SUPLEMENTO_2025.pdf",
|
||||||
|
"diploma": "Lei 10/2025",
|
||||||
|
"article": "Art. 1 (artigos alterados) e disposição de entrada em vigor",
|
||||||
|
"competent_entity": "Assembleia da República de Moçambique",
|
||||||
|
"valid_from": "2026-01-01",
|
||||||
|
"valid_until": null,
|
||||||
|
"validation_status": "pending",
|
||||||
|
"owner_id": 15,
|
||||||
|
"validator_id": null,
|
||||||
|
"validated_at": null,
|
||||||
|
"version_no": 1,
|
||||||
|
"created_at": "2026-10-21T10:55:44.000000Z",
|
||||||
|
"updated_at": "2026-10-21T10:55:44.000000Z",
|
||||||
|
"fiscal_acceptance": {
|
||||||
|
"basis": "Tempo-official-sources-20261008",
|
||||||
|
"scope": "fiscal_parameters",
|
||||||
|
"sha256": "ccf2a8deeca820f2dd076b4b2141b1efe3f6a806568c3a587ca59a8e92f4c251",
|
||||||
|
"citation": "BR248, suplemento1, 29/12/2025, PDF12–15: Lei10/2025 efectiva 01/01/2026; não altera arts.15/17 nas disposições consultadas. Apoio à cadeia temporal 2026 do lote delimitado, não implementação de regimes ou obrigações adicionais.",
|
||||||
|
"accepted_at": "2026-10-21T10:55:44.576628Z",
|
||||||
|
"legal_opinion": false,
|
||||||
|
"official_origin": "Boletim da República; exemplar do acervo oficial já aceite pela decisão Tempo de 08/10/2026, arquivado em docs/investmoz/simulations/source-archive/BR-248-I-Suplemento-1-2025.pdf. Cadastro fiscal rastreável; sem atribuição de parecer jurídico ou revisão independente à Tempo.",
|
||||||
|
"independent_review": false,
|
||||||
|
"responsible_user_id": 15
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"publication_events": [
|
||||||
|
{
|
||||||
|
"action": "submit",
|
||||||
|
"status": "submitted",
|
||||||
|
"version_no": 2,
|
||||||
|
"utc": "2026-10-21T10:55:48.179954+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"action": "review",
|
||||||
|
"status": "reviewed",
|
||||||
|
"version_no": 3,
|
||||||
|
"utc": "2026-10-21T10:55:50.198403+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"action": "approve",
|
||||||
|
"status": "approved",
|
||||||
|
"version_no": 4,
|
||||||
|
"utc": "2026-10-21T10:55:52.268896+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"action": "publish",
|
||||||
|
"status": "published",
|
||||||
|
"version_no": 5,
|
||||||
|
"utc": "2026-10-21T10:55:54.303429+00:00"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"activation": {
|
||||||
|
"utc": "2026-10-21T10:55:58.330391+00:00",
|
||||||
|
"authorisation": "Tempo current conversation, separate consumer activation",
|
||||||
|
"served_revision": {
|
||||||
|
"commit": "d3fe8a02ec7f5dcd01984c4f4a1eba18b5a0cf19",
|
||||||
|
"branch": "main",
|
||||||
|
"built_at": "2026-10-21T10:48:46.529930+00:00",
|
||||||
|
"manifest_sha256": "f417509cfa060240801c6a956a787a90d0e283c3c08e77b5be655d63394a4cb9"
|
||||||
|
},
|
||||||
|
"rule": {
|
||||||
|
"id": "01a15e1a-5338-700f-8a45-f87707d696a7",
|
||||||
|
"rule_code": "IVA-GERAL-BASE-LIQUIDA",
|
||||||
|
"rule_version": 1,
|
||||||
|
"status": "published",
|
||||||
|
"source_sha256": "ea1b0dc6f5cf6e595f6d9a19e7042f398999e0087caef1785f6e8fac571b5f53",
|
||||||
|
"legal_source_id": "01a15e1a-44a8-7316-82ba-008c432609ef",
|
||||||
|
"source_version_no": 1,
|
||||||
|
"version_no": 5,
|
||||||
|
"author_id": 15,
|
||||||
|
"reviewer_id": 15,
|
||||||
|
"approver_id": 15,
|
||||||
|
"publisher_id": 15
|
||||||
|
},
|
||||||
|
"consumer_enabled": true,
|
||||||
|
"configuration_keys_changed": [
|
||||||
|
"INVESTMOZ_IVA_CONSUMER_ENABLED",
|
||||||
|
"INVESTMOZ_IVA_CONSUMER_RULE_ID",
|
||||||
|
"INVESTMOZ_IVA_CONSUMER_RULE_VERSION"
|
||||||
|
],
|
||||||
|
"other_configuration_preserved": true,
|
||||||
|
"before_environment_sha256": "537eff52f0f28b83ccc56bf9a9b85c2d8fca1da2f678c30b929b46c67c09491b",
|
||||||
|
"after_environment_sha256": "7cdaba591bb5787485a349c24db2fd7c8279436da0eb31502e44db2fffa21d03",
|
||||||
|
"histories_preserved": true,
|
||||||
|
"accepted_calculation_export_tests_repeated": false,
|
||||||
|
"qa_fixture_imported": false
|
||||||
|
},
|
||||||
|
"destination_delta_read_only": {
|
||||||
|
"utc": "2026-10-21T10:56:37.650967+00:00",
|
||||||
|
"read_only": true,
|
||||||
|
"served": {
|
||||||
|
"commit": "d3fe8a02ec7f5dcd01984c4f4a1eba18b5a0cf19",
|
||||||
|
"branch": "main",
|
||||||
|
"built_at": "2026-10-21T10:48:46.529930+00:00",
|
||||||
|
"manifest_sha256": "f417509cfa060240801c6a956a787a90d0e283c3c08e77b5be655d63394a4cb9"
|
||||||
|
},
|
||||||
|
"inventory": {
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"id": "01a15e1a-3f26-713b-8964-3511cb2fea08",
|
||||||
|
"title": "Lei n.º 13/2016 — CIVA republicado",
|
||||||
|
"diploma": "Lei 13/2016",
|
||||||
|
"article": "Arts. 1–4, 6–7, 15, 17(2), 27 do CIVA; art. 4 da Lei",
|
||||||
|
"version_no": 1,
|
||||||
|
"validation_status": "pending",
|
||||||
|
"owner_id": 15,
|
||||||
|
"fiscal_acceptance": {
|
||||||
|
"basis": "Tempo-official-sources-20261008",
|
||||||
|
"scope": "fiscal_parameters",
|
||||||
|
"sha256": "b90dc7c14ecea2e378c4a62e8e5a47d54a5644c457baeb8b8053b92fd2a5710b",
|
||||||
|
"citation": "BR156, 10.º suplemento, 30/12/2016. PDF6–8,13–14,17–18: âmbito, base tributável declarada e cálculo. Taxa histórica 17% não utilizada. Consulta dirigida da ficha v1.2; não certifica anexos ou elegibilidade individual.",
|
||||||
|
"accepted_at": "2026-10-21T10:55:40.836454Z",
|
||||||
|
"legal_opinion": false,
|
||||||
|
"official_origin": "Boletim da República; exemplar do acervo oficial já aceite pela decisão Tempo de 08/10/2026, arquivado em docs/investmoz/simulations/source-archive/Lei-13-2016-CIVA-BR-156-10-suplemento.pdf. Cadastro fiscal rastreável; sem atribuição de parecer jurídico ou revisão independente à Tempo.",
|
||||||
|
"independent_review": false,
|
||||||
|
"responsible_user_id": 15
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "01a15e1a-44a8-7316-82ba-008c432609ef",
|
||||||
|
"title": "Lei n.º 22/2022 — republicação oficial do IVA",
|
||||||
|
"diploma": "Lei 22/2022",
|
||||||
|
"article": "Art. 17(1) do CIVA e art. 6 da Lei",
|
||||||
|
"version_no": 1,
|
||||||
|
"validation_status": "pending",
|
||||||
|
"owner_id": 15,
|
||||||
|
"fiscal_acceptance": {
|
||||||
|
"basis": "Tempo-official-sources-20261008",
|
||||||
|
"scope": "fiscal_parameters",
|
||||||
|
"sha256": "ea1b0dc6f5cf6e595f6d9a19e7042f398999e0087caef1785f6e8fac571b5f53",
|
||||||
|
"citation": "BR250, 2.º suplemento, 28/12/2022; PDF3/BR2252-(27): taxa geral 16%; PDF4, art.6: eficácia 01/01/2023. Exemplar republicado; publicação inicial sem efeito. Aplicação delimitada à base líquida declarada em MZN e cobertura do consumidor 2026, ficha v1.2.",
|
||||||
|
"accepted_at": "2026-10-21T10:55:42.246583Z",
|
||||||
|
"legal_opinion": false,
|
||||||
|
"official_origin": "Boletim da República; exemplar do acervo oficial já aceite pela decisão Tempo de 08/10/2026, arquivado em docs/investmoz/simulations/source-archive/Lei-22-2022-IVA-republicada-BR-250-2-suplemento.pdf. Cadastro fiscal rastreável; sem atribuição de parecer jurídico ou revisão independente à Tempo.",
|
||||||
|
"independent_review": false,
|
||||||
|
"responsible_user_id": 15
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "01a15e1a-4dc2-7021-bbd4-6052db9fcf36",
|
||||||
|
"title": "Lei n.º 10/2025 — alterações ao CIVA, BR248 suplemento1",
|
||||||
|
"diploma": "Lei 10/2025",
|
||||||
|
"article": "Art. 1 (artigos alterados) e disposição de entrada em vigor",
|
||||||
|
"version_no": 1,
|
||||||
|
"validation_status": "pending",
|
||||||
|
"owner_id": 15,
|
||||||
|
"fiscal_acceptance": {
|
||||||
|
"basis": "Tempo-official-sources-20261008",
|
||||||
|
"scope": "fiscal_parameters",
|
||||||
|
"sha256": "ccf2a8deeca820f2dd076b4b2141b1efe3f6a806568c3a587ca59a8e92f4c251",
|
||||||
|
"citation": "BR248, suplemento1, 29/12/2025, PDF12–15: Lei10/2025 efectiva 01/01/2026; não altera arts.15/17 nas disposições consultadas. Apoio à cadeia temporal 2026 do lote delimitado, não implementação de regimes ou obrigações adicionais.",
|
||||||
|
"accepted_at": "2026-10-21T10:55:44.576628Z",
|
||||||
|
"legal_opinion": false,
|
||||||
|
"official_origin": "Boletim da República; exemplar do acervo oficial já aceite pela decisão Tempo de 08/10/2026, arquivado em docs/investmoz/simulations/source-archive/BR-248-I-Suplemento-1-2025.pdf. Cadastro fiscal rastreável; sem atribuição de parecer jurídico ou revisão independente à Tempo.",
|
||||||
|
"independent_review": false,
|
||||||
|
"responsible_user_id": 15
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"rules": [
|
||||||
|
{
|
||||||
|
"id": "01a15e1a-5338-700f-8a45-f87707d696a7",
|
||||||
|
"rule_code": "IVA-GERAL-BASE-LIQUIDA",
|
||||||
|
"rule_version": 1,
|
||||||
|
"status": "published",
|
||||||
|
"valid_from": "2023-01-01",
|
||||||
|
"valid_until": null,
|
||||||
|
"legal_source_id": "01a15e1a-44a8-7316-82ba-008c432609ef",
|
||||||
|
"source_sha256": "ea1b0dc6f5cf6e595f6d9a19e7042f398999e0087caef1785f6e8fac571b5f53",
|
||||||
|
"source_version_no": 1,
|
||||||
|
"version_no": 5,
|
||||||
|
"author_id": 15,
|
||||||
|
"reviewer_id": 15,
|
||||||
|
"approver_id": 15,
|
||||||
|
"publisher_id": 15
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"event_count": 5,
|
||||||
|
"historical_counts": {
|
||||||
|
"results": 0,
|
||||||
|
"reports": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"consumer": {
|
||||||
|
"database": "teste_investidor",
|
||||||
|
"binding": {
|
||||||
|
"enabled": true,
|
||||||
|
"rule_id": "01a15e1a-5338-700f-8a45-f87707d696a7",
|
||||||
|
"rule_version": 1
|
||||||
|
},
|
||||||
|
"availability": {
|
||||||
|
"enabled": true,
|
||||||
|
"coverage_start": "2026-01-01",
|
||||||
|
"coverage_end": "2026-12-31",
|
||||||
|
"message": "IVA geral sobre base líquida disponível; enquadramento declarado."
|
||||||
|
},
|
||||||
|
"parameter_resolution_without_calculation": {
|
||||||
|
"parameter_code": "IVA_GENERAL_RATE",
|
||||||
|
"status": "resolved",
|
||||||
|
"value": "16",
|
||||||
|
"unit": "percent",
|
||||||
|
"conditions": {
|
||||||
|
"currency": "MZN",
|
||||||
|
"operation": "internal_general_net"
|
||||||
|
},
|
||||||
|
"scope_key": "mz.internal-general-net.mzn",
|
||||||
|
"rule_code": "IVA-GERAL-BASE-LIQUIDA",
|
||||||
|
"rule_id": "01a15e1a-5338-700f-8a45-f87707d696a7",
|
||||||
|
"rule_version": 1,
|
||||||
|
"period": {
|
||||||
|
"start": "2026-10-21",
|
||||||
|
"end": "2026-10-21"
|
||||||
|
},
|
||||||
|
"validity": {
|
||||||
|
"start": "2023-01-01",
|
||||||
|
"end": null
|
||||||
|
},
|
||||||
|
"source": {
|
||||||
|
"title": "Lei n.º 22/2022 — republicação oficial do IVA",
|
||||||
|
"diploma": "Lei 22/2022",
|
||||||
|
"article": "Art. 17(1) do CIVA e art. 6 da Lei",
|
||||||
|
"url": "https://www.inm.gov.mz/pt-br/content/assembleia-da-rep%C3%BAblica-suplemento-n%C2%BA-2-de-281222-pag-2252-25-42-br-n%C2%BA-250-boletim-da",
|
||||||
|
"declared_sha256": "ea1b0dc6f5cf6e595f6d9a19e7042f398999e0087caef1785f6e8fac571b5f53"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"qa_fixture_imported": false,
|
||||||
|
"calculations_exporters_repeated": false
|
||||||
|
},
|
||||||
|
"remaining": []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1943,3 +1943,21 @@ O backup/restauro anterior à escrita ficou comprovado em21/10/2026 às10:18:00U
|
|||||||
3. **Activação do consumidor:** permanece separada da publicação. Aplicar a ligação aoID e `rule_version` reais autorizados e o interruptor de activação pelo procedimento já definido, conservando cálculo sobre base declarada como estimativa, sem apuramento final do imposto a pagar. Conferir somente a revisão/regra efectivamente servidas e o delta no destino. Desactivar o consumidor ou suspender a regra recusa novas admissões, preservando as já admitidas, históricos e relatórios.
|
3. **Activação do consumidor:** permanece separada da publicação. Aplicar a ligação aoID e `rule_version` reais autorizados e o interruptor de activação pelo procedimento já definido, conservando cálculo sobre base declarada como estimativa, sem apuramento final do imposto a pagar. Conferir somente a revisão/regra efectivamente servidas e o delta no destino. Desactivar o consumidor ou suspender a regra recusa novas admissões, preservando as já admitidas, históricos e relatórios.
|
||||||
|
|
||||||
**Saldo actual:** controlo corrigido e verificado emQA, fontes e funcionamento do cálculo não reabertos; sem nova publicação ou activação na homologação. A referência servida continua226fd308 e o consumidor desligado. A correcção não foi aplicada ao esquema activo. A indicação do responsável e a autorização operacional não são tratadas como conferência de ficheiros locais ou validação jurídica da Tempo. Esta actualização substitui a indicação anterior de que a simples falta de quatro listas configuradas bloqueava obrigatoriamente a disponibilização.
|
**Saldo actual:** controlo corrigido e verificado emQA, fontes e funcionamento do cálculo não reabertos; sem nova publicação ou activação na homologação. A referência servida continua226fd308 e o consumidor desligado. A correcção não foi aplicada ao esquema activo. A indicação do responsável e a autorização operacional não são tratadas como conferência de ficheiros locais ou validação jurídica da Tempo. Esta actualização substitui a indicação anterior de que a simples falta de quatro listas configuradas bloqueava obrigatoriamente a disponibilização.
|
||||||
|
|
||||||
|
### Execução autorizada da correcção fiscal — 21/10/2026
|
||||||
|
|
||||||
|
A Tempo autorizou incorporar4a4d1212 e concluir apenas as operações pendentes. A correcção foi integrada emmain; a equipa integrou entretanto d3fe8a02, que inclui4a4d1212 e conserva o mesmo código fiscal. A revisão efectivamente servida, conferida em `/build/revision.json`, é `d3fe8a02ec7f5dcd01984c4f4a1eba18b5a0cf19`. Não se reinstalou226fd308.
|
||||||
|
|
||||||
|
Backup/restauro actualizado: `/var/backups/investmoz/iva-rollout-20261021_104253`, dumpSHA256 `b37bf4aad0abd839bc81d70adf802535ad7738fabe75fda61d74f39dfc11e74b`; restauro isolado `iva_rollout_20261021_104253_test`,171tabelas com contagens e hashes coincidentes. A operação técnica autenticada aplicou exclusivamente oDDL revisto, com registos/históricos e constraints alheias preservados. A migration protegida não foi executada na base activa nem teve a guarda enfraquecida. O contrato do executor foi actualizado apenas para essa migration, após registo da compatibilidade; a primeira disponibilização conservou a release anterior ao encontrar a alteração de esquema. A retoma usou o mesmo executor e não passou a executar migrations no destino.
|
||||||
|
|
||||||
|
Publicação e activação concluídas conforme recibo. O consumidor está activo. Não foram repetidas provas aceites do cálculo, precisão, exportadores ouPDF, nem importada a fixtureQA. A autenticação da infraestrutura não é identidade administrativa do portal. A conta Christiana/example.test reportada pelo utilizador pertence ao ensaio local anterior e não é usada no destino.
|
||||||
|
|
||||||
|
Mantém-se o procedimento único: **1)** código/controlo do esquema, agora integrados; **2)** cadastro das fontes reais com hash/citação e da versão1 `IVA-GERAL-BASE-LIQUIDA`, seguido das etapas autenticadas pelo mesmo responsável autorizado; **3)** activação separada, ligando o consumidor aoID e versão publicados. Cobertura2026, operação interna geral sobre base líquida declarada emMZN; excluídos preços comIVA incluído, taxas reduzidas, isenções, regimes especiais, importações, digitais não residentes, deduções/créditos/reembolsos, incentivos, pagamento/declaração e outros impostos. O resultado é estimativa deIVA sobre a base declarada, não apuramento final a pagar.
|
||||||
|
|
||||||
|
Para suspender, desligar `INVESTMOZ_IVA_CONSUMER_ENABLED` e reiniciar graciosamente os workers pelo mecanismo existente, ou suspender a versão publicada pela governação autenticada, com `version_no` corrente e evidência. Novas admissões são recusadas; as já admitidas concluem com snapshot congelado, mantendo históricos e relatórios. Não apagar fontes, versões ou execuções para reverter a exposição. A autorização e o cadastro não constituem conferência local dos ficheiros pelo utilizador nem validação jurídica atribuída à Tempo. O recibo JSON existente regista a revisão, a regra e o estado efectivamente observados.
|
||||||
|
|
||||||
|
**Recibo final das três operações:** código4a4d1212 integrado e servido dentro ded3fe8a02; três fontes oficiais reais cadastradas comversão1, hashes e citações; regra `IVA-GERAL-BASE-LIQUIDA`, **rule_version1**, ID `01a15e1a-5338-700f-8a45-f87707d696a7`, estado `published`, controlo optimista `version_no5`; autor/revisor/aprovador/publicador reais: conta indicada `nala@tempo.co.mz`, ID15. A sessão normal comMFA foi efectuada pelo utilizador numa página temporária de apoio ligada apenas a127.0.0.1; não se guardaram palavra-passe, códigoMFA ou cookies. Não há alegação de revisão independente ou parecer jurídico. A aceitação fiscal das fontes tem o fundamentoTempo08/10/2026; o estado geral permanecepending, sem validação automática noutros processos.
|
||||||
|
|
||||||
|
Activação separada aplicada em21/10/2026 às10:55:58UTC, alterando apenas as três chaves do consumidor. Ligação exacta aoID acima, rule_version1 eenabled=true; restante configuração preservada. `/api/v1/fiscal-consumer` confirmouenabled=true porHTTP200; a leitura do resolvedor, sem executar cálculo, confirmouIVA_GENERAL_RATE=16percent, mesmoID/versão/fonte no contextoMZN/internal_general_net de2026. Cinco eventos de governação; contagens de resultados/relatórios preservadas, sem simulações sintéticas no destino. O restauro de segurança e a configuração anterior estão conservados no arquivo privado identificado no recibo.
|
||||||
|
|
||||||
|
Suspensão concreta: configurar `INVESTMOZ_IVA_CONSUMER_ENABLED=false` e executar o reinício gracioso existente `php8.4 artisan queue:restart` na releaseactual como operador autorizado; ou `POST /api/v2/investment/admin/tax-rules/01a15e1a-5338-700f-8a45-f87707d696a7/suspend`, com `version_no:5` enquanto corrente e evidência verdadeira de pelo menos20caracteres, pela administração autenticada/MFA. Não repetir a suspensão se o estado/versão já tiver mudado. Conservar a ligação e todos os registos; futuras retomas respeitam o estado da regra e o procedimento de versão aplicável, sem escolher automaticamente outra regra.
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
+409
-5
@@ -7,8 +7,413 @@
|
|||||||
|
|
||||||
@custom-variant dark (&:is(.dark *));
|
@custom-variant dark (&:is(.dark *));
|
||||||
|
|
||||||
@import './tempo-header.css';
|
/* Institutional shell adapted from Tempo; page content keeps its own theme. */
|
||||||
|
.tempo-header {
|
||||||
|
position: relative;
|
||||||
|
z-index: 40;
|
||||||
|
background: #090909;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.tempo-header-inner {
|
||||||
|
position: relative;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: minmax(0, 1fr) auto auto;
|
||||||
|
grid-template-rows: 72px;
|
||||||
|
column-gap: 0.5rem;
|
||||||
|
align-items: center;
|
||||||
|
max-width: 1440px;
|
||||||
|
margin-inline: auto;
|
||||||
|
padding-inline: 0.75rem;
|
||||||
|
}
|
||||||
|
.tempo-logo-link {
|
||||||
|
grid-area: 1 / 1;
|
||||||
|
display: inline-flex;
|
||||||
|
width: fit-content;
|
||||||
|
align-items: center;
|
||||||
|
flex-shrink: 0;
|
||||||
|
border-radius: 0.25rem;
|
||||||
|
}
|
||||||
|
.tempo-header-logo {
|
||||||
|
width: auto;
|
||||||
|
height: 36px;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
.tempo-primary-navigation {
|
||||||
|
display: none;
|
||||||
|
grid-area: 2 / 1 / auto / -1;
|
||||||
|
min-width: 0;
|
||||||
|
border-top: 1px solid #ffffff1a;
|
||||||
|
}
|
||||||
|
.tempo-primary-navigation > ul {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
|
gap: 0.25rem 0.5rem;
|
||||||
|
padding-block: 0.75rem;
|
||||||
|
}
|
||||||
|
.tempo-primary-navigation .tempo-nav-trigger {
|
||||||
|
font-size: 0.9375rem;
|
||||||
|
padding-inline: 0.5rem;
|
||||||
|
}
|
||||||
|
.tempo-nav-trigger {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
min-height: 44px;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 0.4rem;
|
||||||
|
padding: 0.5rem 0.75rem;
|
||||||
|
border-radius: 0.4rem;
|
||||||
|
font-size: 1rem;
|
||||||
|
line-height: 1.5;
|
||||||
|
font-weight: 600;
|
||||||
|
white-space: nowrap;
|
||||||
|
color: #eee;
|
||||||
|
transition:
|
||||||
|
color 0.2s,
|
||||||
|
background 0.2s;
|
||||||
|
}
|
||||||
|
.tempo-nav-trigger:hover,
|
||||||
|
.tempo-nav-trigger[data-state='open'] {
|
||||||
|
background: #ffffff0d;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
.tempo-nav-trigger[data-current-group] {
|
||||||
|
color: #fff;
|
||||||
|
box-shadow: inset 0 -2px #ed1c24;
|
||||||
|
}
|
||||||
|
.tempo-nav-trigger[data-state='open'] > svg {
|
||||||
|
transform: rotate(180deg);
|
||||||
|
}
|
||||||
|
.tempo-primary-navigation .tempo-nav-trigger > svg {
|
||||||
|
transform: none;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
.tempo-section-bar {
|
||||||
|
border-top: 1px solid #ffffff14;
|
||||||
|
background: inherit;
|
||||||
|
}
|
||||||
|
.tempo-section-inner {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: minmax(0, 1fr) auto;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.25rem 0.75rem;
|
||||||
|
max-width: 1440px;
|
||||||
|
margin-inline: auto;
|
||||||
|
padding: 0 0.75rem 0.5rem;
|
||||||
|
}
|
||||||
|
.tempo-section-navigation {
|
||||||
|
grid-area: 1 / 1 / auto / -1;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
.tempo-section-navigation > ul {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 0.25rem;
|
||||||
|
}
|
||||||
|
.tempo-section-navigation .tempo-nav-trigger {
|
||||||
|
justify-content: center;
|
||||||
|
min-height: 44px;
|
||||||
|
gap: 0.25rem;
|
||||||
|
padding: 0.5rem 0.375rem;
|
||||||
|
border-radius: 0;
|
||||||
|
font-size: 0.8125rem;
|
||||||
|
letter-spacing: normal;
|
||||||
|
}
|
||||||
|
@media (min-width: 640px) {
|
||||||
|
.tempo-section-navigation .tempo-nav-trigger {
|
||||||
|
min-height: 48px;
|
||||||
|
gap: 0.5rem;
|
||||||
|
padding-inline: 0.75rem;
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (min-width: 768px) {
|
||||||
|
.tempo-section-inner {
|
||||||
|
grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
|
||||||
|
padding: 0.25rem 1.25rem;
|
||||||
|
}
|
||||||
|
.tempo-section-navigation {
|
||||||
|
grid-area: 1 / 2;
|
||||||
|
}
|
||||||
|
.tempo-section-inner .tempo-panel-summary {
|
||||||
|
grid-area: 1 / 1;
|
||||||
|
}
|
||||||
|
.tempo-section-inner .tempo-interest-button {
|
||||||
|
grid-area: 1 / 3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.tempo-header-extras {
|
||||||
|
display: none;
|
||||||
|
grid-area: 3 / 1 / auto / -1;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 0.75rem;
|
||||||
|
min-width: 0;
|
||||||
|
padding-block: 0.75rem;
|
||||||
|
border-top: 1px solid #ffffff1a;
|
||||||
|
}
|
||||||
|
.tempo-header[data-expanded] .tempo-primary-navigation {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.tempo-header[data-expanded] .tempo-header-extras {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
.tempo-header-utilities {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 0.5rem;
|
||||||
|
}
|
||||||
|
.tempo-utility-button {
|
||||||
|
display: flex;
|
||||||
|
min-height: 40px;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.4rem;
|
||||||
|
padding: 0.4rem;
|
||||||
|
border-radius: 0.5rem;
|
||||||
|
font-size: 0.8125rem;
|
||||||
|
color: #e2e8f0;
|
||||||
|
}
|
||||||
|
.tempo-utility-button:hover {
|
||||||
|
background: #ffffff10;
|
||||||
|
}
|
||||||
|
.tempo-header-social {
|
||||||
|
display: flex;
|
||||||
|
width: 30px;
|
||||||
|
height: 40px;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: var(--social-color);
|
||||||
|
transition:
|
||||||
|
transform 0.2s,
|
||||||
|
opacity 0.2s;
|
||||||
|
border-radius: 0.4rem;
|
||||||
|
}
|
||||||
|
.tempo-header-social:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
.tempo-login-button {
|
||||||
|
display: inline-flex;
|
||||||
|
min-height: 40px;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.5rem;
|
||||||
|
border: 1px solid #ffffff50;
|
||||||
|
border-radius: 0.4rem;
|
||||||
|
padding: 0.5rem 0.75rem;
|
||||||
|
font-size: 0.875rem;
|
||||||
|
font-weight: 600;
|
||||||
|
white-space: nowrap;
|
||||||
|
color: #fff;
|
||||||
|
transition:
|
||||||
|
background 0.2s,
|
||||||
|
border-color 0.2s;
|
||||||
|
}
|
||||||
|
.tempo-login-button:hover {
|
||||||
|
background: #ed1c24;
|
||||||
|
border-color: #ed1c24;
|
||||||
|
}
|
||||||
|
.tempo-login-button > span {
|
||||||
|
max-width: clamp(2rem, calc(100vw - 18rem), 6rem);
|
||||||
|
}
|
||||||
|
.tempo-header-actions {
|
||||||
|
grid-area: 1 / 2;
|
||||||
|
display: flex;
|
||||||
|
min-width: 0;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.tempo-interest-button {
|
||||||
|
display: inline-flex;
|
||||||
|
grid-area: 2 / 2;
|
||||||
|
justify-self: end;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
min-height: 40px;
|
||||||
|
padding: 0.5rem 0.65rem;
|
||||||
|
border: 1px solid #ed1c24;
|
||||||
|
border-radius: 0.4rem;
|
||||||
|
background: #ed1c24;
|
||||||
|
color: white;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
font-weight: 600;
|
||||||
|
white-space: nowrap;
|
||||||
|
transition: background 0.2s;
|
||||||
|
}
|
||||||
|
.tempo-interest-button:hover {
|
||||||
|
background: #c9151c;
|
||||||
|
}
|
||||||
|
.tempo-panel-summary {
|
||||||
|
grid-area: 2 / 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 0.1rem;
|
||||||
|
min-height: 44px;
|
||||||
|
font-size: 0.8125rem;
|
||||||
|
line-height: 1.4;
|
||||||
|
color: #fff;
|
||||||
|
text-underline-offset: 3px;
|
||||||
|
}
|
||||||
|
.tempo-panel-summary:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
.tempo-panel-count {
|
||||||
|
color: #cbd5e1;
|
||||||
|
font-size: 0.6875rem;
|
||||||
|
}
|
||||||
|
.tempo-header-toggle {
|
||||||
|
grid-area: 1 / 3;
|
||||||
|
display: inline-flex;
|
||||||
|
width: 44px;
|
||||||
|
height: 44px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border: 1px solid #ffffff33;
|
||||||
|
border-radius: 0.4rem;
|
||||||
|
color: #fff;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.tempo-header-toggle:hover,
|
||||||
|
.tempo-header-toggle[aria-expanded='true'] {
|
||||||
|
background: #ffffff10;
|
||||||
|
}
|
||||||
|
@media (min-width: 640px) {
|
||||||
|
.tempo-header-inner {
|
||||||
|
padding-inline: 1.25rem;
|
||||||
|
}
|
||||||
|
.tempo-header-logo {
|
||||||
|
height: 44px;
|
||||||
|
}
|
||||||
|
.tempo-primary-navigation > ul {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (min-width: 1024px) {
|
||||||
|
.tempo-header-inner {
|
||||||
|
grid-template-rows: 88px;
|
||||||
|
padding-inline: 1.5rem;
|
||||||
|
}
|
||||||
|
.tempo-header-logo {
|
||||||
|
height: 56px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (min-width: 1280px) {
|
||||||
|
/* Shared columns keep each portal area below its institutional link. */
|
||||||
|
.tempo-header-layout {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: auto repeat(4, max-content) minmax(0, 1fr) auto;
|
||||||
|
column-gap: 0.25rem;
|
||||||
|
max-width: 1440px;
|
||||||
|
margin-inline: auto;
|
||||||
|
padding-inline: 2rem;
|
||||||
|
}
|
||||||
|
.tempo-header-inner {
|
||||||
|
grid-column: 1 / -1;
|
||||||
|
grid-template-columns: subgrid;
|
||||||
|
min-height: 88px;
|
||||||
|
column-gap: normal;
|
||||||
|
max-width: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.tempo-logo-link {
|
||||||
|
margin-right: 0.75rem;
|
||||||
|
}
|
||||||
|
.tempo-header-logo {
|
||||||
|
height: 64px;
|
||||||
|
}
|
||||||
|
.tempo-header[data-expanded] .tempo-primary-navigation,
|
||||||
|
.tempo-primary-navigation {
|
||||||
|
display: grid;
|
||||||
|
grid-area: 1 / 2 / 2 / 6;
|
||||||
|
grid-template-columns: subgrid;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
.tempo-primary-navigation > ul {
|
||||||
|
display: grid;
|
||||||
|
grid-column: 1 / -1;
|
||||||
|
grid-template-columns: subgrid;
|
||||||
|
gap: normal;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
.tempo-nav-trigger {
|
||||||
|
justify-content: center;
|
||||||
|
padding-inline: 0.875rem;
|
||||||
|
font-size: 1.125rem;
|
||||||
|
letter-spacing: 0.025em;
|
||||||
|
}
|
||||||
|
.tempo-primary-navigation .tempo-nav-trigger {
|
||||||
|
padding-inline: 0.625rem;
|
||||||
|
font-size: 1.125rem;
|
||||||
|
}
|
||||||
|
.tempo-header-extras {
|
||||||
|
display: flex;
|
||||||
|
grid-area: 1 / 6;
|
||||||
|
justify-self: end;
|
||||||
|
flex-shrink: 0;
|
||||||
|
padding: 0 0.75rem;
|
||||||
|
border-top: 0;
|
||||||
|
border-inline: 1px solid #ffffff1a;
|
||||||
|
}
|
||||||
|
.tempo-header-utilities {
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
gap: 0.5rem;
|
||||||
|
}
|
||||||
|
.tempo-header-social {
|
||||||
|
width: 26px;
|
||||||
|
}
|
||||||
|
.tempo-header-toggle {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.tempo-header-actions {
|
||||||
|
grid-area: 1 / 7;
|
||||||
|
}
|
||||||
|
.tempo-section-bar {
|
||||||
|
display: grid;
|
||||||
|
grid-column: 1 / -1;
|
||||||
|
grid-template-columns: subgrid;
|
||||||
|
}
|
||||||
|
.tempo-section-inner {
|
||||||
|
grid-column: 1 / -1;
|
||||||
|
grid-template-columns: subgrid;
|
||||||
|
gap: normal;
|
||||||
|
max-width: none;
|
||||||
|
margin: 0;
|
||||||
|
padding-inline: 0;
|
||||||
|
}
|
||||||
|
.tempo-section-navigation {
|
||||||
|
display: grid;
|
||||||
|
grid-area: 1 / 2 / 2 / 5;
|
||||||
|
grid-template-columns: subgrid;
|
||||||
|
}
|
||||||
|
.tempo-section-navigation > ul {
|
||||||
|
display: grid;
|
||||||
|
grid-column: 1 / -1;
|
||||||
|
grid-template-columns: subgrid;
|
||||||
|
gap: normal;
|
||||||
|
}
|
||||||
|
.tempo-section-navigation .tempo-nav-trigger {
|
||||||
|
padding-inline: 0.625rem;
|
||||||
|
}
|
||||||
|
.tempo-primary-navigation .tempo-nav-trigger,
|
||||||
|
.tempo-section-navigation .tempo-nav-trigger {
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
.tempo-interest-button {
|
||||||
|
padding-inline: 0.85rem;
|
||||||
|
font-size: 0.8125rem;
|
||||||
|
}
|
||||||
|
.tempo-section-inner .tempo-interest-button {
|
||||||
|
grid-area: 1 / 6 / 2 / -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.tempo-header :is(a, button):focus-visible {
|
||||||
|
outline: 2px solid #fff;
|
||||||
|
outline-offset: 4px;
|
||||||
|
}
|
||||||
.tempo-dropdown {
|
.tempo-dropdown {
|
||||||
z-index: 60;
|
z-index: 60;
|
||||||
border: 1px solid #e2e8f0;
|
border: 1px solid #e2e8f0;
|
||||||
@@ -36,7 +441,7 @@
|
|||||||
outline: none;
|
outline: none;
|
||||||
}
|
}
|
||||||
.tempo-footer {
|
.tempo-footer {
|
||||||
margin-top: 1.5rem;
|
margin-top: 2rem;
|
||||||
background: #050505;
|
background: #050505;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
@@ -70,8 +475,7 @@
|
|||||||
.tempo-contact-link {
|
.tempo-contact-link {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.75rem;
|
gap: 1rem;
|
||||||
min-height: 40px;
|
|
||||||
transition: color 0.2s;
|
transition: color 0.2s;
|
||||||
}
|
}
|
||||||
.tempo-contact-link:hover {
|
.tempo-contact-link:hover {
|
||||||
|
|||||||
@@ -1,321 +0,0 @@
|
|||||||
/* Presentation choice for Tempo's 21/10/2026 request: one shared navigation. */
|
|
||||||
.tempo-header {
|
|
||||||
position: relative;
|
|
||||||
z-index: 40;
|
|
||||||
background: #090909;
|
|
||||||
color: #fff;
|
|
||||||
border-bottom: 1px solid #ffffff14;
|
|
||||||
}
|
|
||||||
.tempo-header-inner {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: minmax(0, 1fr) auto auto;
|
|
||||||
grid-template-rows: 71px;
|
|
||||||
align-items: center;
|
|
||||||
column-gap: 0.5rem;
|
|
||||||
max-width: 1600px;
|
|
||||||
margin-inline: auto;
|
|
||||||
padding-inline: 0.75rem;
|
|
||||||
}
|
|
||||||
.tempo-logo-link {
|
|
||||||
grid-area: 1 / 1;
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
width: 112px;
|
|
||||||
max-width: 100%;
|
|
||||||
border-radius: 0.25rem;
|
|
||||||
}
|
|
||||||
.tempo-header-logo {
|
|
||||||
width: 100%;
|
|
||||||
height: auto;
|
|
||||||
object-fit: contain;
|
|
||||||
}
|
|
||||||
.tempo-primary-navigation {
|
|
||||||
display: none;
|
|
||||||
grid-area: 2 / 1 / auto / -1;
|
|
||||||
min-width: 0;
|
|
||||||
border-top: 1px solid #ffffff1a;
|
|
||||||
padding-block: 0.75rem;
|
|
||||||
}
|
|
||||||
.tempo-primary-navigation > ul {
|
|
||||||
display: grid;
|
|
||||||
gap: 0.25rem;
|
|
||||||
}
|
|
||||||
.tempo-nav-trigger {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: space-between;
|
|
||||||
gap: 0.4rem;
|
|
||||||
width: 100%;
|
|
||||||
min-height: 44px;
|
|
||||||
padding: 0.5rem 0.75rem;
|
|
||||||
border-radius: 0.5rem;
|
|
||||||
color: #e2e8f0;
|
|
||||||
font-size: 1rem;
|
|
||||||
line-height: 1.5;
|
|
||||||
font-weight: 600;
|
|
||||||
white-space: nowrap;
|
|
||||||
transition:
|
|
||||||
color 0.2s,
|
|
||||||
background 0.2s;
|
|
||||||
}
|
|
||||||
.tempo-nav-trigger:hover,
|
|
||||||
.tempo-nav-trigger[data-state='open'] {
|
|
||||||
background: #ffffff0d;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
.tempo-nav-trigger[data-current-group] {
|
|
||||||
color: #fff;
|
|
||||||
background: #ffffff08;
|
|
||||||
box-shadow: inset 0 -2px #ed1c24;
|
|
||||||
}
|
|
||||||
.tempo-nav-trigger > svg {
|
|
||||||
flex-shrink: 0;
|
|
||||||
transition: transform 0.2s;
|
|
||||||
}
|
|
||||||
.tempo-nav-trigger[data-state='open'] > svg {
|
|
||||||
transform: rotate(180deg);
|
|
||||||
}
|
|
||||||
.tempo-header-extras {
|
|
||||||
display: none;
|
|
||||||
grid-area: 3 / 1 / auto / -1;
|
|
||||||
min-width: 0;
|
|
||||||
padding-block: 0.75rem;
|
|
||||||
border-top: 1px solid #ffffff1a;
|
|
||||||
}
|
|
||||||
.tempo-header-utilities {
|
|
||||||
display: flex;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
align-items: center;
|
|
||||||
gap: 0.5rem;
|
|
||||||
}
|
|
||||||
.tempo-utility-button {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 0.4rem;
|
|
||||||
min-height: 44px;
|
|
||||||
padding: 0.4rem;
|
|
||||||
border-radius: 0.5rem;
|
|
||||||
color: #e2e8f0;
|
|
||||||
font-size: 0.8125rem;
|
|
||||||
}
|
|
||||||
.tempo-utility-button:hover {
|
|
||||||
background: #ffffff10;
|
|
||||||
}
|
|
||||||
.tempo-header-actions {
|
|
||||||
grid-area: 1 / 2;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 0.5rem;
|
|
||||||
min-width: 0;
|
|
||||||
}
|
|
||||||
.tempo-login-button {
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 0.5rem;
|
|
||||||
min-height: 44px;
|
|
||||||
padding: 0.5rem 0.625rem;
|
|
||||||
border: 1px solid #ffffff40;
|
|
||||||
border-radius: 0.5rem;
|
|
||||||
color: #fff;
|
|
||||||
font-size: 0.875rem;
|
|
||||||
font-weight: 600;
|
|
||||||
white-space: nowrap;
|
|
||||||
transition:
|
|
||||||
background 0.2s,
|
|
||||||
border-color 0.2s;
|
|
||||||
}
|
|
||||||
.tempo-login-button:hover {
|
|
||||||
background: #ffffff10;
|
|
||||||
border-color: #ffffff80;
|
|
||||||
}
|
|
||||||
.tempo-login-button > span {
|
|
||||||
max-width: clamp(2rem, calc(100vw - 18rem), 6rem);
|
|
||||||
}
|
|
||||||
.tempo-panel-summary {
|
|
||||||
position: relative;
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
width: 44px;
|
|
||||||
height: 44px;
|
|
||||||
flex-shrink: 0;
|
|
||||||
border-radius: 0.5rem;
|
|
||||||
color: #e2e8f0;
|
|
||||||
}
|
|
||||||
.tempo-panel-summary:hover {
|
|
||||||
background: #ffffff10;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
.tempo-panel-count {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
right: -0.125rem;
|
|
||||||
min-width: 17px;
|
|
||||||
padding-inline: 0.2rem;
|
|
||||||
border: 2px solid #090909;
|
|
||||||
border-radius: 999px;
|
|
||||||
background: #ed1c24;
|
|
||||||
color: #fff;
|
|
||||||
font-size: 0.5625rem;
|
|
||||||
line-height: 1.4;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.tempo-interest-button {
|
|
||||||
display: none;
|
|
||||||
grid-area: 4 / 1 / auto / -1;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
gap: 0.5rem;
|
|
||||||
min-height: 44px;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
padding: 0.5rem 0.875rem;
|
|
||||||
border: 1px solid #ed1c24;
|
|
||||||
border-radius: 0.5rem;
|
|
||||||
background: #ed1c24;
|
|
||||||
color: #fff;
|
|
||||||
font-size: 0.8125rem;
|
|
||||||
font-weight: 600;
|
|
||||||
white-space: nowrap;
|
|
||||||
transition: background 0.2s;
|
|
||||||
}
|
|
||||||
.tempo-interest-button:hover {
|
|
||||||
background: #c9151c;
|
|
||||||
}
|
|
||||||
.tempo-header-toggle {
|
|
||||||
grid-area: 1 / 3;
|
|
||||||
display: inline-flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
width: 44px;
|
|
||||||
height: 44px;
|
|
||||||
border: 1px solid #ffffff33;
|
|
||||||
border-radius: 0.5rem;
|
|
||||||
color: #fff;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.tempo-header-toggle:hover,
|
|
||||||
.tempo-header-toggle[aria-expanded='true'] {
|
|
||||||
background: #ffffff10;
|
|
||||||
}
|
|
||||||
.tempo-header[data-expanded] .tempo-primary-navigation {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
.tempo-header[data-expanded] .tempo-header-extras {
|
|
||||||
display: flex;
|
|
||||||
}
|
|
||||||
.tempo-header[data-expanded] .tempo-interest-button {
|
|
||||||
display: inline-flex;
|
|
||||||
}
|
|
||||||
.tempo-header :is(a, button):focus-visible {
|
|
||||||
outline: 2px solid #fff;
|
|
||||||
outline-offset: 3px;
|
|
||||||
}
|
|
||||||
.tempo-submenu {
|
|
||||||
max-width: min(
|
|
||||||
calc(100vw - 1.5rem),
|
|
||||||
var(--radix-dropdown-menu-content-available-width)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@media (min-width: 640px) {
|
|
||||||
.tempo-header-inner {
|
|
||||||
grid-template-columns: minmax(0, 1fr) auto auto auto;
|
|
||||||
column-gap: 0.75rem;
|
|
||||||
padding-inline: 1.5rem;
|
|
||||||
}
|
|
||||||
.tempo-logo-link {
|
|
||||||
width: 132px;
|
|
||||||
}
|
|
||||||
.tempo-interest-button {
|
|
||||||
display: inline-flex;
|
|
||||||
grid-area: 1 / 3;
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
.tempo-header-toggle {
|
|
||||||
grid-area: 1 / 4;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@media (min-width: 1280px) {
|
|
||||||
.tempo-header-inner {
|
|
||||||
grid-template-columns: auto minmax(0, 1fr) auto auto auto;
|
|
||||||
column-gap: 0.25rem;
|
|
||||||
padding-inline: 1.25rem;
|
|
||||||
}
|
|
||||||
.tempo-logo-link {
|
|
||||||
width: 100px;
|
|
||||||
}
|
|
||||||
.tempo-login-button > span {
|
|
||||||
max-width: 3rem;
|
|
||||||
}
|
|
||||||
.tempo-primary-navigation,
|
|
||||||
.tempo-header[data-expanded] .tempo-primary-navigation {
|
|
||||||
display: block;
|
|
||||||
grid-area: 1 / 2;
|
|
||||||
border: 0;
|
|
||||||
padding: 0;
|
|
||||||
justify-self: center;
|
|
||||||
}
|
|
||||||
.tempo-primary-navigation > ul {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 0;
|
|
||||||
}
|
|
||||||
.tempo-nav-trigger {
|
|
||||||
justify-content: center;
|
|
||||||
padding-inline: 0.25rem;
|
|
||||||
font-size: 1.125rem;
|
|
||||||
letter-spacing: 0.025em;
|
|
||||||
}
|
|
||||||
.tempo-header-extras,
|
|
||||||
.tempo-header[data-expanded] .tempo-header-extras {
|
|
||||||
display: flex;
|
|
||||||
grid-area: 1 / 3;
|
|
||||||
padding: 0 0.5rem 0 0;
|
|
||||||
border: 0;
|
|
||||||
border-right: 1px solid #ffffff1a;
|
|
||||||
}
|
|
||||||
.tempo-header-utilities {
|
|
||||||
flex-wrap: nowrap;
|
|
||||||
}
|
|
||||||
.tempo-header-actions {
|
|
||||||
grid-area: 1 / 4;
|
|
||||||
}
|
|
||||||
.tempo-interest-button {
|
|
||||||
grid-area: 1 / 5;
|
|
||||||
}
|
|
||||||
.tempo-header-toggle {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@media (min-width: 1440px) {
|
|
||||||
.tempo-header-inner {
|
|
||||||
column-gap: 0.75rem;
|
|
||||||
padding-inline: 2rem;
|
|
||||||
}
|
|
||||||
.tempo-nav-trigger {
|
|
||||||
padding-inline: 0.375rem;
|
|
||||||
font-size: 1.125rem;
|
|
||||||
}
|
|
||||||
.tempo-logo-link {
|
|
||||||
width: 132px;
|
|
||||||
}
|
|
||||||
.tempo-login-button > span {
|
|
||||||
max-width: 5rem;
|
|
||||||
}
|
|
||||||
.tempo-header-extras {
|
|
||||||
padding-right: 0.75rem;
|
|
||||||
}
|
|
||||||
.tempo-primary-navigation > ul {
|
|
||||||
gap: 0.125rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@media (min-width: 1536px) {
|
|
||||||
.tempo-header-inner {
|
|
||||||
column-gap: 1rem;
|
|
||||||
}
|
|
||||||
.tempo-nav-trigger {
|
|
||||||
padding-inline: 0.75rem;
|
|
||||||
}
|
|
||||||
.tempo-login-button > span {
|
|
||||||
max-width: 6rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -3,16 +3,14 @@ import { Link, router, usePage } from '@inertiajs/react';
|
|||||||
import {
|
import {
|
||||||
ChevronDown,
|
ChevronDown,
|
||||||
ArrowUpRight,
|
ArrowUpRight,
|
||||||
LayoutDashboard,
|
|
||||||
LogOut,
|
LogOut,
|
||||||
Menu,
|
Menu,
|
||||||
UserRound,
|
UserRound,
|
||||||
X,
|
X,
|
||||||
} from 'lucide-react';
|
} from 'lucide-react';
|
||||||
import { Fragment, useEffect, useId, useRef, useState } from 'react';
|
import { useEffect, useId, useRef, useState } from 'react';
|
||||||
import { useIsMobile } from '@/hooks/use-mobile';
|
|
||||||
import { useNavigationContext } from '@/components/navigation-context';
|
import { useNavigationContext } from '@/components/navigation-context';
|
||||||
import { tempoSocialLinks, useTempoUi } from '@/components/tempo-brand';
|
import { TempoSocialLinks, useTempoUi } from '@/components/tempo-brand';
|
||||||
import {
|
import {
|
||||||
TempoLanguageSelector,
|
TempoLanguageSelector,
|
||||||
TempoWeather,
|
TempoWeather,
|
||||||
@@ -54,7 +52,6 @@ export function PortalGroupedMenu() {
|
|||||||
scopedAdministration?: {label:string;href:string}[];
|
scopedAdministration?: {label:string;href:string}[];
|
||||||
}>();
|
}>();
|
||||||
const { t, language, requestCount } = useTempoUi();
|
const { t, language, requestCount } = useTempoUi();
|
||||||
const mobile = useIsMobile();
|
|
||||||
const navigation = useNavigationContext();
|
const navigation = useNavigationContext();
|
||||||
const groups = portalNavigation({
|
const groups = portalNavigation({
|
||||||
context: navigation.view
|
context: navigation.view
|
||||||
@@ -75,34 +72,24 @@ export function PortalGroupedMenu() {
|
|||||||
const currentItem = currentNavigationItem(groups, url);
|
const currentItem = currentNavigationItem(groups, url);
|
||||||
const [loggingOut, setLoggingOut] = useState(false);
|
const [loggingOut, setLoggingOut] = useState(false);
|
||||||
const [expanded, setExpanded] = useState(false);
|
const [expanded, setExpanded] = useState(false);
|
||||||
const navigationId = useId();
|
const institutionalId = useId();
|
||||||
const toolsId = useId();
|
const toolsId = useId();
|
||||||
const interestId = useId();
|
|
||||||
const toggle = useRef<HTMLButtonElement>(null);
|
const toggle = useRef<HTMLButtonElement>(null);
|
||||||
useEffect(() => router.on('navigate', () => setExpanded(false)), []);
|
useEffect(() => router.on('navigate', () => setExpanded(false)), []);
|
||||||
const items = (children: PortalNavItem[]) =>
|
const items = (children: PortalNavItem[]) =>
|
||||||
children.map((item) =>
|
children.map((item) =>
|
||||||
item.children ? (
|
item.children ? (
|
||||||
mobile ? (
|
<DropdownMenuSub key={item.id}>
|
||||||
<Fragment key={item.id}>
|
<DropdownMenuSubTrigger className="tempo-menu-item font-semibold">
|
||||||
<DropdownMenuLabel className="mt-2 border-t px-3 pt-3 text-xs text-slate-500">
|
{t(item.label)}
|
||||||
{t(item.label)}
|
</DropdownMenuSubTrigger>
|
||||||
</DropdownMenuLabel>
|
<DropdownMenuSubContent
|
||||||
|
collisionPadding={12}
|
||||||
|
className="tempo-dropdown max-h-[min(70vh,34rem)] w-72 max-w-[calc(100vw-1.5rem)] overflow-y-auto p-2"
|
||||||
|
>
|
||||||
{items(item.children)}
|
{items(item.children)}
|
||||||
</Fragment>
|
</DropdownMenuSubContent>
|
||||||
) : (
|
</DropdownMenuSub>
|
||||||
<DropdownMenuSub key={item.id}>
|
|
||||||
<DropdownMenuSubTrigger className="tempo-menu-item font-semibold">
|
|
||||||
{t(item.label)}
|
|
||||||
</DropdownMenuSubTrigger>
|
|
||||||
<DropdownMenuSubContent
|
|
||||||
collisionPadding={12}
|
|
||||||
className="tempo-dropdown tempo-submenu max-h-[min(70vh,34rem)] w-72 overflow-y-auto p-2"
|
|
||||||
>
|
|
||||||
{items(item.children)}
|
|
||||||
</DropdownMenuSubContent>
|
|
||||||
</DropdownMenuSub>
|
|
||||||
)
|
|
||||||
) : (
|
) : (
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
key={item.id}
|
key={item.id}
|
||||||
@@ -124,8 +111,6 @@ export function PortalGroupedMenu() {
|
|||||||
(group) =>
|
(group) =>
|
||||||
!['home', 'discovery', 'realization', 'support'].includes(group.id),
|
!['home', 'discovery', 'realization', 'support'].includes(group.id),
|
||||||
);
|
);
|
||||||
const panelLabel = `${t('O meu painel')} — ${requestCount} ${t(requestCount === 1 ? 'pedido recebido' : 'pedidos recebidos')}`;
|
|
||||||
const institutionalCurrent = url.split('?')[0] === '/contacto';
|
|
||||||
return (
|
return (
|
||||||
<header
|
<header
|
||||||
className="tempo-header"
|
className="tempo-header"
|
||||||
@@ -135,303 +120,245 @@ export function PortalGroupedMenu() {
|
|||||||
if (
|
if (
|
||||||
event.key === 'Escape' &&
|
event.key === 'Escape' &&
|
||||||
expanded &&
|
expanded &&
|
||||||
!event.defaultPrevented &&
|
!event.defaultPrevented
|
||||||
!(
|
|
||||||
event.target instanceof Element &&
|
|
||||||
event.target.closest('[role="menu"]')
|
|
||||||
)
|
|
||||||
) {
|
) {
|
||||||
setExpanded(false);
|
setExpanded(false);
|
||||||
toggle.current?.focus();
|
toggle.current?.focus();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="tempo-header-inner">
|
<div className="tempo-header-layout">
|
||||||
<Link
|
<div className="tempo-header-inner">
|
||||||
href="/"
|
<Link
|
||||||
aria-label="Tempo — início"
|
href="/"
|
||||||
className="tempo-logo-link"
|
aria-label="InvesteMoz — início"
|
||||||
>
|
className="tempo-logo-link"
|
||||||
<img
|
>
|
||||||
src="/images/logo/logo-vermelho.png"
|
<PortalProductIdentity />
|
||||||
alt="Tempo"
|
</Link>
|
||||||
width="1787"
|
<nav
|
||||||
height="564"
|
id={institutionalId}
|
||||||
className="tempo-header-logo"
|
aria-label="Navegação institucional"
|
||||||
/>
|
className="tempo-primary-navigation"
|
||||||
</Link>
|
>
|
||||||
<nav
|
<ul>
|
||||||
id={navigationId}
|
<li>
|
||||||
aria-label="Áreas do portal"
|
<Link
|
||||||
className="tempo-primary-navigation"
|
href="/"
|
||||||
>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<Link
|
|
||||||
href="/"
|
|
||||||
className="tempo-nav-trigger"
|
|
||||||
aria-current={
|
|
||||||
url.split('?')[0] === '/'
|
|
||||||
? 'page'
|
|
||||||
: undefined
|
|
||||||
}
|
|
||||||
data-current-group={
|
|
||||||
url.split('?')[0] === '/' || undefined
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{t('Início')}
|
|
||||||
</Link>
|
|
||||||
</li>
|
|
||||||
{groups
|
|
||||||
.filter((group) =>
|
|
||||||
[
|
|
||||||
'discovery',
|
|
||||||
'realization',
|
|
||||||
'support',
|
|
||||||
].includes(group.id),
|
|
||||||
)
|
|
||||||
.map((group) => (
|
|
||||||
<li key={group.id}>
|
|
||||||
<DropdownMenu modal={false}>
|
|
||||||
<DropdownMenuTrigger
|
|
||||||
className="tempo-nav-trigger"
|
|
||||||
data-current-group={
|
|
||||||
current === group.id ||
|
|
||||||
undefined
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{t(group.label)}
|
|
||||||
<ChevronDown
|
|
||||||
size={14}
|
|
||||||
aria-hidden="true"
|
|
||||||
/>
|
|
||||||
{current === group.id && (
|
|
||||||
<span className="sr-only">
|
|
||||||
Grupo actual
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
</DropdownMenuTrigger>
|
|
||||||
<DropdownMenuContent
|
|
||||||
align="start"
|
|
||||||
sideOffset={12}
|
|
||||||
collisionPadding={12}
|
|
||||||
className="tempo-dropdown max-h-[min(75vh,36rem)] w-72 max-w-[calc(100vw-1.5rem)] overflow-y-auto p-2"
|
|
||||||
>
|
|
||||||
{items(group.children ?? [])}
|
|
||||||
</DropdownMenuContent>
|
|
||||||
</DropdownMenu>
|
|
||||||
</li>
|
|
||||||
))}
|
|
||||||
<li>
|
|
||||||
<Link
|
|
||||||
href="/sobre"
|
|
||||||
className="tempo-nav-trigger"
|
|
||||||
aria-current={
|
|
||||||
url.split('?')[0] === '/sobre'
|
|
||||||
? 'page'
|
|
||||||
: undefined
|
|
||||||
}
|
|
||||||
data-current-group={
|
|
||||||
url.split('?')[0] === '/sobre' || undefined
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{t('Sobre nós')}
|
|
||||||
</Link>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<DropdownMenu modal={false}>
|
|
||||||
<DropdownMenuTrigger
|
|
||||||
className="tempo-nav-trigger"
|
className="tempo-nav-trigger"
|
||||||
|
aria-current={
|
||||||
|
url.split('?')[0] === '/'
|
||||||
|
? 'page'
|
||||||
|
: undefined
|
||||||
|
}
|
||||||
data-current-group={
|
data-current-group={
|
||||||
institutionalCurrent || undefined
|
url.split('?')[0] === '/' || undefined
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
Tempo
|
{t('Início')}
|
||||||
<ChevronDown size={14} aria-hidden="true" />
|
</Link>
|
||||||
</DropdownMenuTrigger>
|
</li>
|
||||||
<DropdownMenuContent
|
<li>
|
||||||
align="start"
|
<a
|
||||||
sideOffset={12}
|
href="https://revista.tempo.co.mz/"
|
||||||
collisionPadding={12}
|
target="_blank"
|
||||||
className="tempo-dropdown max-h-[75vh] w-64 max-w-[calc(100vw-1.5rem)] overflow-y-auto p-2"
|
rel="noopener noreferrer"
|
||||||
|
className="tempo-nav-trigger"
|
||||||
|
aria-label={`${t('Revista Tempo')} — ${t('Abre num novo separador')}`}
|
||||||
>
|
>
|
||||||
<DropdownMenuItem
|
{t('Revista Tempo')}
|
||||||
asChild
|
<ArrowUpRight
|
||||||
className="tempo-menu-item"
|
size={14}
|
||||||
|
aria-hidden="true"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{[
|
||||||
|
['/sobre', 'Sobre nós'],
|
||||||
|
['/contacto', 'Contacto'],
|
||||||
|
].map(([href, label]) => (
|
||||||
|
<li key={href}>
|
||||||
|
<Link
|
||||||
|
href={href}
|
||||||
|
className="tempo-nav-trigger"
|
||||||
|
aria-current={
|
||||||
|
url.split('?')[0] === href
|
||||||
|
? 'page'
|
||||||
|
: undefined
|
||||||
|
}
|
||||||
|
data-current-group={
|
||||||
|
url.split('?')[0] === href ||
|
||||||
|
undefined
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<a
|
{t(label)}
|
||||||
href="https://revista.tempo.co.mz/"
|
</Link>
|
||||||
target="_blank"
|
</li>
|
||||||
rel="noopener noreferrer"
|
))}
|
||||||
aria-label={`${t('Revista Tempo')} — ${t('Abre num novo separador')}`}
|
</ul>
|
||||||
>
|
</nav>
|
||||||
{t('Revista Tempo')}
|
<div id={toolsId} className="tempo-header-extras">
|
||||||
<ArrowUpRight
|
<div className="tempo-header-utilities">
|
||||||
size={14}
|
<div className="flex items-center gap-1">
|
||||||
aria-hidden="true"
|
<TempoWeather />
|
||||||
/>
|
<TempoLanguageSelector />
|
||||||
</a>
|
</div>
|
||||||
</DropdownMenuItem>
|
<TempoSocialLinks />
|
||||||
{[['/contacto', 'Contacto']].map(
|
|
||||||
([href, label]) => (
|
|
||||||
<DropdownMenuItem
|
|
||||||
key={href}
|
|
||||||
asChild
|
|
||||||
className="tempo-menu-item"
|
|
||||||
>
|
|
||||||
<Link
|
|
||||||
href={href}
|
|
||||||
aria-current={
|
|
||||||
url.split('?')[0] ===
|
|
||||||
href
|
|
||||||
? 'page'
|
|
||||||
: undefined
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{t(label)}
|
|
||||||
</Link>
|
|
||||||
</DropdownMenuItem>
|
|
||||||
),
|
|
||||||
)}
|
|
||||||
<DropdownMenuSeparator />
|
|
||||||
<DropdownMenuLabel className="text-xs text-slate-500">
|
|
||||||
Revista Tempo
|
|
||||||
</DropdownMenuLabel>
|
|
||||||
{tempoSocialLinks.map(
|
|
||||||
({ name, href, icon: Icon }) => (
|
|
||||||
<DropdownMenuItem
|
|
||||||
key={name}
|
|
||||||
asChild
|
|
||||||
className="tempo-menu-item"
|
|
||||||
>
|
|
||||||
<a
|
|
||||||
href={href}
|
|
||||||
target="_blank"
|
|
||||||
rel="noopener noreferrer"
|
|
||||||
aria-label={`Revista Tempo — ${name}`}
|
|
||||||
>
|
|
||||||
<Icon
|
|
||||||
size={16}
|
|
||||||
aria-hidden="true"
|
|
||||||
/>
|
|
||||||
{name}
|
|
||||||
<ArrowUpRight
|
|
||||||
size={12}
|
|
||||||
aria-hidden="true"
|
|
||||||
/>
|
|
||||||
</a>
|
|
||||||
</DropdownMenuItem>
|
|
||||||
),
|
|
||||||
)}
|
|
||||||
</DropdownMenuContent>
|
|
||||||
</DropdownMenu>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</nav>
|
|
||||||
<div id={toolsId} className="tempo-header-extras">
|
|
||||||
<div className="tempo-header-utilities">
|
|
||||||
<div className="flex items-center gap-1">
|
|
||||||
<TempoWeather />
|
|
||||||
<TempoLanguageSelector />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div className="tempo-header-actions">
|
||||||
<div className="tempo-header-actions">
|
{props.auth?.user ? (
|
||||||
<Link
|
<DropdownMenu modal={false}>
|
||||||
href="/investidor/manifestacoes"
|
<DropdownMenuTrigger className="tempo-login-button">
|
||||||
className="tempo-panel-summary"
|
<UserRound size={16} aria-hidden="true" />
|
||||||
aria-label={panelLabel}
|
<span className="max-w-24 truncate">
|
||||||
title={panelLabel}
|
{props.auth.user.name ||
|
||||||
>
|
t('A minha área')}
|
||||||
<LayoutDashboard size={19} aria-hidden="true" />
|
</span>
|
||||||
<span className="tempo-panel-count" aria-hidden="true">
|
<ChevronDown size={12} aria-hidden="true" />
|
||||||
{requestCount}
|
</DropdownMenuTrigger>
|
||||||
</span>
|
<DropdownMenuContent
|
||||||
</Link>
|
align="end"
|
||||||
<span
|
sideOffset={12}
|
||||||
className="sr-only"
|
collisionPadding={12}
|
||||||
role="status"
|
className="tempo-dropdown max-h-[75vh] w-72 max-w-[calc(100vw-1.5rem)] overflow-y-auto p-2"
|
||||||
aria-live="polite"
|
|
||||||
aria-atomic="true"
|
|
||||||
>
|
|
||||||
{panelLabel}
|
|
||||||
</span>
|
|
||||||
{props.auth?.user ? (
|
|
||||||
<DropdownMenu modal={false}>
|
|
||||||
<DropdownMenuTrigger className="tempo-login-button">
|
|
||||||
<UserRound size={16} aria-hidden="true" />
|
|
||||||
<span className="max-w-24 truncate">
|
|
||||||
{props.auth.user.name || t('A minha área')}
|
|
||||||
</span>
|
|
||||||
<ChevronDown size={12} aria-hidden="true" />
|
|
||||||
</DropdownMenuTrigger>
|
|
||||||
<DropdownMenuContent
|
|
||||||
align="end"
|
|
||||||
sideOffset={12}
|
|
||||||
collisionPadding={12}
|
|
||||||
className="tempo-dropdown max-h-[75vh] w-72 max-w-[calc(100vw-1.5rem)] overflow-y-auto p-2"
|
|
||||||
>
|
|
||||||
<DropdownMenuLabel className="truncate text-xs text-slate-500">
|
|
||||||
{props.auth.user.email}
|
|
||||||
</DropdownMenuLabel>
|
|
||||||
{items(accountGroups)}
|
|
||||||
<DropdownMenuSeparator />
|
|
||||||
<DropdownMenuItem
|
|
||||||
asChild
|
|
||||||
className="tempo-menu-item text-red-700"
|
|
||||||
>
|
>
|
||||||
<Link
|
<DropdownMenuLabel className="truncate text-xs text-slate-500">
|
||||||
href={logout()}
|
{props.auth.user.email}
|
||||||
as="button"
|
</DropdownMenuLabel>
|
||||||
type="button"
|
{items(accountGroups)}
|
||||||
disabled={loggingOut}
|
<DropdownMenuSeparator />
|
||||||
data-test="portal-logout-button"
|
<DropdownMenuItem
|
||||||
onClick={() => router.flushAll()}
|
asChild
|
||||||
onStart={() => setLoggingOut(true)}
|
className="tempo-menu-item text-red-700"
|
||||||
onFinish={() => setLoggingOut(false)}
|
|
||||||
>
|
>
|
||||||
<LogOut size={16} aria-hidden="true" />
|
<Link
|
||||||
{loggingOut
|
href={logout()}
|
||||||
? 'A terminar sessão…'
|
as="button"
|
||||||
: t('Terminar sessão')}
|
type="button"
|
||||||
</Link>
|
disabled={loggingOut}
|
||||||
</DropdownMenuItem>
|
data-test="portal-logout-button"
|
||||||
</DropdownMenuContent>
|
onClick={() => router.flushAll()}
|
||||||
</DropdownMenu>
|
onStart={() => setLoggingOut(true)}
|
||||||
) : (
|
onFinish={() =>
|
||||||
<Link href="/login" className="tempo-login-button">
|
setLoggingOut(false)
|
||||||
<UserRound size={15} aria-hidden="true" />
|
}
|
||||||
{t('Entrar')}
|
>
|
||||||
</Link>
|
<LogOut
|
||||||
)}
|
size={16}
|
||||||
|
aria-hidden="true"
|
||||||
|
/>
|
||||||
|
{loggingOut
|
||||||
|
? 'A terminar sessão…'
|
||||||
|
: t('Terminar sessão')}
|
||||||
|
</Link>
|
||||||
|
</DropdownMenuItem>
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
) : (
|
||||||
|
<Link href="/login" className="tempo-login-button">
|
||||||
|
<UserRound size={15} aria-hidden="true" />
|
||||||
|
{t('Entrar')}
|
||||||
|
</Link>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<button
|
||||||
|
ref={toggle}
|
||||||
|
type="button"
|
||||||
|
className="tempo-header-toggle"
|
||||||
|
aria-label={
|
||||||
|
expanded
|
||||||
|
? 'Fechar menu e ferramentas'
|
||||||
|
: 'Abrir menu e ferramentas'
|
||||||
|
}
|
||||||
|
aria-expanded={expanded}
|
||||||
|
aria-controls={`${institutionalId} ${toolsId}`}
|
||||||
|
onClick={() => setExpanded(!expanded)}
|
||||||
|
>
|
||||||
|
{expanded ? (
|
||||||
|
<X size={22} aria-hidden="true" />
|
||||||
|
) : (
|
||||||
|
<Menu size={22} aria-hidden="true" />
|
||||||
|
)}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<div className="tempo-section-bar">
|
||||||
|
<div className="tempo-section-inner">
|
||||||
|
<Link
|
||||||
|
href="/investidor/manifestacoes"
|
||||||
|
className="tempo-panel-summary"
|
||||||
|
>
|
||||||
|
<span>{t('O meu painel')}</span>
|
||||||
|
<span
|
||||||
|
className="tempo-panel-count"
|
||||||
|
aria-live="polite"
|
||||||
|
aria-atomic="true"
|
||||||
|
>
|
||||||
|
{requestCount}{' '}
|
||||||
|
{t(
|
||||||
|
requestCount === 1
|
||||||
|
? 'pedido recebido'
|
||||||
|
: 'pedidos recebidos',
|
||||||
|
)}
|
||||||
|
</span>
|
||||||
|
</Link>
|
||||||
|
<nav
|
||||||
|
aria-label="Áreas do portal"
|
||||||
|
className="tempo-section-navigation"
|
||||||
|
>
|
||||||
|
<ul>
|
||||||
|
{groups
|
||||||
|
.filter((group) =>
|
||||||
|
[
|
||||||
|
'discovery',
|
||||||
|
'realization',
|
||||||
|
'support',
|
||||||
|
].includes(group.id),
|
||||||
|
)
|
||||||
|
.map((group) => (
|
||||||
|
<li key={group.id}>
|
||||||
|
<DropdownMenu modal={false}>
|
||||||
|
<DropdownMenuTrigger
|
||||||
|
className="tempo-nav-trigger"
|
||||||
|
data-current-group={
|
||||||
|
current === group.id ||
|
||||||
|
undefined
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{t(group.label)}
|
||||||
|
<ChevronDown
|
||||||
|
size={14}
|
||||||
|
aria-hidden="true"
|
||||||
|
/>
|
||||||
|
{current === group.id && (
|
||||||
|
<span className="sr-only">
|
||||||
|
Grupo actual
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</DropdownMenuTrigger>
|
||||||
|
<DropdownMenuContent
|
||||||
|
align="start"
|
||||||
|
sideOffset={8}
|
||||||
|
collisionPadding={12}
|
||||||
|
className="tempo-dropdown max-h-[min(75vh,36rem)] w-72 max-w-[calc(100vw-1.5rem)] overflow-y-auto p-2"
|
||||||
|
>
|
||||||
|
{items(
|
||||||
|
group.children ?? [],
|
||||||
|
)}
|
||||||
|
</DropdownMenuContent>
|
||||||
|
</DropdownMenu>
|
||||||
|
</li>
|
||||||
|
))}
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
<Link
|
||||||
|
href="/manifestar-interesse"
|
||||||
|
className="tempo-interest-button"
|
||||||
|
>
|
||||||
|
{t('Manifestar interesse')}
|
||||||
|
</Link>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Link
|
|
||||||
id={interestId}
|
|
||||||
href="/manifestar-interesse"
|
|
||||||
className="tempo-interest-button"
|
|
||||||
>
|
|
||||||
{t('Manifestar interesse')}
|
|
||||||
<ArrowUpRight size={15} aria-hidden="true" />
|
|
||||||
</Link>
|
|
||||||
<button
|
|
||||||
ref={toggle}
|
|
||||||
type="button"
|
|
||||||
className="tempo-header-toggle"
|
|
||||||
aria-label={
|
|
||||||
expanded
|
|
||||||
? 'Fechar menu e ferramentas'
|
|
||||||
: 'Abrir menu e ferramentas'
|
|
||||||
}
|
|
||||||
aria-expanded={expanded}
|
|
||||||
aria-controls={`${navigationId} ${toolsId} ${interestId}`}
|
|
||||||
onClick={() => setExpanded(!expanded)}
|
|
||||||
>
|
|
||||||
{expanded ? (
|
|
||||||
<X size={22} aria-hidden="true" />
|
|
||||||
) : (
|
|
||||||
<Menu size={22} aria-hidden="true" />
|
|
||||||
)}
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -10,16 +10,14 @@ const navigation = [
|
|||||||
|
|
||||||
export function TempoFooter() {
|
export function TempoFooter() {
|
||||||
const { t, language } = useTempoUi();
|
const { t, language } = useTempoUi();
|
||||||
const { portalInstitutionalContactEmail } = usePage<{
|
const { portalInstitutionalContactEmail } = usePage<{ portalInstitutionalContactEmail?: string | null }>().props;
|
||||||
portalInstitutionalContactEmail?: string | null;
|
|
||||||
}>().props;
|
|
||||||
return (
|
return (
|
||||||
<footer
|
<footer
|
||||||
className="tempo-footer border-t border-white/5"
|
className="tempo-footer border-t border-white/5"
|
||||||
lang={language}
|
lang={language}
|
||||||
>
|
>
|
||||||
<div className="mx-auto grid max-w-7xl grid-cols-1 gap-6 px-6 py-6 md:grid-cols-2 lg:grid-cols-5 lg:gap-8 lg:px-12">
|
<div className="mx-auto grid max-w-7xl grid-cols-1 gap-12 px-6 py-10 md:grid-cols-2 lg:grid-cols-5 lg:gap-16 lg:px-12">
|
||||||
<div className="space-y-4">
|
<div className="space-y-8">
|
||||||
<Link
|
<Link
|
||||||
href="/"
|
href="/"
|
||||||
aria-label="InvesteMoz — início"
|
aria-label="InvesteMoz — início"
|
||||||
@@ -39,9 +37,9 @@ export function TempoFooter() {
|
|||||||
</address>
|
</address>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="space-y-4">
|
<div className="space-y-8">
|
||||||
<h2 className="tempo-footer-heading">{t('Contactos')}</h2>
|
<h2 className="tempo-footer-heading">{t('Contactos')}</h2>
|
||||||
<div className="space-y-2">
|
<div className="space-y-5">
|
||||||
{[
|
{[
|
||||||
['+258868010880', '+258 86 801 0880'],
|
['+258868010880', '+258 86 801 0880'],
|
||||||
['+258833219644', '+258 83 321 9644'],
|
['+258833219644', '+258 83 321 9644'],
|
||||||
@@ -60,26 +58,21 @@ export function TempoFooter() {
|
|||||||
</a>
|
</a>
|
||||||
))}
|
))}
|
||||||
<a
|
<a
|
||||||
href={
|
href={portalInstitutionalContactEmail ? `mailto:${portalInstitutionalContactEmail}` : '/apoio'}
|
||||||
portalInstitutionalContactEmail
|
|
||||||
? `mailto:${portalInstitutionalContactEmail}`
|
|
||||||
: '/apoio'
|
|
||||||
}
|
|
||||||
className="tempo-contact-link"
|
className="tempo-contact-link"
|
||||||
>
|
>
|
||||||
<span className="tempo-contact-icon">
|
<span className="tempo-contact-icon">
|
||||||
<Mail size={16} aria-hidden="true" />
|
<Mail size={16} aria-hidden="true" />
|
||||||
</span>
|
</span>
|
||||||
<strong className="min-w-0 text-[13px] leading-5 font-medium [overflow-wrap:anywhere]">
|
<strong className="min-w-0 text-sm font-medium [overflow-wrap:anywhere]">
|
||||||
{portalInstitutionalContactEmail ??
|
{portalInstitutionalContactEmail ?? t('Apoio ao investidor')}
|
||||||
t('Apoio ao investidor')}
|
|
||||||
</strong>
|
</strong>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<nav aria-label="Navegação do rodapé" className="space-y-4">
|
<nav aria-label="Navegação do rodapé" className="space-y-8">
|
||||||
<h2 className="tempo-footer-heading">{t('Navegação')}</h2>
|
<h2 className="tempo-footer-heading">{t('Navegação')}</h2>
|
||||||
<ul className="space-y-2">
|
<ul className="space-y-4">
|
||||||
{navigation.map(([href, label]) => (
|
{navigation.map(([href, label]) => (
|
||||||
<li key={href}>
|
<li key={href}>
|
||||||
<Link href={href} className="tempo-footer-link">
|
<Link href={href} className="tempo-footer-link">
|
||||||
@@ -93,9 +86,9 @@ export function TempoFooter() {
|
|||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<nav aria-label="Informação legal" className="space-y-4">
|
<nav aria-label="Informação legal" className="space-y-8">
|
||||||
<h2 className="tempo-footer-heading">Legal</h2>
|
<h2 className="tempo-footer-heading">Legal</h2>
|
||||||
<ul className="space-y-2">
|
<ul className="space-y-4">
|
||||||
{[
|
{[
|
||||||
[
|
[
|
||||||
'politica-de-privacidade',
|
'politica-de-privacidade',
|
||||||
@@ -118,7 +111,7 @@ export function TempoFooter() {
|
|||||||
))}
|
))}
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
<div className="space-y-4">
|
<div className="space-y-8">
|
||||||
<h2 className="tempo-footer-heading">Social</h2>
|
<h2 className="tempo-footer-heading">Social</h2>
|
||||||
<p className="text-xs leading-relaxed font-medium text-slate-300">
|
<p className="text-xs leading-relaxed font-medium text-slate-300">
|
||||||
{t(
|
{t(
|
||||||
@@ -128,8 +121,8 @@ export function TempoFooter() {
|
|||||||
<TempoSocialLinks footer />
|
<TempoSocialLinks footer />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="border-t border-white/10 py-1.5">
|
<div className="border-t border-white/10 py-2">
|
||||||
<div className="mx-auto flex max-w-7xl flex-col items-center justify-between gap-1 px-6 text-center text-[10px] tracking-[0.1em] text-slate-400 md:flex-row md:text-left md:text-[11px]">
|
<div className="mx-auto flex max-w-7xl flex-col items-center justify-between gap-6 px-6 text-center text-[10px] tracking-[0.2em] text-slate-400 md:flex-row md:text-left md:text-xs">
|
||||||
<p>
|
<p>
|
||||||
© {new Date().getFullYear()}{' '}
|
© {new Date().getFullYear()}{' '}
|
||||||
<span className="text-[#ed1c24]">Tempo</span>.{' '}
|
<span className="text-[#ed1c24]">Tempo</span>.{' '}
|
||||||
|
|||||||
@@ -444,6 +444,7 @@ export function portalNavigation(access: PortalNavAccess): PortalNavItem[] {
|
|||||||
id: 'discovery',
|
id: 'discovery',
|
||||||
label: 'Descoberta',
|
label: 'Descoberta',
|
||||||
children: [
|
children: [
|
||||||
|
link('home', 'Início', '/'),
|
||||||
link(
|
link(
|
||||||
'idea-entry',
|
'idea-entry',
|
||||||
'Partir de uma ideia',
|
'Partir de uma ideia',
|
||||||
|
|||||||
@@ -1,389 +0,0 @@
|
|||||||
// Isolated UI fixture: real header/providers, synthetic Inertia props, no database.
|
|
||||||
// Requires the local Vite server. No requests to Laravel or external services.
|
|
||||||
import assert from 'node:assert/strict';
|
|
||||||
import fs from 'node:fs';
|
|
||||||
import path from 'node:path';
|
|
||||||
import { createRequire } from 'node:module';
|
|
||||||
import { portalNavigation } from '../resources/js/lib/portal-navigation.ts';
|
|
||||||
|
|
||||||
const root = process.cwd();
|
|
||||||
const dir = path.join(root, 'outputs/header-navbar-20261021');
|
|
||||||
fs.mkdirSync(dir, { recursive: true });
|
|
||||||
const require = createRequire(import.meta.url);
|
|
||||||
const { chromium } = require(process.env.HEADER_QA_PLAYWRIGHT || 'playwright');
|
|
||||||
const { expect } = require(
|
|
||||||
(process.env.HEADER_QA_PLAYWRIGHT || 'playwright') + '/test',
|
|
||||||
);
|
|
||||||
const base = process.env.HEADER_QA_VITE || 'http://127.0.0.1:5173';
|
|
||||||
assert.equal(new URL(base).hostname, '127.0.0.1');
|
|
||||||
const before = process.argv.includes('--before');
|
|
||||||
if (before && fs.existsSync(path.join(dir, 'before-results.json'))) {
|
|
||||||
throw new Error(
|
|
||||||
'The original baseline already exists and must be preserved.',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
fs.writeFileSync(
|
|
||||||
path.join(dir, 'fixture.html'),
|
|
||||||
`<!doctype html>
|
|
||||||
<html lang="pt"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
|
||||||
<title>InvesteMoz · revisão do header</title></head><body><div id="app"></div>
|
|
||||||
<script type="module" src="/outputs/header-navbar-20261021/fixture.tsx"></script></body></html>`,
|
|
||||||
);
|
|
||||||
fs.writeFileSync(
|
|
||||||
path.join(dir, 'fixture.tsx'),
|
|
||||||
`
|
|
||||||
import React from 'react';
|
|
||||||
import { createRoot } from 'react-dom/client';
|
|
||||||
import { createInertiaApp } from '@inertiajs/react';
|
|
||||||
import { PortalGroupedMenu } from '../../resources/js/components/portal-grouped-menu';
|
|
||||||
import { TempoUiProvider, useTempoUi } from '../../resources/js/components/tempo-brand';
|
|
||||||
import '../../resources/css/app.css';
|
|
||||||
const role = new URLSearchParams(location.search).get('role') || 'guest';
|
|
||||||
const props = {
|
|
||||||
auth: { user: role === 'guest' ? null : { id: 1, name: 'Investidor de demonstração com nome extenso', email: 'qa@example.invalid' }, canManagePortal: role === 'manager' },
|
|
||||||
existingBusinessEnabled: true, businessReviewUrl: role === 'manager' ? '/management/negocios' : null,
|
|
||||||
educationEnabled: true, aiEnabled: true, legacyContentEnabled: true,
|
|
||||||
};
|
|
||||||
function Fixture() {
|
|
||||||
const ui = useTempoUi();
|
|
||||||
return <><PortalGroupedMenu /><main style={{padding:'48px 24px',maxWidth:1200,margin:'auto'}}>
|
|
||||||
<p style={{color:'#b91c1c',fontSize:12,fontWeight:600,letterSpacing:2}}>INVESTEMOZ · REVISÃO LOCAL</p>
|
|
||||||
<h1 style={{fontSize:36,fontWeight:600,margin:'16px 0'}}>O seu próximo investimento começa aqui</h1>
|
|
||||||
<p style={{color:'#64748b'}}>Navegação real do portal com dados fictícios para testar a apresentação.</p>
|
|
||||||
<button data-test="increment" onClick={ui.registerSubmittedInterest}>Simular pedido no contador</button>
|
|
||||||
</main></>;
|
|
||||||
}
|
|
||||||
await createInertiaApp({page:{component:'fixture',props,url:'/',version:null},resolve:()=>Fixture,
|
|
||||||
setup({el,App,props}) {createRoot(el).render(<TempoUiProvider><App {...props}/></TempoUiProvider>);}});
|
|
||||||
`,
|
|
||||||
);
|
|
||||||
const browser = await chromium.launch({
|
|
||||||
headless: true,
|
|
||||||
...(process.env.HEADER_QA_CHROMIUM
|
|
||||||
? { executablePath: process.env.HEADER_QA_CHROMIUM }
|
|
||||||
: {}),
|
|
||||||
});
|
|
||||||
const results = [];
|
|
||||||
const errors = [];
|
|
||||||
try {
|
|
||||||
for (const [width, role, language] of before
|
|
||||||
? [
|
|
||||||
[1440, 'guest', 'pt'],
|
|
||||||
[390, 'guest', 'pt'],
|
|
||||||
]
|
|
||||||
: [
|
|
||||||
[1280, 'manager', 'fr'],
|
|
||||||
[1280, 'manager', 'pt'],
|
|
||||||
[1440, 'manager', 'fr'],
|
|
||||||
[320, 'guest', 'pt'],
|
|
||||||
[320, 'investor', 'pt'],
|
|
||||||
[390, 'guest', 'pt'],
|
|
||||||
[390, 'manager', 'pt'],
|
|
||||||
[768, 'investor', 'pt'],
|
|
||||||
[1024, 'manager', 'pt'],
|
|
||||||
[1440, 'guest', 'pt'],
|
|
||||||
[1920, 'investor', 'en'],
|
|
||||||
]) {
|
|
||||||
const context = await browser.newContext({
|
|
||||||
viewport: { width, height: 900 },
|
|
||||||
});
|
|
||||||
await context.addInitScript(
|
|
||||||
(lang) => localStorage.setItem('tempo-navigation-language', lang),
|
|
||||||
language,
|
|
||||||
);
|
|
||||||
await context.route('**/*', (route) => {
|
|
||||||
const url = new URL(route.request().url());
|
|
||||||
if (url.origin === base && url.pathname.startsWith('/images/')) {
|
|
||||||
const asset = path.resolve(root, 'public', `.${url.pathname}`);
|
|
||||||
if (
|
|
||||||
asset.startsWith(
|
|
||||||
path.join(root, 'public', 'images') + path.sep,
|
|
||||||
) &&
|
|
||||||
fs.existsSync(asset)
|
|
||||||
) {
|
|
||||||
return route.fulfill({ path: asset });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (url.origin === base || url.protocol === 'data:')
|
|
||||||
return route.continue();
|
|
||||||
return route.abort();
|
|
||||||
});
|
|
||||||
const page = await context.newPage();
|
|
||||||
page.on('pageerror', (e) => {
|
|
||||||
errors.push(e.message);
|
|
||||||
console.error(e.message);
|
|
||||||
});
|
|
||||||
await page.goto(
|
|
||||||
`${base}/outputs/header-navbar-20261021/fixture.html?role=${role}`,
|
|
||||||
{ waitUntil: 'domcontentloaded', timeout: 60000 },
|
|
||||||
);
|
|
||||||
const header = page.locator('.tempo-header');
|
|
||||||
await header.waitFor();
|
|
||||||
await page.screenshot({
|
|
||||||
path: path.join(
|
|
||||||
dir,
|
|
||||||
`${before ? 'before' : 'after'}-${width}-${role}-${language}.png`,
|
|
||||||
),
|
|
||||||
});
|
|
||||||
if (before) {
|
|
||||||
results.push({
|
|
||||||
width,
|
|
||||||
height: await header.evaluate(
|
|
||||||
(el) => el.getBoundingClientRect().height,
|
|
||||||
),
|
|
||||||
});
|
|
||||||
await context.close();
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
assert.equal(
|
|
||||||
await header.locator('nav').count(),
|
|
||||||
1,
|
|
||||||
'One navigation landmark in header',
|
|
||||||
);
|
|
||||||
assert.equal(await header.locator('.tempo-section-bar').count(), 0);
|
|
||||||
const collapsedHeight = await header.evaluate(
|
|
||||||
(el) => el.getBoundingClientRect().height,
|
|
||||||
);
|
|
||||||
assert.ok(collapsedHeight <= 80, `Header height ${collapsedHeight}`);
|
|
||||||
if (width < 1280) {
|
|
||||||
const toggle = header.locator('.tempo-header-toggle');
|
|
||||||
await toggle.click();
|
|
||||||
assert.equal(await toggle.getAttribute('aria-expanded'), 'true');
|
|
||||||
await page.screenshot({
|
|
||||||
path: path.join(
|
|
||||||
dir,
|
|
||||||
`expanded-${width}-${role}-${language}.png`,
|
|
||||||
),
|
|
||||||
});
|
|
||||||
await page.keyboard.press('Escape');
|
|
||||||
assert.equal(await toggle.getAttribute('aria-expanded'), 'false');
|
|
||||||
await expect(toggle).toBeFocused();
|
|
||||||
await toggle.click();
|
|
||||||
}
|
|
||||||
const nav = header.locator('nav');
|
|
||||||
if (width >= 1280) {
|
|
||||||
const boxes = await Promise.all(
|
|
||||||
[
|
|
||||||
'.tempo-logo-link',
|
|
||||||
'.tempo-primary-navigation',
|
|
||||||
'.tempo-header-extras',
|
|
||||||
'.tempo-header-actions',
|
|
||||||
'.tempo-interest-button',
|
|
||||||
].map((selector) => header.locator(selector).boundingBox()),
|
|
||||||
);
|
|
||||||
for (let i = 1; i < boxes.length; i++)
|
|
||||||
assert.ok(
|
|
||||||
boxes[i - 1].x + boxes[i - 1].width <= boxes[i].x + 1,
|
|
||||||
`Header elements overlap at ${width}px: ${JSON.stringify(boxes)}`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
assert.deepEqual(
|
|
||||||
await nav
|
|
||||||
.locator(':scope > ul > li')
|
|
||||||
.evaluateAll((nodes) =>
|
|
||||||
nodes.map(
|
|
||||||
(node) =>
|
|
||||||
node
|
|
||||||
.querySelector('a,button')
|
|
||||||
?.getAttribute('href') ||
|
|
||||||
node.textContent.trim(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
language === 'pt'
|
|
||||||
? [
|
|
||||||
'/',
|
|
||||||
'Descoberta',
|
|
||||||
'Realização',
|
|
||||||
'Suporte',
|
|
||||||
'/sobre',
|
|
||||||
'Tempo',
|
|
||||||
]
|
|
||||||
: language === 'fr'
|
|
||||||
? [
|
|
||||||
'/',
|
|
||||||
'Découvrir',
|
|
||||||
'Investir',
|
|
||||||
'Assistance',
|
|
||||||
'/sobre',
|
|
||||||
'Tempo',
|
|
||||||
]
|
|
||||||
: ['/', 'Discover', 'Invest', 'Support', '/sobre', 'Tempo'],
|
|
||||||
);
|
|
||||||
assert.equal(await nav.locator('a[href="/sobre"]').count(), 1);
|
|
||||||
assert.equal(
|
|
||||||
await nav
|
|
||||||
.locator('a')
|
|
||||||
.first()
|
|
||||||
.evaluate((el) => getComputedStyle(el).fontSize),
|
|
||||||
width >= 1280 ? '18px' : '16px',
|
|
||||||
);
|
|
||||||
const destinations = new Set(
|
|
||||||
await header
|
|
||||||
.locator('a[href]')
|
|
||||||
.evaluateAll((nodes) =>
|
|
||||||
nodes.map((node) => node.getAttribute('href')),
|
|
||||||
),
|
|
||||||
);
|
|
||||||
async function inspectMenu(menu) {
|
|
||||||
await menu.waitFor();
|
|
||||||
menu = page.locator(`[id="${await menu.getAttribute('id')}"]`);
|
|
||||||
try {
|
|
||||||
await expect
|
|
||||||
.poll(async () => {
|
|
||||||
const box = await menu.boundingBox();
|
|
||||||
return (
|
|
||||||
!!box &&
|
|
||||||
box.x >= 0 &&
|
|
||||||
box.x + box.width <= width + 1
|
|
||||||
);
|
|
||||||
})
|
|
||||||
.toBe(true);
|
|
||||||
} catch (error) {
|
|
||||||
console.error(
|
|
||||||
JSON.stringify({
|
|
||||||
width,
|
|
||||||
role,
|
|
||||||
menu: await menu.getAttribute('aria-labelledby'),
|
|
||||||
box: await menu.boundingBox(),
|
|
||||||
}),
|
|
||||||
);
|
|
||||||
await page.screenshot({
|
|
||||||
path: path.join(dir, 'submenu-failure.png'),
|
|
||||||
});
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
for (const href of await menu
|
|
||||||
.locator('a[href]')
|
|
||||||
.evaluateAll((nodes) =>
|
|
||||||
nodes.map((node) => node.getAttribute('href')),
|
|
||||||
))
|
|
||||||
destinations.add(href);
|
|
||||||
const subIds = await menu
|
|
||||||
.locator('[role="menuitem"][aria-haspopup="menu"]')
|
|
||||||
.evaluateAll((nodes) => nodes.map((node) => node.id));
|
|
||||||
for (const subId of subIds) {
|
|
||||||
const sub = page.locator(`[id="${subId}"]`);
|
|
||||||
await sub.focus();
|
|
||||||
await page.keyboard.press('ArrowRight');
|
|
||||||
await expect(sub).toHaveAttribute('aria-expanded', 'true');
|
|
||||||
await inspectMenu(page.locator('[role="menu"]').last());
|
|
||||||
await page.keyboard.press('ArrowLeft');
|
|
||||||
await expect(sub).toBeFocused();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for (const trigger of await nav
|
|
||||||
.locator(':scope > ul > li > button')
|
|
||||||
.all()) {
|
|
||||||
await trigger.focus();
|
|
||||||
await page.keyboard.press('Enter');
|
|
||||||
assert.equal(await trigger.getAttribute('aria-expanded'), 'true');
|
|
||||||
const menu = page.locator('[role="menu"]').last();
|
|
||||||
await inspectMenu(menu);
|
|
||||||
await page.keyboard.press('Escape');
|
|
||||||
await expect(trigger).toBeFocused();
|
|
||||||
}
|
|
||||||
await header
|
|
||||||
.getByRole('button', { name: 'Tempo', exact: true })
|
|
||||||
.click();
|
|
||||||
for (const href of [
|
|
||||||
'/contacto',
|
|
||||||
'https://revista.tempo.co.mz/',
|
|
||||||
'https://www.facebook.com/revistatempo.mz/',
|
|
||||||
'https://www.instagram.com/revistatempo.mz/',
|
|
||||||
'https://www.linkedin.com/company/revistatempo/',
|
|
||||||
'https://www.youtube.com/@RevistaTempoMz/',
|
|
||||||
]) {
|
|
||||||
assert.equal(
|
|
||||||
await page.locator(`[role="menu"] a[href="${href}"]`).count(),
|
|
||||||
1,
|
|
||||||
href,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
await page.keyboard.press('Escape');
|
|
||||||
assert.ok(
|
|
||||||
await header
|
|
||||||
.getByRole('button', { name: 'Idioma da navegação' })
|
|
||||||
.isVisible(),
|
|
||||||
);
|
|
||||||
assert.ok(
|
|
||||||
await header
|
|
||||||
.getByRole('button', { name: 'Temperatura em Maputo' })
|
|
||||||
.isVisible(),
|
|
||||||
);
|
|
||||||
assert.ok(
|
|
||||||
await header.locator('a[href="/manifestar-interesse"]').isVisible(),
|
|
||||||
);
|
|
||||||
const dashboard = header.locator('a[href="/investidor/manifestacoes"]');
|
|
||||||
assert.ok(await dashboard.isVisible());
|
|
||||||
await page.locator('[data-test="increment"]').click();
|
|
||||||
assert.match(await dashboard.getAttribute('aria-label'), /1 /);
|
|
||||||
if (role !== 'guest') {
|
|
||||||
await header.locator('.tempo-login-button').click();
|
|
||||||
await inspectMenu(page.locator('[role="menu"]').last());
|
|
||||||
assert.ok(
|
|
||||||
await page
|
|
||||||
.locator('[data-test="portal-logout-button"]')
|
|
||||||
.isVisible(),
|
|
||||||
);
|
|
||||||
const hasManagement = await page
|
|
||||||
.getByRole('menu')
|
|
||||||
.getByText('Gestão', { exact: true })
|
|
||||||
.count();
|
|
||||||
assert.equal(hasManagement > 0, role === 'manager');
|
|
||||||
await page.keyboard.press('Escape');
|
|
||||||
} else {
|
|
||||||
assert.ok(await header.locator('a[href="/login"]').isVisible());
|
|
||||||
}
|
|
||||||
const catalog = portalNavigation({
|
|
||||||
authenticated: role !== 'guest',
|
|
||||||
manager: role === 'manager',
|
|
||||||
businesses: true,
|
|
||||||
businessReviewUrl:
|
|
||||||
role === 'manager' ? '/management/negocios' : null,
|
|
||||||
education: true,
|
|
||||||
ai: true,
|
|
||||||
legacyContent: true,
|
|
||||||
});
|
|
||||||
function checkDestinations(groups) {
|
|
||||||
for (const group of groups) {
|
|
||||||
if (group.children) checkDestinations(group.children);
|
|
||||||
else if (group.href)
|
|
||||||
assert.ok(
|
|
||||||
destinations.has(group.href),
|
|
||||||
`Preserved destination: ${group.href}`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
checkDestinations(
|
|
||||||
role === 'guest'
|
|
||||||
? catalog.filter((group) => group.id !== 'account')
|
|
||||||
: catalog,
|
|
||||||
);
|
|
||||||
const overflow = await header.evaluate((el) =>
|
|
||||||
Array.from(el.querySelectorAll('a,button,img'))
|
|
||||||
.filter((n) => {
|
|
||||||
const r = n.getBoundingClientRect();
|
|
||||||
return r.width && (r.x < -1 || r.right > innerWidth + 1);
|
|
||||||
})
|
|
||||||
.map((n) => n.textContent),
|
|
||||||
);
|
|
||||||
assert.deepEqual(overflow, []);
|
|
||||||
results.push({
|
|
||||||
width,
|
|
||||||
role,
|
|
||||||
language,
|
|
||||||
collapsedHeight,
|
|
||||||
destinations: destinations.size,
|
|
||||||
result: 'passed',
|
|
||||||
});
|
|
||||||
await context.close();
|
|
||||||
}
|
|
||||||
assert.deepEqual(errors, []);
|
|
||||||
fs.writeFileSync(
|
|
||||||
path.join(dir, before ? 'before-results.json' : 'qa-results.json'),
|
|
||||||
JSON.stringify({ results, errors }, null, 2),
|
|
||||||
);
|
|
||||||
console.log(JSON.stringify({ results, errors }));
|
|
||||||
} finally {
|
|
||||||
await browser.close();
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user