fpdcc / ccfp-asset-dashboard

CCFP Asset Dashboard
0 stars 1 forks source link

Feature/phase and funding form #244

Closed xmedr closed 11 months ago

xmedr commented 11 months ago

Overview

This allows for the manipulation of multiple funding streams from a phase edit page. Features include:

Closes #156

Demo

image

Notes

The funding table scrolls horizontally on small screen sizes. This is the best display I could come up with, but if there is a more appealing way of fitting the table please lmk!

Testing Instructions

xmedr commented 11 months ago

The way that django is rendering these forms, there are multiple input elements with the same id like id_year, id_budget_0, etc. I tried instantiating the existing funding forms with different ids based off of their primary keys, but then couldn't figure out a solid way of selecting them to be invisible in css. (ex. id_budget_0 would turn into id_budget_test_0) Everything works regardless, but as of now I haven't found an elegant way to resolve that. I could do more digging on this here or open an issue and work on that in another branch, whichever is fine by me!

Also as of now, having a budget and actual cost of 0 is an invalid input. If zero can be a valid value for this field then I can definitely change this!

xmedr commented 11 months ago

@smcalilly gotcha! I also realized that the model allowed negative dollar amounts, so i changed the serializer to disallow that. is that alright?

smcalilly commented 11 months ago

@xmedr yep! good catch.