File: /var/www/html/fieldsblaze-heroku/resources/views/admin/all-profile.blade.php
@extends('admin.include.master')
@section('content')
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<div class="container-fluid">
<div class="row mb-2">
<div class="col-sm-6">
<h1>All Profiles</h1>
</div>
<div class="col-sm-6 text-right">
<button type="button" class="btn btn-sm btn-outline-info mx-1" data-toggle="modal" data-target="#addRoleProfile" onclick="getModuleList()">
Add New
</button>
</div>
</div>
</div><!-- /.container-fluid -->
</section>
<!-- Main content -->
<section class="content">
<div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-header">
<!-- <h3 class="card-title">Manage Profile</h3> -->
<a href="{{ ('all-profile') }}" class="btn btn-info btn-sm card-title px-2 mx-1">All <span
class="badge badge-light">{{ $UserProfile->count() }}</span></a>
<a href="{{ ('active-profile') }}" class="btn btn-default btn-sm card-title px-2 mx-1">Active <span class="badge badge-info">{{ $ActiveUserProfile->count() }}</span></a>
<a href="{{ ('inactive-profile') }}" class="btn btn-default btn-sm card-title px-2 mx-1">In-Active <span class="badge badge-info">{{ $InActiveUserProfile->count() }}</span></a>
<a href="{{ ('trash-profile') }}" class="btn btn-default btn-sm card-title px-2 mx-1">Deleted <span class="badge badge-info">{{ $TrashUserProfile->count() }}</span></a>
<!-- <div class="text-right">
<button style="float:right; display:none" type="submit"
class="btn btn-sm btn-outline-info mx-1" id="btn-submit"
value="Delete Selected">Delete Selected</button>
</div> -->
</div>
<!-- /.card-header -->
<div class="card-body">
<table id="userTable" class="table table-bordered table-striped table-sm">
<thead>
<tr>
<th>S.N.</th>
<th>Profile Title</th>
<th>Expense Rate/Km.</th>
<th>Status</th>
<th>Created at</th>
<th>Updated at</th>
<th>Action</th>
</tr>
</thead>
<tbody>
@foreach ($UserProfile as $profile)
<tr>
<td>{{ $loop->iteration }}</td>
<td><a href="javascript:void(0);" onclick="viewProfileRecord('{{ $profile->ProfileId }}')">{{ $profile->ProfileName }}</a></td>
<td>₹{{ $profile->ExpenseAmount }}</td>
<td>@if ($profile->Status == "1")
<button class="btn btn-success bg-success btn-xs" data-id="{{ $profile->ProfileId }}"
onclick="deActivateProfile('{{ $profile->ProfileId }}');" data-toggle="tooltip"
data-placement="top" data-original-title="Click to De-Activate">Active</button>
@else
<button class="btn btn-danger btn-xs" data-id="{{ $profile->ProfileId }}"
onclick="activateProfile('{{ $profile->ProfileId }}');" data-toggle="tooltip"
data-placement="top" data-original-title="Click to Activate">In-Active</button>
@endif
</td>
<td>{{ $profile->Created_by }}, {{ date('d-M-y h:i:s a', strtotime($profile->Created_at)) }}</td>
<td>{{ $profile->Updated_by }}, {{ date('d-M-y h:i:s a', strtotime($profile->Updated_at)) }}</td>
<!-- <td class="text-center py-0 align-middle" width="10%">
<div class="btn-group btn-group-sm">
<button type="button" class="btn btn-info" title="Edit"
onclick="editProfileRecord('{{ $profile->ProfileId }}')" data-id="{{ $profile->ProfileId }}"><i class="fas fa-edit"></i></button>
<button type="button" class="btn btn-danger" title="Delete"
onclick="deleteProfile('{{ $profile->ProfileId }}')" data-id="{{ $profile->ProfileId }}"><i class="fas fa-user-times"></i></button>
</div>
</td> -->
<td>
<div class="btn-group">
<button type="button" class="btn btn-default btn-sm dropdown-toggle dropdown-icon"
data-toggle="dropdown" aria-expanded="false">
</button>
<div class="dropdown-menu dropdown-menu-right" role="menu">
<button type="button" class="dropdown-item btn btn-default" data-id="{{ $profile->ProfileId }}"
onclick="editProfileRecord('{{ $profile->ProfileId }}')" data-id="{{ $profile->ProfileId }}">Edit</button>
<button type="button" class="dropdown-item btn btn-default" onclick="deleteProfile('{{ $profile->ProfileId }}')" data-id="{{ $profile->ProfileId }}">Delete</button>
</div>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<!-- /.card-body -->
</div>
<!-- /.card -->
</div>
<!-- /.col -->
</div>
<!-- /.row -->
</div>
<!-- /.container-fluid -->
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
<x-UserProfileModal />
@endsection