Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IMPROVE] Livechat User Management Improvements #14736

Merged
merged 91 commits into from
Aug 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
e38d12f
Split Livechat Users page into two: Managers and Agents
pierre-lehnen-rc Jun 4, 2019
fbefe20
Missing i18n strings
pierre-lehnen-rc Jun 11, 2019
3415d97
Merge branch 'develop' into new-livechat-features
pierre-lehnen-rc Jun 12, 2019
1ad8e04
Export the livechat router
pierre-lehnen-rc Jun 12, 2019
faf25a3
Prevent JS errors with the autocomplete component
pierre-lehnen-rc Jun 12, 2019
5f0c1e6
Load livechat sidebar dynamically
pierre-lehnen-rc Jun 12, 2019
27d2343
Use a reactive var to manage the dynamic sidebar items
pierre-lehnen-rc Jun 12, 2019
9d281bd
Use a search box to add agents to a department
pierre-lehnen-rc Jun 12, 2019
75d2b0e
Clear input after searching
pierre-lehnen-rc Jun 12, 2019
18b6033
Merge branch 'develop' into new-livechat-features
renatobecker Jun 21, 2019
358e5c6
Fix singlequote on addSidebarItem params.
renatobecker Jun 21, 2019
4b5bd14
Fix lint rules.
renatobecker Jun 21, 2019
183120e
Fix lint rules.
renatobecker Jun 21, 2019
d0001d9
- Improvements on Livechat Agents list;
renatobecker Jun 21, 2019
43337be
Fix blank line.
renatobecker Jun 21, 2019
a3f7e67
Fix translations.
renatobecker Jun 24, 2019
bdcfaaf
Merge branch 'develop' into new-livechat-features
renatobecker Jun 24, 2019
178a611
Update Livechat methods inside Rooms model, replaced the regular find…
renatobecker Jun 24, 2019
e192dcf
Replace regular find, update and remove methods with permission methods.
renatobecker Jun 24, 2019
264074d
Add LivechatRooms model and replace all Livechat methods in the codeb…
renatobecker Jun 26, 2019
1f05b2c
Remove permission methods.
renatobecker Jun 26, 2019
611ca3a
Remove reference to old Room Model methods.
renatobecker Jun 26, 2019
64aeaef
Replace Rooms Model to LivechatRooms model on server side.
renatobecker Jun 26, 2019
6d7ad8b
Merge branch 'develop' into new-livechat-features
renatobecker Jun 26, 2019
b2fc1c9
Fix lint rules.
renatobecker Jun 26, 2019
5481622
Fiz wrong model.
renatobecker Jun 26, 2019
7f74dac
Add input filter in Livechat departments.
renatobecker Jun 28, 2019
9cd6e88
Merge branch 'develop' into new-livechat-features
Hudell Jul 1, 2019
3288bbd
Merge branch 'new-livechat-features' of https://github.com/RocketChat…
renatobecker Jul 1, 2019
19cabca
Changed LivechatDepartment model to support being extended
pierre-lehnen-rc Jul 2, 2019
abf9058
Merge branch 'develop' into new-livechat-features
renatobecker Jul 2, 2019
8017b6e
Merge branch 'new-livechat-features' of https://github.com/RocketChat…
renatobecker Jul 2, 2019
9e9c281
Add callback when creating a new Livechat Room.
renatobecker Jul 2, 2019
e31c1a7
Modified autocomplete field to stop querying the server at every key …
pierre-lehnen-rc Jul 4, 2019
b297c4b
Manage Livechat Permissions
pierre-lehnen-rc Jul 9, 2019
30eb25e
Check permissions for livechat menu at a later stage so that it can b…
pierre-lehnen-rc Jul 9, 2019
e75240e
Merge branch 'develop' into new-livechat-features
renatobecker Jul 9, 2019
45e0b98
Standardized layouts with filters and auto scroll.
renatobecker Jul 10, 2019
3fbbb7c
Fix eslint rules.
renatobecker Jul 10, 2019
cca20a6
Fixing Livechat Permission Checks
Hudell Jul 13, 2019
bc4c367
fixed code syntax (eslint)
Hudell Jul 13, 2019
f9e539d
Merge branch 'new-livechat-features' of github.com:RocketChat/Rocket.…
Hudell Jul 13, 2019
7bd6e26
Improved Permission Validation
pierre-lehnen-rc Jul 16, 2019
6d7f84d
Merge branch 'develop' into new-livechat-features
pierre-lehnen-rc Jul 16, 2019
a2aa4d7
Merge branch 'develop' into new-livechat-features
Hudell Aug 6, 2019
db19ea6
Merge branch 'develop' into new-livechat-features
renatobecker Aug 7, 2019
439ff36
Merge branch 'develop' into new-livechat-features
renatobecker Aug 7, 2019
08f370b
Merge branch 'develop' into new-livechat-features
renatobecker Aug 9, 2019
b92e0dd
New permissions added.
renatobecker Aug 10, 2019
b7cf999
Merge branch 'develop' into new-livechat-features
renatobecker Aug 10, 2019
41c2059
Merge branch 'develop' into new-livechat-features
renatobecker Aug 11, 2019
d5c7023
Merge branch 'develop' into new-livechat-features
renatobecker Aug 12, 2019
76d7b3e
Merge branch 'develop' into new-livechat-features
renatobecker Aug 12, 2019
010a99d
Add waiting time to test that uses autocomplete field
Hudell Aug 12, 2019
58c45ec
Initial implementation of Livechat tags.
renatobecker Aug 13, 2019
87f3f34
Merge branch 'new-livechat-features' of https://github.com/RocketChat…
renatobecker Aug 14, 2019
33884f8
Improvements on Livechat visitor form.
renatobecker Aug 15, 2019
2057307
Removed blank line.
renatobecker Aug 15, 2019
3bc69fb
Merge branch 'develop' into new-livechat-features
renatobecker Aug 15, 2019
c6dcbe9
Added Custom Filters to the Livechat Current Chats screen
Hudell Aug 16, 2019
c1cd99e
Allow multiple Tag filter on the Current Chats screen
Hudell Aug 16, 2019
2fad2e0
Fixed filter labels alignment on the current chats screen
Hudell Aug 16, 2019
19406f4
Improved layout of the current chats filters
Hudell Aug 16, 2019
5555369
Merge branch 'develop' into new-livechat-features
renatobecker Aug 16, 2019
041ec77
Fixed position of delete button on tag filters
Hudell Aug 16, 2019
f0a2daf
Merge branch 'develop' into new-livechat-features
renatobecker Aug 16, 2019
a3875a6
Fixed deletion of custom filters not clearing the right input
Hudell Aug 16, 2019
78f8636
Merge branch 'new-livechat-features' of github.com:RocketChat/Rocket.…
Hudell Aug 16, 2019
a42ce32
Added separator between filters and the search button on current chat…
Hudell Aug 16, 2019
6ecd540
Merge branch 'new-livechat-features' of https://github.com/RocketChat…
renatobecker Aug 16, 2019
5f662a4
Rename old Rooms model to LivechatRooms model.
renatobecker Aug 16, 2019
1c265ac
Merge branch 'develop' into new-livechat-features
renatobecker Aug 16, 2019
ba632af
Fix indentation on visitor edit form.
renatobecker Aug 16, 2019
44a8f15
Fix review.
renatobecker Aug 16, 2019
018dada
Add missing method on LivechatRoom model.
renatobecker Aug 17, 2019
db8be95
Fix missed method.
renatobecker Aug 17, 2019
35ff9c4
Replace method from Rooms model to LivechatRooms models.
renatobecker Aug 17, 2019
718d449
Removed unused models.
renatobecker Aug 17, 2019
f5ad604
Keep method on Rooms model.
renatobecker Aug 17, 2019
88b5136
Merge branch 'develop' into new-livechat-features
renatobecker Aug 19, 2019
409f394
Fix conflicts before merging.
renatobecker Aug 19, 2019
9f84d87
Improvement on Livechat Inquiries. Deprecating the agents field.
renatobecker Aug 20, 2019
6bb43c0
Deprecate field agents on Livechat Inquiries. Now we're filtering Inq…
renatobecker Aug 20, 2019
b993e70
Merge branch 'develop' into new-livechat-features
renatobecker Aug 20, 2019
ca75b57
Merge branch 'develop' into new-livechat-features
renatobecker Aug 20, 2019
f4c8e6c
Merge branch 'develop' into new-livechat-features
sampaiodiego Aug 21, 2019
3035f97
Change models
sampaiodiego Aug 21, 2019
67822b8
Add migration
sampaiodiego Aug 21, 2019
36b00eb
Fix migration
sampaiodiego Aug 21, 2019
7bf3df8
Fix models
sampaiodiego Aug 21, 2019
cd755d9
Skip permissions tests
sampaiodiego Aug 21, 2019
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
3 changes: 3 additions & 0 deletions app/livechat/client/collections/LivechatRoom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { Mongo } from 'meteor/mongo';

