Merge pull request #5 from WDI-Ideas/sayaliP

Sayali p
This commit is contained in:
CodewithSayali
2024-05-24 17:51:48 +05:30
committed by GitHub
17 changed files with 2205 additions and 364 deletions

View File

@@ -12,4 +12,22 @@ class AboutUsController extends Controller
return view('Admin.pages.manage_cms.manage_aboutus.manage_aboutsus');
}
public function edit($id)
{
try {
$edit_service = Aboutus::find($id)->toArray();
$about_us_cat = AboutUsCategory::all()->toArray();
$edit_service['thumbnail_image'] = ListingImageUrl('about_images', $edit_service['thumbnail_image']);
return view('admin.pages.manage_cms.manage_about_us_edit', compact('edit_service', 'about_us_cat'));
} catch (Exception $e) {
Log::error("edit voucher Page Load Failed " . $e->getMessage());
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
}

View File

@@ -1,15 +1,247 @@
<?php
namespace App\Http\Controllers\Admin;
use Illuminate\Support\Facades\DB;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\NewsArticleCategory;
use App\Models\NewsArticle;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Log;
use Illuminate\Validation\Rule;
use Exception;
use Validator;
class ManageNewsAndArticlesController extends Controller
{
public function index(){
return view('Admin.pages.manage_cms.manage_new.manage_news');
public function index()
{
try {
$news_article = NewsArticle::with('category')->latest()->get()->toArray();
return view('Admin.pages.manage_cms.manage_new.manage_news', compact('news_article'));
} catch (Exception $e) {
Log::error("Manage Article Page Not Load: " . $e->getMessage());
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
public function change_news_article_Status(Request $request)
{
try {
$status = NewsArticle::find($request->program_id);
if (!$status) {
return response()->json(['error' => 'Aboutus entry not found.'], 404);
}
$status->is_active = $request->status;
$status->save();
return response()->json(['success' => 'Status change successfully.']);
} catch (\Exception $e) {
// Log the exception or handle it in a way that makes sense for your application
return response()->json(['error' => 'An error occurred while changing the status.'], 500);
}
}
public function edit($id)
{
try {
$news_article_data = NewsArticle::find($id);
$news_categories = NewsArticleCategory::all()->toArray();
return view('Admin.pages.manage_cms.manage_new.manage_news_edit', compact('news_article_data','news_categories'));
} catch (\Exception $e) {
// Handle the exception, you can log it or return an error response
return response()->json(['success' => false, 'error' => $e->getMessage(), 'status' => 500]);
}
}
// public function update(Request $request)
// {
// try {
// $update_news_article = NewsArticle::find($request->article_id);
// $update_news_article->name = $request->input('article_name');
// // dd( $update_news_article->name);
// $update_news_article->description = $request->input('article_dis');
// // dd($update_news_article->description);
// // if ($request->hasFile('article_image')) {
// // if ($update_news_article->image) {
// // Storage::disk('public')->delete($update_news_article->image);
// // }
// // $uploadedFile = $request->file('article_image');
// // $extension = $uploadedFile->getClientOriginalExtension();
// // $filename = date('YmdHi') . '_' . str_replace(' ', '', $uploadedFile->getClientOriginalName());
// // $path = $uploadedFile->storeAs('uploads/news_article', $filename, 'public');
// // $update_news_article->image = $path;
// // }
// if ($request->hasFile('article_thmb')) {
// if ($update_news_article->image) {
// Storage::disk('public')->delete($update_news_article->thumbnail_image);
// }
// $uploadedFile = $request->file('article_thmb');
// $extension = $uploadedFile->getClientOriginalExtension();
// $filename = date('YmdHi') . '_' . str_replace(' ', '', $uploadedFile->getClientOriginalName());
// $path = $uploadedFile->storeAs('uploads/news_article_thumb', $filename, 'public');
// $update_news_article->thumbnail_image = $path;
// }
// $update_news_article->save();
// // dd( $update_news_article);
// return response()->json(['success' => true,'status'=>200]);
// } catch (\Exception $e) {
// return response()->json(['success' => false, 'error' => $e->getMessage(), 'status' => 500]);
// }
// }
public function update(Request $request)
{
try {
$update_news_article = NewsArticle::find($request->article_id);
$update_news_article->name = $request->input('article_name');
$update_news_article->description = $request->input('article_dis');
if ($request->hasFile('article_thmb')) {
if ($update_news_article->image) {
Storage::disk('public')->delete($update_news_article->thumbnail_image);
}
$uploadedFile = $request->file('article_thmb');
$extension = $uploadedFile->getClientOriginalExtension();
$filename = date('YmdHi') . '_' . str_replace(' ', '', $uploadedFile->getClientOriginalName());
$path = $uploadedFile->storeAs('uploads/news_article_thumb', $filename, 'public');
$update_news_article->thumbnail_image = $path;
}
$update_news_article->save();
return response()->json(['success' => true, 'status' => 200]);
} catch (\Exception $e) {
return response()->json(['success' => false, 'error' => $e->getMessage(), 'status' => 500]);
}
}
public function delete_newsarticle($id)
{
try {
$blog = NewsArticle::find($id);
if (!$blog) {
return response()->json(['error' => 'Aboutus entry not found.'], 404);
}
$blog->delete();
return response()->json(['success' => 'Aboutus entry deleted successfully.']);
} catch (\Exception $e) {
// Log the exception or handle it in a way that makes sense for your application
return response()->json(['error' => 'An error occurred while deleting the Aboutus entry.'], 500);
}
}
public function add()
{
$news_categories = NewsArticleCategory::all()->toArray();
return view('Admin.pages.manage_cms.manage_new.manage_news_add', compact('news_categories'));
}
// public function insert(Request $request)
// {
// try {
// $blog = new NewsArticle;
// $blog->name = $request->input('article_name');
// $blog->description = $request->input('article_des');
// $blog->news_articles_category_xid = $request->input('category');
// // if ($request->hasFile('article_image')) {
// // $uploadedFile = $request->file('article_image');
// // $extension = $uploadedFile->getClientOriginalExtension();
// // $filename = date('YmdHi') . '_' . str_replace(' ', '', $uploadedFile->getClientOriginalName());
// // // Move the uploaded file to the storage folder
// // $path = $uploadedFile->storeAs('uploads/news_article', $filename, 'public');
// // // Store the file path in the database
// // $blog->image = $path;
// // }
// // upload blog single image
// if ($request->hasFile('article_thmb')) {
// $uploadedFile = $request->file('article_thmb');
// $extension = $uploadedFile->getClientOriginalExtension();
// $filename = date('YmdHi') . '_' . str_replace(' ', '', $uploadedFile->getClientOriginalName());
// $path = $uploadedFile->storeAs('uploads/news_article_thumb', $filename, 'public');
// $blog->thumbnail_image = $path;
// }
// $blog->save();
// return response()->json(['success' => true,'status'=>200]);
// } catch (\Exception $e) {
// // Handle the exception, you can log it or return an error response
// return response()->json(['success' => false, 'error' => $e->getMessage(), 'status' => 500]);
// }
// }
public function insert(Request $request)
{
try {
// Validate the incoming request
// $request->validate([
// // 'article_name' => 'required|string',
// // 'article_des' => 'required|string',
// 'article_thmb' => 'required|image|mimes:jpeg,png,jpg,gif|max:2048',
// 'category' => 'required|string', // Assuming 'category' is the field for category selection
// ]);
DB::beginTransaction();
// Handle thumbnail image upload
if ($request->hasFile('article_thmb')) {
$uploadedFile = $request->file('article_thmb');
$filename = date('YmdHi') . '_' . str_replace(' ', '', $uploadedFile->getClientOriginalName());
$path = $uploadedFile->storeAs('uploads/news_article_thumb', $filename, 'public');
}
// Create a new instance of NewsArticle model and populate it with data
$blog = NewsArticle::create([
'name' => $request->input('article_name'),
'description' => $request->input('article_des'),
'news_articles_category_xid' => $request->input('category'),
'thumbnail_image' => $path // Set thumbnail image path
]);
// dd( $blog);
DB::commit();
return response()->json([
'success' => true,
'status' => 200,
'message' => 'News article added successfully',
]);
} catch (\Exception $exception) {
DB::rollBack();
// Log the exception for further analysis
Log::error('Error in insert method: ' . $exception->getMessage() . ' at ' . $exception->getFile() . ':' . $exception->getLine());
// Return an error response
return response()->json(['error' => 'Failed to add news article'], 500);
}
}
}

View File

@@ -6,11 +6,25 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class NewsArticle extends Model
{
use HasFactory;
protected $table = 'news_articles';
use SoftDeletes;
protected $fillable=[
'id ',
'news_articles_category_xid',
'name',
'description',
'thumbnail_image',
'image',
'is_active',
'deleted_at',
'created_at',
'updated_at',
];
public function category()
{
return $this->belongsTo(NewsArticleCategory::class,'news_articles_category_xid','id');

2
composer.lock generated
View File

@@ -8930,5 +8930,5 @@
"php": "^8.2"
},
"platform-dev": [],
"plugin-api-version": "2.3.0"
"plugin-api-version": "2.6.0"
}

View File

@@ -0,0 +1,28 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('news_article_categories', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('news_article_categories');
}
};

View File

@@ -0,0 +1,36 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('news_articles', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('news_articles_category_xid');
$table->foreign('news_articles_category_xid')->references('id')->on('news_article_categories');
$table->string('name');
$table->longText('description');
$table->string('thumbnail_image');
$table->string('image');
$table->enum('is_active',['0','1'])->comment('0 = Active, 1 = Inactive');
$table->softDeletes();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('news_articles');
}
};

View File

@@ -1,95 +1,95 @@
$('#add_newsletter').on("click", function (e) {
// $('#add_newsletter').on("click", function (e) {
$.validator.addMethod("quillNotEmpty", function(value, element) {
var quill = new Quill('#news-quill-add');
return quill.getText().trim().length > 0;
}, "Please enter description ");
// $.validator.addMethod("quillNotEmpty", function(value, element) {
// var quill = new Quill('#news-quill-add');
// return quill.getText().trim().length > 0;
// }, "Please enter description ");
$('#add_blog_form').validate({
ignore: [],
debug: false,
rules: {
article_name: {
required: true
},
article_dis: {
required: true,
quillNotEmpty: true
},
article_image: {
required: true
},
article_thmb: {
required: true
},
category: {
required: true
},
},
messages: {
article_name: {
required: "Please Enter Article name"
},
article_dis: {
required: "Please Enter Description"
},
article_image: {
required: "Please Select Image"
},
category: {
required: "Please Select Article Category"
},
},
errorClass: 'error-message',
submitHandler: function (form) {
let base_url = url_path;
var formData = new FormData(form);
$('#add_newsletter').text('Please wait...').attr('disabled', true);
// $('#add_blog_form').validate({
// ignore: [],
// debug: false,
// rules: {
// article_name: {
// required: true
// },
// article_dis: {
// required: true,
// quillNotEmpty: true
// },
// article_image: {
// required: true
// },
// article_thmb: {
// required: true
// },
// category: {
// required: true
// },
// },
// messages: {
// article_name: {
// required: "Please Enter Article name"
// },
// article_dis: {
// required: "Please Enter Description"
// },
// article_image: {
// required: "Please Select Image"
// },
// category: {
// required: "Please Select Article Category"
// },
// },
// errorClass: 'error-message',
// submitHandler: function (form) {
// let base_url = url_path;
// var formData = new FormData(form);
// $('#add_newsletter').text('Please wait...').attr('disabled', true);
$.ajaxSetup({
headers: {
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
},
});
// $.ajaxSetup({
// headers: {
// "X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
// },
// });
$.ajax({
url: base_url + '/manage_insert_news',
type: 'POST',
data: formData,
processData: false,
contentType: false,
success: function (response) {
if (response.status == 200) {
toastr.success('News and Article Added Successfully');
setTimeout(function () {
window.location.href = base_url + "/manage_news";
}, 1000);
} else {
toastr.error("Something went wrong");
}
$('#add_newsletter').attr('disabled', false).text('Submit');
},
});
}
});
});
// $.ajax({
// url: base_url + '/manage_insert_news',
// type: 'POST',
// data: formData,
// processData: false,
// contentType: false,
// success: function (response) {
// if (response.status == 200) {
// toastr.success('News and Article Added Successfully');
// setTimeout(function () {
// window.location.href = base_url + "/manage_news";
// }, 1000);
// } else {
// toastr.error("Something went wrong");
// }
// $('#add_newsletter').attr('disabled', false).text('Submit');
// },
// });
// }
// });
// });
selectThumbnailImage.onchange = evt => {
preview = document.getElementById('previewthumbnailimage');
preview.style.display = 'block';
const [file] = selectThumbnailImage.files
if (file) {
preview.src = URL.createObjectURL(file)
}
}
// selectThumbnailImage.onchange = evt => {
// preview = document.getElementById('previewthumbnailimage');
// preview.style.display = 'block';
// const [file] = selectThumbnailImage.files
// if (file) {
// preview.src = URL.createObjectURL(file)
// }
// }
selectImage.onchange = evt => {
preview = document.getElementById('preview');
preview.style.display = 'block';
const [file] = selectImage.files
if (file) {
preview.src = URL.createObjectURL(file)
}
}
// selectImage.onchange = evt => {
// preview = document.getElementById('preview');
// preview.style.display = 'block';
// const [file] = selectImage.files
// if (file) {
// preview.src = URL.createObjectURL(file)
// }
// }

View File

@@ -1,107 +1,109 @@
$('#update_news_btn').on("click", function (e) {
$('#update_news').validate({
ignore: [],
debug: false,
rules: {
article_name: {
required: true
},
article_dis: {
required: true
},
category: {
required: true
},
},
messages: {
article_name: {
required: "Please Enter Article name"
},
article_dis: {
required: "Please Enter Description"
},
category: {
required: "Please Select Article Category"
},
},
errorClass: 'error-message',
submitHandler: function (form) {
let base_url = url_path;
var formData = new FormData(form);
$('#update_news_btn').text('Please wait...');
$('#update_news_btn').attr('disabled', true);
$.ajaxSetup({
headers: {
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
},
});
$.ajax({
url: base_url + '/manage_update_news',
type: 'POST',
data: formData,
processData: false,
contentType: false,
success: function (response) {
if (response.status == 200) {
toastr.success('News and Article Updated Successfully');
setTimeout(function () {
window.location.href = base_url + "/manage_news";
}, 1000);
} else if (response.status == 204) {
toastr.error(response.error);
} else {
toastr.error("Something went wrong");
}
$('#update_news_btn').attr('disabled', false);
$('#update_news_btn').text('Submit');
},
});
}
});
});
// $('#update_news_btn').on("click", function (e) {
// alert('dbjhgdj');
// $('#update_news').validate({
// ignore: [],
// debug: false,
// rules: {
// article_name: {
// required: true
// },
// article_dis: {
// required: true
// },
// category: {
// required: true
// },
// },
// messages: {
// article_name: {
// required: "Please Enter Article name"
// },
// article_dis: {
// required: "Please Enter Description"
// },
// category: {
// required: "Please Select Article Category"
// },
// },
// errorClass: 'error-message',
// submitHandler: function (form) {
// let base_url = url_path;
// var formData = new FormData(form);
// $('#update_news_btn').text('Please wait...');
// $('#update_news_btn').attr('disabled', true);
// $.ajaxSetup({
// headers: {
// "X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
// },
// });
// $.ajax({
// url: base_url + '/manage_update_news',
// type: 'POST',
// data: formData,
// processData: false,
// contentType: false,
// success: function (response) {
// if (response.status == 200) {
// toastr.success('News and Article Updated Successfully');
// setTimeout(function () {
// window.location.href = base_url + "/manage_news";
// }, 1000);
// } else if (response.status == 204) {
// toastr.error(response.error);
// } else {
// toastr.error("Something went wrong");
// }
// $('#update_news_btn').attr('disabled', false);
// $('#update_news_btn').text('Submit');
// },
// });
// }
// });
// });
const imageInputEdit = document.getElementById('imageInputNormal');
const imagePreviewEdit = document.getElementById('imageInputPreviewNormal');
// const imageInputEdit = document.getElementById('imageInputNormal');
// const imagePreviewEdit = document.getElementById('imageInputPreviewNormal');
imageInputEdit.addEventListener('change', function() {
const file = this.files[0];
if (file) {
const reader = new FileReader();
reader.onload = function(event) {
const img = document.createElement('img');
img.src = event.target.result;
img.style.maxWidth = '200px';
img.style.maxHeight = '200px';
imagePreviewEdit.innerHTML = '';
imagePreviewEdit.appendChild(img);
};
reader.readAsDataURL(file);
} else {
imagePreviewEdit.innerHTML = '';
}
});
// imageInputEdit.addEventListener('change', function() {
// const file = this.files[0];
// if (file) {
// const reader = new FileReader();
// reader.onload = function(event) {
// const img = document.createElement('img');
// img.src = event.target.result;
// img.style.maxWidth = '200px';
// img.style.maxHeight = '200px';
// imagePreviewEdit.innerHTML = '';
// imagePreviewEdit.appendChild(img);
// };
// reader.readAsDataURL(file);
// } else {
// imagePreviewEdit.innerHTML = '';
// }
// });
const imageInput = document.getElementById('imageInputThumb');
const imagePreview = document.getElementById('imagePreviewThumb');
// const imageInput = document.getElementById('imageInputThumb');
// const imagePreview = document.getElementById('imagePreviewThumb');
imageInput.addEventListener('change', function() {
console.log("in change kjbck");
const file = this.files[0];
if (file) {
const reader = new FileReader();
reader.onload = function(event) {
const img = document.createElement('img');
img.src = event.target.result;
img.style.maxWidth = '200px';
img.style.maxHeight = '200px';
imagePreview.innerHTML = '';
imagePreview.appendChild(img);
};
reader.readAsDataURL(file);
} else {
imagePreview.innerHTML = '';
}
});
// imageInput.addEventListener('change', function() {
// console.log("in change kjbck");
// const file = this.files[0];
// if (file) {
// const reader = new FileReader();
// reader.onload = function(event) {
// const img = document.createElement('img');
// img.src = event.target.result;
// img.style.maxWidth = '200px';
// img.style.maxHeight = '200px';
// imagePreview.innerHTML = '';
// imagePreview.appendChild(img);
// };
// reader.readAsDataURL(file);
// } else {
// imagePreview.innerHTML = '';
// }
// });

View File

@@ -16,30 +16,30 @@ $('#zero-config').DataTable({
});
$(".news_letter_table").on("change", ".active_newsletter", function () {
let base_url = url_path;
var status = $(this).prop("checked") == true ? 1 : 0;
var program_id = $(this).data("id");
$.ajax({
type: "GET",
dataType: "json",
url: base_url + '/change_article_Status',
data: {
status: status,
program_id: program_id,
},
success: function (data) {
if (status == 1) {
toastr.options = {
"timeOut": 500
}
toastr.success("Status Activate successfully. !!");
} else {
toastr.error("Status Deactivate successfully. !!");
}
},
});
});
// $(".news_letter_table").on("change", ".active_newsletter", function () {
// let base_url = url_path;
// var status = $(this).prop("checked") == true ? 1 : 0;
// var program_id = $(this).data("id");
// $.ajax({
// type: "GET",
// dataType: "json",
// url: base_url + '/change_article_Status',
// data: {
// status: status,
// program_id: program_id,
// },
// success: function (data) {
// if (status == 1) {
// toastr.options = {
// "timeOut": 500
// }
// toastr.success("Status Activate successfully. !!");
// } else {
// toastr.error("Status Deactivate successfully. !!");
// }
// },
// });
// });
$(document).on("click", ".delete_news", function () {
var delete_id = $(this).data('id');

View File

@@ -0,0 +1,774 @@
<div class="modal fade" id="archive-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="modal-header">
<button type="button pointer" class="btn-close" data-dismiss="modal" aria-label="Close">
x
</button>
</div>
<p class="modal-text">Are you sure you want to<br>archive?</p>
<div class="modal-btn d-flex ">
<a class="extra-btn pointer" data-dismiss="modal">No</a>
<a class="download-btn-custom" href="archive-manage-customers.php">Yes, archive</a>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="suspend-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="btn-close" data-dismiss="modal" aria-label="Close">
x
</button>
</div>
<div class="modal-body">
<p class="modal-text">Are you sure you want to<br>suspend patient?</p>
<div class="modal-btn d-flex ">
<a class="extra-btn" href="#">No</a>
<a class="download-btn" href="#">Yes, suspend</a>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="caregiver-archive-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="modal-header">
<button type="button" class="btn-close" data-dismiss="modal" aria-label="Close">
x
</button>
</div>
<p class="modal-text">Are you sure you want to<br>archive caregiver?</p>
<div class="modal-btn d-flex ">
<a class="extra-btn" href="manage-caregiver.php">No</a>
<a class="download-btn" href="archive-caregiver.php">Yes, archive</a>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="caregiver-suspend-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="btn-close" data-dismiss="modal" aria-label="Close">
x
</button>
</div>
<div class="modal-body">
<p class="modal-text">Are you sure you want to<br>suspend caregiver?</p>
<div class="modal-btn d-flex ">
<a class="extra-btn" href="#" data-dismiss="modal">No</a>
<a class="download-btn" href="#" data-dismiss="modal">Yes, suspend</a>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="delete-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="btn-close" data-dismiss="modal" aria-label="Close">
x
</button>
</div>
<div class="modal-body">
<p class="modal-text">Are you sure you want to<br>Delete </p>
<div class="modal-btn d-flex ">
<a class="extra-btn" href="#" data-dismiss="modal">No</a>
<a class="download-btn-custom" href="#" data-dismiss="modal">Yes</a>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="message-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Message</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<p>It has survived not only five centuries, but also the leap into electronic typesetting, remaining
essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets
containing Lorem Ipsum passages.</p>
</div>
</div>
</div>
</div>
<div class="modal fade" id="reply-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Reply to Raj Shinde</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="col-xxl-12">
<textarea name="post-meta-description" class="form-control" id="post-meta-description" cols="10"
rows="5"></textarea>
<a href="#" class="download-btn">Reply</a>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="reset-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="modal-header">
<button type="button" class="btn-close" data-dismiss="modal" aria-label="Close">
x
</button>
</div>
<div class="col-md-12">
<div class="mb-4">
<label class="form-label">Enter Password</label>
<input type="password" class="form-control">
</div>
</div>
<p class="modal-text note">Note<span>*</span>: New Password sent to user's email</p>
<a class="download-btn" href="" data-dismiss="modal">Reset Password</a>
</div>
</div>
</div>
</div>
<div class="modal fade" id="add-list-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="modal-header pb-10">
<h5 class="modal-title" id="exampleModalLabel">Add User</h5>
<button type="button" class="btn-close" data-dismiss="modal" aria-label="Close">
x
</button>
</div>
<div class="col-md-12">
<div class="mb-4">
<label class="form-label">Full Name</label>
<input type="text" class="form-control">
</div>
</div>
<div class="col-md-12">
<div class="mb-4">
<label class="form-label">Email Address</label>
<input type="email" class="form-control">
</div>
</div>
<div class="col-md-12 mb-10">
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="radio" name="radio-checked"
id="form-check-radio-default-checked">
<label class="form-check-label" for="form-check-radio-default-checked">
Operations
</label>
</div>
</div>
<div class="col-md-12 mb-10">
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="radio" name="radio-checked"
id="form-check-radio-default-checked">
<label class="form-check-label" for="form-check-radio-default-checked">
Products
</label>
</div>
</div>
<div class="modal-btn d-flex ">
<a class="extra-btn" href="#" data-dismiss="modal">Discard</a>
<a class="download-btn" href="#" data-dismiss="modal">Submit</a>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="edit-list-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="modal-header pb-10">
<h5 class="modal-title" id="exampleModalLabel">Edit User</h5>
<button type="button" class="btn-close" data-dismiss="modal" aria-label="Close">
x
</button>
</div>
<div class="col-md-12">
<div class="mb-4">
<label class="form-label">Full Name</label>
<input type="text" class="form-control" value="Kartikey Gautam">
</div>
</div>
<div class="col-md-12">
<div class="mb-4">
<label class="form-label">Email Address</label>
<input type="email" class="form-control" value="Kartikeygautam@gmail.com">
</div>
</div>
<div class="col-md-12 mb-10">
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="radio" name="radio-checked"
id="form-check-radio-default-checked" checked>
<label class="form-check-label" for="form-check-radio-default-checked">
Operations
</label>
</div>
</div>
<div class="col-md-12 mb-10">
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="radio" name="radio-checked"
id="form-check-radio-default-checked">
<label class="form-check-label" for="form-check-radio-default-checked">
Products
</label>
</div>
</div>
<div class="modal-btn d-flex ">
<a class="extra-btn" href="#" data-dismiss="modal">Discard</a>
<a class="download-btn" href="#" data-dismiss="modal">Submit</a>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="add-role-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="modal-header pb-10">
<h5 class="modal-title" id="exampleModalLabel">Add a role</h5>
<button type="button" class="btn-close" data-dismiss="modal" aria-label="Close">
x
</button>
</div>
<div class="col-md-6">
<div class="mb-4">
<label class="form-label">Role name</label>
<input type="text" class="form-control">
</div>
</div>
<div class="col-md-12 mb-10">
<div class="permission">
<h2>Role permission</h2>
<div class="role-content">
<h3>Users</h3>
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="checkbox" id="user1">
<label class="form-check-label" for="user1">
Read
</label>
</div>
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="checkbox" id="user2">
<label class="form-check-label" for="user2">
Write
</label>
</div>
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="checkbox" id="user3">
<label class="form-check-label" for="user3">
View
</label>
</div>
</div>
<div class="role-content">
<h3>Caregiver</h3>
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="checkbox" id="user1">
<label class="form-check-label" for="user1">
Read
</label>
</div>
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="checkbox" id="user2">
<label class="form-check-label" for="user2">
Write
</label>
</div>
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="checkbox" id="user3">
<label class="form-check-label" for="user3">
View
</label>
</div>
</div>
<div class="role-content">
<h3>Users</h3>
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="checkbox" id="user1">
<label class="form-check-label" for="user1">
Read
</label>
</div>
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="checkbox" id="user2">
<label class="form-check-label" for="user2">
Write
</label>
</div>
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="checkbox" id="user3">
<label class="form-check-label" for="user3">
View
</label>
</div>
</div>
<div class="role-content">
<h3>Caregiver</h3>
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="checkbox" id="user1">
<label class="form-check-label" for="user1">
Read
</label>
</div>
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="checkbox" id="user2">
<label class="form-check-label" for="user2">
Write
</label>
</div>
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="checkbox" id="user3">
<label class="form-check-label" for="user3">
View
</label>
</div>
</div>
</div>
</div>
<div class="modal-btn d-flex ">
<a class="extra-btn" href="#" data-dismiss="modal">Discard</a>
<a class="download-btn" href="#" data-dismiss="modal">Submit</a>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="edit-role-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="modal-header pb-10">
<h5 class="modal-title" id="exampleModalLabel">Edit a role</h5>
<button type="button" class="btn-close" data-dismiss="modal" aria-label="Close">
x
</button>
</div>
<div class="col-md-6">
<div class="mb-4">
<label class="form-label">Role name</label>
<input type="text" class="form-control" value="Operations">
</div>
</div>
<div class="col-md-12 mb-10">
<div class="permission">
<h2>Role permission</h2>
<div class="role-content">
<h3>Users</h3>
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="checkbox" id="user1" checked>
<label class="form-check-label" for="user1">
Read
</label>
</div>
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="checkbox" id="user2" checked>
<label class="form-check-label" for="user2">
Write
</label>
</div>
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="checkbox" id="user3" checked>
<label class="form-check-label" for="user3">
View
</label>
</div>
</div>
<div class="role-content">
<h3>Caregiver</h3>
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="checkbox" id="user1">
<label class="form-check-label" for="user1">
Read
</label>
</div>
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="checkbox" id="user2">
<label class="form-check-label" for="user2">
Write
</label>
</div>
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="checkbox" id="user3">
<label class="form-check-label" for="user3">
View
</label>
</div>
</div>
<div class="role-content">
<h3>Users</h3>
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="checkbox" id="user1">
<label class="form-check-label" for="user1">
Read
</label>
</div>
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="checkbox" id="user2">
<label class="form-check-label" for="user2">
Write
</label>
</div>
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="checkbox" id="user3">
<label class="form-check-label" for="user3">
View
</label>
</div>
</div>
<div class="role-content">
<h3>Caregiver</h3>
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="checkbox" id="user1">
<label class="form-check-label" for="user1">
Read
</label>
</div>
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="checkbox" id="user2">
<label class="form-check-label" for="user2">
Write
</label>
</div>
<div class="form-check form-check-primary form-check-inline">
<input class="form-check-input" type="checkbox" id="user3">
<label class="form-check-label" for="user3">
View
</label>
</div>
</div>
</div>
</div>
<div class="modal-btn d-flex ">
<a class="extra-btn" href="#" data-dismiss="modal">Discard</a>
<a class="download-btn" href="#" data-dismiss="modal">Submit</a>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="restore-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="modal-header">
<button type="button pointer" class="btn-close" data-dismiss="modal" aria-label="Close">
x
</button>
</div>
<p class="modal-text restore-modal-heading">Are you sure you want to<br>Unarchive?</p>
<div class="modal-btn d-flex ">
<a class="extra-btn pointer" data-dismiss="modal">No</a>
<a class="download-btn-custom" href="">Yes, archive</a>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="refund-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="modal-header">
<button type="button pointer" class="btn-close" data-dismiss="modal" aria-label="Close">
x
</button>
</div>
<p class="modal-text restore-modal-heading">Are you sure you want to<br>Refund?</p>
<div class="modal-btn d-flex ">
<a class="extra-btn pointer" data-dismiss="modal">No</a>
<a class="download-btn-custom" href="">Yes</a>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="add-passport-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="modal-header d-flex justify-content-between modal-title">
<h5>Add passport</h5>
<button type="button pointer" class="btn-close" data-dismiss="modal" aria-label="Close">
x
</button>
</div>
<div class="mb-4" style="padding: 0px 10px;">
<div class="mb-3">
<label>Select passport</label>
<select class="form-control">
<option value="" disabled selected>select</option>
<option value="">dummy</option>
<option value="">dummy</option>
</select>
</div>
<div>
<label>Select voucher</label>
<select class="form-control">
<option value="" disabled selected>select</option>
<option value="">dummy</option>
<option value="">dummy</option>
</select>
</div>
<a class="download-btn-custom mt-4 mx-auto w-25" href="">
<span>Add</span>
</a>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="edit-voucher-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="modal-header d-flex justify-content-between modal-title">
<h5>Edit voucher</h5>
<button type="button pointer" class="btn-close" data-dismiss="modal" aria-label="Close">
x
</button>
</div>
<div class="mb-4" style="padding: 0px 10px;">
<div class="mb-3">
<label>Passport</label>
<input class="form-control " type="text" name="" id="" value="123456" disabled>
</div>
<div>
<label>Select voucher</label>
<select class="form-control ">
<option value="" disabled selected>select</option>
<option value="">dummy</option>
<option value="">dummy</option>
</select>
</div>
<a class="download-btn-custom mt-4 mx-auto w-25" href="">
<span>Update</span>
</a>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="premission-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document" style="max-width: 640px;">
<div class="modal-content">
<div class="modal-body">
<div class="modal-header d-flex justify-content-between modal-title">
<h5>View premission</h5>
<button type="button pointer" class="btn-close" data-dismiss="modal" aria-label="Close">
x
</button>
</div>
<div class="row" style="padding: 0px 10px;">
<div class="form-group subadmin-option col-md-4">
<input id="customers" type="checkbox" class="form-control">
<label for="customers" class="label mb-0">Manage Customers</label>
</div>
<div class="form-group subadmin-option col-md-4">
<input id="cms" type="checkbox" class="form-control">
<label for="cms" class="label mb-0">Manage CMS</label>
</div>
<div class="form-group subadmin-option col-md-4">
<input id="dasboard" type="checkbox" class="form-control">
<label for="dasboard" class="label mb-0">Manage Dashboard</label>
</div>
<div class="form-group subadmin-option col-md-4">
<input id="restaurant" type="checkbox" class="form-control">
<label for="restaurant" class="label mb-0">Manage Restaurant</label>
</div>
<div class="form-group subadmin-option col-md-4">
<input id="vouchers" type="checkbox" class="form-control">
<label for="vouchers" class="label mb-0">Manage Vouchers</label>
</div>
<div class="form-group subadmin-option col-md-4">
<input id="analysis" type="checkbox" class="form-control">
<label for="analysis" class="label mb-0">Manage Reports &
Analysis</label>
</div>
<div class="form-group subadmin-option col-md-4">
<input id="passports-option" type="checkbox" class="form-control">
<label for="passports-option" class="label mb-0">Manage
Passports</label>
</div>
<div class="form-group subadmin-option col-md-4">
<input id="subadmin" type="checkbox" class="form-control">
<label for="subadmin" class="label mb-0">Manage Sub-Admin</label>
</div>
<div class="form-group subadmin-option col-md-4">
<input id="notification" type="checkbox" class="form-control">
<label for="notification" class="label mb-0">Manage Notification</label>
</div>
<div class="form-group subadmin-option col-md-4">
<input id="feedback" type="checkbox" class="form-control">
<label for="feedback" class="label mb-0">Manage Feedback</label>
</div>
<div class="form-group subadmin-option col-md-4">
<input id="contact" type="checkbox" class="form-control">
<label for="contact" class="label mb-0">Manage Contact Us</label>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="comment-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="modal-header p-0">
<h5 class="modal-title">Comment</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<p>It has survived not only five centuries, but also the leap into electronic typesetting, remaining
essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets
containing Lorem Ipsum passages.</p>
</div>
</div>
</div>
</div>
<div class="modal fade" id="add-faq-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="modal-header p-0">
<h5 class="modal-title">Add FAQ</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="row">
<div class="col-md-12 mb-3">
<label for="">Question</label>
<input class="form-control" type="text" >
</div>
<div class="col-md-12">
<label for="">Answer</label>
<textarea name="" id="" rows="5" cols="50" class="form-control"></textarea>
</div>
<a class="download-btn-custom mt-4 mx-auto w-25" href="">
<span>Save</span>
</a>
</div>
</div>
</div>
</div>
</div>
<div class="modal fade" id="edit-faq-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="modal-header p-0">
<h5 class="modal-title">Edit FAQ</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="row">
<div class="col-md-12 mb-3">
<label for="">Question</label>
<input class="form-control" type="text" >
</div>
<div class="col-md-12">
<label for="">Answer</label>
<textarea name="" id="" rows="5" cols="50" class="form-control"></textarea>
</div>
<a class="download-btn-custom mt-4 mx-auto w-25" href="">
<span>Update</span>
</a>
</div>
</div>
</div>
</div>
</div>

View File

@@ -31,7 +31,7 @@
<link rel="stylesheet" href="{{asset('public/assets/plugins/src/filepond/FilePondPluginImagePreview.min.css')}}">
<link href="{{asset('public/assets/plugins/css/light/filepond/custom-filepond.css')}}" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="{{asset('public/assets/plugins/src/table/datatable/datatables.css')}}">
<link rel="sty lesheet" type="text/css" href="{{asset('public/assets/plugins/css/light/table/datatable/dt-global_style.css')}}">
<link rel="stylesheet" type="text/css" href="{{asset('public/assets/plugins/css/light/table/datatable/dt-global_style.css')}}">
<link rel="stylesheet" type="text/css" href="{{asset('public/assets/plugins/css/light/table/datatable/custom_dt_custom.css')}}">
<!-- added by abhishek -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/flatpickr/dist/flatpickr.min.css">

View File

@@ -36,7 +36,7 @@
<a class="nav-link dropdown-toggle" href="{{ route('profile') }}">
<div class="avatar-container">
<div class="avatar avatar-sm avatar-indicators avatar-online">
<img alt="avatar" src="{{ asset('assets/img/profile-30.png') }}" class="rounded-circle">
<img alt="avatar" src="{{ asset('public/assets/img/profile-30.png') }}" class="rounded-circle">
</div>
</div>
</a>
@@ -66,7 +66,7 @@
<span class="shrink-btn">
<i class="fa fa-chevron-left" aria-hidden="true"></i>
</span>
<img src="{{ asset('assets/img/seasons_logo.png') }}" class="logo" alt="">
<img src="{{ asset('public/assets/img/seasons_logo.png') }}" class="logo" alt="">
<h3 class="hide">Seasons</h3>
</div>
<div class="sidebar-links" style="overflow: scroll;">
@@ -80,7 +80,7 @@
?>" data-tooltip="0">
<a href="{{ route('dashboard') }}" data-active="0">
<div class="icons">
<img src="{{ asset('assets/img/dashboard.svg') }}" />
<img src="{{ asset('public/assets/img/dashboard.svg') }}" />
<span class="text">Dashboard</span>
</div>
</a>
@@ -88,7 +88,7 @@
<button class="dropdown-btn-users mb-1">
<div class="icons d-flex align-items-center justify-content-start w-100">
<img src="{{ asset('assets/img/Group 57904.svg') }}" />
<img src="{{ asset('public/assets/img/Group 57904.svg') }}" />
<span class="text-1">Manage Users</span>
</div>
<i class="fa fa-angle-down mr-3" aria-hidden="true"></i>
@@ -103,7 +103,7 @@
?>" data-tooltip="1">
<a href="{{ route('manage.customer') }}" data-active="1">
<div class="icons">
<img src="{{ asset('assets/img/single-user.svg') }}" />
<img src="{{ asset('public/assets/img/single-user.svg') }}" />
<span class="text">Customer App</span>
</div>
</a>
@@ -116,7 +116,7 @@
?>" data-tooltip="1">
<a href="{{ route('manage.restaurants') }}" data-active="1">
<div class="icons">
<img src="{{ asset('assets/img/restraunt.svg') }}" />
<img src="{{ asset('public/assets/img/restraunt.svg') }}" />
<span class="text">Restaurant App</span>
</div>
</a>
@@ -129,7 +129,7 @@
?>" data-tooltip="1">
<a href="{{ route('manage.subAdmin') }}" data-active="1">
<div class="icons">
<img src="{{ asset('assets/img/Group 57906.svg') }}">
<img src="{{ asset('public/assets/img/Group 57906.svg') }}">
<span class=" text">Sub Admins</span>
</div>
</a>
@@ -147,7 +147,7 @@
?>" data-tooltip="2">
<a href="{{ route('manage.passport') }}" data-active="2">
<div class="icons">
<img src="{{ asset('assets/img/Group.svg') }}" >
<img src="{{ asset('public/assets/img/Group.svg') }}" >
<span class="text">Manage Passports</span>
</div>
</a>
@@ -160,7 +160,7 @@
?>" data-tooltip="3">
<a href="{{ route('manage.voucher') }}" data-active="3">
<div class="icons">
<img src="{{ asset('assets/img/fluent-mdl2_coupon.svg') }}" >
<img src="{{ asset('public/assets/img/fluent-mdl2_coupon.svg') }}" >
<span class="text">Manage Vouchers</span>
</div>
</a>
@@ -173,7 +173,7 @@
?>" data-tooltip="4">
<a href="{{ route('manage.contact') }}" data-active="4">
<div class="icons">
<img src="{{ asset('assets/img/call(1) 3.svg') }}" />
<img src="{{ asset('public/assets/img/call(1) 3.svg') }}" />
<span class="text">Manage Contact Us</span>
</div>
</a>
@@ -183,7 +183,7 @@
<button class="dropdown-btn-users mb-1">
<div class="icons d-flex align-items-center justify-content-start w-100">
<img src="{{ asset('assets/img/article-line.svg') }}" >
<img src="{{ asset('public/assets/img/article-line.svg') }}" >
<span class="text-1">Manage CMS</span>
</div>
<i class="fa fa-angle-down mr-3" aria-hidden="true"></i>
@@ -198,7 +198,7 @@
?>" data-tooltip="1">
<a href="{{ route('manage.Newarticles') }}" data-active="1">
<div class="icons">
<img src="{{ asset('assets/img/article 1.svg') }}" />
<img src="{{ asset('public/assets/img/article 1.svg') }}" />
<span class="text">News & Article</span>
</div>
</a>
@@ -211,7 +211,7 @@
?>" data-tooltip="1">
<a href="{{ route('manage.newLetter') }}" data-active="1">
<div class="icons">
<img src="{{ asset('assets/img/quill_inbox-newsletter.svg') }}" />
<img src="{{ asset('public/assets/img/quill_inbox-newsletter.svg') }}" />
<span class="text">Newsletter</span>
</div>
</a>
@@ -224,7 +224,7 @@
?>" data-tooltip="1">
<a href="{{ route('manage.aboutUs') }}" data-active="1">
<div class="icons">
<img src="{{ asset('assets/img/user (2) 1.svg') }}" />
<img src="{{ asset('public/assets/img/user (2) 1.svg') }}" />
<span class="text">About Us</span>
</div>
</a>
@@ -237,7 +237,7 @@
?>" data-tooltip="1">
<a href="{{ route('manage.terms') }}" data-active="1">
<div class="icons">
<img src="{{ asset('assets/img/contract 1.svg') }}" />
<img src="{{ asset('public/assets/img/contract 1.svg') }}" />
<span class="text">Terms & Conditions</span>
</div>
</a>
@@ -250,7 +250,7 @@
?>" data-tooltip="1">
<a href="{{ route('manage.faq') }}" data-active="1">
<div class="icons">
<img src="{{ asset('assets/img/conversation 3.svg') }}" />
<img src="{{ asset('public/assets/img/conversation 3.svg') }}" />
<span class="text">FAQ</span>
</div>
</a>
@@ -263,7 +263,7 @@
?>" data-tooltip="1">
<a href="{{ route('manage.privacy') }}" data-active="1">
<div class="icons">
<img src="{{ asset('assets/img/privacy.svg') }}" />
<img src="{{ asset('public/assets/img/privacy.svg') }}" />
<span class="text">Privacy Policy</span>
</div>
</a>
@@ -293,7 +293,7 @@
?>" data-tooltip="5">
<a href="{{ route('manage.reports') }}" data-active="5">
<div class="icons">
<img src="{{ asset('assets/img/admin 2.svg') }}" />
<img src="{{ asset('public/assets/img/admin 2.svg') }}" />
<span class="text">Manage Reports</span>
</div>
</a>
@@ -306,7 +306,7 @@
?>" data-tooltip="6">
<a href="{{ route('manage.feedback') }}" data-active="6">
<div class="icons">
<img src="{{ asset('assets/img/Group 51242.svg') }}" />
<img src="{{ asset('public/assets/img/Group 51242.svg') }}" />
<span class="text">Manage Feedback</span>
</div>
</a>
@@ -319,7 +319,7 @@
?>" data-tooltip="6">
<a href="{{ route('manage.notification') }}" data-active="6">
<div class="icons">
<img src="{{ asset('assets/img/Vector(1).svg') }}" />
<img src="{{ asset('public/assets/img/Vector(1).svg') }}" />
<span class="text">Manage Notification</span>
</div>
</a>

View File

@@ -0,0 +1,80 @@
@extends('admin.layouts.master')
@section('content')
@php
$currentPage = 'manage_cms';
@endphp
<style>
.error-message {
color: #FF0000;
}
form .error-message {
color: red;
/* Set your desired color here */
}
form .input_class.error-message {
color: #0e1726;
}
</style>
<div class="layout-px-spacing">
<div class="middle-content container-xxl p-0">
<div class="row layout-top-spacing ">
<div class="top-tabel">
<div class="row">
<div class="col-md-12 left d-flex align-items-center justify-content-between"
style="gap: 15px;">
<a class="d-flex align-items-center justify-content-center pl-2"
href="manage-aboutus.php">
<img class="back-btn" src="../src/assets/img/left-arrow.svg">
<h6 class="card-title p-0">Edit Details</h6>
</a>
</div>
</div>
</div>
<div class="col-xl-12 col-lg-12 col-sm-12 layout-spacing">
<div class="widget-content widget-content-area br-8 position-btn p-0">
<div class="view-details">
<div class="simple-tab">
<div class="tab-content" id="myTabContent">
<div class="tab-pane fade show active" id="home-tab-pane" role="tabpanel"
aria-labelledby="home-tab" tabindex="0">
<div class="row">
<div class="col-md-12">
<div id="about-quill-edit" class="editor-quill"
style="height: 300px;"></div>
</div>
<div class="col-md-12">
<a class="download-btn-custom mt-3 custom-width-10" href="">
<span>Update</span>
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('section_script')
<script>
var quill = new Quill('#about-quill-edit', {
theme: 'snow'
});
</script>
@endsection

View File

@@ -1,139 +1,127 @@
@extends('admin.layouts.master')
@section('content')
@php
$currentPage = 'manage-news';
@endphp
@php
$currentPage = 'manage-news';
@endphp
<div class="layout-px-spacing">
<div class="middle-content container-xxl p-0">
<div class="row layout-top-spacing ">
<div class="top-tabel">
<div class="row">
<div class="col-md-4">
<h6 class="card-title">Manage News & Articles</h6>
</div>
<div class="col-md-8">
</div>
</div>
<div class="layout-px-spacing">
<div class="middle-content container-xxl p-0">
<div class="row layout-top-spacing ">
<div class="top-tabel">
<div class="row">
<div class="col-md-4">
<h6 class="card-title">Manage News & Articles</h6>
</div>
<div class="col-xl-12 col-lg-12 col-sm-12 layout-spacing">
<div class="widget-content widget-content-area br-8 position-btn" style="overflow: auto;">
<table id="zero-config" class="table dt-table-hover" style="width:100%">
<thead class="text-center">
<th class="w-10px pe-2">
<div class="form-check form-check-sm form-check-custom form-check-solid me-3">
<input class="form-check-input" type="checkbox" data-kt-check="true"
data-kt-check-target="#kt_table_users .form-check-input" value="1" />
</div>
</th>
<th class="text-start">Sr no</th>
<th class="text-start">Article Name</th>
<th class="text-start">Added Date </th>
<th class="">Image</th>
<th class="no-content">Action</th>
</tr>
</thead>
<tbody class="text-center">
<tr>
<td>
<div class="form-check form-check-sm form-check-custom form-check-solid">
<input class="form-check-input" type="checkbox" value="1" />
</div>
</td>
<td class="text-start">1</td>
<td class="text-start">Lorem Ipsum</td>
<td class="text-start">08/22/2023</td>
<td><img src="../src/assets/img/video.png"></td>
<td>
<div class="dropout">
<button class="more">
<span></span>
<span></span>
<span></span>
</button>
<ul>
<li>
<div class="switch-btn">
<input type="checkbox" id="switch18" switch="bool"
checked />
<label for="switch18" data-on-label="Active"
data-off-label="Expired"></label>
</div>
</li>
<li>
<a href="manage-news-edit.php">
<img src="../src/assets/img/edit.svg" />
<span>Edit</span>
</a>
</li>
<li>
<a href="" data-toggle="modal" data-target="#delete-modal">
<img src="../src/assets/img/delete-recycle.svg" />
<span>Delete</span>
</a>
</li>
</ul>
</div>
</td>
</tr>
<tr>
<td>
<div class="form-check form-check-sm form-check-custom form-check-solid">
<input class="form-check-input" type="checkbox" value="1" />
</div>
</td>
<td class="text-start">2</td>
<td class="text-start">Lorem Ipsum</td>
<td class="text-start">08/22/2023</td>
<td><img src="../src/assets/img/video.png"></td>
<td>
<div class="dropout">
<button class="more">
<span></span>
<span></span>
<span></span>
</button>
<ul>
<li>
<div class="switch-btn">
<input type="checkbox" id="switch18" switch="bool"
checked />
<label for="switch18" data-on-label="Active"
data-off-label="Expired"></label>
</div>
</li>
<li>
<a href="manage-news-edit.php">
<img src="../src/assets/img/edit.svg" />
<span>Edit</span>
</a>
</li>
<li>
<a href="" data-toggle="modal" data-target="#delete-modal">
<img src="../src/assets/img/delete-recycle.svg" />
<span>Delete</span>
</a>
</li>
</ul>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-md-8">
</div>
</div>
</div>
<div class="col-xl-12 col-lg-12 col-sm-12 layout-spacing">
<div class="widget-content widget-content-area br-8 position-btn" style="overflow: auto;">
<table id="zero-config" class="table dt-table-hover news_letter_table" style="width:100%">
<thead class="text-center">
<th class="w-10px pe-2">
<div class="form-check form-check-sm form-check-custom form-check-solid me-3">
<input class="form-check-input" type="checkbox" data-kt-check="true" data-kt-check-target="#kt_table_users .form-check-input" value="1" />
</div>
</th>
<th class="text-start">Sr no</th>
<th class="text-start">Article Name</th>
<th class="text-start">Added Date </th>
<th class="">Image</th>
<th class="no-content">Action</th>
</tr>
</thead>
<tbody class="text-center">
@foreach ($news_article as $news_articles)
<tr>
<td>
<div class="form-check form-check-sm form-check-custom form-check-solid">
<input class="form-check-input" type="checkbox" value="1" />
</div>
</td>
<td class="text-start">{{$loop->iteration}}</td>
<td class="text-start">{{ $news_articles['name'] }}</td>
<td class="text-start">{{ \Carbon\Carbon::parse($news_articles['created_at'])->format('m/d/Y') }}</td>
<!-- <td><img src="../src/assets/img/video.png"></td> -->
<td><img src="{{ asset('storage/app/public/' . $news_articles['thumbnail_image']) }}" height="50px" width="50px"></td>
<td>
<div class="dropout">
<button class="more">
<span></span>
<span></span>
<span></span>
</button>
<ul>
<li>
<div class="switch-btn">
<input data-id="{{ $news_articles['id'] }}" {{ $news_articles['is_active'] ? 'checked' : '' }} type="checkbox" class="active_newsletter" id="switch{{ $news_articles['id'] }}" switch="bool" />
<label for="switch{{ $news_articles['id'] }}" data-on-label="Active" data-off-label="Expired"></label>
</div>
</li>
<li>
<a href="{{ url('manage_edit_news/' . $news_articles['id']) }}">
<img src="{{ asset('public/assets/img/edit.svg') }}" />
<span>Edit</span>
</a>
</li>
<li>
<!-- <a href="" data-toggle="modal" data-target="#delete-modal">
<img src="{{ asset('assets/img/delete-recycle.svg') }}" />
<span>Delete</span>
</a> -->
<a class="delete_news" data-id="{{ $news_articles['id'] }}" data-toggle="modal" data-target="#delete-modal">
<img src="{{ asset('public/assets/img/delete-recycle.svg') }}" />
<span>Delete</span>
</a>
</li>
</ul>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
@endsection
</div>
</div>
<div class="modal fade" id="delete-modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="btn-close" data-dismiss="modal" aria-label="Close">
x
</button>
</div>
<div class="modal-body">
<input type="hidden" id="delete_news_id" name="news_id">
<p class="modal-text">Are you sure you want to<br>Delete </p>
<div class="modal-btn d-flex ">
<a type="button" class="extra-btn" data-dismiss="modal">No</a>
<a type="button" class="download-btn-custom delete_news_button" data-dismiss="modal">Yes</a>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('section_script')
@section('section_script')
<script src="../src/plugins/src/table/datatable/datatables.js"></script>
<script>
@@ -142,7 +130,10 @@
"<'table-responsive'tr>" +
"<'dt--bottom-section d-sm-flex justify-content-sm-between text-center'<'dt--pages-count mb-sm-0 mb-3'i><'dt--pagination'p>>",
"oLanguage": {
"oPaginate": { "sPrevious": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline></svg>', "sNext": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>' },
"oPaginate": {
"sPrevious": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline></svg>',
"sNext": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>'
},
"sInfo": "Showing page _PAGE_ of _PAGES_",
"sSearch": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>',
"sSearchPlaceholder": "Search...",
@@ -154,8 +145,68 @@
});
</script>
<script>
$(document).ready(function () {
$('<button><a class="extra-btn width-max-content" href="manage-news-add.php">Add New</a ></button > ').insertBefore("#zero-config_filter label");
var manageAddNewsRoute = "{{ route('manage_add_news') }}";
</script>
<script>
// $(document).ready(function() {
// $('<button><a class="extra-btn width-max-content" href="{{ route('manage_add_news')}}">Add New</a ></button > ').insertBefore("#zero-config_filter label");
// });
// $('<button><a class="extra-btn width-max-content" href="' + manageAddNewsRoute + '">Add New </a></button>').insertBefore("#zero-config_filter label");
$(document).ready(function() {
$('<button><a class="extra-btn width-max-content" href="' + manageAddNewsRoute + '"> Add New </a></button>').insertBefore("#zero-config_filter label");
});
</script>
<script>
$(".news_letter_table").on("change", ".active_newsletter", function() {
let base_url = url_path;
var status = $(this).prop("checked") == true ? 1 : 0;
var program_id = $(this).data("id");
$.ajax({
type: "GET",
dataType: "json",
url: base_url + '/change-article-Status',
data: {
status: status,
program_id: program_id,
},
success: function(data) {
if (status == 1) {
toastr.options = {
"timeOut": 500
}
toastr.success("Status Activate successfully. !!");
} else {
toastr.error("Status Deactivate successfully. !!");
}
},
});
});
</script>
@endsection
<script>
$(document).on("click", ".delete_news", function () {
var delete_id = $(this).data('id');
$('#delete_news_id').val(delete_id);
});
$(document).on("click", ".delete_news_button", function (e) {
e.preventDefault();
let base_url = url_path;
var delete_id = $('#delete_news_id').val();
$.ajaxSetup({
headers: {
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
},
});
$.ajax({
type: "DELETE",
url: base_url + "/delete_article/" + delete_id,
success: function (response) {
console.log(response);
toastr.success("Blog Deleted Successfully");
window.location.href = base_url + "/manage-new-articles";
}
});
});
</script>
@endsection

View File

@@ -0,0 +1,249 @@
@extends('admin.layouts.master')
@section('content')
@php
$currentPage = 'manage_cms';
@endphp
<style>
.error-message {
color: #FF0000;
}
form .error-message {
color: red;
/* Set your desired color here */
}
form .input_class.error-message {
color: #0e1726;
}
</style>
<div class="layout-px-spacing">
<div class="middle-content container-xxl p-0">
<div class="row layout-top-spacing ">
<div class="top-tabel">
<div class="row">
<div class="col-md-4">
<a class="d-flex align-items-center justify-content-center pl-2" href="{{ route('manage.Newarticles') }}">
<img class="back-btn" src="{{ asset('assets/img/left-arrow.svg') }}">
<h6 class="card-title p-0">Add News & Articles </h6>
</a>
</div>
<div class="col-md-8">
</div>
</div>
</div>
<div class="col-xl-12 col-lg-12 col-sm-12 layout-spacing">
<div class="widget-content widget-content-area br-8 position-btn h-10">
<div class="view-details Article">
<form id="add_blog_form" enctype="multipart/form-data">
@csrf
<div class="row">
<div class="col-md-6">
<div class="form-group ">
<label for="company-name" class="label">Article Name</label>
<input type="text" name="article_name" class="form-control input_class">
</div>
</div>
<!-- <div class="col-md-6">
<div class="form-group ">
<label for="company-name" class="label">Image Upload</label>
<input type="file" name="article_image" class="form-control input_class" id="selectImage">
<img id="preview" src="#" alt="your image" class="mt-3 " style="display:none;width:20%;"/>
</div>
</div> -->
<div class="col-md-12">
<div class="form-group mt-3">
<label class="mr-2 mb-3" style="font-weight: 600;">Image Upload :</label>
<div class="multiple-file-upload">
<input type="file" class="filepond pan-frontside" name="article_image" id="imageInputNormal" data-max-file-size="3MB">
<div id="imageInputPreviewNormal" style="width: 30%;">
<img src="" alt="Image Preview" style="width: 40%;">
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label for="company-name" class="label">Description</label>
<div id="news-quill-add" class="editor-quill" style="height: 100px;"></div>
<input type="hidden" id="article_des" name="article_des">
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label for="company-name" class="label">Thumbnail Image:</label>
<input type="file" name="article_thmb" class="form-control input_class" id="selectThumbnailImage">
<img id="previewthumbnailimage" src="#" alt="your image" class="mt-3 w-20" style="display:none;width:20%;"/>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="company-name" class="label">Select Category</label>
<select class="form-control input_class" id="company-name" name="category">
<option value="">Select Category</option>
@foreach ($news_categories as $news_category)
<option value="{{ $news_category['id'] }}">{{ $news_category['name'] }}
</option>
@endforeach
<!-- Add more options as needed -->
</select>
</div>
</div>
<div class="col-md-12">
<button type="submit" id="add_newsletter"
class="download-btn-custom mt-3 custom-width-10">
<span>Save</span>
</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('section_script')
<script src="../src/plugins/src/table/datatable/datatables.js"></script>
<script>
$('#zero-config').DataTable({
"dom": "<'dt--top-section'<'row'<'col-12 col-sm-6 d-flex justify-content-sm-start justify-content-center'l><'col-12 col-sm-6 d-flex justify-content-sm-end justify-content-center mt-sm-0 mt-3'f>>>" +
"<'table-responsive'tr>" +
"<'dt--bottom-section d-sm-flex justify-content-sm-between text-center'<'dt--pages-count mb-sm-0 mb-3'i><'dt--pagination'p>>",
"oLanguage": {
"oPaginate": { "sPrevious": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline></svg>', "sNext": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>' },
"sInfo": "Showing page _PAGE_ of _PAGES_",
"sSearch": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>',
"sSearchPlaceholder": "Search...",
"sLengthMenu": "Results : _MENU_",
},
"stripeClasses": [],
"lengthMenu": [7, 10, 20, 50],
"pageLength": 10
});
</script>
<script>
$(document).ready(function () {
$('<button><a class="extra-btn width-max-content" href="archive-manage-customers.php">View Archive List</a></button><button><ul class="navbar-item flex-row ms-lg-auto ms-0"><li class="nav-item dropdown action-dropdown order-lg-0 order-1"><a href="javascript:void(0);"class="nav-link dropdown-toggle user extra-btn" id="actionDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><div class="avatar-container"><div class="avatar avatar-sm avatar-indicators avatar-online"><h3>Export</h3></div></div></a><div class="dropdown-menu position-absolute" aria-labelledby="actionDropdown"><div class="dropdown-item"><a href="#"><span>Download Overview</span></a></div><div class="dropdown-item"><a href="#"><span>Download Patient Data</span></a></div><div class="dropdown-item"><a href="#"> <span>Download Selected</span></a></div></div></li></ul></button>').insertBefore("#zero-config_filter label");
});
// var quill = new Quill('#news-quill-add', {
// theme: 'snow'
// });
</script>
<script>
var quill = new Quill('#news-quill-add', {
theme: 'snow'
});
$('#add_newsletter').on("click", function (e) {
// alert('sdkjfb');
$('#add_blog_form').validate({
debug: false,
rules: {
article_name: {
required: true
},
article_des: {
required: true,
},
// article_image: {
// required: true
// },
article_thmb: {
required: true
},
category: {
required: true
},
},
messages: {
article_name: {
required: "Please Enter Article name"
},
article_des: {
required: "Please Enter Description"
},
article_thmb: {
required: "Please Select Image"
},
category: {
required: "Please Select Article Category"
},
},
errorClass: 'error-message',
submitHandler: function (form) {
// Set the hidden input value to the HTML content of the Quill editor
var quillContent = quill.root.innerHTML;
$('#article_des').val(quillContent);
let base_url = url_path;
var formData = new FormData(form);
$('#add_newsletter').text('Please wait...').attr('disabled', true);
$.ajaxSetup({
headers: {
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
},
});
$.ajax({
url: base_url + '/manage_insert_news',
type: 'POST',
data: formData,
processData: false,
contentType: false,
success: function (response) {
if (response.status == 200) {
toastr.success('News and Article Added Successfully');
setTimeout(function () {
window.location.href = base_url + "/manage-new-articles";
}, 3000);
} else {
toastr.error("Something went wrong");
}
$('#add_newsletter').attr('disabled', false).text('Submit');
},
});
}
});
});
</script>
<script>
FilePond.registerPlugin(
FilePondPluginImagePreview,
FilePondPluginImageExifOrientation,
FilePondPluginFileValidateSize,
);
FilePond.create(
document.querySelector('.pan-frontside')
);
</script>
@endsection

View File

@@ -0,0 +1,350 @@
@extends('admin.layouts.master')
@section('content')
@php
$currentPage = 'manage_cms';
@endphp
<style>
.error-message {
color: #FF0000;
}
form .error-message {
color: red;
/* Set your desired color here */
}
form .input_class.error-message {
color: #0e1726;
}
</style>
<div class="layout-px-spacing">
<div class="middle-content container-xxl p-0">
<div class="row layout-top-spacing ">
<div class="top-tabel">
<div class="row">
<div class="col-md-4">
<a class="d-flex align-items-center justify-content-center pl-2" href="{{ route('manage.Newarticles')}}">
<img class="back-btn" src="{{ asset('public/assets/img/left-arrow.svg')}}">
<h6 class="card-title p-0">Edit News & Articles </h6>
</a>
</div>
<div class="col-md-8">
</div>
</div>
</div>
<div class="col-xl-12 col-lg-12 col-sm-12 layout-spacing">
<div class="widget-content widget-content-area br-8 position-btn h-10">
<div class="view-details Article">
<form id="update_news" enctype="multipart/form-data">
<div class="row">
<div class="col-md-6">
<div class="form-group ">
<label for="company-name" class="label">Article Name</label>
<input type="hidden" name="article_id" value="{{ $news_article_data['id'] }}" class="form-control">
<input type="text" class="form-control" value="{{ $news_article_data['name'] }}" name="article_name">
</div>
</div>
<div class="col-md-6">
<!-- <div class="form-group ">
<label for="company-name" class="label">Image Upload</label> -->
<!-- <input type="file" class="form-control"> -->
<!-- <input type="file" class="filepond pan-frontside"
name="pancard_image_front" id="product-images"
data-max-file-size="3MB">
</div> -->
<div class="col-md-12">
<div class="form-group mt-3">
<label class="mr-2 mb-3" style="font-weight: 600;">Image Upload :</label>
<div class="multiple-file-upload">
<input type="file" class="filepond pan-frontside" name="article_image" id="imageInputNormal" data-max-file-size="3MB">
<div id="imageInputPreviewNormal" style="width: 30%;">
<img src="{{ asset('storage/app/public/' . $news_article_data['image']) }}" alt="Image Preview" style="width: 40%;">
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<!-- <div class="form-group ">
<label for="company-name" class="label">Description</label>
<div id="news-quill-edit" class="editor-quill" style="height: 100px;">{!! $news_article_data['description'] !!}</div>
<input type="hidden" id="article_dis" name="article_dis" value="{{ $news_article_data['description'] }}">
</div> -->
<div class="form-group">
<label for="company-name" class="label">Description</label>
<div id="news-quill-edit" class="editor-quill" style="height: 100px;">{!! $news_article_data['description'] !!}</div>
<input type="hidden" id="article_dis" name="article_dis" value="{{ $news_article_data['description'] }}">
</div>
</div>
<div class="col-md-6">
<div class="form-group ">
<label for="company-name" class="label">Thumbnail Image:</label>
<input type="file" name="article_thmb" id="imageInputThumb" class="form-control">
<div id="imagePreviewThumb" style="width: 30%;">
<img src="{{ asset('storage/app/public/' . $news_article_data['thumbnail_image']) }}" alt="Image Preview" style="width: 40%;">
</div>
</div>
</div>
<div class="col-md-12">
<button class="download-btn-custom mt-3 custom-width-10" id="update_news_btn">
<span>Save</span>
</a>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
@section('section_script')
<script src="../src/plugins/src/table/datatable/datatables.js"></script>
<script>
$('#zero-config').DataTable({
"dom": "<'dt--top-section'<'row'<'col-12 col-sm-6 d-flex justify-content-sm-start justify-content-center'l><'col-12 col-sm-6 d-flex justify-content-sm-end justify-content-center mt-sm-0 mt-3'f>>>" +
"<'table-responsive'tr>" +
"<'dt--bottom-section d-sm-flex justify-content-sm-between text-center'<'dt--pages-count mb-sm-0 mb-3'i><'dt--pagination'p>>",
"oLanguage": {
"oPaginate": {
"sPrevious": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline></svg>',
"sNext": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>'
},
"sInfo": "Showing page _PAGE_ of _PAGES_",
"sSearch": '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>',
"sSearchPlaceholder": "Search...",
"sLengthMenu": "Results : _MENU_",
},
"stripeClasses": [],
"lengthMenu": [7, 10, 20, 50],
"pageLength": 10
});
</script>
<script>
$(document).ready(function() {
$('<button><a class="extra-btn width-max-content" href="archive-manage-customers.php">View Archive List</a></button><button><ul class="navbar-item flex-row ms-lg-auto ms-0"><li class="nav-item dropdown action-dropdown order-lg-0 order-1"><a href="javascript:void(0);"class="nav-link dropdown-toggle user extra-btn" id="actionDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><div class="avatar-container"><div class="avatar avatar-sm avatar-indicators avatar-online"><h3>Export</h3></div></div></a><div class="dropdown-menu position-absolute" aria-labelledby="actionDropdown"><div class="dropdown-item"><a href="#"><span>Download Overview</span></a></div><div class="dropdown-item"><a href="#"><span>Download Patient Data</span></a></div><div class="dropdown-item"><a href="#"> <span>Download Selected</span></a></div></div></li></ul></button>').insertBefore("#zero-config_filter label");
});
// var quill = new Quill('#news-quill-edit', {
// theme: 'snow'
// });
</script>
<!-- <script>
$('#update_news_btn').on("click", function(e) {
// alert('kjh');
$('#update_news').validate({
// ignore: [],
debug: false,
rules: {
article_name: {
required: true
},
article_dis: {
required: true
},
// category: {
// required: true
// },
},
messages: {
article_name: {
required: "Please Enter Article name"
},
article_dis: {
required: "Please Enter Description"
},
// category: {
// required: "Please Select Article Category"
// },
},
errorClass: 'error-message',
submitHandler: function(form) {
let base_url = url_path;
var formData = new FormData(form);
$('#update_news_btn').text('Please wait...');
$('#update_news_btn').attr('disabled', true);
$.ajaxSetup({
headers: {
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
},
});
$.ajax({
url: base_url + '/manage_update_news',
type: 'POST',
data: formData,
processData: false,
contentType: false,
success: function(response) {
if (response.status == 200) {
toastr.success('News and Article Updated Successfully');
setTimeout(function() {
window.location.href = base_url + "/manage-new-articles";
}, 1000);
} else if (response.status == 204) {
toastr.error(response.error);
} else {
toastr.error("Something went wrong");
}
$('#update_news_btn').attr('disabled', false);
$('#update_news_btn').text('Submit');
},
});
}
});
});
</script> -->
<script>
// Initialize Quill editor
var quill = new Quill('#news-quill-edit', {
theme: 'snow'
});
$('#update_news_btn').on("click", function(e) {
$('#update_news').validate({
debug: false,
rules: {
article_name: {
required: true
},
article_dis: {
required: true
},
article_image: {
required: true
},
article_thmb: {
required: true
},
},
messages: {
article_name: {
required: "Please Enter Article name"
},
article_dis: {
required: "Please Enter Description"
},
article_image: {
required: "Please select image"
},
article_thmb: {
required: "Please select image"
},
},
errorClass: 'error-message',
submitHandler: function(form) {
// Set the hidden input value to the HTML content of the Quill editor
var quillContent = quill.root.innerHTML;
$('#article_dis').val(quillContent);
let base_url = url_path;
var formData = new FormData(form);
$('#update_news_btn').text('Please wait...');
$('#update_news_btn').attr('disabled', true);
$.ajaxSetup({
headers: {
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
},
});
$.ajax({
url: base_url + '/manage_update_news',
type: 'POST',
data: formData,
processData: false,
contentType: false,
success: function(response) {
if (response.status == 200) {
toastr.success('News and Article Updated Successfully');
setTimeout(function() {
window.location.href = base_url + "/manage-new-articles";
}, 1000);
} else if (response.status == 204) {
toastr.error(response.error);
} else {
toastr.error("Something went wrong");
}
$('#update_news_btn').attr('disabled', false);
$('#update_news_btn').text('Submit');
},
});
}
});
});
</script>
<script>
const imageInputEdit = document.getElementById('imageInputNormal');
const imagePreviewEdit = document.getElementById('imageInputPreviewNormal');
imageInputEdit.addEventListener('change', function() {
const file = this.files[0];
if (file) {
const reader = new FileReader();
reader.onload = function(event) {
const img = document.createElement('img');
img.src = event.target.result;
img.style.maxWidth = '200px';
img.style.maxHeight = '200px';
imagePreviewEdit.innerHTML = '';
imagePreviewEdit.appendChild(img);
};
reader.readAsDataURL(file);
} else {
imagePreviewEdit.innerHTML = '';
}
});
const imageInput = document.getElementById('imageInputThumb');
const imagePreview = document.getElementById('imagePreviewThumb');
imageInput.addEventListener('change', function() {
console.log("in change kjbck");
const file = this.files[0];
if (file) {
const reader = new FileReader();
reader.onload = function(event) {
const img = document.createElement('img');
img.src = event.target.result;
img.style.maxWidth = '200px';
img.style.maxHeight = '200px';
imagePreview.innerHTML = '';
imagePreview.appendChild(img);
};
reader.readAsDataURL(file);
} else {
imagePreview.innerHTML = '';
}
});
</script>
<script>
FilePond.registerPlugin(
FilePondPluginImagePreview,
FilePondPluginImageExifOrientation,
FilePondPluginFileValidateSize,
);
FilePond.create(
document.querySelector('.pan-frontside')
);
</script>
@endsection

View File

@@ -37,7 +37,7 @@ Route::get('/profile', [ManageProfileController ::class, 'index'])->name('profil
//*******************************************************manage users********************************************************
//*******************************************************manage customer********************************************************
Route::get('/manage-customer', [ManageCustomerController ::class, 'index'])->name('manage.customer');
Route::get('/manage-customer', [ ManageCustomerController ::class, 'index'])->name('manage.customer');
//*******************************************************manage restraunts********************************************************
Route::get('/manage-restaurants', [ManageRestrauntController ::class, 'index'])->name('manage.restaurants');
@@ -52,6 +52,13 @@ Route::get('/manage-contact', [ManageContactUsController ::class, 'index'])->nam
//*******************************************************manage cms********************************************************
//*******************************************************manage new&article********************************************************
Route::get('/manage-new-articles', [ManageNewsAndArticlesController ::class, 'index'])->name('manage.Newarticles');
Route::get('/change-article-Status', [ManageNewsAndArticlesController::class, 'change_news_article_Status']);
Route::get('/manage_edit_news/{id}', [ManageNewsAndArticlesController::class, 'edit'])->name('manage_edit_news');
Route::post('/manage_update_news', [ManageNewsAndArticlesController::class, 'update'])->name('manage_edit_news');
Route::delete('/delete_article/{id}', [ManageNewsAndArticlesController::class, 'delete_newsarticle']);
Route::get('/manage_add_news', [ManageNewsAndArticlesController::class, 'add'])->name('manage_add_news');
Route::post('/manage_insert_news', [ManageNewsAndArticlesController::class, 'insert']);
//*******************************************************manage newletter********************************************************
Route::get('/manage-newsletter', [ManageNewsLetterController ::class, 'index'])->name('manage.newLetter');