NASER fix some issue

This commit is contained in:
Montzar.ah.01
2026-04-25 19:45:15 +00:00
parent cf50c3371f
commit a285bcceac
4 changed files with 30 additions and 43 deletions
+18 -7
View File
@@ -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,
]);