Commit Graph

76 Commits

Author SHA1 Message Date
Hugo Peixoto ec2909df60 Remove debugger lines 2024-03-28 11:39:00 +00:00
Hugo Peixoto 97c69097cd Improve dockerfile 2024-03-28 11:35:38 +00:00
Hugo Peixoto 1c4c93afd2 Add solid-queue 2024-03-28 11:04:46 +00:00
Hugo Peixoto bc1342a10c Upgrade to rails 7.1 2024-03-28 10:06:50 +00:00
Hugo Peixoto 76df4d41b7 Redo notification system
Previously, saucy generated each member's future notification every day
(marked as scheduled). And every day saucy would deliver every unsent
notification scheduled for that day.

This means that each member with expiration date in the future had ~6
notifications scheduled for them in the database.

This was troublesome because if the cron job that delivers notification
was down or the server was down for more than 24h, notifications were
silently skipped and we had no easy way of detecting it: we had to check
every member for missing sent notifications.

It also had the disadvantage that we were deleting and recreating
hundreds of database entries for no good reason.

To fix this, the new system no longer stores future scheduled
notifications. Instead, it now only stores sent notifications and
notifications currently being delivered. Every day, the deliver task
checks every member if there's a notification that needs to be sent in
that day, by checking if we're past the date of sending a particular
notification type and checking if in that window of time no
notifications of that type have been sent.

Let's suppose we send 6 notifications, one per month starting 60 days
before the membership expires until 90 days after:

  -60d   -30d    t=0    30d    60d    90d
    A      B      C      D      E      F

If we're on day t=-60d, we need to deliver a notification of type A. But
first we check if no notifications of type A have been sent to that
member on that day.

From days t=-59d to t=-31d, we check if in the time range t=[-60d, -31d]
any notification of type A was sent to that member. If not, we need to
deliver it.

If we're on days t=[-30d, -1d], we do the same but for notification of
type B.
2024-03-23 15:31:32 +00:00
Hugo Peixoto 336550fcbb bundle update 2024-03-22 23:39:06 +00:00
Hugo Peixoto 333b7c02aa Implement button to remind members to pay their initial dues 2024-03-22 23:34:34 +00:00
Hugo Peixoto 931310657a Implement multibanco detection 2024-03-21 14:52:59 +00:00
Hugo Peixoto c7a5f2a8e0 Fix ifthenpay callback 2024-02-01 09:16:02 +00:00
Hugo Peixoto 4eb6d2de05 Fix notifications#index when member is nil 2024-02-01 09:13:44 +00:00
Hugo Peixoto b55142d9b8 Bump gems 2023-12-29 13:34:39 +00:00
Hugo Peixoto f69e3ff01a Allow customizing whethere the cookie is secure or not 2023-11-13 09:08:12 +00:00
Hugo Peixoto 5c35572d29 Allow smtp port to be customizable via SMTP_PORT 2023-11-13 08:48:28 +00:00
Hugo Peixoto 066bf32e0c Fix sorting in members/index 2023-09-24 11:28:58 +01:00
Hugo Peixoto d6bd26c76f Fix missing ifthenpaylink bug
If you added a member and they clicked on the payment link within 5
minutes, there was a possibility that the ifthenpay link hadn't been
generated yet.

