feat: Remove the entire frontend customer portal and its associated controllers, while updating customer repositories and adding a cache table migration.
This commit is contained in:
@@ -7,20 +7,12 @@
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
{{--First name--}}
|
||||
{{--Fullname--}}
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4" for="firstname">First Name</label>
|
||||
<label class="col-md-4" for="fullname">Fullname</label>
|
||||
<div class="col-md-8">
|
||||
<input type="text" id="firstname" name="firstname" placeholder="First Name"
|
||||
value="{{ old('firstname') }}" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
{{--Last name--}}
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4" for="lastname">Last Name</label>
|
||||
<div class="col-md-8">
|
||||
<input type="text" id="lastname" name="lastname" placeholder="Last Name"
|
||||
value="{{ old('lastname') }}" class="form-control">
|
||||
<input type="text" id="fullname" name="fullname" placeholder="Fullname"
|
||||
value="{{ old('fullname') }}" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
{{--Company--}}
|
||||
|
||||
@@ -1,111 +1,38 @@
|
||||
@extends("administrator.layout.master")
|
||||
@section("content")
|
||||
@if(auth()->guard('admins')->user()->can("manager customer"))
|
||||
<div class="card card-primary card-outline">
|
||||
<div class="card-header">
|
||||
<form action="{{ route('customer.index') }}" method="get">
|
||||
<div class="row form-group mb-0">
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label for="inputName">
|
||||
Client/Company Name </label>
|
||||
<input type="text" name="name" id="inputName" class="form-control" value="{{ request()->name ?? "" }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label for="inputEmail">
|
||||
Email Address</label>
|
||||
<input type="email" name="email" id="inputEmail" class="form-control" value="{{ request()->email ?? "" }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label for="inputPhone">
|
||||
Phone Number</label>
|
||||
<input type="text" name="phone" id="inputPhone" class="form-control" value="{{ request()->phone ?? "" }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<div class="form-group">
|
||||
<label for="inputStatus">
|
||||
Status</label>
|
||||
<select name="status" class="form-control" id="inputStatus">
|
||||
<option value="full" @selected(request()->status === "full")>Any</option>
|
||||
<option value="active" @selected(request()->status === "active")>Active</option>
|
||||
<option value="de_active" @selected(request()->status === "de_active")>In Active</option>
|
||||
<option value="closed" @selected(request()->status === "closed")>Closed</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col">
|
||||
<label class="clear-search hidden">
|
||||
@extends('administrator.layout.master')
|
||||
@push('plugin-styles')
|
||||
@foreach (config('assets.datatable.css') as $datatable)
|
||||
<link href="{{ asset($datatable) }}" rel="stylesheet" />
|
||||
@endforeach
|
||||
@endpush
|
||||
|
||||
</label>
|
||||
<button type="submit" class="form-control btn btn-block bg-gradient-primary">
|
||||
<i class="fas fa-search"></i> Search
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<span>{{ $customers->count() }} Records Found</span>
|
||||
</div>
|
||||
@section('breadcrumb')
|
||||
@php
|
||||
$breadcrumbItems = [
|
||||
['label' => 'Customers', 'active' => true],
|
||||
];
|
||||
@endphp
|
||||
<x-admin-breadcrumb :items="$breadcrumbItems" />
|
||||
@endsection
|
||||
|
||||
<div class="card-body">
|
||||
<table class="table table-invoice table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 10px">
|
||||
<label for=""></label><input type="checkbox" name="check" class="check-all" id="">
|
||||
</th>
|
||||
<th>First Name</th>
|
||||
<th>Last Name</th>
|
||||
<th>Company</th>
|
||||
<th>Email Address</th>
|
||||
<th style="width: 40px">Services</th>
|
||||
<th style="width: 40px">Created</th>
|
||||
<th style="width: 40px">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if($customers->count())
|
||||
@foreach($customers->all() as $item)
|
||||
<tr>
|
||||
<td>
|
||||
<input type="checkbox" name="id[]" id="" value="{{ $item->id }}">
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ route("customer.info",['userid' => $item->id]) }}"
|
||||
title="View Profile"> {{ $item->firstname }}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{ $item->lastname }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $item->company }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $item->email }}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{!! Helpers::get_count_service($item) !!}
|
||||
</td>
|
||||
<td>
|
||||
@time($item->created_at)
|
||||
</td>
|
||||
<td>
|
||||
{!! $item->getStatus() !!}
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
@section('content')
|
||||
@if (auth()->guard('admins')->user()->can('manager customer'))
|
||||
<div class="card card-primary card-outline rounded-3 border-primary-subtle">
|
||||
<div class="card-header d-flex justify-content-end gap-2">
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<x-datatable id="customerTable" ajax="{{ route('customer.datatable') }}" :columns="[
|
||||
['key' => 'fullname', 'label' => 'Fullname'],
|
||||
['key' => 'company', 'label' => 'Company'],
|
||||
['key' => 'email', 'label' => 'Email'],
|
||||
['key' => 'hosting_count', 'label' => 'Hosting'],
|
||||
['key' => 'vps_count', 'label' => 'VPS'],
|
||||
['key' => 'domain_count', 'label' => 'Domain'],
|
||||
['key' => 'created_at', 'label' => 'Created'],
|
||||
['key' => 'status', 'label' => 'Status'],
|
||||
['key' => 'action', 'label' => 'Action'],
|
||||
]" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
{{ $customers->withQueryString()->links() }}
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="alert alert-danger alert-dismissible">
|
||||
<h5 class="mb-0"><i class="icon fas fa-ban"></i> Access Denied - You are not assigned to any Customer
|
||||
@@ -113,3 +40,9 @@
|
||||
</div>
|
||||
@endif
|
||||
@endsection
|
||||
|
||||
@push('plugin-scripts')
|
||||
@foreach (config('assets.datatable.js') as $datatable)
|
||||
<script src="{{ asset($datatable) }}"></script>
|
||||
@endforeach
|
||||
@endpush
|
||||
@@ -17,13 +17,8 @@
|
||||
<table class="table table-borderless table-sm">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">First Name</th>
|
||||
<td>{{ $customer->firstname }}</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Last Name</th>
|
||||
<td>{{ $customer->lastname }}</td>
|
||||
<th scope="row">Fullname</th>
|
||||
<td>{{ $customer->fullname }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">Company</th>
|
||||
|
||||
@@ -11,20 +11,12 @@
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
{{--First name--}}
|
||||
{{--Fullname--}}
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4" for="firstname">First Name</label>
|
||||
<label class="col-md-4" for="fullname">Fullname</label>
|
||||
<div class="col-md-8">
|
||||
<input type="text" id="firstname" name="firstname" placeholder="First Name"
|
||||
value="{{ $customer->firstname }}" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
{{--Last name--}}
|
||||
<div class="form-group row">
|
||||
<label class="col-md-4" for="lastname">Last Name</label>
|
||||
<div class="col-md-8">
|
||||
<input type="text" id="lastname" name="lastname" placeholder="Last Name"
|
||||
value="{{ $customer->lastname }}" class="form-control">
|
||||
<input type="text" id="fullname" name="fullname" placeholder="Fullname"
|
||||
value="{{ $customer->fullname }}" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
{{--Company--}}
|
||||
|
||||
Reference in New Issue
Block a user