allow moving scheckbuch -> unterstützend + fördernd

This commit is contained in:
2025-05-03 15:09:15 +02:00
parent f374016207
commit 2bb42c3f6a
5 changed files with 287 additions and 41 deletions

View File

@ -6,17 +6,10 @@ use crate::{
use rocket::async_trait;
use sqlx::SqlitePool;
special_user!(RegularUser, +"Donau Linz", -"Unterstützend", -"Förderndes Mitglied");
special_user!(RegularUser, +"Donau Linz");
impl RegularUser {
pub(crate) async fn notify(&self, db: &SqlitePool, smtp_pw: &str) -> Result<(), String> {
self.notify_coxes_about_new_regular(db).await;
self.send_welcome_mail_to_user(db, smtp_pw).await?;
Ok(())
}
async fn send_welcome_mail_to_user(
pub(crate) async fn send_welcome_mail_to_user(
&self,
db: &SqlitePool,
smtp_pw: &str,
@ -56,18 +49,5 @@ ASKÖ Ruderverein Donau Linz", self.name),
Ok(())
}
async fn notify_coxes_about_new_regular(&self, db: &SqlitePool) {
Notification::create_for_steering_people(
db,
&format!(
"Liebe Steuerberechtigte, seit {} gibt es ein neues Mitglied: {}",
self.member_since_date.clone().unwrap(),
self.name
),
"Neues Vereinsmitglied",
None,
None,
)
.await;
}
async fn notify_coxes_about_new_regular(&self, db: &SqlitePool) {}
}