dyjh 6 lat temu
rodzic
commit
6f0ac48ede

+ 1 - 0
app/Http/Controllers/Admin/Album/AgentController.php

xqd
@@ -53,6 +53,7 @@ class AgentController extends Controller
             }
             $user = AlbumUserModel::where('id', $item->user_id)->first();
             $item->nickname = $user->username;
+            $item->role = $user->role;
         }
         return view('admin.album.agent.index',compact('list'));
     }

+ 5 - 0
resources/views/admin/album/agent/index.blade.php

xqd
@@ -69,6 +69,11 @@
 										@if(role('Album/Agent/view'))
 												<a href="{{ U('Album/Product/Price/index',['id'=>$item->id])}}" class="btn btn-sm btn-primary pull-right">查看报价</a>
 										@endif
+										@if($item->role !== 4)
+											<button onclick="window.location.href='{{ U('Album/User/role',['id'=>$item->id,'role'=>4]) }}'"
+													class="btn btn-waring">设为Boss
+											</button>
+										@endif
 									</div>
 								</td>
 							</tr>

+ 1 - 1
resources/views/admin/album/user/index.blade.php

xqd
@@ -59,7 +59,7 @@
                                         <td>{{ $item->created_at }}</td>
                                         <td>{{ $item->role() }}</td>
                                         <td>
-                                            @if(!$item->is_dealer && $item['model']==1)
+                                            @if($item->is_dealer != 1)
                                                 <button onclick="window.location.href='{{ U('Album/User/update',['id'=>$item->id]) }}'"
                                                         class="btn btn-warning">设为经销商
                                                 </button>