Skip to content

Commit

Permalink
Merge pull request #2660 from NationalSecurityAgency/t#2628/stars_no_…
Browse files Browse the repository at this point in the history
…focus

T#2628/stars no focus
  • Loading branch information
dwalizer authored Jul 11, 2024
2 parents f621396 + 99899d2 commit 5a8604a
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ limitations under the License.
<script setup>
import { computed } from 'vue'
import { useSkillsDisplayAttributesState } from '@/skills-display/stores/UseSkillsDisplayAttributesState.js'
import LevelsProgress from '@/skills-display/components/utilities/LevelsProgress.vue'
const props = defineProps({
userProgress: Object,
Expand All @@ -40,7 +41,7 @@ const totalLevels = computed(() => props.userProgress.totalLevels)
{{ attributes.levelDisplayName }} <Tag severity="info">{{ level }}</Tag> out of <Tag>{{ totalLevels }}</Tag>
</div>
<div class="flex justify-content-center mt-2 overall-progress-stars-icons">
<Rating v-model="level" :stars="totalLevels" readonly :cancel="false" data-cy="overallStars"/>
<LevelsProgress :level="level" :totalLevels="totalLevels" data-cy="overallStars"/>
</div>
</div>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { useSkillsDisplayInfo } from '@/skills-display/UseSkillsDisplayInfo.js'
import { useSkillsDisplayAttributesState } from '@/skills-display/stores/UseSkillsDisplayAttributesState.js'
import { useSkillsDisplayThemeState } from '@/skills-display/stores/UseSkillsDisplayThemeState.js'
import CardWithVericalSections from '@/components/utils/cards/CardWithVericalSections.vue'
import LevelsProgress from '@/skills-display/components/utilities/LevelsProgress.vue'
const props = defineProps({
subject: {
Expand Down Expand Up @@ -85,8 +86,7 @@ const progress = computed(() => {
<i :class="subject.iconClass" class="text-7xl text-400 sd-theme-subject-tile-icon" aria-hidden="true"/>
<div class="text-xl pt-1 font-medium" data-cy="levelTitle">{{ attributes.levelDisplayName }} {{ subject.skillsLevel }}</div>
<div class="flex justify-content-center mt-2 subject-progress-stars-icons">
<Rating v-model="subject.skillsLevel" :stars="subject.totalLevels" readonly :cancel="false"
data-cy="subjectStars" />
<LevelsProgress :level="subject.skillsLevel" :totalLevels="subject.totalLevels" data-cy="subjectStars"/>
</div>

<div class="flex mt-2">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/*
Copyright 2024 SkillTree

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
<script setup>
import { ref } from 'vue'
const props = defineProps({
level: Number,
totalLevels: Number
})
const levelInternal = ref(props.level)
</script>

<template>
<Rating
v-model="levelInternal"
:stars="totalLevels"
readonly
disabled
:cancel="false"
class="override-readonly-opacity" />
</template>

<style>
.override-readonly-opacity.p-rating {
opacity: 1 !important;
}
</style>

0 comments on commit 5a8604a

Please sign in to comment.