New-OMIS/Modules/User/resources/views/index.blade.php
2024-04-07 17:59:05 +05:45

64 lines
3.1 KiB
PHP

@extends('layouts.app')
@section('content')
<div class="page-content">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<div class="card">
<div class="card-header d-flex justify-content-between align-users-center">
<h5 class="card-title flex-grow-1 mb-0">User Lists</h5>
<a href="{{ route('user.create') }}" class="btn btn-info btn-sm"><span>Add New</span></a>
</div>
<div class="card-body">
<div class="table-responsive">
<table id="buttons-datatables" class="display table-sm table-bordered table" style="width:100%">
<thead class="">
<tr>
<th class="tb-col"><span class="overline-title">S.N</span></th>
<th class="tb-col"><span class="overline-title">Name</span></th>
<th class="tb-col"><span class="overline-title">Email</span></th>
<th class="tb-col"><span class="overline-title">Employee</span></th>
<th class="tb-col"><span class="overline-title">Role</span></th>
{{-- <th class="tb-col"><span class="overline-title">Branch</span></th> --}}
<th class="tb-col" data-sortable="false"><span class="overline-title">Action</span>
</th>
</tr>
</thead>
<tbody>
@foreach ($data as $index => $user)
<tr data-id="{{ $user->id }}" data-display_order="{{ $user->display_order }}"
class="draggable-row">
<td class="tb-col">{{ $index + 1 }}</td>
<td class="tb-col">{{ $user->name }}</td>
<td class="tb-col">{{ $user->email }}</td>
<td class="tb-col">{{ optional($user->employee)->employee_id }}</td>
<td class="tb-col">{{ $user->roles->first()->id }}</td>
<td class="tb-col">
<div class="hstack flex-wrap gap-3">
<a href="javascript:void(0);" class="link-info fs-15 view-user-btn" data-bs-toggle="modal"
data-bs-target="#viewModal">
<i class="ri-eye-line"></i>
</a>
<a href="{{ route('user.edit', $user->id) }}" class="link-success fs-15 edit-user-btn"><i
class="ri-edit-2-line"></i></a>
<a href="javascript:void(0);" data-link="{{ route('user.destroy', $user->id) }}"
data-id="{{ $user->id }}" class="link-danger fs-15 remove-user-btn"><i
class="ri-delete-bin-line"></i></a>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@include('user::partials.view')
@endsection