morkeltry / GAP-microfinance

GAP microfinance frontend and Solidity prototype
0 stars 1 forks source link

Loans flow - eligiblity page #15

Open morkeltry opened 6 years ago

morkeltry commented 6 years ago

Makes call to dummy function getHistory(ethAddr), calls both populate(creditIndication()) on the response, which is expected to be an array of strings.

Renders all elements, constant height

Credit History shows 'None' until populated. large middle element shows GAP background graphic until populated (ie once eligibility is a number) Apply button has 0.75 opacity until populated, but is always active unless deactivated (or, if using top-down state, if eligibility===0)

write creditIndication() function which takes either an array of strings, 0 or -1 as argument and returns if array: array.length*150 if zero: 100 if -1 : -1

write populate() which populates middle element as shown in flow diagram and sets Apply opacity to 0.75 if eligibilty is -1, 1.0 otherwise