diff --git a/app/Http/Controllers/Admin/APIs/RestaurantApi/RestNotificationController.php b/app/Http/Controllers/Admin/APIs/RestaurantApi/RestNotificationController.php
index 6250fd0..699bbea 100644
--- a/app/Http/Controllers/Admin/APIs/RestaurantApi/RestNotificationController.php
+++ b/app/Http/Controllers/Admin/APIs/RestaurantApi/RestNotificationController.php
@@ -2,14 +2,24 @@
namespace App\Http\Controllers\Admin\APIs\RestaurantApi;
use App\Models\NotificationDetails;
+use Illuminate\Support\Facades\Validator;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Helpers\onesignalhelper;
+use App\Models\IamPrincipal;
+use Illuminate\Support\Facades\Log;
+use Exception;
+
class RestNotificationController extends Controller
{
+ /**
+ * Created By :sayali parab
+ * Created at : 4 June 2024
+ * Use : To get notification.
+ */
public function getRestNotificationApi(Request $request)
{
try {
@@ -46,7 +56,11 @@ class RestNotificationController extends Controller
}
}
-
+ /**
+ * Created By :sayali parab
+ * Created at : 4 June 2024
+ * Use : To send notification.
+ */
public function sendRestNotificationApi(Request $request)
{
try {
@@ -73,4 +87,42 @@ class RestNotificationController extends Controller
]);
}
}
+ /**
+ * Created By :sayali parab
+ * Created at : 4 June 2024
+ * Use : To alert notification.
+ */
+ public function sendAlertNotificationApi(Request $request)
+ {
+ try {
+ $token = readRestHeaderToken();
+ if ($token) {
+ $iam_principal_id = $token['sub'];
+ $validator = Validator::make($request->all(), [
+ 'status' => 'required|in:0,1',
+ ]);
+
+ if ($validator->fails()) {
+ return jsonResponseWithErrorMessageApi($validator->errors()->first(), 400);
+ }
+
+ $imPrincipal = IamPrincipal::where('id', $iam_principal_id)->first();
+
+ if (!$imPrincipal) {
+ return jsonResponseWithErrorMessageApi(__('auth.user_not_found'), 404);
+ }
+
+ $imPrincipal->notification_status = $request->status;
+
+ $imPrincipal->save();
+
+ return jsonResponseWithSuccessMessage(__('auth.data_updated_successfully'), 200);
+ } else {
+ return jsonResponseWithErrorMessageApi(__('auth.user_not_found'), 409);
+ }
+ } catch (Exception $e) {
+ Log::error('Contact form controller function failed: ' . $e);
+ return jsonResponseWithErrorMessageApi(__('auth.something_went_wrong'), 500);
+ }
+ }
}
diff --git a/app/Http/Controllers/Admin/AboutUsController.php b/app/Http/Controllers/Admin/AboutUsController.php
index 0122e9f..7e23404 100644
--- a/app/Http/Controllers/Admin/AboutUsController.php
+++ b/app/Http/Controllers/Admin/AboutUsController.php
@@ -16,64 +16,55 @@ use Illuminate\Support\Facades\Auth;
class AboutUsController extends Controller
{
+
+
+ /**
+ * Created By : sayali parab
+ * Created at : 20 May 2024
+ * Use : To view about us page.
+ */
+
public function index()
- { $view_about = Aboutus::get()->toArray();
+ {
+ $view_about = Aboutus::get()->toArray();
- return view('Admin.pages.manage_cms.manage_aboutus.manage_about_us',compact('view_about'));
+ return view('Admin.pages.manage_cms.manage_aboutus.manage_about_us', compact('view_about'));
}
+ /**
+ * Created By : sayali parab
+ * Created at : 20 May 2024
+ * Use : To edit about us page.
+ */
- // 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 = MainCategory::all()->toArray();
- // $edit_service['thumbnail_image'] = ListingImageUrl('about_images', $edit_service['thumbnail_image']);
-
- // 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 edit($id){
+ public function edit($id)
+ {
$edit_privacy_policy = Aboutus::find($id)->toArray();
return view('Admin.pages.manage_cms.manage_aboutus.manage_about_us_cust', compact('edit_privacy_policy'));
}
+
+ /**
+ * Created By : sayali parab
+ * Created at : 20 May 2024
+ * Use : To edit about us page.
+ */
+
public function edit_rest($id)
{
$edit_about_rest = Aboutus::find($id)->toArray();
- dd('sdfnkjfn');
+ // dd('sdfnkjfn');
return view('Admin.pages.manage_cms.manage_aboutus.manage_about_us_rest', compact('edit_about_rest'));
}
+ /**
+ * Created By : sayali parab
+ * Created at : 20 May 2024
+ * Use : To update about us page.
+ */
public function update(Request $request)
{
-
+
try {
DB::beginTransaction();
@@ -102,11 +93,15 @@ class AboutUsController extends Controller
}
}
-
+ /**
+ * Created By : sayali parab
+ * Created at : 21 May 2024
+ * Use : To delete about us page.
+ */
public function delete_about($id)
{
-
+
try {
$blog = Aboutus::find($id);
@@ -122,9 +117,15 @@ class AboutUsController extends Controller
return response()->json(['error' => 'An error occurred while deleting the Aboutus entry.'], 500);
}
}
+
+ /**
+ * Created By : sayali parab
+ * Created at : 21 May 2024
+ * Use : To change status about us page.
+ */
public function change_about_Status(Request $request)
{
-
+
try {
$status = Aboutus::find($request->program_id);
@@ -142,16 +143,24 @@ class AboutUsController extends Controller
return response()->json(['error' => 'An error occurred while changing the status.'], 500);
}
}
-
+ /**
+ * Created By : sayali parab
+ * Created at : 21 May 2024
+ * Use : To add about us page.
+ */
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'));
}
-
+ /**
+ * Created By : sayali parab
+ * Created at : 21 May 2024
+ * Use : To insert about us page.
+ */
public function insert(Request $request)
{
-
+
try {
DB::beginTransaction();
@@ -182,5 +191,4 @@ class AboutUsController extends Controller
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
-
}
diff --git a/app/Http/Controllers/Admin/DashboardController.php b/app/Http/Controllers/Admin/DashboardController.php
index 435fe44..78d400b 100644
--- a/app/Http/Controllers/Admin/DashboardController.php
+++ b/app/Http/Controllers/Admin/DashboardController.php
@@ -11,6 +11,12 @@ use App\Models\ManageRestaurant;
class DashboardController extends Controller
{
+ /**
+ * Created By : sayali parab
+ * Created at : 16 May 2024
+ * Use : To show the dashboard.
+ */
+
// public function showDashboard(){
@@ -84,6 +90,7 @@ class DashboardController extends Controller
->pluck('count', 'month')
->toArray();
// dd($dataMonthlyWithType3);
+ // return $dataMonthlyWithType3;
$dataMonthlyWithType4 = IamPrincipal::select(DB::raw("COUNT(*) as count"), DB::raw("MONTH(created_at) as month"))
->whereIn('principal_type_xid', [4])
@@ -149,7 +156,138 @@ class DashboardController extends Controller
// Pass the data to the view
// return view('Admin.dashboard', compact('customerCount', 'activePassports', 'restaurantCount', 'recent_transaction', 'datas', 'formattedDefaultData', 'quarterlyData', 'yearlyData', 'dataMonthlyWithType3', 'dataMonthlyWithType4', 'dataQuarterlyWithType3', 'dataQuarterlyWithType4', 'dataYearlyWithType3', 'dataYearlyWithType4','formattedDailyData'));
- return view('Admin.dashboard', compact('customerCount','restaurantCount','dataMonthlyWithType3','dataMonthlyWithType4','dataQuarterlyWithType3', 'dataQuarterlyWithType4', 'dataYearlyWithType3', 'dataYearlyWithType4'));
+ return view('Admin.dashboard', compact('customerCount','restaurantCount','dataMonthlyWithType3','dataMonthlyWithType4','dataQuarterlyWithType3', 'dataQuarterlyWithType4', 'dataYearlyWithType3', 'dataYearlyWithType4','formattedDefaultData','quarterlyData'));
}
+ // public function showDashboard()
+ // {
+
+
+ // // Fetching data for sorting by day
+ // // $dailyData = OrderedPassport::select(DB::raw("COUNT(*) as count"), DB::raw("DATE(created_at) as date"))
+ // // ->whereBetween('created_at', [now()->subDays(7), now()]) // Fetch data for the last 7 days
+ // // ->groupBy(DB::raw("DATE(created_at)"))
+ // // ->orderBy(DB::raw("DATE(created_at)"))
+ // // ->pluck('count', 'date')
+ // // ->toArray();
+
+ // // Ensure that $dailyData contains zeros for days with no data
+ // $start_date = now()->subDays(7)->startOfDay();
+ // $end_date = now()->endOfDay();
+ // $formattedDailyData = [];
+ // while ($start_date <= $end_date) {
+ // $formattedDailyData[$start_date->format('Y-m-d')] = isset($dailyData[$start_date->format('Y-m-d')]) ? $dailyData[$start_date->format('Y-m-d')] : 0;
+ // $start_date->addDay();
+ // }
+
+ // // Default sales chart data (monthly)
+ // // $defaultData = OrderedPassport::select(DB::raw("COUNT(*) as count"), DB::raw("MONTH(created_at) as month"))
+ // // ->whereYear('created_at', date('Y'))
+ // // ->groupBy(DB::raw("MONTH(created_at)"))
+ // // ->orderBy(DB::raw("MONTH(created_at)"))
+ // // ->pluck('count', 'month')
+ // // ->toArray();
+
+ // // Ensure that $defaultData contains zeros for months with no data
+ // $months = range(1, 12);
+ // $formattedDefaultData = [];
+ // foreach ($months as $month) {
+ // $formattedDefaultData[$month] = isset($defaultData[$month]) ? $defaultData[$month] : 0;
+ // }
+
+ // // $quarterlyData = OrderedPassport::select(
+ // // DB::raw("COUNT(*) as count"),
+ // // DB::raw("QUARTER(created_at) as quarter")
+ // // )
+ // // ->whereYear('created_at', date('Y'))
+ // // ->groupBy(DB::raw("QUARTER(created_at)"))
+ // // ->orderBy(DB::raw("QUARTER(created_at)"))
+ // // ->pluck('count', 'quarter')
+ // // ->toArray();
+
+ // // Ensure that $quarterlyData contains zeros for quarters with no data
+ // for ($i = 1; $i <= 4; $i++) {
+ // if (!isset($quarterlyData[$i])) {
+ // $quarterlyData[$i] = 0;
+ // }
+ // }
+
+ // // Fetching data for yearly option
+ // // $yearlyData = OrderedPassport::select(DB::raw("COUNT(*) as count"), DB::raw("YEAR(created_at) as year"))
+ // // ->groupBy(DB::raw("YEAR(created_at)"))
+ // // ->pluck('count', 'year')
+ // // ->toArray();
+ // //
+ // // Monthly data
+ // $dataMonthlyWithType3 = IamPrincipal::select(DB::raw("COUNT(*) as count"), DB::raw("MONTH(created_at) as month"))
+ // ->whereIn('principal_type_xid', [3])
+ // ->whereYear('created_at', date('Y'))
+ // ->groupBy(DB::raw("MONTH(created_at)"))
+ // ->orderBy(DB::raw("MONTH(created_at)"))
+ // ->pluck('count', 'month')
+ // ->toArray();
+
+ // $dataMonthlyWithType4 = IamPrincipal::select(DB::raw("COUNT(*) as count"), DB::raw("MONTH(created_at) as month"))
+ // ->whereIn('principal_type_xid', [4])
+ // ->whereYear('created_at', date('Y'))
+ // ->groupBy(DB::raw("MONTH(created_at)"))
+ // ->orderBy(DB::raw("MONTH(created_at)"))
+ // ->pluck('count', 'month')
+ // ->toArray();
+
+ // // Quarterly data
+ // $dataQuarterlyWithType3 = IamPrincipal::select(
+ // DB::raw("COUNT(*) as count"),
+ // DB::raw("QUARTER(created_at) as quarter")
+ // )
+ // ->whereIn('principal_type_xid', [3])
+ // ->groupBy(DB::raw("QUARTER(created_at)"))
+ // ->orderBy(DB::raw("QUARTER(created_at)"))
+ // ->pluck('count', 'quarter')
+ // ->toArray();
+ // for ($i = 1; $i <= 4; $i++) {
+ // if (!isset($dataQuarterlyWithType3[$i])) {
+ // $dataQuarterlyWithType3[$i] = 0;
+ // }
+ // }
+
+ // $dataQuarterlyWithType4 = IamPrincipal::select(
+ // DB::raw("COUNT(*) as count"),
+ // DB::raw("QUARTER(created_at) as quarter")
+ // )
+ // ->whereIn('principal_type_xid', [4])
+ // ->groupBy(DB::raw("QUARTER(created_at)"))
+ // ->orderBy(DB::raw("QUARTER(created_at)"))
+ // ->pluck('count', 'quarter')
+ // ->toArray();
+ // for ($i = 1; $i <= 4; $i++) {
+ // if (!isset($dataQuarterlyWithType4[$i])) {
+ // $dataQuarterlyWithType4[$i] = 0;
+ // }
+ // }
+
+ // // Yearly data
+ // $dataYearlyWithType3 = IamPrincipal::select(DB::raw("COUNT(*) as count"), DB::raw("YEAR(created_at) as year"))
+ // ->whereIn('principal_type_xid', [3])
+ // ->groupBy(DB::raw("YEAR(created_at)"))
+ // ->pluck('count', 'year')
+ // ->toArray();
+ // // dd($dataYearlyWithType3);
+
+ // $dataYearlyWithType4 = IamPrincipal::select(DB::raw("COUNT(*) as count"), DB::raw("YEAR(created_at) as year"))
+ // ->whereIn('principal_type_xid', [4])
+ // ->groupBy(DB::raw("YEAR(created_at)"))
+ // ->pluck('count', 'year')
+ // ->toArray();
+
+
+ // $customerCount = IamPrincipal::where('principal_type_xid', '=', 3)->count();
+ // // $activePassports = ManagePassport::where('is_active', 1)->take(12)->get();
+ // // $restaurantCount = MyPassportVoucher::where('is_redeem', 1)->count();
+ // // $recent_transaction = OrderedPassport::with('order', 'order_passport', 'carts.passport', 'iamPrincipal')->get()->toArray();
+ // // $datas = MyPassportVoucher::with('passportVouchers', 'passportData', 'customer')->get()->toArray();
+
+ // // Pass the data to the view
+ // return view('Admin.dashboard', compact('customerCount', '', 'restaurantCount', '', 'datas', 'formattedDefaultData', 'quarterlyData', 'yearlyData', 'dataMonthlyWithType3', 'dataMonthlyWithType4', 'dataQuarterlyWithType3', 'dataQuarterlyWithType4', 'dataYearlyWithType3', 'dataYearlyWithType4','formattedDailyData'));
+ // }
}
diff --git a/app/Http/Controllers/Admin/FaqController.php b/app/Http/Controllers/Admin/FaqController.php
index 0515a44..0cb3774 100644
--- a/app/Http/Controllers/Admin/FaqController.php
+++ b/app/Http/Controllers/Admin/FaqController.php
@@ -10,19 +10,33 @@ use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class FaqController extends Controller
-{
+{
+ /**
+ * Created By : sayali parab
+ * Created at : 24 May 2024
+ * Use : To get faq page.
+ */
+
protected $faqServices;
public function __construct(faqServices $faqServices)
{
$this->faqServices = $faqServices;
}
-
+ /**
+ * Created By : sayali parab
+ * Created at : 24 May 2024
+ * Use : To get faq page.
+ */
public function index()
{
$data = $this->faqServices->viewfaq();
return view('Admin.pages.manage_cms.manage_faq.manage_faq')->with($data);
}
-
+ /**
+ * Created By : sayali parab
+ * Created at : 24 May 2024
+ * Use : To change the status of faq page.
+ */
public function change_faqStatus(Request $request)
{
$status = Faq::find($request->program_id);
@@ -31,7 +45,11 @@ class FaqController extends Controller
return response()->json(['success' => 'Status change successfully.']);
}
-
+ /**
+ * Created By : sayali parab
+ * Created at : 24 May 2024
+ * Use : To delete faq page.
+ */
public function delete_faq($id)
{
$faq = Faq::find($id);
@@ -42,7 +60,11 @@ class FaqController extends Controller
$faq->delete();
return response()->json(['success' => true, 'status' => 200]);
}
-
+ /**
+ * Created By : sayali parab
+ * Created at : 24 May 2024
+ * Use : To update faq page.
+ */
public function update(Request $request)
{
$faq = new Faq();
@@ -53,7 +75,11 @@ class FaqController extends Controller
$faq->save();
return response()->json(['success' => true, 'status' => 200]);
}
-
+ /**
+ * Created By : sayali parab
+ * Created at : 24 May 2024
+ * Use : To store faq page.
+ */
public function store(Request $request)
{
try {
diff --git a/app/Http/Controllers/Admin/ManageContactUsController.php b/app/Http/Controllers/Admin/ManageContactUsController.php
index 94b69ec..95a090b 100644
--- a/app/Http/Controllers/Admin/ManageContactUsController.php
+++ b/app/Http/Controllers/Admin/ManageContactUsController.php
@@ -9,7 +9,11 @@ use App\Models\ManageContactus;
use Illuminate\Support\Facades\Mail;
class ManageContactUsController extends Controller
-{
+{ /**
+ * Created By : sayali parab
+ * Created at : 05 June 2024
+ * Use : To get contact us page.
+ */
public function index(){
// $queries = ManageContactUs::latest()->get();
$queries = ManageContactUs::all();
diff --git a/app/Http/Controllers/Admin/ManageCustomerController.php b/app/Http/Controllers/Admin/ManageCustomerController.php
index ee16758..276748a 100644
--- a/app/Http/Controllers/Admin/ManageCustomerController.php
+++ b/app/Http/Controllers/Admin/ManageCustomerController.php
@@ -25,6 +25,11 @@ use PDF;
class ManageCustomerController extends Controller
{
+ /*
+ Created By : Sayali Parab
+ Created at : 28 May 2024
+ Use : To Get User Page.
+ */
public function index()
{
try {
@@ -40,7 +45,11 @@ class ManageCustomerController extends Controller
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
-
+/*
+ Created By : Sayali Parab
+ Created at : 28 May 2024
+ Use : To Get Passport Page.
+ */
public function view_customer($id)
{
@@ -53,7 +62,11 @@ class ManageCustomerController extends Controller
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
-
+/*
+ Created By : Sayali Parab
+ Created at : 28 May 2024
+ Use : To Get Customer data.
+ */
public function edit_customer($id)
{
@@ -66,7 +79,11 @@ class ManageCustomerController extends Controller
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
-
+ /*
+ Created By : Sayali Parab
+ Created at : 28 May 2024
+ Use : To Update Customer Form.
+ */
public function update(Request $request)
{
@@ -93,10 +110,10 @@ class ManageCustomerController extends Controller
public function archive_customer()
{
/*
- Created By : Sayali Parab
- Created at : 28 May 2024
- Use : To Get archieve customer.
- */
+ Created By : Sayali Parab
+ Created at : 28 May 2024
+ Use : To Get archieve customer.
+ */
try {
$customers = IamPrincipal::where('principal_type_xid', 3)->onlyTrashed()->latest()->get();
return view('Admin.pages.manage_users.manage_customer.archive_manage_customer', compact('customers'));
@@ -106,7 +123,11 @@ class ManageCustomerController extends Controller
}
}
-
+ /*
+ Created By : Sayali Parab
+ Created at : 28 May 2024
+ Use : To Get delete customer.
+ */
public function delete_customer($id)
{
@@ -129,7 +150,11 @@ class ManageCustomerController extends Controller
return response()->json(['success' => false, 'status' => 500, 'message' => __('auth.something_went_wrong')]);
}
}
-
+ /*
+ Created By : Sayali Parab
+ Created at : 28 May 2024
+ Use : To Get pdf.
+ */
public function download_pdf($id)
{
try {
@@ -165,7 +190,11 @@ class ManageCustomerController extends Controller
// }
// }
-
+ /*
+ Created By : Sayali Parab
+ Created at : 28 May 2024
+ Use : To Deleted Data Restore.
+ */
public function unarchive_customer($id)
{
diff --git a/app/Http/Controllers/Admin/ManageFeedbackController.php b/app/Http/Controllers/Admin/ManageFeedbackController.php
index eb329c6..0005933 100644
--- a/app/Http/Controllers/Admin/ManageFeedbackController.php
+++ b/app/Http/Controllers/Admin/ManageFeedbackController.php
@@ -7,6 +7,12 @@ use Illuminate\Http\Request;
class ManageFeedbackController extends Controller
{
+
+ /**
+ * Created By : sayali parab
+ * Created at : 17 May 2024
+ * Use : To get manage feedback page.
+ */
public function index(){
return view('Admin.pages.manage_feedback.manage_feedback');
diff --git a/app/Http/Controllers/Admin/ManageNewsAndArticlesController.php b/app/Http/Controllers/Admin/ManageNewsAndArticlesController.php
index cb9275b..cd6cc86 100644
--- a/app/Http/Controllers/Admin/ManageNewsAndArticlesController.php
+++ b/app/Http/Controllers/Admin/ManageNewsAndArticlesController.php
@@ -14,7 +14,11 @@ use Validator;
class ManageNewsAndArticlesController extends Controller
{
-
+ /**
+ * Created By : sayali parab
+ * Created at : 27 May 2024
+ * Use : To get newsarticle page.
+ */
public function index()
{
@@ -30,7 +34,11 @@ class ManageNewsAndArticlesController extends Controller
}
-
+/**
+ * Created By : sayali parab
+ * Created at : 27 May 2024
+ * Use : To change status.
+ */
public function change_news_article_Status(Request $request)
{
@@ -52,7 +60,11 @@ class ManageNewsAndArticlesController extends Controller
}
}
-
+/**
+ * Created By : sayali parab
+ * Created at : 27 May 2024
+ * Use : To edit.
+ */
public function edit($id)
{
@@ -108,6 +120,13 @@ class ManageNewsAndArticlesController extends Controller
// return response()->json(['success' => false, 'error' => $e->getMessage(), 'status' => 500]);
// }
// }
+
+ /**
+ * Created By : sayali parab
+ * Created at : 27 May 2024
+ * Use : To update.
+ */
+
public function update(Request $request)
{
try {
@@ -137,7 +156,11 @@ class ManageNewsAndArticlesController extends Controller
return response()->json(['success' => false, 'error' => $e->getMessage(), 'status' => 500]);
}
}
-
+/**
+ * Created By : sayali parab
+ * Created at : 28 May 2024
+ * Use : To delete.
+ */
public function delete_newsarticle($id)
{
@@ -157,6 +180,12 @@ public function delete_newsarticle($id)
}
}
+
+/**
+ * Created By : sayali parab
+ * Created at : 28 May 2024
+ * Use : To add.
+ */
public function add()
{
$news_categories = NewsArticleCategory::all()->toArray();
@@ -196,6 +225,12 @@ public function delete_newsarticle($id)
// return response()->json(['success' => false, 'error' => $e->getMessage(), 'status' => 500]);
// }
// }
+
+ /**
+ * Created By : sayali parab
+ * Created at : 28 May 2024
+ * Use : To insert.
+ */
public function insert(Request $request)
{
try {
diff --git a/app/Http/Controllers/Admin/ManageProfileController.php b/app/Http/Controllers/Admin/ManageProfileController.php
index 54ca332..d30791f 100644
--- a/app/Http/Controllers/Admin/ManageProfileController.php
+++ b/app/Http/Controllers/Admin/ManageProfileController.php
@@ -14,6 +14,11 @@ use Illuminate\Support\Facades\Auth;
class ManageProfileController extends Controller
{
+ /**
+ * Created By : sayali parab
+ * Created at : 29 May 2024
+ * Use : To get and update admin profile.
+ */
public function index()
{
diff --git a/app/Http/Controllers/Admin/PrivacyPolicyController.php b/app/Http/Controllers/Admin/PrivacyPolicyController.php
index 85924a2..0f06c2d 100644
--- a/app/Http/Controllers/Admin/PrivacyPolicyController.php
+++ b/app/Http/Controllers/Admin/PrivacyPolicyController.php
@@ -8,6 +8,7 @@ use App\Models\PrivacyPolicy;
class PrivacyPolicyController extends Controller
{
+
// public function index(){
// return view('Admin.pages.manage_cms.manage_privacy.manage_privacy');
@@ -18,17 +19,32 @@ class PrivacyPolicyController extends Controller
// return view('Admin.pages.manage_cms.manage_privacy.manage_privacy');
// }
+ /**
+ * Created By : sayali parab
+ * Created at : 29 May 2024
+ * Use : To get privacy policy page.
+ */
public function index(){
$view_privacy = PrivacyPolicy::get()->toArray();
return view('Admin.pages.manage_cms.manage_privacy.manage_privacy', compact('view_privacy'));
}
-
+ /**
+ * Created By : sayali parab
+ * Created at : 29 May 2024
+ * Use : To edit.
+ */
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'));
}
+
+ /**
+ * Created By : sayali parab
+ * Created at : 29 May 2024
+ * Use : To update privacy policy page.
+ */
public function update(Request $request)
{
$update = PrivacyPolicy::find($request->privacy_custom_id);
@@ -36,12 +52,22 @@ class PrivacyPolicyController extends Controller
$update->save();
return response()->json(['success' => true, 'status' => 200]);
}
+
+ /**
+ * Created By : sayali parab
+ * Created at : 29 May 2024
+ * Use : To edit rest.
+ */
public function edit_rest($id)
{
$edit_privacy_policy_rest = PrivacyPolicy::find($id)->toArray();
return view('Admin.pages.manage_cms.manage_privacy.manage_privacy_policy_edit_rest', compact('edit_privacy_policy_rest'));
}
-
+ /**
+ * Created By : sayali parab
+ * Created at : 30 May 2024
+ * Use : To update rest.
+ */
public function update_rest(Request $request)
{
$update = PrivacyPolicy::find($request->privacy_rest_id);
diff --git a/app/Http/Controllers/Admin/RestaurantAppController.php b/app/Http/Controllers/Admin/RestaurantAppController.php
index 09c95a7..a0131c6 100644
--- a/app/Http/Controllers/Admin/RestaurantAppController.php
+++ b/app/Http/Controllers/Admin/RestaurantAppController.php
@@ -21,7 +21,11 @@ class RestaurantAppController extends Controller
{
-
+ /**
+ * Created By : sayali parab
+ * Created at : 03 June 2024
+ * Use : To get restaturant user.
+ */
public function index_restraunt_users(Request $request)
{
@@ -113,7 +117,11 @@ class RestaurantAppController extends Controller
// return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
// }
// }
-
+ /**
+ * Created By : sayali parab
+ * Created at : 03 June 2024
+ * Use : To change the status restaturant user.
+ */
public function change_rest_user_status(Request $request)
{
try {
@@ -159,7 +167,11 @@ class RestaurantAppController extends Controller
-
+ /**
+ * Created By : sayali parab
+ * Created at : 03 June 2024
+ * Use : To view restaturant user.
+ */
public function view_rest($id)
{
@@ -193,7 +205,11 @@ class RestaurantAppController extends Controller
-
+ /**
+ * Created By : sayali parab
+ * Created at : 03 June 2024
+ * Use : To edit restaturant user.
+ */
public function edit_Restaurant($id)
{
@@ -262,6 +278,11 @@ class RestaurantAppController extends Controller
// }
// }
+ /**
+ * Created By : sayali parab
+ * Created at : 04 June 2024
+ * Use : To update restaturant user.
+ */
public function updateRest(Request $request)
{
@@ -293,6 +314,11 @@ class RestaurantAppController extends Controller
}
}
+ /**
+ * Created By : sayali parab
+ * Created at : 04 June 2024
+ * Use : To delete restaturant user.
+ */
public function deleteRestaurantsUsers($id)
{
@@ -312,7 +338,11 @@ class RestaurantAppController extends Controller
}
}
-
+ /**
+ * Created By : sayali parab
+ * Created at : 04 June 2024
+ * Use : To archieve restaturant user.
+ */
public function archive_restaturant()
{
@@ -324,6 +354,13 @@ class RestaurantAppController extends Controller
return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
}
}
+
+ /**
+ * Created By : sayali parab
+ * Created at : 04 June 2024
+ * Use : To unarchieve restaturant user.
+ */
+
public function unarchive_rest($id)
{
diff --git a/composer.json b/composer.json
index f93c7ae..cedad74 100644
--- a/composer.json
+++ b/composer.json
@@ -10,7 +10,7 @@
"require": {
"php": "^8.2",
"barryvdh/laravel-dompdf": "^2.2",
- "ladumor/one-signal": "*",
+ "ladumor/one-signal": "^1.0",
"laravel/framework": "^11.0",
"laravel/jetstream": "^5.1",
"laravel/sanctum": "^4.0",
diff --git a/resources/views/Admin/dashboard.blade.php b/resources/views/Admin/dashboard.blade.php
index 6172e95..7433641 100644
--- a/resources/views/Admin/dashboard.blade.php
+++ b/resources/views/Admin/dashboard.blade.php
@@ -562,161 +562,280 @@
@endsection
@section('section_script')
-
+
+
+ // Function to get x-axis categories based on selected filter
+ function getUserChartCategories(filter) {
+ switch (filter) {
+ case 'monthly':
+ return ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
+ 'Oct', 'Nov', 'Dec'
+ ];
+ case 'quarterly':
+ return ['Q1', 'Q2', 'Q3', 'Q4'];
+ case 'yearly':
+
+ return ;
+ default:
+ return [];
+ }
+ }
+
@endsection
diff --git a/routes/restaurant_api.php b/routes/restaurant_api.php
index cbafbed..45578d3 100644
--- a/routes/restaurant_api.php
+++ b/routes/restaurant_api.php
@@ -50,6 +50,6 @@ Route::middleware(['restaurantApiBasicAuth'])->group(function () {
// //*******************************************************notification********************************************************
Route::get('/v1/get-notification', [RestNotificationController::class, 'getRestNotificationApi']);
Route::post('/v1/send-notification', [RestNotificationController::class, 'sendRestNotificationApi']);
- // Route::post('/v1/alert-notification', [RestNotificationController::class, 'sendAlertNotificationApi']);
+ Route::post('/v1/alert-notification', [RestNotificationController::class, 'sendAlertNotificationApi']);
});
});