Skip to content

Commit

Permalink
Fix: Display telegram, user role and phone number. (#352)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahmoud-Emad authored Feb 7, 2024
1 parent a0e4c4c commit b169797
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions client/src/components/cards/vacationCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,16 +147,17 @@ export default {
})
const couldApprove = computed(() => {
if (user.value) {
if (
user.value.fullUser.user_type === 'Admin' ||
user.value.fullUser.user_type === 'Supervisor'
) {
) {
if (props.vacation.user.id == user.value.fullUser.id) {
return true
}
if (
props.vacation.user.reporting_to.includes(user.value.fullUser.id) &&
props.vacation.user.reporting_to[0].id === props.vacation.user.id &&
props.vacation.user.location.name === user.value.fullUser.location.name
) {
return true
Expand Down
4 changes: 2 additions & 2 deletions client/src/views/TeamView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ export default {
const headers = [
{ title: 'Name', sortable: false, key: 'full_name' },
{ title: 'Email', key: 'email' },
{ title: 'Phone', key: 'phone' },
{ title: 'Position', key: 'position' },
{ title: 'Phone', key: 'mobile_number' },
{ title: 'Position', key: 'job_title' },
{ title: 'Telegram', key: 'telegram_link' },
{ title: 'Department', key: 'team' }
] as any[]
Expand Down
1 change: 1 addition & 0 deletions server/cshr/serializers/users.py
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ class Meta:
"address",
"location",
"is_active",
"telegram_link",
]

def get_image(self, obj):
Expand Down

0 comments on commit b169797

Please sign in to comment.