-
Notifications
You must be signed in to change notification settings - Fork 0
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
fix: limited audit form score inputs [WTEL-4505] #231
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
d899d22
fix: changed audit form, added tooltips for audit form score input, a…
lizacoma 102d96a
Merge branch 'v24.04' into fix/audit-form
lizacoma 58d24e8
fix: changed version [WTEL-4505]
lizacoma ebc1587
fix: changes after review [WTEL-4505]
lizacoma File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,10 +9,13 @@ | |
/> | ||
<wt-input | ||
:label="$t('webitelUI.auditForm.score', 1)" | ||
:label-props="{ hint: $t('scorecards.scoreInputTooltip', { min: '0', max: '10'}), hintPosition: 'right' }" | ||
:value="option.score" | ||
:v="v$.option.score" | ||
:number-min="0" | ||
:number-max="10" | ||
type="number" | ||
@input="emit('update:option', { name: option.name, score: $event })" | ||
@input="changeScore" | ||
/> | ||
<wt-tooltip class="audit-form-question-options-write-row__tooltip"> | ||
<template #activator> | ||
|
@@ -72,6 +75,11 @@ const v$ = useVuelidate( | |
{ $autoDirty: true }, | ||
); | ||
|
||
function changeScore (value) { | ||
const score = value > 10 ? 10 : Number(Math.abs(value)); // to prevent -1, 000 or string value | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Я би додала посилання на таску, бо невідомо звідки саме 10 взялось
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. слушно, дякую! |
||
emit('update:option', { name: props.option.name, score }); | ||
} | ||
|
||
// init validation | ||
onMounted(() => v$.value.$touch()); | ||
</script> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Мені ось тут не дуже подобається findComponent 2 рази(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Згодна(( вчора шукала інші способи, вивчала доку, пробувала.
Питання в тому, що там треба знайти іконку в конкретному блоці. І я навть думала потрібній іконці псотавити просто клас, шоб шукати по ньому. Але, блін, цей клас не потрібен для стилів. Додавати лише для тестів звучить як фіговий варіант...
Спробую знайти, як це можна скоротити
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Оце я гоню, звісно...там же просто роботою з селекторами можна порєшать..