-
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.
Merge pull request #195 from ungdev/dev
Add compression and badge ability
- Loading branch information
Showing
8 changed files
with
135 additions
and
16 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
import { MailGoal } from '.'; | ||
import database from '../../services/database'; | ||
import { EmailAttachement } from '../../types'; | ||
|
||
export const notPaidSSBUGoal: MailGoal = { | ||
collector: () => | ||
database.user.findMany({ | ||
distinct: ['id'], | ||
where: { | ||
AND: [ | ||
{ | ||
OR: [ | ||
{ | ||
cartItems: { | ||
some: { | ||
AND: [ | ||
{ | ||
itemId: { | ||
startsWith: 'ticket-', | ||
}, | ||
forcePaid: false, | ||
}, | ||
{ | ||
cart: { | ||
transactionState: { | ||
not: 'paid', | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
{ | ||
cartItems: { | ||
none: {}, | ||
}, | ||
}, | ||
], | ||
}, | ||
{ | ||
team: { | ||
tournament: { | ||
id: 'ssbu', | ||
}, | ||
}, | ||
}, | ||
{ | ||
team: { | ||
lockedAt: null, | ||
}, | ||
}, | ||
], | ||
}, | ||
}), | ||
sections: [ | ||
{ | ||
title: "Ton inscription n'a pas été confirmée", | ||
components: [ | ||
"L'UTT Arena approche à grand pas, et ton inscription pour le tournoi SSBU n'est pas encore confirmée. Pour verrouiller ta place, il ne te reste plus qu'à la payer en accédant à la boutique sur le site.", | ||
"\nN'oublie pas que tu peux décider de ramener ta propre Nintendo Switch avec SSBU (all DLCs) pour bénéficier d'une *réduction de 3€* sur ta place ! Cela permet également au tournoi de s'enchaîner de façon plus fluide.", | ||
"\nOn se retrouve le 1, 2, 3 décembre dans l'Arène !", | ||
{ | ||
location: 'https://arena.utt.fr/dashboard/team', | ||
name: 'Accéder à arena.utt.fr', | ||
}, | ||
], | ||
}, | ||
], | ||
// eslint-disable-next-line require-await | ||
attachments: async () => [] as EmailAttachement[], | ||
}; |
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