From 0d478537c45302f42c0353599ed36751f554c0f5 Mon Sep 17 00:00:00 2001 From: karthikalakshmi Date: Fri, 13 Feb 2026 19:45:36 +0530 Subject: [PATCH] Fix 145 Issue solving --- .../ComboSalesBillTable.scss | 3 +- .../StandardTable/StandardTablePayment.jsx | 1 + .../Template/PlanExpireNotification.jsx | 2 + .../ExtentedModal/ExtendSubscriptionModal.jsx | 53 ++++++++++--------- 4 files changed, 32 insertions(+), 27 deletions(-) diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/ComboSalesBillTable/ComboSalesBillTable.scss b/src/Pages/BookingScreen/Components/BSBillingTables/ComboSalesBillTable/ComboSalesBillTable.scss index 2840d01..5c1975d 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/ComboSalesBillTable/ComboSalesBillTable.scss +++ b/src/Pages/BookingScreen/Components/BSBillingTables/ComboSalesBillTable/ComboSalesBillTable.scss @@ -29,7 +29,8 @@ tbody { >tr:last-child { - background-color: #e5d434 !important; + // background-color: #e5d434 !important; + background-color: #ffffff !important; position: sticky; bottom: 0; } diff --git a/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTablePayment.jsx b/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTablePayment.jsx index b2806c9..ce83b53 100644 --- a/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTablePayment.jsx +++ b/src/Pages/BookingScreen/Components/BSBillingTables/StandardTable/StandardTablePayment.jsx @@ -211,6 +211,7 @@ import { } from '../../../../../Features/ProductPage/ProductPage.js'; import { PostBlockSlots } from '../../../../../Features/Kiosk/kiosk.js'; import CustomerOrders from '../../BookingFunctionality/CustomerOrders.jsx'; +import { getEmpAccess } from '../../../../../Features/AppPage/CenterPage.js'; const subDirectory = import.meta.env.ENV_BASE_URL; const MainHomeUrl = import.meta.env.ENV_MAIN_BASE_URL; const RetailApiurl = import.meta.env.ENV_API_URL; diff --git a/src/Pages/BookingScreen/Template/PlanExpireNotification.jsx b/src/Pages/BookingScreen/Template/PlanExpireNotification.jsx index 1adef66..a4d8543 100644 --- a/src/Pages/BookingScreen/Template/PlanExpireNotification.jsx +++ b/src/Pages/BookingScreen/Template/PlanExpireNotification.jsx @@ -14,6 +14,8 @@ import { useEffect, useState, useMemo } from 'react'; import { encryptObject, getSession } from '../../../Services/Others'; import { GenerateLogout } from '../../../Features/BrachLogin/BranchLogin'; import { PublicQrCodepost } from '../../../Features/ConfigMasterPage/ConfigMasterPage'; +// +import "../../../Styles/BookingScreen/Template/BSLayout3/BSLayout3.scss"; const subDirectory = import.meta.env.ENV_BASE_URL; const commonDirectory = import.meta.env.ENV_COMMON_BASE_URL; diff --git a/src/Pages/ExtentedModal/ExtendSubscriptionModal.jsx b/src/Pages/ExtentedModal/ExtendSubscriptionModal.jsx index 0ee0c80..b16c116 100644 --- a/src/Pages/ExtentedModal/ExtendSubscriptionModal.jsx +++ b/src/Pages/ExtentedModal/ExtendSubscriptionModal.jsx @@ -7,50 +7,50 @@ import { StoredSessionData } from "../../Features/ThemeChange/ThemeChange"; import { useNavigate } from "react-router-dom"; import { useDispatch } from "react-redux"; import { sendSms } from "../../Features/Payment/PaymentDetails/PaymentDetails"; -import { useSelector } from "react-redux"; -import { encryptObject } from "../../Services/Others"; +import { encryptObject, getSession } from "../../Services/Others"; import { PublicQrCodepost } from "../../Features/ConfigMasterPage/ConfigMasterPage"; - +const subDirectory = import.meta.env.ENV_BASE_URL; +const commonDirectory = import.meta.env.ENV_COMMON_BASE_URL; const ExtendSubscriptionModal = ({ - onClose, + onClose,setExtendModel }) => { const navigate = useNavigate(); const dispatch = useDispatch(); - const SessionData = useSelector(StoredSessionData); - const { - AppId, - UserId, - AppName, - SessionId, - AuthToken, - CompId, - SessionMobileNo, - UserName, - UserType, - } = SessionData; + const AppId =getSession("AppId"); + const UserId =getSession("UserId"); + const SessionId =getSession("SessionId"); + const AuthToken =sessionStorage.getItem('auth'); + const CompId =getSession("CompId"); + const SessionMobileNo =getSession("MobileNo"); + const UserName =getSession("userName"); + const UserType =getSession("UserType"); + // ================= DATE FORMAT ================= const formatDate = (dateStr) => { const date = new Date(dateStr); return `${String(date.getDate()).padStart(2, '0')}-${String(date.getMonth() + 1).padStart(2, '0')}-${date.getFullYear()}`; }; // ================= DATE ADDITION ================= - function addDays(dateString, days) { - // Make it ISO-safe for iOS / WebView - const isoDate = dateString.replace(' ', 'T'); - const currentDate = new Date(isoDate); + + function addDaysDDMMYYYY(dateString, days) { + const [day, month, year] = dateString.split('-').map(Number); - currentDate.setDate(currentDate.getDate() + Number(days)); + const date = new Date(year, month - 1, day); + date.setDate(date.getDate() + Number(days)); - return formatDate(currentDate); - } + const d = String(date.getDate()).padStart(2, '0'); + const m = String(date.getMonth() + 1).padStart(2, '0'); + const y = date.getFullYear(); + return `${d}-${m}-${y}`; +} // ================= FREE EXTEND ================= const freeExtend = async () => { try { const now = new Date(); const currentDate = formatDate(now); - + console.log('Current Date1:', currentDate,now); const response1 = await dispatch( getPurchasedAppDetails({ AppId, UserId }) ).unwrap(); @@ -65,13 +65,14 @@ const ExtendSubscriptionModal = ({ PurDate: currentDate, NoofDays: 30, PaymentMode: 27, + PaymentType:PurchasedDetails[0]?.PaymentMode, PaymentStatus: 'S', LicenseStatus: PurchasedDetails[0]?.LicenseStatus, Price: PurchasedDetails[0]?.Price ?? 0, TaxId: PurchasedDetails[0]?.TaxId ?? 0, NetPrice: PurchasedDetails[0]?.ExistingPlanNetPrice ?? 0, ValidityStart: currentDate, - ValidityEnd: addDays(currentDate, PurchasedDetails[0]?.NoOfDays), + ValidityEnd: addDaysDDMMYYYY(currentDate, 30), CreatedBy: UserId, TaxAmount: PurchasedDetails[0]?.TaxAmount ?? 0, MobileNo: SessionMobileNo, @@ -84,7 +85,7 @@ const ExtendSubscriptionModal = ({ if (response?.data?.statusCode === 1 && response?.data?.SMSbody) { await dispatch(sendSms({ body: response.data.SMSbody })); setExtendModel(false) - + navigate(`${subDirectory}app-page/home`); } } catch (error) { console.error('freeExtend error:', error);