|
|
@ -1,7 +1,6 @@ |
|
|
|
import moment from "moment"; |
|
|
|
import sendFormAnswer from "../../api/Ingestion/sendFormAnswer"; |
|
|
|
|
|
|
|
|
|
|
|
const AssembleIngestionObject = ( |
|
|
|
{ images, description }, |
|
|
|
user, |
|
|
@ -64,7 +63,13 @@ const AssembleIngestionPluviometer = ({ |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
const AssembleIngestionPluvRegistration = ( date, time, user, address, coordinates ) => { |
|
|
|
async function AssembleIngestionPluvRegistration( |
|
|
|
date, |
|
|
|
time, |
|
|
|
user, |
|
|
|
address, |
|
|
|
coordinates |
|
|
|
) { |
|
|
|
console.log(user); |
|
|
|
console.log(coordinates); |
|
|
|
const pluvResgistrationObject = { |
|
|
@ -80,16 +85,21 @@ const AssembleIngestionPluvRegistration = ( date, time, user, address, coordinat |
|
|
|
fieldsanswerseventaddress: address, |
|
|
|
fieldsanswerseventdate: moment(date).format("DD-MM-YYYY"), |
|
|
|
fieldsanswerseventtime: moment(time).format("HH:mm"), |
|
|
|
fieldsanswersinstitutename: user.institutionName ? user.institutionName : null, |
|
|
|
fieldsanswerrinstitutetype: user.institutionType ? user.institutionType : null |
|
|
|
fieldsanswersinstitutename: user.institutionName |
|
|
|
? user.institutionName |
|
|
|
: null, |
|
|
|
fieldsanswerrinstitutetype: user.institutionType |
|
|
|
? user.institutionType |
|
|
|
: null, |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
], |
|
|
|
}, |
|
|
|
}; |
|
|
|
const a = sendFormAnswer(pluvResgistrationObject); |
|
|
|
}; |
|
|
|
const a = await sendFormAnswer(pluvResgistrationObject); |
|
|
|
return a; |
|
|
|
} |
|
|
|
export { |
|
|
|
AssembleIngestionObject, |
|
|
|
AssembleIngestionPluviometer, |
|
|
|