diff --git a/package-lock.json b/package-lock.json index cc5357f3..cd675dd6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,11 +11,9 @@ "@base-ui-components/react": "1.0.0-beta.6", "@hookform/resolvers": "5.0.1", "@radix-ui/react-checkbox": "1.2.2", - "@radix-ui/react-dialog": "1.1.14", "@radix-ui/react-dropdown-menu": "2.1.15", "@radix-ui/react-popover": "1.1.14", "@radix-ui/react-radio-group": "1.3.6", - "@radix-ui/react-select": "2.2.2", "@radix-ui/react-slot": "1.2.0", "@tanstack/react-query": "5.83.0", "class-variance-authority": "0.7.1", @@ -2499,38 +2497,11 @@ "url": "https://opencollective.com/unts" } }, - "node_modules/@radix-ui/number": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@radix-ui/number/-/number-1.1.1.tgz", - "integrity": "sha512-MkKCwxlXTgz6CFoJx3pCwn07GKp36+aZyu/u2Ln2VrA5DcdyCZkASEDBTd8x5whTQQL5CiYf4prXKLcgQdv29g==" - }, "node_modules/@radix-ui/primitive": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@radix-ui/primitive/-/primitive-1.1.2.tgz", "integrity": "sha512-XnbHrrprsNqZKQhStrSwgRUQzoCI1glLzdw79xiZPoofhGICeZRSQ3dIxAKH1gb3OHfNf4d6f+vAv3kil2eggA==" }, - "node_modules/@radix-ui/react-arrow": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-arrow/-/react-arrow-1.1.4.tgz", - "integrity": "sha512-qz+fxrqgNxG0dYew5l7qR3c7wdgRu1XVUHGnGYX7rg5HM4p9SWaRmJwfgR3J0SgyUKayLmzQIun+N6rWRgiRKw==", - "dependencies": { - "@radix-ui/react-primitive": "2.1.0" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, "node_modules/@radix-ui/react-checkbox": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/@radix-ui/react-checkbox/-/react-checkbox-1.2.2.tgz", @@ -2560,31 +2531,6 @@ } } }, - "node_modules/@radix-ui/react-collection": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-collection/-/react-collection-1.1.4.tgz", - "integrity": "sha512-cv4vSf7HttqXilDnAnvINd53OTl1/bjUYVZrkFnA7nwmY9Ob2POUy0WY0sfqBAe1s5FyKsyceQlqiEGPYNTadg==", - "dependencies": { - "@radix-ui/react-compose-refs": "1.1.2", - "@radix-ui/react-context": "1.1.2", - "@radix-ui/react-primitive": "2.1.0", - "@radix-ui/react-slot": "1.2.0" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, "node_modules/@radix-ui/react-compose-refs": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@radix-ui/react-compose-refs/-/react-compose-refs-1.1.2.tgz", @@ -2613,177 +2559,6 @@ } } }, - "node_modules/@radix-ui/react-dialog": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/@radix-ui/react-dialog/-/react-dialog-1.1.14.tgz", - "integrity": "sha512-+CpweKjqpzTmwRwcYECQcNYbI8V9VSQt0SNFKeEBLgfucbsLssU6Ppq7wUdNXEGb573bMjFhVjKVll8rmV6zMw==", - "license": "MIT", - "dependencies": { - "@radix-ui/primitive": "1.1.2", - "@radix-ui/react-compose-refs": "1.1.2", - "@radix-ui/react-context": "1.1.2", - "@radix-ui/react-dismissable-layer": "1.1.10", - "@radix-ui/react-focus-guards": "1.1.2", - "@radix-ui/react-focus-scope": "1.1.7", - "@radix-ui/react-id": "1.1.1", - "@radix-ui/react-portal": "1.1.9", - "@radix-ui/react-presence": "1.1.4", - "@radix-ui/react-primitive": "2.1.3", - "@radix-ui/react-slot": "1.2.3", - "@radix-ui/react-use-controllable-state": "1.2.2", - "aria-hidden": "^1.2.4", - "react-remove-scroll": "^2.6.3" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.10.tgz", - "integrity": "sha512-IM1zzRV4W3HtVgftdQiiOmA0AdJlCtMLe00FXaHwgt3rAnNsIyDqshvkIW3hj/iu5hu8ERP7KIYki6NkqDxAwQ==", - "dependencies": { - "@radix-ui/primitive": "1.1.2", - "@radix-ui/react-compose-refs": "1.1.2", - "@radix-ui/react-primitive": "2.1.3", - "@radix-ui/react-use-callback-ref": "1.1.1", - "@radix-ui/react-use-escape-keydown": "1.1.1" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.7.tgz", - "integrity": "sha512-t2ODlkXBQyn7jkl6TNaw/MtVEVvIGelJDCG41Okq/KwUsJBwQ4XVZsHAVUkK4mBv3ewiAS3PGuUWuY2BoK4ZUw==", - "dependencies": { - "@radix-ui/react-compose-refs": "1.1.2", - "@radix-ui/react-primitive": "2.1.3", - "@radix-ui/react-use-callback-ref": "1.1.1" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.9.tgz", - "integrity": "sha512-bpIxvq03if6UNwXZ+HTK71JLh4APvnXntDc6XOX8UVq4XQOVl7lwok0AvIl+b8zgCw3fSaVTZMpAPPagXbKmHQ==", - "dependencies": { - "@radix-ui/react-primitive": "2.1.3", - "@radix-ui/react-use-layout-effect": "1.1.1" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.4.tgz", - "integrity": "sha512-ueDqRbdc4/bkaQT3GIpLQssRlFgWaL/U2z/S31qRwwLWoxHLgry3SIfCwhxeQNbirEUXFa+lq3RL3oBYXtcmIA==", - "dependencies": { - "@radix-ui/react-compose-refs": "1.1.2", - "@radix-ui/react-use-layout-effect": "1.1.1" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-primitive/-/react-primitive-2.1.3.tgz", - "integrity": "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ==", - "dependencies": { - "@radix-ui/react-slot": "1.2.3" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.3.tgz", - "integrity": "sha512-aeNmHnBxbi2St0au6VBVC7JXFlhLlOnvIIlePNniyUNAClzmtAUEY8/pBiK3iHjufOlwA+c20/8jngo7xcrg8A==", - "dependencies": { - "@radix-ui/react-compose-refs": "1.1.2" - }, - "peerDependencies": { - "@types/react": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - } - } - }, "node_modules/@radix-ui/react-direction": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@radix-ui/react-direction/-/react-direction-1.1.1.tgz", @@ -2798,32 +2573,6 @@ } } }, - "node_modules/@radix-ui/react-dismissable-layer": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/@radix-ui/react-dismissable-layer/-/react-dismissable-layer-1.1.7.tgz", - "integrity": "sha512-j5+WBUdhccJsmH5/H0K6RncjDtoALSEr6jbkaZu+bjw6hOPOhHycr6vEUujl+HBK8kjUfWcoCJXxP6e4lUlMZw==", - "dependencies": { - "@radix-ui/primitive": "1.1.2", - "@radix-ui/react-compose-refs": "1.1.2", - "@radix-ui/react-primitive": "2.1.0", - "@radix-ui/react-use-callback-ref": "1.1.1", - "@radix-ui/react-use-escape-keydown": "1.1.1" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, "node_modules/@radix-ui/react-dropdown-menu": { "version": "2.1.15", "resolved": "https://registry.npmjs.org/@radix-ui/react-dropdown-menu/-/react-dropdown-menu-2.1.15.tgz", @@ -2908,30 +2657,6 @@ } } }, - "node_modules/@radix-ui/react-focus-scope": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-focus-scope/-/react-focus-scope-1.1.4.tgz", - "integrity": "sha512-r2annK27lIW5w9Ho5NyQgqs0MmgZSTIKXWpVCJaLC1q2kZrZkcqnmHkCHMEmv8XLvsLlurKMPT+kbKkRkm/xVA==", - "dependencies": { - "@radix-ui/react-compose-refs": "1.1.2", - "@radix-ui/react-primitive": "2.1.0", - "@radix-ui/react-use-callback-ref": "1.1.1" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, "node_modules/@radix-ui/react-id": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@radix-ui/react-id/-/react-id-1.1.1.tgz", @@ -3466,60 +3191,6 @@ } } }, - "node_modules/@radix-ui/react-popper": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@radix-ui/react-popper/-/react-popper-1.2.4.tgz", - "integrity": "sha512-3p2Rgm/a1cK0r/UVkx5F/K9v/EplfjAeIFCGOPYPO4lZ0jtg4iSQXt/YGTSLWaf4x7NG6Z4+uKFcylcTZjeqDA==", - "dependencies": { - "@floating-ui/react-dom": "^2.0.0", - "@radix-ui/react-arrow": "1.1.4", - "@radix-ui/react-compose-refs": "1.1.2", - "@radix-ui/react-context": "1.1.2", - "@radix-ui/react-primitive": "2.1.0", - "@radix-ui/react-use-callback-ref": "1.1.1", - "@radix-ui/react-use-layout-effect": "1.1.1", - "@radix-ui/react-use-rect": "1.1.1", - "@radix-ui/react-use-size": "1.1.1", - "@radix-ui/rect": "1.1.1" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, - "node_modules/@radix-ui/react-portal": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/@radix-ui/react-portal/-/react-portal-1.1.6.tgz", - "integrity": "sha512-XmsIl2z1n/TsYFLIdYam2rmFwf9OC/Sh2avkbmVMDuBZIe7hSpM0cYnWPAo7nHOVx8zTuwDZGByfcqLdnzp3Vw==", - "dependencies": { - "@radix-ui/react-primitive": "2.1.0", - "@radix-ui/react-use-layout-effect": "1.1.1" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, "node_modules/@radix-ui/react-presence": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/@radix-ui/react-presence/-/react-presence-1.1.3.tgz", @@ -3752,48 +3423,6 @@ } } }, - "node_modules/@radix-ui/react-select": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/@radix-ui/react-select/-/react-select-2.2.2.tgz", - "integrity": "sha512-HjkVHtBkuq+r3zUAZ/CvNWUGKPfuicGDbgtZgiQuFmNcV5F+Tgy24ep2nsAW2nFgvhGPJVqeBZa6KyVN0EyrBA==", - "dependencies": { - "@radix-ui/number": "1.1.1", - "@radix-ui/primitive": "1.1.2", - "@radix-ui/react-collection": "1.1.4", - "@radix-ui/react-compose-refs": "1.1.2", - "@radix-ui/react-context": "1.1.2", - "@radix-ui/react-direction": "1.1.1", - "@radix-ui/react-dismissable-layer": "1.1.7", - "@radix-ui/react-focus-guards": "1.1.2", - "@radix-ui/react-focus-scope": "1.1.4", - "@radix-ui/react-id": "1.1.1", - "@radix-ui/react-popper": "1.2.4", - "@radix-ui/react-portal": "1.1.6", - "@radix-ui/react-primitive": "2.1.0", - "@radix-ui/react-slot": "1.2.0", - "@radix-ui/react-use-callback-ref": "1.1.1", - "@radix-ui/react-use-controllable-state": "1.2.2", - "@radix-ui/react-use-layout-effect": "1.1.1", - "@radix-ui/react-use-previous": "1.1.1", - "@radix-ui/react-visually-hidden": "1.2.0", - "aria-hidden": "^1.2.4", - "react-remove-scroll": "^2.6.3" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, "node_modules/@radix-ui/react-slot": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@radix-ui/react-slot/-/react-slot-1.2.0.tgz", @@ -3939,28 +3568,6 @@ } } }, - "node_modules/@radix-ui/react-visually-hidden": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@radix-ui/react-visually-hidden/-/react-visually-hidden-1.2.0.tgz", - "integrity": "sha512-rQj0aAWOpCdCMRbI6pLQm8r7S2BM3YhTa0SzOYD55k+hJA8oo9J+H+9wLM9oMlZWOX/wJWPTzfDfmZkf7LvCfg==", - "dependencies": { - "@radix-ui/react-primitive": "2.1.0" - }, - "peerDependencies": { - "@types/react": "*", - "@types/react-dom": "*", - "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", - "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" - }, - "peerDependenciesMeta": { - "@types/react": { - "optional": true - }, - "@types/react-dom": { - "optional": true - } - } - }, "node_modules/@radix-ui/rect": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/@radix-ui/rect/-/rect-1.1.1.tgz", diff --git a/package.json b/package.json index 7b050219..c0541f50 100644 --- a/package.json +++ b/package.json @@ -19,11 +19,9 @@ "@base-ui-components/react": "1.0.0-beta.6", "@hookform/resolvers": "5.0.1", "@radix-ui/react-checkbox": "1.2.2", - "@radix-ui/react-dialog": "1.1.14", "@radix-ui/react-dropdown-menu": "2.1.15", "@radix-ui/react-popover": "1.1.14", "@radix-ui/react-radio-group": "1.3.6", - "@radix-ui/react-select": "2.2.2", "@radix-ui/react-slot": "1.2.0", "@tanstack/react-query": "5.83.0", "class-variance-authority": "0.7.1", diff --git a/src/actions/patients/get-patient.ts b/src/actions/patients/get-patient.ts index 530b9d42..6d4825cb 100644 --- a/src/actions/patients/get-patient.ts +++ b/src/actions/patients/get-patient.ts @@ -2,13 +2,13 @@ import { NEXT_CACHE_TAGS } from '@/constants/cache' import { api } from '@/lib/api' -import type { PatientType } from '@/types/patients' +import type { Patient } from '@/types/patients' export async function getPatient(id: string) { const REVALIDATE_IN_SECONDS = 3600 try { - const response = await api(`/patients/${id}`, { + const response = await api(`/patients/${id}`, { includeCookies: true, cache: 'force-cache', next: { diff --git a/src/actions/users.ts b/src/actions/users.ts index 148b3adb..056f2e6e 100644 --- a/src/actions/users.ts +++ b/src/actions/users.ts @@ -5,7 +5,7 @@ import { redirect } from 'next/navigation' import { NEXT_CACHE_TAGS } from '@/constants/cache' import { ROUTES } from '@/constants/routes' import { api } from '@/lib/api' -import type { UserType } from '@/types/users' +import type { User } from '@/types/users' import { getDataFromToken } from './token' @@ -16,7 +16,7 @@ export async function getProfile() { if (!data?.userId) return null - const response = await api('/users/profile', { + const response = await api('/users/profile', { includeCookies: true, cache: 'force-cache', next: { diff --git a/src/app/(dashboard)/_sidebar/account.tsx b/src/app/(dashboard)/_sidebar/account.tsx index 628ee26d..10a028d8 100644 --- a/src/app/(dashboard)/_sidebar/account.tsx +++ b/src/app/(dashboard)/_sidebar/account.tsx @@ -16,10 +16,10 @@ import { NEXT_CACHE_TAGS } from '@/constants/cache' import { ROUTES } from '@/constants/routes' import { api } from '@/lib/api' import { useSidebar } from '@/store/sidebar' -import type { UserType } from '@/types/users' +import type { User } from '@/types/users' interface SidebarAccountProps { - user: UserType + user: User } export function SidebarAccount({ user }: Readonly) { diff --git a/src/app/(dashboard)/_sidebar/container.tsx b/src/app/(dashboard)/_sidebar/container.tsx index d747efb3..bf7f9e2c 100644 --- a/src/app/(dashboard)/_sidebar/container.tsx +++ b/src/app/(dashboard)/_sidebar/container.tsx @@ -20,7 +20,7 @@ export function DashboardSidebarContainer({ className={cn( 'border-border flex h-screen shrink-0 flex-col gap-8 overflow-x-hidden overflow-y-auto border-r py-6 transition-all duration-500', className, - expanded ? 'w-56 px-6' : 'w-18 px-4', + expanded ? 'w-60 px-6' : 'w-18 px-4', )} {...props} /> @@ -30,7 +30,7 @@ export function DashboardSidebarContainer({ variant='outline' data-expanded={expanded} className={cn( - 'text-disabled hover:text-foreground-soft absolute top-20 -right-4 z-50 size-8 rounded-full transition-all delay-75 duration-300 [&_svg]:size-5', + 'text-disabled hover:text-foreground-soft absolute top-20 -right-4 z-10 size-8 rounded-full transition-all delay-75 duration-300 [&_svg]:size-5', 'data-[expanded=true]:rotate-180', )} onClick={toogleSidebar} diff --git a/src/app/(dashboard)/encaminhados/_cards/mock-data.ts b/src/app/(dashboard)/encaminhados/_cards/mock-data.ts deleted file mode 100644 index f5fa66a2..00000000 --- a/src/app/(dashboard)/encaminhados/_cards/mock-data.ts +++ /dev/null @@ -1,11 +0,0 @@ -export function getMockReferralsCount() { - return { - total: 125, - } -} - -export function getMockReferredPatients() { - return { - percentage: 71, - } -} diff --git a/src/app/(dashboard)/equipes/(members-list)/page.tsx b/src/app/(dashboard)/equipes/page.tsx similarity index 53% rename from src/app/(dashboard)/equipes/(members-list)/page.tsx rename to src/app/(dashboard)/equipes/page.tsx index 09d716e6..3491eecc 100644 --- a/src/app/(dashboard)/equipes/(members-list)/page.tsx +++ b/src/app/(dashboard)/equipes/page.tsx @@ -1,11 +1,11 @@ import type { Metadata } from 'next' +import { TeamListTable } from '@/modules/teams/table' + export const metadata: Metadata = { - title: 'Equipes', + title: 'Equipe', } -import { MembersListTable } from './table' - export default function Page() { - return + return } diff --git a/src/app/(dashboard)/pacientes/(patients-list)/page.tsx b/src/app/(dashboard)/pacientes/(patients-list)/page.tsx deleted file mode 100644 index d88dcccb..00000000 --- a/src/app/(dashboard)/pacientes/(patients-list)/page.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import type { Metadata } from 'next' -import { Suspense } from 'react' - -import { DashboardContainer } from '@/components/dashboard/container' -import { DashboardTabButtons } from '@/components/dashboard/tab-buttons' -import { ROUTES } from '@/constants/routes' - -import { PatientsListTable } from './table' - -export const metadata: Metadata = { - title: 'Pacientes', -} - -export default function Page() { - const tabButtons = [ - { - title: 'Listagem de pacientes', - path: ROUTES.dashboard.patients.main, - }, - ] - - return ( - <> - - - Carregando...}> - - - - - ) -} diff --git a/src/app/(dashboard)/pacientes/[id]/documentos/page.tsx b/src/app/(dashboard)/pacientes/[id]/documentos/page.tsx index 0a506f7b..48439f7b 100644 --- a/src/app/(dashboard)/pacientes/[id]/documentos/page.tsx +++ b/src/app/(dashboard)/pacientes/[id]/documentos/page.tsx @@ -1,4 +1,4 @@ -import { PatientsDocuments } from './patients-documents' +import { PatientDocuments } from '../../../../../modules/patients/documents' const PATIENT_SECTIONS = [ { @@ -46,5 +46,5 @@ export default function Page() { return

