New-OMIS/Modules/User/resources/views/index.blade.php

74 lines
3.7 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-items-center">
<h4>{{ label('Users List') }}</h4>
<a href="{{ route('user.create') }}" class="btn btn-info"><span>{{ label('Create 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">{{ label('Sn.') }}</span></th>
<th class="tb-col"><span class="overline-title">{{ label('Name') }}</span></th>
<th class="tb-col"><span class="overline-title">{{ label('Email') }}</span></th>
<th class="tb-col"><span class="overline-title">{{ label('User Name') }}</span></th>
<th class="tb-col"><span class="overline-title">{{ label('Role') }}</span></th>
<th class="tb-col"><span class="overline-title">{{ label('Branch') }}</span></th>
<th class="tb-col"><span class="overline-title">{{ label('Employee') }}</span></th>
<th class="tb-col" data-sortable="false"><span class="overline-title">{{ label('Action') }}</span>
</th>
</tr>
</thead>
<tbody>
@php
$i = 1;
@endphp
@foreach ($data as $item)
<tr data-id="{{ $item->id }}" data-display_order="{{ $item->display_order }}"
class="draggable-row">
<td class="tb-col">{{ $i++ }}</td>
<td class="tb-col">{{ $item->name }}</td>
<td class="tb-col">{{ $item->email }}</td>
<td class="tb-col">{{ $item->username }}</td>
<td class="tb-col">{!! getFieldData('tbl_roles', 'title', 'role_id', $item->roles_id) !!}
<td class="tb-col">{!! getFieldData('tbl_branches', 'title', 'branch_id', $item->branches_id) !!}
<td class="tb-col">{!! getFieldData('tbl_employees', 'title', 'employee_id', $item->employees_id) !!}
</td>
<td class="tb-col">
<div class="hstack flex-wrap gap-3">
<a href="javascript:void(0);" class="link-info fs-15 view-item-btn" data-bs-toggle="modal"
data-bs-target="#viewModal">
<i class="ri-eye-line"></i>
</a>
<a href="{{ route('user.edit', $item->id) }}" class="link-success fs-15 edit-item-btn"><i
class="ri-edit-2-line"></i></a>
<a href="javascript:void(0);" data-link="{{ route('user.destroy', $item->id) }}"
data-id="{{ $item->id }}" class="link-danger fs-15 remove-item-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