-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(merge): merge develop into main
- Loading branch information
Showing
18 changed files
with
383 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
database/migrations/20240921091411-notiications for when there is a comment.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
'use strict'; | ||
|
||
/** @type {import('sequelize-cli').Migration} */ | ||
module.exports = { | ||
up: async (queryInterface, sequelize) => { | ||
return queryInterface.sequelize.transaction(async (t) => { | ||
try { | ||
await queryInterface.addColumn( | ||
{ | ||
tableName: 'Settings', | ||
schema: 'personal', | ||
}, | ||
'encounterHasCommentNotification', | ||
{ | ||
type: sequelize.DataTypes.INTEGER, | ||
allowNull: false, | ||
defaultValue: 2, | ||
}, | ||
{ transaction: t }, | ||
); | ||
|
||
await queryInterface.addColumn( | ||
{ | ||
tableName: 'EventCompetitions', | ||
schema: 'event', | ||
}, | ||
'contactId', | ||
{ | ||
type: sequelize.DataTypes.UUID, | ||
allowNull: true, | ||
references: { | ||
model: { | ||
tableName: 'Players', | ||
schema: 'public', | ||
}, | ||
key: 'id', | ||
}, | ||
}, | ||
{ transaction: t }, | ||
); | ||
|
||
|
||
} catch (err) { | ||
console.error('We errored with', err?.message ?? err); | ||
t.rollback(); | ||
} | ||
}); | ||
}, | ||
|
||
down: async (queryInterface) => { | ||
return queryInterface.sequelize.transaction(async (t) => { | ||
try { | ||
await queryInterface.removeColumn( | ||
{ | ||
tableName: 'Settings', | ||
schema: 'personal', | ||
}, | ||
'encounterHasCommentNotification', | ||
{ transaction: t }, | ||
); | ||
|
||
await queryInterface.removeColumn( | ||
{ | ||
tableName: 'EventCompetitions', | ||
schema: 'event', | ||
}, | ||
'contactId', | ||
{ transaction: t }, | ||
); | ||
} catch (err) { | ||
console.error('We errored with', err); | ||
t.rollback(); | ||
} | ||
}); | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
libs/backend/mailing/src/compile/templates/hasComment/html.pug
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
extends ../../layouts/layout.pug | ||
|
||
block title | ||
h1.text-center | ||
| Ontmoeting heeft een opmerking | ||
|
||
block content | ||
p.text-center | ||
p | ||
| Beste #{ contact }, | ||
br | ||
br | ||
| | ||
| De ontmoeting | ||
strong #{ encounter.home.name } | ||
| tegen | ||
strong #{ encounter.away.name } | ||
| op | ||
strong #{ date } | ||
| heeft een opmerking. | ||
br | ||
p | ||
a(href=`${url}`) | ||
| Ga naar ontmoeting | ||
p | ||
| Met sportieve groeten, | ||
br | ||
| | ||
| Badman |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,11 +26,4 @@ block content | |
| Met sportieve groeten, | ||
br | ||
| | ||
| Badman | ||
p | ||
| Disclaimer: | ||
br | ||
small | ||
| | ||
| Deze notificatie is nog in beta. Mocht je vragen of opmerkingen hebben, laat het ons weten via | ||
a(href="mailto:[email protected]") badmintonvlaanderen | ||
| Badman |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,11 +11,11 @@ block content | |
br | ||
br | ||
| | ||
| De ontmoeting | ||
| De ontmoeting | ||
strong #{ encounter.home.name } | ||
| tegen | ||
| tegen | ||
strong #{ encounter.away.name } | ||
| op | ||
| op | ||
strong #{ date } | ||
| is nog niet ingevuld. | ||
br | ||
|
@@ -27,9 +27,3 @@ block content | |
br | ||
| | ||
| Badman | ||
p | ||
| Disclaimer: | ||
br | ||
| | ||
| Deze notificatie is nog in beta. Mocht je vragen of opmerkingen hebben, laat het ons weten via | ||
a(href="mailto:[email protected]") badmintonvlaanderen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,11 +26,4 @@ block content | |
| Met sportieve groeten, | ||
br | ||
| | ||
| Badman | ||
p | ||
| Disclaimer: | ||
br | ||
small | ||
| | ||
| Deze notificatie is nog in beta. Mocht je vragen of opmerkingen hebben, laat het ons weten via | ||
a(href="mailto:[email protected]") badmintonvlaanderen | ||
| Badman |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,11 +29,4 @@ block content | |
| Met sportieve groeten, | ||
br | ||
| | ||
| Badman | ||
p | ||
| Disclaimer: | ||
br | ||
small | ||
| | ||
| Deze notificatie is nog in beta. Mocht je vragen of opmerkingen hebben, laat het ons weten via | ||
a(href="mailto:[email protected]") badmintonvlaanderen | ||
| Badman |
Oops, something went wrong.