Compare commits

...

3 Commits

Author SHA1 Message Date
9ce77897d8
build: bump the crate dependencies (#82) 2025-01-03 08:49:46 +00:00
bf4afb03e6
refactor: replace a deprecated function
All checks were successful
actionlint check / actionlint check (pull_request) Successful in 5s
checkov check / checkov check (pull_request) Successful in 53s
conventional commit messages check / conventional commit messages check (pull_request) Successful in 5s
conventional pull request title check / conventional pull request title check (pull_request) Successful in 2s
dotenv-linter check / dotenv-linter check (pull_request) Successful in 5s
GitLeaks check / GitLeaks check (pull_request) Successful in 8s
hadolint check / hadolint check (pull_request) Successful in 8s
htmlhint check / htmlhint check (pull_request) Successful in 9s
markdownlint check / markdownlint check (pull_request) Successful in 10s
Prettier check / Prettier check (pull_request) Successful in 11s
Rust check / Rust check (pull_request) Successful in 14m55s
ShellCheck check / ShellCheck check (pull_request) Successful in 16s
Stylelint check / Stylelint check (pull_request) Successful in 12s
yamllint check / yamllint check (pull_request) Successful in 14s
2025-01-02 17:27:10 +01:00
f134e6d4c3
build: bump the crate dependencies
Some checks failed
actionlint check / actionlint check (pull_request) Successful in 6s
checkov check / checkov check (pull_request) Successful in 1m3s
conventional commit messages check / conventional commit messages check (pull_request) Successful in 5s
conventional pull request title check / conventional pull request title check (pull_request) Successful in 2s
dotenv-linter check / dotenv-linter check (pull_request) Successful in 5s
GitLeaks check / GitLeaks check (pull_request) Successful in 7s
hadolint check / hadolint check (pull_request) Successful in 8s
htmlhint check / htmlhint check (pull_request) Successful in 11s
markdownlint check / markdownlint check (pull_request) Successful in 12s
Prettier check / Prettier check (pull_request) Successful in 11s
Rust check / Rust check (pull_request) Failing after 7m8s
ShellCheck check / ShellCheck check (pull_request) Successful in 14s
Stylelint check / Stylelint check (pull_request) Successful in 11s
yamllint check / yamllint check (pull_request) Successful in 14s
2025-01-02 16:37:47 +01:00
3 changed files with 226 additions and 335 deletions

530
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -7,22 +7,22 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
chrono = { version = "0.4.38", features = ["serde", "unstable-locales"] }
dioxus = { version = "0.6.0", features = ["fullstack", "router"] }
feruca = { version = "0.10.0" }
serde = { version = "1.0.208" }
serde_json = { version = "1.0.125" }
serde_with = { version = "3.9.0", features = ["chrono_0_4"] }
tracing = "0.1.40"
chrono = { version = "0.4.39", features = ["serde", "unstable-locales"] }
dioxus = { version = "0.6.1", features = ["fullstack", "router"] }
feruca = { version = "0.10.1" }
serde = { version = "1.0.217" }
serde_json = { version = "1.0.134" }
serde_with = { version = "3.12.0", features = ["chrono_0_4"] }
tracing = "0.1.41"
unic-langid-impl = { version = "0.9.5", features = ["serde"] }
validator = { version = "0.19.0", features = ["derive"] }
diesel = { version = "2.2.2", features = ["chrono", "postgres", "postgres_backend", "serde_json"], optional = true }
diesel = { version = "2.2.6", features = ["chrono", "postgres", "postgres_backend", "serde_json"], optional = true }
diesel_migrations = { version = "2.2.0", features = ["postgres"], optional = true }
dotenvy = { version = "0.15.7", optional = true }
time = { version = "0.3.36", optional = true }
time = { version = "0.3.37", optional = true }
async-std = { version = "1.12.0", optional = true }
async-std = { version = "1.13.0", optional = true }
dioxus-i18n = { version = "0.3.0", optional = true }
dioxus-query = { version = "0.6.0", optional = true }
voca_rs = { version = "1.15.2", optional = true }

View File

@ -19,7 +19,7 @@ use diesel::prelude::*;
use diesel::{ExpressionMethods, OptionalExtension, QueryDsl, RunQueryDsl, SelectableHelper};
use dioxus::prelude::*;
#[cfg(feature = "server")]
use time::util::days_in_year_month;
use time::Month;
#[cfg(feature = "server")]
use validator::Validate;
@ -178,10 +178,11 @@ pub(crate) async fn complete_task(task_id: i32) -> Result<Task, ServerFnError<Er
*date = NaiveDate::from_ymd_opt(
date.year(),
date.month(),
reoccurrence.start_date().day().min(days_in_year_month(
date.year(),
(date.month() as u8).try_into().unwrap(),
) as u32),
reoccurrence.start_date().day().min(
Month::try_from(date.month() as u8)
.unwrap()
.length(date.year()) as u32,
),
)
.unwrap()
}