Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
24f6efa
feat: add translation & api endpoint for forgot password flow change
nvnt122 Sep 29, 2025
b136728
fix: ensure router is ready before fetching product details
nvnt122 Oct 27, 2025
bee8f5b
feat: update ES terms & conditions translations
nvnt122 Oct 28, 2025
5fae312
Merge branch 'develop' of https://github.com/summit-webapp/summit int…
nvnt122 Oct 28, 2025
85c6577
Merge branch 'develop' of https://github.com/summit-webapp/summit int…
nvnt122 Oct 28, 2025
744df77
fix: handle null value in language handler hook
nvnt122 Oct 28, 2025
105558c
feat: add new API endpoints for user and customer management
nvnt122 Oct 31, 2025
e7ccf0f
fix: ensure router is ready before fetching product details
nvnt122 Oct 27, 2025
823ef4b
feat: update ES terms & conditions translations
nvnt122 Oct 28, 2025
7ff71ec
fix: simplify error handling in login process
nvnt122 Oct 31, 2025
70edd6f
fix: correct import path for CustomerActivationComponent
nvnt122 Oct 31, 2025
5b12a10
feat: add profile key to user-related translations in multiple languages
nvnt122 Oct 31, 2025
7ba011a
feat: changes
nvnt122 Nov 4, 2025
f1c58bc
feat: add profile page and enhance localization for user profile feat…
nvnt122 Nov 7, 2025
f495c4e
feat: add meta tags
nvnt122 Nov 7, 2025
0b8126e
feat: update password fields in localization files and enhance produc…
nvnt122 Nov 10, 2025
7ffdcf5
feat: update privacy policy and terms conditions components
nvnt122 Nov 10, 2025
eee16d7
Merge branch 'live' of https://github.com/nvnt122/summit into multili…
nvnt122 Nov 24, 2025
b681cd3
feat: saved address changes WIP
nvnt122 Nov 24, 2025
1f40aa6
feat: add localization for saved address management and update API re…
nvnt122 Nov 25, 2025
40cd214
feat: add localization for saved address management and update API re…
nvnt122 Nov 25, 2025
394f4c8
Merge branch 'live' of https://github.com/nvnt122/summit into live
nvnt122 Nov 25, 2025
22d36df
feat: update terms & conditions
nvnt122 Dec 2, 2025
4a7f201
feat: add offeror identification details in localization files
nvnt122 Dec 2, 2025
93352ed
feat: add specific conditions for personalized items in terms and con…
nvnt122 Dec 2, 2025
25d8446
feat: update french translations for bracelets, bangles & wedding rings
nvnt122 Dec 11, 2025
5d6132c
feat: map product details data & add api endpoints
nvnt122 Dec 18, 2025
1e186f7
feat: add transaltions for order again
nvnt122 Dec 19, 2025
3bc1be6
Merge branch 'live' of https://github.com/nvnt122/summit into multili…
nvnt122 Feb 23, 2026
8206f4b
fix: correct language and currency value extraction in updateUserPref…
nvnt122 Feb 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions hooks/AuthHooks/useLoginHook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const useLoginHook = () => {
localStorage.setItem('selected_currency', tokenData?.data?.currency);
// Redirect to the home page or any other page after successful login
if (tokenData?.data?.isPwdChg === 0) {
router.push('/forgot_password');
router.push('/forgot-password');
} else {
if (AFTER_LOGIN_REDIRECT_URL) {
router.push(AFTER_LOGIN_REDIRECT_URL);
Expand All @@ -72,12 +72,14 @@ const useLoginHook = () => {
// toast.success('Login Successfully');
}
} catch (error: any) {
if (error?.status === 400 && error?.response?.data?.error === "Invalid username or password") {
toast.error(t('invalid_credentials'));
return;
} else {
toast.error(t('error_while_login'));
}
// if (error?.response?.data?.error === "Invalid username or password") {
// toast.error(t('invalid_credentials'));
// return;
// } else {
// toast.error(t('error_while_login'));
// }
toast.error(error?.response?.data?.error || t('error_while_login'));
console.error('Error:', error);
} finally {
setLoginBtnLoader(false);
}
Expand Down
17 changes: 9 additions & 8 deletions hooks/GeneralHooks/LanguageHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ const useCurrencyLanguageHandler = () => {
const selectedLanguage = languageDisplayOptions.find((opt) => opt?.value === languageState)!;

const updateUserPreference = async (language: Option, currency: Option) => {
const languageCode = language.toString();
const currencyCode = currency.toString()
console
const languageCode = language?.value?.toString();
const currencyCode = currency?.value?.toString()
const apiBody = {
userPreferences:{
language: languageDisplayOptions.find((opt: Option) => opt?.value === languageCode)?.label,
Expand All @@ -39,22 +40,22 @@ const useCurrencyLanguageHandler = () => {
}
};

const handleLanguageChange = (value: Option) => {
const handleLanguageChange = (value: Option | null) => {
dispatch(setLanguage(value?.value));
updateUserPreference(value, selectedCurrency);
updateUserPreference(value!, selectedCurrency);
};

const handleLanguageShallowUpdate = (value: Option) => {
const handleLanguageShallowUpdate = (value: Option | null) => {
dispatch(setLanguage(value?.value));
i18n.changeLanguage(value?.value as string).catch((err) => {});
};

const handleCurrencyChange = (value: Option) => {
const handleCurrencyChange = (value: Option | null) => {
dispatch(setCurrencyValue(value?.value));
updateUserPreference(selectedLanguage, value);
updateUserPreference(selectedLanguage, value!);
};

const handleCurrencyShallowUpdate = (value: Option) => {
const handleCurrencyShallowUpdate = (value: Option | null) => {
dispatch(setCurrencyValue(value?.value));
}

Expand Down
12 changes: 8 additions & 4 deletions hooks/ProductDetailPageHooks/useProductDetail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import fetchStockAvailabilityOfProduct from '../../services/api/product-detail-p
import fetchPinCodesListAPI from '../../services/api/general-apis/get-pin-code-list-api';
import debounce from 'debounce';
import useAuthErrorHandler from '../AuthHooks/handleAuthError';
import useCurrencyLanguageHandler from '../GeneralHooks/KCLanguageHandler';
import useCurrencyLanguageHandler from '../GeneralHooks/LanguageHandler';
type PinCodeTypes = {
name: string;
};
Expand Down Expand Up @@ -40,6 +40,8 @@ const useProductDetail = () => {
quantity: productDetailData?.min_order_qty || 1,
},
]);
const router = useRouter();

const handleMultipleQtyChange = (index: number, itemCode: string, value: string) => {
setItemList((prevItemList: any) => {
if (!Array.isArray(prevItemList)) {
Expand Down Expand Up @@ -70,7 +72,7 @@ const useProductDetail = () => {
if (
productDetailAPI?.status === 200 &&
productDetailAPI?.data?.msg === 'success' &&
Object?.keys(productDetailAPI?.data?.data).length > 0
Object?.keys(productDetailAPI?.data?.data[0]).length > 0
) {
setProductDetailData(productDetailAPI?.data?.data[0]);
if (productDetailAPI?.data?.message?.data?.min_order_qty > 0) {
Expand Down Expand Up @@ -174,10 +176,12 @@ const useProductDetail = () => {
debouncedSetValue(pinCode); // Debounce state update
};


useEffect(() => {
if (!router.isReady) return;
fetchProductDetailDataAPI();
// }, [query?.productId]);
}, [query?.productId, selectedCurrency]);
}, [router.isReady, query?.productId, selectedCurrency]);


return {
isLoading,
Expand Down
3 changes: 3 additions & 0 deletions interfaces/login-params-interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@ export interface TypeRegistrationForm {
eml: string;
usr: string;
pwd: string;
mob?: string;
defLang?: string;
defCurr?: string;
}
2 changes: 1 addition & 1 deletion interfaces/product-slideshow-images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ export interface ProductSlideshowImages {
slideShowImages: string[];
selectedImageBasedOnSelectedTone: number;
setSelectedImageBasedOnSelectedTone: (i: number) => void;
}
}
6 changes: 4 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({
});
const nextConfig = {
images: {
domains: ['summit.8848digitalerp.com', 'staging-twinkle.8848digitalerp.com', 'emr-euro-shine.8848digitalerp.com', 'backend.atelier-reya.com', 'kc-backend.8848digitalcloud.com'],
domains: ['summit.8848digitalerp.com', 'staging-twinkle.8848digitalerp.com', 'emr-euro-shine.8848digitalerp.com', 'backend.atelier-reya.com', 'localhost'],
formats: ['image/avif', 'image/webp'],
},
reactStrictMode: false,
reactStrictMode: false,
swcMinify: true,
compress: true,
};

module.exports = withBundleAnalyzer(nextConfig);
Expand Down
32 changes: 32 additions & 0 deletions pages/admin/customer-activation.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { CONSTANTS } from '../../services/config/app-config';
import { ServerDataTypes } from '../../interfaces/meta-data-interface';
import getPageMetaData from '../../utils/fetch-page-meta-deta';
import PageMetaData from '../../components/PageMetaData';
import CustomerActivationComponent from '../../components/Admin/CustomerListingComponent';

const CustomerListingPage = ({ serverDataForPages }: ServerDataTypes) => {
return (
<>
{CONSTANTS.ENABLE_META_TAGS && <PageMetaData meta_data={serverDataForPages.metaData} />}
<CustomerActivationComponent />
{/* <div>Customer Activation Page</div> */}
</>
);
};

export async function getServerSideProps(context: any) {
const { SUMMIT_APP_CONFIG } = CONSTANTS;
const method = 'get-meta-tags-api';
const version = SUMMIT_APP_CONFIG.version;
const entity = 'seo';
const params = `?version=${version}&method=${method}&entity=${entity}`;
const url = `${context.resolvedUrl.split('?')[0]}`;
if (CONSTANTS.ENABLE_META_TAGS) {
return await getPageMetaData(method, params, url);
} else {
return {
props: {},
};
}
}
export default CustomerListingPage;
10 changes: 5 additions & 5 deletions pages/forgot_password.tsx → pages/forgot-password.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import { CONSTANTS } from '../services/config/app-config';
import { ServerDataTypes } from '../interfaces/meta-data-interface';
import getPageMetaData from '../utils/fetch-page-meta-deta';
import PageMetaData from '../components/PageMetaData';
// import ForgotPasswordComponent from '../components/Auth/FallbackForgotPassword/ForgotPasswordComponent';
import ForgotPasswordComponent from '../components/Auth/FallbackForgotPassword/ForgotPasswordComponent';

const ResetPassowrd = ({ serverDataForPages }: ServerDataTypes) => {
const ResetPassword = ({ serverDataForPages }: ServerDataTypes) => {
return (
<>
{CONSTANTS.ENABLE_META_TAGS && <PageMetaData meta_data={serverDataForPages.metaData} />}
{/* <ForgotPasswordComponent /> */}
<div>Forgot Password Page</div>
<ForgotPasswordComponent />
{/* <div>Forgot Password Page</div> */}
</>
);
};
Expand All @@ -29,4 +29,4 @@ export async function getServerSideProps(context: any) {
};
}
}
export default ResetPassowrd;
export default ResetPassword;
32 changes: 32 additions & 0 deletions pages/privacy-policy.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { CONSTANTS } from '../services/config/app-config';
import { ServerDataTypes } from '../interfaces/meta-data-interface';
import getPageMetaData from '../utils/fetch-page-meta-deta';
import PageMetaData from '../components/PageMetaData';
import TermsPrivacyContent from '../components/Auth/TermsPrivacyContent';

const PrivacyPolicyPage = ({ serverDataForPages }: ServerDataTypes) => {
return (
<>
{CONSTANTS.ENABLE_META_TAGS && <PageMetaData meta_data={serverDataForPages.metaData} />}
{/* <div>Privacy Policy page</div> */}
<TermsPrivacyContent type="privacy" />
</>
);
};

export async function getServerSideProps(context: any) {
const { SUMMIT_APP_CONFIG } = CONSTANTS;
const method = 'get-meta-tags-api';
const version = SUMMIT_APP_CONFIG.version;
const entity = 'seo';
const params = `?version=${version}&method=${method}&entity=${entity}`;
const url = `${context.resolvedUrl.split('?')[0]}`;
if (CONSTANTS.ENABLE_META_TAGS) {
return await getPageMetaData(method, params, url);
} else {
return {
props: {},
};
}
}
export default PrivacyPolicyPage;
32 changes: 32 additions & 0 deletions pages/profile.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { CONSTANTS } from '../services/config/app-config';
import { ServerDataTypes } from '../interfaces/meta-data-interface';
import getPageMetaData from '../utils/fetch-page-meta-deta';
import PageMetaData from '../components/PageMetaData';
import FallbackProfileComponent from '../components/profile/FallbackProfile/FallbackProfileComponent';

const MyAccountPage = ({ serverDataForPages }: ServerDataTypes) => {
return (
<>
{CONSTANTS.ENABLE_META_TAGS && <PageMetaData meta_data={serverDataForPages.metaData} />}
{/* <div>Profile page</div> */}
<FallbackProfileComponent />
</>
);
};

export async function getServerSideProps(context: any) {
const { SUMMIT_APP_CONFIG } = CONSTANTS;
const method = 'get-meta-tags-api';
const version = SUMMIT_APP_CONFIG.version;
const entity = 'seo';
const params = `?version=${version}&method=${method}&entity=${entity}`;
const url = `${context.resolvedUrl.split('?')[0]}`;
if (CONSTANTS.ENABLE_META_TAGS) {
return await getPageMetaData(method, params, url);
} else {
return {
props: {},
};
}
}
export default MyAccountPage;
6 changes: 3 additions & 3 deletions pages/register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import { ServerDataTypes } from '../interfaces/meta-data-interface';
import getPageMetaData from '../utils/fetch-page-meta-deta';
import PageMetaData from '../components/PageMetaData';
import RegisterComponent from '../components/Auth/RegisterComponent';
// import FallbackRegisterComponent from '../components/Auth/FallbackRegister/FallbackRegisterComponent';
import FallbackRegisterComponent from '../components/Auth/FallbackRegister/FallbackRegisterComponent';

const Register = ({ serverDataForPages }: ServerDataTypes) => {
return (
<>
{CONSTANTS.ENABLE_META_TAGS && <PageMetaData meta_data={serverDataForPages.metaData} />}
<RegisterComponent />
{/* <FallbackRegisterComponent /> */}
{/* <RegisterComponent /> */}
<FallbackRegisterComponent />
</>
);
};
Expand Down
32 changes: 32 additions & 0 deletions pages/saved-addresses.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { CONSTANTS } from '../services/config/app-config';
import { ServerDataTypes } from '../interfaces/meta-data-interface';
import getPageMetaData from '../utils/fetch-page-meta-deta';
import PageMetaData from '../components/PageMetaData';
import SavedAddresses from '../components/profile/FallbackProfile/SavedAddressesComponent';

const SavedAddressesPage = ({ serverDataForPages }: ServerDataTypes) => {
return (
<>
{CONSTANTS.ENABLE_META_TAGS && <PageMetaData meta_data={serverDataForPages.metaData} />}
<SavedAddresses />
{/* <div>Saved Addresses Page</div> */}
</>
);
};

export async function getServerSideProps(context: any) {
const { SUMMIT_APP_CONFIG } = CONSTANTS;
const method = 'get-meta-tags-api';
const version = SUMMIT_APP_CONFIG.version;
const entity = 'seo';
const params = `?version=${version}&method=${method}&entity=${entity}`;
const url = `${context.resolvedUrl.split('?')[0]}`;
if (CONSTANTS.ENABLE_META_TAGS) {
return await getPageMetaData(method, params, url);
} else {
return {
props: {},
};
}
}
export default SavedAddressesPage;
32 changes: 32 additions & 0 deletions pages/terms-and-conditions.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { CONSTANTS } from '../services/config/app-config';
import { ServerDataTypes } from '../interfaces/meta-data-interface';
import getPageMetaData from '../utils/fetch-page-meta-deta';
import PageMetaData from '../components/PageMetaData';
import TermsPrivacyContent from '../components/Auth/TermsPrivacyContent';

const TermsConditionPage = ({ serverDataForPages }: ServerDataTypes) => {
return (
<>
{CONSTANTS.ENABLE_META_TAGS && <PageMetaData meta_data={serverDataForPages.metaData} />}
{/* <div>Terms & Conditions page</div> */}
<TermsPrivacyContent type="terms" />
</>
);
};

export async function getServerSideProps(context: any) {
const { SUMMIT_APP_CONFIG } = CONSTANTS;
const method = 'get-meta-tags-api';
const version = SUMMIT_APP_CONFIG.version;
const entity = 'seo';
const params = `?version=${version}&method=${method}&entity=${entity}`;
const url = `${context.resolvedUrl.split('?')[0]}`;
if (CONSTANTS.ENABLE_META_TAGS) {
return await getPageMetaData(method, params, url);
} else {
return {
props: {},
};
}
}
export default TermsConditionPage;
32 changes: 32 additions & 0 deletions pages/update-password.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { CONSTANTS } from '../services/config/app-config';
import { ServerDataTypes } from '../interfaces/meta-data-interface';
import getPageMetaData from '../utils/fetch-page-meta-deta';
import PageMetaData from '../components/PageMetaData';
import UpdatePasswordComponent from '../components/Auth/FallbackUpdatePassword/UpdatePasswordComponent';

const UpdatePassword = ({ serverDataForPages }: ServerDataTypes) => {
return (
<>
{CONSTANTS.ENABLE_META_TAGS && <PageMetaData meta_data={serverDataForPages.metaData} />}
<UpdatePasswordComponent />
{/* <div>Update Password Page</div> */}
</>
);
};

export async function getServerSideProps(context: any) {
const { SUMMIT_APP_CONFIG } = CONSTANTS;
const method = 'get-meta-tags-api';
const version = SUMMIT_APP_CONFIG.version;
const entity = 'seo';
const params = `?version=${version}&method=${method}&entity=${entity}`;
const url = `${context.resolvedUrl.split('?')[0]}`;
if (CONSTANTS.ENABLE_META_TAGS) {
return await getPageMetaData(method, params, url);
} else {
return {
props: {},
};
}
}
export default UpdatePassword;
Loading