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

[NEW] [ENTERPRISE] Allows to set a group of departments accepted for forwarding chats #17335

Merged
merged 9 commits into from
Apr 21, 2020

Conversation

MarcosSpessatto
Copy link
Member

No description provided.

Copy link
Contributor

@renatobecker renatobecker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MarcosSpessatto I was wondering that we could add an additional feature that would improve the UX on the visitor Forward template, right here:

https://github.com/RocketChat/Rocket.Chat/blob/develop/app/livechat/client/views/app/tabbar/visitorForward.js#L58

We already have a departmentConditions helper method that allows the select just valid departments. I think that we could use that method to filter only valid departments, I mean, in case the current room department has a list of restricted department to transfer, we could filter just those departments, what do you think?
Obviously, since the feature is enterprise and the template where the input is available is community, you would need to implement a way to get this eventual additional filter somehow.

app/livechat/server/lib/Helper.js Outdated Show resolved Hide resolved
@rodrigok rodrigok changed the title [NEW][ENTERPRISE] Allows to set a group of departments accepted for forwarding chats [NEW] [ENTERPRISE] Allows to set a group of departments accepted for forwarding chats Apr 20, 2020
data() {
return Template.instance().room;
const departmentForwardRestrictions = Template.instance().departmentForwardRestrictions.get();
console.log(departmentForwardRestrictions);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this console here =D

@@ -73,6 +65,7 @@ Template.visitorForward.onCreated(async function() {
this.departments = new ReactiveVar([]);
this.selectedAgents = new ReactiveVar([]);
this.selectedDepartments = new ReactiveVar([]);
this.departmentForwardRestrictions = new ReactiveVar();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
this.departmentForwardRestrictions = new ReactiveVar();
this.departmentForwardRestrictions = new ReactiveVar({});

Meteor.methods({
'livechat:getDepartmentForwardRestrictions'(departmentId) {
if (!Meteor.userId()) {
throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'livechat:getTagsList' });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'livechat:getTagsList' });
throw new Meteor.Error('error-invalid-user', 'Invalid user', { method: 'livechat:getDepartmentForwardRestrictions' });

if (!departmentId) {
return {};
}
const department = LivechatDepartment.findOneById(departmentId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const department = LivechatDepartment.findOneById(departmentId);
const department = LivechatDepartment.findOneById(departmentId, { fields: { departmentsAllowedToForward: 1 } });

@rodrigok rodrigok merged commit 896bf56 into develop Apr 21, 2020
@rodrigok rodrigok deleted the omnichannel/group-of-dept-to-forward branch April 21, 2020 00:27
gabriellsh added a commit that referenced this pull request Apr 22, 2020
…users_and_rooms

* 'develop' of github.com:RocketChat/Rocket.Chat: (29 commits)
  [FIX] 2FA not showing codes for Spanish translation (#17378)
  [NEW] [ENTERPRISE] Restrict the permissions configuration for guest users  (#17333)
  [NEW] Federation event for when users left rooms (#17091)
  [FIX] CSV Importer fails when there are no users to import (#16790)
  Import slack's mpims as direct rooms instead of private groups (#17206)
  [FIX] SAML Idp Initiated Logout Error (#17324)
  [NEW] Better Push and Email Notification logic (#17357)
  [NEW] Error page when browser is not supported (#17372)
  [NEW] [ENTERPRISE] Omnichannel queue priorities (#17141)
  [IMPROVE] Change the SAML metadata order to conform to XSD specification (#15488)
  [IMPROVE] Filter markdown in notifications (#9995)
  [IMPROVE] User gets UI feedback when message is pinned or unpinned (#16056)
  Remove set as alias setting (#16343)
  [IMPROVE] Add `file-title` and `file-desc` as new filter tag options on message search (#16858)
  [NEW]  Add ability to set tags in the Omnichannel room closing dialog (#17254)
  [FIX] Show active admin and user account menu item (#17047)
  [NEW] [ENTERPRISE] Allows to set a group of departments accepted for forwarding chats (#17335)
  [FIX] Prevent user from getting stuck on login, if there is some bad fname (#17331)
  [FIX] Remove properties from users.info response (#17238)
  Bump version to 3.1.1
  ...
@sampaiodiego sampaiodiego mentioned this pull request Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants