From 3c35a879b199319293b22b0da0f9574a45748699 Mon Sep 17 00:00:00 2001 From: Abin Toppo Date: Mon, 12 Jan 2026 17:46:53 +0530 Subject: [PATCH] before merge --- src/Screens/Ragistration/StageThree.tsx | 6 ++- .../Tender/tenderBidding/TenderBidding.tsx | 12 ++--- src/Services/BBPS/Hooks.ts | 45 +++++++++++++++++-- src/Services/BBPS/apis.ts | 4 +- 4 files changed, 55 insertions(+), 12 deletions(-) diff --git a/src/Screens/Ragistration/StageThree.tsx b/src/Screens/Ragistration/StageThree.tsx index e7e4741..0dcef32 100644 --- a/src/Screens/Ragistration/StageThree.tsx +++ b/src/Screens/Ragistration/StageThree.tsx @@ -18,6 +18,7 @@ import PrimaryButton from '../../Component/PrimaryButton/PrimaryButton'; import MyInput from '../../Component/MyInput'; import { showToast } from '../../Constant/ShowDailog'; import { STAGETHREE } from '../../Services/BBPS/ApiUrls'; +import { useContractorStageThreeSubmit } from '../../Services/BBPS/Hooks'; type Company = { @@ -49,7 +50,8 @@ const StageThreeScreen = () => { const [focusedField, setFocusedField] = useState(null); const [loading, setLoading] = useState(false); - + const { mutateAsync: stageThreeSubmit } = useContractorStageThreeSubmit(); + const handleChange = (index: number, field: keyof Company, value: string) => { const updated = [...company]; updated[index][field] = value; @@ -83,7 +85,7 @@ const StageThreeScreen = () => { })); console.log('stage 3 payload : ', payload); - // const response = await apiCallForPostWithToken (STAGETHREE, payload); + const response = await stageThreeSubmit(payload); console.log('✅ company submitted successfully:', response); if (response.statusCode === 200 || response.statusCode === 201) { diff --git a/src/Screens/Tender/tenderBidding/TenderBidding.tsx b/src/Screens/Tender/tenderBidding/TenderBidding.tsx index efd1b74..81b4ff9 100644 --- a/src/Screens/Tender/tenderBidding/TenderBidding.tsx +++ b/src/Screens/Tender/tenderBidding/TenderBidding.tsx @@ -16,7 +16,7 @@ import { pick, types } from '@react-native-documents/picker'; import { InsideHeader } from '../../../Component/Index'; import colors from '../../../Constant/Color'; import { SUBMIT_ENVELOPE_A, SUBMIT_ENVELOPE_B, SUBMIT_ENVELOPE_FILE_A, SUBMIT_ENVELOPE_FILE_B } from '../../../Services/BBPS/ApiUrls'; -import { Fontisto } from '@react-native-vector-icons/fontisto'; +import { CheckSquare, Square } from 'lucide-react-native'; import { apiCall } from '../../../Axios/Axios'; type EnvelopeType = 'A' | 'B' | 'C'; @@ -359,7 +359,7 @@ const TenderBidding = () => { const res = await apiCall('post',SUBMIT_ENVELOPE_A, payload) console.log("res A envelop : ", res) - ToastAndroid.show(res.message, ToastAndroid.SHORT) + ToastAndroid.show(res?.message, ToastAndroid.SHORT) navigation.goBack() @@ -493,9 +493,11 @@ const TenderBidding = () => { /> setCheck(!check)}> - {check ? : - - } + {check ? ( + + ) : ( + + )} Check First Terms&Condition diff --git a/src/Services/BBPS/Hooks.ts b/src/Services/BBPS/Hooks.ts index ca39245..b19e7be 100644 --- a/src/Services/BBPS/Hooks.ts +++ b/src/Services/BBPS/Hooks.ts @@ -1,5 +1,5 @@ import { useInfiniteQuery, useMutation, useQuery } from '@tanstack/react-query'; -import { fetchAuctionItem, fetchCityDropdown, fetchDashboard, fetchEmdCheck, fetchLiveAuction, fetchLiveTender, fetchMasterData, fetchPurchaseAuction, fetchPurchaseTender, fetchTenderById, getDesignation, getRagistrationState, offlineAuctionPurchase, offlineTenderPurchase, proceedToBid, registerContractor, sendAadhaarOtp, userAuctionLogin, userLogin, verifyAadhaarOtp, verifyGstNumber, verifyPanHandler } from './apis'; +import { contractorStageThreeSubmit, contractorStageTwoSubmit, fetchAuctionItem, fetchCityDropdown, fetchDashboard, fetchEmdCheck, fetchLiveAuction, fetchLiveTender, fetchMasterData, fetchPurchaseAuction, fetchPurchaseTender, fetchTenderById, getDesignation, getRagistrationState, offlineAuctionPurchase, offlineTenderPurchase, partnerShipSubmit, proceedToBid, registerContractor, sendAadhaarOtp, submitEnvelopeA, submitEnvelopeB, uploadEnvelopeFile, userAuctionLogin, userLogin, verifyAadhaarOtp, verifyGstNumber, verifyPanHandler } from './apis'; import { apiCall } from '../../Axios/Axios'; // User @@ -171,9 +171,9 @@ export const usefetchMasterData = () => { }); } - export const useCityDropdown = (stateId?: number) => { + export const useCityDropdown = () => { return useMutation({ - mutationFn: () => fetchCityDropdown(stateId as number), + mutationFn: (stateId: number) => fetchCityDropdown(stateId), }); }; @@ -196,4 +196,41 @@ export const useVerifyPan = () => export const useVerifyGstNumber = () => useMutation({ mutationFn: verifyGstNumber, - }); \ No newline at end of file + }); + + + export const useContractorStageTwoSubmit = () => + useMutation({ + mutationFn: contractorStageTwoSubmit, + }); + + export const useContractorStageThreeSubmit = () => + useMutation({ + mutationFn: contractorStageThreeSubmit, + }); + + export const usePartnerShipSubmit = () => + useMutation({ + mutationFn: partnerShipSubmit, + }); + + + + + +export const useSubmitEnvelopeA = () => + useMutation({ + mutationFn: submitEnvelopeA, + }) + +export const useSubmitEnvelopeB = () => + useMutation({ + mutationFn: submitEnvelopeB, + }) + +export const useUploadEnvelopeFile = () => + useMutation({ + mutationFn: uploadEnvelopeFile, + }) + + \ No newline at end of file diff --git a/src/Services/BBPS/apis.ts b/src/Services/BBPS/apis.ts index 6f9abcd..05eb29d 100644 --- a/src/Services/BBPS/apis.ts +++ b/src/Services/BBPS/apis.ts @@ -319,4 +319,6 @@ export const uploadEnvelopeFile = async ({ }) return data -} \ No newline at end of file +} + +