Commit 567d6161f9a1a6c8a9ddd98a05e170253105b502
1 parent
22d3318a03
Exists in
master
and in
1 other branch
Редакция работодателей и образования
Showing 4 changed files with 109 additions and 47 deletions Side-by-side Diff
app/Http/Controllers/Admin/EmployersController.php
... | ... | @@ -18,18 +18,28 @@ class EmployersController extends Controller |
18 | 18 | { |
19 | 19 | public function index(Request $request) { |
20 | 20 | //$all_employer = User::where('is_worker', '0')->count(); |
21 | - | |
21 | + $all_public = -1; | |
22 | + $all_status = -1; | |
22 | 23 | if ($request->ajax()) { |
23 | 24 | $user = User::find($request->id); |
24 | 25 | $request->offsetUnset('id'); |
25 | 26 | $user->update($request->all()); |
26 | 27 | } |
27 | 28 | |
28 | - $users = User::with('employers')->select(['users.*','users.id as usr_id', 'emp.id as emp_id', 'emp.logo as emp_logo', 'emp.*']) | |
29 | + $users = User::with('employers')->select(['users.*','users.id as usr_id', 'emp.id as emp_id', 'emp.code as code_id', 'emp.logo as emp_logo', 'emp.*']) | |
29 | 30 | ->join('employers as emp','emp.user_id','users.id') |
30 | - ->where('users.is_worker', '0')->Realuser()->Notadmin(); | |
31 | + ->where('users.is_worker', '0')->Realuser(); //->Notadmin(); | |
31 | 32 | $all_employer = $users->count(); |
32 | 33 | |
34 | + $all_public = Employer::where('status_hidden', '=', '0')-> | |
35 | + count(); | |
36 | + | |
37 | + $all_status = Employer::where(function($query) { | |
38 | + $query->Where('category', '=', 'Не оплачен') | |
39 | + ->orWhere('category', '=', 'Не определен') | |
40 | + ->orWhere('category', '=', 'Согласование'); | |
41 | + })->count(); | |
42 | + | |
33 | 43 | $find_cat = ""; |
34 | 44 | if (isset($request->category)) { |
35 | 45 | if ($request->category != 'Все категории') { |
... | ... | @@ -61,6 +71,8 @@ class EmployersController extends Controller |
61 | 71 | 'find_key', |
62 | 72 | 'find_cat', |
63 | 73 | 'all_employer', |
74 | + 'all_public', | |
75 | + 'all_status', | |
64 | 76 | 'select_category')); |
65 | 77 | } |
66 | 78 | } |
resources/views/admin/education/form.blade.php
... | ... | @@ -20,45 +20,6 @@ |
20 | 20 | </label><br> |
21 | 21 | |
22 | 22 | <label class="block text-sm"> |
23 | - <span class="text-gray-700 dark:text-gray-400">Адрес</span> | |
24 | - <input name="address" id="address" | |
25 | - class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" | |
26 | - placeholder="Адрес" value="{{ old('address') ?? $education->address ?? '' }}" | |
27 | - /> | |
28 | - @error('address') | |
29 | - <span class="text-xs text-red-600 dark:text-red-400"> | |
30 | - {{ $message }} | |
31 | - </span> | |
32 | - @enderror | |
33 | - </label><br> | |
34 | - | |
35 | - <label class="block text-sm"> | |
36 | - <span class="text-gray-700 dark:text-gray-400">Email</span> | |
37 | - <input name="email" id="email" | |
38 | - class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" | |
39 | - placeholder="Email" value="{{ old('email') ?? $education->email ?? '' }}" | |
40 | - /> | |
41 | - @error('email') | |
42 | - <span class="text-xs text-red-600 dark:text-red-400"> | |
43 | - {{ $message }} | |
44 | - </span> | |
45 | - @enderror | |
46 | - </label><br> | |
47 | - | |
48 | - <label class="block text-sm"> | |
49 | - <span class="text-gray-700 dark:text-gray-400">Телефон</span> | |
50 | - <input name="telephone" id="telephone" | |
51 | - class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" | |
52 | - placeholder="Телефон" value="{{ old('telephone') ?? $education->telephone ?? '' }}" | |
53 | - /> | |
54 | - @error('telephone') | |
55 | - <span class="text-xs text-red-600 dark:text-red-400"> | |
56 | - {{ $message }} | |
57 | - </span> | |
58 | - @enderror | |
59 | - </label><br> | |
60 | - | |
61 | - <label class="block text-sm"> | |
62 | 23 | <span class="text-gray-700 dark:text-gray-400">Текст</span> |
63 | 24 | <textarea class="block w-full mt-1 text-sm dark:text-gray-300 dark:border-gray-600 dark:bg-gray-700 form-textarea focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:focus:shadow-outline-gray ckeditor_" name="text" placeholder="Текст (html)" required |
64 | 25 | rows="10">{{ old('text') ?? $education->text ?? '' }}</textarea> |
... | ... | @@ -85,6 +46,47 @@ |
85 | 46 | @endisset |
86 | 47 | </label><br> |
87 | 48 | |
49 | + <hr> | |
50 | + <h5 class="text-gray-700 dark:text-gray-400">Контакты: </h5> | |
51 | + <label class="block text-sm"> | |
52 | + <span class="text-gray-700 dark:text-gray-400">Адрес</span> | |
53 | + <input name="address" id="address" | |
54 | + class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" | |
55 | + placeholder="Адрес" value="{{ old('address') ?? $education->address ?? '' }}" | |
56 | + /> | |
57 | + @error('address') | |
58 | + <span class="text-xs text-red-600 dark:text-red-400"> | |
59 | + {{ $message }} | |
60 | + </span> | |
61 | + @enderror | |
62 | + </label><br> | |
63 | + | |
64 | + <label class="block text-sm"> | |
65 | + <span class="text-gray-700 dark:text-gray-400">Email</span> | |
66 | + <input name="email" id="email" | |
67 | + class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" | |
68 | + placeholder="Email" value="{{ old('email') ?? $education->email ?? '' }}" | |
69 | + /> | |
70 | + @error('email') | |
71 | + <span class="text-xs text-red-600 dark:text-red-400"> | |
72 | + {{ $message }} | |
73 | + </span> | |
74 | + @enderror | |
75 | + </label><br> | |
76 | + | |
77 | + <label class="block text-sm"> | |
78 | + <span class="text-gray-700 dark:text-gray-400">Телефон</span> | |
79 | + <input name="telephone" id="telephone" | |
80 | + class="block w-full mt-1 text-sm dark:border-gray-600 dark:bg-gray-700 focus:border-purple-400 focus:outline-none focus:shadow-outline-purple dark:text-gray-300 dark:focus:shadow-outline-gray form-input" | |
81 | + placeholder="Телефон" value="{{ old('telephone') ?? $education->telephone ?? '' }}" | |
82 | + /> | |
83 | + @error('telephone') | |
84 | + <span class="text-xs text-red-600 dark:text-red-400"> | |
85 | + {{ $message }} | |
86 | + </span> | |
87 | + @enderror | |
88 | + </label><br> | |
89 | + | |
88 | 90 | <div class="flex flex-col flex-wrap mb-4 space-y-4 md:flex-row md:items-end md:space-x-4"> |
89 | 91 | <div> |
90 | 92 | <button type="submit" class="px-3 py-1 text-sm font-medium leading-5 text-white transition-colors duration-150 bg-purple-600 border border-transparent rounded-md active:bg-purple-600 hover:bg-purple-700 focus:outline-none focus:shadow-outline-purple"> |
... | ... | @@ -100,6 +102,7 @@ |
100 | 102 | |
101 | 103 | @isset($education) |
102 | 104 | <hr> |
105 | + <h5 class="text-gray-700 dark:text-gray-400">Специалитеты и категории:</h5> | |
103 | 106 | <form method="GET" action="{{ route('admin.add-program-education') }}"> |
104 | 107 | <label class="block text-sm"> |
105 | 108 | <span class="text-gray-700 dark:text-gray-400">Категория образования</span> |
resources/views/admin/education/index.blade.php
... | ... | @@ -25,7 +25,7 @@ |
25 | 25 | <th class="px-4 py-3">№</th> |
26 | 26 | <th class="px-4 py-3">Название образования</th> |
27 | 27 | <th class="px-4 py-3">Редактировать</th> |
28 | - <th class="px-4 py-3">Дата создания</th> | |
28 | + <th class="px-4 py-3">Дата создан/изменен</th> | |
29 | 29 | </tr> |
30 | 30 | </thead> |
31 | 31 | <tbody class="bg-white divide-y dark:divide-gray-700 dark:bg-gray-800"> |
... | ... | @@ -47,7 +47,14 @@ |
47 | 47 | </form> |
48 | 48 | </td> |
49 | 49 | <td class="px-4 py-3"> |
50 | - {{ date('d.m.Y', strtotime($cat->created_at))}} | |
50 | + <div class="flex items-center text-sm"> | |
51 | + <div> | |
52 | + <p class="font-semibold">{{ date('d.m.Y', strtotime($cat->created_at)) }}</p> | |
53 | + <p class="text-xs text-gray-600 dark:text-gray-400"> | |
54 | + {{ date('d.m.Y', strtotime($cat->updated_at)) }} | |
55 | + </p> | |
56 | + </div> | |
57 | + </div> | |
51 | 58 | </td> |
52 | 59 | </tr> |
53 | 60 | @endforeach |
resources/views/admin/employer/index.blade.php
... | ... | @@ -80,6 +80,40 @@ |
80 | 80 | </p> |
81 | 81 | </div> |
82 | 82 | </div> |
83 | + | |
84 | + <div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"> | |
85 | + <div class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"> | |
86 | + <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> | |
87 | + <path | |
88 | + d="M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"></path> | |
89 | + </svg> | |
90 | + </div> | |
91 | + <div> | |
92 | + <p class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"> | |
93 | + Опубликованых | |
94 | + </p> | |
95 | + <p class="text-lg font-semibold text-gray-700 dark:text-gray-200"> | |
96 | + {{ $all_public }} | |
97 | + </p> | |
98 | + </div> | |
99 | + </div> | |
100 | + | |
101 | + <div class="flex items-center p-4 bg-white rounded-lg shadow-xs dark:bg-gray-800"> | |
102 | + <div class="p-3 mr-4 text-orange-500 bg-orange-100 rounded-full dark:text-orange-100 dark:bg-orange-500"> | |
103 | + <svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20"> | |
104 | + <path | |
105 | + d="M13 6a3 3 0 11-6 0 3 3 0 016 0zM18 8a2 2 0 11-4 0 2 2 0 014 0zM14 15a4 4 0 00-8 0v3h8v-3zM6 8a2 2 0 11-4 0 2 2 0 014 0zM16 18v-3a5.972 5.972 0 00-.75-2.906A3.005 3.005 0 0119 15v3h-3zM4.75 12.094A5.973 5.973 0 004 15v3H1v-3a3 3 0 013.75-2.906z"></path> | |
106 | + </svg> | |
107 | + </div> | |
108 | + <div> | |
109 | + <p class="mb-2 text-sm font-medium text-gray-600 dark:text-gray-400"> | |
110 | + На рассмотрении | |
111 | + </p> | |
112 | + <p class="text-lg font-semibold text-gray-700 dark:text-gray-200"> | |
113 | + {{ $all_status }} | |
114 | + </p> | |
115 | + </div> | |
116 | + </div> | |
83 | 117 | </div> |
84 | 118 | |
85 | 119 | <div class="w-full overflow-hidden rounded-lg shadow-xs" id="ajax_block"> |
... | ... | @@ -90,11 +124,12 @@ |
90 | 124 | class="text-xs font-semibold tracking-wide text-left text-gray-500 uppercase border-b dark:border-gray-700 bg-gray-50 dark:text-gray-400 dark:bg-gray-800" |
91 | 125 | > |
92 | 126 | <th class="px-4 py-3">№</th> |
127 | + <th class="px-4 py-3">ID</th> | |
93 | 128 | <th class="px-4 py-3">Лого</th> |
94 | - <th class="px-4 py-3">Название компании/Email/Тел/Пароль</th> | |
129 | + <th class="px-4 py-3">Компания/Email/Тел/Пароль</th> | |
95 | 130 | <th class="px-4 py-3">Категория</th> |
96 | - <th class="px-4 py-3">Комментарий</th> | |
97 | - <th class="px-4 py-3">Дата регистрации</th> | |
131 | + <th class="px-4 py-3">Коммент.</th> | |
132 | + <th class="px-4 py-3">Дата регист.</th> | |
98 | 133 | <th class="px-4 py-3">Редакт.</th> |
99 | 134 | </tr> |
100 | 135 | </thead> |
... | ... | @@ -105,6 +140,11 @@ |
105 | 140 | {{$user->id}} |
106 | 141 | </td> |
107 | 142 | <td class="px-4 py-3"> |
143 | + @if (isset($user->code_id)) | |
144 | + {{$user->code_id}} | |
145 | + @endif | |
146 | + </td> | |
147 | + <td class="px-4 py-3"> | |
108 | 148 | @if (isset($user->emp_logo) && ($user->emp_logo)) |
109 | 149 | <div class="flex items-center text-sm"> |
110 | 150 | <div |