Compare commits
3 Commits
22124780a5
...
333d50c56c
Author | SHA1 | Date | |
---|---|---|---|
333d50c56c | |||
fae5b764dd | |||
7f70471894 |
|
@ -142,13 +142,13 @@
|
|||
"@typescript-eslint/eslint-plugin": "6.15.0",
|
||||
"@typescript-eslint/parser": "6.15.0",
|
||||
"@vitejs/plugin-legacy": "5.2.0",
|
||||
"@vitejs/plugin-vue": "4.5.2",
|
||||
"@vitejs/plugin-vue": "4.6.0",
|
||||
"@vue/eslint-config-typescript": "12.0.0",
|
||||
"@vue/test-utils": "2.4.3",
|
||||
"@vue/tsconfig": "0.5.1",
|
||||
"autoprefixer": "10.4.16",
|
||||
"browserslist": "4.22.2",
|
||||
"caniuse-lite": "1.0.30001570",
|
||||
"caniuse-lite": "1.0.30001571",
|
||||
"css-has-pseudo": "6.0.1",
|
||||
"csstype": "3.1.3",
|
||||
"cypress": "13.6.1",
|
||||
|
@ -172,8 +172,8 @@
|
|||
"vite-plugin-pwa": "0.17.4",
|
||||
"vite-plugin-sentry": "1.3.0",
|
||||
"vite-svg-loader": "5.1.0",
|
||||
"vitest": "1.0.4",
|
||||
"vue-tsc": "1.8.25",
|
||||
"vitest": "1.1.0",
|
||||
"vue-tsc": "1.8.26",
|
||||
"wait-on": "7.2.0",
|
||||
"workbox-cli": "7.0.0"
|
||||
},
|
||||
|
|
|
@ -124,6 +124,7 @@ function to(n, index) {
|
|||
switch (n.name) {
|
||||
case names.TASK_COMMENT:
|
||||
case names.TASK_ASSIGNED:
|
||||
case names.TASK_REMINDER:
|
||||
to.name = 'task.detail'
|
||||
to.params.id = n.notification.task.id
|
||||
break
|
||||
|
@ -221,7 +222,7 @@ async function markAllRead() {
|
|||
height: .35rem;
|
||||
background: var(--primary);
|
||||
border-radius: 100%;
|
||||
margin-left: .5rem;
|
||||
margin: 0 .5rem;
|
||||
|
||||
&.read {
|
||||
background: transparent;
|
||||
|
|
|
@ -9,6 +9,7 @@ export const NOTIFICATION_NAMES = {
|
|||
'TASK_COMMENT': 'task.comment',
|
||||
'TASK_ASSIGNED': 'task.assigned',
|
||||
'TASK_DELETED': 'task.deleted',
|
||||
'TASK_REMINDER': 'task.reminder',
|
||||
'PROJECT_CREATED': 'project.created',
|
||||
'TEAM_MEMBER_ADDED': 'team.member.added',
|
||||
} as const
|
||||
|
@ -35,6 +36,11 @@ interface NotificationCreated extends Notification {
|
|||
project: IProject
|
||||
}
|
||||
|
||||
interface NotificationTaskReminder extends Notification {
|
||||
task: ITask
|
||||
project: IProject
|
||||
}
|
||||
|
||||
interface NotificationMemberAdded extends Notification {
|
||||
member: IUser
|
||||
team: ITeam
|
||||
|
@ -43,7 +49,7 @@ interface NotificationMemberAdded extends Notification {
|
|||
export interface INotification extends IAbstract {
|
||||
id: number
|
||||
name: string
|
||||
notification: NotificationTask | NotificationAssigned | NotificationDeleted | NotificationCreated | NotificationMemberAdded
|
||||
notification: NotificationTask | NotificationAssigned | NotificationDeleted | NotificationCreated | NotificationMemberAdded | NotificationTaskReminder
|
||||
read: boolean
|
||||
readAt: Date | null
|
||||
|
||||
|
|
|
@ -56,6 +56,12 @@ export default class NotificationModel extends AbstractModel<INotification> impl
|
|||
team: new TeamModel(this.notification.team),
|
||||
}
|
||||
break
|
||||
case NOTIFICATION_NAMES.TASK_REMINDER:
|
||||
this.notification = {
|
||||
task: new TaskModel(this.notification.task),
|
||||
project: new ProjectModel(this.notification.project),
|
||||
}
|
||||
break
|
||||
}
|
||||
|
||||
this.created = new Date(this.created)
|
||||
|
@ -88,6 +94,8 @@ export default class NotificationModel extends AbstractModel<INotification> impl
|
|||
}
|
||||
|
||||
return `added ${who} to the ${this.notification.team.name} team`
|
||||
case NOTIFICATION_NAMES.TASK_REMINDER:
|
||||
return `Reminder for ${this.notification.task.getTextIdentifier()} ${this.notification.task.title} (${this.notification.project.title})`
|
||||
}
|
||||
|
||||
return ''
|
||||
|
|
Reference in New Issue
Block a user