Merge branch 'etender' of https://git.zeptic.in/rohit/Procurelinc into etenderMerge
This commit is contained in:
Generated
+171
@@ -12,6 +12,7 @@
|
|||||||
"@react-native-community/blur": "^4.4.1",
|
"@react-native-community/blur": "^4.4.1",
|
||||||
"@react-native-documents/picker": "^11.0.3",
|
"@react-native-documents/picker": "^11.0.3",
|
||||||
"@react-native-masked-view/masked-view": "^0.3.2",
|
"@react-native-masked-view/masked-view": "^0.3.2",
|
||||||
|
"@react-native-vector-icons/fontisto": "^12.4.0",
|
||||||
"@react-navigation/bottom-tabs": "^7.9.0",
|
"@react-navigation/bottom-tabs": "^7.9.0",
|
||||||
"@react-navigation/native": "^7.1.26",
|
"@react-navigation/native": "^7.1.26",
|
||||||
"@react-navigation/stack": "^7.6.13",
|
"@react-navigation/stack": "^7.6.13",
|
||||||
@@ -3233,6 +3234,132 @@
|
|||||||
"react-native": ">=0.57"
|
"react-native": ">=0.57"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@react-native-vector-icons/common": {
|
||||||
|
"version": "12.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@react-native-vector-icons/common/-/common-12.4.0.tgz",
|
||||||
|
"integrity": "sha512-t9W0q+AW7WH1Oj5aEg7wGNXDLZJb5sIVkAWo5qtad3PcbBADqoCdikRK/ToLK+xlB0TxjcuL0T74ogudMkYGeA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"find-up": "^7.0.0",
|
||||||
|
"picocolors": "^1.1.1",
|
||||||
|
"plist": "^3.1.0"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"rnvi-update-plist": "lib/commonjs/scripts/updatePlist.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=20.19.0 <21.0.0 || >=22.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@react-native-vector-icons/get-image": "^12.3.0",
|
||||||
|
"react": "*",
|
||||||
|
"react-native": "*"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"@react-native-vector-icons/get-image": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@react-native-vector-icons/common/node_modules/find-up": {
|
||||||
|
"version": "7.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/find-up/-/find-up-7.0.0.tgz",
|
||||||
|
"integrity": "sha512-YyZM99iHrqLKjmt4LJDj58KI+fYyufRLBSYcqycxf//KpBk9FoewoGX0450m9nB44qrZnovzC2oeP5hUibxc/g==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"locate-path": "^7.2.0",
|
||||||
|
"path-exists": "^5.0.0",
|
||||||
|
"unicorn-magic": "^0.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@react-native-vector-icons/common/node_modules/locate-path": {
|
||||||
|
"version": "7.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz",
|
||||||
|
"integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"p-locate": "^6.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@react-native-vector-icons/common/node_modules/p-limit": {
|
||||||
|
"version": "4.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz",
|
||||||
|
"integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"yocto-queue": "^1.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@react-native-vector-icons/common/node_modules/p-locate": {
|
||||||
|
"version": "6.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz",
|
||||||
|
"integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"p-limit": "^4.0.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@react-native-vector-icons/common/node_modules/path-exists": {
|
||||||
|
"version": "5.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz",
|
||||||
|
"integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@react-native-vector-icons/common/node_modules/yocto-queue": {
|
||||||
|
"version": "1.2.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.2.2.tgz",
|
||||||
|
"integrity": "sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12.20"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@react-native-vector-icons/fontisto": {
|
||||||
|
"version": "12.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@react-native-vector-icons/fontisto/-/fontisto-12.4.0.tgz",
|
||||||
|
"integrity": "sha512-0XFOXDTV03Lvz7d0LmzNtvt7BgAupmUcv4HzVdtSccQ9Ak4lmLeBnO6kbP1v4iqcrsATR1xPrhQxTWWIJ90oFQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@react-native-vector-icons/common": "^12.4.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 18.0.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"react": "*",
|
||||||
|
"react-native": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@react-native/assets-registry": {
|
"node_modules/@react-native/assets-registry": {
|
||||||
"version": "0.79.0",
|
"version": "0.79.0",
|
||||||
"resolved": "https://registry.npmjs.org/@react-native/assets-registry/-/assets-registry-0.79.0.tgz",
|
"resolved": "https://registry.npmjs.org/@react-native/assets-registry/-/assets-registry-0.79.0.tgz",
|
||||||
@@ -4576,6 +4703,15 @@
|
|||||||
"devOptional": true,
|
"devOptional": true,
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
},
|
},
|
||||||
|
"node_modules/@xmldom/xmldom": {
|
||||||
|
"version": "0.8.11",
|
||||||
|
"resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.11.tgz",
|
||||||
|
"integrity": "sha512-cQzWCtO6C8TQiYl1ruKNn2U6Ao4o4WBBcbL61yJl84x+j5sOWWFU9X7DpND8XZG3daDppSsigMdfAIl2upQBRw==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/abort-controller": {
|
"node_modules/abort-controller": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
|
||||||
@@ -11375,6 +11511,20 @@
|
|||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/plist": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/plist/-/plist-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-uysumyrvkUX0rX/dEVqt8gC3sTBzd4zoWfLeS29nb53imdaXVvLINYXTI2GNqzaMuvacNx4uJQ8+b3zXR0pkgQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@xmldom/xmldom": "^0.8.8",
|
||||||
|
"base64-js": "^1.5.1",
|
||||||
|
"xmlbuilder": "^15.1.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10.4.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/possible-typed-array-names": {
|
"node_modules/possible-typed-array-names": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.1.0.tgz",
|
||||||
@@ -13708,6 +13858,18 @@
|
|||||||
"node": ">=4"
|
"node": ">=4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/unicorn-magic": {
|
||||||
|
"version": "0.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz",
|
||||||
|
"integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/universalify": {
|
"node_modules/universalify": {
|
||||||
"version": "0.1.2",
|
"version": "0.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
|
||||||
@@ -14056,6 +14218,15 @@
|
|||||||
"async-limiter": "~1.0.0"
|
"async-limiter": "~1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/xmlbuilder": {
|
||||||
|
"version": "15.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-15.1.1.tgz",
|
||||||
|
"integrity": "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg==",
|
||||||
|
"license": "MIT",
|
||||||
|
"engines": {
|
||||||
|
"node": ">=8.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/y18n": {
|
"node_modules/y18n": {
|
||||||
"version": "5.0.8",
|
"version": "5.0.8",
|
||||||
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
|
"resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
"@react-native-community/blur": "^4.4.1",
|
"@react-native-community/blur": "^4.4.1",
|
||||||
"@react-native-documents/picker": "^11.0.3",
|
"@react-native-documents/picker": "^11.0.3",
|
||||||
"@react-native-masked-view/masked-view": "^0.3.2",
|
"@react-native-masked-view/masked-view": "^0.3.2",
|
||||||
|
"@react-native-vector-icons/fontisto": "^12.4.0",
|
||||||
"@react-navigation/bottom-tabs": "^7.9.0",
|
"@react-navigation/bottom-tabs": "^7.9.0",
|
||||||
"@react-navigation/native": "^7.1.26",
|
"@react-navigation/native": "^7.1.26",
|
||||||
"@react-navigation/stack": "^7.6.13",
|
"@react-navigation/stack": "^7.6.13",
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ const colors = {
|
|||||||
// Secondary (Warm contrast)
|
// Secondary (Warm contrast)
|
||||||
secondary: '#1B4B66', // Deep blue for balance
|
secondary: '#1B4B66', // Deep blue for balance
|
||||||
secondaryLight: '#639599', // Muted blue
|
secondaryLight: '#639599', // Muted blue
|
||||||
|
secondaryHighLight: '#e1eff2', // Very light blue (backgrounds)
|
||||||
|
|
||||||
// Status colors
|
// Status colors
|
||||||
success: '#22C55E', // Green
|
success: '#22C55E', // Green
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
import ProceedToBidDetail from "../Screens/Tender/ProceedToBidDetail"
|
|
||||||
import TenderBidding from "../Screens/Tender/tenderBidding/TenderBidding"
|
|
||||||
|
|
||||||
const NavigationString = {
|
const NavigationString = {
|
||||||
Login: 'Login',
|
Login: 'Login',
|
||||||
Splash: 'Splash',
|
Splash: 'Splash',
|
||||||
@@ -20,5 +17,6 @@ const NavigationString = {
|
|||||||
Signup:'Signup',
|
Signup:'Signup',
|
||||||
Registration:'Registration',
|
Registration:'Registration',
|
||||||
Partnership:'Partnership',
|
Partnership:'Partnership',
|
||||||
|
LiveTenderDetail:'LiveTenderDetail',
|
||||||
}
|
}
|
||||||
export default NavigationString
|
export default NavigationString
|
||||||
@@ -45,6 +45,8 @@ export default function MainStack() {
|
|||||||
<Stack.Screen name={NavigationString.StartReverseBidding} component={Screens.StartReverseBidding} options={option} />
|
<Stack.Screen name={NavigationString.StartReverseBidding} component={Screens.StartReverseBidding} options={option} />
|
||||||
<Stack.Screen name={NavigationString.Registration} component={Screens.Registration} options={option} />
|
<Stack.Screen name={NavigationString.Registration} component={Screens.Registration} options={option} />
|
||||||
<Stack.Screen name={NavigationString.Partnership} component={Screens.Partnership} options={option} />
|
<Stack.Screen name={NavigationString.Partnership} component={Screens.Partnership} options={option} />
|
||||||
|
<Stack.Screen name={NavigationString.LiveTenderDetail} component={Screens.LiveTenderDetail} options={option} />
|
||||||
|
|
||||||
</Stack.Navigator>
|
</Stack.Navigator>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ const LiveTender = () => {
|
|||||||
tenderOfWork={item.departmentName}
|
tenderOfWork={item.departmentName}
|
||||||
tenderFees={item.documentFees}
|
tenderFees={item.documentFees}
|
||||||
tenderNumber={item.tenderNumber}
|
tenderNumber={item.tenderNumber}
|
||||||
onPurchasePress={() => { Dispatch(togglePurchaseTender(item)) }}
|
// onPurchasePress={() => { Dispatch(togglePurchaseTender(item)) }}
|
||||||
onDetailsPress={() => { }}
|
// onDetailsPress={() => navigation.navigate('LiveTenderDetail', {item})}
|
||||||
/>
|
/>
|
||||||
},
|
},
|
||||||
[SelectedPurchaseList]
|
[SelectedPurchaseList]
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
import { StyleSheet, Text, View } from 'react-native'
|
||||||
|
import React from 'react'
|
||||||
|
import { useRoute } from '@react-navigation/native';
|
||||||
|
|
||||||
|
const LiveTenderDetail = () => {
|
||||||
|
const route = useRoute<any>();
|
||||||
|
const { tender } = route.params;
|
||||||
|
console.log("live tender details : ", tender)
|
||||||
|
return (
|
||||||
|
<View>
|
||||||
|
<Text>LiveTenderDetail</Text>
|
||||||
|
</View>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
export default LiveTenderDetail
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({})
|
||||||
@@ -6,6 +6,7 @@ import { LiveTenderTileProps } from './types/types';
|
|||||||
import { Calendar, Tag, Info, ArrowRight } from 'lucide-react-native';
|
import { Calendar, Tag, Info, ArrowRight } from 'lucide-react-native';
|
||||||
import TenderDetail from './Modal/TenderFullDetail';
|
import TenderDetail from './Modal/TenderFullDetail';
|
||||||
import TenderFullDetail from './Modal/TenderFullDetail';
|
import TenderFullDetail from './Modal/TenderFullDetail';
|
||||||
|
import { useNavigation } from '@react-navigation/native';
|
||||||
|
|
||||||
const LiveTenderTile: React.FC<LiveTenderTileProps> = ({
|
const LiveTenderTile: React.FC<LiveTenderTileProps> = ({
|
||||||
data,
|
data,
|
||||||
@@ -16,10 +17,12 @@ const LiveTenderTile: React.FC<LiveTenderTileProps> = ({
|
|||||||
purchaseEnd,
|
purchaseEnd,
|
||||||
tenderFees,
|
tenderFees,
|
||||||
tenderNumber,
|
tenderNumber,
|
||||||
|
onDetailsPress
|
||||||
}) => {
|
}) => {
|
||||||
const [showDetail, setShowDetail] = React.useState(false);
|
const navigation: any = useNavigation();
|
||||||
const purchaseEnded = moment().isAfter(moment(purchaseEnd, 'DD-MM-YYYY HH:mm:ss'));
|
const purchaseEnded = moment().isAfter(moment(purchaseEnd, 'DD-MM-YYYY HH:mm:ss'));
|
||||||
|
|
||||||
|
console.log("live tender data : ", data)
|
||||||
return (
|
return (
|
||||||
<View style={styles.cardWrapper}>
|
<View style={styles.cardWrapper}>
|
||||||
{/* Status Tag */}
|
{/* Status Tag */}
|
||||||
@@ -33,7 +36,7 @@ const LiveTenderTile: React.FC<LiveTenderTileProps> = ({
|
|||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
style={styles.container}
|
style={styles.container}
|
||||||
activeOpacity={0.9}
|
activeOpacity={0.9}
|
||||||
onPress={() => setShowDetail(true)}
|
onPress={() => navigation.navigate('LiveTenderDetail', data)}
|
||||||
>
|
>
|
||||||
{/* Header */}
|
{/* Header */}
|
||||||
<View style={styles.header}>
|
<View style={styles.header}>
|
||||||
@@ -72,7 +75,7 @@ const LiveTenderTile: React.FC<LiveTenderTileProps> = ({
|
|||||||
|
|
||||||
{/* Action Bar */}
|
{/* Action Bar */}
|
||||||
<View style={styles.actionBar}>
|
<View style={styles.actionBar}>
|
||||||
<TouchableOpacity style={styles.iconBtn} onPress={() => setShowDetail(true)}>
|
<TouchableOpacity style={styles.iconBtn} onPress={onDetailsPress}>
|
||||||
<Info size={18} color={colors.primary} />
|
<Info size={18} color={colors.primary} />
|
||||||
<Text style={styles.iconBtnText}>Details</Text>
|
<Text style={styles.iconBtnText}>Details</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
@@ -104,7 +107,7 @@ const LiveTenderTile: React.FC<LiveTenderTileProps> = ({
|
|||||||
</View>
|
</View>
|
||||||
|
|
||||||
{/* Tender Detail Modal */}
|
{/* Tender Detail Modal */}
|
||||||
<TenderFullDetail visible={showDetail} data={data} onClose={() => setShowDetail(false)} />
|
{/* <TenderFullDetail visible={showDetail} data={data} onClose={() => setShowDetail(false)} /> */}
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,85 +2,24 @@ import { StyleSheet, Text, View, ScrollView, StatusBar, TouchableOpacity } from
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { InsideHeader } from '../../Component/Index'
|
import { InsideHeader } from '../../Component/Index'
|
||||||
import colors from '../../Constant/Color'
|
import colors from '../../Constant/Color'
|
||||||
import { useNavigation } from '@react-navigation/native'
|
import { useNavigation, useRoute } from '@react-navigation/native'
|
||||||
|
import { useProceedToBid } from '../../Services/BBPS/Hooks'
|
||||||
|
|
||||||
const ProceedToBidDetail = () => {
|
const ProceedToBidDetail = () => {
|
||||||
// Sample data based on your JSON
|
// Sample data based on your JSON
|
||||||
const navigation = useNavigation<any>()
|
const route = useRoute()
|
||||||
const tenderData = {
|
const tenderData = route.params?.tender;
|
||||||
tenderId: 1372,
|
const {data, refetch} = useProceedToBid(tenderData?.tenderId);
|
||||||
envelopeASubmittStatus: true,
|
|
||||||
envelopeBSubmittStatus: true,
|
|
||||||
envelopeCSubmittStatus: true,
|
|
||||||
envelopeA_Logs: {
|
|
||||||
logId: 314,
|
|
||||||
contractorId: 1,
|
|
||||||
activity: "Bid on Envelope A",
|
|
||||||
tenderId: 1372,
|
|
||||||
dateTime: "Fri Dec 12 13:07:44 IST 2025",
|
|
||||||
osName: "Linux",
|
|
||||||
browserName: "Chrome-142.0.0.0",
|
|
||||||
ipAddress: "192.168.5.10",
|
|
||||||
macAddress: "00:00:00:00:00:00",
|
|
||||||
logMessage: "Envelope A bidding is Submitted",
|
|
||||||
headingMsg: null,
|
|
||||||
status: null,
|
|
||||||
envelope: "EA"
|
|
||||||
},
|
|
||||||
envelopeB_Logs: {
|
|
||||||
logId: 315,
|
|
||||||
contractorId: 1,
|
|
||||||
activity: "Bid on Envelope B",
|
|
||||||
tenderId: 1372,
|
|
||||||
dateTime: "Fri Dec 12 13:08:00 IST 2025",
|
|
||||||
osName: "Linux",
|
|
||||||
browserName: "Chrome-142.0.0.0",
|
|
||||||
ipAddress: "192.168.5.10",
|
|
||||||
macAddress: "00:00:00:00:00:00",
|
|
||||||
logMessage: "Envelope B bidding is Submitted",
|
|
||||||
headingMsg: null,
|
|
||||||
status: null,
|
|
||||||
envelope: "EB"
|
|
||||||
},
|
|
||||||
envelopeC_Logs: {
|
|
||||||
logId: 316,
|
|
||||||
contractorId: 1,
|
|
||||||
activity: "Bid on Envelope C",
|
|
||||||
tenderId: 1372,
|
|
||||||
dateTime: "Fri Dec 12 13:08:31 IST 2025",
|
|
||||||
osName: "Linux",
|
|
||||||
browserName: "Chrome-142.0.0.0",
|
|
||||||
ipAddress: "192.168.5.10",
|
|
||||||
macAddress: "00:00:00:00:00:00",
|
|
||||||
logMessage: "Envelope C bidding is Submitted",
|
|
||||||
headingMsg: "Percentage Rate Tender",
|
|
||||||
status: null,
|
|
||||||
envelope: "EC"
|
|
||||||
},
|
|
||||||
showEB: true,
|
|
||||||
showEC: true,
|
|
||||||
showQCBS: false,
|
|
||||||
showLCS: false,
|
|
||||||
viewBid: true,
|
|
||||||
proceedtoBid: false,
|
|
||||||
tenderNumber: "TN/152",
|
|
||||||
emdInFig: "100",
|
|
||||||
tenderBidWithdraw: "Allowed",
|
|
||||||
tenderRebid: "Allowed",
|
|
||||||
nitNo: "NIT-410",
|
|
||||||
nameofWork: "Tender is created for Testing Process only",
|
|
||||||
reBid: "Allowed",
|
|
||||||
bidWithDraw: "Allowed",
|
|
||||||
envelopeType: "3",
|
|
||||||
biddingStatus: true,
|
|
||||||
tenderStages: "1",
|
|
||||||
dscStatus: false,
|
|
||||||
submittedStartDate: [2025, 3, 4, 10, 0],
|
|
||||||
submittedEndDate: [2026, 3, 4, 23, 50],
|
|
||||||
bidWithdrawStatus: true
|
|
||||||
};
|
|
||||||
|
|
||||||
|
const navigation = useNavigation<any>()
|
||||||
// Format date from array
|
// Format date from array
|
||||||
|
|
||||||
|
const handleStartBidding = () => {
|
||||||
|
refetch();
|
||||||
|
if (data) {
|
||||||
|
navigation.navigate('TenderBidding', { tenderData: tenderData , bidData: data.data });
|
||||||
|
}
|
||||||
|
}
|
||||||
const formatDate = (dateArray: any[]) => {
|
const formatDate = (dateArray: any[]) => {
|
||||||
if (!dateArray || dateArray.length < 3) return "N/A";
|
if (!dateArray || dateArray.length < 3) return "N/A";
|
||||||
const [year, month, day, hour = 0, minute = 0] = dateArray;
|
const [year, month, day, hour = 0, minute = 0] = dateArray;
|
||||||
@@ -103,39 +42,39 @@ const ProceedToBidDetail = () => {
|
|||||||
<View style={styles.cardHeader}>
|
<View style={styles.cardHeader}>
|
||||||
<Text style={styles.cardTitle}>{title}</Text>
|
<Text style={styles.cardTitle}>{title}</Text>
|
||||||
<View style={[styles.envelopeBadge, { backgroundColor: colors.primary }]}>
|
<View style={[styles.envelopeBadge, { backgroundColor: colors.primary }]}>
|
||||||
<Text style={styles.envelopeBadgeText}>{log.envelope}</Text>
|
<Text style={styles.envelopeBadgeText}>{log?.envelope}</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View style={styles.logDetailRow}>
|
<View style={styles.logDetailRow}>
|
||||||
<Text style={styles.label}>Activity:</Text>
|
<Text style={styles.label}>Activity:</Text>
|
||||||
<Text style={styles.value}>{log.activity}</Text>
|
<Text style={styles.value}>{log?.activity}</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View style={styles.logDetailRow}>
|
<View style={styles.logDetailRow}>
|
||||||
<Text style={styles.label}>Date & Time:</Text>
|
<Text style={styles.label}>Date & Time:</Text>
|
||||||
<Text style={styles.value}>{log.dateTime}</Text>
|
<Text style={styles.value}>{log?.dateTime}</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View style={styles.logDetailRow}>
|
<View style={styles.logDetailRow}>
|
||||||
<Text style={styles.label}>System Info:</Text>
|
<Text style={styles.label}>System Info:</Text>
|
||||||
<Text style={styles.value}>{log.osName} / {log.browserName}</Text>
|
<Text style={styles.value}>{log?.osName} / {log?.browserName}</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View style={styles.logDetailRow}>
|
<View style={styles.logDetailRow}>
|
||||||
<Text style={styles.label}>IP Address:</Text>
|
<Text style={styles.label}>IP Address:</Text>
|
||||||
<Text style={styles.value}>{log.ipAddress}</Text>
|
<Text style={styles.value}>{log?.ipAddress}</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View style={styles.logDetailRow}>
|
<View style={styles.logDetailRow}>
|
||||||
<Text style={styles.label}>Status Message:</Text>
|
<Text style={styles.label}>Status Message:</Text>
|
||||||
<Text style={[styles.value, styles.successText]}>{log.logMessage}</Text>
|
<Text style={[styles.value, styles.successText]}>{log?.logMessage}</Text>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{log.headingMsg && (
|
{log?.headingMsg && (
|
||||||
<View style={styles.logDetailRow}>
|
<View style={styles.logDetailRow}>
|
||||||
<Text style={styles.label}>Heading:</Text>
|
<Text style={styles.label}>Heading:</Text>
|
||||||
<Text style={styles.value}>{log.headingMsg}</Text>
|
<Text style={styles.value}>{log?.headingMsg}</Text>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
@@ -168,27 +107,27 @@ const ProceedToBidDetail = () => {
|
|||||||
<View style={styles.headerCard}>
|
<View style={styles.headerCard}>
|
||||||
<View style={styles.tenderHeader}>
|
<View style={styles.tenderHeader}>
|
||||||
<View>
|
<View>
|
||||||
<Text style={styles.tenderNumber}>{tenderData.tenderNumber}</Text>
|
<Text style={styles.tenderNumber}>{tenderData?.tenderNumber}</Text>
|
||||||
<Text style={styles.tenderId}>ID: {tenderData.tenderId}</Text>
|
<Text style={styles.tenderId}>ID: {tenderData?.tenderId}</Text>
|
||||||
</View>
|
</View>
|
||||||
<View style={[styles.statusBadge, { backgroundColor: tenderData.biddingStatus ? colors.success : colors.warning }]}>
|
<View style={[styles.statusBadge, { backgroundColor: tenderData?.biddingStatus ? colors.success : colors.warning }]}>
|
||||||
<Text style={styles.statusBadgeText}>
|
<Text style={styles.statusBadgeText}>
|
||||||
{tenderData.biddingStatus ? "Active" : "Inactive"}
|
{tenderData?.biddingStatus ? "Active" : "Inactive"}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<Text style={styles.workDescription}>{tenderData.nameofWork}</Text>
|
<Text style={styles.workDescription}>{tenderData?.nameofWork}</Text>
|
||||||
|
|
||||||
<View style={styles.headerInfoRow}>
|
<View style={styles.headerInfoRow}>
|
||||||
<View style={styles.headerInfoItem}>
|
<View style={styles.headerInfoItem}>
|
||||||
<Text style={styles.headerInfoLabel}>NIT No.</Text>
|
<Text style={styles.headerInfoLabel}>NIT No.</Text>
|
||||||
<Text style={styles.headerInfoValue}>{tenderData.nitNo}</Text>
|
<Text style={styles.headerInfoValue}>{tenderData?.nitNo}</Text>
|
||||||
</View>
|
</View>
|
||||||
<View style={styles.separator} />
|
<View style={styles.separator} />
|
||||||
<View style={styles.headerInfoItem}>
|
<View style={styles.headerInfoItem}>
|
||||||
<Text style={styles.headerInfoLabel}>EMD Amount</Text>
|
<Text style={styles.headerInfoLabel}>EMD Amount</Text>
|
||||||
<Text style={styles.headerInfoValue}>₹{tenderData.emdInFig}</Text>
|
<Text style={styles.headerInfoValue}>₹{tenderData?.emdInFig}</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@@ -197,19 +136,19 @@ const ProceedToBidDetail = () => {
|
|||||||
<View style={styles.section}>
|
<View style={styles.section}>
|
||||||
<Text style={styles.sectionTitle}>Envelope Submission Status</Text>
|
<Text style={styles.sectionTitle}>Envelope Submission Status</Text>
|
||||||
<View style={styles.statusGrid}>
|
<View style={styles.statusGrid}>
|
||||||
<StatusIndicator status={tenderData.envelopeASubmittStatus} label="Envelope A" />
|
<StatusIndicator status={tenderData?.envelopeASubmittStatus} label="Envelope A" />
|
||||||
<StatusIndicator status={tenderData.envelopeBSubmittStatus} label="Envelope B" />
|
<StatusIndicator status={tenderData?.envelopeBSubmittStatus} label="Envelope B" />
|
||||||
<StatusIndicator status={tenderData.envelopeCSubmittStatus} label="Envelope C" />
|
<StatusIndicator status={tenderData?.envelopeCSubmittStatus} label="Envelope C" />
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
{/* Envelope Logs */}
|
{/* Envelope Logs */}
|
||||||
{tenderData.envelopeA_Logs && (
|
{tenderData?.envelopeA_Logs && (
|
||||||
<View style={styles.section}>
|
<View style={styles.section}>
|
||||||
<Text style={styles.sectionTitle}>Submission Logs</Text>
|
<Text style={styles.sectionTitle}>Submission Logs</Text>
|
||||||
<EnvelopeLogCard log={tenderData.envelopeA_Logs} title="Envelope A Submission" />
|
<EnvelopeLogCard log={tenderData?.envelopeA_Logs} title="Envelope A Submission" />
|
||||||
<EnvelopeLogCard log={tenderData.envelopeB_Logs} title="Envelope B Submission" />
|
<EnvelopeLogCard log={tenderData?.envelopeB_Logs} title="Envelope B Submission" />
|
||||||
<EnvelopeLogCard log={tenderData.envelopeC_Logs} title="Envelope C Submission" />
|
<EnvelopeLogCard log={tenderData?.envelopeC_Logs} title="Envelope C Submission" />
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
@@ -217,11 +156,11 @@ const ProceedToBidDetail = () => {
|
|||||||
<View style={styles.section}>
|
<View style={styles.section}>
|
||||||
<Text style={styles.sectionTitle}>Tender Details</Text>
|
<Text style={styles.sectionTitle}>Tender Details</Text>
|
||||||
<View style={styles.detailsCard}>
|
<View style={styles.detailsCard}>
|
||||||
<InfoRow label="Envelope Type" value={tenderData.envelopeType} />
|
<InfoRow label="Envelope Type" value={tenderData?.envelopeType} />
|
||||||
<InfoRow label="Tender Stages" value={tenderData.tenderStages} />
|
<InfoRow label="Tender Stages" value={tenderData?.tenderStages} />
|
||||||
<InfoRow label="Bid Withdrawal" value={tenderData.bidWithDraw} isHighlighted={tenderData.bidWithdrawStatus} />
|
<InfoRow label="Bid Withdrawal" value={tenderData?.bidWithDraw} isHighlighted={tenderData?.bidWithdrawStatus} />
|
||||||
<InfoRow label="Re-bid" value={tenderData.reBid} />
|
<InfoRow label="Re-bid" value={tenderData?.reBid} />
|
||||||
<InfoRow label="DSC Status" value={tenderData.dscStatus ? "Required" : "Not Required"} />
|
<InfoRow label="DSC Status" value={tenderData?.dscStatus ? "Required" : "Not Required"} />
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
@@ -231,11 +170,11 @@ const ProceedToBidDetail = () => {
|
|||||||
<View style={styles.timeCard}>
|
<View style={styles.timeCard}>
|
||||||
<View style={styles.timeRow}>
|
<View style={styles.timeRow}>
|
||||||
<Text style={styles.timeLabel}>Starts On:</Text>
|
<Text style={styles.timeLabel}>Starts On:</Text>
|
||||||
<Text style={styles.timeValue}>{formatDate(tenderData.submittedStartDate)}</Text>
|
<Text style={styles.timeValue}>{formatDate(tenderData?.submittedStartDate)}</Text>
|
||||||
</View>
|
</View>
|
||||||
<View style={styles.timeRow}>
|
<View style={styles.timeRow}>
|
||||||
<Text style={styles.timeLabel}>Ends On:</Text>
|
<Text style={styles.timeLabel}>Ends On:</Text>
|
||||||
<Text style={styles.timeValue}>{formatDate(tenderData.submittedEndDate)}</Text>
|
<Text style={styles.timeValue}>{formatDate(tenderData?.submittedEndDate)}</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@@ -244,12 +183,12 @@ const ProceedToBidDetail = () => {
|
|||||||
<View style={styles.section}>
|
<View style={styles.section}>
|
||||||
<Text style={styles.sectionTitle}>Available Features</Text>
|
<Text style={styles.sectionTitle}>Available Features</Text>
|
||||||
<View style={styles.chipsContainer}>
|
<View style={styles.chipsContainer}>
|
||||||
<FeatureChip label="View Bid" enabled={tenderData.viewBid} />
|
<FeatureChip label="View Bid" enabled={tenderData?.viewBid} />
|
||||||
<FeatureChip label="Proceed to Bid" enabled={tenderData.proceedtoBid} />
|
<FeatureChip label="Proceed to Bid" enabled={tenderData?.proceedtoBid} />
|
||||||
<FeatureChip label="Show Envelope B" enabled={tenderData.showEB} />
|
<FeatureChip label="Show Envelope B" enabled={tenderData?.showEB} />
|
||||||
<FeatureChip label="Show Envelope C" enabled={tenderData.showEC} />
|
<FeatureChip label="Show Envelope C" enabled={tenderData?.showEC} />
|
||||||
<FeatureChip label="QCBS" enabled={tenderData.showQCBS} />
|
<FeatureChip label="QCBS" enabled={tenderData?.showQCBS} />
|
||||||
<FeatureChip label="LCS" enabled={tenderData.showLCS} />
|
<FeatureChip label="LCS" enabled={tenderData?.showLCS} />
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
@@ -260,41 +199,37 @@ const ProceedToBidDetail = () => {
|
|||||||
<Text style={styles.finalStatusLabel}>All Envelopes Submitted:</Text>
|
<Text style={styles.finalStatusLabel}>All Envelopes Submitted:</Text>
|
||||||
<Text style={[styles.finalStatusValue,
|
<Text style={[styles.finalStatusValue,
|
||||||
{
|
{
|
||||||
color: tenderData.envelopeASubmittStatus && tenderData.envelopeBSubmittStatus && tenderData.envelopeCSubmittStatus
|
color: tenderData?.envelopeASubmittStatus && tenderData?.envelopeBSubmittStatus && tenderData?.envelopeCSubmittStatus
|
||||||
? colors.success : colors.error
|
? colors.success : colors.error
|
||||||
}]}>
|
}]}>
|
||||||
{tenderData.envelopeASubmittStatus && tenderData.envelopeBSubmittStatus && tenderData.envelopeCSubmittStatus
|
{tenderData?.envelopeASubmittStatus && tenderData?.envelopeBSubmittStatus && tenderData?.envelopeCSubmittStatus
|
||||||
? "COMPLETED" : "PENDING"}
|
? "COMPLETED" : "PENDING"}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
<View style={styles.finalStatusRow}>
|
<View style={styles.finalStatusRow}>
|
||||||
<Text style={styles.finalStatusLabel}>Bidding Status:</Text>
|
<Text style={styles.finalStatusLabel}>Bidding Status:</Text>
|
||||||
<Text style={[styles.finalStatusValue,
|
<Text style={[styles.finalStatusValue,
|
||||||
{ color: tenderData.biddingStatus ? colors.success : colors.error }]}>
|
{ color: tenderData?.biddingStatus ? colors.success : colors.error }]}>
|
||||||
{tenderData.biddingStatus ? "ACTIVE" : "CLOSED"}
|
{tenderData?.biddingStatus ? "ACTIVE" : "CLOSED"}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
<View style={styles.footerSpace} />
|
<View style={styles.footerSpace} />
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
<View style={styles.footer}>
|
|
||||||
<TouchableOpacity style={styles.proceedButton} onPress={() => {
|
|
||||||
navigation.navigate('TenderBidding', { tenderData: tenderData });
|
|
||||||
}}>
|
|
||||||
<Text style={styles.proceedButtonText}>Proceed to Bid</Text>
|
|
||||||
</TouchableOpacity>
|
|
||||||
{
|
|
||||||
// tenderData?.proceedtoBid && !tenderData?.viewBid && tenderData?.biddingStatus && tenderData?.bidWithdrawStatus === false ? (
|
|
||||||
|
|
||||||
// <TouchableOpacity style={styles.proceedButton} onPress={() => {
|
|
||||||
// navigation.navigate('TenderBidding', { tenderData: tenderData });
|
|
||||||
// }}>
|
|
||||||
// <Text style={styles.proceedButtonText}>Proceed to Bid</Text>
|
|
||||||
// </TouchableOpacity>
|
|
||||||
|
|
||||||
// ) : <Text style={styles.footerText}>One time bidding is completed</Text>
|
|
||||||
} </View>
|
<View style={styles.footer}>
|
||||||
|
{
|
||||||
|
tenderData?.proceedtoBid && !tenderData?.viewBid && tenderData?.biddingStatus && tenderData?.bidWithdrawStatus === false ? (
|
||||||
|
|
||||||
|
<TouchableOpacity style={styles.proceedButton} onPress={handleStartBidding}>
|
||||||
|
<Text style={styles.proceedButtonText}>Start Bidding</Text>
|
||||||
|
</TouchableOpacity>
|
||||||
|
|
||||||
|
) : <Text style={styles.footerText}>One time bidding is completed</Text>
|
||||||
|
} </View>
|
||||||
</View>
|
</View>
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ const PurchaseTenderAllList = () => {
|
|||||||
const { data, fetchNextPage, hasNextPage, isFetchingNextPage, isLoading, isRefetching, refetch }: any = useFetchPurchaseTender();
|
const { data, fetchNextPage, hasNextPage, isFetchingNextPage, isLoading, isRefetching, refetch }: any = useFetchPurchaseTender();
|
||||||
const [showRefreshBanner, setShowRefreshBanner] = useState(false);
|
const [showRefreshBanner, setShowRefreshBanner] = useState(false);
|
||||||
|
|
||||||
|
|
||||||
|
console.log("data for tender : ", data)
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isRefetching) {
|
if (isRefetching) {
|
||||||
setShowRefreshBanner(true);
|
setShowRefreshBanner(true);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import React from 'react';
|
import React, { use, useEffect } from 'react';
|
||||||
import {
|
import {
|
||||||
View,
|
View,
|
||||||
Text,
|
Text,
|
||||||
@@ -33,21 +33,17 @@ const PurchaseTenderTile = ({
|
|||||||
elevation: elevation.value,
|
elevation: elevation.value,
|
||||||
}));
|
}));
|
||||||
|
|
||||||
const { data: tenderResponse, }: any = useFetchTenderById(item?.tenderId);
|
const { data: tenderResponse, }: any = useFetchTenderById(item?.tenderId);
|
||||||
const tender = tenderResponse?.data;
|
const tender = tenderResponse?.data;
|
||||||
|
|
||||||
// const {
|
// console.log("item my : ", item)
|
||||||
// refetch,
|
|
||||||
// isFetching,
|
|
||||||
// isError,
|
|
||||||
// } = useProceedToBid(item?.tenderId);
|
|
||||||
|
|
||||||
// const handleProceed = async (item: any) => {
|
{
|
||||||
// const res = await refetch();
|
if (item?.nitNumber == 'TN/111') {
|
||||||
// if (res.data && !isError) {
|
console.log("tender item : ", item?.nitNumber)
|
||||||
// navigation.navigate('TenderBidding', { tenderData: res.data?.data });
|
|
||||||
// }
|
}
|
||||||
// };
|
}
|
||||||
|
|
||||||
const handlePressIn = () => {
|
const handlePressIn = () => {
|
||||||
scale.value = withTiming(0.97, { duration: 120 });
|
scale.value = withTiming(0.97, { duration: 120 });
|
||||||
@@ -59,12 +55,18 @@ const PurchaseTenderTile = ({
|
|||||||
elevation.value = withTiming(8, { duration: 160 });
|
elevation.value = withTiming(8, { duration: 160 });
|
||||||
};
|
};
|
||||||
|
|
||||||
const isLive = item?.liveStatus === true;
|
const isLive = item?.biddingStatus === true;
|
||||||
|
|
||||||
const statusColor = isLive ? colors.primary : '#94A3B8';
|
const statusColor = isLive ? colors.primary : '#94A3B8';
|
||||||
const lightStatusBg = isLive ? '#EFF6FF' : '#F8FAFC';
|
const lightStatusBg = isLive ? '#EFF6FF' : '#F8FAFC';
|
||||||
const [showDetail, setShowDetail] = React.useState(false);
|
const [showDetail, setShowDetail] = React.useState(false);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if(item?.tenderNumber == 'TN/210'){
|
||||||
|
console.log("tender item : ", item)
|
||||||
|
}
|
||||||
|
}, [item]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Animated.View
|
<Animated.View
|
||||||
entering={FadeInUp.duration(400)}
|
entering={FadeInUp.duration(400)}
|
||||||
@@ -105,11 +107,11 @@ const PurchaseTenderTile = ({
|
|||||||
setShowDetail(true)
|
setShowDetail(true)
|
||||||
}}>
|
}}>
|
||||||
<Text style={styles.dateText}>
|
<Text style={styles.dateText}>
|
||||||
<Text style={styles.dateLabel}>Purchase Ends: </Text>
|
<Text style={styles.dateLabel}>Bid Ends: </Text>
|
||||||
{moment(
|
{moment(
|
||||||
item?.tenderKeyDatesAmendment?.tenderPurchaseDate?.endDateTime,
|
item?.keydates?.bidSubmissionDate?.endDateTime,
|
||||||
'DD-MM-YYYY HH:mm:ss'
|
'DD-MM-YYYY HH:mm:ss'
|
||||||
).format('DD MMM, hh:mm A')}
|
).format('DD MMM YYYY, hh:mm A')}
|
||||||
</Text>
|
</Text>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
|
|
||||||
@@ -121,7 +123,7 @@ const PurchaseTenderTile = ({
|
|||||||
{isLive ? (
|
{isLive ? (
|
||||||
<CountdownTimer
|
<CountdownTimer
|
||||||
endDate={
|
endDate={
|
||||||
item?.tenderKeyDatesAmendment?.tenderPurchaseDate?.endDateTime
|
item?.keydates?.bidSubmissionDate?.endDateTime
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
@@ -133,7 +135,7 @@ const PurchaseTenderTile = ({
|
|||||||
disabled={!isLive}
|
disabled={!isLive}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
if (isLive) {
|
if (isLive) {
|
||||||
navigation.navigate('ProceedToBidDetail', { tender });
|
navigation.navigate('ProceedToBidDetail', { tender });
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
activeOpacity={0.85}
|
activeOpacity={0.85}
|
||||||
|
|||||||
@@ -15,6 +15,9 @@ import MyInput from '../../../../src/Component/MyInput';
|
|||||||
import { pick, types } from '@react-native-documents/picker';
|
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 { Fontisto } from '@react-native-vector-icons/fontisto';
|
||||||
|
import { apiCall } from '../../../Axios/Axios';
|
||||||
|
|
||||||
type EnvelopeType = 'A' | 'B' | 'C';
|
type EnvelopeType = 'A' | 'B' | 'C';
|
||||||
type EnvelopeFormState = {
|
type EnvelopeFormState = {
|
||||||
@@ -33,27 +36,13 @@ interface InfoRowProps {
|
|||||||
value: string;
|
value: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface TenderBiddingData {
|
|
||||||
data?: {
|
|
||||||
tenderNumber?: string;
|
|
||||||
nitNo?: string;
|
|
||||||
emdInFig?: string;
|
|
||||||
tenderRebid?: boolean;
|
|
||||||
showEA?: boolean;
|
|
||||||
showEB?: boolean;
|
|
||||||
showEC?: boolean;
|
|
||||||
tenderEnvelopeAList?: any[];
|
|
||||||
tenderEnvelopeBList?: any[];
|
|
||||||
tenderEnvelopeCList?: any[];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
const TenderBidding = () => {
|
const TenderBidding = () => {
|
||||||
const route = useRoute();
|
const route = useRoute<any>();
|
||||||
const navigation = useNavigation();
|
const navigation = useNavigation();
|
||||||
|
|
||||||
const [bidData] = useState<any>(route.params?.tenderData || null);
|
const [bidData] = useState<any>(route.params?.tenderData || null);
|
||||||
const [activeEnvelope, setActiveEnvelope] = useState<EnvelopeType | null>('A');
|
const tenderData: any = route.params?.bidData || null;
|
||||||
|
const [activeEnvelope, setActiveEnvelope] = useState<EnvelopeType>('A');
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
const [envelopForm, setEnvelopForm] = useState<EnvelopeFormState>({
|
const [envelopForm, setEnvelopForm] = useState<EnvelopeFormState>({
|
||||||
A: {},
|
A: {},
|
||||||
@@ -63,7 +52,7 @@ const TenderBidding = () => {
|
|||||||
const [loading, setLoading] = useState(false)
|
const [loading, setLoading] = useState(false)
|
||||||
const [loadingUpload, setLoadingUpload] = useState(false)
|
const [loadingUpload, setLoadingUpload] = useState(false)
|
||||||
const [check, setCheck] = useState(false)
|
const [check, setCheck] = useState(false)
|
||||||
|
|
||||||
|
|
||||||
const InfoRow = ({ title, value }: InfoRowProps) => (
|
const InfoRow = ({ title, value }: InfoRowProps) => (
|
||||||
<View style={styles.infoRow}>
|
<View style={styles.infoRow}>
|
||||||
@@ -144,7 +133,7 @@ const TenderBidding = () => {
|
|||||||
activeEnvelope === envelopeType !== 'C' &&
|
activeEnvelope === envelopeType !== 'C' &&
|
||||||
!bidData?.[`envelope${envelopeType}SubmittStatus`];
|
!bidData?.[`envelope${envelopeType}SubmittStatus`];
|
||||||
|
|
||||||
|
// console.log("tender ana : ", tenderData)
|
||||||
return (
|
return (
|
||||||
<View key={sequenceId}>
|
<View key={sequenceId}>
|
||||||
<View style={styles.envelopeItem}>
|
<View style={styles.envelopeItem}>
|
||||||
@@ -227,9 +216,9 @@ const TenderBidding = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const hasEnvelopes = () => {
|
const hasEnvelopes = () => {
|
||||||
const hasA = bidData?.tenderEnvelopeAList?.length > 0;
|
const hasA = tenderData?.tenderEnvelopeAList?.length > 0;
|
||||||
const hasB = bidData?.tenderEnvelopeBList?.length > 0;
|
const hasB = tenderData?.tenderEnvelopeBList?.length > 0;
|
||||||
// const hasC = bidData?.tenderEnvelopeCList?.length > 0;
|
// const hasC = tenderData?.tenderEnvelopeCList?.length > 0;
|
||||||
return hasA || hasB;
|
return hasA || hasB;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -254,8 +243,9 @@ const TenderBidding = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const buildEnvelopePayload = () => {
|
const buildEnvelopePayload = () => {
|
||||||
|
|
||||||
const list =
|
const list =
|
||||||
bidData?.[`tenderEnvelope${activeEnvelope}List`] || [];
|
tenderData?.[`tenderEnvelope${activeEnvelope}List`] || [];
|
||||||
const formValues = envelopForm?.[activeEnvelope] || {};
|
const formValues = envelopForm?.[activeEnvelope] || {};
|
||||||
|
|
||||||
// 🔹 NON-FILE FIELDS (labelType !== '3')
|
// 🔹 NON-FILE FIELDS (labelType !== '3')
|
||||||
@@ -305,17 +295,17 @@ const TenderBidding = () => {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
return payload = {
|
const payload: any = {
|
||||||
deptId: bidData?.deptId,
|
deptId: tenderData?.deptId,
|
||||||
tenderId: bidData?.tenderId,
|
tenderId: tenderData?.tenderId,
|
||||||
|
|
||||||
|
|
||||||
[`tenderEnvelope${activeEnvelope}NameId`]:
|
[`tenderEnvelope${activeEnvelope}NameId`]:
|
||||||
bidData?.[`tenderEnvelope${activeEnvelope}List`]?.[0]?.[
|
tenderData?.[`tenderEnvelope${activeEnvelope}List`]?.[0]?.[
|
||||||
`tenderEnvelope${activeEnvelope}NameId`
|
`tenderEnvelope${activeEnvelope}NameId`
|
||||||
],
|
],
|
||||||
[`envelope${activeEnvelope}TemplateName`]:
|
[`envelope${activeEnvelope}TemplateName`]:
|
||||||
bidData?.[`tenderEnvelope${activeEnvelope}List`]?.[0]?.[
|
tenderData?.[`tenderEnvelope${activeEnvelope}List`]?.[0]?.[
|
||||||
`envelope${activeEnvelope}TemplateName`
|
`envelope${activeEnvelope}TemplateName`
|
||||||
],
|
],
|
||||||
|
|
||||||
@@ -323,12 +313,13 @@ const TenderBidding = () => {
|
|||||||
? fileData
|
? fileData
|
||||||
: saveData,
|
: saveData,
|
||||||
};
|
};
|
||||||
|
// console.log("payload : ", payload)
|
||||||
|
return payload;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const validateEnvelope = () => {
|
const validateEnvelope = () => {
|
||||||
const list = bidData?.[`tenderEnvelope${activeEnvelope}List`] || [];
|
const list = tenderData?.[`tenderEnvelope${activeEnvelope}List`] || [];
|
||||||
const formValues = envelopForm[activeEnvelope];
|
const formValues = envelopForm[activeEnvelope];
|
||||||
|
|
||||||
const missing = list.some((item: any) => {
|
const missing = list.some((item: any) => {
|
||||||
@@ -362,10 +353,11 @@ const TenderBidding = () => {
|
|||||||
setLoading(true)
|
setLoading(true)
|
||||||
if (envelopForm?.[activeEnvelope]?.[3]) {
|
if (envelopForm?.[activeEnvelope]?.[3]) {
|
||||||
handleSubmitEnvelopeFile()
|
handleSubmitEnvelopeFile()
|
||||||
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|
||||||
const res = await apiCallForPostWithToken(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)
|
||||||
|
|
||||||
@@ -387,11 +379,14 @@ const TenderBidding = () => {
|
|||||||
setLoading(true)
|
setLoading(true)
|
||||||
const payload = buildEnvelopePayload();
|
const payload = buildEnvelopePayload();
|
||||||
console.log('Envelope B Payload:', payload);
|
console.log('Envelope B Payload:', payload);
|
||||||
|
|
||||||
|
|
||||||
if (envelopForm?.[activeEnvelope]?.[3]) {
|
if (envelopForm?.[activeEnvelope]?.[3]) {
|
||||||
handleSubmitEnvelopeFile()
|
handleSubmitEnvelopeFile()
|
||||||
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const res = await apiCallForPostWithToken(SUBMIT_ENVELOPE_B, payload)
|
const res = await apiCall('post', SUBMIT_ENVELOPE_B, payload)
|
||||||
console.log("res B envelop : ", res)
|
console.log("res B envelop : ", res)
|
||||||
|
|
||||||
ToastAndroid.show(res.message, ToastAndroid.SHORT)
|
ToastAndroid.show(res.message, ToastAndroid.SHORT)
|
||||||
@@ -420,8 +415,7 @@ const TenderBidding = () => {
|
|||||||
|
|
||||||
|
|
||||||
console.log("reuestDto for fil doc : ", formData)
|
console.log("reuestDto for fil doc : ", formData)
|
||||||
// return
|
const res = await apiCall('post', activeEnvelope === 'B' ? SUBMIT_ENVELOPE_FILE_B : SUBMIT_ENVELOPE_FILE_A, payload)
|
||||||
const res = await apiCallForPostWithToken(activeEnvelope === 'B' ? SUBMIT_ENVELOPE_B : SUBMIT_ENVELOPE_A, payload)
|
|
||||||
console.log(`res file ${activeEnvelope} Payload:`, res)
|
console.log(`res file ${activeEnvelope} Payload:`, res)
|
||||||
ToastAndroid.show(res.message, ToastAndroid.SHORT)
|
ToastAndroid.show(res.message, ToastAndroid.SHORT)
|
||||||
// navigation.goBack()
|
// navigation.goBack()
|
||||||
@@ -432,17 +426,8 @@ const TenderBidding = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isLoading) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<View style={styles.loadingContainer}>
|
|
||||||
<Text>Loading...</Text>
|
|
||||||
</View>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log("route for date : ", route.params)
|
|
||||||
return (
|
return (
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<InsideHeader title="Tender Bidding Start" showArrow />
|
<InsideHeader title="Tender Bidding Start" showArrow />
|
||||||
@@ -467,20 +452,19 @@ const TenderBidding = () => {
|
|||||||
<View style={styles.card}>
|
<View style={styles.card}>
|
||||||
<Text style={styles.sectionTitle}>Bid Envelopes</Text>
|
<Text style={styles.sectionTitle}>Bid Envelopes</Text>
|
||||||
<View style={styles.envelopeRow}>
|
<View style={styles.envelopeRow}>
|
||||||
{bidData?.showEA && (
|
{tenderData?.showEA && (
|
||||||
<EnvelopeButton
|
<EnvelopeButton
|
||||||
title="Envelope A"
|
title="Envelope A"
|
||||||
envelopeType="A"
|
envelopeType="A"
|
||||||
onPress={() => setActiveEnvelope('A')}
|
onPress={() => setActiveEnvelope('A')}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{bidData?.showEB && (
|
{tenderData?.showEB && (
|
||||||
<EnvelopeButton
|
<EnvelopeButton
|
||||||
title="Envelope B"
|
title="Envelope B"
|
||||||
envelopeType="B"
|
envelopeType="B"
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
if
|
if (tenderData?.envelopeASubmittStatus) {
|
||||||
(bidData?.envelopeASubmittStatus) {
|
|
||||||
setActiveEnvelope('B')
|
setActiveEnvelope('B')
|
||||||
} else {
|
} else {
|
||||||
Alert.alert('Info', 'First Fill Envelop A First')
|
Alert.alert('Info', 'First Fill Envelop A First')
|
||||||
@@ -488,7 +472,7 @@ const TenderBidding = () => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
{bidData?.showEC && (
|
{tenderData?.showEC && (
|
||||||
<EnvelopeButton
|
<EnvelopeButton
|
||||||
title="Envelope C"
|
title="Envelope C"
|
||||||
envelopeType="C"
|
envelopeType="C"
|
||||||
@@ -498,24 +482,25 @@ const TenderBidding = () => {
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
{/* Envelope A List */}
|
{/* Envelope A List */}
|
||||||
{bidData?.[`tenderEnvelope${activeEnvelope}List`]?.length > 0 && activeEnvelope !== 'C' && (
|
{tenderData?.[`tenderEnvelope${activeEnvelope}List`]?.length > 0 && activeEnvelope !== 'C' && (
|
||||||
<View style={styles.card}>
|
<View style={styles.card}>
|
||||||
<Text style={styles.sectionTitle}>Envelope {activeEnvelope} Details</Text>
|
<Text style={styles.sectionTitle}>Envelope {activeEnvelope} Details</Text>
|
||||||
<FlatList
|
<FlatList
|
||||||
data={bidData?.[`tenderEnvelope${activeEnvelope}List`]}
|
data={tenderData?.[`tenderEnvelope${activeEnvelope}List`]}
|
||||||
keyExtractor={(item) => item?.[`tenderEnvelope${activeEnvelope}SequnceId`]?.toString()}
|
keyExtractor={(item) => item?.[`tenderEnvelope${activeEnvelope}SequnceId`]?.toString()}
|
||||||
renderItem={({ item }) => renderEnvelopeItem({ item, envelopeType: activeEnvelope })}
|
renderItem={({ item }) => renderEnvelopeItem({ item, envelopeType: activeEnvelope })}
|
||||||
scrollEnabled={false}
|
scrollEnabled={false}
|
||||||
/>
|
/>
|
||||||
{/* <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-active" size={24} color={colors.primary} /> :
|
||||||
<Fontisto name="checkbox-passive" size={24} color={colors.primary} />
|
<Fontisto name="checkbox-passive" size={24} color={colors.primary} />
|
||||||
}</TouchableOpacity>
|
}</TouchableOpacity>
|
||||||
<Text>Check First Terms&Condition</Text>
|
<Text>Check First Terms&Condition</Text>
|
||||||
</View> */}
|
</View>
|
||||||
</View>
|
</View>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<View style={styles.footer}>
|
<View style={styles.footer}>
|
||||||
{hasEnvelopes() ? (
|
{hasEnvelopes() ? (
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
@@ -565,7 +550,7 @@ const styles = StyleSheet.create({
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
},
|
},
|
||||||
card: {
|
card: {
|
||||||
backgroundColor: '#fff',
|
backgroundColor: colors.primaryHighlight,
|
||||||
borderRadius: 12,
|
borderRadius: 12,
|
||||||
padding: 16,
|
padding: 16,
|
||||||
marginBottom: 16,
|
marginBottom: 16,
|
||||||
@@ -606,7 +591,7 @@ const styles = StyleSheet.create({
|
|||||||
flexWrap: 'wrap',
|
flexWrap: 'wrap',
|
||||||
},
|
},
|
||||||
envelopeButton: {
|
envelopeButton: {
|
||||||
backgroundColor: '#EEF2FF',
|
backgroundColor: colors.secondaryHighLight,
|
||||||
paddingVertical: 10,
|
paddingVertical: 10,
|
||||||
paddingHorizontal: 14,
|
paddingHorizontal: 14,
|
||||||
borderRadius: 8,
|
borderRadius: 8,
|
||||||
@@ -614,7 +599,7 @@ const styles = StyleSheet.create({
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
},
|
},
|
||||||
envelopeButtonText: {
|
envelopeButtonText: {
|
||||||
color: '#3F51B5',
|
color: colors.primary,
|
||||||
fontWeight: '600',
|
fontWeight: '600',
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
},
|
},
|
||||||
@@ -624,7 +609,7 @@ const styles = StyleSheet.create({
|
|||||||
borderRadius: 10,
|
borderRadius: 10,
|
||||||
padding: 12,
|
padding: 12,
|
||||||
marginBottom: 12,
|
marginBottom: 12,
|
||||||
backgroundColor: '#f9f9f9',
|
backgroundColor: colors.primaryHighlight,
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
justifyContent: 'space-between'
|
justifyContent: 'space-between'
|
||||||
},
|
},
|
||||||
@@ -634,7 +619,7 @@ const styles = StyleSheet.create({
|
|||||||
marginVertical: 20,
|
marginVertical: 20,
|
||||||
},
|
},
|
||||||
primaryButton: {
|
primaryButton: {
|
||||||
backgroundColor: '#3F51B5',
|
backgroundColor: colors.primary,
|
||||||
paddingVertical: 14,
|
paddingVertical: 14,
|
||||||
paddingHorizontal: 28,
|
paddingHorizontal: 28,
|
||||||
borderRadius: 10,
|
borderRadius: 10,
|
||||||
@@ -656,7 +641,7 @@ const styles = StyleSheet.create({
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
},
|
},
|
||||||
secondaryButtonText: {
|
secondaryButtonText: {
|
||||||
color: '#3F51B5',
|
color: colors.primary,
|
||||||
fontWeight: '600',
|
fontWeight: '600',
|
||||||
fontSize: 15,
|
fontSize: 15,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import Partnership from "./Ragistration/PartnerShip";
|
|||||||
import Registration from "./Ragistration/Ragistration";
|
import Registration from "./Ragistration/Ragistration";
|
||||||
import Signup from "./SignUp/SignUp";
|
import Signup from "./SignUp/SignUp";
|
||||||
import Splash from "./Splash/Splash";
|
import Splash from "./Splash/Splash";
|
||||||
|
import LiveTenderDetail from "./Tender/LiveTenderDetail";
|
||||||
import ProceedToBidDetail from "./Tender/ProceedToBidDetail";
|
import ProceedToBidDetail from "./Tender/ProceedToBidDetail";
|
||||||
import ProceedToPurTender from "./Tender/ProceedToPurTender";
|
import ProceedToPurTender from "./Tender/ProceedToPurTender";
|
||||||
import PurchaseTenderList from "./Tender/PurchaseTenderList";
|
import PurchaseTenderList from "./Tender/PurchaseTenderList";
|
||||||
@@ -36,8 +37,7 @@ const Screens = {
|
|||||||
StartReverseBidding,
|
StartReverseBidding,
|
||||||
Signup,
|
Signup,
|
||||||
Registration,
|
Registration,
|
||||||
Partnership
|
Partnership,
|
||||||
|
LiveTenderDetail
|
||||||
|
|
||||||
}
|
}
|
||||||
export default Screens
|
export default Screens
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useInfiniteQuery, useMutation, useQuery } from '@tanstack/react-query';
|
import { useInfiniteQuery, useMutation, useQuery } from '@tanstack/react-query';
|
||||||
import { contractorStageThreeSubmit, contractorStageTwoSubmit, fetchAuctionItem, fetchCityDropdown, fetchDashboard, fetchEmdCheck, fetchLiveAuction, fetchLiveTender, fetchMasterData, fetchPurchaseAuction, fetchPurchaseTender, fetchTenderById, getDesignation, getRagistrationState, offlineAuctionPurchase, offlineTenderPurchase, partnerShipSubmit, proceedToBid, registerContractor, sendAadhaarOtp, userAuctionLogin, userLogin, verifyAadhaarOtp, verifyGstNumber, verifyPanHandler } from './apis';
|
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 { apiCall } from '../../Axios/Axios';
|
import { apiCall } from '../../Axios/Axios';
|
||||||
|
|
||||||
// User
|
// User
|
||||||
@@ -171,9 +171,9 @@ export const usefetchMasterData = () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export const useCityDropdown = () => {
|
export const useCityDropdown = (stateId?: number) => {
|
||||||
return useMutation({
|
return useMutation({
|
||||||
mutationFn: (stateId: number) => fetchCityDropdown(stateId),
|
mutationFn: () => fetchCityDropdown(stateId as number),
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -196,20 +196,4 @@ export const useVerifyPan = () =>
|
|||||||
export const useVerifyGstNumber = () =>
|
export const useVerifyGstNumber = () =>
|
||||||
useMutation({
|
useMutation({
|
||||||
mutationFn: verifyGstNumber,
|
mutationFn: verifyGstNumber,
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
export const useContractorStageTwoSubmit = () =>
|
|
||||||
useMutation({
|
|
||||||
mutationFn: contractorStageTwoSubmit,
|
|
||||||
});
|
|
||||||
|
|
||||||
export const useContractorStageThreeSubmit = () =>
|
|
||||||
useMutation({
|
|
||||||
mutationFn: contractorStageThreeSubmit,
|
|
||||||
});
|
|
||||||
|
|
||||||
export const usePartnerShipSubmit = () =>
|
|
||||||
useMutation({
|
|
||||||
mutationFn: partnerShipSubmit,
|
|
||||||
});
|
});
|
||||||
@@ -1,9 +1,17 @@
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import { ALL_DESIGNATION, DASHBOARD_COUNT, EMD_CHECK, FORARD_AUCTION_ITEM, GET_MASTER_DATA, GET_MY_AUCTION, GET_MY_TENDER, GET_REGISTRATION_STATE, GET_TENDER_DETAILS, GETCONTRACTORBYSTATE, LIVE_AUCTION, LIVE_TENDER, LOG_IN_URL, PARTNER_API_ENDPOINT, PROCEED_PURCHASE_AUCTION, PROCEED_TO_BID, PURCHASE_OFFLINE_AUCTION, PURCHASE_TENDER_OFFLINE, REJ_STAGE_TWO, REVERSE_AUCTION_ITEM, SAVE_CONTRACTOR_STAGE1, SEND_ADHAROTP, STAGETHREE, TENDER_LOGIN, VERIFY_ADHAR, VERIFY_GST,VERIFY_ORGPAN } from "./ApiUrls";
|
import { ALL_DESIGNATION, DASHBOARD_COUNT, EMD_CHECK, FORARD_AUCTION_ITEM, GET_MASTER_DATA, GET_MY_AUCTION, GET_MY_TENDER, GET_REGISTRATION_STATE, GET_TENDER_DETAILS, GETCONTRACTORBYSTATE, LIVE_AUCTION, LIVE_TENDER, LOG_IN_URL, PARTNER_API_ENDPOINT, PROCEED_PURCHASE_AUCTION, PROCEED_TO_BID, PURCHASE_OFFLINE_AUCTION, PURCHASE_TENDER_OFFLINE, SUBMIT_ENVELOPE_A, SUBMIT_ENVELOPE_B, SUBMIT_ENVELOPE_FILE_A, SUBMIT_ENVELOPE_FILE_B, REJ_STAGE_TWO, REVERSE_AUCTION_ITEM, SAVE_CONTRACTOR_STAGE1, SEND_ADHAROTP, STAGETHREE, TENDER_LOGIN, VERIFY_ADHAR, VERIFY_GST,VERIFY_ORGPAN } from "./ApiUrls";
|
||||||
import { apiCall } from "../../Axios/Axios";
|
import { apiCall } from "../../Axios/Axios";
|
||||||
|
|
||||||
// User
|
// User
|
||||||
|
export type UploadArgs = {
|
||||||
|
activeEnvelope: 'A' | 'B'
|
||||||
|
file: {
|
||||||
|
uri: string
|
||||||
|
name: string
|
||||||
|
type: string
|
||||||
|
}
|
||||||
|
payload: any
|
||||||
|
}
|
||||||
type DropdownOption = { label: string; value: number | string };
|
type DropdownOption = { label: string; value: number | string };
|
||||||
|
|
||||||
type State = { stateId: number; stateName: string };
|
type State = { stateId: number; stateName: string };
|
||||||
@@ -271,3 +279,44 @@ export const partnerShipSubmit = (
|
|||||||
payload,
|
payload,
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const submitEnvelopeA = async (payload: any) => {
|
||||||
|
console.log('SUBMIT ENVELOPE A API CALLED', payload)
|
||||||
|
const { data } = await apiCall<any>('post', SUBMIT_ENVELOPE_A, payload)
|
||||||
|
console.log("data : ", data)
|
||||||
|
return data
|
||||||
|
}
|
||||||
|
export const submitEnvelopeB = async (payload: any) => {
|
||||||
|
console.log('SUBMIT ENVELOPE B API CALLED', payload)
|
||||||
|
const { data } = await apiCall<any>('post', SUBMIT_ENVELOPE_B, payload)
|
||||||
|
console.log("data : ", data)
|
||||||
|
return data
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export const uploadEnvelopeFile = async ({
|
||||||
|
activeEnvelope,
|
||||||
|
file,
|
||||||
|
payload,
|
||||||
|
}: UploadArgs) => {
|
||||||
|
const formData = new FormData()
|
||||||
|
|
||||||
|
formData.append('files', {
|
||||||
|
uri: file.uri,
|
||||||
|
name: file.name,
|
||||||
|
type: file.type,
|
||||||
|
} as any)
|
||||||
|
|
||||||
|
formData.append('requestDto', JSON.stringify(payload))
|
||||||
|
|
||||||
|
const url =
|
||||||
|
activeEnvelope === 'B' ? SUBMIT_ENVELOPE_FILE_B : SUBMIT_ENVELOPE_FILE_A
|
||||||
|
|
||||||
|
const data = await apiCall('post', url, formData, {
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'multipart/form-data',
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
return data
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user