Nenhum documento encontrado.

} - return + return } diff --git a/src/app/(dashboard)/pacientes/[id]/historico/page.tsx b/src/app/(dashboard)/pacientes/[id]/historico/page.tsx index 59959094..b1c163dc 100644 --- a/src/app/(dashboard)/pacientes/[id]/historico/page.tsx +++ b/src/app/(dashboard)/pacientes/[id]/historico/page.tsx @@ -3,8 +3,6 @@ import { redirect } from 'next/navigation' import { ROUTES } from '@/constants/routes' -import PatientHistoryTable from './patient-history-table' - export const metadata: Metadata = { title: 'Histórico', } @@ -22,5 +20,5 @@ export default async function Page({ redirect(ROUTES.dashboard.patients.main) } - return + return
Histórico do paciente {patientId}
} diff --git a/src/app/(dashboard)/pacientes/[id]/historico/patient-history-table.tsx b/src/app/(dashboard)/pacientes/[id]/historico/patient-history-table.tsx deleted file mode 100644 index 0836d23c..00000000 --- a/src/app/(dashboard)/pacientes/[id]/historico/patient-history-table.tsx +++ /dev/null @@ -1,206 +0,0 @@ -'use client' - -import { - CheckIcon, - HistoryIcon, - PencilIcon, - Trash2Icon, - XIcon, -} from 'lucide-react' -import React, { useState } from 'react' - -import { DataTableHeader } from '@/components/data-table/header' -import { DataTableHeaderInfo } from '@/components/data-table/header/info' -import { Button } from '@/components/ui/button' -import { Card } from '@/components/ui/card' -import { Divider } from '@/components/ui/divider' -import { ExpandableText } from '@/components/ui/expandable-text' -import { Select, SelectValue } from '@/components/ui/select' -import { SelectContent } from '@/components/ui/select/content' -import { SelectItem } from '@/components/ui/select/item' -import { SelectTrigger } from '@/components/ui/select/trigger' -import { PATIENT_STATUS } from '@/types/patients' -import { PATIENTS_MOCKS } from '@/utils/mock/patients' - -export default function PatientHistoryTable() { - const longText = - 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptatem similique, eveniet ipsa quam quaerat suscipit dolorum, consequatur totam recusandae voluptatum perferendis placeat molestiae! Obcaecati officia consequatur voluptates, enim nemo dolorem! Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptatem similique, eveniet ipsa quam quaerat suscipit dolorum, consequatur totam recusandae voluptatum perferendis placeat molestiae! Obcaecati officia consequatur voluptates, enim nemo dolorem!' - - const initialPatients = PATIENTS_MOCKS.map((p) => ({ - ...p, - status: 'stable', - created_at: new Date(p.created_at), - notes: longText, - })) - - const [patients, setPatients] = useState(initialPatients) - const [editingRowId, setEditingRowId] = useState(null) - const [selectedStatus, setSelectedStatus] = useState(null) - const [editingNotes, setEditingNotes] = useState('') - - const handleEditClick = ( - patientId: string, - currentStatus: string, - currentNotes: string, - ) => { - setEditingRowId(patientId) - setSelectedStatus(currentStatus) - setEditingNotes(currentNotes) - } - - const handleCancelClick = () => { - setEditingRowId(null) - setSelectedStatus(null) - setEditingNotes('') - } - - const handleSaveClick = (patientId: string) => { - if (!selectedStatus) return - - setPatients( - patients.map((p) => - p.id === patientId - ? { - ...p, - status: selectedStatus, - notes: editingNotes, - } - : p, - ), - ) - handleCancelClick() - } - - return ( - <> - - } - title='Histórico do paciente' - /> -
- - -
-
- - -
-

Data

-

Profissional

-

Quadro geral

-
- -
- {patients.length === 0 ? ( -

- Nenhum histórico para esse paciente. -

- ) : ( - patients.map((patient) => { - const isEditing = editingRowId === patient.id - - return ( - -
- {/* Seção de cabeçalho da tabela*/} -
-

{patient.created_at.toLocaleDateString('pt-BR')}

-
-
-

Dr. Fábio Barros

-
-
- {isEditing ? ( - - ) : ( -

Status

- )} -
- - {/* Seção de observações e botões de ação */} -
-
- Observações: - {isEditing ? ( -