export const LivechatRoom = new Mongo.Collection('livechatRoom');
4 changes: 3 additions & 1 deletion app/livechat/client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import './views/app/analytics/livechatAnalytics';
import './views/app/analytics/livechatAnalyticsCustomDaterange';
import './views/app/analytics/livechatAnalyticsDaterange';
import './views/app/analytics/livechatRealTimeMonitoring';
import './views/app/livechatAgents';
import './views/app/livechatAppearance';
import './views/app/livechatAutocompleteUser';
import './views/app/livechatCurrentChats';
Expand All @@ -21,8 +22,9 @@ import './views/app/livechatQueue';
import './views/app/livechatReadOnly';
import './views/app/livechatTriggers';
import './views/app/livechatTriggersForm';
import './views/app/livechatUsers';
import './views/app/livechatManagers';
import './views/app/livechatNotSubscribed.html';
import './views/app/livechatRoomTagSelector.html';
import './views/app/integrations/livechatIntegrationWebhook';
import './views/app/integrations/livechatIntegrationFacebook';
import './views/app/tabbar/externalSearch';
Expand Down
18 changes: 13 additions & 5 deletions app/livechat/client/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { FlowRouter } from 'meteor/kadira:flow-router';
import { AccountBox } from '../../ui-utils';
import './views/app/livechatDashboard.html';

