before merge
This commit is contained in:
@@ -18,6 +18,7 @@ import PrimaryButton from '../../Component/PrimaryButton/PrimaryButton';
|
|||||||
import MyInput from '../../Component/MyInput';
|
import MyInput from '../../Component/MyInput';
|
||||||
import { showToast } from '../../Constant/ShowDailog';
|
import { showToast } from '../../Constant/ShowDailog';
|
||||||
import { STAGETHREE } from '../../Services/BBPS/ApiUrls';
|
import { STAGETHREE } from '../../Services/BBPS/ApiUrls';
|
||||||
|
import { useContractorStageThreeSubmit } from '../../Services/BBPS/Hooks';
|
||||||
|
|
||||||
|
|
||||||
type Company = {
|
type Company = {
|
||||||
@@ -49,6 +50,7 @@ const StageThreeScreen = () => {
|
|||||||
|
|
||||||
const [focusedField, setFocusedField] = useState<string | null>(null);
|
const [focusedField, setFocusedField] = useState<string | null>(null);
|
||||||
const [loading, setLoading] = useState<boolean>(false);
|
const [loading, setLoading] = useState<boolean>(false);
|
||||||
|
const { mutateAsync: stageThreeSubmit } = useContractorStageThreeSubmit();
|
||||||
|
|
||||||
const handleChange = (index: number, field: keyof Company, value: string) => {
|
const handleChange = (index: number, field: keyof Company, value: string) => {
|
||||||
const updated = [...company];
|
const updated = [...company];
|
||||||
@@ -83,7 +85,7 @@ const StageThreeScreen = () => {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
console.log('stage 3 payload : ', payload);
|
console.log('stage 3 payload : ', payload);
|
||||||
// const response = await apiCallForPostWithToken (STAGETHREE, payload);
|
const response = await stageThreeSubmit(payload);
|
||||||
console.log('✅ company submitted successfully:', response);
|
console.log('✅ company submitted successfully:', response);
|
||||||
|
|
||||||
if (response.statusCode === 200 || response.statusCode === 201) {
|
if (response.statusCode === 200 || response.statusCode === 201) {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import { pick, types } from '@react-native-documents/picker';
|
|||||||
import { InsideHeader } from '../../../Component/Index';
|
import { InsideHeader } from '../../../Component/Index';
|
||||||
import colors from '../../../Constant/Color';
|
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 { 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';
|
import { apiCall } from '../../../Axios/Axios';
|
||||||
|
|
||||||
type EnvelopeType = 'A' | 'B' | 'C';
|
type EnvelopeType = 'A' | 'B' | 'C';
|
||||||
@@ -359,7 +359,7 @@ const TenderBidding = () => {
|
|||||||
|
|
||||||
const res = await apiCall('post',SUBMIT_ENVELOPE_A, payload)
|
const res = await apiCall('post',SUBMIT_ENVELOPE_A, payload)
|
||||||
console.log("res A envelop : ", res)
|
console.log("res A envelop : ", res)
|
||||||
ToastAndroid.show(res.message, ToastAndroid.SHORT)
|
ToastAndroid.show(res?.message, ToastAndroid.SHORT)
|
||||||
|
|
||||||
|
|
||||||
navigation.goBack()
|
navigation.goBack()
|
||||||
@@ -493,9 +493,11 @@ const TenderBidding = () => {
|
|||||||
/>
|
/>
|
||||||
<View style={[styles.infoRow, { flexDirection: 'row', gap: 10 }]}>
|
<View style={[styles.infoRow, { flexDirection: 'row', gap: 10 }]}>
|
||||||
<TouchableOpacity onPress={() => setCheck(!check)}>
|
<TouchableOpacity onPress={() => setCheck(!check)}>
|
||||||
{check ? <Fontisto name="checkbox-active" size={24} color={colors.primary} /> :
|
{check ? (
|
||||||
<Fontisto name="checkbox-passive" size={24} color={colors.primary} />
|
<CheckSquare size={24} color={colors.primary} />
|
||||||
}</TouchableOpacity>
|
) : (
|
||||||
|
<Square size={24} color={colors.primary} />
|
||||||
|
)}</TouchableOpacity>
|
||||||
<Text>Check First Terms&Condition</Text>
|
<Text>Check First Terms&Condition</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useInfiniteQuery, useMutation, useQuery } from '@tanstack/react-query';
|
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';
|
import { apiCall } from '../../Axios/Axios';
|
||||||
|
|
||||||
// User
|
// User
|
||||||
@@ -171,9 +171,9 @@ export const usefetchMasterData = () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export const useCityDropdown = (stateId?: number) => {
|
export const useCityDropdown = () => {
|
||||||
return useMutation({
|
return useMutation({
|
||||||
mutationFn: () => fetchCityDropdown(stateId as number),
|
mutationFn: (stateId: number) => fetchCityDropdown(stateId),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -197,3 +197,40 @@ export const useVerifyPan = () =>
|
|||||||
useMutation({
|
useMutation({
|
||||||
mutationFn: verifyGstNumber,
|
mutationFn: verifyGstNumber,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
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,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
@@ -320,3 +320,5 @@ export const uploadEnvelopeFile = async ({
|
|||||||
|
|
||||||
return data
|
return data
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user