From 64eeba054f9e332d965f1c7450359679b976402c Mon Sep 17 00:00:00 2001 From: Hritikkk9 Date: Thu, 1 Aug 2024 15:04:57 +0530 Subject: [PATCH] subscription feedbacke updated --- .../Customer_API/SubscriptionController.php | 7 ++--- .../Admin/ReferralCodeController.php | 2 +- .../add_restaurant.blade.php | 4 +-- .../edit_restaurant.blade.php | 12 ++++---- .../manage_states/manage_states.blade.php | 8 ++--- .../subscriptions/cancel-thank-you.blade.php | 2 +- .../subscriptions/list-of-products.blade.php | 29 ++++++++++--------- .../subscriptions/my-subscription.blade.php | 16 +++++----- .../subscriptions/subscription-style.css | 4 ++- 9 files changed, 45 insertions(+), 39 deletions(-) diff --git a/app/Http/Controllers/APIs/Customer_API/SubscriptionController.php b/app/Http/Controllers/APIs/Customer_API/SubscriptionController.php index f5bde1d..261b5b8 100644 --- a/app/Http/Controllers/APIs/Customer_API/SubscriptionController.php +++ b/app/Http/Controllers/APIs/Customer_API/SubscriptionController.php @@ -27,14 +27,13 @@ class SubscriptionController extends Controller public function mySubscription(Request $request) { try { - // dd($request->header('access-token')); $token = readHeaderToken(); - // dd("acc",$token); + // $token = true; // dd($token, Session::get('vendorToken')); if ($token) { - // $user_id = 13; + // $user_id = 54; $user_id = $token['sub']; $dateTime = now(); @@ -412,7 +411,7 @@ class SubscriptionController extends Controller $code = IamPrincipal::where('referral_code', $referralCode)->where('id', '!=', $currentUserId)->where('principal_type_xid', 3)->first(); if ($code) { - return response()->json(['success' => true, 'message' => 'Referral code applied successfully.', 'referralUserId' => $code->id]); + return response()->json(['success' => true, 'message' => 'Successfully applied referral code!', 'referralUserId' => $code->id]); } else { return response()->json(['success' => false, 'message' => 'Invalid referral code.']); } diff --git a/app/Http/Controllers/Admin/ReferralCodeController.php b/app/Http/Controllers/Admin/ReferralCodeController.php index b51233f..726db22 100644 --- a/app/Http/Controllers/Admin/ReferralCodeController.php +++ b/app/Http/Controllers/Admin/ReferralCodeController.php @@ -41,7 +41,7 @@ class ReferralCodeController extends Controller } } catch (Exception $e) { Log::error("An error occurred in " . __METHOD__ . ": " . $e->getMessage(), ['exception' => $e]); - return jsonResponseWithErrorMessage(__('auth.something_went_wrong'), 500); + return jsonResponseWithErrorMessage(__('auth.something_went_wrong')); } } } diff --git a/resources/views/Admin/pages/manage_restaurants/add_restaurant.blade.php b/resources/views/Admin/pages/manage_restaurants/add_restaurant.blade.php index aafdb0f..4399ab3 100644 --- a/resources/views/Admin/pages/manage_restaurants/add_restaurant.blade.php +++ b/resources/views/Admin/pages/manage_restaurants/add_restaurant.blade.php @@ -167,10 +167,10 @@
+ drinks - +
- +
- + - +
- +
- + + @@ -170,11 +167,14 @@ {{-- --}} -

You will be charged ${{ $productList->product_value }} every - month - after your free trial period ends. +

+ + You will be charged ${{ $productList->product_value }} every month. Subscription will be renewed until cancelled.

-

Subscription will be renewed monthly until cancelled.

+ {{--

Subscription will be renewed monthly until cancelled.

--}} +
@@ -290,7 +290,7 @@ loader.style.display = 'block'; resultMessage.innerHTML = ''; let base_url = url_path; - console.log(); + if (referralCode == null || referralCode == '') { toastr.error('Kindly Enter Referral Code'); @@ -318,6 +318,9 @@ contentType: false, success: function(result) { if (result.success) { + document.getElementById('isCodeNotApplied').style.display = 'none'; + document.getElementById('isCodeApplied').style.display = 'block'; + resultMessage.innerHTML = 'Successfully applied Referral code!'; diff --git a/resources/views/Admin/pages/subscriptions/my-subscription.blade.php b/resources/views/Admin/pages/subscriptions/my-subscription.blade.php index 60bacae..683925c 100644 --- a/resources/views/Admin/pages/subscriptions/my-subscription.blade.php +++ b/resources/views/Admin/pages/subscriptions/my-subscription.blade.php @@ -88,7 +88,7 @@ @endif
- +
@@ -101,16 +101,18 @@ data-bs-target="#exampleModal">Cancel Subscription @else + +
- +
- {{ \Carbon\Carbon::parse($isSubscribedUser->cancelled_at)->format('j M, Y') }}
+ {{ \Carbon\Carbon::parse($isSubscribedUser->cancelled_at)->format('M d, Y') }}.
- +
- {{ \Carbon\Carbon::parse($isSubscribedUser->next_payment_date)->format('j M, Y') }}
+ {{ \Carbon\Carbon::parse($isSubscribedUser->next_payment_date)->format('M d, Y') }}.
@endif
@@ -134,9 +136,9 @@