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

@@ -0,0 +1,31 @@
use super::User;
use crate::{
model::{mail::Mail, notification::Notification},
special_user,
};
use rocket::async_trait;
use sqlx::SqlitePool;
special_user!(UnterstuetzendUser, +"Unterstützend");
impl UnterstuetzendUser {
pub(crate) async fn notify(&self, db: &SqlitePool, smtp_pw: &str) -> Result<(), String> {
self.notify_coxes_about_new_unterstuetzend(db).await;
Ok(())
}
async fn notify_vorstand_about_new_unterstuetzend(&self, db: &SqlitePool) {
Notification::create_for_steering_people(
db,
&format!(
"Lieber Vorstand, es gibt ein neues unterstützendes Mitglied: {}",
self.name
),
"Neues unterstützendes Vereinsmitglied",
None,
None,
)
.await;
}
}