Skip to content

Commit

Permalink
Fix Triggers (#18626)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriellsh authored Aug 21, 2020
1 parent ec113f0 commit 88649be
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions client/omnichannel/triggers/EditTriggerPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ const getInitialValues = ({
enabled,
runOnce,
conditions: [{
condName,
condValue,
name: condName,
value: condValue,
}],
actions: [{
actName,
action: actName,
params: {
actSender,
actMsg,
actSenderName,
sender: actSender,
msg: actMsg,
name: actSenderName,
},
}],
}) => ({
Expand Down Expand Up @@ -76,7 +76,7 @@ const EditTriggerPage = ({ data, onSave }) => {

const handleSave = useMutableCallback(async () => {
try {
const { actions: { sender, msg, name }, ...restValues } = values;
const { actions: { params: { sender, msg, name } }, ...restValues } = values;
await save({
_id: data._id,
...restValues,
Expand Down
2 changes: 1 addition & 1 deletion client/omnichannel/triggers/NewTriggerPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const NewTriggerPage = ({ onSave }) => {

const handleSave = useMutableCallback(async () => {
try {
const { actions: { sender, msg, name }, ...restValues } = values;
const { actions: { params: { sender, msg, name } }, ...restValues } = values;
await save({
...restValues,
conditions: [values.conditions],
Expand Down
2 changes: 1 addition & 1 deletion client/omnichannel/triggers/TriggersTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ const TriggersTableContainer = ({ reloadRef }) => {

return <TriggersTable
triggers={data?.triggers}
totaltriggers={data?.total}
totalTriggers={data?.total}
params={params}
onChangeParams={setParams}
onDelete={reload}
Expand Down

0 comments on commit 88649be

Please sign in to comment.