Easy Pay

The application doesn't use MySQL databases, but thier functionality is replicated by the use of HTML 5 local storage. The data is parsed to and from local storage through JSON objects. The user interface consists of a single HTML file and one stylesheet, while the DOM elements are manipulated through JavaScript to give the feeling that there are several different pages. Since the website relies on local storage for keeping data about users and transactions, there are only four hardcoded users saved by default. One can login to the website by using their email and password, on the bottom of the front page.

Easy Pay Show Case

Easy Pay

Code Sample

Javascript Code For Populating Pie Charts With Dynamically Generated Data About The Wealth of the Bank Customers

function RefreshOverallChart() {

aStatPoorCustomers = [];
aStatMiddleCustomers = [];
aStatWealthyCustomers = [];

for (var i = 0; i < aCustomers.length; i++) {

// console.log('x') ;
if (aCustomers[i].Amount < 100 ) {
aStatPoorCustomers.push("poor");
}

if (aCustomers[i].Amount >= 100 && aCustomers[i].Amount < 1000) {
aStatMiddleCustomers.push("middle");
}

if (aCustomers[i].Amount >= 1000) {
aStatWealthyCustomers.push("wealthy");
}

}

var iTotalCustomers = Number(aCustomers.length);
var iAveragePoorCustomers = Number(aStatPoorCustomers.length);
var iAverageMiddleCustomers = Number(aStatMiddleCustomers.length);
var iAverageRichCustomers = Number(aStatWealthyCustomers.length);

//Append data to the chart

$("#pieWealthOverall").html(' link to the source of the chart:' + iAveragePoorCustomers + ',' + iAverageMiddleCustomers + ',' + iAverageRichCustomers + '&cht=p3&chl=Poor|Middle|Wealthy&chco=f2dede|fcf8e3|d0e9c6 >');

//Generate the statistics as percentages

var percentagePoorCustomers = ((iAveragePoorCustomers / iTotalCustomers) * 100).toFixed(3);
$("#poorClientsPercentage").html(percentagePoorCustomers);

var percentageMiddleCustomers = ((iAverageMiddleCustomers / iTotalCustomers) *100 ).toFixed(3);
$("#middleClientsPercentage").html(percentageMiddleCustomers);

var percentageWealthyCustomers = ((iAverageRichCustomers / iTotalCustomers) * 100).toFixed(3);
$("#wealthyClientsPercentage").html(percentageWealthyCustomers);
}