@extends('front.layout') @section('title') المهام - كريبتوتاسكي @endsection @section('css') @endsection @php $color = ['fee4cb', 'e9e7fd', 'ffd3e2', 'c8f7dc', 'd5deff']; @endphp @section('content')
{{-- Top Part --}}
{{-- User Profile --}} {{ auth()->user()->name }} : مرحباً بعودتك
{{-- Bottom Part --}}
{{-- Tasks --}}
{{-- Head --}}

المهام

{{ Carbon\Carbon::parse(date('m/d/Y h:i a'))->translatedFormat('F , j') }}

{{-- /Head --}}
{{-- Statics --}}
{{ count(\App\Models\Submit::where('user_id', '=', auth()->user()->id)->where('created_at', 'LIKE', '%' . date('Y-m-d') . '%')->get()) }}
عدد المهام التي اتممتها اليوم
{{ intval(\App\Models\Option::where('name', '=', 'max_per_day')->get()[0]->value1) -count(\App\Models\Submit::where('user_id', '=', auth()->user()->id)->where('created_at', 'LIKE', '%' . date('Y-m-d') . '%')->get()) }}
عدد المهام المتبقية اليوم
{{ $total_balance }}
رصيدك الكلي ( Trx )
{{-- /Statics --}} {{-- Change View --}}
{{-- List View --}} {{-- Grid View --}}
{{-- /Change View --}}
@if (count($tasks) > 0)
{{-- Single Task Box --}} @foreach ($tasks as $task) @if (count( \App\Models\Submit::where('user_id', '=', auth()->user()->id)->where('task_id', '=', $task->id)->get()) == 0 && \App\Models\Submit::where('user_id', '=', auth()->user()->id)->where('task_id', '=', $task->id)->get())
users_per_duration - count(App\Models\Submit::where('task_id', '=', $task->id)->get()) != 0 || intval(\App\Models\Option::where('name', '=', 'max_per_day')->get()[0]->value1) - count( \App\Models\Submit::where('user_id', '=', auth()->user()->id)->where('created_at', 'LIKE', '%' . date('Y-m-d') . '%')->get()) == 0) onclick="getData({{ $task->id }});" data-id="{{ $task->id }}" data-bs-toggle="modal" data-bs-target="#TaskDetails" @endif>
@if (intval(\App\Models\Option::where('name', '=', 'max_per_day')->get()[0]->value1) - count( \App\Models\Submit::where('user_id', '=', auth()->user()->id)->where('created_at', 'LIKE', '%' . date('Y-m-d') . '%')->get()) == 0)
لا يمكنك تنفيذ أي مهام اليوم
@endif
{{ Carbon\Carbon::parse($task->created_at)->diffForHumans() }}

@if ($task->type == 1) تقيم 5 نجوم @elseif ($task->type == 2) تقيم 5 نجوم + تعليق @else تقيم 5 نجوم + تعليق + رفع صورة @endif

ستحصل علي {{ $task->price }} Trx

حالة المهمة

{{ (count(App\Models\Submit::where('task_id', '=', $task->id)->where('status', '!=', 'Canceled')->get()) /$task->users) *100 }}%

@endif @endforeach {{-- /Single Task Box --}}
@else

لا يوجد اي مهام حالياً حاول مجدداً لاحقاً


@endif
{{-- /Tasks --}}
{{-- Modals --}} {{-- Task Details --}} @endsection @section('js') @endsection