const livechatManagerRoutes = FlowRouter.group({
export const livechatManagerRoutes = FlowRouter.group({
prefix: '/livechat-manager',
name: 'livechat-manager',
});
Expand Down Expand Up @@ -41,11 +41,19 @@ AccountBox.addRoute({
}, livechatManagerRoutes);

AccountBox.addRoute({
name: 'livechat-users',
path: '/users',
name: 'livechat-managers',
path: '/managers',
sideNav: 'livechatFlex',
i18nPageTitle: 'Livechat_Users',
pageTemplate: 'livechatUsers',
i18nPageTitle: 'Livechat_managers',
pageTemplate: 'livechatManagers',
}, livechatManagerRoutes);

AccountBox.addRoute({
name: 'livechat-agents',
path: '/agents',
sideNav: 'livechatFlex',
i18nPageTitle: 'Livechat_agents',
pageTemplate: 'livechatAgents',
}, livechatManagerRoutes);

AccountBox.addRoute({
Expand Down
30 changes: 28 additions & 2 deletions app/livechat/client/stylesheets/livechat.less
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,6 @@
}

.visitor-edit {
padding: 20px;

h3 {
font-size: 24px;
margin-bottom: 8px;
Expand Down Expand Up @@ -533,3 +531,31 @@
max-width: 100%;
}
}

.livechat-current-chats-add-filter-button {
margin-top: 17px;
}

.livechat-current-chats-filters-wrapper {
display: flex;
}

.livechat-current-chats-filters {
flex: 8 0;
}

.livechat-current-chats-filters-buttons {
flex: 0 0 auto;
margin-top: 26px;
padding-left: 30px;
border-left: 1px solid #cccccc;
}

.livechat-current-chats-tag-filter-wrapper {
display: flex;

& a {
margin-top: auto;
margin-bottom: auto;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template name="livechatRealTimeMonitoring">
{{#requiresPermission 'view-livechat-analytics'}}
{{#requiresPermission 'view-livechat-real-time-monitoring'}}
rodrigok marked this conversation as resolved.
Show resolved Hide resolved
<div class="lc-analytics-overview">
{{#each conversationsOverview}}
<div class="lc-analytics-ov-col">
Expand Down Expand Up @@ -73,4 +73,4 @@
</div>
</div>
{{/requiresPermission}}
</template>
</template>
Original file line number Diff line number Diff line change
@@ -1,39 +1,41 @@
<template name="livechatIntegrationFacebook">
<form id="profile" autocomplete="off" class="container">
<fieldset class="rc-form-legend">
<div class="rc-form-group">
{{#if enabled}}
<button class="button reload">{{_ "Reload_Pages"}}</button>
<button class="button danger disable">{{_ "Disable"}}</button>
{{else}}
<button class="button primary enable" {{enableButtonDisabled}}>{{_ "Enable"}}</button>
{{#unless hasToken}}
<p>{{_ "You_have_to_set_an_API_token_first_in_order_to_use_the_integration"}}</p>
<p>{{_ "Please_go_to_the_Administration_page_then_Livechat_Facebook"}}</p>
{{/unless}}
{{/if}}
</div>
{{#if isLoading}}
{{> loading}}
{{else}}
{{#each pages}}
<div class="rc-form-group">
<div class="rc-switch">
<label class="rc-switch__label" tabindex="-1">
<input type="checkbox" class="rc-switch__input" name="subscribe" value="true" {{subscribed}}>
<span class="rc-switch__button">
<span class="rc-switch__button-inside"></span>
</span>
<span class="rc-switch__text">{{name}}</span>
</label>
</div>
</div>
{{else}}
{{#requiresPermission 'view-livechat-facebook'}}
<form id="profile" autocomplete="off" class="container">
<fieldset class="rc-form-legend">
<div class="rc-form-group">
{{#if enabled}}
<p>{{_ "No_pages_yet_Try_hitting_Reload_Pages_button"}}</p>
<button class="button reload">{{_ "Reload_Pages"}}</button>
<button class="button danger disable">{{_ "Disable"}}</button>
{{else}}
<button class="button primary enable" {{enableButtonDisabled}}>{{_ "Enable"}}</button>
{{#unless hasToken}}
<p>{{_ "You_have_to_set_an_API_token_first_in_order_to_use_the_integration"}}</p>
<p>{{_ "Please_go_to_the_Administration_page_then_Livechat_Facebook"}}</p>
{{/unless}}
{{/if}}
{{/each}}
{{/if}}
</fieldset>
</form>
</div>
{{#if isLoading}}
{{> loading}}
{{else}}
{{#each pages}}
<div class="rc-form-group">
<div class="rc-switch">
<label class="rc-switch__label" tabindex="-1">
<input type="checkbox" class="rc-switch__input" name="subscribe" value="true" {{subscribed}}>
<span class="rc-switch__button">
<span class="rc-switch__button-inside"></span>
</span>
<span class="rc-switch__text">{{name}}</span>
</label>
</div>
</div>
{{else}}
{{#if enabled}}
<p>{{_ "No_pages_yet_Try_hitting_Reload_Pages_button"}}</p>
{{/if}}
{{/each}}
{{/if}}
</fieldset>
</form>
{{/requiresPermission}}
</template>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template name="livechatIntegrationWebhook">
{{#requiresPermission 'view-livechat-manager'}}
{{#requiresPermission 'view-livechat-webhooks'}}
<div class="rocket-form">
<h2>{{_ "Webhooks"}}</h2>
<p>
Expand Down
89 changes: 89 additions & 0 deletions app/livechat/client/views/app/livechatAgents.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<template name="livechatAgents">
{{#requiresPermission 'manage-livechat-agents'}}
<form id="form-agent" class="form-inline">
<div class="form-group">
{{> livechatAutocompleteUser
onClickTag=onClickTagAgents
list=selectedAgents
deleteLastItem=deleteLastAgent
onSelect=onSelectAgents
collection='UserAndRoom'
subscription='userAutocomplete'
field='username'
sort='username'
label="Search_by_username"
placeholder="Search_by_username"
name="username"
exceptions=exceptionsAgents
icon="at"
noMatchTemplate="userSearchEmpty"
templateItem="popupList_item_default"
modifier=agentModifier
}}
</div>
<div class="form-group">
<button name="add" class="rc-button rc-button--primary add" disabled='{{isloading}}'>{{_ "Add"}}</button>
</div>
</form>

<div class="rc-table-content">
<form class="search-form" role="form">
<div class="rc-input__wrapper">
<div class="rc-input__icon">
{{#if isReady}}
{{> icon block="rc-input__icon-svg" icon="magnifier" }}
{{else}}
{{> loading }}
{{/if}}
</div>
<input id="agents-filter" type="text" class="rc-input__element"
placeholder="{{_ "Search"}}" autofocus dir="auto">
</div>
</form>
<div class="results">
{{{_ "Showing_results" agents.length}}}
</div>

{{#table fixed='true' onScroll=onTableScroll}}
<thead>
<tr>
<th><div class="table-fake-th">{{_ "Name"}}</div></th>
<th width="33%"><div class="table-fake-th">{{_ "Username"}}</div></th>
<th width="33%"><div class="table-fake-th">{{_ "Email"}}</div></th>
<th width='40px'><div class="table-fake-th">&nbsp;</div></th>
</tr>
</thead>
<tbody>
{{#each agents}}
<tr class="rc-table-tr user-info row-link" data-id="{{_id}}">
<td>
<div class="rc-table-wrapper">
<div class="rc-table-avatar user-image status-{{status}}">{{> avatar username=username}}</div>
<div class="rc-table-info">
<span class="rc-table-title">
{{name}}
</span>
</div>
</div>
<div class="rc-table-wrapper">
<div class="rc-table-info">
<span class="rc-table-title">
{{fname}}
</span>
</div>
</div>
</td>
<td>{{username}}</td>
<td>{{emailAddress}}</td>
<td>
<a href="#remove" class="remove-agent">
<i class="icon-trash"></i>
</a>
</td>
</tr>
{{/each}}
</tbody>
{{/table}}
</div>
{{/requiresPermission}}
</template>
Loading