firstcommit
This commit is contained in:
0
Modules/Client/resources/assets/.gitkeep
Normal file
0
Modules/Client/resources/assets/.gitkeep
Normal file
0
Modules/Client/resources/assets/js/app.js
Normal file
0
Modules/Client/resources/assets/js/app.js
Normal file
0
Modules/Client/resources/assets/sass/app.scss
Normal file
0
Modules/Client/resources/assets/sass/app.scss
Normal file
0
Modules/Client/resources/views/.gitkeep
Normal file
0
Modules/Client/resources/views/.gitkeep
Normal file
55
Modules/Client/resources/views/create.blade.php
Normal file
55
Modules/Client/resources/views/create.blade.php
Normal file
@@ -0,0 +1,55 @@
|
||||
@extends('admin::layouts.master')
|
||||
|
||||
@section('title')
|
||||
Create Client
|
||||
@endsection
|
||||
|
||||
@section('breadcrumb')
|
||||
@php
|
||||
$breadcrumbData = [
|
||||
[
|
||||
'title' => 'Client',
|
||||
'link' => 'null',
|
||||
],
|
||||
[
|
||||
'title' => 'Dashboard',
|
||||
'link' => route('dashboard'),
|
||||
],
|
||||
[
|
||||
'title' => 'Clients',
|
||||
'link' => null,
|
||||
],
|
||||
[
|
||||
'title' => 'Add Client',
|
||||
'link' => null,
|
||||
],
|
||||
];
|
||||
@endphp
|
||||
@include('admin::layouts.partials.breadcrumb', $breadcrumbData)
|
||||
@endsection
|
||||
@section('content')
|
||||
{{-- {!! Form::open([
|
||||
'route' => 'clients.store',
|
||||
'method' => 'POST',
|
||||
'role' => 'form',
|
||||
'files' => true,
|
||||
]) !!} --}}
|
||||
{{-- {!! Form::close() !!} --}}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xxl">
|
||||
<div class="card mb-4">
|
||||
<div class="card-header d-flex align-items-center justify-content-between">
|
||||
<h5 class="mb-0">Add Client</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form
|
||||
action="{{ route('cms.clients.store')}}"
|
||||
method="POST" enctype="multipart/form-data">
|
||||
@csrf
|
||||
@include('client::partial.form')
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
58
Modules/Client/resources/views/edit.blade.php
Normal file
58
Modules/Client/resources/views/edit.blade.php
Normal file
@@ -0,0 +1,58 @@
|
||||
@extends('admin::layouts.master')
|
||||
|
||||
@section('title')
|
||||
Update Client
|
||||
@endsection
|
||||
|
||||
@section('breadcrumb')
|
||||
@php
|
||||
$breadcrumbData = [
|
||||
[
|
||||
'title' => 'Client',
|
||||
'link' => 'null',
|
||||
],
|
||||
[
|
||||
'title' => 'Dashboard',
|
||||
'link' => route('dashboard'),
|
||||
],
|
||||
[
|
||||
'title' => 'Clients',
|
||||
'link' => null,
|
||||
],
|
||||
[
|
||||
'title' => 'Update Client',
|
||||
'link' => null,
|
||||
],
|
||||
];
|
||||
@endphp
|
||||
@include('admin::layouts.partials.breadcrumb', $breadcrumbData)
|
||||
@endsection
|
||||
@section('content')
|
||||
{{-- {!! Form::open([
|
||||
'route' => 'clients.edit',
|
||||
'method' => 'POST',
|
||||
'role' => 'form',
|
||||
'files' => true,
|
||||
|
||||
{{-- {!! Form::close() !!} --}}
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xxl">
|
||||
<div class="card mb-4">
|
||||
<div class="card-header d-flex align-items-center justify-content-between">
|
||||
<h5 class="mb-0">Update Client</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="{{ route('cms.clients.update', ['uuid' => $client->uuid]) }}" method="POST"
|
||||
enctype="multipart/form-data">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
|
||||
@include('client::partial.form')
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
134
Modules/Client/resources/views/index.blade.php
Normal file
134
Modules/Client/resources/views/index.blade.php
Normal file
@@ -0,0 +1,134 @@
|
||||
@extends('admin::layouts.master')
|
||||
|
||||
@section('title')
|
||||
Client
|
||||
@endsection
|
||||
|
||||
@section('breadcrumb')
|
||||
@php
|
||||
$breadcrumbData = [
|
||||
[
|
||||
'title' => 'Client',
|
||||
'link' => 'null',
|
||||
],
|
||||
[
|
||||
'title' => 'Dashboard',
|
||||
'link' => route('dashboard'),
|
||||
],
|
||||
[
|
||||
'title' => 'Clients',
|
||||
'link' => null,
|
||||
],
|
||||
];
|
||||
@endphp
|
||||
@include('admin::layouts.partials.breadcrumb', $breadcrumbData)
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<!-- clients List Table -->
|
||||
<div class="card">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h4 class="card-header">List of Client</h4>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="flex-column flex-md-row">
|
||||
<div class="dt-action-buttons text-end pt-3 px-3">
|
||||
<div class="dt-buttons btn-group flex-wrap">
|
||||
<a href="{{ route('cms.clients.create') }}"
|
||||
class="btn btn-secondary create-new btn-primary d-none d-sm-inline-block text-white">
|
||||
<i class="bx bx-plus me-sm-1"></i>
|
||||
Add New
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-datatable table-responsive">
|
||||
<table class="datatables-users table border-top">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th>S.N</th>
|
||||
<th>Name With Image</th>
|
||||
<th>Created At</th>
|
||||
<th>Status</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody class="table-border-bottom-0">
|
||||
@if(count($clients) > 0)
|
||||
@foreach ($clients ?? [] as $client)
|
||||
<tr>
|
||||
<td>
|
||||
#{{ $loop->iteration }}
|
||||
</td>
|
||||
<td>
|
||||
<div class="d-flex align-items-center me-3">
|
||||
<img src="{{ asset($client->image_path ? 'storage/uploads/' . $client->image_path : 'backend/uploads/images/no-Image.jpg') }}"
|
||||
alt="Image" class="rounded me-3" height="40" width="60" style="object-fit: cover">
|
||||
<div class="card-title mb-0 px-3">
|
||||
<h6 class="mb-0">{{ $client->name }}</h6>
|
||||
<small class="text-muted">{{ Str::limit($client->link, 80) }}</small>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{ $client->created_at->toFormattedDateString() }}
|
||||
</td>
|
||||
<td>
|
||||
<span
|
||||
class="badge bg-label-{{ $client->status == 'active' ? 'success' : 'danger' }}">
|
||||
{{ $client->status }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<div class="dropdown">
|
||||
<button type="button" class="btn p-0 dropdown-toggle hide-arrow"
|
||||
data-bs-toggle="dropdown">
|
||||
<i class="bx bx-dots-vertical-rounded"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item"
|
||||
href="{{ route('cms.clients.edit', ['uuid' => $client->uuid]) }}"><i
|
||||
class="bx bx-edit-alt me-1"></i>
|
||||
Edit</a>
|
||||
|
||||
<form method="POST"
|
||||
action="{{ route('cms.clients.delete', ['uuid' => $client->uuid]) }}"
|
||||
id="deleteForm_{{ $client->uuid }}" class="dropdown-item">
|
||||
@csrf
|
||||
@method('DELETE')
|
||||
<button type="submit" class="border-0 bg-transparent deleteBtn"
|
||||
style="color:inherit"><i class="bx bx-trash me-1"></i> Delete</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@else
|
||||
<tr>
|
||||
<td colspan="6">No record found.</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="px-3">
|
||||
{{ $clients->links('admin::layouts.partials.pagination') }}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
{{-- style --}}
|
||||
@push('required-styles')
|
||||
@include('admin::vendor.dataTables.style')
|
||||
@endpush
|
||||
|
||||
{{-- script --}}
|
||||
@push('required-scripts')
|
||||
@include('admin::vendor.dataTables.script')
|
||||
@endpush
|
29
Modules/Client/resources/views/layouts/master.blade.php
Normal file
29
Modules/Client/resources/views/layouts/master.blade.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
||||
<title>Client Module - {{ config('app.name', 'Laravel') }}</title>
|
||||
|
||||
<meta name="description" content="{{ $description ?? '' }}">
|
||||
<meta name="keywords" content="{{ $keywords ?? '' }}">
|
||||
<meta name="author" content="{{ $author ?? '' }}">
|
||||
|
||||
<!-- Fonts -->
|
||||
<link rel="preconnect" href="https://fonts.bunny.net">
|
||||
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600&display=swap" rel="stylesheet" />
|
||||
|
||||
{{-- Vite CSS --}}
|
||||
{{-- {{ module_vite('build-client', 'resources/assets/sass/app.scss') }} --}}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@yield('content')
|
||||
|
||||
{{-- Vite JS --}}
|
||||
{{-- {{ module_vite('build-client', 'resources/assets/js/app.js') }} --}}
|
||||
</body>
|
75
Modules/Client/resources/views/partial/form.blade.php
Normal file
75
Modules/Client/resources/views/partial/form.blade.php
Normal file
@@ -0,0 +1,75 @@
|
||||
<div>
|
||||
<div class="row mb-4">
|
||||
<div class="card-body">
|
||||
<div class="d-flex align-items-start align-items-sm-center gap-4">
|
||||
<img src="{{ asset(!empty($client->image_path) ? 'storage/uploads/' . $client->image_path : 'backend/uploads/images/no-Image.jpg') }}"
|
||||
alt="client-image input-file" class="d-block rounded show-image" height="100" width="100" />
|
||||
|
||||
<div class="button-wrapper">
|
||||
<label for="upload" class="btn btn-primary me-2 mb-4" tabindex="0">
|
||||
<span class="d-none d-sm-block">Upload</span>
|
||||
<i class="bx bx-upload d-block d-sm-none"></i>
|
||||
<input type="file" id="upload" class="input-file" name="image" hidden
|
||||
accept="image/png, image/jpeg" />
|
||||
</label>
|
||||
<button type="button" class="btn btn-label-secondary image-reset mb-4">
|
||||
<i class="bx bx-reset d-block d-sm-none"></i>
|
||||
<span class="d-none d-sm-block">Reset</span>
|
||||
</button>
|
||||
|
||||
<p class="mb-0">Allowed JPG, GIF or PNG. Max size of 3Mb</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr class="my-0" />
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="mb-3 col-md-6 ">
|
||||
<label class="form-label" for="basic-default-name">Name</label>
|
||||
<input type="text" class="form-control" name="name" value="{{ old('name', $client->name ?? '') }}"
|
||||
placeholder="e.g. Google Drive" required />
|
||||
@error('name')
|
||||
<div class="text-danger">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="mb-3 col-md-6">
|
||||
<label class="form-label" for="basic-default-company">Status</label>
|
||||
<select class="select2 form-select" id="basic-default-company select2Basic"
|
||||
aria-label="Default select example" name="status" required>
|
||||
<option value="active"{{ ($client->status ?? '') == 'active' ? 'selected' : '' }}>Active</option>
|
||||
<option value="inactive"{{ ($client->status ?? '') == 'inactive' ? 'selected' : '' }}>Inactive</option>
|
||||
</select>
|
||||
@error('status')
|
||||
<div class="text-danger">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="mb-3 col-md-12">
|
||||
<label for="exampleFormControlTextarea1" class="form-label">Link</label>
|
||||
<textarea class="form-control" id="exampleFormControlTextarea1" rows="3" name="link"
|
||||
placeholder="e.g:client video link">{{ !empty($client) ? $client->link : '' }}</textarea>
|
||||
@error('link')
|
||||
<div class="text-danger">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
@if (empty($client))
|
||||
Save Client
|
||||
@else
|
||||
Update Client
|
||||
@endif
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@push('required-styles')
|
||||
@include('admin::vendor.select2.style')
|
||||
@endpush
|
||||
|
||||
@push('required-scripts')
|
||||
@include('admin::vendor.select2.script')
|
||||
@endpush
|
Reference in New Issue
Block a user