Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions IntelliQ/backend/datastore/datastore-indexes-auto.xml
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
<!-- Indices written at Tue, 28 Feb 2017 21:19:25 CET -->
<!-- Indices written at Tue, 28 Feb 2017 22:17:23 CET -->

<datastore-indexes>
<datastore-indexes/>

<!-- Used 2 times in query history -->
<datastore-index kind="PermissionEntry" ancestor="false" source="auto">
<property name="subjectKeyId" direction="asc"/>
<property name="userKeyId" direction="asc"/>
<property name="permission" direction="desc"/>
</datastore-index>

</datastore-indexes>
Binary file modified IntelliQ/backend/datastore/local_db.bin
Binary file not shown.
6 changes: 6 additions & 0 deletions IntelliQ/backend/src/main/webapp/static/js/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/";
Expand Down Expand Up @@ -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;
}

Expand Down
21 changes: 20 additions & 1 deletion IntelliQ/backend/src/main/webapp/static/js/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = $("<a>", {
"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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
"uploadSuccessful": "Upload Finished",
"uploadFailed": "Upload Failed",

"selectQueue": "Select a queue",

"status": "Status",
"statusWaiting": "Waiting",
"statusCalled": "Called",
Expand Down