From ec4e9417cdbe92590b129455f87b44085d1d2a75 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Sat, 14 Aug 2021 14:38:55 -0600 Subject: [PATCH] Add UI for selecting appointment type --- www/assets/css/app.css | 4 ++++ www/assets/css/home.css | 4 ---- www/pages/appointment.html | 26 ++++++++++++++++++++++- www/pages/home.html | 2 +- www/routes.js | 43 +++++++++++++++++++++++++++++++------- www/settings.js | 4 ++-- 6 files changed, 67 insertions(+), 16 deletions(-) diff --git a/www/assets/css/app.css b/www/assets/css/app.css index cfaf745..99d5354 100644 --- a/www/assets/css/app.css +++ b/www/assets/css/app.css @@ -180,4 +180,8 @@ Framework7 and FontAwesome both have a .fab class background-color: white; padding: 1em; border-radius: 10px; +} + +.card.pointercursor { + cursor: pointer; } \ No newline at end of file diff --git a/www/assets/css/home.css b/www/assets/css/home.css index cbddfb4..c368971 100644 --- a/www/assets/css/home.css +++ b/www/assets/css/home.css @@ -12,8 +12,4 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/. .widelogo { max-width: 200px; width: 50%; -} - -div.page[data-name="home"] .card { - cursor: pointer; } \ No newline at end of file diff --git a/www/pages/appointment.html b/www/pages/appointment.html index 5e3dbeb..b937137 100644 --- a/www/pages/appointment.html +++ b/www/pages/appointment.html @@ -13,13 +13,37 @@ Back -
Schedule Pickup
+
Book Appointment
+ {{#if url}}
+ {{else}} +
+
+
+
+ {{#each services}} +
+
+
+

+
+ {{title}} +
+ {{text}} +
+
+
+ {{/each}} +
+
+
+
+ {{/if}} \ No newline at end of file diff --git a/www/pages/home.html b/www/pages/home.html index 9adc335..7d33053 100644 --- a/www/pages/home.html +++ b/www/pages/home.html @@ -22,7 +22,7 @@
{{#each pages}}
-
+


diff --git a/www/routes.js b/www/routes.js index 86e6367..0ec4237 100644 --- a/www/routes.js +++ b/www/routes.js @@ -15,10 +15,10 @@ var routes = [ context: { pages: [ { - title: "Schedule Pickup", + title: "Book Appointment", href: "/appointment", icon: "fad fa-calendar-alt", - text: "Request a curbside courier to mail and ship your items." + text: "Get mailing, shipping, and notary services on your schedule anywhere in the Helena area." }, { title: "Track Package", @@ -59,18 +59,45 @@ var routes = [ path: '/appointment', name: 'appointment', async: function (routeTo, routeFrom, resolve, reject) { - var url = SETTINGS.appointmenturl; - if ($("#app").hasClass("theme-dark")) { - url = SETTINGS.appointmenturl_darkmode; - } resolve({ templateUrl: './pages/appointment.html' }, { context: { - url: url + services: [ + { + title: "Package Pickup", + text: "A courier will come to you and ship your mail, packages, etc.", + icon: "fad fa-hand-holding-box", + serviceid: 19 + }, + { + title: "Mobile Notary", + text: "A notary public will come to you and notarize your documents.", + icon: "fad fa-file-signature", + serviceid: 21 + } + ] } }); - } + }, + routes: [ + { + path: "/:serviceId", + async: function (routeTo, routeFrom, resolve, reject) { + var url = SETTINGS.appointmenturl; + if ($("#app").hasClass("theme-dark")) { + url = SETTINGS.appointmenturl_darkmode; + } + resolve({ + templateUrl: './pages/appointment.html' + }, { + context: { + url: url + "&service=" + routeTo.params.serviceId + } + }); + } + } + ] }, { path: '/track', diff --git a/www/settings.js b/www/settings.js index 3c3a5f4..4841018 100644 --- a/www/settings.js +++ b/www/settings.js @@ -12,8 +12,8 @@ var SETTINGS = { loyalty: "https://helena.express/loyalty.php" }, stripe_pubkey: "pk_live_RgpadCo1LIIkfyUsY47VhUq6", - appointmenturl: "https://appointments.netsyms.com/index.php?service=19&hlnexp=1&embed=1&only=1", - appointmenturl_darkmode: "https://appointments.netsyms.com/index.php?service=19&hlnexp=1&embed=1&only=1&theme=darkly", + appointmenturl: "https://appointments.netsyms.com/index.php?hlnexp=1&embed=1&only=1&theme=darkly", + appointmenturl_darkmode: "https://appointments.netsyms.com/index.php?hlnexp=1&embed=1&only=1&theme=darkly", branding: { apptitle: "Helena Express", company: "Helena Express",