This fixes that bug by generating the ifthenpay links on member
2023-09-20 14:20:18 +01:00
Hugo Peixoto dcc6d1a991 Improve branding mechanisms 2023-09-20 14:19:35 +01:00
Hugo Peixoto dccad36474 Add payment confirmation notifications 2023-08-07 13:50:50 +01:00
Hugo Peixoto d3f6db5196 Adapta página de pagamento de acordo com estado de inscrição 2023-07-27 09:06:07 +01:00
Hugo Peixoto 9058ed98f7 Adds payment page
Instead of sending all the payment details by email, we're now sending
only a link to a page on this platform. This is to help reduce questions
of whether the emails are from scammers or real.
2023-07-12 19:13:08 +01:00
Hugo Peixoto 8b4e0c9d62 Comment out incoming feature 2023-07-11 18:53:52 +01:00
Hugo Peixoto 5a35a72ac4 Fix member creation when database is empty 2023-07-11 18:50:51 +01:00
Hugo Peixoto ae4a3c62e4 Add initial setup step if the database is empty 2023-07-11 00:36:05 +01:00
Hugo Peixoto f3a1def396 Fixes ransack upgrade to 4.0 2023-04-19 22:52:31 +01:00
Hugo Peixoto e178f94ff7 Remove mandatory fields 2023-04-19 22:48:35 +01:00
Hugo Peixoto 3fa1ac101c Try to address the concurrency problem 2023-04-05 23:04:48 +01:00
Hugo Peixoto eb8f60192f Add clearance pt locales 2023-03-31 16:49:39 +01:00
Hugo Peixoto ca81e4813a Add query params to members#new 2023-03-31 02:35:11 +01:00
Hugo Peixoto c00f7743b0 Bundle update 2023-03-31 02:25:48 +01:00
Hugo Peixoto ee0dc75889 Add legal name and pronouns to members 2023-03-31 02:24:16 +01:00
Hugo Peixoto f956a65100 Adds dues to navigation and fixes amount calculation 2023-03-23 18:15:45 +00:00
Hugo Peixoto b4dda05575 Add page listing due contributions 2023-03-23 18:08:30 +00:00
Hugo Peixoto 1f8a04ec5a Show member number even when excluded 2023-03-19 18:56:26 +00:00
Hugo Peixoto 318b7878d8 Add contributions CSV export 2023-03-19 17:49:31 +00:00
Hugo Peixoto a1be74ed2d Sort member contributions by payment date 2023-03-19 15:38:19 +00:00
Hugo Peixoto c45beb877e Support forgotten members in contributions list 2023-03-19 15:24:56 +00:00
Hugo Peixoto cd43a5c382 Adds contributions list page 2023-03-19 15:15:56 +00:00
Hugo Peixoto a106bc0357 Support notifications for deleted users 2023-03-17 16:03:01 +00:00
Hugo Peixoto e9318b23d8 Small UI improvements
- Don't show dead ifthenpay link if there isn't one
- Remove actions from members#index in favor of members#show
- Display result count in members#index
- Increase table width in members#index
2023-02-26 13:03:36 +00:00
Hugo Peixoto bdf0d1d22a Add register contribution link to members#show 2023-01-25 14:33:08 +00:00
Hugo Peixoto 9b91ae8df7 Display notification sent date 2023-01-25 14:01:24 +00:00
Hugo Peixoto da34afc882 Parameterize Member#regenerate_notifications 2023-01-24 23:06:12 +00:00
Hugo Peixoto b3bc4bc411 Avoid sending duplicate notifications 2023-01-24 18:26:10 +00:00
Hugo Peixoto f30859f991 Fix 60 days warning which was scheduled for 90 days instead 2022-10-18 11:29:15 +01:00
Hugo Peixoto d8befb0ea3 Show member in sent notifications list 2022-10-06 15:53:27 +01:00
Hugo Peixoto abaf80e5c4 Add notification index page 2022-10-06 15:50:38 +01:00
Hugo Peixoto e0f76c7aba Show earlier notifications first 2022-10-06 15:17:57 +01:00
Hugo Peixoto 160c389981 Fix register member and contribution bugs 2022-10-06 15:05:30 +01:00
Hugo Peixoto 90541319f3 Add ifthenpay links to members/show 2022-10-02 13:48:06 +01:00
Hugo Peixoto 1a3ecad1eb Add default bcc 2022-10-02 13:05:37 +01:00
Hugo Peixoto 5182d99198 Precompile assets in entrypoint 2022-09-29 18:41:22 +01:00