firstcommit
This commit is contained in:
0
Modules/Transformation/resources/assets/.gitkeep
Normal file
0
Modules/Transformation/resources/assets/.gitkeep
Normal file
0
Modules/Transformation/resources/assets/js/app.js
Normal file
0
Modules/Transformation/resources/assets/js/app.js
Normal file
0
Modules/Transformation/resources/views/.gitkeep
Normal file
0
Modules/Transformation/resources/views/.gitkeep
Normal file
38
Modules/Transformation/resources/views/create.blade.php
Normal file
38
Modules/Transformation/resources/views/create.blade.php
Normal file
@@ -0,0 +1,38 @@
|
||||
@extends('admin::layouts.master')
|
||||
|
||||
@section('title')
|
||||
Create Transformation
|
||||
@endsection
|
||||
|
||||
@section('breadcrumb')
|
||||
@php
|
||||
$breadcrumbData = [
|
||||
[
|
||||
'title' => 'Create',
|
||||
'link' => 'null',
|
||||
],
|
||||
[
|
||||
'title' => 'Dashboard',
|
||||
'link' => route('dashboard'),
|
||||
],
|
||||
[
|
||||
'title' => 'Transformations',
|
||||
'link' => route('transformation.index'),
|
||||
],
|
||||
[
|
||||
'title' => 'Create',
|
||||
'link' => null,
|
||||
],
|
||||
];
|
||||
@endphp
|
||||
@include('admin::layouts.partials.breadcrumb', $breadcrumbData)
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
|
||||
<form action="{{ route('transformation.store') }}" method="POST" enctype="multipart/form-data">
|
||||
@csrf
|
||||
@include('transformation::partial.form')
|
||||
</form>
|
||||
|
||||
@endsection
|
39
Modules/Transformation/resources/views/edit.blade.php
Normal file
39
Modules/Transformation/resources/views/edit.blade.php
Normal file
@@ -0,0 +1,39 @@
|
||||
@extends('admin::layouts.master')
|
||||
|
||||
@section('title')
|
||||
Update Transformation
|
||||
@endsection
|
||||
|
||||
@section('breadcrumb')
|
||||
@php
|
||||
$breadcrumbData = [
|
||||
[
|
||||
'title' => 'Transformation',
|
||||
'link' => 'null',
|
||||
],
|
||||
[
|
||||
'title' => 'Dashboard',
|
||||
'link' => route('dashboard'),
|
||||
],
|
||||
[
|
||||
'title' => 'Transformations',
|
||||
'link' => route('transformation.index'),
|
||||
],
|
||||
[
|
||||
'title' => 'Update',
|
||||
'link' => null,
|
||||
],
|
||||
];
|
||||
@endphp
|
||||
@include('admin::layouts.partials.breadcrumb', $breadcrumbData)
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
|
||||
<form action="{{ route('transformation.update', ['id' => $transformation->id]) }}" method="POST" enctype="multipart/form-data">
|
||||
@csrf
|
||||
@method('put')
|
||||
@include('transformation::partial.form', $transformation)
|
||||
</form>
|
||||
|
||||
@endsection
|
120
Modules/Transformation/resources/views/index.blade.php
Normal file
120
Modules/Transformation/resources/views/index.blade.php
Normal file
@@ -0,0 +1,120 @@
|
||||
@extends('admin::layouts.master')
|
||||
|
||||
@section('title')
|
||||
Transformations
|
||||
@endsection
|
||||
|
||||
@section('breadcrumb')
|
||||
@php
|
||||
$breadcrumbData = [
|
||||
[
|
||||
'title' => 'Transformations',
|
||||
'link' => 'null',
|
||||
],
|
||||
[
|
||||
'title' => 'Dashboard',
|
||||
'link' => route('dashboard'),
|
||||
],
|
||||
[
|
||||
'title' => 'Transformations',
|
||||
'link' => null,
|
||||
],
|
||||
];
|
||||
@endphp
|
||||
@include('admin::layouts.partials.breadcrumb', $breadcrumbData)
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
|
||||
<div class="card">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h4 class="card-header">List of Transformation</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('transformation.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 table-hover border-top">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th>S.N</th>
|
||||
<th>Title With Image</th>
|
||||
<th>Hair Loss Grade</th>
|
||||
<th>No. of Grafts</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="table-border-bottom-0">
|
||||
@if(count($transformations) > 0)
|
||||
@foreach ($transformations ?? [] as $transformation)
|
||||
<tr>
|
||||
<td>
|
||||
#{{ $loop->iteration }}
|
||||
</td>
|
||||
<td>
|
||||
<div class="d-flex align-items-center me-3">
|
||||
<img src="{{ $transformation->beforeImage }}" alt="Image" class="rounded-circle me-3" height="40" width="40" style="object-fit: cover">
|
||||
<img src="{{ $transformation->afterImage }}" alt="Image" class="rounded-circle me-3" height="40" width="40" style="object-fit: cover">
|
||||
<div class="card-title mb-0">
|
||||
<h6 class="mb-0">{{ $transformation->name }}</h6>
|
||||
<small class="text-muted">{{ Str::limit('Patient', 80) }}</small>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
{{ $transformation->grade }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $transformation->graft }}
|
||||
</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('transformation.edit', ['id' => $transformation->id]) }}"><i
|
||||
class="bx bx-edit-alt me-1"></i>
|
||||
Edit</a>
|
||||
<form method="POST"
|
||||
action="{{ route('transformation.delete', ['id' => $transformation->id]) }}"
|
||||
id="deleteForm_{{ $transformation->id }}" 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="5">No records found.</td>
|
||||
</tr>
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="px-3">
|
||||
{{ $transformations->links('admin::layouts.partials.pagination') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endsection
|
@@ -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>Transformation 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-transformation', 'resources/assets/sass/app.scss') }} --}}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@yield('content')
|
||||
|
||||
{{-- Vite JS --}}
|
||||
{{-- {{ module_vite('build-transformation', 'resources/assets/js/app.js') }} --}}
|
||||
</body>
|
@@ -0,0 +1,98 @@
|
||||
@push('required-styles')
|
||||
@include('admin::vendor.select2.style')
|
||||
@endpush
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h6 class="fw-normal">1. Basic Details</h6>
|
||||
<hr class="mt-0">
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="d-flex align-items-start align-items-sm-center gap-4">
|
||||
<img src="{{ isset($transformation->before) ? $transformation->beforeImage : asset('backend/uploads/images/no-Image.jpg') }}"
|
||||
alt="destination-image input-file" class="d-block rounded show-image" height="100"
|
||||
width="100" />
|
||||
<div class="button-wrapper">
|
||||
<label for="upload" class="btn btn-primary btn-sm me-2 mb-4" tabindex="0">
|
||||
<span class="d-none d-sm-block">Upload Before Image</span>
|
||||
<i class="bx bx-upload d-block d-sm-none"></i>
|
||||
<input type="file" id="upload" class="input-file" name="before" hidden
|
||||
accept="image/png, image/jpeg" />
|
||||
</label>
|
||||
<button type="button" class="btn btn-label-secondary btn-sm 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>
|
||||
<div class="col-md-6">
|
||||
<div class="d-flex align-items-start align-items-sm-center gap-4">
|
||||
<img src="{{ asset(!empty($transformation->after) ? $transformation->afterImage : 'backend/uploads/images/no-Image.jpg') }}"
|
||||
alt="site-image input-file" class="d-block rounded show-secondary" height="100"
|
||||
width="100" />
|
||||
<div class="button-wrapper">
|
||||
<label for="uploadSecondary" class="btn btn-primary btn-sm me-2 mb-4" tabindex="0">
|
||||
<span class="d-none d-sm-block">Upload After Image</span>
|
||||
<i class="bx bx-upload d-block d-sm-none"></i>
|
||||
<input type="file" id="uploadSecondary" class="input-secondary" name="after"
|
||||
hidden accept="image/png, image/jpeg" />
|
||||
</label>
|
||||
<button type="button" class="btn btn-label-secondary btn-sm secondary-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>
|
||||
</div>
|
||||
<hr class="mt-2" />
|
||||
</div>
|
||||
<div class="col-md-12 mb-3">
|
||||
<label class="form-label">Title <span class="text-danger">*</span></label>
|
||||
<input type="text" class="form-control" name="name"
|
||||
value="{{ old('name', $transformation->name ?? '') }}" placeholder="e.g. John Doe" />
|
||||
@error('name')
|
||||
<div class="text-danger">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<label class="form-label">Hair Loss Grade</label>
|
||||
<input type="text" class="form-control" name="grade"
|
||||
value="{{ old('grade', $transformation->grade ?? '') }}" placeholder="e.g. 03" />
|
||||
@error('grade')
|
||||
<div class="text-danger">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="col-md-6 mb-3">
|
||||
<label class="form-label">Number of Grafts</label>
|
||||
<input type="text" class="form-control" name="graft"
|
||||
value="{{ old('graft', $transformation->graft ?? '') }}" placeholder="e.g. 2,500" />
|
||||
@error('graft')
|
||||
<div class="text-danger">{{ $message }}</div>
|
||||
@enderror
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<button type="submit" class="btn btn-primary">
|
||||
@if (empty($transformation))
|
||||
Save
|
||||
@else
|
||||
Save Changes
|
||||
@endif
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@push('required-scripts')
|
||||
@include('admin::vendor.select2.script')
|
||||
@include('admin::vendor.tinymce.script')
|
||||
@endpush
|
Reference in New Issue
Block a user