firstcommit
This commit is contained in:
0
Modules/Package/resources/views/.gitkeep
Normal file
0
Modules/Package/resources/views/.gitkeep
Normal file
45
Modules/Package/resources/views/create.blade.php
Normal file
45
Modules/Package/resources/views/create.blade.php
Normal file
@@ -0,0 +1,45 @@
|
||||
@extends('admin::layouts.master')
|
||||
|
||||
@section('title')
|
||||
Create Package
|
||||
@endsection
|
||||
|
||||
@section('breadcrumb')
|
||||
@php
|
||||
$breadcrumbData = [
|
||||
[
|
||||
'title' => 'Package',
|
||||
'link' => 'null',
|
||||
],
|
||||
[
|
||||
'title' => 'Dashboard',
|
||||
'link' => route('dashboard'),
|
||||
],
|
||||
[
|
||||
'title' => 'Packages',
|
||||
'link' => null,
|
||||
],
|
||||
[
|
||||
'title' => 'Add Package',
|
||||
'link' => null,
|
||||
],
|
||||
];
|
||||
@endphp
|
||||
@include('admin::layouts.partials.breadcrumb', $breadcrumbData)
|
||||
@endsection
|
||||
@section('content')
|
||||
<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 Package</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="{{ route('cms.packages.store') }}" method="POST" enctype="multipart/form-data">
|
||||
@csrf
|
||||
@include('package::partial.form')
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
49
Modules/Package/resources/views/edit.blade.php
Normal file
49
Modules/Package/resources/views/edit.blade.php
Normal file
@@ -0,0 +1,49 @@
|
||||
@extends('admin::layouts.master')
|
||||
|
||||
@section('title')
|
||||
Update Package
|
||||
@endsection
|
||||
|
||||
@section('breadcrumb')
|
||||
@php
|
||||
$breadcrumbData = [
|
||||
[
|
||||
'title' => 'Package',
|
||||
'link' => 'null',
|
||||
],
|
||||
[
|
||||
'title' => 'Dashboard',
|
||||
'link' => route('dashboard'),
|
||||
],
|
||||
[
|
||||
'title' => 'Packages',
|
||||
'link' => null,
|
||||
],
|
||||
[
|
||||
'title' => 'Update Package',
|
||||
'link' => null,
|
||||
],
|
||||
];
|
||||
@endphp
|
||||
@include('admin::layouts.partials.breadcrumb', $breadcrumbData)
|
||||
@endsection
|
||||
@section('content')
|
||||
<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 Package</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form action="{{ route('cms.packages.update', ['uuid' => $package->uuid]) }}" method="POST"
|
||||
enctype="multipart/form-data">
|
||||
@csrf
|
||||
@method('PUT')
|
||||
|
||||
@include('package::partial.form')
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
137
Modules/Package/resources/views/index.blade.php
Normal file
137
Modules/Package/resources/views/index.blade.php
Normal file
@@ -0,0 +1,137 @@
|
||||
@extends('admin::layouts.master')
|
||||
|
||||
@section('title')
|
||||
Package
|
||||
@endsection
|
||||
|
||||
@section('breadcrumb')
|
||||
@php
|
||||
$breadcrumbData = [
|
||||
[
|
||||
'title' => 'Package',
|
||||
'link' => 'null',
|
||||
],
|
||||
[
|
||||
'title' => 'Dashboard',
|
||||
'link' => route('dashboard'),
|
||||
],
|
||||
[
|
||||
'title' => 'Packages',
|
||||
'link' => null,
|
||||
],
|
||||
];
|
||||
@endphp
|
||||
@include('admin::layouts.partials.breadcrumb', $breadcrumbData)
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<!-- banners List Table -->
|
||||
<div class="card">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<h4 class="card-header">List of Package</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.packages.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>Image</th>
|
||||
<th>Title</th>
|
||||
<th>Country</th>
|
||||
<th>Price</th>
|
||||
<th>Days</th>
|
||||
<th>People</th>
|
||||
<th>Ordering</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody class="table-border-bottom-0">
|
||||
@foreach ($packages ?? [] as $package)
|
||||
<tr>
|
||||
<td>
|
||||
#{{ $loop->iteration }}
|
||||
</td>
|
||||
<td>
|
||||
<img class="object-fit-contain"
|
||||
src="{{ asset($package->image_path ? 'storage/uploads/' . $package->image_path : 'backend/uploads/images/no-Image.jpg') }}"
|
||||
alt="" srcset="" height="70" width="60">
|
||||
</td>
|
||||
<td>
|
||||
{{ $package->title }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $package->country->name }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $package->price }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $package->duration }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $package->group_size }}
|
||||
</td>
|
||||
<td>
|
||||
{{ $package->ordering }}
|
||||
</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.packages.edit', ['uuid' => $package->uuid]) }}"><i
|
||||
class="bx bx-edit-alt me-1"></i>
|
||||
Edit</a>
|
||||
|
||||
|
||||
<form method="POST"
|
||||
action="{{ route('cms.packages.delete', ['uuid' => $package->uuid]) }}"
|
||||
id="deleteForm_{{ $package->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
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="px-3">
|
||||
{{ $packages->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/Package/resources/views/layouts/master.blade.php
Normal file
29
Modules/Package/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>Package 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-package', 'resources/assets/sass/app.scss') }} --}}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@yield('content')
|
||||
|
||||
{{-- Vite JS --}}
|
||||
{{-- {{ module_vite('build-package', 'resources/assets/js/app.js') }} --}}
|
||||
</body>
|
98
Modules/Package/resources/views/partial/form.blade.php
Normal file
98
Modules/Package/resources/views/partial/form.blade.php
Normal file
@@ -0,0 +1,98 @@
|
||||
<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($package->image_path) ? 'storage/uploads/' . $package->image_path : 'backend/uploads/images/no-Image.jpg') }}"
|
||||
alt="package-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">Title</label>
|
||||
<input type="text" class="form-control" name="title" value="{{ old('title', $package->title ?? '') }}"
|
||||
placeholder="e.g. 2 Days Italy Road Trip (Couple)" required />
|
||||
</div>
|
||||
<div class="mb-3 col-md-6">
|
||||
<label class="form-label" for="basic-default-company">Country</label>
|
||||
<select id="select2Basic" class="select2 form-select form-select-lg" name="country_id"
|
||||
data-allow-clear="true">
|
||||
@foreach ($countries ?? [] as $country)
|
||||
<option value="{{ $country->id }}"
|
||||
{{ ($package->country_id ?? '') == $country->id ? 'selected' : '' }}>{{ $country->name }}
|
||||
</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="basic-default-message">Description</label>
|
||||
<textarea name="" id="mainTextarea" class="d-none">{{ !empty($package) ? $package->description : '' }}</textarea>
|
||||
<textarea name="description" class="form-control full-editor" id="editorTextarea" rows='10'
|
||||
placeholder="Algarve’s Benagil Cave beach is one of those extra special ones.
|
||||
The only way in is by kayaking or paddle boating, which obviously adds a more
|
||||
elusive touch to this already amazing place. ....."></textarea>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="mb-3 col-md-6">
|
||||
<label class="form-label" for="basic-default-company">Price</label>
|
||||
<input class="form-control" type="text" name="price" value="{{ old('price', $package->price ?? '') }}"
|
||||
placeholder="e.g. 25000.00" required />
|
||||
</div>
|
||||
<div class="mb-3 col-md-6">
|
||||
<label class="form-label" for="basic-default-company">Ordering</label>
|
||||
<input class="form-control" type="number" name="ordering"
|
||||
value="{{ old('ordering', $package->ordering ?? '') }}" placeholder="e.g. 2" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="mb-3 col-md-6">
|
||||
<label class="form-label" for="basic-default-company">Duration</label>
|
||||
<input class="form-control" type="text" name="duration"
|
||||
value="{{ old('duration', $package->duration ?? '') }}" placeholder="e.g. 10" required />
|
||||
</div>
|
||||
<div class="mb-3 col-md-6">
|
||||
<label class="form-label" for="basic-default-company">Group Size</label>
|
||||
<input class="form-control" type="number" name="group_size"
|
||||
value="{{ old('group_size', $package->group_size ?? '') }}" placeholder="e.g. 10" required />
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<button type="submit" class="btn btn-primary">
|
||||
@if (empty($package))
|
||||
Save Package
|
||||
@else
|
||||
Update Package
|
||||
@endif
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@push('required-styles')
|
||||
@include('admin::vendor.full_editor.style')
|
||||
@include('admin::vendor.select2.style')
|
||||
@endpush
|
||||
|
||||
@push('required-scripts')
|
||||
@include('admin::vendor.textareaContentDisplay.script')
|
||||
@include('admin::vendor.full_editor.script')
|
||||
@include('admin::vendor.select2.script')
|
||||
@endpush
|
Reference in New Issue
Block a user