diff --git a/app/Http/Controllers/Admin/APIs/RestaurantApi/RedeemControllerApi.php b/app/Http/Controllers/Admin/APIs/RestaurantApi/RedeemControllerApi.php
new file mode 100644
index 0000000..0a1bd63
--- /dev/null
+++ b/app/Http/Controllers/Admin/APIs/RestaurantApi/RedeemControllerApi.php
@@ -0,0 +1,44 @@
+RedeemApiService = $RedeemApiService;
+ }
+
+ public function undoRedemption(Request $request)
+ {
+ try {
+ $token = readRestHeaderToken();
+ if ($token) {
+ $restIamId = $token['sub'];
+ $validator = Validator::make($request->all(), [
+ 'voucher_id' => 'required',
+ ]);
+
+ if ($validator->fails()) {
+ return jsonResponseWithErrorMessageApi($validator->errors()->first(), 400);
+ }
+
+ return $this->RedeemApiService->undoRedemption($restIamId, $request);
+ } else {
+ return jsonResponseWithErrorMessageApi(__('auth.user_deleted'), 409);
+ }
+ } catch (Exception $e) {
+ Log::error("An error occurred in " . __METHOD__ . ": " . $e->getMessage(), ['exception' => $e]);
+ return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
+ }
+ }
+}
diff --git a/app/Http/Controllers/Admin/ReferralCodeController.php b/app/Http/Controllers/Admin/ReferralCodeController.php
new file mode 100644
index 0000000..b51233f
--- /dev/null
+++ b/app/Http/Controllers/Admin/ReferralCodeController.php
@@ -0,0 +1,47 @@
+ReferralCodeServices = $ReferralCodeServices;
+ }
+ public function CheckReferral(Request $request)
+ {
+ try {
+ $token = readHeaderToken();
+ $validator = Validator::make($request->all(), [
+ 'referral_code' => 'required',
+ ]);
+
+ if ($validator->fails()) {
+ $validationErrors = $validator->errors()->all();
+ Log::error("Validation error: " . implode(", ", $validationErrors));
+ return jsonResponseWithErrorMessageApi($validationErrors, 403);
+ }
+
+ if ($token) {
+ $customerIamId = $token['sub'];
+ $response = $this->ReferralCodeServices->CheckReferral($customerIamId, $request);
+ return $response;
+ } else {
+ return jsonResponseWithErrorMessageApi(__('auth.user_deleted'), 409);
+ }
+ } catch (Exception $e) {
+ Log::error("An error occurred in " . __METHOD__ . ": " . $e->getMessage(), ['exception' => $e]);
+ return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500);
+ }
+ }
+}
diff --git a/app/Services/APIs/CustomerAPIs/ReferralCodeServices.php b/app/Services/APIs/CustomerAPIs/ReferralCodeServices.php
new file mode 100644
index 0000000..cd1b408
--- /dev/null
+++ b/app/Services/APIs/CustomerAPIs/ReferralCodeServices.php
@@ -0,0 +1,23 @@
+getMessage());
+ return jsonResponseWithErrorMessageApi(__('auth.something_went_wrong'), 500);
+ }
+ }
+}
diff --git a/app/Services/APIs/RestaurantService/RedeemApiService.php b/app/Services/APIs/RestaurantService/RedeemApiService.php
index 6146e93..4467158 100644
--- a/app/Services/APIs/RestaurantService/RedeemApiService.php
+++ b/app/Services/APIs/RestaurantService/RedeemApiService.php
@@ -6,6 +6,7 @@ use App\Helpers\onesignalhelper;
use App\Models\admin\ManageVoucherModel;
use App\Models\IamPrincipal;
use App\Models\IamPrincipalRestaurantRole;
+use App\Models\ManageRestaurant;
use App\Models\MyPassportVoucher;
use Exception;
use Illuminate\Support\Facades\Log;
@@ -13,144 +14,11 @@ use Illuminate\Support\Facades\Log;
class RedeemApiService
{
- public function getRedemedData($restIamId)
- {
- try {
- $rest = IamPrincipal::findOrFail($restIamId);
- $data['user_detail'] = IamPrincipal::select('id', 'first_name', 'last_name', 'email_address', 'phone_number', 'date_of_birth')->find($rest->id);
-
- $restaurantRoles = IamPrincipalRestaurantRole::select('id', 'principal_xid', 'restaurant_xid', 'role')->where('principal_xid', $rest->id)->get();
-
- $restaurantDetail = [];
- foreach ($restaurantRoles as $role) {
- $restaurantImage = ManageVoucherModel::select('id', 'coupon_name', 'description', 'thumbnail_image', 'image', 'location_name')->find($role->restaurant_xid);
- if ($restaurantImage) {
- $restaurantImage->thumbnail_image = ListingImageUrl('voucher_thumbnail_images', $restaurantImage->thumbnail_image);
- $restaurantImage->image = ListingImageUrl('voucher_images', $restaurantImage->image);
- }
- $restaurantDetail[] = $restaurantImage;
-
- $redeemedVouchers = [];
- $redemptionUndoneVouchers = [];
-
- $vouchers = MyPassportVoucher::select('id', 'order_xid', 'iam_principal_xid', 'manage_passports_xid', 'manage_vouchers_xid', 'is_redeem', 'count', 'redeem_date', 'is_redeemption_undone')
- ->where('manage_vouchers_xid', $role->restaurant_xid)
- ->where('is_redeem', 1)
- ->get();
-
- $redeemptionUndone = MyPassportVoucher::select('id', 'order_xid', 'iam_principal_xid', 'manage_passports_xid', 'manage_vouchers_xid', 'is_redeem', 'count', 'redeem_date', 'is_redeemption_undone', 'redeemption_undone_date')
- ->where('manage_vouchers_xid', $role->restaurant_xid)
- ->where([['is_redeem', 0], ['is_redeemption_undone', 1]])
- ->get();
-
- foreach ($vouchers as $voucher) {
- $userDetail = IamPrincipal::select('id', 'first_name', 'email_address', 'profile_photo', 'address_line1')
- ->where('id', $voucher->iam_principal_xid)
- ->first();
-
- if ($userDetail) {
- if ($userDetail->profile_photo) {
- $userDetail->profile_photo = ListingImageUrl('profile_image', $userDetail->profile_photo);
- } else {
- $userDetail->profile_photo = asset('public/assets/img/blankProfile.png');
- }
-
- $voucher->user_detail = $userDetail;
- $redeemedVouchers[] = $voucher;
- } else {
-
- Log::error('User detail not found for IAM principal ID: ' . $voucher->iam_principal_xid);
- }
- }
-
-
- foreach ($redeemptionUndone as $undone) {
- $userDetail = IamPrincipal::select('id', 'first_name', 'email_address', 'profile_photo', 'address_line1')
- ->where('id', $undone->iam_principal_xid)
- ->first();
-
- if ($userDetail) {
- if ($userDetail->profile_photo) {
- $userDetail->profile_photo = ListingImageUrl('profile_image', $userDetail->profile_photo);
- } else {
- $userDetail->profile_photo = asset('public/assets/img/blankProfile.png');
- }
-
- $undone->user_detail = $userDetail;
- $redemptionUndoneVouchers[] = $undone;
- } else {
-
- Log::error('User detail not found for IAM principal ID: ' . $undone->iam_principal_xid);
- }
- }
-
-
- $restaurantDetail['redeemed_vouchers'] = $redeemedVouchers;
- $restaurantDetail['redemption_undone_vouchers'] = $redemptionUndoneVouchers;
- }
-
- return jsonResponseWithSuccessMessageApi(__('auth.User_details_fetch'), $restaurantDetail, 200);
- } catch (Exception $ex) {
- Log::error('Restaurant Get data service failed : ' . $ex->getMessage());
- return jsonResponseWithErrorMessageApi(__('auth.something_went_wrong'), 500);
- }
- }
-
-
public function undoRedemption($restIamId, $request)
{
try {
- $voucherDetail = MyPassportVoucher::with('passportData', 'voucherData')->where('id', $request->voucher_id)->first();
- if ($voucherDetail) {
- $voucherDetail->update([
- 'is_redeem' => 0,
- 'redeem_date' => null,
- 'is_redeemption_undone' => 1,
- 'redeemption_undone_date' => now(),
-
- ]);
- $imagePath = ListingImageUrl('voucher_images', $voucherDetail->voucherData->image);
- $customerTitle = "Your voucher was successfully undo redemption for " . $voucherDetail->passportData->passport_name;
- $customerMessage = $voucherDetail->voucherData->coupon_name . " Voucher Undo Redemption Successfully";
- $customerContentType = 'Voucher_UndoRedemption';
- $customerImageUrl = $imagePath;
- $customerData = IamPrincipal::where('id', $voucherDetail->iam_principal_xid)->where('notification_status', 1)->where('principal_type_xid', 3)->first();
- if ($customerData) {
- $pushNotificationToCustomer = onesignalhelper::sendNotificationApi(
- $customerData->one_signal_player_id,
- $customerTitle,
- $customerMessage,
- $customerContentType,
- $customerImageUrl,
- $id = null
- );
-
- onesignalhelper::StoreNotificationDetails($customerData->id, $customerContentType, $customerTitle, $customerImageUrl);
- }
- $restUser = IamPrincipal::where('id', $restIamId)->where('notification_status', 1)->where('principal_type_xid', 4)->first();
- if ($restUser) {
- $restImagePath = ListingImageUrl('voucher_images', $voucherDetail->voucherData->image);
- $restTitle = "voucher Undo redemption successful for " . $voucherDetail->passportData->passport_name;
- $restMessage = $voucherDetail->voucherData->coupon_name . " Voucher Undo Redemption Successfully";
- $restContentType = 'Voucher_UndoRedemption';
- $restImageUrl = $restImagePath;
-
- $pushNotificationToCustomer = onesignalhelper::restSendNotificationApi(
- $restUser->one_signal_player_id,
- $restTitle,
- $restMessage,
- $restContentType,
- $restImageUrl,
- $id = null
- );
-
- onesignalhelper::StoreNotificationDetails($restUser->id, $restContentType, $restTitle, $restImageUrl);
- }
- return jsonResponseWithSuccessMessageApi(__('auth.data_updated_successfully'), 200);
- } else {
- return jsonResponseWithErrorMessageApi(__('auth.voucher_not_found'), 404);
- }
+ $rest = ManageRestaurant::where('short_id', $request->voucher_id)->first();
} catch (Exception $ex) {
Log::error('Restaurant update profile service failed: ' . $ex->getMessage());
return jsonResponseWithErrorMessageApi(__('auth.something_went_wrong'), 500);
@@ -158,91 +26,91 @@ class RedeemApiService
}
- public function searchRedemption($restIamId, $request)
- {
- try {
- $searchQuery = $request->input('search_data');
+ // public function searchRedemption($restIamId, $request)
+ // {
+ // try {
+ // $searchQuery = $request->input('search_data');
- $rest = IamPrincipal::findOrFail($restIamId);
- $data['user_detail'] = IamPrincipal::select('id', 'first_name', 'last_name', 'email_address', 'phone_number', 'date_of_birth')->find($rest->id);
+ // $rest = IamPrincipal::findOrFail($restIamId);
+ // $data['user_detail'] = IamPrincipal::select('id', 'first_name', 'last_name', 'email_address', 'phone_number', 'date_of_birth')->find($rest->id);
- $restaurantRoles = IamPrincipalRestaurantRole::select('id', 'principal_xid', 'restaurant_xid', 'role')->where('principal_xid', $rest->id)->get();
+ // $restaurantRoles = IamPrincipalRestaurantRole::select('id', 'principal_xid', 'restaurant_xid', 'role')->where('principal_xid', $rest->id)->get();
- $restaurantDetail = [];
- foreach ($restaurantRoles as $role) {
- $restaurantImage = ManageVoucherModel::select('id', 'coupon_name', 'description', 'thumbnail_image', 'image', 'location_name')->find($role->restaurant_xid);
- if ($restaurantImage) {
- $restaurantImage->thumbnail_image = ListingImageUrl('voucher_thumbnail_images', $restaurantImage->thumbnail_image);
- $restaurantImage->image = ListingImageUrl('voucher_images', $restaurantImage->image);
- }
- $restaurantDetail[] = $restaurantImage;
+ // $restaurantDetail = [];
+ // foreach ($restaurantRoles as $role) {
+ // $restaurantImage = ManageVoucherModel::select('id', 'coupon_name', 'description', 'thumbnail_image', 'image', 'location_name')->find($role->restaurant_xid);
+ // if ($restaurantImage) {
+ // $restaurantImage->thumbnail_image = ListingImageUrl('voucher_thumbnail_images', $restaurantImage->thumbnail_image);
+ // $restaurantImage->image = ListingImageUrl('voucher_images', $restaurantImage->image);
+ // }
+ // $restaurantDetail[] = $restaurantImage;
- $redeemedVouchers = [];
- $redemptionUndoneVouchers = [];
+ // $redeemedVouchers = [];
+ // $redemptionUndoneVouchers = [];
- $vouchers = MyPassportVoucher::select('id', 'order_xid', 'iam_principal_xid', 'manage_passports_xid', 'manage_vouchers_xid', 'is_redeem', 'count', 'redeem_date', 'is_redeemption_undone')
- ->where('manage_vouchers_xid', $role->restaurant_xid)
- ->where('is_redeem', 1)
- ->get();
+ // $vouchers = MyPassportVoucher::select('id', 'order_xid', 'iam_principal_xid', 'manage_passports_xid', 'manage_vouchers_xid', 'is_redeem', 'count', 'redeem_date', 'is_redeemption_undone')
+ // ->where('manage_vouchers_xid', $role->restaurant_xid)
+ // ->where('is_redeem', 1)
+ // ->get();
- foreach ($vouchers as $voucher) {
- $userDetail = IamPrincipal::select('id', 'first_name', 'email_address', 'profile_photo', 'address_line1')
- ->where('id', $voucher->iam_principal_xid)
- ->first();
+ // foreach ($vouchers as $voucher) {
+ // $userDetail = IamPrincipal::select('id', 'first_name', 'email_address', 'profile_photo', 'address_line1')
+ // ->where('id', $voucher->iam_principal_xid)
+ // ->first();
- if ($userDetail && (stripos($userDetail->first_name, $searchQuery) !== false || stripos($voucher->id, $searchQuery) !== false || stripos($voucher->redeem_date, $searchQuery) !== false)) {
- if ($userDetail->profile_photo) {
- $userDetail->profile_photo = ListingImageUrl('profile_image', $userDetail->profile_photo);
- } else {
- $userDetail->profile_photo = asset('public/assets/img/blankProfile.png');
- }
+ // if ($userDetail && (stripos($userDetail->first_name, $searchQuery) !== false || stripos($voucher->id, $searchQuery) !== false || stripos($voucher->redeem_date, $searchQuery) !== false)) {
+ // if ($userDetail->profile_photo) {
+ // $userDetail->profile_photo = ListingImageUrl('profile_image', $userDetail->profile_photo);
+ // } else {
+ // $userDetail->profile_photo = asset('public/assets/img/blankProfile.png');
+ // }
- $voucher->user_detail = $userDetail;
- $redeemedVouchers[] = $voucher;
- } else {
+ // $voucher->user_detail = $userDetail;
+ // $redeemedVouchers[] = $voucher;
+ // } else {
- Log::error('User detail not found for IAM principal ID: ' . $voucher->iam_principal_xid);
- }
- }
+ // Log::error('User detail not found for IAM principal ID: ' . $voucher->iam_principal_xid);
+ // }
+ // }
- $redeemptionUndone = MyPassportVoucher::select('id', 'order_xid', 'iam_principal_xid', 'manage_passports_xid', 'manage_vouchers_xid', 'is_redeem', 'count', 'redeem_date', 'is_redeemption_undone', 'redeemption_undone_date')
- ->where('manage_vouchers_xid', $role->restaurant_xid)
- ->where([['is_redeem', 0], ['is_redeemption_undone', 1]])
- ->get();
+ // $redeemptionUndone = MyPassportVoucher::select('id', 'order_xid', 'iam_principal_xid', 'manage_passports_xid', 'manage_vouchers_xid', 'is_redeem', 'count', 'redeem_date', 'is_redeemption_undone', 'redeemption_undone_date')
+ // ->where('manage_vouchers_xid', $role->restaurant_xid)
+ // ->where([['is_redeem', 0], ['is_redeemption_undone', 1]])
+ // ->get();
- foreach ($redeemptionUndone as $undone) {
- $userDetail = IamPrincipal::select('id', 'first_name', 'email_address', 'profile_photo', 'address_line1')
- ->where('id', $undone->iam_principal_xid)
- ->first();
+ // foreach ($redeemptionUndone as $undone) {
+ // $userDetail = IamPrincipal::select('id', 'first_name', 'email_address', 'profile_photo', 'address_line1')
+ // ->where('id', $undone->iam_principal_xid)
+ // ->first();
- if ($userDetail && (stripos($userDetail->first_name, $searchQuery) !== false || stripos($undone->id, $searchQuery) !== false || stripos($undone->redeemption_undone_date, $searchQuery) !== false)) {
- if ($userDetail->profile_photo) {
- $userDetail->profile_photo = ListingImageUrl('profile_image', $userDetail->profile_photo);
- } else {
- $userDetail->profile_photo = asset('public/assets/img/blankProfile.png');
- }
+ // if ($userDetail && (stripos($userDetail->first_name, $searchQuery) !== false || stripos($undone->id, $searchQuery) !== false || stripos($undone->redeemption_undone_date, $searchQuery) !== false)) {
+ // if ($userDetail->profile_photo) {
+ // $userDetail->profile_photo = ListingImageUrl('profile_image', $userDetail->profile_photo);
+ // } else {
+ // $userDetail->profile_photo = asset('public/assets/img/blankProfile.png');
+ // }
- $undone->user_detail = $userDetail;
- $redemptionUndoneVouchers[] = $undone;
- } else {
+ // $undone->user_detail = $userDetail;
+ // $redemptionUndoneVouchers[] = $undone;
+ // } else {
- Log::error('User detail not found for IAM principal ID: ' . $undone->iam_principal_xid);
- }
- }
+ // Log::error('User detail not found for IAM principal ID: ' . $undone->iam_principal_xid);
+ // }
+ // }
- if (empty($searchQuery)) {
- $restaurantDetail['redeemed_vouchers'] = $redeemedVouchers;
- $restaurantDetail['redemption_undone_vouchers'] = $redemptionUndoneVouchers;
- }
+ // if (empty($searchQuery)) {
+ // $restaurantDetail['redeemed_vouchers'] = $redeemedVouchers;
+ // $restaurantDetail['redemption_undone_vouchers'] = $redemptionUndoneVouchers;
+ // }
- $restaurantDetail['redeemed_vouchers'] = $redeemedVouchers;
- $restaurantDetail['redemption_undone_vouchers'] = $redemptionUndoneVouchers;
- }
+ // $restaurantDetail['redeemed_vouchers'] = $redeemedVouchers;
+ // $restaurantDetail['redemption_undone_vouchers'] = $redemptionUndoneVouchers;
+ // }
- return jsonResponseWithSuccessMessageApi(__('auth.User_details_fetch'), $restaurantDetail, 200);
- } catch (Exception $ex) {
- Log::error('Restaurant Get data service failed : ' . $ex->getMessage());
- return jsonResponseWithErrorMessageApi(__('auth.something_went_wrong'), 500);
- }
- }
+ // return jsonResponseWithSuccessMessageApi(__('auth.User_details_fetch'), $restaurantDetail, 200);
+ // } catch (Exception $ex) {
+ // Log::error('Restaurant Get data service failed : ' . $ex->getMessage());
+ // return jsonResponseWithErrorMessageApi(__('auth.something_went_wrong'), 500);
+ // }
+ // }
}
diff --git a/public/assets/js/admin/manage_restaurant/main.js b/public/assets/js/admin/manage_restaurant/main.js
index 9cf4bc5..b5682de 100644
--- a/public/assets/js/admin/manage_restaurant/main.js
+++ b/public/assets/js/admin/manage_restaurant/main.js
@@ -84,7 +84,7 @@ $(document).on("click", ".restaurant_unarchive", function (e) {
// let base_url = url_path;
// var status = $(this).prop("checked") == true ? 1 : 0;
// var rest_user_id = $(this).data("id");
-
+
// $.ajax({
// type: "GET",
// dataType: "json",
@@ -112,7 +112,7 @@ $(document).on("click", ".restaurant_unarchive", function (e) {
// let base_url = url_path;
// var rest_user_id = $(this).data("id");
// var status = 1;
-
+
// $.ajax({
// type: "GET",
// dataType: "json",
@@ -126,19 +126,19 @@ $(document).on("click", ".restaurant_unarchive", function (e) {
// "timeOut": 500
// }
// toastr.success("User approved and status activated successfully. !!");
-
+
// // Update the switch to active
// $('#switch' + rest_user_id).prop('checked', true);
// },
// });
// });
-
+
// // Handle disapprove button click
// $(".disapprove-btn").on("click", function () {
// let base_url = url_path;
// var rest_user_id = $(this).data("id");
// var status = 0;
-
+
// $.ajax({
// type: "GET",
// dataType: "json",
@@ -149,112 +149,30 @@ $(document).on("click", ".restaurant_unarchive", function (e) {
// },
// success: function (data) {
// toastr.error("User disapproved and status deactivated successfully. !!");
-
+
// // Update the switch to inactive
// $('#switch' + rest_user_id).prop('checked', false);
// },
// });
// });
-
-
+
+
// $(".rest_users_table").on("change", ".active_rest_user", function () {
// // Revert the switch change
// var rest_user_id = $(this).data("id");
// var currentStatus = $(this).prop("checked");
-
+
// // Revert the switch state
// $(this).prop("checked", !currentStatus);
-
+
// toastr.options = {
// "timeOut": 6000
// }
// toastr.error("You can only change the status using Approve/Disapprove buttons.");
// });
-
+
// });
- $(document).ready(function () {
- // Handle approve button click
- $(".approve-btn").on("click", function () {
- let base_url = url_path;
- var rest_user_id = $(this).data("id");
- var switchElement = $('#switch' + rest_user_id);
-
- // Check current status
- if (switchElement.prop('checked')) {
- toastr.options = {
- "timeOut": 500
- }
- toastr.warning("User is already approved. !!");
- return;
- }
-
- $.ajax({
- type: "GET",
- dataType: "json",
- url: base_url + '/change_rest_status',
- data: {
- status: 1,
- rest_user_id: rest_user_id,
- },
- success: function (data) {
- toastr.options = {
- "timeOut": 500
- }
- toastr.success("User approved and status activated successfully. !!");
-
- // Update the switch to active
- switchElement.prop('checked', true);
- },
- });
- });
-
- // Handle disapprove button click
- $(".disapprove-btn").on("click", function () {
- let base_url = url_path;
- var rest_user_id = $(this).data("id");
- var switchElement = $('#switch' + rest_user_id);
-
- // Check current status
- if (!switchElement.prop('checked')) {
- toastr.options = {
- "timeOut": 500
- }
- toastr.warning("User is already disapproved. !!");
- return;
- }
-
- $.ajax({
- type: "GET",
- dataType: "json",
- url: base_url + '/change_rest_status',
- data: {
- status: 0,
- rest_user_id: rest_user_id,
- },
- success: function (data) {
- toastr.error("User disapproved and status deactivated successfully. !!");
-
- // Update the switch to inactive
- switchElement.prop('checked', false);
- },
- });
- });
-
- // Handle switch change
- $(".rest_users_table").on("change", ".active_rest_user", function () {
- // Revert the switch change
- var currentStatus = $(this).prop("checked");
-
- // Revert the switch state
- $(this).prop("checked", !currentStatus);
-
- toastr.options = {
- "timeOut": 500
- }
- toastr.error("You can only change the status using Approve/Disapprove buttons.");
- });
- });
-
+
// $(document).ready(function() {
// // console.log('dfkjb');
// $('#rest_user_form').validate({
@@ -271,17 +189,17 @@ $(document).on("click", ".restaurant_unarchive", function (e) {
// user_birth:{
// required: true,
// },
-
+
// restaurant_email: {
// required: true,
// email: true,
// },
-
+
// restaurant_phone: {
// required: true,
// numericCharactersOnly: true
// },
-
+
// },
// messages: {
// first_name: {
@@ -294,17 +212,17 @@ $(document).on("click", ".restaurant_unarchive", function (e) {
// user_birth:{
// required: "Please enter date of birth",
// },
-
+
// restaurant_email: {
// required: "Enter email address",
// email: "Please enter a valid email address"
// },
-
+
// restaurant_phone: {
// required: "Enter Phone Number",
// numericCharactersOnly: "Please enter only numeric characters"
// },
-
+
// },
// errorClass: 'error-message',
// submitHandler: function(form) {
@@ -313,7 +231,7 @@ $(document).on("click", ".restaurant_unarchive", function (e) {
// // console.log(formData);
// $('#restaturant_btn').text('Please wait...');
// $('#restaturant_btn').attr('disabled', true);
-
+
// $.ajaxSetup({
// headers: {
// 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
@@ -349,6 +267,5 @@ $(document).on("click", ".restaurant_unarchive", function (e) {
// }
// });
// })
-
-
-
\ No newline at end of file
+
+
diff --git a/resources/views/Admin/pages/manage_contact_us/manage_contact.blade.php b/resources/views/Admin/pages/manage_contact_us/manage_contact.blade.php
index d10b64d..2ac3087 100644
--- a/resources/views/Admin/pages/manage_contact_us/manage_contact.blade.php
+++ b/resources/views/Admin/pages/manage_contact_us/manage_contact.blade.php
@@ -283,6 +283,45 @@
"lengthMenu": [7, 10, 20, 50],
"pageLength": 10
});
+
+
+
@endsection
diff --git a/routes/customer_api.php b/routes/customer_api.php
index 6623340..d0df079 100644
--- a/routes/customer_api.php
+++ b/routes/customer_api.php
@@ -7,6 +7,7 @@ use App\Http\Controllers\Admin\APIs\Customer_API\CustomerControllerApi;
use App\Http\Controllers\Admin\APIs\Customer_API\FeedbackApiController;
use App\Http\Controllers\Admin\APIs\Customer_API\NotificationController;
use App\Http\Controllers\Admin\APIs\Customer_API\RestaurantControllerApi;
+use App\Http\Controllers\Admin\ReferralCodeController;
use Illuminate\Support\Facades\Route;
@@ -67,5 +68,9 @@ Route::middleware(['customerApiBasicAuth'])->group(function () {
Route::get('/v1/feedback-reactions', [FeedbackApiController::class, 'getFeedbackReaction']);
Route::post('/v1/store-feedback', [FeedbackApiController::class, 'storeFeedback']);
+
+ //*******************************************************Check referral code********************************************************
+ Route::post('/v1/check-referral', [ReferralCodeController::class, 'CheckReferral']); //pending
+
});
});
diff --git a/routes/restaurant_api.php b/routes/restaurant_api.php
index 45578d3..1111e1c 100644
--- a/routes/restaurant_api.php
+++ b/routes/restaurant_api.php
@@ -1,15 +1,14 @@
group(function () {
-
+
Route::get('/v1/list-restaurant', [RestAuthApiController::class, 'viewresyaurant']);
Route::post('/v1/rest-register', [RestAuthApiController::class, 'restRegister']);
Route::get('/v1/list-states', [RestAuthApiController::class, 'viewstates']);
@@ -35,7 +34,7 @@ Route::middleware(['restaurantApiBasicAuth'])->group(function () {
// //*******************************************************Redeemption Data********************************************************
// Route::get('/v1/fetch-redeem-data', [RedeemControllerApi::class, 'getRedemedData']);
- // Route::post('/v1/undo-redemption', [RedeemControllerApi::class, 'undoRedemption']);
+ Route::post('/v1/undo-redemption', [RedeemControllerApi::class, 'undoRedemption']);
// Route::post('/v1/search-Redemption-data', [RedeemControllerApi::class, 'searchRedemption']);
// //*******************************************************CMS********************************************************