diff --git a/IntelliQ/backend/datastore/datastore-indexes-auto.xml b/IntelliQ/backend/datastore/datastore-indexes-auto.xml
index ad84c27..5b54fa1 100644
--- a/IntelliQ/backend/datastore/datastore-indexes-auto.xml
+++ b/IntelliQ/backend/datastore/datastore-indexes-auto.xml
@@ -1,12 +1,4 @@
-
+
-
+
-
-
-
-
-
-
-
-
diff --git a/IntelliQ/backend/datastore/local_db.bin b/IntelliQ/backend/datastore/local_db.bin
index 95aa73e..a457aae 100644
Binary files a/IntelliQ/backend/datastore/local_db.bin and b/IntelliQ/backend/datastore/local_db.bin differ
diff --git a/IntelliQ/backend/src/main/webapp/static/js/api.js b/IntelliQ/backend/src/main/webapp/static/js/api.js
index 25605a6..9873a0b 100644
--- a/IntelliQ/backend/src/main/webapp/static/js/api.js
+++ b/IntelliQ/backend/src/main/webapp/static/js/api.js
@@ -86,6 +86,7 @@ var intelliqApi = function(){
api.PAGE_LINK_WEB_APP = api.PAGE_LINK + "apps/web/";
api.PAGE_LINK_WEB_APP_NEARBY = api.PAGE_LINK_WEB_APP + "nearby/";
api.PAGE_LINK_WEB_APP_QUEUE = api.PAGE_LINK_WEB_APP + "queue/";
+ api.PAGE_LINK_WEB_APP_BUSINESS = api.PAGE_LINK_WEB_APP + "business/";
api.PAGE_LINK_WEB_APP_TICKETS = api.PAGE_LINK_WEB_APP + "tickets/";
api.PATH_BUSINESS = "business/";
@@ -942,6 +943,11 @@ var intelliqApi = function(){
return urls.replaceParameter("businessKeyId", business.key.id, url);
}
+ urls.openInWebApp = function() {
+ var url = api.PAGE_LINK_WEB_APP_BUSINESS;
+ return urls.replaceParameter("businessKeyId", business.key.id, url);
+ }
+
return urls;
}
diff --git a/IntelliQ/backend/src/main/webapp/static/js/ui.js b/IntelliQ/backend/src/main/webapp/static/js/ui.js
index a8ba731..85b3f90 100644
--- a/IntelliQ/backend/src/main/webapp/static/js/ui.js
+++ b/IntelliQ/backend/src/main/webapp/static/js/ui.js
@@ -447,7 +447,26 @@ var ui = function(){
card.withImageRatio(3/1);
- card.withContent().withTitle(business.name, false);
+ var url = intelliqApi.getUrls().forBusiness(business).openInWebApp();
+ var title = $("", {
+ "href": url,
+ "class": "truncate"
+ }).text(business.name);
+
+ if (business.queues.length == 1) {
+ // directly navigate to only queue available
+ var queue = business.queues[0];
+ var url = intelliqApi.getUrls().forQueue(queue).openInWebApp();
+ title.attr("href", url);
+ } else {
+ // don't actually navigate, show toast instead
+ title.click(function(event) {
+ event.preventDefault();
+ Materialize.toast(getString("selectQueue"), 3000);
+ });
+ }
+
+ card.withContent().withTitle(title, false);
return card;
}
diff --git a/IntelliQ/backend/src/main/webapp/website/includes/en/common_head.jsp b/IntelliQ/backend/src/main/webapp/website/includes/en/common_head.jsp
index 261567f..4be3989 100644
--- a/IntelliQ/backend/src/main/webapp/website/includes/en/common_head.jsp
+++ b/IntelliQ/backend/src/main/webapp/website/includes/en/common_head.jsp
@@ -32,6 +32,8 @@
"uploadSuccessful": "Upload Finished",
"uploadFailed": "Upload Failed",
+ "selectQueue": "Select a queue",
+
"status": "Status",
"statusWaiting": "Waiting",
"statusCalled": "Called",