From eeb95e3bf837549787d6c446b7cd019a5858cf79 Mon Sep 17 00:00:00 2001 From: Erik Thiem Date: Sun, 28 Oct 2018 10:49:03 -0400 Subject: [PATCH 1/2] Initial attempt at mentor message UI --- client/components/tickets/ticket/ticket.html | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/client/components/tickets/ticket/ticket.html b/client/components/tickets/ticket/ticket.html index 3dce5c43..d0bc9069 100644 --- a/client/components/tickets/ticket/ticket.html +++ b/client/components/tickets/ticket/ticket.html @@ -35,6 +35,20 @@ Contact: {{contact}} +
+
+
+

{{name}}: I am sitting at table #3

+
+
+

You: Ok, be right there

+
+
+
+ +
Send
+
+
{{#if statusIs "OPEN"}} @@ -67,4 +81,4 @@
- \ No newline at end of file + From f72d539fe04c072b7170f78dc639bb850a2a2c8d Mon Sep 17 00:00:00 2001 From: Erik Thiem Date: Sun, 28 Oct 2018 11:49:59 -0400 Subject: [PATCH 2/2] initial attempt at participant-side message UI --- client/components/mentorChat/mentorChat.html | 29 ++++++++++++++++++++ client/components/mentorChat/mentorChat.js | 28 +++++++++++++++++++ client/views/home/home.html | 8 ++++++ 3 files changed, 65 insertions(+) create mode 100644 client/components/mentorChat/mentorChat.html create mode 100644 client/components/mentorChat/mentorChat.js diff --git a/client/components/mentorChat/mentorChat.html b/client/components/mentorChat/mentorChat.html new file mode 100644 index 00000000..cd731ba8 --- /dev/null +++ b/client/components/mentorChat/mentorChat.html @@ -0,0 +1,29 @@ + diff --git a/client/components/mentorChat/mentorChat.js b/client/components/mentorChat/mentorChat.js new file mode 100644 index 00000000..de50f2a9 --- /dev/null +++ b/client/components/mentorChat/mentorChat.js @@ -0,0 +1,28 @@ +Template.mentorChat.onCreated(function(){ + this.subscribe("userTickets"); +}); + +Template.mentorChat.helpers({ + // Return the current open or claimed Ticket held by the user, if it exists + currentTicket: function(){ + return Tickets.findOne({ + userId: Meteor.userId(), + status: { + $in: ["OPEN", "CLAIMED"] + } + }) + }, + statusIs: function(status){ + return this.status === status; + }, + queueEnabled: function(){ + var settings = Settings.findOne({}); + if (settings){ + return settings.queueEnabled; + } + } +}); + +Template.mentorChat.rendered = function(){ + $(this.find('.mentorChat')).addClass('animated bounceIn') +}; diff --git a/client/views/home/home.html b/client/views/home/home.html index 5ad12588..c9b7dd33 100644 --- a/client/views/home/home.html +++ b/client/views/home/home.html @@ -24,6 +24,14 @@ +
+
+ {{> mentorChat }} +
+
+ +
+