NASER fix some issue
This commit is contained in:
@@ -138,7 +138,7 @@ class TaskController extends Controller
|
||||
$user = User::where('user_name', $_COOKIE['user_identity'])->first();
|
||||
if ($user) {
|
||||
if ($user->is_admin == 1) {
|
||||
$tasks = Tasks::with(['duration', 'comments.user'])
|
||||
$tasks = Tasks::with(['duration', 'comments.user', 'appName'])
|
||||
->orderBy('target_date', 'desc')
|
||||
->get();
|
||||
// dd($tasks);
|
||||
@@ -182,6 +182,22 @@ class TaskController extends Controller
|
||||
'tasks' => (new Tasks())->filterByState($tasks),
|
||||
'count' => $count,
|
||||
'user_id' => $user->id,
|
||||
'isAdminLevel1' => $user->is_admin == 1,
|
||||
'mentionUsers' => User::select('id', 'name', 'user_name')->get(),
|
||||
'appsList' => App::select('id', 'name_fa')->get(),
|
||||
'priorityLabels' => [
|
||||
'urgent' => 'فوری',
|
||||
'high' => 'بالا',
|
||||
'medium' => 'متوسط',
|
||||
'low' => 'پایین'
|
||||
],
|
||||
'priorityColors' => [
|
||||
'urgent' => 'bg-red-100 text-red-800',
|
||||
'high' => 'bg-orange-100 text-orange-800',
|
||||
'medium' => 'bg-yellow-100 text-yellow-800',
|
||||
'low' => 'bg-green-100 text-green-800'
|
||||
],
|
||||
|
||||
]);
|
||||
} else {
|
||||
return back()->with('message', [
|
||||
@@ -529,12 +545,7 @@ class TaskController extends Controller
|
||||
private function send_bale($chat_id, $message)
|
||||
{
|
||||
try {
|
||||
Http::withOptions([
|
||||
'curl' => [
|
||||
CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V4,
|
||||
CURLOPT_TCP_FASTOPEN => 1,
|
||||
]
|
||||
])->withoutVerifying()->post('https://tapi.bale.ai/1482838710:sYbLzby0tuLRzHvP4d3LsbcNwg2sjSDLTAU/sendMessage', [
|
||||
Http::withoutVerifying()->post('https://tapi.bale.ai/1482838710:sYbLzby0tuLRzHvP4d3LsbcNwg2sjSDLTAU/sendMessage', [
|
||||
"chat_id" => $chat_id,
|
||||
'text' => $message,
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user