7 Commits

Author SHA1 Message Date
arrelin
5b4ff98cc5 try to do better 2026-03-06 15:09:49 +03:00
50f5610459 Merge pull request 'try to do better' (#29) from feature/new-deploy into master
All checks were successful
Build and Publish Images / build-and-push (push) Successful in 8s
Reviewed-on: http://192.168.31.100:3847/Arrelin/family_budget/pulls/29
2026-02-24 13:18:40 +03:00
arrelin
67f72e05a1 try to do better 2026-02-24 13:18:25 +03:00
7e5d5332df Merge pull request 'try to do better' (#28) from feature/new-deploy into master
All checks were successful
Build and Publish Images / build-and-push (push) Successful in 6s
Reviewed-on: http://192.168.31.100:3847/Arrelin/family_budget/pulls/28
2026-02-24 13:10:01 +03:00
arrelin
7dc0ebf3c1 try to do better 2026-02-24 13:09:49 +03:00
f48abe37ea Merge pull request 'try to do better' (#27) from feature/new-deploy into master
All checks were successful
Build and Publish Images / build-and-push (push) Successful in 6s
Reviewed-on: http://192.168.31.100:3847/Arrelin/family_budget/pulls/27
2026-02-24 13:07:20 +03:00
arrelin
e9a588e479 try to do better 2026-02-24 13:07:08 +03:00
3 changed files with 6 additions and 3 deletions

View File

@@ -31,6 +31,8 @@ jobs:
run: docker logout 192.168.31.100:3847
- name: Trigger Coolify redeploy
run: curl -s "http://192.168.31.100:8000/api/v1/deploy?uuid=msoc4skogk44ckc84wokocw0&force=false"
run: |
curl -s -H "Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}" \
"http://192.168.31.100:8000/api/v1/deploy?uuid=msoc4skogk44ckc84wokocw0&force=true"

View File

@@ -1,7 +1,7 @@
use family_budget::*;
use sea_orm::DbErr;
use sea_orm_migration::prelude::*;
//TODO: НЕУДОБНОЕ РАСПОЛОЖЕНИЕ ДОБАВИТЬ РАСХОД + ИСТОРИЯ, ВОЗВРАЩАЕТ В НАЧАЛО ПОСЛЕ ДОБАВЛЕНИЯ РАСХОДА + ЗАКРЫВАЕТ ДОБАВИТЬ РАСХОД, ИСТОРИЯ НЕ ОБНОВЛЯЕТСЯ
#[tokio::main]
async fn main() -> Result<(), DbErr> {
let db = establish_connection().await?;

View File

@@ -150,11 +150,12 @@ impl ExpenseService {
let mut result: Vec<MonthlyExpenseGroup> = grouped
.into_iter()
.map(|((year, month), expenses)| {
.map(|((year, month), mut expenses)| {
let total_amount: Decimal = expenses
.iter()
.map(|e| e.amount)
.sum();
expenses.sort_by(|a, b| b.created_at.cmp(&a.created_at));
MonthlyExpenseGroup {
year,
month,