diff --git a/front-end/css/export_loan.css b/front-end/css/export_loan.css
new file mode 100644
index 0000000..f9ff53a
--- /dev/null
+++ b/front-end/css/export_loan.css
@@ -0,0 +1,7 @@
+.export_loans_popup {
+ margin-top: 20px;
+ margin-left: auto;
+ margin-right: auto;
+ width:300px;
+ opacity: 90%;
+}
\ No newline at end of file
diff --git a/front-end/index.html b/front-end/index.html
new file mode 100644
index 0000000..1e3cc60
--- /dev/null
+++ b/front-end/index.html
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/front-end/js/common.js b/front-end/js/common.js
index edc168b..5d8f2a0 100644
--- a/front-end/js/common.js
+++ b/front-end/js/common.js
@@ -12,8 +12,7 @@ var top_toolbar = {
"value": "SFM",
"icon": "wxi-dots",
"submenu": [
- { "value": "Summary", "icon": "wxi-calendar" , "href": "javascript:show_summary();"},
- { "value": "Mass Mailing", "icon": "mdi mdi-email", "href": "mass_mailing.html" },
+ { "value": "Summary", "icon": "wxi-calendar" , "href": "javascript:menu_show_summary();"},
{ "$template": "Separator" },
{ "value": "Logout", "icon": "mdi mdi-exit-run", "href" : "login.html" }
]
@@ -26,14 +25,16 @@ var top_toolbar = {
"data": [
{
"value": "Add", "icon": "mdi mdi-table-column-plus-before" ,
- "href" : "javascript:loan_add_popup.show();"
+ "href" : "javascript: menu_loan_add();"
},
+ {
+ "value": "List all", "icon": "mdi mdi-view-list" ,
+ "href" : "javascript:menu_loan_list_all();"
+ },
+ { "$template": "Separator" },
+ { "value": "Export", "icon": "mdi mdi-file-export" , "href" : "javascript:menu_export_loans();"},
{ "$template": "Separator" },
- { "value": "New", "icon": "mdi mdi-file-export", "badge": "20" , "href" : "transaction_new.html"},
- { "value": "Submitted", "icon": "mdi mdi-file-upload", "badge": "50", "href" : "transaction_submit.html" },
- { "value": "Approved", "icon": "mdi mdi-file-upload", "badge": "35" ,"href" : "transaction_submit.html"},
- { "value": "Rejected", "icon": "mdi mdi-file-upload", "badge": "10" , "href" : "transaction_submit.html"},
- { "value": "Settled", "icon": "mdi mdi-file-upload", "badge": "99" ,"href" : "transaction_submit.html"}
+ { "value": "Search", "icon": "mdi mdi-magnify", "href" : "javascript:menu_search_loans();"}
]
}
},
@@ -45,10 +46,10 @@ var top_toolbar = {
"data": [
{
"value": "List all", "icon": "mdi mdi-table-column-plus-before" ,
+ "href" : "javascript: menu_list_trails();"
},
{ "$template": "Separator" },
- { "value": "Export", "icon": "mdi mdi-file-export" , "href" : "javascript:loan_add_popup.show();"},
- { "value": "Import", "icon": "mdi mdi-file-upload" , "href" : "javascript:loan_add_popup.show();"}
+ { "value": "Import", "icon": "mdi mdi-file-upload" , "href" : "javascript:menu_import_trail();"}
]
}
},
@@ -56,21 +57,26 @@ var top_toolbar = {
"value": "Clients",
"icon": "mdi mdi-account-supervisor-circle",
"submenu": [
- { "value": "Add", "icon": "mdi mdi-account-plus" ,"href" : "transaction_submit.html"},
- { "value": "Search", "icon": "mdi mdi-account-search" ,"href" : "transaction_submit.html"},
- { "value": "Broadcast", "icon": "mdi mdi-account-off" ,"href" : "transaction_submit.html"}
+ { "value": "Add", "icon": "mdi mdi-account-plus" ,"href" : "javascript:menu_add_client();"},
+ { "$template": "Separator" },
+ { "value": "List All", "icon": "mdi mdi-account-plus" ,"href" : "javascript:menu_list_clients();"},
+ { "value": "Search", "icon": "mdi mdi-account-search" ,"href" : "javascript:menu_search_clients();"},
+ { "$template": "Separator" },
+ { "value": "Broadcast", "icon": "mdi mdi-account-voice" ,"href" : "javascript:menu_broadcast_clients();"}
]
},
{
"value": "Broker",
"icon": "mdi mdi-account-details",
"submenu": [
- { "value": "Add", "icon": "mdi mdi-account-plus" ,"href" : "transaction_submit.html"},
- { "value": "Search", "icon": "mdi mdi-account-search" ,"href" : "transaction_submit.html"},
+ { "value": "Add", "icon": "mdi mdi-account-plus" ,"href" : "javascript:menu_add_broker();"},
+ { "$template": "Separator" },
+ { "value": "List All", "icon": "mdi mdi-account-plus" ,"href" : "javascript:menu_list_brokers();"},
+ { "value": "Search", "icon": "mdi mdi-account-search" ,"href" : "javascript:menu_search_brokers();"},
{ "$template": "Separator" },
- { "value": "Broadcast", "icon": "mdi mdi-account-off" ,"href" : "transaction_submit.html"},
+ { "value": "Broadcast", "icon": "mdi mdi-account-voice" ,"href" : "javascript:menu_broadcast_brokers();"},
{ "$template": "Separator" },
- { "value": "Unpaid", "icon": "mdi mdi-file-upload","href" : "transaction_submit.html" }
+ { "value": "Unpaid", "icon": "mdi mdi-file-upload","href" : "javascript:menu_list_unpaid_brokers();" }
]
}
],
diff --git a/front-end/js/export_loan.js b/front-end/js/export_loan.js
new file mode 100644
index 0000000..7a35080
--- /dev/null
+++ b/front-end/js/export_loan.js
@@ -0,0 +1,25 @@
+var export_loans = {
+ "view": "popup",
+ "id": "export_loans_popup",
+ "css": "export_loans_popup",
+ "position":"center",
+ head:"This window can be moved",
+ close : true ,
+ "modal" :true,
+ "move" : true,
+ "animation": true,
+ "width": 400,
+ "height": 400,
+ "body":{
+ "id": 1603044245806,
+ "rows": [
+ { "value": 0, "minWidth": 0, "minHeight": 0, "stroke": "8", "view": "gage", "id": "export_loan_gage" },
+ { "label": "Download File", "view": "button", "height": 38 , "click": export_loans_close}
+ ]
+ }
+};
+var export_loans_popup = webix.ui(export_loans);
+function export_loans_close() {
+ export_loans_popup.hide();
+ $$("export_loan_gage").setValue(0);
+}
diff --git a/front-end/js/loan_add.js b/front-end/js/loan_add.js
index 99bf9a4..7fa815a 100644
--- a/front-end/js/loan_add.js
+++ b/front-end/js/loan_add.js
@@ -1,4 +1,4 @@
-function close(id, event) {
+function loan_add_popup_close(id, event) {
loan_add_popup.hide();
}
@@ -22,7 +22,7 @@ var loan_add_form = {
"cols": [
{ "view": "icon", "icon": "wxi-plus" },
{ "view": "label", "label": "Add new Transactions" },
- { "view": "button", "label": "Close", "width": 80 , "click": "close"}
+ { "view": "button", "label": "Close", "width": 80 , "click": "loan_add_popup_close"}
]
},
{
@@ -142,17 +142,19 @@ var loan_add_form = {
scroll:true,
columns:[
{ id:"org", editor:"text", header:"Revelant Parties", fillspace:true},
+ { id:"role", editor:"select", options:["SFM", "Clients", "Brokers", "BDM", "Referal", "Other"], header: "Role"},
{ id:"trail", editor:"text", header:"Trail $", width :150},
- { id:"date", editor:"date", header:"Date", format:webix.Date.dateToStr("%Y-%m-%d"), width :150},
- { id:"src", editor:"select", header:"Data Source (Excel/PDF)", width :150}
+ { id:"date", editor:"date", header:"Month", format:webix.Date.dateToStr("%Y-%m-%d"), width :150},
+ { id:"src", editor:"select", options:["AA220202.xls", "BB202011bb.PDF", "CCWestPack.DocX", "Manual", "Other"], header:"Data Source (Excel/PDF)", width :150}
],
data: [
- { id:1, org: "SFM" , trail: "$500", date :"2020-02", src: "AA220202.xls" },
- { id:2, org: "Broker John", trail: "$500", date :"2020-02" , src: "AA220202.xls"},
- { id:3, org: "Referal Smith", trail: "$500", date: "2020-02", src: "AA220202.xls"},
- { id:4, org: "People Jessie", trail: "$500", date :"2020-02", src: "AA220202.xls"},
- { id:5, org: "People Warron", trail: "$500", date: "2020-02", src: "AA220202.xls"},
- { id:6, org: "People Richard", trail: "$500",date :"2020-02", src: "AA220202.xls"}
+ { id:1, org: "SFM" , role: "SFM", trail: "$500", date :"2020-02", src: "AA220202.xls" },
+ { id:2, org: "John", role :"SFM", trail: "$500", date :"2020-02" , src: "AA220202.xls"},
+ { id:3, org: "Smith", role: "SFM", trail: "$500", date: "2020-02", src: "AA220202.xls"},
+ { id:4, org: "Jessie",role: "SFM", trail: "$500", date :"2020-02", src: "AA220202.xls"},
+ { id:5, org: "Warron", role :"SFM", trail: "$500", date: "2020-02", src: "AA220202.xls"},
+ { id:6, org: "Richard",role :"SFM", trail: "$500",date :"2020-02", src: "AA220202.xls"},
+ { id:7, org: "",role :"", trail: "",date :"", src: "manual"}
]
},
@@ -161,7 +163,7 @@ var loan_add_form = {
"cols": [
{ "view": "template", "template": " ", "role": "placeholder", "borderless": true },
{ "view": "button", "label": "Discard", "css": "webix_transparent", "align": "right", "width": 120 },
- { "view": "button", "css": "webix_primary", "label": "Save", "align": "right", "width": 120, "click": "close" }
+ { "view": "button", "css": "webix_primary", "label": "Save", "align": "right", "width": 120, "click": "loan_add_popup_close" }
]
}
]
diff --git a/front-end/js/login.js b/front-end/js/login.js
index 198b802..b4ecd29 100644
--- a/front-end/js/login.js
+++ b/front-end/js/login.js
@@ -14,7 +14,7 @@ var loginform = {
{ "view": "text", "label": "Password", "name": "pass", "type": "password" },
{ "label": "Login", "view": "button", "height": 38, "borderless": 1 ,
click: function(ev, id){
- window.location.href = "dashboard.html";
+ window.location.href = "summary.html";
}
}
],
diff --git a/front-end/js/summary.js b/front-end/js/summary.js
index 8e823f1..a166007 100644
--- a/front-end/js/summary.js
+++ b/front-end/js/summary.js
@@ -128,10 +128,216 @@ var summary_graph = {
]
}
-function show_summary() {
- webix.ui(summary_graph, $$('summary_layout').getChildViews()[1]);
+webix.ready(function(){
+ menu_show_summary();
+});
+
+function subview(v) {
+ webix.ui(v, $$('summary_layout').getChildViews()[1]);
}
-webix.ready(function(){
- show_summary();
-});
\ No newline at end of file
+function menu_show_summary() {
+ subview(summary_graph);
+}
+
+var list_loans = {
+ "width":0 ,
+ "rows" : [
+ {
+ "id" : "loan_list",
+ "view": "datatable",
+ click: menu_loan_add,
+ "columns": [
+ { "id": "funder", "header": "Funder", "fillspace": true, "sort": "string" },
+ { "id": "customer", "header": "Customers", "sort": "string", "width": 200 },
+ { "id": "settlement", "header": "Settlement date", "sort": "string" },
+ { "id": "loanamount", "header": "Loan Amount", "sort": "string" },
+ {
+ "id": "commission",
+ "header": "Commission Margin",
+ "sort": "string",
+ "width": 200,
+ "fillspace": false,
+ "hidden": false,
+ "css": "{'text-align':'center'}"
+ },
+ {
+ "id": "net",
+ "header": "Net Amount",
+ "sort": "string",
+ "width": 150,
+ "fillspace": false,
+ "hidden": false
+ },
+ { "id": "gst", "header": "GST", "fillspace": false, "hidden": false },
+ { "id": "gross", "header": "Gross Amount", "fillspace": false, "hidden": false },
+ { "id": "pay2broker", "header": "Pay to Broker", "width": 200, "fillspace": false, "hidden": false }
+ ],
+ "select": true,
+ "scrollX": false,
+ "url" : "data/loan.json",
+ "width": 0
+ },
+ {
+ "view": "datatable",
+ "sort": false,
+ "scroll" : false,
+ "columns": [
+ { "id": "funder", "header": "", "fillspace": true, "sort": "string" },
+ { "id": "customer", "header": "", "sort": "string", "width": 200 },
+ { "id": "settlement", "header": " ", "sort": "string" },
+ { "id": "loanamount", "header": " ", "sort": "string" },
+ {
+ "id": "commission",
+ "header": " ",
+ "sort": "string",
+ "width": 200,
+ "fillspace": false,
+ "hidden": false,
+ "css": "{'text-align':'center'}"
+ },
+ {
+ "id": "net",
+ "header": " ",
+ "sort": "string",
+ "width": 100,
+ "fillspace": false,
+ "hidden": false
+ },
+ { "id": "gst", "header": "", "fillspace": false, "hidden": false },
+ { "id": "gross", "header": "", "fillspace": false, "hidden": false },
+ { "id": "pay2broker", "header": "Total", "width": 200, "fillspace": false, "hidden": false }
+ ],
+ "height": 100,
+ "url" : "data/loan_total.json"
+ }
+ ]
+};
+
+function menu_loan_add() {
+ loan_add_popup.show();
+}
+
+function menu_loan_list_all() {
+ subview(list_loans);
+ webix.ui({
+ view:"contextmenu", id:"loan_list_cm",
+ data: ["Add", "Edit", "Delete", "Properties"],
+ master:$$("loan_list") // component object
+});
+}
+
+function menu_export_loans() {
+ export_loans_popup.show();
+ $$("export_loan_gage").setValue(0);
+ setInterval(function(){
+ $$("export_loan_gage").setValue(100);
+ }, 100)
+
+}
+
+
+var search_loans = {
+ "cols": [
+ {
+ "rows": [
+ {
+ "css": "webix_dark",
+ "view": "toolbar",
+ "cols": [
+ { "view": "label", "label": "Search Loan Transactions" },
+ { "view": "button", "label": "Close", "autowidth": true }
+ ]
+ },
+ {
+ "autoheight": false,
+ "view": "form",
+ "rows": [
+ {
+ "cols": [
+ { "view": "text", "name": "name" },
+ { "view": "button", "css": "webix_primary", "label": "Search", "height": 38, "width": 100 }
+ ]
+ },
+ {
+ "id": "search_loan_result",
+ "view": "datatable",
+ "columns": [
+ { "id": "funder", "header": "Funder", "fillspace": true, "sort": "string" },
+ { "id": "customer", "header": "Customers", "sort": "string", "width": 200 },
+ { "id": "settlement", "header": "Settlement date", "sort": "string" },
+ { "id": "loanamount", "header": "Loan Amount", "sort": "string" },
+ {
+ "id": "commission",
+ "header": "Commission Margin",
+ "sort": "string",
+ "width": 200,
+ "fillspace": false,
+ "hidden": false,
+ "css": "{'text-align':'center'}"
+ },
+ {
+ "id": "net",
+ "header": "Net Amount",
+ "sort": "string",
+ "width": 150,
+ "fillspace": false,
+ "hidden": false
+ },
+ { "id": "gst", "header": "GST", "fillspace": false, "hidden": false },
+ { "id": "gross", "header": "Gross Amount", "fillspace": false, "hidden": false },
+ { "id": "pay2broker", "header": "Pay to Broker", "width": 200, "fillspace": false, "hidden": false }
+ ],
+ "select": true,
+ "scrollX": false,
+ "url" : "data/loan.json",
+ "width": 0
+ },
+ ]
+ }
+ ]
+ }
+ ]
+};
+
+function menu_search_loans() {
+ subview(search_loans);
+}
+function menu_list_trails() {
+ alert("ok");
+}
+function menu_import_trail() {
+ alert("ok");
+}
+function menu_add_client() {
+ alert("ok");
+}
+function menu_list_clients() {
+ alert("ok");
+}
+function menu_search_clients() {
+ alert("ok");
+}
+function menu_broadcast_clients() {
+ alert("ok");
+}
+function menu_add_broker() {
+ alert("ok");
+}
+function menu_list_brokers() {
+ alert("ok");
+}
+function menu_search_brokers() {
+ alert("ok");
+}
+function menu_broadcast_brokers() {
+ alert("ok");
+}
+
+function menu_list_unpaid_brokers() {
+ alert("ok");
+}
+
+function load_add() {
+
+}
\ No newline at end of file
diff --git a/front-end/js/trail_popup.js b/front-end/js/trail_popup.js
new file mode 100644
index 0000000..2494fd6
--- /dev/null
+++ b/front-end/js/trail_popup.js
@@ -0,0 +1,55 @@
+function trail_popup_close(id, event) {
+ trail_popup.hide();
+}
+
+
+var trail_form = {
+ "view": "popup",
+ "id": "trail_popup",
+ "css": "trail_popup",
+ "position":"center",
+ head:"This window can be moved",
+ close : true ,
+ "modal" :true,
+ "move" : true,
+ "width": 800,
+ "body": {
+ rows: [
+ {
+ "view": "toolbar",
+ "css": "webix_dark",
+ "paddingX": 5,
+ "cols": [
+ { "view": "icon", "icon": "wxi-plus" },
+ { "view": "label", "label": "Trails" },
+ { "view": "button", "label": "Close", "width": 80 , "click": "trail_popup_close"}
+ ]
+ },
+ {
+ view:"datatable",
+ editable:true,
+ height: 200,
+ scroll:true,
+ columns:[
+ { id:"org", editor:"text", header:"Revelant Parties", fillspace:true},
+ { id:"role", editor:"select", options:["SFM", "Clients", "Brokers", "BDM", "Referal", "Other"], header: "Role"},
+ { id:"trail", editor:"text", header:"Trail $", width :150},
+ { id:"date", editor:"date", header:"Month", format:webix.Date.dateToStr("%Y-%m-%d"), width :150},
+ { id:"src", editor:"select", options:["AA220202.xls", "BB202011bb.PDF", "CCWestPack.DocX", "Manual", "Other"], header:"Data Source (Excel/PDF)", width :150}
+ ],
+ data: [
+ { id:1, org: "SFM" , role: "SFM", trail: "$500", date :"2020-02", src: "AA220202.xls" },
+ { id:2, org: "John", role :"SFM", trail: "$500", date :"2020-02" , src: "AA220202.xls"},
+ { id:3, org: "Smith", role: "SFM", trail: "$500", date: "2020-02", src: "AA220202.xls"},
+ { id:4, org: "Jessie",role: "SFM", trail: "$500", date :"2020-02", src: "AA220202.xls"},
+ { id:5, org: "Warron", role :"SFM", trail: "$500", date: "2020-02", src: "AA220202.xls"},
+ { id:6, org: "Richard",role :"SFM", trail: "$500",date :"2020-02", src: "AA220202.xls"},
+ { id:7, org: "",role :"", trail: "",date :"", src: "manual"}
+ ]
+ }
+ ]
+ }
+
+};
+
+var trail_popup = webix.ui(trail_form);
\ No newline at end of file
diff --git a/front-end/summary.html b/front-end/summary.html
index 4acb042..1317005 100644
--- a/front-end/summary.html
+++ b/front-end/summary.html
@@ -4,12 +4,17 @@
+
+
+
+
+