Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tenders and contracts lists pages for Dashboards module #3053

Merged
merged 25 commits into from
May 14, 2020

Conversation

eltercero
Copy link
Member

Closes #2997

✌️ What does this PR do?

Integrates the markup done is #3028 with the remote csv data defined in Gobierto Dashboard settings. This PR enables several new pages for Contracts and Tenders dashboard in the main site:

  • Summary
  • Contracts index
  • Contract details
  • Tenders index
  • Tender details

Some parts, like the filters and the summary, are empty on purpose since this is still a work in progress.

Navigation should work between main parts (Summary ,Tenders and Contracts) and within the details page of every contract/tender.

🔍 How should this be manually tested?

It's available in staging: https://burjassot.gobify.net/dashboards/contratos/resumen

👀 Screenshots

Captura de pantalla 2020-05-11 a las 12 09 32

Captura de pantalla 2020-05-11 a las 12 09 21

Captura de pantalla 2020-05-11 a las 12 09 42

: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?

Copy link
Member

@ferblape ferblape left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! It looks great, just a few details (they can be fixed here or open a new issue if you prefer):

  • format the prices with locale separators and units. You can check how it's been implemeted in Mataro investments

  • if I'm in a contract or a tender, I'd expect the navigation option to be active:

Screenshot 2020-05-12 at 10 33 22

  • data should be sorted by date ASC. You can't trust it will be sorted in the CSV
  • in contracts item page add the disccount %. Anyway I'm creating a new issue with more columns we could display to make it more interesting

Copy link
Member

@Crashillo Crashillo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are two CSV files commited, is that right?

app/assets/stylesheets/module-dashboards.scss Show resolved Hide resolved
app/assets/stylesheets/module-dashboards.scss Show resolved Hide resolved
app/assets/stylesheets/module-dashboards.scss Show resolved Hide resolved
app/assets/stylesheets/module-dashboards.scss Show resolved Hide resolved
@@ -0,0 +1,8 @@
export const store = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ferblape Rethink if we should redeclare all this kind of things by module

config/locales/gobierto_dashboards/views/ca.yml Outdated Show resolved Hide resolved
config/locales/gobierto_dashboards/views/ca.yml Outdated Show resolved Hide resolved
@eltercero eltercero force-pushed the 2997-tenders-contracts-lists-pages branch from a146709 to 981efb9 Compare May 12, 2020 14:32
@eltercero
Copy link
Member Author

@ferblape since there is a new issue for the new columns, I'll do the last thing there if that's ok! The other things you mentioned are now fixed.

Routing and nav are not great atm though. I'll redo them after I talk with @Crashillo.

@@ -0,0 +1,12 @@
export const contractsColumns = [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we move the columns to the module configuration JSON?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this JSON config already available from de API? Our initial idea was fetch the site metadata from XHR call (because it should be stored in DB), instead having a json config file in the code

@eltercero eltercero force-pushed the 2997-tenders-contracts-lists-pages branch from 264f8d7 to bc1b444 Compare May 13, 2020 09:03
@eltercero eltercero force-pushed the 2997-tenders-contracts-lists-pages branch from 5bc9733 to 8901ed9 Compare May 13, 2020 15:02
@eltercero
Copy link
Member Author

eltercero commented May 13, 2020

Things left to be done in other issues:

  • Check if we can change axios for d3.
  • Add slots to the Index > Table > TableRow components
  • Remove duplicated code in ContractsIndex and TendersIndex if TendersIndex remains.
  • Move contracts and tendersData to props in router

@ferblape if everything else is correct I'll merge it

@eltercero
Copy link
Member Author

@ferblape is the review finished? can I merge it?

@ferblape
Copy link
Member

Yep 🚀

@Crashillo
Copy link
Member

Wait wait wait

@Crashillo
Copy link
Member

Blat the Kid, the fastest merge on this side of the Mississipi

To avoid using _self as this. Also (not related), adding destructuring.
@eltercero
Copy link
Member Author

@Crashillo I think everything is either done or postponed (:P), can you check again?

@eltercero eltercero requested a review from Crashillo May 14, 2020 10:18
Comment on lines +36 to +43
{ path: "/dashboards/contratos", component: Home,
children: [
{ path: "resumen", name: "summary", component: Summary },
{ path: "contratos", name: "contracts_index", component: ContractsIndex },
{ path: "contratos/:id", name: "contracts_show", component: ContractsShow },
{ path: "licitaciones", name: "tenders_index", component: TendersIndex },
{ path: "licitaciones/:id", name: "tenders_show", component: TendersShow },
]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eltercero Don't you tell me you gonna add the props here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but I'll do it in the latest issue on development to avoid conflicts in three separate branches #3053 (comment)

@eltercero eltercero requested a review from Crashillo May 14, 2020 12:45
@eltercero eltercero merged commit 1143329 into master May 14, 2020
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.

Implement basic tenders and contracts list
3 participants