add mail for requesting fee
Some checks failed
CI/CD Pipeline / deploy-staging (push) Blocked by required conditions
CI/CD Pipeline / deploy-main (push) Blocked by required conditions
CI/CD Pipeline / test (push) Has been cancelled

This commit is contained in:
2024-03-15 11:41:03 +01:00
parent 413d08f538
commit c9d10f81a9
3 changed files with 128 additions and 2 deletions

View File

@ -25,7 +25,7 @@ const REGULAR: i32 = 22000;
const UNTERSTUETZEND: i32 = 2500;
const FOERDERND: i32 = 8500;
#[derive(FromRow, Debug, Serialize, Deserialize)]
#[derive(FromRow, Debug, Serialize, Deserialize, Clone)]
pub struct User {
pub id: i64,
pub name: String,
@ -106,6 +106,7 @@ pub struct Fee {
pub name: String,
pub user_ids: String,
pub paid: bool,
pub users: Vec<User>,
}
impl Default for Fee {
@ -121,6 +122,7 @@ impl Fee {
name: "".into(),
parts: Vec::new(),
user_ids: "".into(),
users: Vec::new(),
paid: false,
}
}
@ -139,6 +141,7 @@ impl Fee {
self.name.push_str(&user.name);
self.user_ids.push_str(&format!("user_ids[]={}", user.id));
self.users.push(user.clone());
}
pub fn paid(&mut self) {