diff --git a/www/pages/postalpoint.html b/www/pages/postalpoint.html new file mode 100644 index 0000000..61c136f --- /dev/null +++ b/www/pages/postalpoint.html @@ -0,0 +1,73 @@ + + +
+ + + +
+
+
+
+
+ +
+ Our network of PostalPoint kiosks are a quick and convenient way to + send mail and packages. Located in local businesses, our kiosks have an + easy to use touchscreen and a secure parcel drop. You pay the normal + USPS prices without markup or fees. +

+ Walk in, put your box on the scale, answer a few questions, tap your + card, and get a shipping label (with postage). Then just place your package + in the secure locker. The kiosk can print or email a receipt so you'll + have the tracking number. +
+
+ Don't like typing addresses on the kiosk? With Quick Send, you can type + right here instead! Tap the button below, then tap "Quick Send" on the kiosk. +
+
+
+ Open Quick Send +
+
+
+
+
+
+
Locations
+
+ +
+
+
+
+
\ No newline at end of file diff --git a/www/routes.js b/www/routes.js index 1cd8cf1..ac195bd 100644 --- a/www/routes.js +++ b/www/routes.js @@ -33,6 +33,7 @@ var pagesToCompile = [ "trailer", "money", "moneyorder", + "postalpoint", "quicksend" ]; console.log("Compiling page templates..."); @@ -409,6 +410,48 @@ var routes = [ } } }, + { + path: '/postalpoint', + name: 'postalpoint', + async: function ( {resolve, reject}) { + app.dialog.preloader("Loading..."); + apirequest(SETTINGS.apis.postalpoint_locations, [], function (resp) { + app.dialog.close(); + + var locations = []; + for (var i = 0; i < resp.features.length; i++) { + locations.push({ + name: resp.features[i].properties.name, + info: resp.features[i].properties.info, + hours: resp.features[i].properties.hours, + geo: resp.features[i].geometry.coordinates[1] + "," + resp.features[i].geometry.coordinates[0] + }); + } + resolve({ + content: compiledPages.postalpoint({ + locations: locations + }) + }, {}); + }, function (error) { + app.dialog.close(); + app.dialog.alert("Couldn't download the list of PostalPoint locations. Try again later.", "Whoops!"); + sendErrorReport("PostalPoint", "Loading locations"); + resolve({ + content: compiledPages.postalpoint({ + locations: [] + }) + }, {}); + }, "GET"); + }, + on: { + pageBeforeIn: function () { + dyncontent = getDynamicPageContent("postalpoint"); + if (dyncontent != null) { + $("#postalpoint-dyncontent").html(dyncontent); + } + } + } + }, { path: '/pickup', name: 'pickup', diff --git a/www/settings.js b/www/settings.js index 0187168..d1d44b0 100644 --- a/www/settings.js +++ b/www/settings.js @@ -55,7 +55,8 @@ var SETTINGS = { moneyorderverify: "https://apis.helena.express/v1/moneyorder/verify/", // Label maker label_rates: "https://apis.helena.express/v1/labelmaker/rates/", - label_purchase: "https://apis.helena.express/v1/labelmaker/purchase/" + label_purchase: "https://apis.helena.express/v1/labelmaker/purchase/", + postalpoint_locations: "https://apis.helena.express/v1/postalpoint/locations/" }, stripe_pubkey: "pk_test_51J6qFXCa1Fboir5UzPO3LCiMsVNiFP2lq4wR0dEcjJJVzAaJ3uRggDekZPB3qeYpMD3ayIYHKyD5sSn0IFLlEXMW001LqrvGSH", branding: {