Compare commits
1 commit
feat/assig
...
develop
Author | SHA1 | Date | |
---|---|---|---|
|
98c289dc3e |
8 changed files with 11 additions and 40 deletions
|
@ -97,9 +97,8 @@ export const generateConditionOptions = (options, key = 'id') => {
|
|||
});
|
||||
};
|
||||
|
||||
export const getActionOptions = ({ agents, teams, labels, type }) => {
|
||||
export const getActionOptions = ({ teams, labels, type }) => {
|
||||
const actionsMap = {
|
||||
assign_agent: agents,
|
||||
assign_team: teams,
|
||||
send_email_to_team: teams,
|
||||
add_label: generateConditionOptions(labels, 'title'),
|
||||
|
@ -179,7 +178,7 @@ export const getDefaultConditions = eventName => {
|
|||
export const getDefaultActions = () => {
|
||||
return [
|
||||
{
|
||||
action_name: 'assign_agent',
|
||||
action_name: 'assign_team',
|
||||
action_params: [],
|
||||
},
|
||||
];
|
||||
|
@ -214,7 +213,7 @@ export const isCustomAttribute = (attrs, key) => {
|
|||
|
||||
export const generateCustomAttributes = (
|
||||
conversationAttributes = [],
|
||||
contactAttributes = [],
|
||||
contactAttribtues = [],
|
||||
conversationlabel,
|
||||
contactlabel
|
||||
) => {
|
||||
|
@ -229,14 +228,14 @@ export const generateCustomAttributes = (
|
|||
...conversationAttributes
|
||||
);
|
||||
}
|
||||
if (contactAttributes.length) {
|
||||
if (contactAttribtues.length) {
|
||||
customAttributes.push(
|
||||
{
|
||||
key: `contact_custom_attribute`,
|
||||
name: contactlabel,
|
||||
disabled: true,
|
||||
},
|
||||
...contactAttributes
|
||||
...contactAttribtues
|
||||
);
|
||||
}
|
||||
return customAttributes;
|
||||
|
|
|
@ -250,8 +250,8 @@ export default {
|
|||
};
|
||||
},
|
||||
getActionDropdownValues(type) {
|
||||
const { agents, labels, teams } = this;
|
||||
return getActionOptions({ agents, labels, teams, type });
|
||||
const { labels, teams } = this;
|
||||
return getActionOptions({ labels, teams, type });
|
||||
},
|
||||
manifestCustomAttributes() {
|
||||
const conversationCustomAttributesRaw = this.$store.getters[
|
||||
|
|
|
@ -187,7 +187,7 @@ export default {
|
|||
],
|
||||
actions: [
|
||||
{
|
||||
action_name: 'assign_agent',
|
||||
action_name: 'assign_team',
|
||||
action_params: [],
|
||||
},
|
||||
],
|
||||
|
|
|
@ -30,11 +30,6 @@ export const AUTOMATIONS = {
|
|||
},
|
||||
],
|
||||
actions: [
|
||||
{
|
||||
key: 'assign_agent',
|
||||
name: 'Assign to agent',
|
||||
attributeI18nKey: 'ASSIGN_AGENT',
|
||||
},
|
||||
{
|
||||
key: 'assign_team',
|
||||
name: 'Assign a team',
|
||||
|
@ -134,11 +129,6 @@ export const AUTOMATIONS = {
|
|||
},
|
||||
],
|
||||
actions: [
|
||||
{
|
||||
key: 'assign_agent',
|
||||
name: 'Assign to agent',
|
||||
attributeI18nKey: 'ASSIGN_AGENT',
|
||||
},
|
||||
{
|
||||
key: 'assign_team',
|
||||
name: 'Assign a team',
|
||||
|
@ -251,11 +241,6 @@ export const AUTOMATIONS = {
|
|||
},
|
||||
],
|
||||
actions: [
|
||||
{
|
||||
key: 'assign_agent',
|
||||
name: 'Assign to agent',
|
||||
attributeI18nKey: 'ASSIGN_AGENT',
|
||||
},
|
||||
{
|
||||
key: 'assign_team',
|
||||
name: 'Assign a team',
|
||||
|
@ -326,11 +311,6 @@ export const AUTOMATION_RULE_EVENTS = [
|
|||
];
|
||||
|
||||
export const AUTOMATION_ACTION_TYPES = [
|
||||
{
|
||||
key: 'assign_agent',
|
||||
label: 'Assign to agent',
|
||||
inputType: 'search_select',
|
||||
},
|
||||
{
|
||||
key: 'assign_team',
|
||||
label: 'Assign a team',
|
||||
|
|
|
@ -214,7 +214,7 @@ describe('automationMethodsMixin', () => {
|
|||
it('getDefaultActions returns the resp default action model', () => {
|
||||
const genericActionModel = [
|
||||
{
|
||||
action_name: 'assign_agent',
|
||||
action_name: 'assign_team',
|
||||
action_params: [],
|
||||
},
|
||||
];
|
||||
|
|
|
@ -209,7 +209,7 @@ describe('automationMethodsMixin', () => {
|
|||
|
||||
it('appendNewAction appends a new condition to the automation data property', () => {
|
||||
const action = {
|
||||
action_name: 'assign_agent',
|
||||
action_name: 'assign_team',
|
||||
action_params: [],
|
||||
};
|
||||
const data = () => {
|
||||
|
@ -339,9 +339,6 @@ describe('automationMethodsMixin', () => {
|
|||
};
|
||||
};
|
||||
const computed = {
|
||||
agents() {
|
||||
return agents;
|
||||
},
|
||||
labels() {
|
||||
return labels;
|
||||
},
|
||||
|
@ -422,9 +419,6 @@ describe('automationMethodsMixin', () => {
|
|||
return {};
|
||||
};
|
||||
const computed = {
|
||||
agents() {
|
||||
return agents;
|
||||
},
|
||||
labels() {
|
||||
return labels;
|
||||
},
|
||||
|
|
|
@ -174,7 +174,7 @@ export default {
|
|||
feedback_message: this.feedbackMessage,
|
||||
};
|
||||
} catch (error) {
|
||||
const errorMessage = error?.response?.data?.message;
|
||||
const errorMessage = error?.response?.data?.error;
|
||||
this.errorMessage = errorMessage || this.$t('SURVEY.API.ERROR_MESSAGE');
|
||||
} finally {
|
||||
this.isUpdating = false;
|
||||
|
|
|
@ -104,8 +104,6 @@ module ActivityMessageHandler
|
|||
end
|
||||
|
||||
def create_assignee_change_activity(user_name)
|
||||
user_name = activity_message_ownner(user_name)
|
||||
|
||||
return unless user_name
|
||||
|
||||
content = generate_assignee_change_activity_content(user_name)
|
||||
|
|
Loading…
Reference in a new issue