Merged in fix/revert-filtering-of-rewardnights (pull request #477)

fix: revert back filtering of reward nights with operaId ORS

Approved-by: Michael Zetterberg
This commit is contained in:
Tobias Johansson
2024-08-23 11:01:57 +00:00
committed by Michael Zetterberg

View File

@@ -585,17 +585,7 @@ export const userQueryRouter = router({
)
const pageData = updatedData
.filter((t) => {
if (
t.type === RewardTransactionTypes.rewardNight &&
t.attributes.hotelOperaId === "ORS"
) {
return false
}
if (t.type === RewardTransactionTypes.expired) return false
return true
})
.filter((t) => t.type !== RewardTransactionTypes.expired)
.sort((a, b) => {
// 'BALFWD' are transactions from Opera migration that happended in May 2021
if (a.attributes.confirmationNumber === "BALFWD") return 1