-
Notifications
You must be signed in to change notification settings - Fork 0
/
node_red_flow.json
1 lines (1 loc) · 84.2 KB
/
node_red_flow.json
1
[{"id":"a8541511.46dad8","type":"tab","label":"Final_V4","disabled":false,"info":""},{"id":"1e37e6c5.21d979","type":"group","z":"a8541511.46dad8","name":"Starting and Destination Locations / GeoCode","style":{"stroke":"#ff0000","fill":"#ffefbf","label":true,"label-position":"n","color":"#000000"},"nodes":["87f03594.75e8a8","de7d542f.645618","eb533165.d1a52","fbc7359d.d6cdb8","b547ff4b.f29f8","d325453b.782bb8","80dea7cd.f77ec8","dafad312.2735a"],"x":94,"y":2299,"w":1032,"h":142},{"id":"743491a9.12f6","type":"group","z":"a8541511.46dad8","name":"Request Driving Navigation Instructions ","style":{"stroke":"#ff0000","fill":"#ffefbf","label":true,"label-position":"n","color":"#000000"},"nodes":["ab09cbe2.b01a68","af15dbbe.1ee158","a045e1d.269462","5fb2e1f5.e6bad","3e4cbad8.b61326","f16f5121.31069","196725ad.6fecba"],"x":134,"y":2519,"w":772,"h":182},{"id":"82341d0.88841e","type":"group","z":"a8541511.46dad8","name":"Draw Map and Route","style":{"stroke":"#ff0000","fill":"#ffefbf","label":true,"label-position":"n","color":"#000000"},"nodes":["8916d4c2.b491b8","3efcc35d.dbf78c","35532306.3d8b9c","7a67419.0b7cbc","f8816794.efd278","8f7570e1.14c41","656dce4.3f89b3","3956bb61.b15124","e9e44fad.de8af"],"x":134,"y":2759,"w":832,"h":242},{"id":"93a3b9f3.ae5378","type":"http response","z":"a8541511.46dad8","name":"","statusCode":"","headers":{},"x":750,"y":100,"wires":[]},{"id":"54edabb3.9e7724","type":"template","z":"a8541511.46dad8","name":"","field":"payload","fieldType":"msg","format":"html","syntax":"plain","template":"<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n\t<meta charset=\"UTF-8\">\n\t<title>Transparent Login Form HTML CSS</title>\n\t<link href=\"style.css\" rel=\"stylesheet\">\n</head>\n<style>\n* {\n\tbox-sizing: border-box;\n}\nbody {\n\tfont-family: poppins;\n\tfont-size: 16px;\n\tcolor: #fff;\n}\n.form-box {\n\tbackground-color: rgba(0, 0, 0, 0.5);\n\tmargin: auto auto;\n\tpadding: 40px;\n\tborder-radius: 5px;\n\tbox-shadow: 0 0 10px #000;\n\tposition: absolute;\n\ttop: 0;\n\tbottom: 0;\n\tleft: 0;\n\tright: 0;\n\twidth: 500px;\n\theight: 430px;\n}\n.form-box:before {\n\tbackground-image: url(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTrWXHSNFxmKfAY45LCJ5kNYahw9xZ85_tc4g&usqp=CAU\");\n\twidth: 100%;\n\theight: 100%;\n\tbackground-size: cover;\n\tcontent: \"\";\n\tposition: fixed;\n\tleft: 0;\n\tright: 0;\n\ttop: 0;\n\tbottom: 0;\n\tz-index: -1;\n\tdisplay: block;\n\tfilter: blur(2px);\n}\n.form-box .header-text {\n\tfont-size: 32px;\n\tfont-weight: 600;\n\tpadding-bottom: 30px;\n\ttext-align: center;\n}\n.form-box input {\n\tmargin: 10px 0px;\n\tborder: none;\n\tpadding: 10px;\n\tborder-radius: 5px;\n\twidth: 100%;\n\tfont-size: 18px;\n\tfont-family: poppins;\n}\n.form-box input[type=checkbox] {\n\tdisplay: none;\n}\n.form-box label {\n\tposition: relative;\n\tmargin-left: 5px;\n\tmargin-right: 10px;\n\ttop: 5px;\n\tdisplay: inline-block;\n\twidth: 20px;\n\theight: 20px;\n\tcursor: pointer;\n}\n.form-box label:before {\n\tcontent: \"\";\n\tdisplay: inline-block;\n\twidth: 20px;\n\theight: 20px;\n\tborder-radius: 5px;\n\tposition: absolute;\n\tleft: 0;\n\tbottom: 1px;\n\tbackground-color: #ddd;\n}\n.form-box input[type=checkbox]:checked+label:before {\n\tcontent: \"\\2713\";\n\tfont-size: 20px;\n\tcolor: #000;\n\ttext-align: center;\n\tline-height: 20px;\n}\n.form-box span {\n\tfont-size: 14px;\n}\n.form-box button {\n\tbackground-color: deepskyblue;\n\tcolor: #fff;\n\tborder: none;\n\tborder-radius: 5px;\n\tcursor: pointer;\n\twidth: 100%;\n\tfont-size: 18px;\n\tpadding: 10px;\n\tmargin: 20px 0px;\n}\nspan a {\n\tcolor: #BBB;\n}\n\n</style>\n<body>\n <form action=\"/wclogin\" method=\"POST\">\n \t<div class=\"form-box\">\n \t\t<div class=\"header-text\">\n \t\t\tWaste Collection Portal\n \t\t</div>\n \t\t<div><input placeholder=\"Username/EmailId\" type=\"text\" id=\"user\" name=\"user\" required><br></div>\n \t\t<div><input placeholder=\"Password\" type=\"password\" id=\"pass\" name=\"pass\" required></div>\n \t\t\n \t\t<table>\n <tr><td><input type=\"radio\" id=\"product-user\" name=\"User\" value=\"product-user\">Product User</td>\n <td><input type=\"radio\" id=\"waste-collector\" name=\"User\" value=\"waste-collector\">Waste Collector</td> </tr>\n </table>\n \t\t\n <!--<div><input type=\"radio\" id=\"product-user\" name=\"User\" value=\"product-user\"></div>-->\n <!--<label for=\"product-user\">Product User</label>-->\n <!--<div><input type=\"radio\" id=\"waste-collector\" name=\"User\" value=\"waste-collector\"></div>-->\n <!--<label for=\"waste-collector\">Waste Collector</label>-->\n \t\t<!--<input type=\"submit\" value=\"Submit\">-->\n \t\t<button>Submit</button>\n \t\t<span>\n \t\t <a href=\"#\">Forgot Password!</a>\n \t\t</span>   \n \t\t<span>\n \t\t <a href=\"/sign\">Sign Up!</a>\n \t\t</span>\n \t</div>\n\t</form>\n</body>\n</html>","output":"str","x":420,"y":100,"wires":[["93a3b9f3.ae5378"]]},{"id":"ac7b19c.08b91e8","type":"http in","z":"a8541511.46dad8","name":"","url":"/wclogin","method":"get","upload":false,"swaggerDoc":"","x":90,"y":100,"wires":[["54edabb3.9e7724"]]},{"id":"10163e9d.680101","type":"cloudant out","z":"a8541511.46dad8","name":"login_history","cloudant":"","database":"login_details","service":"node-red-nvdyw-2021--cloudant-1623857013362-32355","payonly":true,"operation":"insert","x":430,"y":140,"wires":[]},{"id":"566c949a.23c14c","type":"debug","z":"a8541511.46dad8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":430,"y":200,"wires":[]},{"id":"8ac18d99.eb47d","type":"http in","z":"a8541511.46dad8","name":"[post] wclogin","url":"/wclogin","method":"post","upload":false,"swaggerDoc":"","x":90,"y":200,"wires":[["566c949a.23c14c","10163e9d.680101","c398996a.2e5228"]]},{"id":"1cf90981.8c04d6","type":"http in","z":"a8541511.46dad8","name":"","url":"/sign","method":"get","upload":false,"swaggerDoc":"","x":80,"y":920,"wires":[["ff9554d3.5ba248"]]},{"id":"ff9554d3.5ba248","type":"template","z":"a8541511.46dad8","name":"","field":"payload","fieldType":"msg","format":"html","syntax":"plain","template":"<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n <meta charset=\"UTF-8\">\n <title>Sign up </title>\n</head>\n<style>\n * {\n box-sizing: border-box;\n }\n\n body {\n font-family: poppins;\n font-size: 16px;\n color: #fff;\n }\n\n .tab-group {\n list-style: none;\n padding: 0;\n margin: 0 0 40px 0;\n }\n\n li a {\n display: block;\n text-decoration: none;\n padding: 15px;\n background: rgba(#a0b3b0, .25);\n color: #a0b3b0;\n font-size: 20px;\n float: left;\n width: 50%;\n text-align: center;\n cursor: pointer;\n transition: .5s ease;\n }\n\n .tab-group:hover {\n color: #ffffff;\n }\n\n .tab-group:active {\n color: #ffffff;\n }\n\n .tab-group:after {\n content: \"\";\n display: table;\n clear: both;\n }\n\n .form {\n background-color: rgba(0, 0, 0, 0.5);\n margin: auto auto;\n padding: 40px;\n border-radius: 5px;\n box-shadow: 0 0 10px #000;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: 500px;\n height: 600px;\n }\n\n .form:before {\n background-image: url(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTrWXHSNFxmKfAY45LCJ5kNYahw9xZ85_tc4g&usqp=CAU\");\n width: 100%;\n height: 100%;\n background-size: cover;\n content: \"\";\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n z-index: -1;\n display: block;\n filter: blur(2px);\n }\n\n .form label {\n position: relative;\n margin-left: 5px;\n margin-right: 10px;\n top: 5px;\n display: inline-block;\n height: 20px;\n cursor: pointer;\n }\n\n .form span {\n font-size: 14px;\n }\n\n .form input {\n margin: 10px 0px;\n border: none;\n padding: 10px;\n border-radius: 5px;\n width: 100%;\n font-size: 18px;\n font-family: poppins;\n }\n\n\n input[type=\"radio\"] {\n width: 20px;\n font-size: 18px;\n font-family: poppins;\n }\n\n .form button {\n background-color: deepskyblue;\n color: #fff;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n width: 100%;\n font-size: 18px;\n padding: 10px;\n margin: 20px 0px;\n }\n\n span a {\n color: #BBB;\n }\n</style>\n\n<body>\n <div class=\"form\">\n\n <h1> Sign up </h1>\n\n <div class=\"tab-content\">\n <div class=\"product\" id=\"signupuser\">\n\n <form action=\"/insert\" method=\"post\">\n <input placeholder=\"First Name\" id=\"fname\" name=\"fname\" type=\"text\" required>\n <input placeholder=\"Last Name\" id=\"lname\" name=\"lname\" type=\"text\" required>\n <input placeholder=\"Email\" id=\"email\" name=\"email\" type=\"email\">\n <input placeholder=\"Contact\" id=\"contact\" name=\"contact\" type=\"tel\" required>\n <input placeholder=\"Address\" id=\"address\" name=\"address\" type=\"text\" required>\n <input placeholder=\"username\" type=\"text\" id=\"username\" name=\"user\" required>\n <input placeholder=\"Password\" type=\"password\" id=\"pass\" name=\"pass\" required>\n <input type=\"radio\" id=\"product-user\" name=\"User\" value=\"product-user\">\n <label for=\"product-user\">Product User</label>\n <input type=\"radio\" id=\"waste-collector\" name=\"User\" value=\"waste-collector\">\n <label for=\"waste-collector\">Waste Collector</label>\n <button type=\"submit\" onclick=\"loginPage()\">Sign up</button>\n </form>\n\n </div>\n\n </div><!-- tab-content -->\n\n </div> <!-- /form -->\n \n <script>\n function loginPage() {\n location.replace(\"https://node-red-nvdyw-2021-06-16-optum.eu-gb.mybluemix.net/wclogin\")\n }\n </script>\n</body>\n\n</html>","output":"str","x":380,"y":920,"wires":[["11fe15e6.12745a","37f097b3.ff52c8"]]},{"id":"11fe15e6.12745a","type":"debug","z":"a8541511.46dad8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":670,"y":900,"wires":[]},{"id":"37f097b3.ff52c8","type":"http response","z":"a8541511.46dad8","name":"","statusCode":"","headers":{},"x":650,"y":980,"wires":[]},{"id":"225d4c09.855d54","type":"http in","z":"a8541511.46dad8","name":"","url":"/insert","method":"post","upload":false,"swaggerDoc":"","x":90,"y":1080,"wires":[["aa655d7f.e6b2d","68967fc1.f3be8"]]},{"id":"aa655d7f.e6b2d","type":"debug","z":"a8541511.46dad8","name":"","active":true,"tosidebar":true,"console":true,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":350,"y":1120,"wires":[]},{"id":"68967fc1.f3be8","type":"cloudant out","z":"a8541511.46dad8","name":"consumers","cloudant":"","database":"consumers","service":"node-red-nvdyw-2021--cloudant-1623857013362-32355","payonly":true,"operation":"insert","x":370,"y":1000,"wires":[]},{"id":"34361dee.568642","type":"template","z":"a8541511.46dad8","name":"","field":"payload","fieldType":"msg","format":"html","syntax":"plain","template":"<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n\t<meta charset=\"UTF-8\">\n\t<title>User input form</title>\n\t<link href=\"style.css\" rel=\"stylesheet\">\n</head>\n<style>\n* {\n\tbox-sizing: border-box;\n}\nbody {\n\tfont-family: poppins;\n\tfont-size: 16px;\n\tcolor: #fff;\n}\n.form-box {\n\tbackground-color: rgba(0, 0, 0, 0.6);\n\tmargin: auto auto;\n\tpadding: 40px;\n\tborder-radius: 5px;\n\tbox-shadow: 0 0 10px #000;\n\tposition: absolute;\n\ttop: 0;\n\tbottom: 0;\n\tleft: 0;\n\tright: 0;\n\twidth: 500px;\n\theight: 480px;\n}\n.form-box:before {\n\tbackground-image: url(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRlkDB-ct4za1h9_lO_x2mQq5luqF6khy0sEQ&usqp=CAU\");\n\twidth: 100%;\n\theight: 100%;\n\tbackground-size: cover;\n\tcontent: \"\";\n\tposition: fixed;\n\tleft: 0;\n\tright: 0;\n\ttop: 0;\n\tbottom: 0;\n\tz-index: -1;\n\tdisplay: block;\n\tfilter: blur(2px);\n}\n.form-box .header-text {\n\tfont-size: 32px;\n\tfont-weight: 600;\n\tpadding-bottom: 30px;\n\ttext-align: center;\n}\n.form-box input {\n\tmargin: 10px 0px;\n\tborder: none;\n\tpadding: 10px;\n\tborder-radius: 5px;\n\twidth: 100%;\n\tfont-size: 18px;\n\tfont-family: poppins;\n}\n.form-box input[type=checkbox] {\n\tdisplay: none;\n}\n.form-box label {\n\tposition: relative;\n\tmargin-left: 5px;\n\tmargin-right: 10px;\n\ttop: 5px;\n\tdisplay: inline-block;\n\twidth: 20px;\n\theight: 20px;\n\tcursor: pointer;\n}\n.form-box label:before {\n\tcontent: \"\";\n\tdisplay: inline-block;\n\twidth: 20px;\n\theight: 20px;\n\tborder-radius: 5px;\n\tposition: absolute;\n\tleft: 0;\n\tbottom: 1px;\n\tbackground-color: #ddd;\n}\n.form-box input[type=checkbox]:checked+label:before {\n\tcontent: \"\\2713\";\n\tfont-size: 20px;\n\tcolor: #000;\n\ttext-align: center;\n\tline-height: 20px;\n}\n.form-box span {\n\tfont-size: 14px;\n}\n.form-box button {\n\tbackground-color: deepskyblue;\n\tcolor: #fff;\n\tborder: none;\n\tborder-radius: 5px;\n\tcursor: pointer;\n\twidth: 100%;\n\tfont-size: 18px;\n\tpadding: 10px;\n\tmargin: 20px 0px;\n}\nspan a {\n\tcolor: #BBB;\n}\n\n</style>\n<body>\n <input type=\"button\" value=\"Logout\" onclick=\"logout()\" style=\"float:right\" class=\"login-button\"/>\n\t<div class=\"form-box\">\n\t\t<div class=\"header-text\">\n\t\t\tCustomer Section: Waste Management\n\t\t</div>\n\t\t<div>\n\t\t<br>\n\t\t<form id=\"userdetails\" actions=\"/userdetails\">\n \t\t<table id =\"dataCollection\" style=\"width:100%\">\n \t\t\t\n \t\t\t<tr>\n \t\t\t\t<td><input type=\"button\" value=\"New Order\" onclick=\"newOrderFunc()\" class=\"login-button\"/></td>\n \t\t\t\t<!--<button onclick=\"newOrderFunc()\">New Order</button>-->\n \t\t\t</tr>\n \t\t\t<tr>\n \t\t\t\t<td><input type=\"button\" value=\"Track Order\" onclick=\"trackOldUserOrders()\" class=\"login-button\"/></td>\n \t\t\t\t<!--<td><button>Track Order</button></td>-->\n \t\t\t</tr>\n \t\t\t<tr>\n \t\t\t\t<td><input type=\"button\" value=\"Review Points\" onclick=\"trackUserRewards()\" class=\"login-button\"/></td>\n \t\t\t\t<!--<td><button>Review Points</button></td>-->\n \t\t\t</tr>\n \t\t</table>\n\t\t</form>\n\t\t<br>\n\t\t</div>\n\t</div>\n\t\n\t<script>\n function newOrderFunc() {\n location.replace(\"https://node-red-nvdyw-2021-06-16-optum.eu-gb.mybluemix.net/neworder\")\n }\n \n function trackOldUserOrders() {\n location.replace(\"https://node-red-nvdyw-2021-06-16-optum.eu-gb.mybluemix.net/trackorder\")\n }\n \n function trackUserRewards() {\n location.replace(\"https://node-red-nvdyw-2021-06-16-optum.eu-gb.mybluemix.net/userrewards\")\n }\n \n function logout() {\n location.replace(\"https://node-red-nvdyw-2021-06-16-optum.eu-gb.mybluemix.net/welcome\")\n }\n \n </script>\n\n</body>\n</html>","output":"str","x":380,"y":500,"wires":[["dd21e703.2634f8"]]},{"id":"dd21e703.2634f8","type":"http response","z":"a8541511.46dad8","name":"","statusCode":"","headers":{},"x":670,"y":500,"wires":[]},{"id":"51ed5372.a3ccec","type":"http in","z":"a8541511.46dad8","name":"","url":"/userdetails","method":"get","upload":false,"swaggerDoc":"","x":100,"y":500,"wires":[["34361dee.568642"]]},{"id":"8db86e03.5b7f9","type":"http request","z":"a8541511.46dad8","name":"[get]userdetails","method":"GET","ret":"txt","paytoqs":"query","url":"https://node-red-nvdyw-2021-06-16-optum.eu-gb.mybluemix.net/userdetails","tls":"","persist":false,"proxy":"","authType":"","x":500,"y":280,"wires":[["4a85812e.571f2"]]},{"id":"4a85812e.571f2","type":"http response","z":"a8541511.46dad8","name":"","statusCode":"","headers":{},"x":770,"y":280,"wires":[]},{"id":"cb365a18.4c7718","type":"template","z":"a8541511.46dad8","name":"","field":"payload","fieldType":"msg","format":"html","syntax":"plain","template":"<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n\t<meta charset=\"UTF-8\">\n\t<title>User input form</title>\n\t<link href=\"style.css\" rel=\"stylesheet\">\n</head>\n<style>\n* {\n\tbox-sizing: border-box;\n}\nbody {\n\tfont-family: poppins;\n\tfont-size: 16px;\n\tcolor: #fff;\n}\n.form-box {\n\tbackground-color: rgba(0, 0, 0, 0.6);\n\tmargin: auto auto;\n\tpadding: 40px;\n\tborder-radius: 5px;\n\tbox-shadow: 0 0 10px #000;\n\tposition: absolute;\n\ttop: 0;\n\tbottom: 0;\n\tleft: 0;\n\tright: 0;\n\twidth: 500px;\n\theight: 550px;\n}\n.form-box:before {\n\tbackground-image: url(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRlkDB-ct4za1h9_lO_x2mQq5luqF6khy0sEQ&usqp=CAU\");\n\twidth: 100%;\n\theight: 100%;\n\tbackground-size: cover;\n\tcontent: \"\";\n\tposition: fixed;\n\tleft: 0;\n\tright: 0;\n\ttop: 0;\n\tbottom: 0;\n\tz-index: -1;\n\tdisplay: block;\n\tfilter: blur(2px);\n}\n.form-box .header-text {\n\tfont-size: 32px;\n\tfont-weight: 600;\n\tpadding-bottom: 30px;\n\ttext-align: center;\n}\n.form-box input {\n\tmargin: 10px 0px;\n\tborder: none;\n\tpadding: 10px;\n\tborder-radius: 5px;\n\twidth: 100%;\n\tfont-size: 18px;\n\tfont-family: poppins;\n}\n.form-box input[type=checkbox] {\n\tdisplay: none;\n}\n.form-box label {\n\tposition: relative;\n\tmargin-left: 5px;\n\tmargin-right: 10px;\n\ttop: 5px;\n\tdisplay: inline-block;\n\twidth: 20px;\n\theight: 20px;\n\tcursor: pointer;\n}\n.form-box label:before {\n\tcontent: \"\";\n\tdisplay: inline-block;\n\twidth: 20px;\n\theight: 20px;\n\tborder-radius: 5px;\n\tposition: absolute;\n\tleft: 0;\n\tbottom: 1px;\n\tbackground-color: #ddd;\n}\n.form-box input[type=checkbox]:checked+label:before {\n\tcontent: \"\\2713\";\n\tfont-size: 20px;\n\tcolor: #000;\n\ttext-align: center;\n\tline-height: 20px;\n}\n.form-box span {\n\tfont-size: 14px;\n}\n.form-box button {\n\tbackground-color: deepskyblue;\n\tcolor: #fff;\n\tborder: none;\n\tborder-radius: 5px;\n\tcursor: pointer;\n\twidth: 100%;\n\tfont-size: 18px;\n\tpadding: 10px;\n\tmargin: 20px 0px;\n}\nspan a {\n\tcolor: #BBB;\n}\n\n</style>\n<body>\n\t<div class=\"form-box\">\n\t\t<div class=\"header-text\">\n\t\t\tWaste Collection Form\n\t\t</div>\n\t\t<div>\n\t\t<form action=\"/neworder\" method=\"POST\"> \n\t\t<table id =\"dataCollection\" style=\"width:100%\">\n\t\t\t<tr>\n\t\t\t\t<th>Product type</th>\n\t\t\t\t<th>Quantity (kg)</th>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Paper</td>\n\t\t\t\t<td><input id=\"wasteQty1\" name=\"Paper\" type=\"number\" min=0 max=50 value=0></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Cardboard</td>\n\t\t\t\t<td><input id=\"wasteQty2\" name=\"Cardboard\" type=\"number\" min=0 max=50 value=0></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Metal</td>\n\t\t\t\t<td><input id=\"wasteQty3\" name=\"Metal\" type=\"number\" min=0 max=50 value=0></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Fabric</td>\n\t\t\t\t<td><input id=\"wasteQty4\" name=\"Fabric\" type=\"number\" min=0 max=50 value=0></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>Others</td>\n\t\t\t\t<td><input id=\"wasteQty5\" name=\"Others\" type=\"number\" min=0 max=50 value=0></td>\n\t\t\t</tr>\n\t\t</table>\n\t\t\n\t\t\t<!--<input type=\"submit\" value=\"Submit\" class=\"login-button\"/>-->\n\t\t\t<button>Submit</button>\n\t\t\t</form>\n\t\t<br>\n\t\t</div>\n\t</div>\n\t\n\t<!--<script>-->\n <!-- function newTrackFunc() {-->\n <!-- location.replace(\"https://node-red-nvdyw-2021-06-16-optum.eu-gb.mybluemix.net/trackorder\")-->\n <!-- }-->\n <!-- </script>-->\n \n</body>\n</html>","output":"str","x":380,"y":560,"wires":[["49afee97.41729"]]},{"id":"49afee97.41729","type":"http response","z":"a8541511.46dad8","name":"","statusCode":"","headers":{},"x":670,"y":560,"wires":[]},{"id":"ef25561f.512048","type":"http in","z":"a8541511.46dad8","name":"","url":"/neworder","method":"get","upload":false,"swaggerDoc":"","x":100,"y":560,"wires":[["cb365a18.4c7718"]]},{"id":"1895cf7d.25b341","type":"http in","z":"a8541511.46dad8","name":"","url":"/trackorder","method":"get","upload":false,"swaggerDoc":"","x":100,"y":800,"wires":[["29606553.41e3ba"]]},{"id":"d4d0f246.eb51","type":"template","z":"a8541511.46dad8","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n\t<meta charset=\"UTF-8\">\n\t<title>User display</title>\n\t<link href=\"style.css\" rel=\"stylesheet\">\n</head>\n<style>\n* {\n\tbox-sizing: border-box;\n}\nbody {\n\tfont-family: poppins;\n\tfont-size: 16px;\n\tcolor: #fff;\n}\n.form-box {\n\tbackground-color: rgba(0, 0, 0, 0.6);\n\tmargin: auto auto;\n\tpadding: 40px;\n\tborder-radius: 5px;\n\tbox-shadow: 0 0 10px #000;\n\tposition: absolute;\n\ttop: 0;\n\tbottom: 0;\n\tleft: 0;\n\tright: 0;\n\twidth: 500px;\n\theight: 520px;\n}\n.form-box:before {\n\tbackground-image: url(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRlkDB-ct4za1h9_lO_x2mQq5luqF6khy0sEQ&usqp=CAU\");\n\twidth: 100%;\n\theight: 100%;\n\tbackground-size: cover;\n\tcontent: \"\";\n\tposition: fixed;\n\tleft: 0;\n\tright: 0;\n\ttop: 0;\n\tbottom: 0;\n\tz-index: -1;\n\tdisplay: block;\n\tfilter: blur(2px);\n}\n.form-box .header-text {\n\tfont-size: 32px;\n\tfont-weight: 600;\n\tpadding-bottom: 30px;\n\ttext-align: center;\n}\n.form-box input {\n\tmargin: 10px 0px;\n\tborder: none;\n\tpadding: 10px;\n\tborder-radius: 5px;\n\twidth: 100%;\n\tfont-size: 18px;\n\tfont-family: poppins;\n}\n.form-box input[type=checkbox] {\n\tdisplay: none;\n}\n.form-box label {\n\tposition: relative;\n\tmargin-left: 5px;\n\tmargin-right: 10px;\n\ttop: 5px;\n\tdisplay: inline-block;\n\twidth: 20px;\n\theight: 20px;\n\tcursor: pointer;\n}\n.form-box label:before {\n\tcontent: \"\";\n\tdisplay: inline-block;\n\twidth: 20px;\n\theight: 20px;\n\tborder-radius: 5px;\n\tposition: absolute;\n\tleft: 0;\n\tbottom: 1px;\n\tbackground-color: #ddd;\n}\n.form-box input[type=checkbox]:checked+label:before {\n\tcontent: \"\\2713\";\n\tfont-size: 20px;\n\tcolor: #000;\n\ttext-align: center;\n\tline-height: 20px;\n}\n.form-box span {\n\tfont-size: 14px;\n}\n.form-box button {\n\tbackground-color: deepskyblue;\n\tcolor: #fff;\n\tborder: none;\n\tborder-radius: 5px;\n\tcursor: pointer;\n\twidth: 100%;\n\tfont-size: 18px;\n\tpadding: 10px;\n\tmargin: 20px 0px;\n}\nspan a {\n\tcolor: #BBB;\n}\n\n</style>\n<body id=\"form1\">\n\t<div class=\"form-box\">\n\t\t<div class=\"header-text\">\n\t\t\tOrder Status Tracking\n\t\t</div>\n\t\t<div id=\"showData\">\n\t\t<br>\n\t\t<table id =\"dataDisplay\" style=\"width:100%\">\n\t\t\t<thead>\n\t\t\t<tr>\n\t\t\t <th>Date</th>\n\t\t\t\t<th>Total Quantity</th>\n\t\t\t\t<th>Status</th>\n\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t{{#payload}}\n\t\t\t<tr>\n\t\t\t <td>{{Time}}</td>\n\t\t\t <td>{{totalQuantity}}</td>\n\t\t\t <td>{{productstatus}}</td>\n\t\t\t</tr>\n\t\t\t{{/payload}}\n\t\t</table>\n\t\t</div>\n\t\t<button id=\"backU2\" onclick=\"getToDetailsPage()\">Back</button>\n\t</div>\n</body>\n<script>\n function getToDetailsPage() {\n location.replace(\"https://node-red-nvdyw-2021-06-16-optum.eu-gb.mybluemix.net/userdetails\")\n }\n</script>\n</html>","output":"str","x":660,"y":800,"wires":[["ea333a4d.028f88"]]},{"id":"ea333a4d.028f88","type":"http response","z":"a8541511.46dad8","name":"","statusCode":"","headers":{},"x":910,"y":800,"wires":[]},{"id":"dec9d1c0.75433","type":"cloudant out","z":"a8541511.46dad8","name":"order_details","cloudant":"","database":"order_details","service":"node-red-nvdyw-2021--cloudant-1623857013362-32355","payonly":true,"operation":"insert","x":750,"y":600,"wires":[]},{"id":"f5c7dd82.8490a","type":"debug","z":"a8541511.46dad8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":730,"y":660,"wires":[]},{"id":"67e0369a.747e88","type":"http in","z":"a8541511.46dad8","name":"[post]neworder","url":"/neworder","method":"post","upload":false,"swaggerDoc":"","x":100,"y":700,"wires":[["505e2385.a2a4fc","ae00c64e.ce60a8"]]},{"id":"505e2385.a2a4fc","type":"http request","z":"a8541511.46dad8","name":"[get]trackorder","method":"GET","ret":"txt","paytoqs":"query","url":"https://node-red-nvdyw-2021-06-16-optum.eu-gb.mybluemix.net/trackorder","tls":"","persist":false,"proxy":"","authType":"","x":420,"y":720,"wires":[["d96091dd.e3dd8"]]},{"id":"d96091dd.e3dd8","type":"http response","z":"a8541511.46dad8","name":"","statusCode":"","headers":{},"x":650,"y":720,"wires":[]},{"id":"ae00c64e.ce60a8","type":"function","z":"a8541511.46dad8","name":"","func":"let username = env.get(\"productuser\");\nconsole.log(username)\nmsg.payload.username=\"Poorvi\"\nmsg.payload.productstatus=\"Pending\"\nmsg.payload.Time = new Date()\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":400,"y":640,"wires":[["f5c7dd82.8490a","dec9d1c0.75433"]]},{"id":"c398996a.2e5228","type":"switch","z":"a8541511.46dad8","name":"","property":"payload.User","propertyType":"msg","rules":[{"t":"eq","v":"product-user","vt":"str"},{"t":"eq","v":"waste-collector","vt":"str"}],"checkall":"false","repair":false,"outputs":2,"x":250,"y":280,"wires":[["8db86e03.5b7f9"],["928b09fe.943538"]]},{"id":"928b09fe.943538","type":"http request","z":"a8541511.46dad8","name":"[get]wastecollectoroverview","method":"GET","ret":"txt","paytoqs":"query","url":"https://node-red-nvdyw-2021-06-16-optum.eu-gb.mybluemix.net/wastecollectoroverview","tls":"","persist":false,"proxy":"","authType":"","x":520,"y":320,"wires":[["24e402ec.ca919e"]]},{"id":"24e402ec.ca919e","type":"http response","z":"a8541511.46dad8","name":"","statusCode":"","headers":{},"x":770,"y":320,"wires":[]},{"id":"9c764054.95aab","type":"template","z":"a8541511.46dad8","name":"","field":"payload","fieldType":"msg","format":"html","syntax":"plain","template":"<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n\t<meta charset=\"UTF-8\">\n\t<title>User input form</title>\n\t<link href=\"style.css\" rel=\"stylesheet\">\n</head>\n<style>\n* {\n\tbox-sizing: border-box;\n}\nbody {\n\tfont-family: poppins;\n\tfont-size: 16px;\n\tcolor: #fff;\n}\n.form-box {\n\tbackground-color: rgba(0, 0, 0, 0.6);\n\tmargin: auto auto;\n\tpadding: 40px;\n\tborder-radius: 5px;\n\tbox-shadow: 0 0 10px #000;\n\tposition: absolute;\n\ttop: 0;\n\tbottom: 0;\n\tleft: 0;\n\tright: 0;\n\twidth: 500px;\n\theight: 450px;\n}\n.form-box:before {\n\tbackground-image: url(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRlkDB-ct4za1h9_lO_x2mQq5luqF6khy0sEQ&usqp=CAU\");\n\twidth: 100%;\n\theight: 100%;\n\tbackground-size: cover;\n\tcontent: \"\";\n\tposition: fixed;\n\tleft: 0;\n\tright: 0;\n\ttop: 0;\n\tbottom: 0;\n\tz-index: -1;\n\tdisplay: block;\n\tfilter: blur(2px);\n}\n.form-box .header-text {\n\tfont-size: 32px;\n\tfont-weight: 600;\n\tpadding-bottom: 30px;\n\ttext-align: center;\n}\n.form-box input {\n\tmargin: 10px 0px;\n\tborder: none;\n\tpadding: 10px;\n\tborder-radius: 5px;\n\twidth: 100%;\n\tfont-size: 18px;\n\tfont-family: poppins;\n}\n.form-box input[type=checkbox] {\n\tdisplay: none;\n}\n.form-box label {\n\tposition: relative;\n\tmargin-left: 5px;\n\tmargin-right: 10px;\n\ttop: 5px;\n\tdisplay: inline-block;\n\twidth: 20px;\n\theight: 20px;\n\tcursor: pointer;\n}\n.form-box label:before {\n\tcontent: \"\";\n\tdisplay: inline-block;\n\twidth: 20px;\n\theight: 20px;\n\tborder-radius: 5px;\n\tposition: absolute;\n\tleft: 0;\n\tbottom: 1px;\n\tbackground-color: #ddd;\n}\n.form-box input[type=checkbox]:checked+label:before {\n\tcontent: \"\\2713\";\n\tfont-size: 20px;\n\tcolor: #000;\n\ttext-align: center;\n\tline-height: 20px;\n}\n.form-box span {\n\tfont-size: 14px;\n}\n.form-box button {\n\tbackground-color: deepskyblue;\n\tcolor: #fff;\n\tborder: none;\n\tborder-radius: 5px;\n\tcursor: pointer;\n\twidth: 100%;\n\tfont-size: 18px;\n\tpadding: 10px;\n\tmargin: 20px 0px;\n}\nspan a {\n\tcolor: #BBB;\n}\n\n</style>\n<body>\n <input type=\"button\" value=\"Logout\" onclick=\"logout()\" style=\"float:right\" class=\"login-button\"/>\n\t<div class=\"form-box\">\n\t\t<div class=\"header-text\">\n\t\t\tWaste Collector Section: Waste Management\n\t\t</div>\n\t\t<div>\n\t\t<br>\n\t\t<form id=\"wastecollectoroverview\" actions=\"/wastecollectoroverview\">\n \t\t<table id =\"dataCollection\" style=\"width:100%\">\n \t\t\t\n \t\t\t<tr>\n \t\t\t\t<td><input type=\"button\" value=\"Pending Request\" onclick=\"getPendingRequest()\" class=\"login-button\"/></td>\n \t\t\t</tr>\n \t\t\t<tr>\n \t\t\t\t<td><input type=\"button\" value=\"Request History\" onclick=\"getRequestHistory()\" class=\"login-button\"/></td>\n \t\t\t</tr>\n \t\t\t<tr>\n \t\t\t\t<td><input type=\"button\" value=\"Review Points\" onclick=\"getRewardHistory()\" class=\"login-button\"/></td>\n \t\t\t</tr>\n \t\t</table>\n\t\t</form>\n\t\t<br>\n\t\t</div>\n\t</div>\n\t\n\t<script>\n function getPendingRequest() {\n location.replace(\"https://node-red-nvdyw-2021-06-16-optum.eu-gb.mybluemix.net/collectorpendingrequest\")\n }\n \n function getRequestHistory() {\n location.replace(\"https://node-red-nvdyw-2021-06-16-optum.eu-gb.mybluemix.net/collectorrequestrequest\")\n }\n \n function getRewardHistory() {\n location.replace(\"https://node-red-nvdyw-2021-06-16-optum.eu-gb.mybluemix.net/rewards\")\n }\n \n function logout() {\n location.replace(\"https://node-red-nvdyw-2021-06-16-optum.eu-gb.mybluemix.net/welcome\")\n }\n </script>\n\n</body>\n</html>","output":"str","x":440,"y":1580,"wires":[["bbd54806.d2d858"]]},{"id":"bbd54806.d2d858","type":"http response","z":"a8541511.46dad8","name":"","statusCode":"","headers":{},"x":790,"y":1580,"wires":[]},{"id":"9dbd1f74.9e4c9","type":"http in","z":"a8541511.46dad8","name":"","url":"/wastecollectoroverview","method":"get","upload":false,"swaggerDoc":"","x":140,"y":1580,"wires":[["9c764054.95aab"]]},{"id":"d972adfe.5c608","type":"comment","z":"a8541511.46dad8","name":"Customer Section","info":"","x":110,"y":440,"wires":[]},{"id":"2658dec6.084352","type":"comment","z":"a8541511.46dad8","name":"Waste Collector Section","info":"","x":130,"y":1520,"wires":[]},{"id":"7164d91d.2c4698","type":"comment","z":"a8541511.46dad8","name":"Main Section","info":"","x":90,"y":40,"wires":[]},{"id":"465cfa23.7b4ff4","type":"template","z":"a8541511.46dad8","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"mustache","template":"<!DOCTYPE html>\n<html>\n\n<head>\n <title>Pending Orders</title>\n <style>\n * {\n box-sizing: border-box;\n }\n\n body {\n font-family: poppins;\n font-size: 16px;\n color: #fff;\n }\n\n .form-box {\n background-color: rgba(0, 0, 0, 0.6);\n margin: auto auto;\n padding: 10%;\n border-radius: 5px;\n box-shadow: 0 0 10px #000;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: auto;\n height: auto;\n }\n\n .form-box:before {\n background-image: url(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRlkDB-ct4za1h9_lO_x2mQq5luqF6khy0sEQ&usqp=CAU\");\n width: 100%;\n height: 100%;\n background-size: cover;\n content: \"\";\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n z-index: -1;\n display: block;\n filter: blur(2px);\n }\n\n .form-box .header-text {\n font-size: 32px;\n font-weight: 600;\n padding-bottom: 30px;\n text-align: center;\n }\n\n .form-box input {\n margin: 10px 0px;\n border: none;\n padding: 10px;\n border-radius: 5px;\n width: 100%;\n font-size: 18px;\n font-family: poppins;\n }\n\n .form-box input[type=checkbox] {\n display: none;\n }\n\n .form-box label {\n position: relative;\n margin-left: 5px;\n margin-right: 10px;\n top: 5px;\n display: inline-block;\n width: 20px;\n height: 20px;\n cursor: pointer;\n }\n\n .form-box label:before {\n content: \"\";\n display: inline-block;\n width: 20px;\n height: 20px;\n border-radius: 5px;\n position: absolute;\n left: 0;\n bottom: 1px;\n background-color: #ddd;\n }\n\n .form-box input[type=checkbox]:checked+label:before {\n content: \"\\2713\";\n font-size: 20px;\n color: #000;\n text-align: center;\n line-height: 20px;\n }\n\n .form-box span {\n font-size: 14px;\n }\n\n /* .form-box button {\n background-color: deepskyblue;\n color: #fff;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n width: 10%;\n font-size: 18px;\n padding: 10px;\n margin: 20px 0px;\n float: right;\n } */\n\n span a {\n color: #BBB;\n }\n\n th {\n font-size: large;\n font-family: poppins;\n padding: 30px;\n }\n\n .tbl {\n width: auto;\n height: auto;\n margin: auto auto;\n padding: 20 px;\n }\n\n .cell {\n width : auto; \n height: auto;\n text-align: center;\n }\n\n .btn {\n background-color:lightblue;\n color:royalblue;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n font-size: 14px;\n padding: 8px;\n margin: 16px 0px;\n float: right;\n }\n\n #backU2 {\n background-color: deepskyblue;\n color: #fff;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n float: right;\n font-size: 18px;\n padding: 10px;\n margin: 20px 0px;\n }\n \n\n </style>\n</head>\n\n<body id=\"form1\">\n <div class=\"form-box\">\n <div class=\"header-text\">Pending Orders</div>\n <div id=\"showData\">\n <table class=\"tbl\">\n <th class=\"th\">Date</th>\n <th class=\"th\">Quantity</th>\n <th class=\"th\">Name</th>\n <th class=\"th\">Status</th>\n <th class=\"th\">Navigation</th>\n <th class=\"th\">Mark Completed</th>\n {{#payload}}\n <tr>\n <td class=\"cell\">{{Time}}</td>\n <td class=\"cell\">{{totalQuantity}}</td>\n <td class=\"cell\">{{username}}</td>\n <td class=\"cell\">{{productstatus}}</td>\n <td class=\"cell\"><button id='nav_btn' onclick='getDirection()' class='btn';>Navigate</button></td>\n <td class=\"cell\"><button id='btn' class='btn';>Done</button></td>\n </tr>\n {{/payload}}\n </table>\n </div>\n <button id=\"backU2\" onclick=\"getLevelBackFromPendingRequest()\">Back</button>\n </div>\n</body>\n\n<script>\n function getLevelBackFromPendingRequest() {\n location.replace(\"https://node-red-nvdyw-2021-06-16-optum.eu-gb.mybluemix.net/wastecollectoroverview\")\n }\n \n function getDirection() {\n location.replace(\"https://node-red-nvdyw-2021-06-16-optum.eu-gb.mybluemix.net/ui\")\n }\n</script>\n\n</html>","output":"str","x":760,"y":1640,"wires":[["570608c1.255ad8"]]},{"id":"570608c1.255ad8","type":"http response","z":"a8541511.46dad8","name":"","statusCode":"","headers":{},"x":990,"y":1640,"wires":[]},{"id":"f53a8bc8.cba898","type":"http in","z":"a8541511.46dad8","name":"","url":"/collectorpendingrequest","method":"get","upload":false,"swaggerDoc":"","x":140,"y":1640,"wires":[["d7eed7ed.096ec8"]]},{"id":"88ae8855.9c0668","type":"template","z":"a8541511.46dad8","name":"","field":"payload","fieldType":"msg","format":"html","syntax":"plain","template":"<!DOCTYPE html>\n<html>\n\n<head>\n <title>Request History</title>\n <style>\n * {\n box-sizing: border-box;\n }\n\n body {\n font-family: poppins;\n font-size: 16px;\n color: #fff;\n }\n\n .form-box {\n background-color: rgba(0, 0, 0, 0.6);\n margin: auto auto;\n padding: 10%;\n border-radius: 5px;\n box-shadow: 0 0 10px #000;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: auto;\n height: auto;\n }\n\n .form-box:before {\n background-image: url(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRlkDB-ct4za1h9_lO_x2mQq5luqF6khy0sEQ&usqp=CAU\");\n width: 100%;\n height: 100%;\n background-size: cover;\n content: \"\";\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n z-index: -1;\n display: block;\n filter: blur(2px);\n }\n\n .form-box .header-text {\n font-size: 32px;\n font-weight: 600;\n padding-bottom: 30px;\n text-align: center;\n }\n\n .form-box input {\n margin: 10px 0px;\n border: none;\n padding: 10px;\n border-radius: 5px;\n width: 100%;\n font-size: 18px;\n font-family: poppins;\n }\n\n .form-box input[type=checkbox] {\n display: none;\n }\n\n .form-box label {\n position: relative;\n margin-left: 5px;\n margin-right: 10px;\n top: 5px;\n display: inline-block;\n width: 20px;\n height: 20px;\n cursor: pointer;\n }\n\n .form-box label:before {\n content: \"\";\n display: inline-block;\n width: 20px;\n height: 20px;\n border-radius: 5px;\n position: absolute;\n left: 0;\n bottom: 1px;\n background-color: #ddd;\n }\n\n .form-box input[type=checkbox]:checked+label:before {\n content: \"\\2713\";\n font-size: 20px;\n color: #000;\n text-align: center;\n line-height: 20px;\n }\n\n .form-box span {\n font-size: 14px;\n }\n\n /* .form-box button {\n background-color: deepskyblue;\n color: #fff;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n width: 10%;\n font-size: 18px;\n padding: 10px;\n margin: 20px 0px;\n float: right;\n } */\n\n span a {\n color: #BBB;\n }\n\n th {\n font-size: large;\n font-family: poppins;\n padding: 30px;\n }\n\n .tbl {\n width: auto;\n height: auto;\n margin: auto auto;\n padding: 20 px;\n }\n\n .cell {\n width : auto; \n height: auto;\n text-align: center;\n }\n\n .btn {\n background-color:lightblue;\n color:royalblue;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n font-size: 18px;\n padding: 10px;\n margin: 20px 0px;\n float: right;\n }\n\n #backU2 {\n background-color: deepskyblue;\n color: #fff;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n float: right;\n font-size: 18px;\n padding: 10px;\n margin: 20px 0px;\n }\n \n\n </style>\n</head>\n\n<body id=\"form1\">\n <div class=\"form-box\">\n <div class=\"header-text\">\n Order History\n </div>\n <div id=\"showData\">\n <br>\n </div>\n <button id=\"backU2\" onclick=\"getLevelBackFromRequestHistory()\">Back</button>\n </div>\n</body>\n\n<script>\n document.getElementById(\"form1\").onload = function () { CreateTableFromJSON() };\n function CreateTableFromJSON() {\n var orders = [\n {\n \"Date(dd-mm-yyyy)\": \"10-02-2021\",\n \"Order ID\": \"ord-1\",\n \"Quantity (kg)\": \"20\",\n \"First Name\" : \"Anshula\",\n \"Status\": \"Completed\"\n },\n {\n \"Date(dd-mm-yyyy)\": \"20-03-2021\",\n \"Order ID\": \"ord-2\",\n \"Quantity (kg)\": \"30\",\n \"Status\": \"Completed\"\n },\n {\n \"Date(dd-mm-yyyy)\": \"17-06-2021\",\n \"Order ID\": \"ors-3\",\n \"Quantity (kg)\": \"50\",\n \"Status\": \"Completed\"\n }\n ]\n\n // EXTRACT VALUE FOR HTML HEADER. \n // ('Book ID', 'Book Name', 'Category' and 'Price')\n var col = [];\n for (var i = 0; i < orders.length; i++) {\n for (var key in orders[i]) {\n if (col.indexOf(key) === -1) {\n col.push(key);\n }\n }\n }\n\n // CREATE DYNAMIC TABLE.\n var table = document.createElement(\"table\");\n\n // CREATE HTML TABLE HEADER ROW USING THE EXTRACTED HEADERS ABOVE.\n\n var tr = table.insertRow(-1); // TABLE ROW.\n\n for (var i = 0; i < col.length; i++) {\n var th = document.createElement(\"th\"); // TABLE HEADER.\n th.innerHTML = col[i];\n th.className = \"th\"\n tr.appendChild(th);\n }\n\n // ADD JSON DATA TO THE TABLE AS ROWS.\n for (var i = 0; i < orders.length; i++) {\n\n tr = table.insertRow(-1);\n\n for (var j = 0; j < col.length; j++) {\n var tabCell = tr.insertCell(-1);\n tabCell.innerHTML = orders[i][col[j]];\n tabCell.className = \"cell\";\n }\n }\n\n // FINALLY ADD THE NEWLY CREATED TABLE WITH JSON DATA TO A CONTAINER.\n var divContainer = document.getElementById(\"showData\");\n divContainer.innerHTML = \"\";\n table.className=\"tbl\";\n divContainer.appendChild(table);\n }\n \n function getLevelBackFromRequestHistory() {\n location.replace(\"https://node-red-nvdyw-2021-06-16-optum.eu-gb.mybluemix.net/wastecollectoroverview\")\n }\n \n</script>\n\n</html>","output":"str","x":440,"y":1760,"wires":[["e381ae8.4a1705"]]},{"id":"e381ae8.4a1705","type":"http response","z":"a8541511.46dad8","name":"","statusCode":"","headers":{},"x":770,"y":1760,"wires":[]},{"id":"70f511ed.568b1","type":"http in","z":"a8541511.46dad8","name":"","url":"/collectorrequestrequest","method":"get","upload":false,"swaggerDoc":"","x":140,"y":1740,"wires":[["88ae8855.9c0668"]]},{"id":"bde12d86.9a52b","type":"template","z":"a8541511.46dad8","name":"","field":"payload","fieldType":"msg","format":"html","syntax":"plain","template":"<!DOCTYPE html>\n\n<head>\n <title>Reward points</title>\n <style>\n * {\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n }\n\n body {\n font-family: poppins;\n font-size: 16px;\n color: #fff;\n }\n\n .form-box {\n background-color: rgba(0, 0, 0, 0.5);\n margin: auto auto;\n padding: 40px;\n border-radius: 5px;\n box-shadow: 0 0 10px #000;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: auto;\n height: auto;\n }\n\n .form-box:before {\n background-image: url(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTrWXHSNFxmKfAY45LCJ5kNYahw9xZ85_tc4g&usqp=CAU\");\n width: 100%;\n height: 100%;\n background-size: cover;\n content: \"\";\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n z-index: -1;\n display: block;\n filter: blur(2px);\n }\n\n .form-box .header-text {\n font-size: 32px;\n font-weight: 600;\n padding-bottom: 30px;\n text-align: center;\n }\n\n .form-box input {\n margin: 10px 0px;\n border: none;\n padding: 10px;\n border-radius: 5px;\n width: 100%;\n font-size: 18px;\n font-family: poppins;\n }\n\n .form-box input[type=checkbox] {\n display: none;\n }\n\n .form-box label {\n position: relative;\n margin-left: 5px;\n margin-right: 10px;\n top: 5px;\n display: inline-block;\n width: 20px;\n height: 20px;\n cursor: pointer;\n }\n\n .form-box label:before {\n content: \"\";\n display: inline-block;\n width: 20px;\n height: 20px;\n border-radius: 5px;\n position: absolute;\n left: 0;\n bottom: 1px;\n background-color: #ddd;\n }\n\n .form-box input[type=checkbox]:checked+label:before {\n content: \"\\2713\";\n font-size: 20px;\n color: #000;\n text-align: center;\n line-height: 20px;\n }\n\n .form-box span {\n font-size: 14px;\n }\n\n .form-box button {\n background-color: deepskyblue;\n color: #fff;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n width: 20%;\n font-size: 18px;\n padding: 10px;\n margin: 20px 0px;\n float: right;\n }\n\n span a {\n color: #BBB;\n }\n\n .user {\n font:icon;\n font-size: 30px;\n float: left;\n width: 40%;\n height: 100px;\n padding: 20px;\n margin: 20px;\n }\n\n .points {\n float: right;\n text-align: right;\n font-weight: bolder;\n font-size: 100px;\n width: 40%;\n height: 100px;\n padding: 20px;\n margin: 20px;\n }\n\n .offers {\n margin-top: 30px;\n padding-top: 50px;\n width: 100%;\n height: auto;\n }\n\n\n .items1 {\n margin: 10px;\n float: left;\n height: 300px;\n width: 40%;\n position: relative;\n padding: 10px;\n }\n\n .items2 {\n margin: 10px;\n float: right;\n height: 300px;\n width: 40%;\n position: relative;\n padding: 10px;\n }\n\n .item-price {\n font-size:xx-large;\n border-style:groove;\n border-spacing: 10px;\n padding: 10px;\n border-radius: 5px;\n margin-right: 20px;\n\n }\n .item-details {\n height: 50px;\n }\n\n .redeem {\n padding: 10px 30px;\n background:#fff;\n cursor: pointer;\n border-radius: 5px;\n }\n\n .redeem a{\n text-decoration: none;\n color:#00f;\n font-size: 1.5rem;\n }\n </style>\n</head>\n\n<body id=\"form1\">\n <div class=\"form-box\">\n <div id=\"reward-points\">\n <div id=\"user\"></div>\n <div id=\"points\"></div>\n </div>\n <br><br>\n <!--<form id=\"rewards\">-->\n <div class=\"offers\">\n <div class=\"items1\">\n <table class=\"itemlist\">\n <tr class=\"item-img\">\n <img height=\"230px\" width=\"100%\" alt=\"Small plants\" src=\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS207TBb1hs1CQBrfdQ0a0C2AajafE2VrFc7Q&usqp=CAU\" />\n </tr>\n <tr class=\"item-details\">\n <td class=\"item-price\">\n 300\n </td>\n <td class=\"redeem\">\n <a href=\"http://www.google.com\">Redeem</a>\n </td>\n </tr>\n </table>\n </div>\n <div class=\"items2\">\n <table class=\"itemlist\">\n <tr class=\"item-img\">\n <img height=\"230px\" width=\"100%\" alt=\"Succulents\" src=\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRZr0OlFP6IGgkQ7cxGlsOvGRC15-reTNeEzA&usqp=CAU\" />\n </tr>\n <tr class=\"item-details\">\n <td class=\"item-price\">\n 400\n </td>\n <td class=\"redeem\">\n <a href=\"http://www.google.com\">Redeem</a>\n </td>\n </tr>\n </table>\n </div>\n <div class=\"items1\">\n <table class=\"itemlist\">\n <tr class=\"item-img\">\n <img height=\"230px\" width=\"100%\" alt=\"Indoor plants\" src=\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSxT6dfpIJTwWu7YcHL5jZxSxvmdVVRrqwd2g&usqp=CAU\" />\n </tr>\n <tr class=\"item-details\">\n <td class=\"item-price\">\n 800\n </td>\n <td class=\"redeem\">\n <a href=\"http://www.google.com\">Redeem</a>\n </td>\n </tr>\n </table>\n\n </div>\n <div class=\"items2\">\n <table class=\"itemlist\">\n <tr class=\"item-img\">\n <img height=\"230px\" width=\"100%\" alt=\"Big indoor plants\" src=\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ0G0MahxdOLTv5CYs8krzGuUr7UvFygyZ9ew&usqp=CAU\" />\n </tr>\n <tr class=\"item-details\">\n <td class=\"item-price\">\n 1000\n </td>\n <td class=\"redeem\">\n <a href=\"http://www.google.com\">Redeem</a>\n </td>\n </tr>\n </table>\n </div>\n </div>\n <!--<button id=\"backU2\">Back</button>-->\n <!--<button id=\"backU2\" onclick=\"getBacktoMainPage()\">Back</button>-->\n <button id=\"backU2\" onclick=\"getBacktoMainPage()\">Back</button>\n <!--</form>-->\n </div>\n</body>\n\n<script>\n document.getElementById(\"form1\").onload = function () { getRewardsPoints() };\n function getRewardsPoints() {\n const orders =\n {\n \"UserId\": \"123\",\n \"fname\": \"Anshula\",\n \"Points\": \"1000\",\n }\n\n var jsonObj = orders.Points;\n var name = orders.fname;\n\n var user = document.getElementById(\"user\");\n user.innerHTML = \"Your current reward points \";\n user.className = \"user\";\n var points = document.getElementById(\"points\");\n points.innerHTML = jsonObj;\n points.className = \"points\";\n }\n \n function getBacktoMainPage() {\n location.replace(\"https://node-red-nvdyw-2021-06-16-optum.eu-gb.mybluemix.net/wastecollectoroverview\")\n }\n</script>\n\n</html>","output":"str","x":440,"y":1760,"wires":[["7b59d56d.1fc56c"]]},{"id":"7b59d56d.1fc56c","type":"http response","z":"a8541511.46dad8","name":"","statusCode":"","headers":{},"x":790,"y":1840,"wires":[]},{"id":"65545d48.743974","type":"http in","z":"a8541511.46dad8","name":"","url":"/rewards","method":"get","upload":false,"swaggerDoc":"","x":90,"y":1820,"wires":[["bde12d86.9a52b"]]},{"id":"6cf188e6.8b2e18","type":"comment","z":"a8541511.46dad8","name":"Location Section","info":"","x":100,"y":2100,"wires":[]},{"id":"d3fef3b4.e246c","type":"ui_button","z":"a8541511.46dad8","name":"","group":"c2e7ab8f.8c27f8","order":1,"width":0,"height":0,"passthru":false,"label":"Accept","tooltip":"","color":"","bgcolor":"green","icon":"done","payload":"true","payloadType":"str","topic":"payload.input","topicType":"msg","x":120,"y":2180,"wires":[["2a278da0.699ff2","4e2c6cc9.04a064"]]},{"id":"3610ef13.0986f","type":"ui_button","z":"a8541511.46dad8","name":"","group":"c2e7ab8f.8c27f8","order":2,"width":0,"height":0,"passthru":false,"label":"Decline","tooltip":"","color":"","bgcolor":"red","icon":"backspace","payload":"false","payloadType":"str","topic":"hello","topicType":"str","x":130,"y":2240,"wires":[["2a278da0.699ff2","4e2c6cc9.04a064"]]},{"id":"2a278da0.699ff2","type":"switch","z":"a8541511.46dad8","name":"navigatePages","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"false","vt":"str"},{"t":"eq","v":"true","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":400,"y":2240,"wires":[["229239.2bdaadc8","68758ef9.cac3e"],["de7d542f.645618"]]},{"id":"229239.2bdaadc8","type":"debug","z":"a8541511.46dad8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":610,"y":2180,"wires":[]},{"id":"4e2c6cc9.04a064","type":"debug","z":"a8541511.46dad8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":330,"y":2180,"wires":[]},{"id":"87f03594.75e8a8","type":"http request","z":"a8541511.46dad8","g":"1e37e6c5.21d979","name":"HERE Location Lookup","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://geocode.search.hereapi.com/v1/geocode?q={{start}}&apiKey={{hereapikey}}","tls":"","persist":false,"proxy":"","authType":"","x":550,"y":2340,"wires":[["fbc7359d.d6cdb8"]]},{"id":"de7d542f.645618","type":"change","z":"a8541511.46dad8","g":"1e37e6c5.21d979","name":"","rules":[{"t":"set","p":"hereapikey","pt":"flow","to":"hereapikey","tot":"str"},{"t":"set","p":"hereapikey","pt":"msg","to":"0KgLtoLYOz6_7nBwsUCky5K3wWjm7WCBxbPbIB7OJN0","tot":"flow"},{"t":"delete","p":"current","pt":"flow"},{"t":"set","p":"start","pt":"msg","to":"payload.start","tot":"msg"},{"t":"set","p":"end","pt":"msg","to":"payload.end","tot":"msg"},{"t":"set","p":"hereapikey","pt":"msg","to":"0KgLtoLYOz6_7nBwsUCky5K3wWjm7WCBxbPbIB7OJN0","tot":"str"},{"t":"set","p":"start","pt":"msg","to":"New Delhi, IN","tot":"str"},{"t":"set","p":"end","pt":"msg","to":"Phagwara, IN","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":320,"y":2340,"wires":[["87f03594.75e8a8"]]},{"id":"eb533165.d1a52","type":"inject","z":"a8541511.46dad8","g":"1e37e6c5.21d979","name":"Test","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":190,"y":2400,"wires":[["de7d542f.645618"]]},{"id":"fbc7359d.d6cdb8","type":"change","z":"a8541511.46dad8","g":"1e37e6c5.21d979","name":"Save Start Location","rules":[{"t":"set","p":"startgeocode","pt":"msg","to":"payload.items[0].position.lat&\",\"&payload.items[0].position.lng","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":2340,"wires":[["b547ff4b.f29f8","80dea7cd.f77ec8"]]},{"id":"b547ff4b.f29f8","type":"debug","z":"a8541511.46dad8","g":"1e37e6c5.21d979","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1010,"y":2340,"wires":[]},{"id":"d325453b.782bb8","type":"debug","z":"a8541511.46dad8","g":"1e37e6c5.21d979","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1010,"y":2400,"wires":[]},{"id":"80dea7cd.f77ec8","type":"http request","z":"a8541511.46dad8","g":"1e37e6c5.21d979","name":"HERE Location Lookup","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://geocode.search.hereapi.com/v1/geocode?q={{end}}&apiKey={{hereapikey}}","tls":"","persist":false,"proxy":"","authType":"","x":530,"y":2400,"wires":[["dafad312.2735a"]]},{"id":"dafad312.2735a","type":"change","z":"a8541511.46dad8","g":"1e37e6c5.21d979","name":"Save End location","rules":[{"t":"set","p":"endgeocode","pt":"msg","to":"payload.items[0].position.lat&\",\"&payload.items[0].position.lng","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":790,"y":2400,"wires":[["d325453b.782bb8","ab09cbe2.b01a68"]]},{"id":"ab09cbe2.b01a68","type":"http request","z":"a8541511.46dad8","g":"743491a9.12f6","name":"HERE calculateroute API","method":"GET","ret":"obj","paytoqs":"ignore","url":"https://route.ls.hereapi.com/routing/7.2/calculateroute.json?waypoint0=geo!{{startgeocode}}&waypoint1=geo!{{endgeocode}}&mode=fastest;car&apiKey={{hereapikey}}","tls":"","persist":false,"proxy":"","authType":"","x":270,"y":2560,"wires":[["af15dbbe.1ee158","a045e1d.269462","f16f5121.31069"]]},{"id":"af15dbbe.1ee158","type":"debug","z":"a8541511.46dad8","g":"743491a9.12f6","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":610,"y":2600,"wires":[]},{"id":"a045e1d.269462","type":"function","z":"a8541511.46dad8","g":"743491a9.12f6","name":"Build Table","func":"\nvar TableArray = [];\nfor( i=0; i < msg.payload.response.route[0].leg[0].maneuver.length; i++ ) {\n var TableEntry = {};\n // strip out HTML\n TableEntry.instruction = msg.payload.response.route[0].leg[0].maneuver[i].instruction.replace(/<[^>]*>?/gm, '') ;\n TableEntry.latitude = msg.payload.response.route[0].leg[0].maneuver[i].position.latitude ;\n TableEntry.longitude = msg.payload.response.route[0].leg[0].maneuver[i].position.longitude ;\n TableArray.push( TableEntry );\n}\nflow.set(\"Steps\",TableArray);\n\nmsg.payload = TableArray;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":370,"y":2640,"wires":[["5fb2e1f5.e6bad","196725ad.6fecba","3956bb61.b15124"]]},{"id":"5fb2e1f5.e6bad","type":"ui_table","z":"a8541511.46dad8","g":"743491a9.12f6","group":"af0661fa.136e4","name":"","order":1,"width":"10","height":"11","columns":[{"field":"instruction","title":"Driving Instructions","width":"60%","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"latitude","title":"Latitude","width":"20%","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}},{"field":"longitude","title":"Longitude","width":"20%","align":"left","formatter":"plaintext","formatterParams":{"target":"_blank"}}],"outputs":0,"cts":false,"x":790,"y":2640,"wires":[]},{"id":"3e4cbad8.b61326","type":"ui_text","z":"a8541511.46dad8","g":"743491a9.12f6","group":"b6bd120.a1623f","order":2,"width":0,"height":0,"name":"","label":"Summary:","format":"{{msg.payload}}","layout":"col-center","x":810,"y":2560,"wires":[]},{"id":"f16f5121.31069","type":"change","z":"a8541511.46dad8","g":"743491a9.12f6","name":"Summary","rules":[{"t":"set","p":"payload","pt":"msg","to":"$replace(payload.response.route[0].summary.text, /<[^>]*>?/ , '')","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":600,"y":2560,"wires":[["3e4cbad8.b61326"]]},{"id":"196725ad.6fecba","type":"debug","z":"a8541511.46dad8","g":"743491a9.12f6","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":610,"y":2660,"wires":[]},{"id":"8916d4c2.b491b8","type":"ui_worldmap","z":"a8541511.46dad8","g":"82341d0.88841e","group":"9f8510b.9fe89f","order":0,"width":0,"height":0,"name":"","lat":"40.8770049","lon":"-74.0642452","zoom":"14","layer":"Esri","cluster":"","maxage":"","usermenu":"show","layers":"show","panit":"true","panlock":"false","zoomlock":"false","hiderightclick":"true","coords":"none","showgrid":"false","path":"/worldmap","x":840,"y":2880,"wires":[]},{"id":"3efcc35d.dbf78c","type":"ui_button","z":"a8541511.46dad8","g":"82341d0.88841e","name":"","group":"b6bd120.a1623f","order":4,"width":0,"height":0,"passthru":false,"label":"Navigation Preview","tooltip":"","color":"","bgcolor":"","icon":"directions","payload":"","payloadType":"str","topic":"","topicType":"str","x":250,"y":2940,"wires":[["35532306.3d8b9c"]]},{"id":"35532306.3d8b9c","type":"function","z":"a8541511.46dad8","g":"82341d0.88841e","name":"Instructions","func":"var route = flow.get(\"Steps\") || [];\nvar step = flow.get(\"current\") || 0;\nvar msg1 = {};\nmsg.payload = {};\n\nif( step < route.length ) {\n msg.payload.name = \"route\";\n msg.payload.layer = \"route\";\n msg.payload.lat = route[step].latitude;\n msg.payload.lon = route[step].longitude;\n msg.payload.icon = \"fa-car\";\n msg.payload.iconColor = \"maroon\"\n msg1.instructions = route[step].instruction;\n flow.set(\"current\", step+1 );\n} else {\n msg1.instructions = \"You have arrived!\";\n flow.set(\"current\", 0 );\n}\n\nreturn [msg,msg1];","outputs":2,"noerr":0,"initialize":"","finalize":"","x":470,"y":2920,"wires":[["8916d4c2.b491b8","7a67419.0b7cbc","656dce4.3f89b3"],["8f7570e1.14c41"]]},{"id":"7a67419.0b7cbc","type":"debug","z":"a8541511.46dad8","g":"82341d0.88841e","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":850,"y":2940,"wires":[]},{"id":"f8816794.efd278","type":"inject","z":"a8541511.46dad8","g":"82341d0.88841e","name":"Test","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"true","payloadType":"bool","x":290,"y":2900,"wires":[["35532306.3d8b9c"]]},{"id":"8f7570e1.14c41","type":"ui_text","z":"a8541511.46dad8","g":"82341d0.88841e","group":"9f8510b.9fe89f","order":1,"width":0,"height":0,"name":"","label":"Instructions:","format":"{{msg.instructions}}","layout":"row-spread","x":670,"y":2960,"wires":[]},{"id":"656dce4.3f89b3","type":"worldmap-tracks","z":"a8541511.46dad8","g":"82341d0.88841e","name":"navigation","depth":"30","layer":"combined","smooth":false,"x":670,"y":2860,"wires":[["8916d4c2.b491b8"]]},{"id":"3956bb61.b15124","type":"change","z":"a8541511.46dad8","g":"82341d0.88841e","name":"Reset Map","rules":[{"t":"set","p":"payload","pt":"msg","to":"{ \"name\":\"route_\", \"deleted\":true }","tot":"json"},{"t":"delete","p":"current","pt":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":470,"y":2800,"wires":[["35532306.3d8b9c","e9e44fad.de8af"]]},{"id":"e9e44fad.de8af","type":"delay","z":"a8541511.46dad8","g":"82341d0.88841e","name":"","pauseType":"delay","timeout":"500","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":670,"y":2800,"wires":[["656dce4.3f89b3"]]},{"id":"96675a8e.1524e8","type":"template","z":"a8541511.46dad8","name":"","field":"payload","fieldType":"msg","format":"html","syntax":"plain","template":"<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n\t<meta charset=\"UTF-8\">\n\t<title>User input form</title>\n\t<link href=\"style.css\" rel=\"stylesheet\">\n</head>\n<style>\n* {\n\tbox-sizing: border-box;\n}\nbody {\n\tfont-family: poppins;\n\tfont-size: 16px;\n\tcolor: #fff;\n}\n.form-box {\n\tbackground-color: rgba(0, 0, 0, 0.6);\n\tmargin: auto auto;\n\tpadding: 40px;\n\tborder-radius: 5px;\n\tbox-shadow: 0 0 10px #000;\n\tposition: absolute;\n\ttop: 0;\n\tbottom: 0;\n\tleft: 0;\n\tright: 0;\n\twidth: 500px;\n\theight: 450px;\n}\n.form-box:before {\n\tbackground-image: url(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRlkDB-ct4za1h9_lO_x2mQq5luqF6khy0sEQ&usqp=CAU\");\n\twidth: 100%;\n\theight: 100%;\n\tbackground-size: cover;\n\tcontent: \"\";\n\tposition: fixed;\n\tleft: 0;\n\tright: 0;\n\ttop: 0;\n\tbottom: 0;\n\tz-index: -1;\n\tdisplay: block;\n\tfilter: blur(2px);\n}\n.form-box .header-text {\n\tfont-size: 32px;\n\tfont-weight: 600;\n\tpadding-bottom: 30px;\n\ttext-align: center;\n}\n.form-box input {\n\tmargin: 10px 0px;\n\tborder: none;\n\tpadding: 10px;\n\tborder-radius: 5px;\n\twidth: 100%;\n\tfont-size: 18px;\n\tfont-family: poppins;\n}\n.form-box input[type=checkbox] {\n\tdisplay: none;\n}\n.form-box label {\n\tposition: relative;\n\tmargin-left: 5px;\n\tmargin-right: 10px;\n\ttop: 5px;\n\tdisplay: inline-block;\n\twidth: 20px;\n\theight: 20px;\n\tcursor: pointer;\n}\n.form-box label:before {\n\tcontent: \"\";\n\tdisplay: inline-block;\n\twidth: 20px;\n\theight: 20px;\n\tborder-radius: 5px;\n\tposition: absolute;\n\tleft: 0;\n\tbottom: 1px;\n\tbackground-color: #ddd;\n}\n.form-box input[type=checkbox]:checked+label:before {\n\tcontent: \"\\2713\";\n\tfont-size: 20px;\n\tcolor: #000;\n\ttext-align: center;\n\tline-height: 20px;\n}\n.form-box span {\n\tfont-size: 14px;\n}\n.form-box button {\n\tbackground-color: deepskyblue;\n\tcolor: #fff;\n\tborder: none;\n\tborder-radius: 5px;\n\tcursor: pointer;\n\twidth: 100%;\n\tfont-size: 18px;\n\tpadding: 10px;\n\tmargin: 20px 0px;\n}\nspan a {\n\tcolor: #BBB;\n}\n\n</style>\n<body>\n\t<div class=\"form-box\">\n\t\t<div class=\"header-text\">\n\t\t\tWaste Collector Section: Waste Management\n\t\t</div>\n\t\t<div>\n\t\t<br>\n\t\t<form id=\"wastecollectorlink\" actions=\"/wastecollectorlink\">\n \t\t<table id =\"dataCollection\" style=\"width:100%\">\n \t\t\t\n \t\t\t<tr>\n \t\t\t\t<td><input type=\"button\" value=\"Pending Request\" onclick=\"getPendingRequest()\" class=\"login-button\"/></td>\n \t\t\t</tr>\n \t\t\t<tr>\n \t\t\t\t<td><input type=\"button\" value=\"Request History\" onclick=\"getRequestHistory()\" class=\"login-button\"/></td>\n \t\t\t</tr>\n \t\t\t<tr>\n \t\t\t\t<td><input type=\"button\" value=\"Review Points\" class=\"login-button\"/></td>\n \t\t\t</tr>\n \t\t</table>\n\t\t</form>\n\t\t<br>\n\t\t</div>\n\t</div>\n\t\n\t<script>\n function getPendingRequest() {\n location.replace(\"https://node-red-nvdyw-2021-06-16-optum.eu-gb.mybluemix.net/collectorpendingrequest\")\n }\n \n function getRequestHistory() {\n location.replace(\"https://node-red-nvdyw-2021-06-16-optum.eu-gb.mybluemix.net/collectorrequestrequest\")\n }\n \n function getReviewComments() {\n location.replace(\"https://node-red-nvdyw-2021-06-16-optum.eu-gb.mybluemix.net/collectorreviewpoints\")\n }\n </script>\n\n</body>\n</html>","output":"str","x":440,"y":1920,"wires":[["f95c810d.c5fb1"]]},{"id":"f95c810d.c5fb1","type":"http response","z":"a8541511.46dad8","name":"","statusCode":"","headers":{},"x":790,"y":1920,"wires":[]},{"id":"edb09905.2939a8","type":"http in","z":"a8541511.46dad8","name":"","url":"/wastecollectorlink","method":"get","upload":false,"swaggerDoc":"","x":120,"y":1920,"wires":[["96675a8e.1524e8"]]},{"id":"68758ef9.cac3e","type":"function","z":"a8541511.46dad8","name":"","func":"msg.payload = {\n value: 100,\n format: \"json\"\n}\nmsg.res={}\nmsg.req={}\nnode.send(msg);\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":520,"y":2100,"wires":[["b7774c65.acbb7"]]},{"id":"b7774c65.acbb7","type":"http request","z":"a8541511.46dad8","name":"[get]wastecollectorlink","method":"GET","ret":"txt","paytoqs":"ignore","url":"https://node-red-nvdyw-2021-06-16-optum.eu-gb.mybluemix.net/wastecollectorlink","tls":"","persist":false,"proxy":"","authType":"","x":760,"y":2100,"wires":[["f35d5c76.ba1a8"]]},{"id":"f35d5c76.ba1a8","type":"http response","z":"a8541511.46dad8","name":"","statusCode":"","headers":{},"x":1030,"y":2100,"wires":[]},{"id":"29606553.41e3ba","type":"cloudant in","z":"a8541511.46dad8","name":"","cloudant":"","database":"order_details","service":"node-red-nvdyw-2021--cloudant-1623857013362-32355","search":"_all_","design":"","index":"","x":270,"y":800,"wires":[["60090d75.08a974","242034db.6ed06c"]]},{"id":"60090d75.08a974","type":"function","z":"a8541511.46dad8","name":"","func":"for (var i = 0;i<msg.payload.length;i++) {\n let paperQuantity = parseInt(msg.payload[i].Paper)\n let cardboardQuantity = parseInt(msg.payload[i].Cardboard)\n let metalQuantity = parseInt(msg.payload[i].Metal)\n let fabricQuantity = parseInt(msg.payload[i].Fabric)\n let otherQuantity = parseInt(msg.payload[i].Others)\n msg.payload[i].totalQuantity = paperQuantity + cardboardQuantity\n + metalQuantity + fabricQuantity + otherQuantity;\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":470,"y":820,"wires":[["d4d0f246.eb51"]]},{"id":"242034db.6ed06c","type":"debug","z":"a8541511.46dad8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":470,"y":860,"wires":[]},{"id":"35f9d0e4.6b9cd","type":"template","z":"a8541511.46dad8","name":"","field":"payload","fieldType":"msg","format":"html","syntax":"plain","template":"<!DOCTYPE html>\n\n<head>\n <title>Reward points</title>\n <style>\n * {\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n }\n\n body {\n font-family: poppins;\n font-size: 16px;\n color: #fff;\n }\n\n .form-box {\n background-color: rgba(0, 0, 0, 0.5);\n margin: auto auto;\n padding: 40px;\n border-radius: 5px;\n box-shadow: 0 0 10px #000;\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n width: auto;\n height: auto;\n }\n\n .form-box:before {\n background-image: url(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTrWXHSNFxmKfAY45LCJ5kNYahw9xZ85_tc4g&usqp=CAU\");\n width: 100%;\n height: 100%;\n background-size: cover;\n content: \"\";\n position: fixed;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n z-index: -1;\n display: block;\n filter: blur(2px);\n }\n\n .form-box .header-text {\n font-size: 32px;\n font-weight: 600;\n padding-bottom: 30px;\n text-align: center;\n }\n\n .form-box input {\n margin: 10px 0px;\n border: none;\n padding: 10px;\n border-radius: 5px;\n width: 100%;\n font-size: 18px;\n font-family: poppins;\n }\n\n .form-box input[type=checkbox] {\n display: none;\n }\n\n .form-box label {\n position: relative;\n margin-left: 5px;\n margin-right: 10px;\n top: 5px;\n display: inline-block;\n width: 20px;\n height: 20px;\n cursor: pointer;\n }\n\n .form-box label:before {\n content: \"\";\n display: inline-block;\n width: 20px;\n height: 20px;\n border-radius: 5px;\n position: absolute;\n left: 0;\n bottom: 1px;\n background-color: #ddd;\n }\n\n .form-box input[type=checkbox]:checked+label:before {\n content: \"\\2713\";\n font-size: 20px;\n color: #000;\n text-align: center;\n line-height: 20px;\n }\n\n .form-box span {\n font-size: 14px;\n }\n\n .form-box button {\n background-color: deepskyblue;\n color: #fff;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n width: 20%;\n font-size: 18px;\n padding: 10px;\n margin: 20px 0px;\n float: right;\n }\n\n span a {\n color: #BBB;\n }\n\n .user {\n font:icon;\n font-size: 30px;\n float: left;\n width: 40%;\n height: 100px;\n padding: 20px;\n margin: 20px;\n }\n\n .points {\n float: right;\n text-align: right;\n font-weight: bolder;\n font-size: 100px;\n width: 40%;\n height: 100px;\n padding: 20px;\n margin: 20px;\n }\n\n .offers {\n margin-top: 30px;\n padding-top: 50px;\n width: 100%;\n height: auto;\n }\n\n\n .items1 {\n margin: 10px;\n float: left;\n height: 300px;\n width: 40%;\n position: relative;\n padding: 10px;\n }\n\n .items2 {\n margin: 10px;\n float: right;\n height: 300px;\n width: 40%;\n position: relative;\n padding: 10px;\n }\n\n .item-price {\n font-size:xx-large;\n border-style:groove;\n border-spacing: 10px;\n padding: 10px;\n border-radius: 5px;\n margin-right: 20px;\n\n }\n .item-details {\n height: 50px;\n }\n\n .redeem {\n padding: 10px 30px;\n background:#fff;\n cursor: pointer;\n border-radius: 5px;\n }\n\n .redeem a{\n text-decoration: none;\n color:#00f;\n font-size: 1.5rem;\n }\n </style>\n</head>\n\n<body id=\"form1\">\n <div class=\"form-box\">\n <div id=\"reward-points\">\n <div id=\"user\"></div>\n <div id=\"points\"></div>\n </div>\n <br><br>\n <!--<form id=\"rewards\">-->\n <div class=\"offers\">\n <div class=\"items1\">\n <table class=\"itemlist\">\n <tr class=\"item-img\">\n <img height=\"230px\" width=\"100%\" alt=\"Small plants\" src=\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS207TBb1hs1CQBrfdQ0a0C2AajafE2VrFc7Q&usqp=CAU\" />\n </tr>\n <tr class=\"item-details\">\n <td class=\"item-price\">\n 300\n </td>\n <td class=\"redeem\">\n <a href=\"http://www.google.com\">Redeem</a>\n </td>\n </tr>\n </table>\n </div>\n <div class=\"items2\">\n <table class=\"itemlist\">\n <tr class=\"item-img\">\n <img height=\"230px\" width=\"100%\" alt=\"Succulents\" src=\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRZr0OlFP6IGgkQ7cxGlsOvGRC15-reTNeEzA&usqp=CAU\" />\n </tr>\n <tr class=\"item-details\">\n <td class=\"item-price\">\n 400\n </td>\n <td class=\"redeem\">\n <a href=\"http://www.google.com\">Redeem</a>\n </td>\n </tr>\n </table>\n </div>\n <div class=\"items1\">\n <table class=\"itemlist\">\n <tr class=\"item-img\">\n <img height=\"230px\" width=\"100%\" alt=\"Indoor plants\" src=\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSxT6dfpIJTwWu7YcHL5jZxSxvmdVVRrqwd2g&usqp=CAU\" />\n </tr>\n <tr class=\"item-details\">\n <td class=\"item-price\">\n 800\n </td>\n <td class=\"redeem\">\n <a href=\"http://www.google.com\">Redeem</a>\n </td>\n </tr>\n </table>\n\n </div>\n <div class=\"items2\">\n <table class=\"itemlist\">\n <tr class=\"item-img\">\n <img height=\"230px\" width=\"100%\" alt=\"Big indoor plants\" src=\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQ0G0MahxdOLTv5CYs8krzGuUr7UvFygyZ9ew&usqp=CAU\" />\n </tr>\n <tr class=\"item-details\">\n <td class=\"item-price\">\n 1000\n </td>\n <td class=\"redeem\">\n <a href=\"http://www.google.com\">Redeem</a>\n </td>\n </tr>\n </table>\n </div>\n </div>\n <!--<button id=\"backU2\">Back</button>-->\n <!--<button id=\"backU2\" onclick=\"getBacktoMainPage()\">Back</button>-->\n <button id=\"backU2\" onclick=\"getBacktoMainPage()\">Back</button>\n <!--</form>-->\n </div>\n</body>\n\n<script>\n document.getElementById(\"form1\").onload = function () { getRewardsPoints() };\n function getRewardsPoints() {\n const orders =\n {\n \"UserId\": \"123\",\n \"fname\": \"Anshula\",\n \"Points\": \"500\",\n }\n\n var jsonObj = orders.Points;\n var name = orders.fname;\n\n var user = document.getElementById(\"user\");\n user.innerHTML = \"Your current reward points \";\n user.className = \"user\";\n var points = document.getElementById(\"points\");\n points.innerHTML = jsonObj;\n points.className = \"points\";\n }\n \n function getBacktoMainPage() {\n location.replace(\"https://node-red-nvdyw-2021-06-16-optum.eu-gb.mybluemix.net/userdetails\")\n }\n</script>\n\n</html>","output":"str","x":440,"y":1200,"wires":[["e4a413eb.175a5"]]},{"id":"e4a413eb.175a5","type":"http response","z":"a8541511.46dad8","name":"","statusCode":"","headers":{},"x":790,"y":1200,"wires":[]},{"id":"c53a7a29.0a68e8","type":"http in","z":"a8541511.46dad8","name":"","url":"/userrewards","method":"get","upload":false,"swaggerDoc":"","x":110,"y":1200,"wires":[["35f9d0e4.6b9cd"]]},{"id":"d7eed7ed.096ec8","type":"cloudant in","z":"a8541511.46dad8","name":"","cloudant":"","database":"order_details","service":"node-red-nvdyw-2021--cloudant-1623857013362-32355","search":"_all_","design":"","index":"","x":380,"y":1660,"wires":[["e25ee7e1.322808"]]},{"id":"e25ee7e1.322808","type":"function","z":"a8541511.46dad8","name":"","func":"for (var i = 0;i<msg.payload.length;i++) {\n let paperQuantity = parseInt(msg.payload[i].Paper)\n let cardboardQuantity = parseInt(msg.payload[i].Cardboard)\n let metalQuantity = parseInt(msg.payload[i].Metal)\n let fabricQuantity = parseInt(msg.payload[i].Fabric)\n let otherQuantity = parseInt(msg.payload[i].Others)\n msg.payload[i].totalQuantity = paperQuantity + cardboardQuantity\n + metalQuantity + fabricQuantity + otherQuantity;\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":550,"y":1660,"wires":[["465cfa23.7b4ff4"]]},{"id":"46e220e7.5d31f","type":"http response","z":"a8541511.46dad8","name":"","statusCode":"","headers":{},"x":930,"y":40,"wires":[]},{"id":"be000a35.bb3ee8","type":"template","z":"a8541511.46dad8","name":"","field":"payload","fieldType":"msg","format":"html","syntax":"plain","template":"<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n\t<meta charset=\"UTF-8\">\n\t<title>Transparent Login Form HTML CSS</title>\n\t<link href=\"style.css\" rel=\"stylesheet\">\n</head>\n<style>\n* {\n\tbox-sizing: border-box;\n}\nbody {\n\tfont-family: poppins;\n\tfont-size: 16px;\n\tcolor: #fff;\n}\n.form-box {\n\tbackground-color: rgba(0, 0, 0, 0.5);\n\tmargin: auto auto;\n\tpadding: 40px;\n\tborder-radius: 5px;\n\tbox-shadow: 0 0 10px #000;\n\tposition: absolute;\n\ttop: 0;\n\tbottom: 0;\n\tleft: 0;\n\tright: 0;\n\twidth: 650px;\n\theight: 550px;\n}\n.form-box:before {\n\tbackground-image: url(\"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcRlhwcsyUregvJWi9yeGvqPOqgJZrVkaSAMOA&usqp=CAU\");\n\twidth: auto;\n\theight: auto;\n\tbackground-size: cover;\n\tcontent: \"\";\n\tposition: fixed;\n\tleft: 0;\n\tright: 0;\n\ttop: 0;\n\tbottom: 0;\n\tz-index: -1;\n\tdisplay: block;\n\tfilter: blur(2px);\n}\n.form-box .header-text {\n\tfont-size: 32px;\n\tfont-weight: 600;\n\tpadding-bottom: 30px;\n\ttext-align: center;\n}\n.form-box input {\n\tmargin: 10px 0px;\n\tborder: none;\n\tpadding: 10px;\n\tborder-radius: 5px;\n\twidth: 100%;\n\tfont-size: 18px;\n\tfont-family: poppins;\n}\n.form-box input[type=checkbox] {\n\tdisplay: none;\n}\n.form-box label {\n\tposition: relative;\n\tmargin-left: 5px;\n\tmargin-right: 10px;\n\ttop: 5px;\n\tdisplay: inline-block;\n\twidth: 20px;\n\theight: 20px;\n\tcursor: pointer;\n}\n.form-box label:before {\n\tcontent: \"\";\n\tdisplay: inline-block;\n\twidth: 20px;\n\theight: 20px;\n\tborder-radius: 5px;\n\tposition: absolute;\n\tleft: 0;\n\tbottom: 1px;\n\tbackground-color: #ddd;\n}\n.form-box input[type=checkbox]:checked+label:before {\n\tcontent: \"\\2713\";\n\tfont-size: 20px;\n\tcolor: #000;\n\ttext-align: center;\n\tline-height: 20px;\n}\n.form-box span {\n\tfont-size: 14px;\n}\n.form-box button {\n\tbackground-color: deepskyblue;\n\tcolor: #fff;\n\tborder: none;\n\tborder-radius: 5px;\n\tcursor: pointer;\n\twidth: 100%;\n\tfont-size: 14px;\n\tpadding: 8px;\n\tmargin: 16px 0px;\n}\nspan a {\n\tcolor: #BBB;\n}\n</style>\n<body>\n\t<div class=\"form-box\">\n\t\t<div class=\"header-text\">\n\t\t\tWelcome\n\t\t</div>\n\t\t<div class=\"label\">\n\t\t<p align=\"justify\">We see tons of waste products getting generated on a daily basis which pollutes our environment. Recycling and reusing products can definitely reduce the amount of pressure we put on our environment and take us closer to sustainable living. This is a transparent and trustworthy platform for waste management support.<br> It helps you to connect with your nearby waste collectors and leads to a hassle free waste collection process. We also provide rewards for every waste collection request you make.<br><br>Join us and make sustainable living a priority today!<br><br><b>Contributors:</b><br> Animesh Garg<br>Anshula Verma<br>Poorvi Lashkary<br>Vandana Shrestha<br>Kanav Narula</p>\n\t\t</div>\n\t\t<div>\n\t\t<table><tr><td><button onclick=\"getToLoginPage()\">Login</button></td><td> </td><td><button onclick=\"getToSignUpPage()\">Sign Up</button></td></tr></table>\n\t\t</div>\n\t</div>\n\t\n\t<script>\n function getToLoginPage() {\n location.replace(\"https://node-red-nvdyw-2021-06-16-optum.eu-gb.mybluemix.net/wclogin\")\n }\n \n function getToSignUpPage() {\n location.replace(\"https://node-red-nvdyw-2021-06-16-optum.eu-gb.mybluemix.net/sign\")\n }\n </script>\n</body>\n</html>\n","output":"str","x":600,"y":40,"wires":[["46e220e7.5d31f"]]},{"id":"8b761e1.a1b76e","type":"http in","z":"a8541511.46dad8","name":"","url":"/welcome","method":"get","upload":false,"swaggerDoc":"","x":280,"y":40,"wires":[["be000a35.bb3ee8"]]},{"id":"c2e7ab8f.8c27f8","type":"ui_group","name":"","tab":"5db782cc.c8d504","order":4,"disp":true,"width":"6","collapse":false},{"id":"af0661fa.136e4","type":"ui_group","name":"Suggested Route","tab":"5db782cc.c8d504","order":3,"disp":true,"width":"10","collapse":false},{"id":"b6bd120.a1623f","type":"ui_group","name":"Route","tab":"5db782cc.c8d504","order":1,"disp":true,"width":"6","collapse":false},{"id":"9f8510b.9fe89f","type":"ui_group","name":"Map","tab":"5db782cc.c8d504","order":2,"disp":true,"width":"12","collapse":false},{"id":"5db782cc.c8d504","type":"ui_tab","name":"HERE Navigation Route ","icon":"dashboard","order":1,"disabled":false,"hidden":false}]