Skip to content

Commit e783692

Browse files
Chilllnuubulb
andauthored
feat: enhance public notes functionality with flexible options (#141)
* feat: enhance public notes functionality with flexible options - Make public notes optional to prevent default values causing frontend issues - Add dual editing modes: raw text editing and custom fields (avoid hardcoded schema) - Set raw text mode as default, populate input on edit, submit raw text content always - Add toggle switch: submit raw text when enabled, submit empty & hide controls when disabled - New records default to disabled public notes; auto-expand on edit based on content * chore: auto-fix linting and formatting issues * feat: Add public annotation data structure and utility functions Implemented Zod validation patterns, default values, parsing functions, and utility functions for public notes, and updated related internationalization text. * chore: auto-fix linting and formatting issues * refactor(server): Replace i18n implementation Replace direct use of i18n.t with react-i18next's useTranslation hook to improve internationalization support. * refactor(public-note): Optimize data model and validation logic Removed the pruneEmpty function and simplified the date processing logic, making billingDataMod and planDataMod optional fields. Also optimized the validation logic to handle optional fields. * chore: auto-fix linting and formatting issues * fix zod validation & don't write empty values when parsing * use raw mode if object contains unknown fields * rename some features * chore: Update dependency package versions Upgrade multiple npm dependencies to their latest versions, including react, tailwindcss, and eslint. Ignore lock files. * fix(server): Fix default value when bill amount is undefined Changed undefined values ​​for bill amount to the default value "0" to avoid potential null value errors. --------- Co-authored-by: Guccen <[email protected]> Co-authored-by: uubulb <[email protected]>
1 parent ec6511b commit e783692

36 files changed

+1079
-843
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ dist-ssr
2222
*.njsproj
2323
*.sln
2424
*.sw?
25+
bun.lock
26+
pnpm-lock.yaml

package.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"@radix-ui/react-slot": "^1.2.3",
2929
"@radix-ui/react-switch": "^1.2.6",
3030
"@radix-ui/react-tabs": "^1.1.13",
31-
"@tailwindcss/postcss": "^4.1.13",
31+
"@tailwindcss/postcss": "^4.1.14",
3232
"@tanstack/react-table": "^8.21.3",
3333
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
3434
"@types/luxon": "^3.7.1",
@@ -41,44 +41,44 @@
4141
"copy-to-clipboard": "^3.3.3",
4242
"date-fns": "^4.1.0",
4343
"framer-motion": "^12.23.22",
44-
"i18next": "^25.5.2",
44+
"i18next": "^25.5.3",
4545
"i18next-browser-languagedetector": "^8.2.0",
4646
"jotai-zustand": "^0.6.0",
47-
"lucide-react": "^0.544.0",
47+
"lucide-react": "^0.545.0",
4848
"luxon": "^3.7.2",
4949
"next-themes": "^0.4.6",
5050
"prettier-plugin-tailwindcss": "^0.6.14",
51-
"react": "^19.1.1",
52-
"react-day-picker": "^9.11.0",
53-
"react-dom": "^19.1.1",
54-
"react-hook-form": "^7.63.0",
51+
"react": "^19.2.0",
52+
"react-day-picker": "^9.11.1",
53+
"react-dom": "^19.2.0",
54+
"react-hook-form": "^7.64.0",
5555
"react-i18next": "^16.0.0",
56-
"react-router-dom": "^7.9.3",
56+
"react-router-dom": "^7.9.4",
5757
"react-virtuoso": "^4.14.1",
5858
"sonner": "^2.0.7",
5959
"swr": "^2.3.6",
6060
"tailwind-merge": "^3.3.1",
6161
"tailwindcss-animate": "^1.0.7",
6262
"vaul": "^1.1.2",
63-
"zod": "^4.1.11",
63+
"zod": "^4.1.12",
6464
"zustand": "^5.0.8"
6565
},
6666
"devDependencies": {
67-
"@eslint/js": "^9.36.0",
68-
"@types/node": "^24.5.2",
69-
"@types/react": "^19.1.15",
70-
"@types/react-dom": "^19.1.9",
67+
"@eslint/js": "^9.37.0",
68+
"@types/node": "^24.7.0",
69+
"@types/react": "^19.2.2",
70+
"@types/react-dom": "^19.2.1",
7171
"@vitejs/plugin-react": "^5.0.4",
7272
"autoprefixer": "^10.4.21",
73-
"eslint": "^9.36.0",
74-
"eslint-plugin-react-hooks": "^5.2.0",
75-
"eslint-plugin-react-refresh": "^0.4.22",
73+
"eslint": "^9.37.0",
74+
"eslint-plugin-react-hooks": "^7.0.0",
75+
"eslint-plugin-react-refresh": "^0.4.23",
7676
"globals": "^16.4.0",
7777
"postcss": "^8.5.6",
78-
"swagger-typescript-api": "^13.2.13",
79-
"tailwindcss": "^4.1.13",
80-
"typescript": "~5.9.2",
81-
"typescript-eslint": "^8.44.1",
82-
"vite": "^7.1.7"
78+
"swagger-typescript-api": "^13.2.15",
79+
"tailwindcss": "^4.1.14",
80+
"typescript": "~5.9.3",
81+
"typescript-eslint": "^8.46.0",
82+
"vite": "^7.1.9"
8383
}
8484
}

0 commit comments

Comments
 (0)