From 499a9f7f0dc8a7fa6a159cbdff533d0d1b3d234f Mon Sep 17 00:00:00 2001 From: muzu-85 Date: Tue, 3 Dec 2024 16:13:19 +0530 Subject: [PATCH 1/5] fix done --- src/app/admin/activity/page.tsx | 64 ++++++++++++------- src/app/admin/coordinators/page.tsx | 42 +++++++----- src/app/admin/group/page.tsx | 51 +++++++++------ src/app/admin/page.tsx | 47 +++++++++----- src/app/admin/users/page.tsx | 34 ++++++---- .../change-password/page.tsx | 2 +- .../change-password/page.tsx | 2 +- 7 files changed, 152 insertions(+), 90 deletions(-) diff --git a/src/app/admin/activity/page.tsx b/src/app/admin/activity/page.tsx index b8d456d..b2644c6 100644 --- a/src/app/admin/activity/page.tsx +++ b/src/app/admin/activity/page.tsx @@ -151,27 +151,45 @@ const AdminGrid = () => { }, [token, router]); const [columnDefs, setColumnDefs] = useState([ - { field: "personal_activity_id", headerName: "Activity Id" }, - { field: "participant_name", headerName: "Name" }, - { field: "us_id", headerName: "User Id" }, - { field: "participant_address", headerName: "Tree Number" }, - { field: "activity_social_media_link", headerName: "Activity Link" }, - { field: "activity_description", headerName: "Chest Number" }, - { field: "activity_views", headerName: "View" }, - { field: "activity_likes", headerName: "Like" }, - { field: "activity_value", headerName: "Value" }, - { field: "earnings", headerName: "Earnings" }, - { field: "gp_name", headerName: "Group Name" }, - { field: "group_type", headerName: "Category" }, - { field: "activity_sub_category", headerName: "School Type" }, - { field: "edu_district", headerName: "Education District" }, - { field: "edu_sub_district_name", headerName: "Education Sub District" }, - { field: "sahodaya_name", headerName: "Sahodaya" }, - { field: "block_name", headerName: "Block" }, - { field: "project_name", headerName: "Project" }, - { field: "chapter_name", headerName: "Chapter" }, - { field: "cntry_name", headerName: "Country" }, - { field: "st_name", headerName: "State" }, + { field: "personal_activity_id", headerName: "Activity Id",width:120 }, + { field: "participant_name", headerName: "Name",width:100 }, + { field: "us_id", headerName: "User Id",width:100 }, + { field: "participant_address", headerName: "Tree Number",width:140 }, + { field: "activity_social_media_link", headerName: "Activity Link",width:140 }, + { field: "activity_on", headerName: "Activity On",width:140, + valueFormatter: (params) => { + const date = new Date(params.value); + const day = String(date.getDate()).padStart(2, '0'); + const month = String(date.getMonth() + 1).padStart(2, '0'); // Months are 0-based + const year = date.getFullYear(); + return `${day}-${month}-${year}`; + } + }, + { field: "activity_description", headerName: "Chest Number",width:140 }, + { field: "activity_views", headerName: "View",width:100 }, + { field: "activity_likes", headerName: "Like",width:100 }, + { field: "activity_value", headerName: "Value",width:100 }, + { field: "earnings", headerName: "Earnings",width:120 }, + { field: "created_on", headerName: "Created On",width:140, + valueFormatter: (params) => { + const date = new Date(params.value); + const day = String(date.getDate()).padStart(2, '0'); + const month = String(date.getMonth() + 1).padStart(2, '0'); // Months are 0-based + const year = date.getFullYear(); + return `${day}-${month}-${year}`; + } + }, + { field: "gp_name", headerName: "Group Name",width:140 }, + { field: "group_type", headerName: "Category",width:120 }, + { field: "activity_sub_category", headerName: "School Type",width:140 }, + { field: "edu_district", headerName: "Education District",width:180 }, + { field: "edu_sub_district_name", headerName: "Education Sub District",width:200 }, + { field: "sahodaya_name", headerName: "Sahodaya",width:120 }, + { field: "block_name", headerName: "Block",width:100 }, + { field: "project_name", headerName: "Project",width:100 }, + { field: "chapter_name", headerName: "Chapter",width:100 }, + { field: "cntry_name", headerName: "Country",width:100 }, + { field: "st_name", headerName: "State",width:100 }, ]); const defaultColDef = useMemo(() => { @@ -1565,7 +1583,7 @@ const AdminGrid = () => { rowData={rowData} columnDefs={[ { - headerName: "Serial No", // Column header + headerName: "Sl No", // Column header valueGetter: (params) => { const itemsPerPage = 10; // Number of items per page @@ -1573,7 +1591,7 @@ const AdminGrid = () => { // Calculate the serial number return startIndex + params.node!.rowIndex! + 1; }, - width: 100, // Optional: Adjust the width of the serial number column + width: 70, // Optional: Adjust the width of the serial number column suppressMenu: true, // Optional: Hide the column menu sortable: false, // Optional: Disable sorting for the serial number column filter: false, // Optional: Disable filtering for the serial number column diff --git a/src/app/admin/coordinators/page.tsx b/src/app/admin/coordinators/page.tsx index 6fedc7b..abc7bc3 100644 --- a/src/app/admin/coordinators/page.tsx +++ b/src/app/admin/coordinators/page.tsx @@ -148,19 +148,27 @@ const AdminGrid = () => { }, [token, router]); const [columnDefs, setColumnDefs] = useState([ - { field: "co_ord_id", headerName: "Coordinator Id" }, - { field: "co_ord_name", headerName: "Name" }, - { field: "co_email_id", headerName: "Email" }, - { field: "co_username", headerName: "Username" }, - { field: "group_type", headerName: "Group" }, - { field: "cntry_name", headerName: "Country" }, - { field: "st_name", headerName: "State" }, - { field: "dis_name", headerName: "District" }, - { field: "cop_name", headerName: "Cooperation" }, - { field: "lsg_name", headerName: "LSGD" }, - { field: "gp_ward_no", headerName: "Ward" }, - { field: "gp_name", headerName: "Group Name" }, - { field: "gp_refferal_name", headerName: "Referral Name" }, + { field: "co_ord_id", headerName: "Coordinator Id",width:150}, + { field: "co_ord_name", headerName: "Name",width:100 }, + { field: "co_email_id", headerName: "Email" ,width:100}, + { field: "co_username", headerName: "Username",width:120 }, + { field: "co_ord_created_on", headerName: "Created On",width:140, + valueFormatter: (params) => { + const date = new Date(params.value); + const day = String(date.getDate()).padStart(2, '0'); + const month = String(date.getMonth() + 1).padStart(2, '0'); // Months are 0-based + const year = date.getFullYear(); + return `${day}-${month}-${year}`; + } }, + { field: "group_type", headerName: "Group",width:100 }, + { field: "cntry_name", headerName: "Country",width:100 }, + { field: "st_name", headerName: "State",width:100 }, + { field: "dis_name", headerName: "District",width:100 }, + { field: "cop_name", headerName: "Cooperation",width:130 }, + { field: "lsg_name", headerName: "LSGD",width:100 }, + { field: "gp_ward_no", headerName: "Ward",width:100 }, + { field: "gp_name", headerName: "Group Name",width:140 }, + { field: "gp_refferal_name", headerName: "Referral Name",width:160 }, ]); @@ -220,9 +228,11 @@ const AdminGrid = () => { if (response.data.success && response.status != 203) { + setRowData(response.data.cordinatorList); setTotalPages(Math.ceil(response.data.totalCount / itemsPerPage)); setTotalcount(response.data.totalCount); - setRowData(response.data.cordinatorList); + console.log(response.data) + } } @@ -1452,7 +1462,7 @@ setTotalcount("0"); rowData={rowData} columnDefs={[ { - headerName: "Serial No", // Column header + headerName: "Sl No", // Column header valueGetter: (params) => { const itemsPerPage = 10; // Number of items per page @@ -1460,7 +1470,7 @@ setTotalcount("0"); // Calculate the serial number return startIndex + params.node!.rowIndex! + 1; }, - width: 100, // Optional: Adjust the width of the serial number column + width: 70, // Optional: Adjust the width of the serial number column suppressMenu: true, // Optional: Hide the column menu sortable: false, // Optional: Disable sorting for the serial number column filter: false, // Optional: Disable filtering for the serial number column diff --git a/src/app/admin/group/page.tsx b/src/app/admin/group/page.tsx index c650e16..9166595 100644 --- a/src/app/admin/group/page.tsx +++ b/src/app/admin/group/page.tsx @@ -143,24 +143,33 @@ const AdminGrid = () => { } }, [token, router]); const [columnDefs, setColumnDefs] = useState([ - { field: "gp_id", headerName: "Group Id" }, - { field: "gp_name", headerName: "Group name" }, - { field: "group_type", headerName: "Group type" }, - { field: "upload_count", headerName: "Upload count" }, - { field: "activity_count", headerName: "Activity count" }, - { field: "earnings", headerName: "Earnings"}, - { field: "type_name", headerName: "School type" }, - { field: "gp_cat_name", headerName: "School category" }, - { field: "edu_district", headerName: "Edu district" }, - { field: "edu_sub_district_name", headerName: "Edu sub district" }, - { field: "sahodaya_name", headerName: "Sahodaya" }, - { field: "block_name", headerName: "Block" }, - { field: "project_name", headerName: "Project" }, - { field: "chapter_name", headerName: "Chapter" }, - { field: "zone_name", headerName: "Zone" }, - { field: "cntry_name", headerName: "Country" }, - { field: "st_name", headerName: "State" }, - { field: "co_ord_name", headerName: "Coordinator name" }, + { field: "gp_id", headerName: "Group Id" ,width:120}, + { field: "gp_name", headerName: "Group name" ,width:140 }, + { field: "group_type", headerName: "Group type" ,width:140 }, + { field: "co_ord_created_on", headerName: "Created On" ,width:140, + valueFormatter: (params) => { + const date = new Date(params.value); + const day = String(date.getDate()).padStart(2, '0'); + const month = String(date.getMonth() + 1).padStart(2, '0'); // Months are 0-based + const year = date.getFullYear(); + return `${day}-${month}-${year}`; + } + }, + { field: "upload_count", headerName: "Upload count" ,width:140 }, + { field: "activity_count", headerName: "Activity count" ,width:140 }, + { field: "earnings", headerName: "Earnings" ,width:120}, + { field: "type_name", headerName: "School type" ,width:140 }, + { field: "gp_cat_name", headerName: "School category" ,width:160 }, + { field: "edu_district", headerName: "Edu district",width:140 }, + { field: "edu_sub_district_name", headerName: "Edu sub district" ,width:160 }, + { field: "sahodaya_name", headerName: "Sahodaya" ,width:120}, + { field: "block_name", headerName: "Block" ,width:100 }, + { field: "project_name", headerName: "Project" ,width:100 }, + { field: "chapter_name", headerName: "Chapter" ,width:100 }, + { field: "zone_name", headerName: "Zone" ,width:100 }, + { field: "cntry_name", headerName: "Country" ,width:100 }, + { field: "st_name", headerName: "State" ,width:100 }, + { field: "co_ord_name", headerName: "Coordinator name" ,width:180 }, ]); const defaultColDef = useMemo(() => { @@ -231,7 +240,7 @@ const AdminGrid = () => { } }; fetchdata(); - }, [currentPage, token]); + }, [currentPage, filterdata, token]); useEffect(() => { async function fetchData() { @@ -1468,7 +1477,7 @@ const AdminGrid = () => { rowData={rowData} columnDefs={[ { - headerName: "Serial No", // Column header + headerName: "Sl No", // Column header valueGetter: (params) => { const itemsPerPage = 10; // Number of items per page @@ -1476,7 +1485,7 @@ const AdminGrid = () => { // Calculate the serial number return startIndex + params.node!.rowIndex! + 1; }, - width: 100, // Optional: Adjust the width of the serial number column + width: 70, // Optional: Adjust the width of the serial number column suppressMenu: true, // Optional: Hide the column menu sortable: false, // Optional: Disable sorting for the serial number column filter: false, // Optional: Disable filtering for the serial number column diff --git a/src/app/admin/page.tsx b/src/app/admin/page.tsx index 4ce9a01..1d4f761 100644 --- a/src/app/admin/page.tsx +++ b/src/app/admin/page.tsx @@ -146,21 +146,36 @@ const GridExample = () => { } }, [token, router]); + const [columnDefs, setColumnDefs] = useState([ // { field: "slno", headerName: "Sl No" }, - { field: "up_id", headerName: "Tree No" }, - { field: "up_name", headerName: "Uploader name" }, - { field: "up_planter", headerName: "Planter name" }, - { field: "up_tree_name", headerName: "Tree name" }, - { field: "gp_name", headerName: "Group name" }, - { field: "co_ord_name", headerName: "Coordinator name" }, - { field: "group_type", headerName: "Group type" }, + { field: "up_id", headerName: "Tree No", width: 100 }, + { field: "up_name", headerName: "Uploader name", width: 150 }, + { field: "up_planter", headerName: "Planter name", width: 140 }, + { field: "up_tree_name", headerName: "Tree name", width: 140 }, + { field: "up_date", headerName: "Date", width: 140 , + valueFormatter: (params) => { + const date = new Date(params.value); + const day = String(date.getDate()).padStart(2, '0'); + const month = String(date.getMonth() + 1).padStart(2, '0'); // Months are 0-based + const year = date.getFullYear(); + return `${day}-${month}-${year}`; + }}, + { field: "gp_name", headerName: "Group name", width: 140 }, + { field: "co_ord_name", headerName: "Coordinator name", width: 180 }, + { field: "group_type", headerName: "Group type", width: 120 }, ]); const defaultColDef = useMemo(() => { return { filter: "agTextColumnFilter", floatingFilter: false, + autoSizeStrategy: { + type: 'fitContentWidth', + // Optional: Limit column sizes + defaultMinWidth: 100, + defaultMaxWidth: 500 + }, }; }, []); @@ -192,11 +207,13 @@ const GridExample = () => { setTotalPages(Math.ceil(response.data.totalCount / itemsPerPage)); setTotalcount(response.data.totalCount); const data = response.data.Uploads; - // data.forEach((item: { slno: any; }, index: number) => { - // item.slno = index + 1; // Serial number starts from 1 - // }); - // console.log('part1', data) - setRowData(data); + + + + console.log('part1', data); // Log the formatted data + + setRowData(data); // Set the updated data to state + } else { setTotalcount("0"); @@ -1520,15 +1537,15 @@ const GridExample = () => { rowData={rowData} columnDefs={[ { - headerName: "Serial No", // Column header + headerName: "Sl No", // Column header valueGetter: (params) => { const itemsPerPage = 10; // Number of items per page - + const startIndex = (currentPage - 1) * itemsPerPage; // Calculate the start index for pagination // Calculate the serial number return startIndex + params.node!.rowIndex! + 1; }, - width: 100, // Optional: Adjust the width of the serial number column + width: 70, // Optional: Adjust the width of the serial number column suppressMenu: true, // Optional: Hide the column menu sortable: false, // Optional: Disable sorting for the serial number column filter: false, // Optional: Disable filtering for the serial number column diff --git a/src/app/admin/users/page.tsx b/src/app/admin/users/page.tsx index 1850df0..d01586f 100644 --- a/src/app/admin/users/page.tsx +++ b/src/app/admin/users/page.tsx @@ -143,17 +143,25 @@ const AdminGrid = () => { }, [token, router]); const [columnDefs, setColumnDefs] = useState([ - { field: "us_id", headerName: "User Id" }, - { field: "us_name", headerName: "Name" }, - { field: "us_email", headerName: "Email" }, - { field: "us_mobile", headerName: "Mobile" }, - { field: "cntry_name", headerName: "Country" }, - { field: "st_name", headerName: "State" }, - { field: "dis_name", headerName: "District" }, - { field: "us_address", headerName: "Address" }, - { field: "created_on", headerName: "Registered date" }, - { field: "gp_name", headerName: "Group name" }, - { field: "co_ord_name", headerName: "Coordinator name" }, + { field: "us_id", headerName: "User Id", width:100 }, + { field: "us_name", headerName: "Name", width:100 }, + { field: "us_email", headerName: "Email", width:100 }, + { field: "us_mobile", headerName: "Mobile", width:100 }, + { field: "cntry_name", headerName: "Country", width:100 }, + { field: "st_name", headerName: "State", width:100 }, + { field: "dis_name", headerName: "District", width:100 }, + { field: "us_address", headerName: "Address", width:120 }, + { field: "created_on", headerName: "Registered date", width:160 , + valueFormatter: (params) => { + const date = new Date(params.value); + const day = String(date.getDate()).padStart(2, '0'); + const month = String(date.getMonth() + 1).padStart(2, '0'); // Months are 0-based + const year = date.getFullYear(); + return `${day}-${month}-${year}`; + } + }, + { field: "gp_name", headerName: "Group name", width:140 }, + { field: "co_ord_name", headerName: "Coordinator name", width:180 }, ]); const defaultColDef = useMemo(() => { @@ -1457,7 +1465,7 @@ const AdminGrid = () => { rowData={rowData} columnDefs={[ { - headerName: "Serial No", // Column header + headerName: "Sl No", // Column header valueGetter: (params) => { const itemsPerPage = 10; // Number of items per page @@ -1465,7 +1473,7 @@ const AdminGrid = () => { // Calculate the serial number return startIndex + params.node!.rowIndex! + 1; }, - width: 100, // Optional: Adjust the width of the serial number column + width: 70, // Optional: Adjust the width of the serial number column suppressMenu: true, // Optional: Hide the column menu sortable: false, // Optional: Disable sorting for the serial number column filter: false, // Optional: Disable filtering for the serial number column diff --git a/src/app/forgot-password-coordinator/change-password/page.tsx b/src/app/forgot-password-coordinator/change-password/page.tsx index ab4b050..bec51cd 100644 --- a/src/app/forgot-password-coordinator/change-password/page.tsx +++ b/src/app/forgot-password-coordinator/change-password/page.tsx @@ -101,7 +101,7 @@ function Page() { - We have sent OTP in your registered Phone Number + We have sent OTP in your registered email address diff --git a/src/app/forgot-password-user/change-password/page.tsx b/src/app/forgot-password-user/change-password/page.tsx index f533785..4da028a 100644 --- a/src/app/forgot-password-user/change-password/page.tsx +++ b/src/app/forgot-password-user/change-password/page.tsx @@ -102,7 +102,7 @@ function Page() { - We have sent OTP in your registered Phone Number + We have sent OTP in your registered email address From 15e87514ba7cf25591775257f72ca54a4caa3ed0 Mon Sep 17 00:00:00 2001 From: muzu-85 Date: Tue, 3 Dec 2024 16:18:58 +0530 Subject: [PATCH 2/5] fix done --- src/app/admin/group/page.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app/admin/group/page.tsx b/src/app/admin/group/page.tsx index 4641884..99159c7 100644 --- a/src/app/admin/group/page.tsx +++ b/src/app/admin/group/page.tsx @@ -145,6 +145,9 @@ const AdminGrid = () => { const [columnDefs, setColumnDefs] = useState([ { field: "gp_id", headerName: "Group Id" ,width:120}, { field: "gp_name", headerName: "Group name" ,width:140 }, + { field: "co_ord_name", headerName: "Coordinator name",width:180 }, + { field: "co_ord_contact", headerName: "Phone Number",width:160}, + { field: "co_ord_id", headerName: "Cordinator Id",width:140}, { field: "group_type", headerName: "Group type" ,width:140 }, { field: "co_ord_created_on", headerName: "Created On" ,width:140, valueFormatter: (params) => { From 5dd3b81a0951ae6f31e8f982edad9500362f4e6a Mon Sep 17 00:00:00 2001 From: muzu-85 Date: Tue, 3 Dec 2024 19:29:55 +0530 Subject: [PATCH 3/5] fix style of admin table --- src/app/admin/activity-category/page.tsx | 2 +- src/app/admin/activity/page.tsx | 2 +- src/app/admin/ads/page.tsx | 2 +- src/app/admin/challenges/page.tsx | 2 +- src/app/admin/clubs/page.tsx | 2 +- src/app/admin/contact-us-form/page.tsx | 42 +++------------------- src/app/admin/coordinators/page.tsx | 2 +- src/app/admin/corporation/page.tsx | 2 +- src/app/admin/edudistrict/page.tsx | 2 +- src/app/admin/edusubdistrict/page.tsx | 2 +- src/app/admin/group/[id]/edit-grp-form.tsx | 6 ++-- src/app/admin/group/page.tsx | 2 +- src/app/admin/icdsblock/page.tsx | 2 +- src/app/admin/icdsproject/page.tsx | 2 +- src/app/admin/lsgd/page.tsx | 2 +- src/app/admin/mainevents/page.tsx | 2 +- src/app/admin/mmchapter/page.tsx | 2 +- src/app/admin/mmzone/page.tsx | 2 +- src/app/admin/news-and-events/page.tsx | 2 +- src/app/admin/page.tsx | 2 +- src/app/admin/sahodaya/page.tsx | 2 +- src/app/admin/users/page.tsx | 2 +- 22 files changed, 27 insertions(+), 61 deletions(-) diff --git a/src/app/admin/activity-category/page.tsx b/src/app/admin/activity-category/page.tsx index e1b9fe8..0b68bc9 100644 --- a/src/app/admin/activity-category/page.tsx +++ b/src/app/admin/activity-category/page.tsx @@ -142,7 +142,7 @@ const AdminGrid = () => { Export To Excel -
+
{
Total Count : {totalcount}
-
+
{ > Export To Excel -
+
{
Total Count : {totalcount}
-
+
{ Export To Excel -
+
{ > Export To Excel -
+
{ paginationPageSizeSelector={[10, 25, 50]} />
-
- - {currentPage >= 4 && totalPages > 3 && ...} - - {Array.from({ length: totalPages >= 3 ? 3 : totalPages }, (_, index) => currentPage < 4 ? index+1:currentPage+index-2).map((page) => ( - handlePageChange(page)} - > - {page > 0 ? page : ''} - - ))} - - {currentPage > 1 && totalPages > 3 && currentPage!=totalPages && ...} - {currentPage === 1 && totalPages > 3 && currentPage!=totalPages && ...} - + - -
+
); }; diff --git a/src/app/admin/coordinators/page.tsx b/src/app/admin/coordinators/page.tsx index e32c00d..2057762 100644 --- a/src/app/admin/coordinators/page.tsx +++ b/src/app/admin/coordinators/page.tsx @@ -1457,7 +1457,7 @@ setTotalcount("0");
Total Count : {totalcount}
-
+
{
-
+
{
-
+
{
-
+
-
+
@@ -1084,7 +1084,7 @@ export function EditGrpTypeForm() { id="groupFilter" value={selecteduDistrict} onChange={handleFilterEduDistrict} - className="border border-gray-300 rounded p-1" + className="border border-gray-300 rounded p-1 " > @@ -1097,7 +1097,7 @@ export function EditGrpTypeForm() {
-
+
diff --git a/src/app/admin/group/page.tsx b/src/app/admin/group/page.tsx index 99159c7..d9d34f7 100644 --- a/src/app/admin/group/page.tsx +++ b/src/app/admin/group/page.tsx @@ -1475,7 +1475,7 @@ const AdminGrid = () => {
Total Count : {totalcount}
-
+
{
-
+
{
-
+
{
-
+
{ > Export To Excel -
+
{
-
+
{
-
+
{ > Export To Excel -
+
{
Total Count : {totalcount}
-
+
{
-
+
{
Total Count : {totalcount}
-
+
Date: Wed, 4 Dec 2024 17:24:26 +0530 Subject: [PATCH 4/5] change description of the forget password page --- src/app/forgot-password-user/change-password/page.tsx | 3 ++- src/app/forgot-password-user/page.tsx | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app/forgot-password-user/change-password/page.tsx b/src/app/forgot-password-user/change-password/page.tsx index 4da028a..01d21ef 100644 --- a/src/app/forgot-password-user/change-password/page.tsx +++ b/src/app/forgot-password-user/change-password/page.tsx @@ -41,6 +41,7 @@ function Page() { }); const router = useRouter() const { toast } = useToast() + const emailid = Cookies.get('emailid'); async function onSubmit(values: z.infer) { const phone = Cookies.get('ph'); const apidata = { @@ -102,7 +103,7 @@ function Page() { - We have sent OTP in your registered email address + `We have sent OTP in your registered email address {emailid}` diff --git a/src/app/forgot-password-user/page.tsx b/src/app/forgot-password-user/page.tsx index d46fa9e..f975193 100644 --- a/src/app/forgot-password-user/page.tsx +++ b/src/app/forgot-password-user/page.tsx @@ -44,9 +44,11 @@ function Page() { const response = await axios.post(`${apiURL}/user/forgotPassword`,apidata); if (response.status === 200) { Cookies.set("ph", values.phone.toString(), { expires: 1 }); + Cookies.set("emailid", response.data.emailId, { expires: 1 }); + console.log(response.data.emailId) toast({ title: "Success", - description: "Password reset link sent to your phone number.", + description: "Password reset link sent to your email address.", }); router.push(`/forgot-password-user/change-password`); } else { From 32aa9d13bbc167e57cde5b88162e92beb849d96b Mon Sep 17 00:00:00 2001 From: ROHITH K <65900177+Rohith272@users.noreply.github.com> Date: Thu, 5 Dec 2024 15:33:24 +0530 Subject: [PATCH 5/5] Update page.tsx --- src/app/forgot-password-user/change-password/page.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/forgot-password-user/change-password/page.tsx b/src/app/forgot-password-user/change-password/page.tsx index 01d21ef..c0001f6 100644 --- a/src/app/forgot-password-user/change-password/page.tsx +++ b/src/app/forgot-password-user/change-password/page.tsx @@ -103,7 +103,7 @@ function Page() { - `We have sent OTP in your registered email address {emailid}` + `We have sent OTP in email address {emailid}` @@ -157,4 +157,4 @@ export default function NgoAdditionalDetails() { ); -} \ No newline at end of file +}