Files
2024-06-12 20:31:15 +05:30

262 lines
16 KiB
PHP

@extends('Admin.layouts.master')
@section('content')
@php
$currentPage = 'direct_user';
@endphp
<!--begin::Toolbar-->
<div id="kt_app_toolbar" class="app-toolbar py-3 py-lg-6">
<!--begin::Toolbar container-->
<div id="kt_app_toolbar_container" class="app-container container-xxl d-flex flex-stack">
<!--begin::Page title-->
<!--begin::Title-->
<h1
class="manage-cmp page-heading d-flex text-dark fw-bold fs-3 flex-column justify-content-center my-0">
Direct Registered Users</h1>
<!--end::Title-->
<!--end::Page title-->
<!--begin::Actions-->
<div class="d-flex align-items-center gap-2 gap-lg-3">
<!--begin::Filter menu-->
<div class="m-0">
<!--begin::Menu toggle-->
<a href="#"
class="btn btn-sm btn-flex bg-body btn-color-gray-700 btn-active-color-primary fw-bold"
data-kt-menu-trigger="click" data-kt-menu-placement="bottom-end">
<!--begin::Svg Icon | path: icons/duotune/general/gen031.svg-->
<span class="svg-icon svg-icon-6 svg-icon-muted me-1">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none"
xmlns="http://www.w3.org/2000/svg">
<path
d="M19.0759 3H4.72777C3.95892 3 3.47768 3.83148 3.86067 4.49814L8.56967 12.6949C9.17923 13.7559 9.5 14.9582 9.5 16.1819V19.5072C9.5 20.2189 10.2223 20.7028 10.8805 20.432L13.8805 19.1977C14.2553 19.0435 14.5 18.6783 14.5 18.273V13.8372C14.5 12.8089 14.8171 11.8056 15.408 10.964L19.8943 4.57465C20.3596 3.912 19.8856 3 19.0759 3Z"
fill="currentColor" />
</svg>
</span>
<!--end::Svg Icon-->Filter
</a>
<!--end::Menu toggle-->
<!--begin::Menu 1-->
<div class="menu menu-sub menu-sub-dropdown w-250px w-md-200px"
data-kt-menu="true" id="kt_menu_62cfa3a253c5c">
<!--begin::Form-->
<div class="px-7 py-5">
<!--begin::Input group-->
<div class="new">
<form>
<div class="form-group">
<input type="checkbox" id="one">
<label for="one">Show All Male</label>
</div>
<div class="form-group">
<input type="checkbox" id="two">
<label for="two">Show All Female</label>
</div>
<div class="form-group">
<input type="checkbox" id="three">
<label for="three">OTP Verified</label>
</div>
<div class="range">
<lable>Age Range</lable>
</div>
<div class="form-group">
<input type="checkbox" id="four">
<label for="four">25 - 35</label>
</div>
<div class="form-group">
<input type="checkbox" id="five">
<label for="five">35 - 45</label>
</div>
<div class="form-group">
<input type="checkbox" id="six">
<label for="six">45 - 55</label>
</div>
</form>
</div>
</div>
<!--end::Form-->
</div>
<!--end::Menu 1-->
</div>
<!--end::Filter menu-->
<!--begin::Secondary button-->
<!--end::Secondary button-->
<!--begin::Primary button-->
<!-- <a href="#" class="btn btn-sm fw-bold btn-primary">Export
</a>-->
<!-- <a href="{{ route('import.csv') }}" class="btn btn-sm fw-bold btn-primary" type="file" name="csv_file" accept=".csv">Import
</a>-->
<a href="" data-toggle="modal" data-target="#import_csvfile"
class="btn btn-sm fw-bold btn-primary">Import
</a>
<!-- <input type="file" name="csv_file" accept=".csv">
<button type="submit">Import</button>-->
<!--<form action="{{ route('import.csv') }}" method="POST" enctype="multipart/form-data">
@csrf
<input type="file" name="csv_file" accept=".csv">
<button type="submit">Import</button>
</form>-->
<!--end::Primary button-->
</div>
<!--end::Actions-->
</div>
<!--end::Toolbar container-->
</div>
<!--end::Toolbar-->
<!--<div class="container-xxl active-btn-user">
<div class="active-but">
<div class="active">
<label>Active-500</label>
</div>
<div class="active">
<label>Inactive-100</label>
</div>
</div>
</div>-->
<!--begin::Content-->
<div id="kt_app_content" class="app-content flex-column-fluid">
<!--begin::Content container-->
<div id="kt_app_content_container" class="app-container container-xxl">
<!--begin::Tables Widget 13-->
<div class="card mb-5 mb-xl-8">
<div class="card-body py-3">
<!--begin::Table container-->
<div class="table-responsive">
<!--begin::Table-->
<table id="mng-sings"
class="table table-row-bordered table-row-gray-100 align-middle gs-0 gy-3">
<!--begin::Table head-->
<thead>
<tr class="fw-bold text-muted">
<th class="text-white">Sr. No.</th>
<th class="text-white">Full Name</th>
<th class="text-white">Email Id</th>
<th class="text-white">Contact Number</th>
<th class="text-white">Registered Date</th>
<th class=" text-white text-center">Actions</th>
</tr>
</thead>
<!--end::Table head-->
<!--begin::Table body-->
<tbody>
@foreach($user_data as $user_datas)
<tr>
<td class="fs-6 ">{{ $loop->iteration }}
</td>
<td class="fs-6">
{{ $user_datas['full_name']}}
</td>
<td class=" fs-6 ">{{ $user_datas['email_id']}}
</td>
<td class=" fs-6 ">{{ $user_datas['contact_number'] }}
</td>
<td class="fs-6 ">{{ date('d-m-y', strtotime($user_datas['created_at'])) }}
</td>
<td class="text-center">
<a href="{{ url('/admin/edit_manage_direct_users', $user_datas['id']) }}"
class="btn btn-icon btn-bg-light btn-active-color-primary btn-sm me-1">
<!--begin::Svg Icon | path: icons/duotune/art/art005.svg-->
<span class="svg-icon svg-icon-3">
<svg xmlns="http://www.w3.org/2000/svg" width="16"
height="16" fill="currentColor"
class="bi bi-eye" viewBox="0 0 16 16">
<path
d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z" />
<path
d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z" />
</svg>
</span>
<!--end::Svg Icon-->
</a>
<a href="{{ url('/admin/delete_manage_direct_users', $user_datas['id']) }}" data-toggle="modal" data-target="#delete_opt"
class="btn btn-icon btn-bg-light btn-active-color-red btn-sm ml-1 delete_user" data-id="{{$user_datas['id']}}">
<!--begin::Svg Icon | path: icons/duotune/general/gen027.svg-->
<span class="svg-icon svg-icon-3">
<svg width="24" height="24" viewBox="0 0 24 24"
fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M5 9C5 8.44772 5.44772 8 6 8H18C18.5523 8 19 8.44772 19 9V18C19 19.6569 17.6569 21 16 21H8C6.34315 21 5 19.6569 5 18V9Z"
fill="currentColor" />
<path opacity="0.5"
d="M5 5C5 4.44772 5.44772 4 6 4H18C18.5523 4 19 4.44772 19 5V5C19 5.55228 18.5523 6 18 6H6C5.44772 6 5 5.55228 5 5V5Z"
fill="currentColor" />
<path opacity="0.5"
d="M9 4C9 3.44772 9.44772 3 10 3H14C14.5523 3 15 3.44772 15 4V4H9V4Z"
fill="currentColor" />
</svg>
</span>
<!--end::Svg Icon-->
</a>
</td>
</tr>
@endforeach
</tbody>
<!--end::Table body-->
</table>
<!--end::Table-->
</div>
<!--end::Table container-->
</div>
<!--begin::Body-->
</div>
<!--end::Tables Widget 13-->
</div>
<!--end::Content container-->
</div>
<!--end::Content-->
<!--begin::Delete Modals-->
<div class="modal fade" id="delete_opt" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content Delete_pop">
<div class="modal-body">
<input type="hidden" id="delete_user_id">
<svg style="color: red;margin-bottom: 20px;" xmlns="http://www.w3.org/2000/svg" width="50" height="50" fill="currentColor" class="bi bi-x-circle" viewBox="0 0 16 16"> <path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z" fill="red"></path> <path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z" fill="red"></path> </svg>
<h2>Are you sure?</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor</p>
<div class="modal-footer logout_footer">
<button class="log-close" type="button" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">Cancel</span>
</button>
<a href=""><button type="button" class="btn btn-delete delete_user_button">Delete</button></a>
</div>
</div>
</div>
</div>
</div>
{{-- Add file start here --}}
<div class="modal fade" id="import_csvfile" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content addcate">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Import File</p>
<form id="import_users" enctype="multipart/form-data">
@csrf
<input type="file" name="csv_file" id="import_users" accept=".csv,.txt,.xlsx">
<button type="submit" class = "import">Import</button>
</form>
</div>
</div>
</div>
</div>
{{-- Add file end here --}}
@endsection