3035app / pialab

PiaLab Angular app
http://www.pialab.io/
GNU General Public License v3.0
26 stars 8 forks source link

Risks Mapping and Action Plan images problems #37

Closed daniel84 closed 6 years ago

daniel84 commented 6 years ago

Summary

When editing and evaluation of a PIA are complete, some problems occur in the generation of the risk mapping and action plan images:

Steps to reproduce

Simply edit and evaluate a PIA and try to display risk mapping and action plan images in front-end application. Then just try to print the complete PIA or to export it as a PDF through the print icon button in the Overview page. You can also directly download the images using the "Download images" button in the Overview page.

Expected behavior

To see the complete risk mapping and action plan images in front-end application, as well as in the printed paper (or PDF), as well as downloaded images.

Actual behavior

Look at the attachments:

Thanks.

riskscartography image image image

RomainSanchez commented 6 years ago

Hi @daniel84 Thanks for your input and props for a perfectly clear issue. We are already aware of this issue, risk mapping is broken due to gauge values not being set.From what i tested the bug already existed in the original project.

We'll work on that.

Feel free to submit a PR if you feel like you can help

daniel84 commented 6 years ago

Hi @RomainSanchez have you had time to work on this issue? I tried to manually set gauge values for evaluations in Postgres "pia_evaluation" table, but unfortunately nothing changes... I really need these two image bugs fixed as soon as possible, but I understand that maybe they're not a priority for you... Where can I look or what tests can I do to find where the problem (and the solution) is? So maybe I can find a way to help...

Thank you very much.

daniel84 commented 6 years ago

Hi everybody. I think I've fixed the problems with the risk mapping image: I can't do a PR, so I'm writing the solution here. In file "pialab/src/app/entry/entry-content/risks-cartography/risks-cartography.component.ts", actual row 91: return entry.id === answer.reference_to; has to become return entry.id == answer.reference_to; with just 2 equals signs. That's because the types of entry.id and answer.reference_to are different.

The problem with action plan image (the missing blue and green squares when printing the PIA on paper or PDF from the overview page) still persists.

Thank you very much.

daniel84 commented 6 years ago

Hi everybody. I've probably fixed the action plan printing problem too: the blue and green squares are spans with a background color assigned via css. The JavaScript window.print() method doesn't print background colors by default, so you have to explicitly:

Hope this could help you...

RomainSanchez commented 6 years ago

Hi @daniel84 , Sorry we didn't have time to fix this yet. Great job! Thanks a lot for the help