|
@ -1,9 +1,7 @@ |
|
|
import moment from "moment"; |
|
|
import moment from "moment"; |
|
|
import React from "react"; |
|
|
|
|
|
import { View, Text } from "react-native"; |
|
|
|
|
|
import getFieldsAnswers from "../api/RequestFieldsAnswers/getFieldsAnswers"; |
|
|
import getFieldsAnswers from "../api/RequestFieldsAnswers/getFieldsAnswers"; |
|
|
import assets from "../config/assets"; |
|
|
import assets from "../config/assets"; |
|
|
//----- 1/3: melhorar código (URGENTE)
|
|
|
|
|
|
|
|
|
//----- 1/3: melhorar código (URGENTE) +1 up-vote
|
|
|
const custom_assets = { |
|
|
const custom_assets = { |
|
|
pluviometer: assets.PluviometerIcon, |
|
|
pluviometer: assets.PluviometerIcon, |
|
|
officialPluviometer: assets.OfficialPluviometer, |
|
|
officialPluviometer: assets.OfficialPluviometer, |
|
@ -46,7 +44,7 @@ function getLogo(name, situation) { |
|
|
return custom_assets.riverLevel[1]; |
|
|
return custom_assets.riverLevel[1]; |
|
|
} else if (situation == "ALTO") { |
|
|
} else if (situation == "ALTO") { |
|
|
return custom_assets.riverLevel[2]; |
|
|
return custom_assets.riverLevel[2]; |
|
|
} else if (situation == "INUNDAR") { |
|
|
|
|
|
|
|
|
} else if (situation == "INUNDAR" || situation == "TRANSBORDADO") { |
|
|
return custom_assets.riverLevel[3]; |
|
|
return custom_assets.riverLevel[3]; |
|
|
} |
|
|
} |
|
|
return custom_assets.riverLevel[0]; |
|
|
return custom_assets.riverLevel[0]; |
|
@ -278,9 +276,12 @@ const AssembleModalObject = async (response, name, userId, formId) => { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// GATO 2: Now INUNDAR is replaced to TRANSBORDADO, so checking from
|
|
|
|
|
|
// response and changing to new value
|
|
|
|
|
|
const _title = situation == "INUNDAR" ? "TRANSBORDADO" : situation; |
|
|
return { |
|
|
return { |
|
|
name: name, |
|
|
name: name, |
|
|
title: situation, |
|
|
|
|
|
|
|
|
title: _title, |
|
|
user: null, |
|
|
user: null, |
|
|
institution: institution, |
|
|
institution: institution, |
|
|
address: address, |
|
|
address: address, |
|
|