Skip to content

Commit

Permalink
#2474 Add name to expiration history table
Browse files Browse the repository at this point in the history
  • Loading branch information
dwalizer committed Nov 28, 2023
1 parent 465140d commit f8d7d2f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
4 changes: 3 additions & 1 deletion dashboard/src/components/expiration/ExpirationHistory.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ limitations under the License.
<span class="text-primary"><i class="fas fa-clock text-warning" aria-hidden="true"></i> {{ data.label }}</span>
</template>
<template v-slot:cell(userIdForDisplay)="data">
{{ data.value }}
{{ getUserDisplay(data.item, true) }}

<b-button-group class="float-right">
<b-button :to="calculateClientDisplayRoute(data)"
Expand Down Expand Up @@ -82,9 +82,11 @@ limitations under the License.
import SkillsBTable from '@/components/utils/table/SkillsBTable';
import ExpirationService from '@/components/expiration/ExpirationService';
import DateCell from '../utils/table/DateCell';
import UserIdForDisplayMixin from '../users/UserIdForDisplayMixin';
export default {
name: 'ExpirationHistory',
mixins: [UserIdForDisplayMixin],
components: {
SubPageHeader,
SkillsBTable,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ interface ExpiredSkillRes {
Date getExpiredOn()
String getSkillName()
String getSubjectId()
String getFirstName()
String getLastName()
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,25 @@ interface ExpiredUserAchievementRepo extends CrudRepository<ExpiredUserAchieveme
@Param("olderThanDate") Date olderThanDate)

@Query(value = '''
SELECT eua.userId as userId, eua.skillId as skillId, eua.expiredOn as expiredOn, skill.name as skillName, userAttrs.userIdForDisplay as userIdForDisplay, subjectDef.skillId as subjectId
SELECT eua.userId as userId,
eua.skillId as skillId,
eua.expiredOn as expiredOn,
skill.name as skillName,
userAttrs.userIdForDisplay as userIdForDisplay,
subjectDef.skillId as subjectId,
userAttrs.firstName as firstName,
userAttrs.lastName as lastName
FROM ExpiredUserAchievement eua, SkillDef skill, UserAttrs userAttrs, SkillDef subjectDef, SkillRelDef srd
WHERE eua.projectId = :projectId AND eua.skillId = skill.skillId AND eua.projectId = skill.projectId AND userAttrs.userId = eua.userId
AND subjectDef = srd.parent AND
skill = srd.child AND
(srd.type = 'RuleSetDefinition' or srd.type = 'GroupSkillToSubject') AND
subjectDef.type = 'Subject'
AND(:userFilter is null OR lower(userAttrs.userIdForDisplay) like lower(concat('%', :userFilter, '%')))
AND (
:userFilter is null OR lower(userAttrs.userIdForDisplay) like lower(concat('%', :userFilter, '%')) or
(lower(CONCAT(userAttrs.firstName, ' ', userAttrs.lastName, ' (', userAttrs.userIdForDisplay, ')')) like lower(CONCAT(\'%\', :userFilter, \'%\'))) OR
(lower(CONCAT(userAttrs.userIdForDisplay, ' (', userAttrs.lastName, ', ', userAttrs.firstName, ')')) like lower(CONCAT(\'%\', :userFilter, \'%\')))
)
AND(:skillNameFilter is null OR lower(skill.name) like lower(concat('%', :skillNameFilter, '%')))
''')
Page<ExpiredSkillRes> findAllExpiredAchievements(@Param("projectId") String projectId,
Expand Down

0 comments on commit f8d7d2f

Please sign in to comment.