some changes in ui
This commit is contained in:
@@ -18,7 +18,7 @@ const TemplateFormModal: React.FC<Props> = ({ visible, template, setAllBoolean }
|
||||
const SelectedAuction = useSelector((state: any) => state.auction.auction)
|
||||
const Navigation: any = useNavigation()
|
||||
const [loading, setLoading] = useState(false)
|
||||
const initialValues = template.labels.reduce((acc: any, label: any) => {
|
||||
const initialValues = template?.labels?.reduce((acc: any, label: any) => {
|
||||
acc[label.labelName] = ''
|
||||
return acc
|
||||
}, {})
|
||||
@@ -150,7 +150,7 @@ const TemplateFormModal: React.FC<Props> = ({ visible, template, setAllBoolean }
|
||||
([labelName, labelValue]: any) => {
|
||||
if (typeof labelValue === 'object' && labelValue?.uri) {
|
||||
hasFile = true
|
||||
fileFormData.append(labelName, {
|
||||
fileFormData.append('files', {
|
||||
uri: labelValue.uri,
|
||||
name: labelValue.name,
|
||||
type: labelValue.type,
|
||||
@@ -166,14 +166,13 @@ const TemplateFormModal: React.FC<Props> = ({ visible, template, setAllBoolean }
|
||||
|
||||
const rs1: any = await apiCall('post', TECHNICAL_VALUE_SUBMIT, jsonBody)
|
||||
|
||||
|
||||
if (hasFile) {
|
||||
fileFormData.append(
|
||||
'auctiontId',
|
||||
String(SelectedAuction.auctionId)
|
||||
'auctionTemplateValueIds',
|
||||
String(rs1?.data[0]?.valueId)
|
||||
)
|
||||
fileFormData.append(
|
||||
'technicalDocumentTemplateId',
|
||||
'templateNameId',
|
||||
String(payload.templateNameId)
|
||||
)
|
||||
|
||||
@@ -184,7 +183,7 @@ const TemplateFormModal: React.FC<Props> = ({ visible, template, setAllBoolean }
|
||||
{},
|
||||
'multipart/form-data'
|
||||
)
|
||||
console.log(res2, '-------------res2');
|
||||
|
||||
if (rs1.statusCode == 200 && res2.statusCode == 200) {
|
||||
Navigation.navigate(NavigationString.StartBidding)
|
||||
setAllBoolean((prev: any) => ({ ...prev, technicalDocModalVisible: false }))
|
||||
@@ -397,7 +396,7 @@ const styles = StyleSheet.create({
|
||||
submitRow: {
|
||||
marginTop: 20,
|
||||
alignItems: 'flex-end',
|
||||
height:50
|
||||
height: 50
|
||||
},
|
||||
submitBtn: {
|
||||
backgroundColor: colors.primary,
|
||||
|
||||
Reference in New Issue
Block a user