Skip to content

Investments update - #4312

Draft
entantoencuanto wants to merge 20 commits into
masterfrom
investments_update
Draft

Investments update#4312
entantoencuanto wants to merge 20 commits into
masterfrom
investments_update

Conversation

@entantoencuanto

@entantoencuanto entantoencuanto commented Oct 28, 2025

Copy link
Copy Markdown
Member

✌️ What does this PR do?

This PR adds the changes required to display the investments projects for Mataró with the most recent requirements:

Filters

  • Filters accept allowedValues to restrict the options offered, and hideDropdown to render them always expanded
  • Mataró: remove date, any-estat and import filters; add any-pla-inversions, zones and consells-territorials

Project detail tables

  • Custom field plugins can declare vocabulary_ids in their configuration, and the API returns those vocabularies' terms in the metadata
  • Tables now render a header row, resolve vocabulary columns to term names, and size each column by type (date / vocabulary / money / text)
  • Mataró: new work start/end dates and -ambiva amounts including taxes with -ambiva suffix, partida replaced by the estats table, wider label column

Phases

  • Support 8 phases with a proper gradient (negative styling from the 5th onwards)

API

  • Admin terms API accepts external_id when creating terms

Refactor and fixes

  • CustomField vocabulary methods decoupled: requires_vocabulary? (declared need) vs has_vocabulary? (declared or configured), vocabulary_ids always returns an array, and vocabularies covers both the single and the plugin-configured ones
  • vocabulary_terms serialization reduced to a single pass, no longer dropping plugin-configured vocabularies

🔍 How should this be manually tested?

👀 Screenshots

Before this PR

After this PR

:shipit: Does this PR changes any configuration file?

  • new environment variable in .env.example?
  • new entry in config/application.yml?
  • new entry in config/secrets.yml?

(Changes in these files might need to update the role in Ansible)

📖 Does this PR require updating the documentation?

  • new site configuration variable?
  • new site template?
  • new module/submodule settings?
  • significant changes in some feature?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant