Merge pull request #234 from gillidandaweb/gillidandaweb-emailto-workflow
Add "email to" workflow
This commit is contained in:
@@ -120,6 +120,7 @@ class MailController extends Controller
|
|||||||
$mail = $mailbox->getMail($mailId);
|
$mail = $mailbox->getMail($mailId);
|
||||||
try {
|
try {
|
||||||
$mail = $mailbox->getMail($mailId);
|
$mail = $mailbox->getMail($mailId);
|
||||||
|
|
||||||
} catch (\PhpImap\Exception $e) {
|
} catch (\PhpImap\Exception $e) {
|
||||||
echo 'Connection error';
|
echo 'Connection error';
|
||||||
}
|
}
|
||||||
@@ -171,6 +172,8 @@ class MailController extends Controller
|
|||||||
} else {
|
} else {
|
||||||
$subject = 'No Subject';
|
$subject = 'No Subject';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$to = $mail->to;
|
||||||
$fromname = $mail->fromName;
|
$fromname = $mail->fromName;
|
||||||
$fromaddress = $mail->fromAddress;
|
$fromaddress = $mail->fromAddress;
|
||||||
$ticket_source = Ticket_source::where('name', '=', 'email')->first();
|
$ticket_source = Ticket_source::where('name', '=', 'email')->first();
|
||||||
@@ -182,7 +185,7 @@ class MailController extends Controller
|
|||||||
$form_data = null;
|
$form_data = null;
|
||||||
$team_assign = null;
|
$team_assign = null;
|
||||||
$ticket_status = null;
|
$ticket_status = null;
|
||||||
$result = $this->TicketWorkflowController->workflow($fromaddress, $fromname, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $dept, $assign, $team_assign, $ticket_status, $form_data, $auto_response, $mail->getAttachments());
|
$result = $this->TicketWorkflowController->workflow($fromaddress, $fromname, $to, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $dept, $assign, $team_assign, $ticket_status, $form_data, $auto_response, $mail->getAttachments());
|
||||||
|
|
||||||
if ($result[1] == true) {
|
if ($result[1] == true) {
|
||||||
$ticket_table = Tickets::where('ticket_number', '=', $result[0])->first();
|
$ticket_table = Tickets::where('ticket_number', '=', $result[0])->first();
|
||||||
|
@@ -40,33 +40,35 @@ class TicketWorkflowController extends Controller
|
|||||||
*
|
*
|
||||||
* @return type response
|
* @return type response
|
||||||
*/
|
*/
|
||||||
public function workflow($fromaddress, $fromname, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $dept, $assign, $team_assign, $ticket_status, $form_data, $auto_response, $mail)
|
public function workflow($fromaddress, $fromname, $to, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $dept, $assign, $team_assign, $ticket_status, $form_data, $auto_response, $mail)
|
||||||
{
|
{
|
||||||
$contact_details = ['email' => $fromaddress, 'email_name' => $fromname, 'subject' => $subject, 'message' => $body];
|
$contact_details = ['email' => $fromaddress, 'email_name' => $fromname, 'email_to' => $to, 'subject' => $subject, 'message' => $body];
|
||||||
$ticket_settings_details = ['help_topic' => $helptopic, 'sla' => $sla, 'priority' => $priority, 'source' => $source, 'dept' => $dept, 'assign' => $assign, 'team' => $team_assign, 'status' => $ticket_status, 'reject' => false];
|
$ticket_settings_details = ['help_topic' => $helptopic, 'sla' => $sla, 'priority' => $priority, 'source' => $source, 'dept' => $dept, 'assign' => $assign, 'team' => $team_assign, 'status' => $ticket_status, 'reject' => false];
|
||||||
// get all the workflow common to the entire system which includes any type of ticket creation where the execution order of the workflow should be starting with ascending order
|
// get all the workflow common to the entire system which includes any type of ticket creation where the execution order of the workflow should be starting with ascending order
|
||||||
$workflows = WorkflowName::where('target', '=', 'A-0')->where('status', '=', '1')->orderBy('order', 'asc')->get();
|
$workflows = WorkflowName::where('target', '=', 'A-0')->where('status', '=', '1')->orderBy('order', 'asc')->get();
|
||||||
|
|
||||||
foreach ($workflows as $workflow) {
|
foreach ($workflows as $workflow) {
|
||||||
// checking if any workflow defined in the system
|
// checking if any workflow defined in the system
|
||||||
if ($workflow) {
|
if ($workflow) {
|
||||||
// get all the rules of workflow which has a foreign key of those workflow which are applied to creating any ticket from any source
|
// get all the rules of workflow which has a foreign key of those workflow which are applied to creating any ticket from any source
|
||||||
$worklfow_rules = WorkflowRules::where('workflow_id', '=', $workflow->id)->get();
|
$workflow_rules = WorkflowRules::where('workflow_id', '=', $workflow->id)->get();
|
||||||
foreach ($worklfow_rules as $worklfow_rule) {
|
|
||||||
|
foreach ($workflow_rules as $workflow_rule) {
|
||||||
// checking for the workflow rules to which workflow rule type it is
|
// checking for the workflow rules to which workflow rule type it is
|
||||||
if ($worklfow_rule->matching_scenario == 'email') {
|
if ($workflow_rule->matching_scenario == 'email') {
|
||||||
if ($rule_condition = $this->checkRuleCondition($contact_details['email'], $worklfow_rule->matching_relation, $worklfow_rule->matching_value) == true) {
|
if ($rule_condition = $this->checkRuleCondition($contact_details['email'], $workflow_rule->matching_relation, $workflow_rule->matching_value) == true) {
|
||||||
$ticket_settings_details = $this->applyActionCondition($workflow->id, $ticket_settings_details);
|
$ticket_settings_details = $this->applyActionCondition($workflow->id, $ticket_settings_details);
|
||||||
}
|
}
|
||||||
} elseif ($worklfow_rule->matching_scenario == 'email_name') {
|
} elseif ($workflow_rule->matching_scenario == 'email_name') {
|
||||||
if ($rule_condition = $this->checkRuleCondition($contact_details['email_name'], $worklfow_rule->matching_relation, $worklfow_rule->matching_value) == true) {
|
if ($rule_condition = $this->checkRuleCondition($contact_details['email_name'], $workflow_rule->matching_relation, $workflow_rule->matching_value) == true) {
|
||||||
$ticket_settings_details = $this->applyActionCondition($workflow->id, $ticket_settings_details);
|
$ticket_settings_details = $this->applyActionCondition($workflow->id, $ticket_settings_details);
|
||||||
}
|
}
|
||||||
} elseif ($worklfow_rule->matching_scenario == 'subject') {
|
} elseif ($workflow_rule->matching_scenario == 'subject') {
|
||||||
if ($rule_condition = $this->checkRuleCondition($contact_details['subject'], $worklfow_rule->matching_relation, $worklfow_rule->matching_value) == true) {
|
if ($rule_condition = $this->checkRuleCondition($contact_details['subject'], $worklfow_rule->matching_relation, $worklfow_rule->matching_value) == true) {
|
||||||
$ticket_settings_details = $this->applyActionCondition($workflow->id, $ticket_settings_details);
|
$ticket_settings_details = $this->applyActionCondition($workflow->id, $ticket_settings_details);
|
||||||
}
|
}
|
||||||
} elseif ($worklfow_rule->matching_scenario == 'message') {
|
} elseif ($workflow_rule->matching_scenario == 'message') {
|
||||||
if ($rule_condition = $this->checkRuleCondition($contact_details['message'], $worklfow_rule->matching_relation, $worklfow_rule->matching_value) == true) {
|
if ($rule_condition = $this->checkRuleCondition($contact_details['message'], $workflow_rule->matching_relation, $workflow_rule->matching_value) == true) {
|
||||||
$ticket_settings_details = $this->applyActionCondition($workflow->id, $ticket_settings_details);
|
$ticket_settings_details = $this->applyActionCondition($workflow->id, $ticket_settings_details);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -78,24 +80,24 @@ class TicketWorkflowController extends Controller
|
|||||||
$workflows_webs = WorkflowName::where('target', '=', 'A-1')->where('status', '=', '1')->orderBy('order', 'asc')->get();
|
$workflows_webs = WorkflowName::where('target', '=', 'A-1')->where('status', '=', '1')->orderBy('order', 'asc')->get();
|
||||||
foreach ($workflows_webs as $workflows_web) {
|
foreach ($workflows_webs as $workflows_web) {
|
||||||
if ($workflows_web) {
|
if ($workflows_web) {
|
||||||
$worklfow_rules = WorkflowRules::where('workflow_id', '=', $workflows_web->id)->get();
|
$workflow_rules = WorkflowRules::where('workflow_id', '=', $workflows_web->id)->get();
|
||||||
foreach ($worklfow_rules as $worklfow_rule) {
|
foreach ($workflow_rules as $workflow_rule) {
|
||||||
if ($worklfow_rule) {
|
if ($workflow_rule) {
|
||||||
// checking for the workflow rules to which workflow rule type it is
|
// checking for the workflow rules to which workflow rule type it is
|
||||||
if ($worklfow_rule->matching_scenario == 'email') {
|
if ($workflow_rule->matching_scenario == 'email') {
|
||||||
if ($this->checkRuleCondition($contact_details['email'], $worklfow_rule->matching_relation, $worklfow_rule->matching_value) == true) {
|
if ($this->checkRuleCondition($contact_details['email'], $workflow_rule->matching_relation, $workflow_rule->matching_value) == true) {
|
||||||
$ticket_settings_details = $this->applyActionCondition($workflows_web->id, $ticket_settings_details);
|
$ticket_settings_details = $this->applyActionCondition($workflows_web->id, $ticket_settings_details);
|
||||||
}
|
}
|
||||||
} elseif ($worklfow_rule->matching_scenario == 'email_name') {
|
} elseif ($workflow_rule->matching_scenario == 'email_name') {
|
||||||
if ($this->checkRuleCondition($contact_details['email_name'], $worklfow_rule->matching_relation, $worklfow_rule->matching_value) == true) {
|
if ($this->checkRuleCondition($contact_details['email_name'], $workflow_rule->matching_relation, $workflow_rule->matching_value) == true) {
|
||||||
$ticket_settings_details = $this->applyActionCondition($workflows_web->id, $ticket_settings_details);
|
$ticket_settings_details = $this->applyActionCondition($workflows_web->id, $ticket_settings_details);
|
||||||
}
|
}
|
||||||
} elseif ($worklfow_rule->matching_scenario == 'subject') {
|
} elseif ($workflow_rule->matching_scenario == 'subject') {
|
||||||
if ($this->checkRuleCondition($contact_details['subject'], $worklfow_rule->matching_relation, $worklfow_rule->matching_value) == true) {
|
if ($this->checkRuleCondition($contact_details['subject'], $workflow_rule->matching_relation, $workflow_rule->matching_value) == true) {
|
||||||
$ticket_settings_details = $this->applyActionCondition($workflows_web->id, $ticket_settings_details);
|
$ticket_settings_details = $this->applyActionCondition($workflows_web->id, $ticket_settings_details);
|
||||||
}
|
}
|
||||||
} elseif ($worklfow_rule->matching_scenario == 'message') {
|
} elseif ($workflow_rule->matching_scenario == 'message') {
|
||||||
if ($this->checkRuleCondition($contact_details['message'], $worklfow_rule->matching_relation, $worklfow_rule->matching_value) == true) {
|
if ($this->checkRuleCondition($contact_details['message'], $workflow_rule->matching_relation, $workflow_rule->matching_value) == true) {
|
||||||
$ticket_settings_details = $this->applyActionCondition($workflows_web->id, $ticket_settings_details);
|
$ticket_settings_details = $this->applyActionCondition($workflows_web->id, $ticket_settings_details);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -109,24 +111,32 @@ class TicketWorkflowController extends Controller
|
|||||||
$workflows_emails = WorkflowName::where('target', '=', 'A-2')->where('status', '=', '1')->orderBy('order', 'asc')->get();
|
$workflows_emails = WorkflowName::where('target', '=', 'A-2')->where('status', '=', '1')->orderBy('order', 'asc')->get();
|
||||||
foreach ($workflows_emails as $workflows_email) {
|
foreach ($workflows_emails as $workflows_email) {
|
||||||
if ($workflows_email) {
|
if ($workflows_email) {
|
||||||
$worklfow_rules = WorkflowRules::where('workflow_id', '=', $workflows_email->id)->get();
|
$workflow_rules = WorkflowRules::where('workflow_id', '=', $workflows_email->id)->get();
|
||||||
foreach ($worklfow_rules as $worklfow_rule) {
|
foreach ($workflow_rules as $workflow_rule) {
|
||||||
if ($worklfow_rule) {
|
if ($workflow_rule) {
|
||||||
// checking for the workflow rules to which workflow rule type it is
|
// checking for the workflow rules to which workflow rule type it is
|
||||||
if ($worklfow_rule->matching_scenario == 'email') {
|
if ($workflow_rule->matching_scenario == 'email') {
|
||||||
if ($rule_condition = $this->checkRuleCondition($contact_details['email'], $worklfow_rule->matching_relation, $worklfow_rule->matching_value) == true) {
|
if ($rule_condition = $this->checkRuleCondition($contact_details['email'], $workflow_rule->matching_relation, $workflow_rule->matching_value) == true) {
|
||||||
$ticket_settings_details = $this->applyActionCondition($workflows_email->id, $ticket_settings_details);
|
$ticket_settings_details = $this->applyActionCondition($workflows_email->id, $ticket_settings_details);
|
||||||
}
|
}
|
||||||
} elseif ($worklfow_rule->matching_scenario == 'email_name') {
|
} elseif ($workflow_rule->matching_scenario == 'email_name') {
|
||||||
if ($rule_condition = $this->checkRuleCondition($contact_details['email_name'], $worklfow_rule->matching_relation, $worklfow_rule->matching_value) == true) {
|
if ($rule_condition = $this->checkRuleCondition($contact_details['email_name'], $workflow_rule->matching_relation, $workflow_rule->matching_value) == true) {
|
||||||
$ticket_settings_details = $this->applyActionCondition($workflows_email->id, $ticket_settings_details);
|
$ticket_settings_details = $this->applyActionCondition($workflows_email->id, $ticket_settings_details);
|
||||||
}
|
}
|
||||||
} elseif ($worklfow_rule->matching_scenario == 'subject') {
|
} elseif ($workflow_rule->matching_scenario == 'email_to') {
|
||||||
if ($rule_condition = $this->checkRuleCondition($contact_details['subject'], $worklfow_rule->matching_relation, $worklfow_rule->matching_value) == true) {
|
|
||||||
|
foreach ($contact_details['email_to'] as $email_toaddress => $email_toname) {
|
||||||
|
if ($rule_condition = $this->checkRuleCondition($email_toaddress, $workflow_rule->matching_relation, $workflow_rule->matching_value) == true) {
|
||||||
|
$ticket_settings_details = $this->applyActionCondition($workflows_email->id, $ticket_settings_details);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} elseif ($workflow_rule->matching_scenario == 'subject') {
|
||||||
|
if ($rule_condition = $this->checkRuleCondition($contact_details['subject'], $workflow_rule->matching_relation, $workflow_rule->matching_value) == true) {
|
||||||
$ticket_settings_details = $this->applyActionCondition($workflows_email->id, $ticket_settings_details);
|
$ticket_settings_details = $this->applyActionCondition($workflows_email->id, $ticket_settings_details);
|
||||||
}
|
}
|
||||||
} elseif ($worklfow_rule->matching_scenario == 'message') {
|
} elseif ($workflow_rule->matching_scenario == 'message') {
|
||||||
if ($rule_condition = $this->checkRuleCondition($contact_details['message'], $worklfow_rule->matching_relation, $worklfow_rule->matching_value) == true) {
|
if ($rule_condition = $this->checkRuleCondition($contact_details['message'], $workflow_rule->matching_relation, $workflow_rule->matching_value) == true) {
|
||||||
$ticket_settings_details = $this->applyActionCondition($workflows_email->id, $ticket_settings_details);
|
$ticket_settings_details = $this->applyActionCondition($workflows_email->id, $ticket_settings_details);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -140,24 +150,28 @@ class TicketWorkflowController extends Controller
|
|||||||
$workflows_apis = WorkflowName::where('target', '=', 'A-4')->where('status', '=', '1')->orderBy('order', 'asc')->get();
|
$workflows_apis = WorkflowName::where('target', '=', 'A-4')->where('status', '=', '1')->orderBy('order', 'asc')->get();
|
||||||
foreach ($workflows_apis as $workflows_api) {
|
foreach ($workflows_apis as $workflows_api) {
|
||||||
if ($workflows_api) {
|
if ($workflows_api) {
|
||||||
$worklfow_rules = WorkflowRules::where('workflow_id', '=', $workflows_api->id)->get();
|
$workflow_rules = WorkflowRules::where('workflow_id', '=', $workflows_api->id)->get();
|
||||||
foreach ($worklfow_rules as $worklfow_rule) {
|
foreach ($workflow_rules as $workflow_rule) {
|
||||||
if ($worklfow_rule) {
|
if ($workflow_rule) {
|
||||||
// checking for the workflow rules to which workflow rule type it is
|
// checking for the workflow rules to which workflow rule type it is
|
||||||
if ($worklfow_rule->matching_scenario == 'email') {
|
if ($workflow_rule->matching_scenario == 'email') {
|
||||||
if ($rule_condition = $this->checkRuleCondition($contact_details['email'], $worklfow_rule->matching_relation, $worklfow_rule->matching_value) == true) {
|
if ($rule_condition = $this->checkRuleCondition($contact_details['email'], $workflow_rule->matching_relation, $workflow_rule->matching_value) == true) {
|
||||||
$ticket_settings_details = $this->applyActionCondition($workflows_api->id, $ticket_settings_details);
|
$ticket_settings_details = $this->applyActionCondition($workflows_api->id, $ticket_settings_details);
|
||||||
}
|
}
|
||||||
} elseif ($worklfow_rule->matching_scenario == 'email_name') {
|
} elseif ($workflow_rule->matching_scenario == 'email_to') {
|
||||||
if ($rule_condition = $this->checkRuleCondition($contact_details['email_name'], $worklfow_rule->matching_relation, $worklfow_rule->matching_value) == true) {
|
if ($rule_condition = $this->checkRuleCondition($contact_details['email'], $workflow_rule->matching_relation, $workflow_rule->matching_value) == true) {
|
||||||
$ticket_settings_details = $this->applyActionCondition($workflows_api->id, $ticket_settings_details);
|
$ticket_settings_details = $this->applyActionCondition($workflows_api->id, $ticket_settings_details);
|
||||||
}
|
}
|
||||||
} elseif ($worklfow_rule->matching_scenario == 'subject') {
|
} elseif ($workflow_rule->matching_scenario == 'email_name') {
|
||||||
if ($rule_condition = $this->checkRuleCondition($contact_details['subject'], $worklfow_rule->matching_relation, $worklfow_rule->matching_value) == true) {
|
if ($rule_condition = $this->checkRuleCondition($contact_details['email_name'], $workflow_rule->matching_relation, $workflow_rule->matching_value) == true) {
|
||||||
$ticket_settings_details = $this->applyActionCondition($workflows_api->id, $ticket_settings_details);
|
$ticket_settings_details = $this->applyActionCondition($workflows_api->id, $ticket_settings_details);
|
||||||
}
|
}
|
||||||
} elseif ($worklfow_rule->matching_scenario == 'message') {
|
} elseif ($workflow_rule->matching_scenario == 'subject') {
|
||||||
if ($rule_condition = $this->checkRuleCondition($contact_details['message'], $worklfow_rule->matching_relation, $worklfow_rule->matching_value) == true) {
|
if ($rule_condition = $this->checkRuleCondition($contact_details['subject'], $workflow_rule->matching_relation, $workflow_rule->matching_value) == true) {
|
||||||
|
$ticket_settings_details = $this->applyActionCondition($workflows_api->id, $ticket_settings_details);
|
||||||
|
}
|
||||||
|
} elseif ($workflow_rule->matching_scenario == 'message') {
|
||||||
|
if ($rule_condition = $this->checkRuleCondition($contact_details['message'], $workflow_rule->matching_relation, $workflow_rule->matching_value) == true) {
|
||||||
$ticket_settings_details = $this->applyActionCondition($workflows_api->id, $ticket_settings_details);
|
$ticket_settings_details = $this->applyActionCondition($workflows_api->id, $ticket_settings_details);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -204,6 +218,7 @@ class TicketWorkflowController extends Controller
|
|||||||
// } elseif($condition == 'not_match') {
|
// } elseif($condition == 'not_match') {
|
||||||
//
|
//
|
||||||
// }
|
// }
|
||||||
|
|
||||||
return $return;
|
return $return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -68,6 +68,7 @@ class ClientTicketController extends Controller
|
|||||||
|
|
||||||
$fromaddress = $user_cred->email;
|
$fromaddress = $user_cred->email;
|
||||||
$fromname = $user_cred->user_name;
|
$fromname = $user_cred->user_name;
|
||||||
|
$to = '';
|
||||||
$phone = '';
|
$phone = '';
|
||||||
$phonecode = '';
|
$phonecode = '';
|
||||||
$mobile_number = '';
|
$mobile_number = '';
|
||||||
@@ -86,7 +87,7 @@ class ClientTicketController extends Controller
|
|||||||
|
|
||||||
$inline_attachment = null;
|
$inline_attachment = null;
|
||||||
|
|
||||||
$this->TicketWorkflowController->workflow($fromaddress, $fromname, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $dept, $assign, $team_assign, $ticket_status, $form_data, $auto_response, $inline_attachment);
|
$this->TicketWorkflowController->workflow($fromaddress, $fromname, $to, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $dept, $assign, $team_assign, $ticket_status, $form_data, $auto_response, $inline_attachment);
|
||||||
|
|
||||||
return \Redirect::back()->with('success1', Lang::get('lang.successfully_replied'));
|
return \Redirect::back()->with('success1', Lang::get('lang.successfully_replied'));
|
||||||
}
|
}
|
||||||
|
@@ -149,6 +149,7 @@ class FormController extends Controller
|
|||||||
$name = $request->input('Name');
|
$name = $request->input('Name');
|
||||||
$phone = $request->input('Phone');
|
$phone = $request->input('Phone');
|
||||||
$email = $request->input('Email');
|
$email = $request->input('Email');
|
||||||
|
$to = '';
|
||||||
$subject = $request->input('Subject');
|
$subject = $request->input('Subject');
|
||||||
$details = $request->input('Details');
|
$details = $request->input('Details');
|
||||||
$phonecode = $request->input('Code');
|
$phonecode = $request->input('Code');
|
||||||
@@ -200,7 +201,7 @@ class FormController extends Controller
|
|||||||
} else {
|
} else {
|
||||||
$inline_attachment = null;
|
$inline_attachment = null;
|
||||||
}
|
}
|
||||||
$result = $this->TicketWorkflowController->workflow($email, $name, $subject, $details, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $department, $assignto, $team_assign, $status, $form_extras, $auto_response, $inline_attachment);
|
$result = $this->TicketWorkflowController->workflow($email, $name, $to, $subject, $details, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $department, $assignto, $team_assign, $status, $form_extras, $auto_response, $inline_attachment);
|
||||||
|
|
||||||
if ($result[1] == 1) {
|
if ($result[1] == 1) {
|
||||||
$ticketId = Tickets::where('ticket_number', '=', $result[0])->first();
|
$ticketId = Tickets::where('ticket_number', '=', $result[0])->first();
|
||||||
@@ -244,6 +245,7 @@ class FormController extends Controller
|
|||||||
|
|
||||||
$fromaddress = $user_cred->email;
|
$fromaddress = $user_cred->email;
|
||||||
$fromname = $user_cred->user_name;
|
$fromname = $user_cred->user_name;
|
||||||
|
$to = '';
|
||||||
$phone = '';
|
$phone = '';
|
||||||
$phonecode = '';
|
$phonecode = '';
|
||||||
$mobile_number = '';
|
$mobile_number = '';
|
||||||
@@ -260,7 +262,7 @@ class FormController extends Controller
|
|||||||
$ticket_status = null;
|
$ticket_status = null;
|
||||||
$auto_response = 0;
|
$auto_response = 0;
|
||||||
|
|
||||||
$this->TicketWorkflowController->workflow($fromaddress, $fromname, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $dept, $assign, $team_assign, $ticket_status, $form_data, $auto_response);
|
$this->TicketWorkflowController->workflow($fromaddress, $to, $fromname, $subject, $body, $phone, $phonecode, $mobile_number, $helptopic, $sla, $priority, $source, $collaborator, $dept, $assign, $team_assign, $ticket_status, $form_data, $auto_response);
|
||||||
|
|
||||||
return \Redirect::back()->with('success1', Lang::get('lang.successfully_replied'));
|
return \Redirect::back()->with('success1', Lang::get('lang.successfully_replied'));
|
||||||
} else {
|
} else {
|
||||||
|
@@ -95,6 +95,7 @@ return [
|
|||||||
'create_email' => 'Create Email',
|
'create_email' => 'Create Email',
|
||||||
'email_address' => 'Email Address',
|
'email_address' => 'Email Address',
|
||||||
'email_name' => 'Email Name',
|
'email_name' => 'Email Name',
|
||||||
|
'email_to' => 'Email to',
|
||||||
'help_topic' => 'Help Topic',
|
'help_topic' => 'Help Topic',
|
||||||
'auto_response' => 'Auto Response',
|
'auto_response' => 'Auto Response',
|
||||||
'host_name' => 'Host Name',
|
'host_name' => 'Host Name',
|
||||||
|
Binary file not shown.
@@ -96,6 +96,7 @@ return [
|
|||||||
'create_email' => 'Crea Email',
|
'create_email' => 'Crea Email',
|
||||||
'email_address' => 'Indirizzo Email',
|
'email_address' => 'Indirizzo Email',
|
||||||
'email_name' => 'Nome Email',
|
'email_name' => 'Nome Email',
|
||||||
|
'email_to' => 'Email to',
|
||||||
'help_topic' => 'Argomento della Guida',
|
'help_topic' => 'Argomento della Guida',
|
||||||
'auto_response' => 'Auto Risposta',
|
'auto_response' => 'Auto Risposta',
|
||||||
'host_name' => 'Nome Host',
|
'host_name' => 'Nome Host',
|
||||||
|
@@ -93,6 +93,7 @@ return [
|
|||||||
'create_email' => 'Создать Email',
|
'create_email' => 'Создать Email',
|
||||||
'email_address' => 'Email Address',
|
'email_address' => 'Email Address',
|
||||||
'email_name' => 'Email Name',
|
'email_name' => 'Email Name',
|
||||||
|
'email_to' => 'Email to',
|
||||||
'help_topic' => 'Help Topic',
|
'help_topic' => 'Help Topic',
|
||||||
'auto_response' => 'Автоматический Ответ',
|
'auto_response' => 'Автоматический Ответ',
|
||||||
'host_name' => 'Host Name',
|
'host_name' => 'Host Name',
|
||||||
|
@@ -136,6 +136,7 @@ class="active"
|
|||||||
<option value="">-- {!! Lang::get('lang.select_one') !!} --</option>
|
<option value="">-- {!! Lang::get('lang.select_one') !!} --</option>
|
||||||
<option value="email">{!! Lang::get('lang.email') !!}</option>
|
<option value="email">{!! Lang::get('lang.email') !!}</option>
|
||||||
<option value="email_name">{!! Lang::get('lang.email_name') !!}</option>
|
<option value="email_name">{!! Lang::get('lang.email_name') !!}</option>
|
||||||
|
<option value="email_to">{!! Lang::get('lang.email_to') !!}</option>
|
||||||
<option value="subject">{!! Lang::get('lang.subject') !!}</option>
|
<option value="subject">{!! Lang::get('lang.subject') !!}</option>
|
||||||
<option value="message">{!! Lang::get('lang.message') !!}/{!! Lang::get('lang.body') !!}</option>
|
<option value="message">{!! Lang::get('lang.message') !!}/{!! Lang::get('lang.body') !!}</option>
|
||||||
</select>
|
</select>
|
||||||
|
@@ -179,6 +179,11 @@ class="active"
|
|||||||
echo "selected='selected'";
|
echo "selected='selected'";
|
||||||
}
|
}
|
||||||
?> >{!! Lang::get('lang.email_name') !!}</option>
|
?> >{!! Lang::get('lang.email_name') !!}</option>
|
||||||
|
<option value="email_to" <?php
|
||||||
|
if ($workflow_rule->matching_scenario == 'email_to') {
|
||||||
|
echo "selected='selected'";
|
||||||
|
}
|
||||||
|
?> >{!! Lang::get('lang.email_to') !!}</option>
|
||||||
<option value="subject" <?php
|
<option value="subject" <?php
|
||||||
if ($workflow_rule->matching_scenario == 'subject') {
|
if ($workflow_rule->matching_scenario == 'subject') {
|
||||||
echo "selected='selected'";
|
echo "selected='selected'";
|
||||||
|
Reference in New Issue
Block a user