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
$this->showSearch = false;
}
public function updatedXmlData($value, $key)
{
if ($key === 'Message') {
$this->showSearch = true;
$tempCode = MasterResponseTemplates::find($this->templateId);
$tempDoc = MasterMessages::find($this->messageId);
if ($tempCode && $tempDoc) {
$message = MasterResponseMessageType::where('doctype', strtoupper($tempDoc->name))
->where('codestatus', $tempCode->code)
->where('message', 'like', '%' . $value . '%')
->get();
} else {
$message = collect(); // Return an empty collection if no data is found
}
$this->masterMsg = $message;
}
// public function updatedXmlData($value, $key)
// {
// if ($key === 'Message') {
// $this->showSearch = true;
// $tempCode = MasterResponseTemplates::find($this->templateId);
// $tempDoc = MasterMessages::find($this->messageId);
// if ($tempCode && $tempDoc) {
// $message = MasterResponseMessageType::where('doctype', strtoupper($tempDoc->name))
// ->where('codestatus', $tempCode->code)
// ->where('message', 'like', '%' . $value . '%')
// ->get();
// } else {
// $message = collect(); // Return an empty collection if no data is found
// }
// $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