Skip to content

Commit

Permalink
Added user name in the birthday event.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mahmoud-Emad committed Apr 23, 2024
1 parent c6b2516 commit e53434a
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion client/src/components/CalenderComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ function onClick(arg: any) {
(vacation) => vacation.id === Number(arg.event.id.replace('vacation', ''))
)[0]
openDialog(CalendarEventSelection.Vacation)
} else if (clickedEventTitle === CalendarEventSelection.Birthday) {
} else if (clickedEventTitle.includes(CalendarEventSelection.Birthday)) {
selectedEvent.value = birthdays.value.filter(
(birthday) => birthday.id === Number(arg.event.id.replace('birthday', ''))
)[0]
Expand Down
3 changes: 0 additions & 3 deletions client/src/components/UpdateUser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,6 @@ export default {
const { execute, isLoading } = useAsyncState(
async () => {
selectedUser.value.user_type = selectedUser.value.user_type === "Team Lead" ? "Supervisor" : selectedUser.value.user_type
// const imageParts = selectedUser.value.image.split("/") as string[]
// const filename = imageParts[imageParts.length -1]
// console.log("selectedUser.value.image", filename)
const data = {
...selectedUser.value,
image: imageUrl.value ? imageUrl.value : null,
Expand Down
2 changes: 1 addition & 1 deletion client/src/utils/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export function normalizedBirthday(u: Api.User) {

return {
type: u.type,
title: `Birthday`,
title: `${u.full_name}'s Birthday`,
color: '#e0adf0',
start: dates.start,
end: dates.end,
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 @@ -324,6 +324,7 @@ class Meta:
fields = [
"id",
"full_name",
"first_name",
"email",
"image",
"team",
Expand Down

0 comments on commit e53434a

Please sign in to comment.