TP-23335 | Fix offline feedback (#196)
This commit is contained in:
committed by
GitHub Enterprise
parent
3f49553eda
commit
262c8c5872
@@ -31,23 +31,34 @@ interface IFeedbackDetailAnswerContainer {
|
||||
const FeedbackDetailAnswerContainer: React.FC<IFeedbackDetailAnswerContainer> = ({ answerList }) => {
|
||||
const imageAnswerList = answerList.filter(answer => answer.questionTag === OPTION_TAG.IMAGE_UPLOAD);
|
||||
|
||||
const getQuestionText = (answerItem: IAnswerView) => {
|
||||
return (answerItem.questionKey ? answerItem.questionName : answerItem.questionText) || '--';
|
||||
}
|
||||
|
||||
return (
|
||||
<View style={[styles.container]}>
|
||||
{
|
||||
imageAnswerList.map(image => (
|
||||
<ImageBackground
|
||||
style={styles.image}
|
||||
imageStyle={styles.br8}
|
||||
source={{
|
||||
uri: image.inputText,
|
||||
}} />
|
||||
<View style={[GenericStyles.columnDirection, GenericStyles.mv8]}>
|
||||
<Text style={[styles.textContainer, styles.questionText]}>
|
||||
{getQuestionText(image)}
|
||||
</Text>
|
||||
<ImageBackground
|
||||
style={[styles.image, GenericStyles.mt8]}
|
||||
imageStyle={styles.br8}
|
||||
source={{
|
||||
uri: image.inputText,
|
||||
}}
|
||||
/>
|
||||
</View>
|
||||
))
|
||||
}
|
||||
{
|
||||
answerList.filter(answer => answer.questionTag !== OPTION_TAG.IMAGE_UPLOAD).map((answerItem) => (
|
||||
<View style={[GenericStyles.row, GenericStyles.spaceBetween, GenericStyles.mv8]}>
|
||||
<Text style={[styles.textContainer, styles.questionText]}>{
|
||||
(answerItem.questionKey ? answerItem.questionName : answerItem.questionText) || '--'}</Text>
|
||||
<Text style={[styles.textContainer, styles.questionText]}>
|
||||
{getQuestionText(answerItem)}
|
||||
</Text>
|
||||
<Text style={[{ textAlign: 'right' }, styles.textContainer, styles.answerText]}>{getAnswerText(answerItem)}</Text>
|
||||
</View>
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user