From 4fd6f8ac4393dfba5024e40635f937b9af225077 Mon Sep 17 00:00:00 2001 From: Aziz FADIL Date: Thu, 12 Sep 2024 16:59:13 -0400 Subject: [PATCH] fix dividends form validation --- README.md | 56 +++++++++++---------------------------- package.json | 2 +- src-tauri/Cargo.lock | 2 +- src-tauri/Cargo.toml | 2 +- src-tauri/tauri.conf.json | 2 +- src/lib/schemas.ts | 4 +-- 6 files changed, 21 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index 61701e4..cafcd1d 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@
Website · - Discord + Discord · Twitter · @@ -108,46 +108,20 @@ Ensure you have the following installed on your machine: ``` wealthfolio/ -├── .github/ -│ └── workflows/ -│ └── release.yml -├── public/ -├── src/ -│ ├── assets/ -│ ├── commands/ -│ ├── components/ -│ ├── lib/ -│ ├── pages/ -│ ├── App.tsx -│ ├── main.tsx -│ ├── routes.tsx -│ ├── styles.css -│ ├── useGlobalEventListener.ts -│ └── vite-env.d.ts -├── src-tauri/ -│ ├── icons/ -│ ├── migrations/ -│ ├── src/ -│ ├── target/ -│ ├── .gitignore -│ ├── build.rs -│ ├── Cargo.lock -│ ├── Cargo.toml -│ ├── diesel.toml -│ ├── tauri.conf.json -├── .env -├── .eslintrc.cjs -├── .gitignore -├── .prettierrc.cjs -├── components.json -├── index.html -├── package.json -├── pnpm-lock.yaml -├── postcss.config.js -├── README.md -├── tailwind.config.js -├── tsconfig.json -└── vite.config.ts +├── src/ # Main source code for the React application +├── src-core/ # Core backend functionality +├── src-tauri/ # Tauri-specific code for desktop app functionality +├── public/ # Public assets +├── LICENSE # License file +├── README.md # Project documentation +├── ROADMAP.md # Future plans and roadmap +├── components.json # Component configuration +├── package.json # Node.js dependencies and scripts +├── pnpm-lock.yaml # Lock file for pnpm +├── postcss.config.js # PostCSS configuration +├── tailwind.config.js # Tailwind CSS configuration +├── tsconfig.json # TypeScript configuration +└── vite.config.ts # Vite build tool configuration ``` ## Contributing diff --git a/package.json b/package.json index 9e22832..02f1c21 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "wealthfolio-app", "private": true, - "version": "1.0.12", + "version": "1.0.13", "type": "module", "scripts": { "dev": "vite", diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index a96696e..0b16659 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -4414,7 +4414,7 @@ dependencies = [ [[package]] name = "wealthfolio-app" -version = "1.0.12" +version = "1.0.13" dependencies = [ "dotenvy", "tauri", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 58e5f22..340a567 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wealthfolio-app" -version = "1.0.12" +version = "1.0.13" description = "Portfolio tracker" authors = ["Aziz Fadil"] license = "LGPL-3.0" diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 02a4a1c..3666542 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "Wealthfolio", - "version": "1.0.12" + "version": "1.0.13" }, "tauri": { "allowlist": { diff --git a/src/lib/schemas.ts b/src/lib/schemas.ts index e16b507..263a08a 100644 --- a/src/lib/schemas.ts +++ b/src/lib/schemas.ts @@ -77,8 +77,8 @@ export const newActivitySchema = z.object({ unitPrice: z.coerce .number({ required_error: 'Please enter a valid price.', - invalid_type_error: 'Price must be a positive number.', + invalid_type_error: 'Price must be a non-negative number.', }) - .positive({ message: 'Price must be a positive number.' }), + .min(0, { message: 'Price must be a non-negative number.' }), comment: z.string().optional(), });