Commit d47812f2 authored by Chanon.u's avatar Chanon.u
Browse files

Comment function for autocomplete message

parent a4597286
...@@ -324,24 +324,24 @@ class ManualResponse extends Component ...@@ -324,24 +324,24 @@ class ManualResponse extends Component
$this->showSearch = false; $this->showSearch = false;
} }
public function updatedXmlData($value, $key) // public function updatedXmlData($value, $key)
{ // {
if ($key === 'Message') { // if ($key === 'Message') {
$this->showSearch = true; // $this->showSearch = true;
$tempCode = MasterResponseTemplates::find($this->templateId); // $tempCode = MasterResponseTemplates::find($this->templateId);
$tempDoc = MasterMessages::find($this->messageId); // $tempDoc = MasterMessages::find($this->messageId);
if ($tempCode && $tempDoc) { // if ($tempCode && $tempDoc) {
$message = MasterResponseMessageType::where('doctype', strtoupper($tempDoc->name)) // $message = MasterResponseMessageType::where('doctype', strtoupper($tempDoc->name))
->where('codestatus', $tempCode->code) // ->where('codestatus', $tempCode->code)
->where('message', 'like', '%' . $value . '%') // ->where('message', 'like', '%' . $value . '%')
->get(); // ->get();
} else { // } else {
$message = collect(); // Return an empty collection if no data is found // $message = collect(); // Return an empty collection if no data is found
} // }
$this->masterMsg = $message; // $this->masterMsg = $message;
} // }
} // }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment