Skip to content

Commit

Permalink
Refactor: Omnichannel Current Chats (#18627)
Browse files Browse the repository at this point in the history
Co-authored-by: Guilherme Gazzo <[email protected]>
  • Loading branch information
MartinSchoeler and ggazzo authored Aug 21, 2020
1 parent 40c7226 commit d567415
Show file tree
Hide file tree
Showing 69 changed files with 6,722 additions and 9,535 deletions.
13 changes: 1 addition & 12 deletions .github/issue-close-app.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,14 @@
# Config for Close Issue app: https://probot.github.io/apps/close-issue/

# Comment that will be sent if an issue is judged to be closed
comment: |
This issue was closed because it does not use our bug report issue template.
Please make sure to use it and fill it as much as you can so we can provide better and faster support.
The following sections **must not** be removed, or else the BOT will close it immediately again:
* Steps to reproduce
* Expected behavior
* Actual behavior
* Server Setup Information
comment: "This issue was closed because it does not use any of our issue templates. Please make sure to use one of the suggested templates."
issueConfigs:
# There can be several configs for different kind of issues.
- content:
# Bug report
- "Steps to reproduce"
- "Expected behavior"
- "Actual behavior"
- "Server Setup Information"
- "Version of Rocket.Chat Server"
- content:
# Release issue
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,7 @@ jobs:
MONGO_URL: mongodb://localhost:27017/rocketchat
MONGO_OPLOG_URL: mongodb://localhost:27017/local
run: |
echo -e 'pcm.!default {\n type hw\n card 0\n}\n\nctl.!default {\n type hw\n card 0\n}' > ~/.asoundrc
Xvfb -screen 0 1024x768x24 :99 &
for i in $(seq 1 5); do (docker exec mongo mongo rocketchat --eval 'db.dropDatabase()') && npm run testci && s=0 && break || s=$? && sleep 1; done; (exit $s)
for i in $(seq 1 5); do (docker exec mongo mongo rocketchat --eval 'db.dropDatabase()') && xvfb-run --auto-servernum npm run testci && s=0 && break || s=$? && sleep 1; done; (exit $s)
# notification:
# runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion app/authentication/server/startup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Accounts.onCreateUser(function(options, user = {}) {
callbacks.run('beforeCreateUser', options, user);

user.status = 'offline';
user.active = user.active !== undefined ? user.active : !settings.get('Accounts_ManuallyApproveNewUsers');
user.active = !settings.get('Accounts_ManuallyApproveNewUsers');

if (!user.name) {
if (options.profile) {
Expand Down
1 change: 1 addition & 0 deletions app/authorization/client/views/permissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { hasAllPermission } from '../hasPermission';
import { t } from '../../../utils/client';
import { SideNav } from '../../../ui-utils/client/lib/SideNav';
import { CONSTANTS, AuthorizationUtils } from '../../lib';

import { hasAtLeastOnePermission } from '..';

Template.permissions.helpers({
Expand Down
1 change: 0 additions & 1 deletion app/authorization/server/startup.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Meteor.startup(function() {
{ _id: 'assign-roles', roles: ['admin'] },
{ _id: 'ban-user', roles: ['admin', 'owner', 'moderator'] },
{ _id: 'bulk-register-user', roles: ['admin'] },
{ _id: 'change-livechat-room-visitor', roles: ['admin', 'livechat-manager', 'livechat-agent'] },
{ _id: 'create-c', roles: ['admin', 'user', 'bot', 'app'] },
{ _id: 'create-d', roles: ['admin', 'user', 'bot', 'app'] },
{ _id: 'create-p', roles: ['admin', 'user', 'bot', 'app'] },
Expand Down
1 change: 1 addition & 0 deletions app/autotranslate/server/methods/getSupportedLanguages.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Meteor } from 'meteor/meteor';
import { DDPRateLimiter } from 'meteor/ddp-rate-limiter';

import { hasPermission } from '../../../authorization';

import { TranslationProviderRegistry } from '..';

Meteor.methods({
Expand Down
1 change: 1 addition & 0 deletions app/autotranslate/server/methods/translateMessage.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Meteor } from 'meteor/meteor';

import { Rooms } from '../../../models';

import { TranslationProviderRegistry } from '..';

Meteor.methods({
Expand Down
4 changes: 1 addition & 3 deletions app/e2e/client/rocketchat.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -481,10 +481,8 @@ class E2E {
}

closeAlert() {
if (showingE2EAlert) {
alerts.close();
}
showingE2EAlert = false;
alerts.close();
}
}

Expand Down
1 change: 1 addition & 0 deletions app/importer/server/methods/downloadPublicImportFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { Meteor } from 'meteor/meteor';
import { RocketChatImportFileInstance } from '../startup/store';
import { ProgressStep } from '../../lib/ImporterProgressStep';
import { hasPermission } from '../../../authorization';

import { Importers } from '..';

function downloadHttpFile(fileUrl, writeStream) {
Expand Down
1 change: 1 addition & 0 deletions app/importer/server/methods/getImportFileData.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { RocketChatImportFileInstance } from '../startup/store';
import { hasPermission } from '../../../authorization';
import { Imports } from '../../../models';
import { ProgressStep } from '../../lib/ImporterProgressStep';

import { Importers } from '..';

Meteor.methods({
Expand Down
1 change: 1 addition & 0 deletions app/importer/server/methods/getImportProgress.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Meteor } from 'meteor/meteor';

import { hasPermission } from '../../../authorization';
import { Imports } from '../../../models';

import { Importers } from '..';


Expand Down
1 change: 1 addition & 0 deletions app/importer/server/methods/startImport.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Meteor } from 'meteor/meteor';

import { hasPermission } from '../../../authorization';
import { Imports } from '../../../models';

import {
Importers,
Selection,
Expand Down
1 change: 1 addition & 0 deletions app/importer/server/methods/uploadImportFile.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { RocketChatFile } from '../../../file';
import { RocketChatImportFileInstance } from '../startup/store';
import { hasPermission } from '../../../authorization';
import { ProgressStep } from '../../lib/ImporterProgressStep';

import { Importers } from '..';

Meteor.methods({
Expand Down
8 changes: 0 additions & 8 deletions app/livechat/client/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,6 @@ AccountBox.addRoute({
pageTemplate: 'livechatDashboard',
}, livechatManagerRoutes, load);

AccountBox.addRoute({
name: 'livechat-current-chats',
path: '/current',
sideNav: 'omnichannelFlex',
i18nPageTitle: 'Current_Chats',
pageTemplate: 'livechatCurrentChats',
}, livechatManagerRoutes, load);

AccountBox.addRoute({
name: 'livechat-analytics',
path: '/analytics',
Expand Down
2 changes: 1 addition & 1 deletion app/livechat/client/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Tracker.autorun((c) => {
AccountBox.addItem({
name: 'Omnichannel',
icon: 'omnichannel',
href: 'livechat-current-chats',
href: '/omnichannel/current',
sideNav: 'omnichannelFlex',
condition: () => settings.get('Livechat_enabled') && hasAllPermission('view-livechat-manager'),
});
Expand Down
1 change: 0 additions & 1 deletion app/livechat/client/views/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ import './app/analytics/livechatAnalyticsCustomDaterange';
import './app/analytics/livechatAnalyticsDaterange';
import './app/analytics/livechatRealTimeMonitoring';
import './app/livechatDashboard.html';
import './app/livechatCurrentChats';
import './app/livechatDepartmentForm';
import './app/livechatDepartments';
25 changes: 0 additions & 25 deletions app/livechat/client/views/app/livechatCurrentChats.css

This file was deleted.

Loading

0 comments on commit d567415

Please sign in to comment.