e-tender
This commit is contained in:
@@ -16,9 +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 axios from 'axios';
|
|
||||||
import { Fontisto } from '@react-native-vector-icons/fontisto';
|
import { Fontisto } from '@react-native-vector-icons/fontisto';
|
||||||
import { useSubmitEnvelopeA, useSubmitEnvelopeB, useUploadEnvelopeFile } from '../../../Services/BBPS/Hooks';
|
|
||||||
import { apiCall } from '../../../Axios/Axios';
|
import { apiCall } from '../../../Axios/Axios';
|
||||||
|
|
||||||
type EnvelopeType = 'A' | 'B' | 'C';
|
type EnvelopeType = 'A' | 'B' | 'C';
|
||||||
@@ -41,10 +39,6 @@ interface InfoRowProps {
|
|||||||
const TenderBidding = () => {
|
const TenderBidding = () => {
|
||||||
const route = useRoute<any>();
|
const route = useRoute<any>();
|
||||||
const navigation = useNavigation();
|
const navigation = useNavigation();
|
||||||
const { mutate: submitEnvelopeA, isPending } = useSubmitEnvelopeA()
|
|
||||||
const { mutate: submitEnvelopeB, isPending: isPendingB } = useSubmitEnvelopeB()
|
|
||||||
const { mutate: uploadEnvelopeFile, isPending: uploadLoading } =
|
|
||||||
useUploadEnvelopeFile()
|
|
||||||
|
|
||||||
const [bidData] = useState<any>(route.params?.tenderData || null);
|
const [bidData] = useState<any>(route.params?.tenderData || null);
|
||||||
const tenderData: any = route.params?.bidData || null;
|
const tenderData: any = route.params?.bidData || null;
|
||||||
@@ -359,6 +353,7 @@ const TenderBidding = () => {
|
|||||||
setLoading(true)
|
setLoading(true)
|
||||||
if (envelopForm?.[activeEnvelope]?.[3]) {
|
if (envelopForm?.[activeEnvelope]?.[3]) {
|
||||||
handleSubmitEnvelopeFile()
|
handleSubmitEnvelopeFile()
|
||||||
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|
||||||
@@ -388,6 +383,7 @@ const TenderBidding = () => {
|
|||||||
|
|
||||||
if (envelopForm?.[activeEnvelope]?.[3]) {
|
if (envelopForm?.[activeEnvelope]?.[3]) {
|
||||||
handleSubmitEnvelopeFile()
|
handleSubmitEnvelopeFile()
|
||||||
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const res = await apiCall('post', SUBMIT_ENVELOPE_B, payload)
|
const res = await apiCall('post', SUBMIT_ENVELOPE_B, payload)
|
||||||
|
|||||||
Reference in New Issue
Block a user