@@ -4,30 +4,170 @@ namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\Aboutus;
|
||||
use App\Models\MainCategory;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Exception;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
|
||||
|
||||
class AboutUsController extends Controller
|
||||
{
|
||||
public function index(){
|
||||
|
||||
return view('Admin.pages.manage_cms.manage_aboutus.manage_aboutsus');
|
||||
// public function index()
|
||||
// {
|
||||
|
||||
// return view('Admin.pages.manage_cms.manage_aboutus.manage_aboutsus');
|
||||
// }
|
||||
public function index(Request $request)
|
||||
{
|
||||
|
||||
|
||||
try {
|
||||
$about_data = Aboutus::with('category')->get();
|
||||
// @dd($about_data);
|
||||
|
||||
foreach ($about_data as $k => $val) {
|
||||
$about_data[$k]['thumbnail_image'] = ListingImageUrl('about_images', $val['thumbnail_image']);
|
||||
}
|
||||
|
||||
return view('Admin.pages.manage_cms.manage_aboutus.manage_aboutsus', compact('about_data'));
|
||||
} catch (Exception $e) {
|
||||
Log::error("Manage About Page Not Load " . $e->getMessage());
|
||||
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
|
||||
}
|
||||
}
|
||||
|
||||
public function edit($id)
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
try {
|
||||
$edit_service = Aboutus::find($id)->toArray();
|
||||
$about_us_cat = AboutUsCategory::all()->toArray();
|
||||
$about_us_cat = MainCategory::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'));
|
||||
return view('Admin.pages.manage_cms.manage_aboutus.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);
|
||||
}
|
||||
}
|
||||
|
||||
public function update(Request $request)
|
||||
{
|
||||
|
||||
|
||||
try {
|
||||
DB::beginTransaction();
|
||||
$about_data = Aboutus::where('id', $request->about_id)->first();
|
||||
|
||||
if ($request->hasFile('about_image')) {
|
||||
$image = $request->file('about_image');
|
||||
$normalImage = saveSingleImageWithoutCrop($image, 'about_images');
|
||||
$about_data->thumbnail_image = $normalImage;
|
||||
}
|
||||
|
||||
$about_data->title = $request->input('about_title');
|
||||
$about_data->description = $request->input('about_des');
|
||||
$about_data->category_xid = $request->input('category');
|
||||
|
||||
$about_data->save();
|
||||
|
||||
|
||||
DB::commit();
|
||||
|
||||
return jsonResponseWithSuccessMessage(__('success.update_data'));
|
||||
} catch (Exception $e) {
|
||||
DB::rollBack();
|
||||
Log::error("updateCustomerNewsArticle Services Page Load Failed " . $e->getMessage());
|
||||
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public function delete_about($id)
|
||||
{
|
||||
|
||||
|
||||
try {
|
||||
$blog = Aboutus::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 change_about_Status(Request $request)
|
||||
{
|
||||
|
||||
|
||||
try {
|
||||
$status = Aboutus::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 add()
|
||||
{
|
||||
$about_us_cat = MainCategory::all()->toArray();
|
||||
return view('Admin.pages.manage_cms.manage_aboutus.manage_about_us_add', compact('about_us_cat'));
|
||||
}
|
||||
|
||||
public function insert(Request $request)
|
||||
{
|
||||
|
||||
try {
|
||||
DB::beginTransaction();
|
||||
|
||||
if (isset($request->about_image)) {
|
||||
$image = $request->about_image;
|
||||
$image_db = null;
|
||||
} else {
|
||||
$image = null;
|
||||
$image_db = $request->about_image;
|
||||
}
|
||||
$tnormalImage = saveSingleImageWithoutCrop($image, 'about_images', $image_db);
|
||||
|
||||
|
||||
$about_data = new Aboutus();
|
||||
$about_data->title = $request->input('about_title');
|
||||
$about_data->description = $request->input('about_des');
|
||||
|
||||
$about_data->thumbnail_image = $tnormalImage;
|
||||
$about_data->category_xid = $request->input('category');
|
||||
$about_data->save();
|
||||
|
||||
DB::commit();
|
||||
return jsonResponseWithSuccessMessage(__('success.save_data'));
|
||||
// return $voucher_data;
|
||||
} catch (Exception $e) {
|
||||
DB::rollBack();
|
||||
Log::error("About Store Page Load Failed " . $e->getMessage());
|
||||
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,13 +2,71 @@
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Services\Admin\faqServices;
|
||||
use App\Models\Faq;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class FaqController extends Controller
|
||||
{
|
||||
public function index(){
|
||||
|
||||
return view('Admin.pages.manage_cms.manage_faq.manage_faq');
|
||||
protected $faqServices;
|
||||
public function __construct(faqServices $faqServices)
|
||||
{
|
||||
$this->faqServices = $faqServices;
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$data = $this->faqServices->viewfaq();
|
||||
return view('Admin.pages.manage_cms.manage_faq.manage_faq')->with($data);
|
||||
}
|
||||
|
||||
public function change_faqStatus(Request $request)
|
||||
{
|
||||
$status = Faq::find($request->program_id);
|
||||
$status->is_active = $request->status;
|
||||
$status->save();
|
||||
return response()->json(['success' => 'Status change successfully.']);
|
||||
}
|
||||
|
||||
|
||||
public function delete_faq($id)
|
||||
{
|
||||
$faq = Faq::find($id);
|
||||
if (!$faq) {
|
||||
return response()->json(['success' => false, 'status' => 404, 'message' => 'FAQ not found']);
|
||||
}
|
||||
|
||||
$faq->delete();
|
||||
return response()->json(['success' => true, 'status' => 200]);
|
||||
}
|
||||
|
||||
public function update(Request $request)
|
||||
{
|
||||
$faq = new Faq();
|
||||
$faq = Faq::find($request->faq_id);
|
||||
$faq->question = $request->question;
|
||||
$faq->answers = $request->answer;
|
||||
$faq->faq_category_id = $request->faq_categ;
|
||||
$faq->save();
|
||||
return response()->json(['success' => true, 'status' => 200]);
|
||||
}
|
||||
|
||||
public function store(Request $request)
|
||||
{
|
||||
try {
|
||||
$faq = new Faq();
|
||||
$faq->question = $request->question;
|
||||
$faq->answers = $request->answer;
|
||||
$faq->faq_category_id = $request->faq_categ;
|
||||
$faq->save();
|
||||
|
||||
return response()->json(['success' => true, 'status' => 200]);
|
||||
} catch (\Exception $e) {
|
||||
// Log the exception or handle it as needed
|
||||
return response()->json(['success' => false, 'error' => $e->getMessage(), 'status' => 500]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,11 +4,28 @@ namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\PrivacyPolicy;
|
||||
|
||||
class PrivacyPolicyController extends Controller
|
||||
{
|
||||
public function index(){
|
||||
// public function index(){
|
||||
|
||||
// return view('Admin.pages.manage_cms.manage_privacy.manage_privacy');
|
||||
// }
|
||||
// public function index(){
|
||||
// $view_privacy_policy = PrivacyPolicy::get()->toArray();
|
||||
// // dd($view_privacy_policy);
|
||||
// return view('Admin.pages.manage_cms.manage_privacy.manage_privacy');
|
||||
// }
|
||||
|
||||
public function index(){
|
||||
$view_policy = PrivacyPolicy::get()->toArray();
|
||||
// dd($view_privacy_policy);
|
||||
return view('Admin.pages.manage_cms.manage_privacy.manage_privacy');
|
||||
}
|
||||
|
||||
public function edit($id){
|
||||
$edit_privacy_policy = PrivacyPolicy::find($id)->toArray();
|
||||
return view('Admin.pages.manage_cms.manage_privacy.manage_privacy_policy_edit', compact('edit_privacy_policy'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Admin;
|
||||
|
||||
use App\Models\Termsandconditions;
|
||||
use App\Services\Admin\termsandconditionServices;
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Validation\Rule;
|
||||
use Validator;
|
||||
|
||||
class TermsController extends Controller
|
||||
{
|
||||
public function index(){
|
||||
|
||||
return view('Admin.pages.manage_cms.manage_terms.manage_terms');
|
||||
$terms_condition = Termsandconditions::all()->toArray();
|
||||
|
||||
return view('Admin.pages.manage_cms.manage_terms.manage_terms',compact('terms_condition'));
|
||||
|
||||
}
|
||||
// public function edit($id)
|
||||
// {
|
||||
// $terms = Termsandconditions::find($id)->toArray();
|
||||
// return view('Admin.pages.manage_cms.manage_terms.manage_terms_edit', compact('terms'));
|
||||
// }
|
||||
public function edit($id)
|
||||
{
|
||||
|
||||
$terms = Termsandconditions::find($id);
|
||||
// dd($terms);
|
||||
return view('Admin.pages.manage_cms.manage_terms.manage_terms_edit', compact('terms'));
|
||||
|
||||
}
|
||||
|
||||
public function update(Request $request)
|
||||
{
|
||||
|
||||
$validated = $request->validate([
|
||||
|
||||
'article_des' => 'required', // Add validation for article_des
|
||||
]);
|
||||
$update = Termsandconditions::find($request->custom_id);
|
||||
$update->message = $request->input('article_des');
|
||||
$update->save();
|
||||
return response()->json(['success' => true, 'status' => 200]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,9 +4,13 @@ namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
|
||||
|
||||
class Faq extends Model
|
||||
{
|
||||
use SoftDeletes;
|
||||
|
||||
use HasFactory;
|
||||
protected $table = 'faqs';
|
||||
|
||||
|
||||
12
app/Models/Termsandconditions.php
Normal file
12
app/Models/Termsandconditions.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Termsandconditions extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
protected $table = 'termsandconditions';
|
||||
}
|
||||
44
app/Services/Admin/about_us_service.php
Normal file
44
app/Services/Admin/about_us_service.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\manage_rentals;
|
||||
|
||||
use App\Models\RentalProduct;
|
||||
use App\Models\RentalProductImage;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use App\Http\Requests\Admin\ManageRentals\wedsRentRequest;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Illuminate\Support\Facades\File;
|
||||
use Illuminate\Support\Facades\Validator;
|
||||
use Exception;
|
||||
use App\Models\Aboutus;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class WedsrentService
|
||||
{
|
||||
|
||||
public function Review($id)
|
||||
{
|
||||
try {
|
||||
$view_service = Aboutus::where('id', $id)->get();
|
||||
return $view_service;
|
||||
} catch (Exception $ex) {
|
||||
Log::error($ex);
|
||||
throw $ex;
|
||||
}
|
||||
}
|
||||
|
||||
public function index_about_us()
|
||||
{
|
||||
try {
|
||||
$view_about_us = Aboutus::get();
|
||||
return $view_about_us;
|
||||
} catch (Exception $ex) {
|
||||
Log::error($ex);
|
||||
throw $ex;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
20
app/Services/Admin/faqServices.php
Normal file
20
app/Services/Admin/faqServices.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Admin;
|
||||
|
||||
use App\Models\Faq;
|
||||
use App\Models\MainCategory;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
|
||||
|
||||
class FaqServices
|
||||
{
|
||||
public function viewfaq()
|
||||
{
|
||||
$data['faq'] = Faq::orderBy('created_at', 'desc')->get();
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
17
app/Services/Admin/termsandconditionServices.php
Normal file
17
app/Services/Admin/termsandconditionServices.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Services\Admin;
|
||||
|
||||
use App\Models\TermsAndConditions;
|
||||
use App\Models\MainCategory;
|
||||
|
||||
class FaqServices
|
||||
{
|
||||
public function viewtermsandcondition()
|
||||
{
|
||||
$data['faq'] = TermsAndConditions::orderBy('id', 'desc')->get();
|
||||
return $data;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
33
database/migrations/2024_05_25_084200_create_faqs_table.php
Normal file
33
database/migrations/2024_05_25_084200_create_faqs_table.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?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('faqs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('faq_category_id');
|
||||
$table->foreign('faq_category_id')->references('id')->on('main_category');
|
||||
$table->longText('question', 100)->nullable();
|
||||
$table->longText('answers', 100)->nullable();
|
||||
$table->enum('is_active',['0','1'])->comment('0 = Inactive, 1 = Active');
|
||||
$table->softDeletes();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('faqs');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
<?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('termsandconditions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->unsignedBigInteger('category_xid');
|
||||
$table->foreign('category_xid')->references('id')->on('main_categories');
|
||||
$table->longtext('message')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('termsandconditions');
|
||||
}
|
||||
};
|
||||
@@ -62,12 +62,12 @@ $(document).on("click", "#add_about_btn", function (e) {
|
||||
if (result.status_code == 200) {
|
||||
toastr.success('About Us Data Added Successfully');
|
||||
setTimeout(function() {
|
||||
window.location.href = base_url + "/about_us";
|
||||
window.location.href = base_url + "/manage-about-us";
|
||||
}, 2000);
|
||||
} else {
|
||||
toastr.error('Something Went Wrong');
|
||||
setTimeout(function() {
|
||||
window.location.href = base_url + "/about_us";
|
||||
window.location.href = base_url + "/manage-about-us";
|
||||
}, 2000);
|
||||
}
|
||||
$('#add_about_btn').attr('disabled', false);
|
||||
|
||||
@@ -56,12 +56,12 @@ $('#update_about_us').on("click", function (e) {
|
||||
if (result.status_code == 200) {
|
||||
toastr.success('About Us Data Updated Successfully');
|
||||
setTimeout(function() {
|
||||
window.location.href = base_url + "/about_us";
|
||||
window.location.href = base_url + "/manage-about-us";
|
||||
}, 2000);
|
||||
} else {
|
||||
toastr.error('Something Went Wrong');
|
||||
setTimeout(function() {
|
||||
window.location.href = base_url + "/about_us";
|
||||
window.location.href = base_url + "/manage-about-us";
|
||||
}, 2000);
|
||||
}
|
||||
$('#update_about_us').attr('disabled', false);
|
||||
|
||||
@@ -59,7 +59,7 @@ $(document).on("click", ".delete_about_button", function (e) {
|
||||
success: function (response) {
|
||||
console.log(response);
|
||||
toastr.success("About Data Successfully");
|
||||
window.location.href = base_url + "/about_us";
|
||||
window.location.href = base_url + "/manage-about-us";
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -5,7 +5,7 @@ $(document).on("click", "#submit_faq", function (e) {
|
||||
rules: {
|
||||
question: {
|
||||
required: true,
|
||||
minlength: 255
|
||||
maxlength: 255
|
||||
},
|
||||
answer: {
|
||||
required: true,
|
||||
@@ -17,7 +17,7 @@ $(document).on("click", "#submit_faq", function (e) {
|
||||
messages: {
|
||||
question: {
|
||||
required: "Please enter the question.",
|
||||
minlength: "The question must be at least 255 characters long."
|
||||
maxlength: "The question must be at least 255 characters long."
|
||||
},
|
||||
answer: {
|
||||
required: "Please enter the answer.",
|
||||
@@ -61,36 +61,72 @@ $(document).on("click", "#submit_faq", function (e) {
|
||||
|
||||
// add faq end here
|
||||
|
||||
//delete
|
||||
$(document).ready(function () {
|
||||
$('.delete-faq-btn').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
//delete old
|
||||
// $(document).ready(function () {
|
||||
// $('.delete-faq-btn').on('click', function (e) {
|
||||
// e.preventDefault();
|
||||
|
||||
var faqId = $(this).data('faq-id');
|
||||
if (confirm('Are you sure you want to delete this FAQ?')) {
|
||||
$.ajax({
|
||||
url: url_path + '/delete_faq/' + faqId,
|
||||
type: 'DELETE',
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
},
|
||||
success: function (response) {
|
||||
if (response.status == 200) {
|
||||
toastr.success('Faq deleted successfully');
|
||||
setTimeout(function () {
|
||||
window.location.href = url_path + "/faq";
|
||||
}, 1000);
|
||||
} else {
|
||||
toastr.error("Something went wrong");
|
||||
}
|
||||
},
|
||||
error: function () {
|
||||
toastr.error("Error deleting FAQ");
|
||||
}
|
||||
});
|
||||
// var faqId = $(this).data('faq-id');
|
||||
// if (confirm('Are you sure you want to delete this FAQ?')) {
|
||||
// $.ajax({
|
||||
// url: url_path + '/delete_faq/' + faqId,
|
||||
// type: 'DELETE',
|
||||
// headers: {
|
||||
// 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
||||
// },
|
||||
// success: function (response) {
|
||||
// if (response.status == 200) {
|
||||
// toastr.success('Faq deleted successfully');
|
||||
// setTimeout(function () {
|
||||
// window.location.href = url_path + "/faq";
|
||||
// }, 1000);
|
||||
// } else {
|
||||
// toastr.error("Something went wrong");
|
||||
// }
|
||||
// },
|
||||
// error: function () {
|
||||
// toastr.error("Error deleting FAQ");
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
|
||||
//new delete with modal
|
||||
$(document).on("click", ".delete_about", function () {
|
||||
var delete_id = $(this).data('faq-id'); // Corrected this line
|
||||
$('#delete_about_id').val(delete_id);
|
||||
});
|
||||
|
||||
$(document).on("click", ".delete_about_button", function (e) {
|
||||
e.preventDefault();
|
||||
let base_url = url_path;
|
||||
var faqId = $('#delete_about_id').val(); // Ensure you're getting the correct ID
|
||||
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
|
||||
},
|
||||
});
|
||||
$.ajax({
|
||||
type: "DELETE",
|
||||
url: base_url + "/delete_faq/" + faqId,
|
||||
success: function (response) {
|
||||
if(response.success) {
|
||||
toastr.success("FAQ successfully deleted");
|
||||
window.location.href = base_url + "/faq";
|
||||
} else {
|
||||
toastr.error(response.message);
|
||||
}
|
||||
},
|
||||
error: function (response) {
|
||||
toastr.error("An error occurred while deleting the FAQ");
|
||||
}
|
||||
});
|
||||
});
|
||||
//end delete
|
||||
|
||||
|
||||
|
||||
// change status
|
||||
$(".switch-btn").on("change", ".active_newsletter", function () {
|
||||
|
||||
@@ -1,99 +1,132 @@
|
||||
// privacy policy for cust
|
||||
$('#update_terms').on("click", function (e) {
|
||||
$('#terms_form').validate({
|
||||
ignore: [],
|
||||
debug: false,
|
||||
rules: {
|
||||
article_des: {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
article_des: {
|
||||
required: "Please Enter Terms and Condition"
|
||||
}
|
||||
},
|
||||
submitHandler: function (form) {
|
||||
let base_url = url_path;
|
||||
var formData = new FormData(form);
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
|
||||
},
|
||||
});
|
||||
$(document).ready(function() {
|
||||
var quill = new Quill('#terms-quill-edit', {
|
||||
theme: 'snow'
|
||||
});
|
||||
|
||||
var storedMessage = document.getElementById('stored-terms-message').value;
|
||||
quill.clipboard.dangerouslyPasteHTML(storedMessage);
|
||||
|
||||
$('#update_terms').on("click", function(e) {
|
||||
e.preventDefault();
|
||||
$('#terms_form').validate({
|
||||
ignore: [],
|
||||
debug: false,
|
||||
rules: {
|
||||
article_des: {
|
||||
required: true,
|
||||
minlength:1000,
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
article_des: {
|
||||
required: "Please Enter Terms and Condition",
|
||||
minlength:"Please Enter Terms and Condition"
|
||||
}
|
||||
},
|
||||
errorClass: 'error-message',
|
||||
|
||||
submitHandler: function(form) {
|
||||
// Get the HTML content from Quill editor
|
||||
var article_des = quill.root.innerHTML;
|
||||
|
||||
if (article_des.trim() === '<p><br></p>') {
|
||||
toastr.error("Please Enter Terms and Condition");
|
||||
return false;
|
||||
}
|
||||
|
||||
let base_url = url_path;
|
||||
var custom_id = document.querySelector('input[name="custom_id"]').value;
|
||||
|
||||
// Create a form data object
|
||||
var formData = new FormData(form);
|
||||
formData.append('article_des', article_des);
|
||||
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
|
||||
},
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: base_url + '/update_terms',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function (response) {
|
||||
success: function(response) {
|
||||
if (response.status == 200) {
|
||||
toastr.success('Terms and Condtion Data Updated Successfully');
|
||||
setTimeout(function () {
|
||||
toastr.success('Terms and Condition Data Updated Successfully');
|
||||
setTimeout(function() {
|
||||
window.location.href = base_url + "/terms";
|
||||
}, 1000);
|
||||
}else {
|
||||
} else {
|
||||
toastr.error("Something went wrong");
|
||||
}
|
||||
},
|
||||
error: function(response) {
|
||||
toastr.error("An error occurred while updating the terms");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Trigger form validation
|
||||
$('#terms_form').submit();
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$.validator.addMethod("quillNotEmpty", function(value, element) {
|
||||
var quill = new Quill('#terms-quill-edit');
|
||||
return quill.getText().trim().length > 0;
|
||||
}, "Please enter terms and conditions");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// privacy policy for rest
|
||||
$('#update_terms_rest').on("click", function (e) {
|
||||
$('#update_terms_rest_form').validate({
|
||||
ignore: [],
|
||||
debug: false,
|
||||
rules: {
|
||||
article_des_rest: {
|
||||
required: true,
|
||||
quillNotEmpty: true
|
||||
}
|
||||
},
|
||||
messages: {
|
||||
article_des_rest: {
|
||||
required: "Please Enter Terms and Condition"
|
||||
}
|
||||
},
|
||||
errorClass: 'error-message',
|
||||
submitHandler: function (form) {
|
||||
let base_url = url_path;
|
||||
var formData = new FormData(form);
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
|
||||
},
|
||||
});
|
||||
$.ajax({
|
||||
url: base_url + '/update_terms_rest',
|
||||
type: 'POST',
|
||||
data: formData,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function (response) {
|
||||
if (response.status == 200) {
|
||||
toastr.success('Terms and Condtion Data Updated Successfully');
|
||||
setTimeout(function () {
|
||||
window.location.href = base_url + "/terms";
|
||||
}, 1000);
|
||||
}
|
||||
else if (response.status == 204) {
|
||||
toastr.error(response.error);
|
||||
}
|
||||
else {
|
||||
toastr.error("Something went wrong");
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
// $('#update_terms_rest').on("click", function (e) {
|
||||
// $('#update_terms_rest_form').validate({
|
||||
// ignore: [],
|
||||
// debug: false,
|
||||
// rules: {
|
||||
// article_des_rest: {
|
||||
// required: true,
|
||||
// quillNotEmpty: true
|
||||
// }
|
||||
// },
|
||||
// messages: {
|
||||
// article_des_rest: {
|
||||
// required: "Please Enter Terms and Condition"
|
||||
// }
|
||||
// },
|
||||
// errorClass: 'error-message',
|
||||
// submitHandler: function (form) {
|
||||
// let base_url = url_path;
|
||||
// var formData = new FormData(form);
|
||||
// $.ajaxSetup({
|
||||
// headers: {
|
||||
// "X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
|
||||
// },
|
||||
// });
|
||||
// $.ajax({
|
||||
// url: base_url + '/update_terms_rest',
|
||||
// type: 'POST',
|
||||
// data: formData,
|
||||
// processData: false,
|
||||
// contentType: false,
|
||||
// success: function (response) {
|
||||
// if (response.status == 200) {
|
||||
// toastr.success('Terms and Condtion Data Updated Successfully');
|
||||
// setTimeout(function () {
|
||||
// window.location.href = base_url + "/terms";
|
||||
// }, 1000);
|
||||
// }
|
||||
// else if (response.status == 204) {
|
||||
// toastr.error(response.error);
|
||||
// }
|
||||
// else {
|
||||
// toastr.error("Something went wrong");
|
||||
// }
|
||||
// },
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// });
|
||||
@@ -0,0 +1,110 @@
|
||||
@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.aboutUs') }}">
|
||||
<img class="back-btn" src="{{ asset('public/assets/img/left-arrow.svg') }}">
|
||||
<h6 class="card-title p-0">Add About Us</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_about_form" enctype="multipart/form-data">
|
||||
@csrf
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label for="company-name" class="label">Title</label>
|
||||
<input type="text" name="about_title" 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="about_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-6">
|
||||
<div class="form-group ">
|
||||
<label for="company-name" class="label">Description</label>
|
||||
<div id="about-quill-add" name="about_des" class="editor-quill"
|
||||
style="height: 100px;"></div>
|
||||
<input type="hidden" id="about_des" name="about_des">
|
||||
</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 ($about_us_cat as $about_us_category)
|
||||
<option value="{{ $about_us_category['id'] }}">{{ $about_us_category['name'] }}
|
||||
</option>
|
||||
@endforeach
|
||||
<!-- Add more options as needed -->
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<button type="submit" id="add_about_btn"
|
||||
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="https://code.jquery.com/jquery-3.6.4.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.5/jquery.validate.min.js"></script>
|
||||
<script src="{{ asset('public/assets/js/admin/manage_cms/manage_aboutus/add_about_us.js') }}"></script>
|
||||
|
||||
<script>
|
||||
var quill = new Quill('#about-quill-add', {
|
||||
theme: 'snow'
|
||||
});
|
||||
|
||||
// Listen for changes and update the hidden input with the HTML content
|
||||
quill.on('text-change', function() {
|
||||
var htmlContent = quill.root.innerHTML;
|
||||
document.getElementById('about_des').value = htmlContent;
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -20,53 +20,74 @@
|
||||
</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 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.aboutUs') }}">
|
||||
<img class="back-btn" src="{{ asset('public/assets/img/left-arrow.svg')}}">
|
||||
<h6 class="card-title p-0">Edit Details</h6>
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
|
||||
</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 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_about" enctype="multipart/form-data">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label for="company-name" class="label">Title</label>
|
||||
<input type="hidden" name="about_id" value="{{ $edit_service['id'] }}" class="form-control">
|
||||
<input type="text" class="form-control" value="{{ $edit_service['title'] }}" name="about_title">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label for="company-name" class="label">Image Upload</label>
|
||||
<input type="file" name="about_image" id="imageInputNormal" class="form-control">
|
||||
<div id="imageInputPreviewNormal" style="width: 30%;">
|
||||
<img src="{{ $edit_service['thumbnail_image'] }}" alt="Image Preview" style="width: 40%;">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group ">
|
||||
<label for="company-name" class="label">Description</label>
|
||||
<div id="about-quill-edit" class="editor-quill" style="height: 100px;">{!! $edit_service['description'] !!}</div>
|
||||
<input type="hidden" id="about_des" name="about_des" value="{{ $edit_service['description'] }}">
|
||||
</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 ($about_us_cat as $about_us_catg)
|
||||
<option value="{{$about_us_catg['id']}}" @if($edit_service['category_xid'] == $about_us_catg['id']) selected @endif>{{$about_us_catg['name']}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<button class="download-btn-custom mt-3 custom-width-10" id="update_about_us">
|
||||
<span>Save</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -76,5 +97,12 @@
|
||||
var quill = new Quill('#about-quill-edit', {
|
||||
theme: 'snow'
|
||||
});
|
||||
// Listen for changes and update the hidden input with the HTML content
|
||||
quill.on('text-change', function() {
|
||||
var htmlContent = quill.root.innerHTML;
|
||||
document.getElementById('about_des').value = htmlContent;
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
<script src="{{ asset('public/assets/js/admin/manage_cms/manage_aboutus/edit_about_us.js')}}"></script>
|
||||
|
||||
@endsection
|
||||
|
||||
@@ -6,89 +6,128 @@
|
||||
@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-12 left d-flex align-items-center justify-content-between"
|
||||
style="gap: 15px;">
|
||||
<h6 class="card-title pl-2">Manage About Us</h6>
|
||||
<a class="view-details-btn mr-2" href="manage-aboutus-edit.php">
|
||||
<span>Edit Details</span>
|
||||
</a>
|
||||
</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 About Us</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 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">
|
||||
<p>
|
||||
Vorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam
|
||||
eu turpis molestie, dictum est a, mattis tellus. Sed
|
||||
dignissim, metus nec fringilla accumsan, risus sem sollicitudin
|
||||
lacus, ut interdum tellus elit sed risus. Maecenas eget
|
||||
condimentum velit, sit amet feugiat lectus. Class aptent taciti
|
||||
sociosqu ad litora torquent per conubia nostra, per
|
||||
inceptos himenaeos.
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<p>
|
||||
Vorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam
|
||||
eu turpis molestie, dictum est a, mattis tellus. Sed
|
||||
dignissim, metus nec fringilla accumsan, risus sem sollicitudin
|
||||
lacus, ut interdum tellus elit sed risus. Maecenas eget
|
||||
condimentum velit, sit amet feugiat lectus. Class aptent taciti
|
||||
sociosqu ad litora torquent per conubia nostra, per
|
||||
inceptos himenaeos.
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<p>
|
||||
Vorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam
|
||||
eu turpis molestie, dictum est a, mattis tellus. Sed
|
||||
dignissim, metus nec fringilla accumsan, risus sem sollicitudin
|
||||
lacus, ut interdum tellus elit sed risus. Maecenas eget
|
||||
condimentum velit, sit amet feugiat lectus. Class aptent taciti
|
||||
sociosqu ad litora torquent per conubia nostra, per
|
||||
inceptos himenaeos.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-8">
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</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 about_table" style="width:100%">
|
||||
<thead class="text-center">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<tr>
|
||||
<th class="text-start">Sr no</th>
|
||||
<th class="text-start">Title</th>
|
||||
<th class="text-start">Image</th>
|
||||
<th class="text-start">Category</th>
|
||||
<th class="text-start">Added Date</th>
|
||||
<th class="no-content">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="text-center">
|
||||
@foreach ( $about_data as $about_us_data)
|
||||
<tr>
|
||||
<td class="text-start">{{$loop->iteration}}</td>
|
||||
<td class="text-start">{{ $about_us_data->title }}</td>
|
||||
|
||||
<td class="text-center">
|
||||
<img src="{{$about_us_data->thumbnail_image}}" height="50px" width="50px">
|
||||
</td>
|
||||
<td class="text-start">
|
||||
{{ $about_us_data->category->name }}
|
||||
</td>
|
||||
<td class="text-start">
|
||||
{{ \Carbon\Carbon::parse($about_us_data['created_at'])->format('m/d/Y') }}</td>
|
||||
<td>
|
||||
<div class="dropout">
|
||||
<button class="more">
|
||||
<span></span>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</button>
|
||||
<ul> <li>
|
||||
<div class="switch-btn">
|
||||
<input data-id="{{ $about_us_data['id'] }}"
|
||||
{{ $about_us_data['is_active'] ? 'checked' : '' }}
|
||||
type="checkbox" class="active_about"
|
||||
id="switch{{ $about_us_data['id'] }}" switch="bool" />
|
||||
<label for="switch{{ $about_us_data['id'] }}"
|
||||
data-on-label="Active" data-off-label="Expired"></label>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ url('about_us_edit/' . $about_us_data['id']) }}"
|
||||
class="edit-faq-btn" >
|
||||
<img src="{{ asset('public/assets/img/edit.svg') }}" />
|
||||
<span>Edit</span>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<a class="delete_about" data-id="{{ $about_us_data['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>
|
||||
</div>
|
||||
</div>
|
||||
<!-- BEGIN FOOTER -->
|
||||
|
||||
<!-- END FOOTER -->
|
||||
<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_about_id" name="about_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_about_button" data-dismiss="modal">Yes</a>
|
||||
</div>
|
||||
|
||||
|
||||
@endsection
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('section_script')
|
||||
<script src="{{ asset('public/assets/js/admin/manage_cms/manage_aboutus/main.js') }}"></script>
|
||||
<script>
|
||||
|
||||
|
||||
</script>
|
||||
@endsection
|
||||
<script>
|
||||
|
||||
$(document).ready(function() {
|
||||
$('<button><a class="extra-btn width-max-content" href="{{ route('about_us_add') }}">Add New</a ></button > ')
|
||||
.insertBefore("#zero-config_filter label");
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
||||
@@ -1,45 +1,93 @@
|
||||
@extends('admin.layouts.master')
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$currentPage = 'manage-faq';
|
||||
@endphp
|
||||
@php
|
||||
$currentPage = 'manage-faq';
|
||||
@endphp
|
||||
<style>
|
||||
.action-buttons {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
/* Adjust the gap as needed */
|
||||
}
|
||||
|
||||
.action-buttons .switch-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.action-buttons a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
/* Ensure the text color matches your theme */
|
||||
}
|
||||
|
||||
.action-buttons a img {
|
||||
width: 20px;
|
||||
/* Adjust the width as needed */
|
||||
height: 20px;
|
||||
/* Adjust the height as needed */
|
||||
margin-right: 5px;
|
||||
/* Adjust the spacing between the icon and text */
|
||||
}
|
||||
</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">
|
||||
<h6 class="card-title">Manage FAQ</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 FAQ</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="text-start">Sr no</th>
|
||||
<th class="text-start">Question</th>
|
||||
<th class="text-start">Answer</th>
|
||||
<th class="text-start">FAQ </th>
|
||||
<th class="text-start">Added Date</th>
|
||||
<th class="no-content">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="text-center">
|
||||
<tr>
|
||||
<td class="text-start">1</td>
|
||||
<td class="text-start">Lorem</td>
|
||||
<td class="text-start">Lorem</td>
|
||||
<td class="text-start">Lorem</td>
|
||||
<td class="text-start">08/22/2023</td>
|
||||
<td>
|
||||
<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" style="width:100%">
|
||||
<thead class="text-center">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<tr>
|
||||
<th class="text-start">Sr no</th>
|
||||
<th class="text-start">Question</th>
|
||||
<th class="text-start">Answer</th>
|
||||
<th class="text-start">FAQ</th>
|
||||
<th class="text-start">Added Date</th>
|
||||
<th class="no-content">Action</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class="text-center">
|
||||
@foreach ($faq as $index => $faqs)
|
||||
<tr>
|
||||
<td class="text-start">{{ $index + 1 }}</td>
|
||||
<td class="text-start">{{ $faqs['question'] }}</td>
|
||||
<td class="text-start">
|
||||
@if (isset($faqs['answers']))
|
||||
{{ $faqs['answers'] }}
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-start">
|
||||
@if($faqs['faq_category_id'] == 1)
|
||||
Customer
|
||||
@else
|
||||
Restaurant
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-start">
|
||||
@if (isset($faqs['created_at']))
|
||||
{{ \Carbon\Carbon::parse($faqs['created_at'])->format('m/d/Y') }}
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<!-- <td>
|
||||
<div class="dropout">
|
||||
<button class="more">
|
||||
<span></span>
|
||||
@@ -49,102 +97,196 @@
|
||||
<ul>
|
||||
<li>
|
||||
<div class="switch-btn">
|
||||
<input type="checkbox" id="switch18" switch="bool"
|
||||
checked />
|
||||
<label for="switch18" data-on-label="Active"
|
||||
<input data-id="{{ $faqs['id'] }}"
|
||||
{{ $faqs['is_active'] ? 'checked' : '' }} type="checkbox"
|
||||
class="active_newsletter" id="switch{{ $faqs['id'] }}"
|
||||
switch="bool" />
|
||||
<label for="switch{{ $faqs['id'] }}" data-on-label="Active"
|
||||
data-off-label="Expired"></label>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<a href="manage-passports-edit.php" data-toggle="modal" data-target="#edit-faq-modal">
|
||||
<img src="../src/assets/img/edit.svg" />
|
||||
<a href="#" data-toggle="modal" data-target="#edit-faq-modal"
|
||||
class="edit-faq-btn" data-faq-id="{{ $faqs['id'] }}"
|
||||
data-faq-question="{{ $faqs['question'] }}"
|
||||
data-faq-answer="{{ $faqs['answers'] }}"
|
||||
data-faq-category="{{ $faqs['faq_category_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="../src/assets/img/delete-recycle.svg" />
|
||||
<a href="#" class="delete-faq-btn"
|
||||
data-faq-id="{{ $faqs['id'] }}"
|
||||
data-faq-question="{{ $faqs['question'] }}"
|
||||
data-faq-answer="{{ $faqs['answers'] }}"
|
||||
data-faq-category="{{ $faqs['faq_category_id'] }}">
|
||||
<img src="{{ asset('public/assets/img/delete-recycle.svg') }}" />
|
||||
<span>Delete</span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="text-start">2</td>
|
||||
<td class="text-start">Lorem</td>
|
||||
<td class="text-start">Lorem</td>
|
||||
<td class="text-start">Lorem</td>
|
||||
<td class="text-start">08/22/2023</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-passports-edit.php" data-toggle="modal" data-target="#edit-faq-modal">
|
||||
<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>
|
||||
</td> -->
|
||||
<td>
|
||||
<div class="action-buttons">
|
||||
<!-- Active Switch Button -->
|
||||
<div class="switch-btn">
|
||||
<input data-id="{{ $faqs['id'] }}" {{ $faqs['is_active'] ? 'checked' : '' }} type="checkbox" class="active_newsletter" id="switch{{ $faqs['id'] }}" switch="bool" />
|
||||
<label for="switch{{ $faqs['id'] }}" data-on-label="Active" data-off-label="Expired"></label>
|
||||
</div>
|
||||
|
||||
<!-- Edit Button -->
|
||||
<a href="#" data-toggle="modal" data-target="#edit-faq-modal" class="edit-faq-btn" data-faq-id="{{ $faqs['id'] }}" data-faq-question="{{ $faqs['question'] }}" data-faq-answer="{{ $faqs['answers'] }}" data-faq-category="{{ $faqs['faq_category_id'] }}">
|
||||
<img src="{{ asset('public/assets/img/edit.svg') }}" />
|
||||
<span>Edit</span>
|
||||
</a>
|
||||
|
||||
<!-- Delete Button -->
|
||||
<!-- <a href="#" class="delete-faq-btn" data-faq-id="{{ $faqs['id'] }}" data-faq-question="{{ $faqs['question'] }}" data-faq-answer="{{ $faqs['answers'] }}" data-faq-category="{{ $faqs['faq_category_id'] }}">
|
||||
<img src="{{ asset('public/assets/img/delete-recycle.svg') }}" />
|
||||
<span>Delete</span>
|
||||
</a> -->
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<a href="#" class="delete_about" data-faq-id="{{ $faqs['id'] }}" data-toggle="modal" data-target="#delete-modal">
|
||||
<img src="{{ asset('public/assets/img/delete-recycle.svg') }}" />
|
||||
<span>Delete</span>
|
||||
</a>
|
||||
<input type="hidden" id="delete_about_id">
|
||||
|
||||
</div>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</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">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
<form id="store_faq">
|
||||
@csrf
|
||||
<div class="col-md-12 mb-3">
|
||||
<label for="add-faq-question">Question</label>
|
||||
<input id="add_faq_question" name="question" class="form-control" type="text">
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<label for="add-faq-answer">Answer</label>
|
||||
<textarea id="add_faq_answer" name="answer" rows="5" cols="50" class="form-control"></textarea>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<label for="add-faq-category">Select Category</label>
|
||||
<select class="form-control input_class w-30 mr-2" name="faq_categ" id="add_faq_category">
|
||||
<option value="">Select</option>
|
||||
<option value="1">Customer</option>
|
||||
<option value="2">Restaurant</option>
|
||||
</select>
|
||||
</div>
|
||||
<button type="submit" id="submit_faq" class="download-btn-custom mt-4 mx-auto w-25">
|
||||
<span>Save</span>
|
||||
</button>
|
||||
</form>
|
||||
</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">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="row">
|
||||
<form id="edit_faq">
|
||||
<div class="col-md-12 mb-3">
|
||||
@csrf
|
||||
<label for="">Question</label>
|
||||
<input class="form-control" name="question" type="text"
|
||||
value="{{ $faqs['question'] }}" id="edit-question">
|
||||
</div>
|
||||
<input type="hidden" value="{{ $faqs['id'] }}">
|
||||
<div class="col-md-12">
|
||||
<label for="">Answer</label>
|
||||
<textarea name="answer" id="edit-answer" rows="5" cols="50" class="form-control">{{ $faqs['answers'] }}</textarea>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<label for="add-faq-category">Select Category</label>
|
||||
<select class="form-control w-30 mr-2 input_class" name="faq_categ" id="add_faq_category">
|
||||
<option value="">Select</option>
|
||||
<option value="1" {{ $faqs['faq_category_id'] == 1 ? 'selected' : '' }}>Customer
|
||||
</option>
|
||||
<option value="2" {{ $faqs['faq_category_id'] == 2 ? 'selected' : '' }}>
|
||||
Restaurant</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<button type="submit" id="update_faq" class="download-btn-custom mt-4 mx-auto w-25">
|
||||
<span>Save</span>
|
||||
</button>
|
||||
</form>
|
||||
</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">
|
||||
<input type="hidden" id="delete_about_id" name="about_id">
|
||||
<!-- <p class="modal-text">Are you sure you want to<br>Delete </p> -->
|
||||
<p class="modal-text">Are you sure you ? </p>
|
||||
<!-- <h6>Are you sure want to delete this content</h6> -->
|
||||
<div class="modal-btn d-flex ">
|
||||
<a type="button" class="extra-btn" data-dismiss="modal">Cancel</a>
|
||||
<a type="button" class="download-btn-custom delete_about_button" data-dismiss="modal">Delete</a>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
@section('section_script')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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" data-toggle="modal" data-target="#add-faq-modal" href="">Add</a></button>').insertBefore("#zero-config_filter label");
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@section('section_script')
|
||||
|
||||
|
||||
|
||||
<script src="{{ asset('public/assets/js/admin/manage_cms/manage_faq/main.js') }}"></script>
|
||||
<script src="{{ asset('public/assets/js/admin/manage_cms/manage_faq/add_faq.js') }}"></script>
|
||||
<script src="{{ asset('public/assets/js/admin/manage_cms/manage_faq/edit_faq.js') }}"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(' <button><a class="extra-btn width-max-content" data-toggle="modal" data-target="#add_faq_modal" href="">Add</a></button>')
|
||||
.insertBefore("#zero-config_filter label");
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
@@ -8,7 +8,7 @@ $currentPage = 'manage-privacy';
|
||||
|
||||
|
||||
|
||||
<div class="layout-px-spacing">
|
||||
<!-- <div class="layout-px-spacing">
|
||||
<div class="middle-content container-xxl p-0">
|
||||
<div class="row layout-top-spacing ">
|
||||
<div class="top-tabel">
|
||||
@@ -78,7 +78,97 @@ $currentPage = 'manage-privacy';
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</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-12 left d-flex align-items-center justify-content-between"
|
||||
style="gap: 15px;">
|
||||
<h6 class="card-title pl-2">Privacy Policy Customer</h6>
|
||||
|
||||
@if(!empty($view_privacy_policy))
|
||||
<a class="view-details-btn mr-2" href="{{ url('/privacy_edit/'.$view_privacy_policy[0]['id']) }}">
|
||||
<span>Edit Details</span>
|
||||
</a>
|
||||
@else
|
||||
<p>No privacy policy found.</p>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</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">
|
||||
<p>
|
||||
{!! $view_privacy_policy[0]['description'] !!}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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;">
|
||||
<h6 class="card-title pl-2">Privacy Policy Resturant</h6>
|
||||
<a class="view-details-btn mr-2" href="{{ url('/privacy_edit_rest/'.$view_privacy_policy[1]['id']) }}">
|
||||
<span>Edit Details</span>
|
||||
</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">
|
||||
<p>{!! $view_privacy_policy[1]['description'] !!}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
@extends('admin.layouts.master')
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$currentPage = 'manage_cms';
|
||||
@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-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="{{ route('privacy')}}">
|
||||
<img class="back-btn" src="{{ asset('public/assets/img/left-arrow.svg')}}">
|
||||
<h6 class="card-title p-0">Edit Details for customer</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">
|
||||
<form id="privacy_policy_form">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<input type="hidden" name="privacy_custom_id" value="{{ $edit_privacy_policy['id'] }}">
|
||||
<div id="terms-quill-edit" value="{{ $edit_privacy_policy['description'] }}" name="privacy_policy" class="editor-quill" style="height: 300px;">{!! $edit_privacy_policy['description'] !!}</div>
|
||||
<input type="hidden" id="privacy_policy" name="privacy_policy" value="{{ $edit_privacy_policy['description'] }}" />
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<button type="submit" id="update_privacy_policy" class="download-btn-custom mt-3 custom-width-10" >
|
||||
<span>Update</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- END MAIN CONTAINER -->
|
||||
|
||||
|
||||
|
||||
@endsection
|
||||
@section('section_script')
|
||||
<script>
|
||||
var quill = new Quill('#terms-quill-edit', {
|
||||
theme: 'snow'
|
||||
});
|
||||
|
||||
// Listen for changes and update the hidden input with the HTML content
|
||||
quill.on('text-change', function() {
|
||||
var htmlContent = quill.root.innerHTML;
|
||||
document.getElementById('privacy_policy').value = htmlContent;
|
||||
});
|
||||
</script>
|
||||
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.5/jquery.validate.min.js"></script>
|
||||
<script src="{{ asset('public/assets/js/admin/manage_cms/manage_privacy_policy/privacy_policy.js')}}"></script>
|
||||
@endsection
|
||||
@@ -15,70 +15,39 @@
|
||||
<div class="col-md-12 left d-flex align-items-center justify-content-between"
|
||||
style="gap: 15px;">
|
||||
<h6 class="card-title pl-2">Terms & Conditions</h6>
|
||||
<a class="view-details-btn mr-2" href="manage-terms-edit.php">
|
||||
<span>Edit Details</span>
|
||||
</a>
|
||||
<a class="view-details-btn mr-2"
|
||||
href="{{ route('terms_edit', ['id' => $terms_condition[0]['id']]) }}"
|
||||
data-id="{{ $terms_condition[0]['id'] }}">
|
||||
<span>Edit</span>
|
||||
</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">
|
||||
<p>
|
||||
Vorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam
|
||||
eu turpis molestie, dictum est a, mattis tellus. Sed
|
||||
dignissim, metus nec fringilla accumsan, risus sem sollicitudin
|
||||
lacus, ut interdum tellus elit sed risus. Maecenas eget
|
||||
condimentum velit, sit amet feugiat lectus. Class aptent taciti
|
||||
sociosqu ad litora torquent per conubia nostra, per
|
||||
inceptos himenaeos.
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<p>
|
||||
Vorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam
|
||||
eu turpis molestie, dictum est a, mattis tellus. Sed
|
||||
dignissim, metus nec fringilla accumsan, risus sem sollicitudin
|
||||
lacus, ut interdum tellus elit sed risus. Maecenas eget
|
||||
condimentum velit, sit amet feugiat lectus. Class aptent taciti
|
||||
sociosqu ad litora torquent per conubia nostra, per
|
||||
inceptos himenaeos.
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<p>
|
||||
Vorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam
|
||||
eu turpis molestie, dictum est a, mattis tellus. Sed
|
||||
dignissim, metus nec fringilla accumsan, risus sem sollicitudin
|
||||
lacus, ut interdum tellus elit sed risus. Maecenas eget
|
||||
condimentum velit, sit amet feugiat lectus. Class aptent taciti
|
||||
sociosqu ad litora torquent per conubia nostra, per
|
||||
inceptos himenaeos.
|
||||
</p>
|
||||
</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">
|
||||
@csrf
|
||||
<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">
|
||||
<p>
|
||||
{!! $terms_condition[0]['message'] !!}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
@extends('admin.layouts.master')
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$currentPage = 'manage-terms';
|
||||
@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="{{ route('manage.terms') }}">
|
||||
<img class="back-btn" src="{{ asset('public/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="terms-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 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">
|
||||
@csrf
|
||||
<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">
|
||||
<form id="terms_form">
|
||||
<div class="col-md-12">
|
||||
<input type="hidden" name="custom_id" value="{{ $terms->id }}">
|
||||
<input type="hidden" id="stored-terms-message" value="{{ $terms->message }}" >
|
||||
<div id="terms-quill-edit" name="article_des" class="editor-quill" style="height: 300px;" minlength="10" ></div>
|
||||
<span class="error-message" id="error-message"></span>
|
||||
|
||||
</div>
|
||||
<div class="col-md-12">
|
||||
<button type="submit" id="update_terms" class="download-btn-custom mt-3 custom-width-10">
|
||||
<span>Update</span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@endsection
|
||||
@section('section_script')
|
||||
<!-- <script>
|
||||
var quill = new Quill('#terms-quill-edit', {
|
||||
theme: 'snow'
|
||||
});
|
||||
</script> -->
|
||||
<script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-validate/1.19.5/jquery.validate.min.js"></script>
|
||||
<script src="{{ asset('public/assets/js/admin/manage_cms/manage_terms_cond/manage_terms_condition.js')}}"></script>
|
||||
|
||||
@endsection
|
||||
@@ -53,7 +53,7 @@ $currentPage = 'manage-feedback';
|
||||
<a class="d-flex justify-content-center align-items-center"
|
||||
style="gap: 7px;" href="" data-toggle="modal"
|
||||
data-target="#delete-modal">
|
||||
<img width="15" src="../src/assets/img/delete-recycle.svg" />
|
||||
<img width="15" src="{{ asset('public/assets/img/delete-recycle.svg')}}" />
|
||||
<span>Delete</span>
|
||||
</a>
|
||||
</td>
|
||||
@@ -73,7 +73,7 @@ $currentPage = 'manage-feedback';
|
||||
<a class="d-flex justify-content-center align-items-center"
|
||||
style="gap: 7px;" href="" data-toggle="modal"
|
||||
data-target="#delete-modal">
|
||||
<img width="15" src="../src/assets/img/delete-recycle.svg" />
|
||||
<img width="15" src="{{ asset('public/assets/img/delete-recycle.svg')}}" />
|
||||
<span>Delete</span>
|
||||
</a>
|
||||
</td>
|
||||
|
||||
@@ -66,17 +66,34 @@ Route::post('/manage_insert_news', [ManageNewsAndArticlesController::class, 'ins
|
||||
|
||||
Route::get('/manage-newsletter', [ManageNewsLetterController ::class, 'index'])->name('manage.newLetter');
|
||||
//*******************************************************manage aboutus********************************************************
|
||||
Route::get('/add_about_us', [AboutUsController::class, 'add'])->name('about_us_add');
|
||||
Route::post('/insert_about_us', [AboutUsController::class, 'insert']);
|
||||
|
||||
Route::get('/manage-about-us', [AboutUsController ::class, 'index'])->name('manage.aboutUs');
|
||||
Route::get('/about_us_edit/{id}', [AboutUsController::class, 'edit'])->name('about_us_edit');
|
||||
Route::post('/about_us_update', [AboutUsController::class, 'update']);
|
||||
Route::delete('/delete_about/{id}', [AboutUsController::class, 'delete_about']);
|
||||
Route::get('/change_Status', [AboutUsController::class, 'change_about_Status']);
|
||||
|
||||
|
||||
//*******************************************************manage terms********************************************************
|
||||
|
||||
Route::get('/terms', [TermsController ::class, 'index'])->name('manage.terms');
|
||||
|
||||
Route::get('/terms_edit/{id}', [TermsController::class, 'edit'])->name('terms_edit');
|
||||
Route::post('/update_terms', [TermsController::class, 'update']);
|
||||
// Route::get('/terms_edit_rest/{id}', [TermsController::class, 'edit_rest'])->name('terms_edit');
|
||||
//*******************************************************manage faq********************************************************
|
||||
Route::get('/faq', [FaqController ::class, 'index'])->name('manage.faq');
|
||||
Route::get('/change_faq_Status', [FaqController::class, 'change_faqStatus']);
|
||||
Route::delete('/delete_faq/{id}', [FaqController::class, 'delete_faq']);
|
||||
Route::post('/update_faq', [FaqController::class, 'update'])->name('manage_edit_faq');
|
||||
Route::post('/store_faq', [FaqController::class, 'store'])->name('store_faq');
|
||||
|
||||
|
||||
//*******************************************************manage privacypolicy********************************************************
|
||||
Route::get('/privacy', [ PrivacyPolicyController ::class, 'index'])->name('manage.privacy');
|
||||
Route::get('/privacy_edit/{id}', [PrivacyPolicyController::class, 'edit'])->name('privacy_edit');
|
||||
|
||||
//*******************************************************manage reports********************************************************
|
||||
Route::get('/manage-reports', [ ManageReportsController ::class, 'index'])->name('manage.reports');
|
||||
//*******************************************************manage feedback********************************************************
|
||||
|
||||
Reference in New Issue
Block a user