Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pmg 10 #2006

Merged
merged 12 commits into from
Jan 10, 2025
Prev Previous commit
Next Next commit
answer indicator cosmetics
xgo-work committed Jan 7, 2025
commit 085c5721d2bac0b2cec1b9d41d0ed99ea21eab91
Original file line number Diff line number Diff line change
@@ -208,7 +208,8 @@ export function QuestionLabel({
className={cx(
flex,
itemCenter,
css({justifyContent: 'space-between'})
css({justifyContent: 'space-between', width:'100%'}),
'wegas-question__item'
)}
onClick={() => {
!disabled &&
@@ -260,7 +261,7 @@ function QuestionLabelAnswerIndicator({
}
const firstReply = question.choicesI.find(c =>(c?.replies || []).length > 0);
const firstChoice = question.choicesD.find(cd => cd.id == firstReply?.parentId);
const firstAnswerTranslation = useTranslate(firstChoice?.label) + ' (label)';
const firstAnswerTranslation = useTranslate(firstChoice?.label);

let answer = "";
if(question.questionD?.maxReplies === 1){
@@ -271,15 +272,15 @@ function QuestionLabelAnswerIndicator({
}, 0);
answer = count + 'x';
}
return (<div className={css({ opacity: 0.5 }, {flex})}>{answer}</div>)
return (<div className={css({ opacity: 0.5, textAlign: 'end', marginLeft:'4px'})}>{answer}</div>)
}

function QuestionChooser(
props: EntityChooserLabelProps<IQuestionDescriptor | IWhQuestionDescriptor>,
) {
return (
<DefaultEntityChooserLabel {...props} customLabelStyle={customLabelStyle}>
<div className={cx(flex, flexRow, itemCenter, 'wegas-question__item')}>
<div className={cx(flex, flexRow, itemCenter)}>
{props.mobile && (
<FontAwesomeIcon
className={css({ marginRight: '5px' })}