fixed dashboard ui
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"$schema": "https://ui.shadcn.com/schema.json",
|
||||
"style": "radix-nova",
|
||||
"style": "radix-luma",
|
||||
"rsc": false,
|
||||
"tsx": true,
|
||||
"tailwind": {
|
||||
"config": "tailwind.config.js",
|
||||
"config": "",
|
||||
"css": "src/index.css",
|
||||
"baseColor": "neutral",
|
||||
"baseColor": "zinc",
|
||||
"cssVariables": true,
|
||||
"prefix": ""
|
||||
},
|
||||
|
||||
434
package-lock.json
generated
434
package-lock.json
generated
@@ -9,6 +9,7 @@
|
||||
"version": "0.0.0",
|
||||
"dependencies": {
|
||||
"@fontsource-variable/geist": "^5.2.8",
|
||||
"@fontsource-variable/inter": "^5.2.8",
|
||||
"@tanstack/react-query": "^5.100.8",
|
||||
"@tanstack/react-table": "^8.21.3",
|
||||
"axios": "^1.15.2",
|
||||
@@ -24,6 +25,7 @@
|
||||
"react-dom": "^19.2.5",
|
||||
"react-i18next": "^17.0.6",
|
||||
"react-router-dom": "^7.14.2",
|
||||
"recharts": "^3.8.0",
|
||||
"root": "github:tanstack/react-query",
|
||||
"shadcn": "^4.6.0",
|
||||
"sonner": "^2.0.7",
|
||||
@@ -92,7 +94,6 @@
|
||||
"resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.0.tgz",
|
||||
"integrity": "sha512-CGOfOJqWjg2qW/Mb6zNsDm+u5vFQ8DxXfbM09z69p5Z6+mE1ikP2jUXw+j42Pf1XTYED2Rni5f95npYeuwMDQA==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.29.0",
|
||||
"@babel/generator": "^7.29.0",
|
||||
@@ -654,6 +655,29 @@
|
||||
"@noble/ciphers": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@emnapi/core": {
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.10.0.tgz",
|
||||
"integrity": "sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"@emnapi/wasi-threads": "1.2.1",
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@emnapi/runtime": {
|
||||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.10.0.tgz",
|
||||
"integrity": "sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@emnapi/wasi-threads": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz",
|
||||
@@ -840,6 +864,15 @@
|
||||
"url": "https://github.com/sponsors/ayuhito"
|
||||
}
|
||||
},
|
||||
"node_modules/@fontsource-variable/inter": {
|
||||
"version": "5.2.8",
|
||||
"resolved": "https://registry.npmjs.org/@fontsource-variable/inter/-/inter-5.2.8.tgz",
|
||||
"integrity": "sha512-kOfP2D+ykbcX/P3IFnokOhVRNoTozo5/JxhAIVYLpea/UBmCQ/YWPBfWIDuBImXX/15KH+eKh4xpEUyS2sQQGQ==",
|
||||
"license": "OFL-1.1",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ayuhito"
|
||||
}
|
||||
},
|
||||
"node_modules/@hono/node-server": {
|
||||
"version": "1.19.14",
|
||||
"resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-1.19.14.tgz",
|
||||
@@ -1154,7 +1187,6 @@
|
||||
"resolved": "https://registry.npmjs.org/@noble/ciphers/-/ciphers-1.3.0.tgz",
|
||||
"integrity": "sha512-2I0gnIVPtfnMw9ee9h1dJG7tp81+8Ob3OJb3Mv37rx5L40/b0i7djjCVvGOVqc9AEIQyvyu1i6ypKdFw8R8gQw==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": "^14.21.3 || >=16"
|
||||
},
|
||||
@@ -2754,6 +2786,42 @@
|
||||
"integrity": "sha512-HPwpGIzkl28mWyZqG52jiqDJ12waP11Pa1lGoiyUkIEuMLBP0oeK/C89esbXrxsky5we7dfd8U58nm0SgAWpVw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@reduxjs/toolkit": {
|
||||
"version": "2.11.2",
|
||||
"resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-2.11.2.tgz",
|
||||
"integrity": "sha512-Kd6kAHTA6/nUpp8mySPqj3en3dm0tdMIgbttnQ1xFMVpufoj+ADi8pXLBsd4xzTRHQa7t/Jv8W5UnCuW4kuWMQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@standard-schema/spec": "^1.0.0",
|
||||
"@standard-schema/utils": "^0.3.0",
|
||||
"immer": "^11.0.0",
|
||||
"redux": "^5.0.1",
|
||||
"redux-thunk": "^3.1.0",
|
||||
"reselect": "^5.1.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^16.9.0 || ^17.0.0 || ^18 || ^19",
|
||||
"react-redux": "^7.2.1 || ^8.1.3 || ^9.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"react": {
|
||||
"optional": true
|
||||
},
|
||||
"react-redux": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@reduxjs/toolkit/node_modules/immer": {
|
||||
"version": "11.1.8",
|
||||
"resolved": "https://registry.npmjs.org/immer/-/immer-11.1.8.tgz",
|
||||
"integrity": "sha512-/tbkHMW7y10Lx6i1crLjD4/OhNkRG+Fo7byZHtah0547nIeXYcpIXaUh0IAQY6gO5459qpGGYapcEOHtFXkIuA==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/immer"
|
||||
}
|
||||
},
|
||||
"node_modules/@rolldown/binding-android-arm64": {
|
||||
"version": "1.0.0-rc.17",
|
||||
"resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.0.0-rc.17.tgz",
|
||||
@@ -3036,6 +3104,18 @@
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/@standard-schema/spec": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz",
|
||||
"integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@standard-schema/utils": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/@standard-schema/utils/-/utils-0.3.0.tgz",
|
||||
"integrity": "sha512-e7Mew686owMaPJVNNLs55PUvgz371nKgwsc4vxE49zsODpJEnxgxRo2y/OKrqueavXgZNMDVj3DdHFlaSAeU8g==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@tabby_ai/hijri-converter": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/@tabby_ai/hijri-converter/-/hijri-converter-1.0.5.tgz",
|
||||
@@ -3397,6 +3477,69 @@
|
||||
"tslib": "^2.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/d3-array": {
|
||||
"version": "3.2.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.2.tgz",
|
||||
"integrity": "sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/d3-color": {
|
||||
"version": "3.1.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.3.tgz",
|
||||
"integrity": "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/d3-ease": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.2.tgz",
|
||||
"integrity": "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/d3-interpolate": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz",
|
||||
"integrity": "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/d3-color": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/d3-path": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.1.tgz",
|
||||
"integrity": "sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/d3-scale": {
|
||||
"version": "4.0.9",
|
||||
"resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.9.tgz",
|
||||
"integrity": "sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/d3-time": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/d3-shape": {
|
||||
"version": "3.1.8",
|
||||
"resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.8.tgz",
|
||||
"integrity": "sha512-lae0iWfcDeR7qt7rA88BNiqdvPS5pFVPpo5OfjElwNaT2yyekbM0C9vK+yqBqEmHr6lDkRnYNoTBYlAgJa7a4w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/d3-path": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/d3-time": {
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.4.tgz",
|
||||
"integrity": "sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/d3-timer": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.2.tgz",
|
||||
"integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/esrecurse": {
|
||||
"version": "4.3.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz",
|
||||
@@ -3423,7 +3566,6 @@
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-24.12.2.tgz",
|
||||
"integrity": "sha512-A1sre26ke7HDIuY/M23nd9gfB+nrmhtYyMINbjI1zHJxYteKR6qSMX56FsmjMcDb3SMcjJg5BiRRgOCC/yBD0g==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"undici-types": "~7.16.0"
|
||||
}
|
||||
@@ -3434,7 +3576,6 @@
|
||||
"integrity": "sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==",
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"csstype": "^3.2.2"
|
||||
}
|
||||
@@ -3445,7 +3586,6 @@
|
||||
"integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==",
|
||||
"devOptional": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"peerDependencies": {
|
||||
"@types/react": "^19.2.0"
|
||||
}
|
||||
@@ -3465,6 +3605,12 @@
|
||||
"integrity": "sha512-xMAgYwceFhRA2zY+XbEA7mxYbA093wdiW8Vu6gZPGWy9cmOyU9XesH1tNcEWsKFd5Vzrqx5T3D38PWx1FIIXkA==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/use-sync-external-store": {
|
||||
"version": "0.0.6",
|
||||
"resolved": "https://registry.npmjs.org/@types/use-sync-external-store/-/use-sync-external-store-0.0.6.tgz",
|
||||
"integrity": "sha512-zFDAD+tlpf2r4asuHEj0XH6pY6i0g5NeAHPn+15wk3BV6JA69eERFXC1gyGThDkVa1zCyKr5jox1+2LbV/AMLg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/@types/validate-npm-package-name": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@types/validate-npm-package-name/-/validate-npm-package-name-4.0.2.tgz",
|
||||
@@ -3516,7 +3662,6 @@
|
||||
"integrity": "sha512-HDQH9O/47Dxi1ceDhBXdaldtf/WV9yRYMjbjCuNk3qnaTD564qwv61Y7+gTxwxRKzSrgO5uhtw584igXVuuZkA==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@typescript-eslint/scope-manager": "8.59.1",
|
||||
"@typescript-eslint/types": "8.59.1",
|
||||
@@ -3760,7 +3905,6 @@
|
||||
"integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"acorn": "bin/acorn"
|
||||
},
|
||||
@@ -4042,7 +4186,6 @@
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"baseline-browser-mapping": "^2.10.12",
|
||||
"caniuse-lite": "^1.0.30001782",
|
||||
@@ -4430,6 +4573,127 @@
|
||||
"devOptional": true,
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/d3-array": {
|
||||
"version": "3.2.4",
|
||||
"resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz",
|
||||
"integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"internmap": "1 - 2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/d3-color": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz",
|
||||
"integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==",
|
||||
"license": "ISC",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/d3-ease": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz",
|
||||
"integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==",
|
||||
"license": "BSD-3-Clause",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/d3-format": {
|
||||
"version": "3.1.2",
|
||||
"resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.2.tgz",
|
||||
"integrity": "sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg==",
|
||||
"license": "ISC",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/d3-interpolate": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz",
|
||||
"integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"d3-color": "1 - 3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/d3-path": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz",
|
||||
"integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==",
|
||||
"license": "ISC",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/d3-scale": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz",
|
||||
"integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"d3-array": "2.10.0 - 3",
|
||||
"d3-format": "1 - 3",
|
||||
"d3-interpolate": "1.2.0 - 3",
|
||||
"d3-time": "2.1.1 - 3",
|
||||
"d3-time-format": "2 - 4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/d3-shape": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz",
|
||||
"integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"d3-path": "^3.1.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/d3-time": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz",
|
||||
"integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"d3-array": "2 - 3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/d3-time-format": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz",
|
||||
"integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"d3-time": "1 - 3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/d3-timer": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz",
|
||||
"integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==",
|
||||
"license": "ISC",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/data-uri-to-buffer": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
|
||||
@@ -4472,6 +4736,12 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/decimal.js-light": {
|
||||
"version": "2.5.1",
|
||||
"resolved": "https://registry.npmjs.org/decimal.js-light/-/decimal.js-light-2.5.1.tgz",
|
||||
"integrity": "sha512-qIMFpTMZmny+MMIitAB6D7iVPEorVw6YQRWkvarTkT4tBeSLLiHzcwj6q0MmYSFCiVpiqPJTJEYIrpcPzVEIvg==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/dedent": {
|
||||
"version": "1.7.2",
|
||||
"resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.2.tgz",
|
||||
@@ -4732,6 +5002,16 @@
|
||||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/es-toolkit": {
|
||||
"version": "1.46.1",
|
||||
"resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.46.1.tgz",
|
||||
"integrity": "sha512-5eNtXOs3tbfxXOj04tjjseeWkRWaoCjdEI+96DgwzZoe6c9juL49pXlzAFTI72aWC9Y8p7168g6XIKjh7k6pyQ==",
|
||||
"license": "MIT",
|
||||
"workspaces": [
|
||||
"docs",
|
||||
"benchmarks"
|
||||
]
|
||||
},
|
||||
"node_modules/escalade": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",
|
||||
@@ -4766,7 +5046,6 @@
|
||||
"integrity": "sha512-XbEXaRva5cF0ZQB8w6MluHA0kZZfV2DuCMJ3ozyEOHLwDpZX2Lmm/7Pp0xdJmI0GL1W05VH5VwIFHEm1Vcw2gw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.8.0",
|
||||
"@eslint-community/regexpp": "^4.12.2",
|
||||
@@ -4965,6 +5244,12 @@
|
||||
"node": ">= 0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/eventemitter3": {
|
||||
"version": "5.0.4",
|
||||
"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.4.tgz",
|
||||
"integrity": "sha512-mlsTRyGaPBjPedk6Bvw+aqbsXDtoAyAzm5MO7JgU+yVRyMQ5O8bD4Kcci7BS85f93veegeCPkL8R4GLClnjLFw==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/eventsource": {
|
||||
"version": "3.0.7",
|
||||
"resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz",
|
||||
@@ -5017,7 +5302,6 @@
|
||||
"resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz",
|
||||
"integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"accepts": "^2.0.0",
|
||||
"body-parser": "^2.2.1",
|
||||
@@ -5683,7 +5967,6 @@
|
||||
"resolved": "https://registry.npmjs.org/hono/-/hono-4.12.16.tgz",
|
||||
"integrity": "sha512-jN0ZewiNAWSe5khM3EyCmBb250+b40wWbwNILNfEvq84VREWwOIkuUsFONk/3i3nqkz7Oe1PcpM2mwQEK2L9Kg==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=16.9.0"
|
||||
}
|
||||
@@ -5758,7 +6041,6 @@
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"peerDependencies": {
|
||||
"typescript": "^5 || ^6"
|
||||
},
|
||||
@@ -5793,6 +6075,16 @@
|
||||
"node": ">= 4"
|
||||
}
|
||||
},
|
||||
"node_modules/immer": {
|
||||
"version": "10.2.0",
|
||||
"resolved": "https://registry.npmjs.org/immer/-/immer-10.2.0.tgz",
|
||||
"integrity": "sha512-d/+XTN3zfODyjr89gM3mPq1WNX2B8pYsu7eORitdwyA2sBubnTl3laYlBk4sXY5FUa5qTZGBDPJICVbvqzjlbw==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/immer"
|
||||
}
|
||||
},
|
||||
"node_modules/import-fresh": {
|
||||
"version": "3.3.1",
|
||||
"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.1.tgz",
|
||||
@@ -5825,6 +6117,15 @@
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
||||
"license": "ISC"
|
||||
},
|
||||
"node_modules/internmap": {
|
||||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz",
|
||||
"integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==",
|
||||
"license": "ISC",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/ip-address": {
|
||||
"version": "10.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ip-address/-/ip-address-10.1.0.tgz",
|
||||
@@ -7137,7 +7438,6 @@
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"nanoid": "^3.3.11",
|
||||
"picocolors": "^1.1.1",
|
||||
@@ -7399,7 +7699,6 @@
|
||||
"resolved": "https://registry.npmjs.org/react/-/react-19.2.5.tgz",
|
||||
"integrity": "sha512-llUJLzz1zTUBrskt2pwZgLq59AemifIftw4aB7JxOqf1HY2FDaGDxgwpAPVzHU1kdWabH7FauP4i1oEeer2WCA==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
@@ -7431,7 +7730,6 @@
|
||||
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.5.tgz",
|
||||
"integrity": "sha512-J5bAZz+DXMMwW/wV3xzKke59Af6CHY7G4uYLN1OvBcKEsWOs4pQExj86BBKamxl/Ik5bx9whOrvBlSDfWzgSag==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"scheduler": "^0.27.0"
|
||||
},
|
||||
@@ -7466,6 +7764,36 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/react-is": {
|
||||
"version": "19.2.6",
|
||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-19.2.6.tgz",
|
||||
"integrity": "sha512-XjBR15BhXuylgWGuslhDKqlSayuqvqBX91BP8pauG8kd1zY8kotkNWbXksTCNRarse4kuGbe2kIY05ARtwNIvw==",
|
||||
"license": "MIT",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/react-redux": {
|
||||
"version": "9.2.0",
|
||||
"resolved": "https://registry.npmjs.org/react-redux/-/react-redux-9.2.0.tgz",
|
||||
"integrity": "sha512-ROY9fvHhwOD9ySfrF0wmvu//bKCQ6AeZZq1nJNtbDC+kk5DuSuNX/n6YWYF/SYy7bSba4D4FSz8DJeKY/S/r+g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@types/use-sync-external-store": "^0.0.6",
|
||||
"use-sync-external-store": "^1.4.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@types/react": "^18.2.25 || ^19",
|
||||
"react": "^18.0 || ^19",
|
||||
"redux": "^5.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@types/react": {
|
||||
"optional": true
|
||||
},
|
||||
"redux": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/react-remove-scroll": {
|
||||
"version": "2.7.2",
|
||||
"resolved": "https://registry.npmjs.org/react-remove-scroll/-/react-remove-scroll-2.7.2.tgz",
|
||||
@@ -7608,6 +7936,51 @@
|
||||
"node": ">= 4"
|
||||
}
|
||||
},
|
||||
"node_modules/recharts": {
|
||||
"version": "3.8.0",
|
||||
"resolved": "https://registry.npmjs.org/recharts/-/recharts-3.8.0.tgz",
|
||||
"integrity": "sha512-Z/m38DX3L73ExO4Tpc9/iZWHmHnlzWG4njQbxsF5aSjwqmHNDDIm0rdEBArkwsBvR8U6EirlEHiQNYWCVh9sGQ==",
|
||||
"license": "MIT",
|
||||
"workspaces": [
|
||||
"www"
|
||||
],
|
||||
"dependencies": {
|
||||
"@reduxjs/toolkit": "^1.9.0 || 2.x.x",
|
||||
"clsx": "^2.1.1",
|
||||
"decimal.js-light": "^2.5.1",
|
||||
"es-toolkit": "^1.39.3",
|
||||
"eventemitter3": "^5.0.1",
|
||||
"immer": "^10.1.1",
|
||||
"react-redux": "8.x.x || 9.x.x",
|
||||
"reselect": "5.1.1",
|
||||
"tiny-invariant": "^1.3.3",
|
||||
"use-sync-external-store": "^1.2.2",
|
||||
"victory-vendor": "^37.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
||||
"react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
|
||||
"react-is": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/redux": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz",
|
||||
"integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/redux-thunk": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-3.1.0.tgz",
|
||||
"integrity": "sha512-NW2r5T6ksUKXCabzhL9z+h206HQw/NJkcLm1GPImRQ8IzfXwRGqjVhKJGauHirT0DAuyy6hjdnMZaRoAcy0Klw==",
|
||||
"license": "MIT",
|
||||
"peerDependencies": {
|
||||
"redux": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/require-directory": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
|
||||
@@ -7626,6 +7999,12 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/reselect": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/reselect/-/reselect-5.1.1.tgz",
|
||||
"integrity": "sha512-K/BG6eIky/SBpzfHZv/dd+9JBFiS4SWV7FIujVyJRux6e45+73RaUHXLmIR1f7WOMaQ0U1km6qwklRQxpJJY0w==",
|
||||
"license": "MIT"
|
||||
},
|
||||
"node_modules/resolve-from": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
|
||||
@@ -8357,7 +8736,6 @@
|
||||
"integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==",
|
||||
"devOptional": true,
|
||||
"license": "Apache-2.0",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
@@ -8564,13 +8942,34 @@
|
||||
"react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0.0 || ^19.0.0-rc"
|
||||
}
|
||||
},
|
||||
"node_modules/victory-vendor": {
|
||||
"version": "37.3.6",
|
||||
"resolved": "https://registry.npmjs.org/victory-vendor/-/victory-vendor-37.3.6.tgz",
|
||||
"integrity": "sha512-SbPDPdDBYp+5MJHhBCAyI7wKM3d5ivekigc2Dk2s7pgbZ9wIgIBYGVw4zGHBml/qTFbexrofXW6Gu4noGxrOwQ==",
|
||||
"license": "MIT AND ISC",
|
||||
"dependencies": {
|
||||
"@types/d3-array": "^3.0.3",
|
||||
"@types/d3-ease": "^3.0.0",
|
||||
"@types/d3-interpolate": "^3.0.1",
|
||||
"@types/d3-scale": "^4.0.2",
|
||||
"@types/d3-shape": "^3.1.0",
|
||||
"@types/d3-time": "^3.0.0",
|
||||
"@types/d3-timer": "^3.0.0",
|
||||
"d3-array": "^3.1.6",
|
||||
"d3-ease": "^3.0.1",
|
||||
"d3-interpolate": "^3.0.1",
|
||||
"d3-scale": "^4.0.2",
|
||||
"d3-shape": "^3.1.0",
|
||||
"d3-time": "^3.0.0",
|
||||
"d3-timer": "^3.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "8.0.10",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-8.0.10.tgz",
|
||||
"integrity": "sha512-rZuUu9j6J5uotLDs+cAA4O5H4K1SfPliUlQwqa6YEwSrWDZzP4rhm00oJR5snMewjxF5V/K3D4kctsUTsIU9Mw==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"lightningcss": "^1.32.0",
|
||||
"picomatch": "^4.0.4",
|
||||
@@ -8894,7 +9293,6 @@
|
||||
"resolved": "https://registry.npmjs.org/zod/-/zod-4.4.2.tgz",
|
||||
"integrity": "sha512-IynmDyxsEsb9RKzO3J9+4SxXnl2FTFSzNBaKKaMV6tsSk0rw9gYw9gs+JFCq/qk2LCZ78KDwyj+Z289TijSkUw==",
|
||||
"license": "MIT",
|
||||
"peer": true,
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/colinhacks"
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@fontsource-variable/geist": "^5.2.8",
|
||||
"@fontsource-variable/inter": "^5.2.8",
|
||||
"@tanstack/react-query": "^5.100.8",
|
||||
"@tanstack/react-table": "^8.21.3",
|
||||
"axios": "^1.15.2",
|
||||
@@ -26,6 +27,7 @@
|
||||
"react-dom": "^19.2.5",
|
||||
"react-i18next": "^17.0.6",
|
||||
"react-router-dom": "^7.14.2",
|
||||
"recharts": "^3.8.0",
|
||||
"root": "github:tanstack/react-query",
|
||||
"shadcn": "^4.6.0",
|
||||
"sonner": "^2.0.7",
|
||||
|
||||
49
src/components/ui/badge.tsx
Normal file
49
src/components/ui/badge.tsx
Normal file
@@ -0,0 +1,49 @@
|
||||
import * as React from "react"
|
||||
import { cva, type VariantProps } from "class-variance-authority"
|
||||
import { Slot } from "radix-ui"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
const badgeVariants = cva(
|
||||
"group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-3xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!",
|
||||
{
|
||||
variants: {
|
||||
variant: {
|
||||
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
||||
secondary:
|
||||
"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
|
||||
destructive:
|
||||
"bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20",
|
||||
outline:
|
||||
"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
|
||||
ghost:
|
||||
"hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
|
||||
link: "text-primary underline-offset-4 hover:underline",
|
||||
},
|
||||
},
|
||||
defaultVariants: {
|
||||
variant: "default",
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
function Badge({
|
||||
className,
|
||||
variant = "default",
|
||||
asChild = false,
|
||||
...props
|
||||
}: React.ComponentProps<"span"> &
|
||||
VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
|
||||
const Comp = asChild ? Slot.Root : "span"
|
||||
|
||||
return (
|
||||
<Comp
|
||||
data-slot="badge"
|
||||
data-variant={variant}
|
||||
className={cn(badgeVariants({ variant }), className)}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
export { Badge, badgeVariants }
|
||||
100
src/components/ui/card.tsx
Normal file
100
src/components/ui/card.tsx
Normal file
@@ -0,0 +1,100 @@
|
||||
import * as React from "react"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
function Card({
|
||||
className,
|
||||
size = "default",
|
||||
...props
|
||||
}: React.ComponentProps<"div"> & { size?: "default" | "sm" }) {
|
||||
return (
|
||||
<div
|
||||
data-slot="card"
|
||||
data-size={size}
|
||||
className={cn(
|
||||
"group/card flex flex-col gap-6 overflow-hidden rounded-4xl bg-card py-6 text-sm text-card-foreground shadow-md ring-1 ring-foreground/5 has-[>img:first-child]:pt-0 data-[size=sm]:gap-4 data-[size=sm]:py-4 dark:ring-foreground/10 *:[img:first-child]:rounded-t-4xl *:[img:last-child]:rounded-b-4xl",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
function CardHeader({ className, ...props }: React.ComponentProps<"div">) {
|
||||
return (
|
||||
<div
|
||||
data-slot="card-header"
|
||||
className={cn(
|
||||
"group/card-header @container/card-header grid auto-rows-min items-start gap-1.5 rounded-t-4xl px-6 group-data-[size=sm]/card:px-4 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-6 group-data-[size=sm]/card:[.border-b]:pb-4",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
function CardTitle({ className, ...props }: React.ComponentProps<"div">) {
|
||||
return (
|
||||
<div
|
||||
data-slot="card-title"
|
||||
className={cn("font-heading text-base font-medium", className)}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
function CardDescription({ className, ...props }: React.ComponentProps<"div">) {
|
||||
return (
|
||||
<div
|
||||
data-slot="card-description"
|
||||
className={cn("text-sm text-muted-foreground", className)}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
function CardAction({ className, ...props }: React.ComponentProps<"div">) {
|
||||
return (
|
||||
<div
|
||||
data-slot="card-action"
|
||||
className={cn(
|
||||
"col-start-2 row-span-2 row-start-1 self-start justify-self-end",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
function CardContent({ className, ...props }: React.ComponentProps<"div">) {
|
||||
return (
|
||||
<div
|
||||
data-slot="card-content"
|
||||
className={cn("px-6 group-data-[size=sm]/card:px-4", className)}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
function CardFooter({ className, ...props }: React.ComponentProps<"div">) {
|
||||
return (
|
||||
<div
|
||||
data-slot="card-footer"
|
||||
className={cn(
|
||||
"flex items-center rounded-b-4xl px-6 group-data-[size=sm]/card:px-4 [.border-t]:pt-6 group-data-[size=sm]/card:[.border-t]:pt-4",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
export {
|
||||
Card,
|
||||
CardHeader,
|
||||
CardFooter,
|
||||
CardTitle,
|
||||
CardAction,
|
||||
CardDescription,
|
||||
CardContent,
|
||||
}
|
||||
371
src/components/ui/chart.tsx
Normal file
371
src/components/ui/chart.tsx
Normal file
@@ -0,0 +1,371 @@
|
||||
import * as React from "react"
|
||||
import * as RechartsPrimitive from "recharts"
|
||||
import type { TooltipValueType } from "recharts"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
|
||||
// Format: { THEME_NAME: CSS_SELECTOR }
|
||||
const THEMES = { light: "", dark: ".dark" } as const
|
||||
|
||||
const INITIAL_DIMENSION = { width: 320, height: 200 } as const
|
||||
type TooltipNameType = number | string
|
||||
|
||||
export type ChartConfig = Record<
|
||||
string,
|
||||
{
|
||||
label?: React.ReactNode
|
||||
icon?: React.ComponentType
|
||||
} & (
|
||||
| { color?: string; theme?: never }
|
||||
| { color?: never; theme: Record<keyof typeof THEMES, string> }
|
||||
)
|
||||
>
|
||||
|
||||
type ChartContextProps = {
|
||||
config: ChartConfig
|
||||
}
|
||||
|
||||
const ChartContext = React.createContext<ChartContextProps | null>(null)
|
||||
|
||||
function useChart() {
|
||||
const context = React.useContext(ChartContext)
|
||||
|
||||
if (!context) {
|
||||
throw new Error("useChart must be used within a <ChartContainer />")
|
||||
}
|
||||
|
||||
return context
|
||||
}
|
||||
|
||||
function ChartContainer({
|
||||
id,
|
||||
className,
|
||||
children,
|
||||
config,
|
||||
initialDimension = INITIAL_DIMENSION,
|
||||
...props
|
||||
}: React.ComponentProps<"div"> & {
|
||||
config: ChartConfig
|
||||
children: React.ComponentProps<
|
||||
typeof RechartsPrimitive.ResponsiveContainer
|
||||
>["children"]
|
||||
initialDimension?: {
|
||||
width: number
|
||||
height: number
|
||||
}
|
||||
}) {
|
||||
const uniqueId = React.useId()
|
||||
const chartId = `chart-${id ?? uniqueId.replace(/:/g, "")}`
|
||||
|
||||
return (
|
||||
<ChartContext.Provider value={{ config }}>
|
||||
<div
|
||||
data-slot="chart"
|
||||
data-chart={chartId}
|
||||
className={cn(
|
||||
"flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-hidden [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector]:outline-hidden [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-surface]:outline-hidden",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
>
|
||||
<ChartStyle id={chartId} config={config} />
|
||||
<RechartsPrimitive.ResponsiveContainer
|
||||
initialDimension={initialDimension}
|
||||
>
|
||||
{children}
|
||||
</RechartsPrimitive.ResponsiveContainer>
|
||||
</div>
|
||||
</ChartContext.Provider>
|
||||
)
|
||||
}
|
||||
|
||||
const ChartStyle = ({ id, config }: { id: string; config: ChartConfig }) => {
|
||||
const colorConfig = Object.entries(config).filter(
|
||||
([, config]) => config.theme ?? config.color
|
||||
)
|
||||
|
||||
if (!colorConfig.length) {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<style
|
||||
dangerouslySetInnerHTML={{
|
||||
__html: Object.entries(THEMES)
|
||||
.map(
|
||||
([theme, prefix]) => `
|
||||
${prefix} [data-chart=${id}] {
|
||||
${colorConfig
|
||||
.map(([key, itemConfig]) => {
|
||||
const color =
|
||||
itemConfig.theme?.[theme as keyof typeof itemConfig.theme] ??
|
||||
itemConfig.color
|
||||
return color ? ` --color-${key}: ${color};` : null
|
||||
})
|
||||
.join("\n")}
|
||||
}
|
||||
`
|
||||
)
|
||||
.join("\n"),
|
||||
}}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
const ChartTooltip = RechartsPrimitive.Tooltip
|
||||
|
||||
function ChartTooltipContent({
|
||||
active,
|
||||
payload,
|
||||
className,
|
||||
indicator = "dot",
|
||||
hideLabel = false,
|
||||
hideIndicator = false,
|
||||
label,
|
||||
labelFormatter,
|
||||
labelClassName,
|
||||
formatter,
|
||||
color,
|
||||
nameKey,
|
||||
labelKey,
|
||||
}: React.ComponentProps<typeof RechartsPrimitive.Tooltip> &
|
||||
React.ComponentProps<"div"> & {
|
||||
hideLabel?: boolean
|
||||
hideIndicator?: boolean
|
||||
indicator?: "line" | "dot" | "dashed"
|
||||
nameKey?: string
|
||||
labelKey?: string
|
||||
} & Omit<
|
||||
RechartsPrimitive.DefaultTooltipContentProps<
|
||||
TooltipValueType,
|
||||
TooltipNameType
|
||||
>,
|
||||
"accessibilityLayer"
|
||||
>) {
|
||||
const { config } = useChart()
|
||||
|
||||
const tooltipLabel = React.useMemo(() => {
|
||||
if (hideLabel || !payload?.length) {
|
||||
return null
|
||||
}
|
||||
|
||||
const [item] = payload
|
||||
const key = `${labelKey ?? item?.dataKey ?? item?.name ?? "value"}`
|
||||
const itemConfig = getPayloadConfigFromPayload(config, item, key)
|
||||
const value =
|
||||
!labelKey && typeof label === "string"
|
||||
? (config[label]?.label ?? label)
|
||||
: itemConfig?.label
|
||||
|
||||
if (labelFormatter) {
|
||||
return (
|
||||
<div className={cn("font-medium", labelClassName)}>
|
||||
{labelFormatter(value, payload)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
if (!value) {
|
||||
return null
|
||||
}
|
||||
|
||||
return <div className={cn("font-medium", labelClassName)}>{value}</div>
|
||||
}, [
|
||||
label,
|
||||
labelFormatter,
|
||||
payload,
|
||||
hideLabel,
|
||||
labelClassName,
|
||||
config,
|
||||
labelKey,
|
||||
])
|
||||
|
||||
if (!active || !payload?.length) {
|
||||
return null
|
||||
}
|
||||
|
||||
const nestLabel = payload.length === 1 && indicator !== "dot"
|
||||
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
"grid min-w-32 items-start gap-1.5 rounded-xl bg-popover px-2.5 py-1.5 text-xs text-popover-foreground shadow-lg ring-1 ring-foreground/5 dark:ring-foreground/10",
|
||||
className
|
||||
)}
|
||||
>
|
||||
{!nestLabel ? tooltipLabel : null}
|
||||
<div className="grid gap-1.5">
|
||||
{payload
|
||||
.filter((item) => item.type !== "none")
|
||||
.map((item, index) => {
|
||||
const key = `${nameKey ?? item.name ?? item.dataKey ?? "value"}`
|
||||
const itemConfig = getPayloadConfigFromPayload(config, item, key)
|
||||
const indicatorColor = color ?? item.payload?.fill ?? item.color
|
||||
|
||||
return (
|
||||
<div
|
||||
key={index}
|
||||
className={cn(
|
||||
"flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground",
|
||||
indicator === "dot" && "items-center"
|
||||
)}
|
||||
>
|
||||
{formatter && item?.value !== undefined && item.name ? (
|
||||
formatter(item.value, item.name, item, index, item.payload)
|
||||
) : (
|
||||
<>
|
||||
{itemConfig?.icon ? (
|
||||
<itemConfig.icon />
|
||||
) : (
|
||||
!hideIndicator && (
|
||||
<div
|
||||
className={cn(
|
||||
"shrink-0 rounded-[2px] border-(--color-border) bg-(--color-bg)",
|
||||
{
|
||||
"h-2.5 w-2.5": indicator === "dot",
|
||||
"w-1": indicator === "line",
|
||||
"w-0 border-[1.5px] border-dashed bg-transparent":
|
||||
indicator === "dashed",
|
||||
"my-0.5": nestLabel && indicator === "dashed",
|
||||
}
|
||||
)}
|
||||
style={
|
||||
{
|
||||
"--color-bg": indicatorColor,
|
||||
"--color-border": indicatorColor,
|
||||
} as React.CSSProperties
|
||||
}
|
||||
/>
|
||||
)
|
||||
)}
|
||||
<div
|
||||
className={cn(
|
||||
"flex flex-1 justify-between leading-none",
|
||||
nestLabel ? "items-end" : "items-center"
|
||||
)}
|
||||
>
|
||||
<div className="grid gap-1.5">
|
||||
{nestLabel ? tooltipLabel : null}
|
||||
<span className="text-muted-foreground">
|
||||
{itemConfig?.label ?? item.name}
|
||||
</span>
|
||||
</div>
|
||||
{item.value != null && (
|
||||
<span className="font-mono font-medium text-foreground tabular-nums">
|
||||
{typeof item.value === "number"
|
||||
? item.value.toLocaleString()
|
||||
: String(item.value)}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
const ChartLegend = RechartsPrimitive.Legend
|
||||
|
||||
function ChartLegendContent({
|
||||
className,
|
||||
hideIcon = false,
|
||||
payload,
|
||||
verticalAlign = "bottom",
|
||||
nameKey,
|
||||
}: React.ComponentProps<"div"> & {
|
||||
hideIcon?: boolean
|
||||
nameKey?: string
|
||||
} & RechartsPrimitive.DefaultLegendContentProps) {
|
||||
const { config } = useChart()
|
||||
|
||||
if (!payload?.length) {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
"flex items-center justify-center gap-4",
|
||||
verticalAlign === "top" ? "pb-3" : "pt-3",
|
||||
className
|
||||
)}
|
||||
>
|
||||
{payload
|
||||
.filter((item) => item.type !== "none")
|
||||
.map((item, index) => {
|
||||
const key = `${nameKey ?? item.dataKey ?? "value"}`
|
||||
const itemConfig = getPayloadConfigFromPayload(config, item, key)
|
||||
|
||||
return (
|
||||
<div
|
||||
key={index}
|
||||
className={cn(
|
||||
"flex items-center gap-1.5 [&>svg]:h-3 [&>svg]:w-3 [&>svg]:text-muted-foreground"
|
||||
)}
|
||||
>
|
||||
{itemConfig?.icon && !hideIcon ? (
|
||||
<itemConfig.icon />
|
||||
) : (
|
||||
<div
|
||||
className="h-2 w-2 shrink-0 rounded-[2px]"
|
||||
style={{
|
||||
backgroundColor: item.color,
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
{itemConfig?.label}
|
||||
</div>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
function getPayloadConfigFromPayload(
|
||||
config: ChartConfig,
|
||||
payload: unknown,
|
||||
key: string
|
||||
) {
|
||||
if (typeof payload !== "object" || payload === null) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
const payloadPayload =
|
||||
"payload" in payload &&
|
||||
typeof payload.payload === "object" &&
|
||||
payload.payload !== null
|
||||
? payload.payload
|
||||
: undefined
|
||||
|
||||
let configLabelKey: string = key
|
||||
|
||||
if (
|
||||
key in payload &&
|
||||
typeof payload[key as keyof typeof payload] === "string"
|
||||
) {
|
||||
configLabelKey = payload[key as keyof typeof payload] as string
|
||||
} else if (
|
||||
payloadPayload &&
|
||||
key in payloadPayload &&
|
||||
typeof payloadPayload[key as keyof typeof payloadPayload] === "string"
|
||||
) {
|
||||
configLabelKey = payloadPayload[
|
||||
key as keyof typeof payloadPayload
|
||||
] as string
|
||||
}
|
||||
|
||||
return configLabelKey in config ? config[configLabelKey] : config[key]
|
||||
}
|
||||
|
||||
export {
|
||||
ChartContainer,
|
||||
ChartTooltip,
|
||||
ChartTooltipContent,
|
||||
ChartLegend,
|
||||
ChartLegendContent,
|
||||
ChartStyle,
|
||||
}
|
||||
267
src/components/ui/dropdown-menu.tsx
Normal file
267
src/components/ui/dropdown-menu.tsx
Normal file
@@ -0,0 +1,267 @@
|
||||
import * as React from "react"
|
||||
import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui"
|
||||
|
||||
import { cn } from "@/lib/utils"
|
||||
import { CheckIcon, ChevronRightIcon } from "lucide-react"
|
||||
|
||||
function DropdownMenu({
|
||||
...props
|
||||
}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
|
||||
return <DropdownMenuPrimitive.Root data-slot="dropdown-menu" {...props} />
|
||||
}
|
||||
|
||||
function DropdownMenuPortal({
|
||||
...props
|
||||
}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {
|
||||
return (
|
||||
<DropdownMenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />
|
||||
)
|
||||
}
|
||||
|
||||
function DropdownMenuTrigger({
|
||||
...props
|
||||
}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {
|
||||
return (
|
||||
<DropdownMenuPrimitive.Trigger
|
||||
data-slot="dropdown-menu-trigger"
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
function DropdownMenuContent({
|
||||
className,
|
||||
align = "start",
|
||||
sideOffset = 4,
|
||||
...props
|
||||
}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {
|
||||
return (
|
||||
<DropdownMenuPrimitive.Portal>
|
||||
<DropdownMenuPrimitive.Content
|
||||
data-slot="dropdown-menu-content"
|
||||
sideOffset={sideOffset}
|
||||
align={align}
|
||||
className={cn("z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-48 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-3xl bg-popover p-1.5 text-popover-foreground shadow-lg ring-1 ring-foreground/5 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:overflow-hidden dark:ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className )}
|
||||
{...props}
|
||||
/>
|
||||
</DropdownMenuPrimitive.Portal>
|
||||
)
|
||||
}
|
||||
|
||||
function DropdownMenuGroup({
|
||||
...props
|
||||
}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {
|
||||
return (
|
||||
<DropdownMenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />
|
||||
)
|
||||
}
|
||||
|
||||
function DropdownMenuItem({
|
||||
className,
|
||||
inset,
|
||||
variant = "default",
|
||||
...props
|
||||
}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
||||
inset?: boolean
|
||||
variant?: "default" | "destructive"
|
||||
}) {
|
||||
return (
|
||||
<DropdownMenuPrimitive.Item
|
||||
data-slot="dropdown-menu-item"
|
||||
data-inset={inset}
|
||||
data-variant={variant}
|
||||
className={cn(
|
||||
"group/dropdown-menu-item relative flex cursor-default items-center gap-2.5 rounded-2xl px-3 py-2 text-sm font-medium outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-9.5 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
function DropdownMenuCheckboxItem({
|
||||
className,
|
||||
children,
|
||||
checked,
|
||||
inset,
|
||||
...props
|
||||
}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem> & {
|
||||
inset?: boolean
|
||||
}) {
|
||||
return (
|
||||
<DropdownMenuPrimitive.CheckboxItem
|
||||
data-slot="dropdown-menu-checkbox-item"
|
||||
data-inset={inset}
|
||||
className={cn(
|
||||
"relative flex cursor-default items-center gap-2.5 rounded-2xl py-2 pr-8 pl-3 text-sm font-medium outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-9.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
||||
className
|
||||
)}
|
||||
checked={checked}
|
||||
{...props}
|
||||
>
|
||||
<span
|
||||
className="pointer-events-none absolute right-2 flex items-center justify-center"
|
||||
data-slot="dropdown-menu-checkbox-item-indicator"
|
||||
>
|
||||
<DropdownMenuPrimitive.ItemIndicator>
|
||||
<CheckIcon
|
||||
/>
|
||||
</DropdownMenuPrimitive.ItemIndicator>
|
||||
</span>
|
||||
{children}
|
||||
</DropdownMenuPrimitive.CheckboxItem>
|
||||
)
|
||||
}
|
||||
|
||||
function DropdownMenuRadioGroup({
|
||||
...props
|
||||
}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {
|
||||
return (
|
||||
<DropdownMenuPrimitive.RadioGroup
|
||||
data-slot="dropdown-menu-radio-group"
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
function DropdownMenuRadioItem({
|
||||
className,
|
||||
children,
|
||||
inset,
|
||||
...props
|
||||
}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem> & {
|
||||
inset?: boolean
|
||||
}) {
|
||||
return (
|
||||
<DropdownMenuPrimitive.RadioItem
|
||||
data-slot="dropdown-menu-radio-item"
|
||||
data-inset={inset}
|
||||
className={cn(
|
||||
"relative flex cursor-default items-center gap-2.5 rounded-2xl py-2 pr-8 pl-3 text-sm font-medium outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-9.5 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
>
|
||||
<span
|
||||
className="pointer-events-none absolute right-2 flex items-center justify-center"
|
||||
data-slot="dropdown-menu-radio-item-indicator"
|
||||
>
|
||||
<DropdownMenuPrimitive.ItemIndicator>
|
||||
<CheckIcon
|
||||
/>
|
||||
</DropdownMenuPrimitive.ItemIndicator>
|
||||
</span>
|
||||
{children}
|
||||
</DropdownMenuPrimitive.RadioItem>
|
||||
)
|
||||
}
|
||||
|
||||
function DropdownMenuLabel({
|
||||
className,
|
||||
inset,
|
||||
...props
|
||||
}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
||||
inset?: boolean
|
||||
}) {
|
||||
return (
|
||||
<DropdownMenuPrimitive.Label
|
||||
data-slot="dropdown-menu-label"
|
||||
data-inset={inset}
|
||||
className={cn(
|
||||
"px-3 py-2.5 text-xs text-muted-foreground data-inset:pl-9.5",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
function DropdownMenuSeparator({
|
||||
className,
|
||||
...props
|
||||
}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {
|
||||
return (
|
||||
<DropdownMenuPrimitive.Separator
|
||||
data-slot="dropdown-menu-separator"
|
||||
className={cn("-mx-1.5 my-1.5 h-px bg-border/50", className)}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
function DropdownMenuShortcut({
|
||||
className,
|
||||
...props
|
||||
}: React.ComponentProps<"span">) {
|
||||
return (
|
||||
<span
|
||||
data-slot="dropdown-menu-shortcut"
|
||||
className={cn(
|
||||
"ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
function DropdownMenuSub({
|
||||
...props
|
||||
}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {
|
||||
return <DropdownMenuPrimitive.Sub data-slot="dropdown-menu-sub" {...props} />
|
||||
}
|
||||
|
||||
function DropdownMenuSubTrigger({
|
||||
className,
|
||||
inset,
|
||||
children,
|
||||
...props
|
||||
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
||||
inset?: boolean
|
||||
}) {
|
||||
return (
|
||||
<DropdownMenuPrimitive.SubTrigger
|
||||
data-slot="dropdown-menu-sub-trigger"
|
||||
data-inset={inset}
|
||||
className={cn(
|
||||
"flex cursor-default items-center gap-2 rounded-2xl px-3 py-2 text-sm font-medium outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-9.5 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
<ChevronRightIcon className="ml-auto" />
|
||||
</DropdownMenuPrimitive.SubTrigger>
|
||||
)
|
||||
}
|
||||
|
||||
function DropdownMenuSubContent({
|
||||
className,
|
||||
...props
|
||||
}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {
|
||||
return (
|
||||
<DropdownMenuPrimitive.SubContent
|
||||
data-slot="dropdown-menu-sub-content"
|
||||
className={cn("z-50 min-w-36 origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-3xl bg-popover p-1.5 text-popover-foreground shadow-lg ring-1 ring-foreground/5 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 dark:ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className )}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
export {
|
||||
DropdownMenu,
|
||||
DropdownMenuPortal,
|
||||
DropdownMenuTrigger,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuGroup,
|
||||
DropdownMenuLabel,
|
||||
DropdownMenuItem,
|
||||
DropdownMenuCheckboxItem,
|
||||
DropdownMenuRadioGroup,
|
||||
DropdownMenuRadioItem,
|
||||
DropdownMenuSeparator,
|
||||
DropdownMenuShortcut,
|
||||
DropdownMenuSub,
|
||||
DropdownMenuSubTrigger,
|
||||
DropdownMenuSubContent,
|
||||
}
|
||||
@@ -233,7 +233,7 @@ function Sidebar({
|
||||
// Adjust the padding for floating and inset variants.
|
||||
variant === "floating" || variant === "inset"
|
||||
? "p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]"
|
||||
: "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l",
|
||||
: "group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=right]:border-l",
|
||||
className
|
||||
)}
|
||||
{...props}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
1044
src/features/loanOrders/components/loanOrderForm.tsx
Normal file
1044
src/features/loanOrders/components/loanOrderForm.tsx
Normal file
File diff suppressed because it is too large
Load Diff
478
src/index.css
478
src/index.css
@@ -1,386 +1,130 @@
|
||||
/* @import "tailwindcss";
|
||||
@import "tw-animate-css";
|
||||
@import "shadcn/tailwind.css";
|
||||
@import "@fontsource-variable/geist";
|
||||
|
||||
@custom-variant dark (&:is(.dark *));
|
||||
|
||||
:root {
|
||||
--text: #6b6375;
|
||||
--text-h: #08060d;
|
||||
--bg: #fff;
|
||||
--border: oklch(0.922 0 0);
|
||||
--code-bg: #f4f3ec;
|
||||
--accent: oklch(0.97 0 0);
|
||||
--accent-bg: rgba(170, 59, 255, 0.1);
|
||||
--accent-border: rgba(170, 59, 255, 0.5);
|
||||
--social-bg: rgba(244, 243, 236, 0.5);
|
||||
--shadow:
|
||||
rgba(0, 0, 0, 0.1) 0 10px 15px -3px, rgba(0, 0, 0, 0.05) 0 4px 6px -2px;
|
||||
|
||||
--background: oklch(1 0 0);
|
||||
--foreground: oklch(0.145 0 0);
|
||||
--card: oklch(1 0 0);
|
||||
--card-foreground: oklch(0.145 0 0);
|
||||
--popover: oklch(1 0 0);
|
||||
--popover-foreground: oklch(0.145 0 0);
|
||||
--primary: oklch(0.205 0 0);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--secondary: oklch(0.97 0 0);
|
||||
--secondary-foreground: oklch(0.205 0 0);
|
||||
--muted: oklch(0.97 0 0);
|
||||
--muted-foreground: oklch(0.556 0 0);
|
||||
--accent-foreground: oklch(0.205 0 0);
|
||||
--destructive: oklch(0.577 0.245 27.325);
|
||||
--input: oklch(0.922 0 0);
|
||||
--ring: oklch(0.708 0 0);
|
||||
--chart-1: oklch(0.87 0 0);
|
||||
--chart-2: oklch(0.556 0 0);
|
||||
--chart-3: oklch(0.439 0 0);
|
||||
--chart-4: oklch(0.371 0 0);
|
||||
--chart-5: oklch(0.269 0 0);
|
||||
--radius: 0.625rem;
|
||||
--sidebar: oklch(0.985 0 0);
|
||||
--sidebar-foreground: oklch(0.145 0 0);
|
||||
--sidebar-primary: oklch(0.205 0 0);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
--sidebar-accent: oklch(0.97 0 0);
|
||||
--sidebar-accent-foreground: oklch(0.205 0 0);
|
||||
--sidebar-border: oklch(0.922 0 0);
|
||||
--sidebar-ring: oklch(0.708 0 0);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--text: #9ca3af;
|
||||
--text-h: #f3f4f6;
|
||||
--bg: #16171d;
|
||||
--border: #2e303a;
|
||||
--code-bg: #1f2028;
|
||||
--accent: #c084fc;
|
||||
--accent-bg: rgba(192, 132, 252, 0.15);
|
||||
--accent-border: rgba(192, 132, 252, 0.5);
|
||||
--social-bg: rgba(47, 48, 58, 0.5);
|
||||
--shadow:
|
||||
rgba(0, 0, 0, 0.4) 0 10px 15px -3px, rgba(0, 0, 0, 0.25) 0 4px 6px -2px;
|
||||
}
|
||||
|
||||
#social .button-icon {
|
||||
filter: invert(1) brightness(2);
|
||||
}
|
||||
}
|
||||
|
||||
:root {
|
||||
--background: oklch(0.98 0.005 240);
|
||||
--foreground: oklch(0.15 0.02 250);
|
||||
--card: oklch(1 0 0);
|
||||
--card-foreground: oklch(0.15 0.02 250);
|
||||
--primary: oklch(0.35 0.12 250);
|
||||
--primary-foreground: oklch(0.98 0 0);
|
||||
--secondary: oklch(0.93 0.02 240);
|
||||
--secondary-foreground: oklch(0.25 0.08 250);
|
||||
--muted: oklch(0.95 0.01 240);
|
||||
--muted-foreground: oklch(0.5 0.04 250);
|
||||
--accent: oklch(0.93 0.02 240);
|
||||
--accent-foreground: oklch(0.25 0.08 250);
|
||||
--destructive: oklch(0.577 0.245 27.325);
|
||||
--border: oklch(0.88 0.02 240);
|
||||
--input: oklch(0.88 0.02 240);
|
||||
--ring: oklch(0.45 0.12 250);
|
||||
--sidebar: oklch(0.2 0.06 255);
|
||||
--sidebar-foreground: oklch(0.9 0.02 240);
|
||||
--sidebar-primary: oklch(0.65 0.15 200);
|
||||
--sidebar-primary-foreground: oklch(0.1 0.02 250);
|
||||
--sidebar-accent: oklch(0.28 0.07 255);
|
||||
--sidebar-accent-foreground: oklch(0.95 0.01 240);
|
||||
--sidebar-border: oklch(0.3 0.06 255);
|
||||
--sidebar-ring: oklch(0.55 0.12 250);
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@theme inline {
|
||||
--font-heading: var(--font-sans);
|
||||
--font-sans: "Geist Variable", sans-serif;
|
||||
--color-sidebar-ring: var(--sidebar-ring);
|
||||
--color-sidebar-border: var(--sidebar-border);
|
||||
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
||||
--color-sidebar-accent: var(--sidebar-accent);
|
||||
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
||||
--color-sidebar-primary: var(--sidebar-primary);
|
||||
--color-sidebar-foreground: var(--sidebar-foreground);
|
||||
--color-sidebar: var(--sidebar);
|
||||
--color-chart-5: var(--chart-5);
|
||||
--color-chart-4: var(--chart-4);
|
||||
--color-chart-3: var(--chart-3);
|
||||
--color-chart-2: var(--chart-2);
|
||||
--color-chart-1: var(--chart-1);
|
||||
--color-ring: var(--ring);
|
||||
--color-input: var(--input);
|
||||
--color-border: var(--border);
|
||||
--color-destructive: var(--destructive);
|
||||
--color-accent-foreground: var(--accent-foreground);
|
||||
--color-accent: var(--accent);
|
||||
--color-muted-foreground: var(--muted-foreground);
|
||||
--color-muted: var(--muted);
|
||||
--color-secondary-foreground: var(--secondary-foreground);
|
||||
--color-secondary: var(--secondary);
|
||||
--color-primary-foreground: var(--primary-foreground);
|
||||
--color-primary: var(--primary);
|
||||
--color-popover-foreground: var(--popover-foreground);
|
||||
--color-popover: var(--popover);
|
||||
--color-card-foreground: var(--card-foreground);
|
||||
--color-card: var(--card);
|
||||
--color-foreground: var(--foreground);
|
||||
--color-background: var(--background);
|
||||
--radius-sm: calc(var(--radius) * 0.6);
|
||||
--radius-md: calc(var(--radius) * 0.8);
|
||||
--radius-lg: var(--radius);
|
||||
--radius-xl: calc(var(--radius) * 1.4);
|
||||
--radius-2xl: calc(var(--radius) * 1.8);
|
||||
--radius-3xl: calc(var(--radius) * 2.2);
|
||||
--radius-4xl: calc(var(--radius) * 2.6);
|
||||
}
|
||||
|
||||
.dark {
|
||||
--background: oklch(0.20 0.025 255);
|
||||
--foreground: oklch(0.93 0.012 240);
|
||||
--card: oklch(0.25 0.028 255);
|
||||
--card-foreground: oklch(0.93 0.012 240);
|
||||
--popover: oklch(0.25 0.028 255);
|
||||
--popover-foreground: oklch(0.93 0.012 240);
|
||||
--primary: oklch(0.68 0.18 230);
|
||||
--primary-foreground: oklch(0.1 0.02 255);
|
||||
--secondary: oklch(0.30 0.04 255);
|
||||
--secondary-foreground: oklch(0.90 0.012 240);
|
||||
--muted: oklch(0.30 0.04 255);
|
||||
--muted-foreground: oklch(0.65 0.055 250);
|
||||
--accent: oklch(0.33 0.05 255);
|
||||
--accent-foreground: oklch(0.92 0.012 240);
|
||||
--destructive: oklch(0.65 0.22 25);
|
||||
--border: oklch(0.36 0.05 255);
|
||||
--input: oklch(0.30 0.04 255);
|
||||
--ring: oklch(0.60 0.16 230);
|
||||
--sidebar: oklch(0.17 0.022 260);
|
||||
--sidebar-foreground: oklch(0.90 0.012 240);
|
||||
--sidebar-primary: oklch(0.68 0.18 230);
|
||||
--sidebar-primary-foreground: oklch(0.98 0 0);
|
||||
--sidebar-accent: oklch(0.26 0.03 258);
|
||||
--sidebar-accent-foreground: oklch(0.90 0.012 240);
|
||||
--sidebar-border: oklch(0.30 0.035 258);
|
||||
--sidebar-ring: oklch(0.60 0.16 230);
|
||||
|
||||
--chart-1: oklch(0.68 0.18 230);
|
||||
--chart-2: oklch(0.70 0.17 155);
|
||||
--chart-3: oklch(0.74 0.16 85);
|
||||
--chart-4: oklch(0.68 0.22 25);
|
||||
--chart-5: oklch(0.70 0.15 290);
|
||||
}
|
||||
|
||||
@layer base {
|
||||
* {
|
||||
@apply border-border outline-ring/50;
|
||||
}
|
||||
body {
|
||||
@apply bg-background text-foreground;
|
||||
}
|
||||
html {
|
||||
@apply font-sans;
|
||||
}
|
||||
} */
|
||||
|
||||
|
||||
@import "tailwindcss";
|
||||
@import "tw-animate-css";
|
||||
@import "shadcn/tailwind.css";
|
||||
@import "@fontsource-variable/geist";
|
||||
@import "@fontsource-variable/inter";
|
||||
|
||||
@custom-variant dark (&:is(.dark *));
|
||||
|
||||
:root {
|
||||
--text: #6b6375;
|
||||
--text-h: #08060d;
|
||||
--bg: #fff;
|
||||
--border: oklch(0.922 0 0);
|
||||
--code-bg: #f4f3ec;
|
||||
--accent: oklch(0.97 0 0);
|
||||
--accent-bg: rgba(170, 59, 255, 0.1);
|
||||
--accent-border: rgba(170, 59, 255, 0.5);
|
||||
--social-bg: rgba(244, 243, 236, 0.5);
|
||||
--shadow:
|
||||
rgba(0, 0, 0, 0.1) 0 10px 15px -3px, rgba(0, 0, 0, 0.05) 0 4px 6px -2px;
|
||||
|
||||
--background: oklch(1 0 0);
|
||||
--foreground: oklch(0.145 0 0);
|
||||
--card: oklch(1 0 0);
|
||||
--card-foreground: oklch(0.145 0 0);
|
||||
--popover: oklch(1 0 0);
|
||||
--popover-foreground: oklch(0.145 0 0);
|
||||
--primary: oklch(0.205 0 0);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--secondary: oklch(0.97 0 0);
|
||||
--secondary-foreground: oklch(0.205 0 0);
|
||||
--muted: oklch(0.97 0 0);
|
||||
--muted-foreground: oklch(0.556 0 0);
|
||||
--accent-foreground: oklch(0.205 0 0);
|
||||
--destructive: oklch(0.577 0.245 27.325);
|
||||
--input: oklch(0.922 0 0);
|
||||
--ring: oklch(0.708 0 0);
|
||||
--chart-1: oklch(0.87 0 0);
|
||||
--chart-2: oklch(0.556 0 0);
|
||||
--chart-3: oklch(0.439 0 0);
|
||||
--chart-4: oklch(0.371 0 0);
|
||||
--chart-5: oklch(0.269 0 0);
|
||||
--radius: 0.625rem;
|
||||
--sidebar: oklch(0.985 0 0);
|
||||
--sidebar-foreground: oklch(0.145 0 0);
|
||||
--sidebar-primary: oklch(0.205 0 0);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
--sidebar-accent: oklch(0.97 0 0);
|
||||
--sidebar-accent-foreground: oklch(0.205 0 0);
|
||||
--sidebar-border: oklch(0.922 0 0);
|
||||
--sidebar-ring: oklch(0.708 0 0);
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--text: #9ca3af;
|
||||
--text-h: #f3f4f6;
|
||||
--bg: #16171d;
|
||||
--border: #2e303a;
|
||||
--code-bg: #1f2028;
|
||||
--accent: #c084fc;
|
||||
--accent-bg: rgba(192, 132, 252, 0.15);
|
||||
--accent-border: rgba(192, 132, 252, 0.5);
|
||||
--social-bg: rgba(47, 48, 58, 0.5);
|
||||
--shadow:
|
||||
rgba(0, 0, 0, 0.4) 0 10px 15px -3px, rgba(0, 0, 0, 0.25) 0 4px 6px -2px;
|
||||
}
|
||||
|
||||
#social .button-icon {
|
||||
filter: invert(1) brightness(2);
|
||||
}
|
||||
}
|
||||
|
||||
:root {
|
||||
--background: oklch(0.98 0.003 250);
|
||||
--foreground: oklch(0.25 0.02 250);
|
||||
--card: oklch(1 0 0);
|
||||
--card-foreground: oklch(0.25 0.02 250);
|
||||
--primary: oklch(0.45 0.06 250);
|
||||
--primary-foreground: oklch(0.98 0 0);
|
||||
--secondary: oklch(0.96 0.005 250);
|
||||
--secondary-foreground: oklch(0.35 0.02 250);
|
||||
--muted: oklch(0.96 0.005 250);
|
||||
--muted-foreground: oklch(0.50 0.02 250);
|
||||
--accent: oklch(0.96 0.005 250);
|
||||
--accent-foreground: oklch(0.35 0.02 250);
|
||||
--destructive: oklch(0.577 0.245 27.325);
|
||||
--border: oklch(0.90 0.01 250);
|
||||
--input: oklch(0.90 0.01 250);
|
||||
--ring: oklch(0.45 0.06 250);
|
||||
--sidebar: oklch(0.97 0.005 250);
|
||||
--sidebar-foreground: oklch(0.30 0.02 250);
|
||||
--sidebar-primary: oklch(0.45 0.06 250);
|
||||
--sidebar-primary-foreground: oklch(0.98 0 0);
|
||||
--sidebar-accent: oklch(0.93 0.008 250);
|
||||
--sidebar-accent-foreground: oklch(0.30 0.02 250);
|
||||
--sidebar-border: oklch(0.88 0.012 250);
|
||||
--sidebar-ring: oklch(0.45 0.06 250);
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@theme inline {
|
||||
--font-heading: var(--font-sans);
|
||||
--font-sans: "Geist Variable", sans-serif;
|
||||
--color-sidebar-ring: var(--sidebar-ring);
|
||||
--color-sidebar-border: var(--sidebar-border);
|
||||
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
||||
--color-sidebar-accent: var(--sidebar-accent);
|
||||
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
||||
--color-sidebar-primary: var(--sidebar-primary);
|
||||
--color-sidebar-foreground: var(--sidebar-foreground);
|
||||
--color-sidebar: var(--sidebar);
|
||||
--color-chart-5: var(--chart-5);
|
||||
--color-chart-4: var(--chart-4);
|
||||
--color-chart-3: var(--chart-3);
|
||||
--color-chart-2: var(--chart-2);
|
||||
--color-chart-1: var(--chart-1);
|
||||
--color-ring: var(--ring);
|
||||
--color-input: var(--input);
|
||||
--color-border: var(--border);
|
||||
--color-destructive: var(--destructive);
|
||||
--color-accent-foreground: var(--accent-foreground);
|
||||
--color-accent: var(--accent);
|
||||
--color-muted-foreground: var(--muted-foreground);
|
||||
--color-muted: var(--muted);
|
||||
--color-secondary-foreground: var(--secondary-foreground);
|
||||
--color-secondary: var(--secondary);
|
||||
--color-primary-foreground: var(--primary-foreground);
|
||||
--color-primary: var(--primary);
|
||||
--color-popover-foreground: var(--popover-foreground);
|
||||
--color-popover: var(--popover);
|
||||
--color-card-foreground: var(--card-foreground);
|
||||
--color-card: var(--card);
|
||||
--color-foreground: var(--foreground);
|
||||
--color-background: var(--background);
|
||||
--radius-sm: calc(var(--radius) * 0.6);
|
||||
--radius-md: calc(var(--radius) * 0.8);
|
||||
--radius-lg: var(--radius);
|
||||
--radius-xl: calc(var(--radius) * 1.4);
|
||||
--radius-2xl: calc(var(--radius) * 1.8);
|
||||
--radius-3xl: calc(var(--radius) * 2.2);
|
||||
--radius-4xl: calc(var(--radius) * 2.6);
|
||||
--font-heading: var(--font-sans);
|
||||
--font-sans: 'Inter Variable', sans-serif;
|
||||
--color-sidebar-ring: var(--sidebar-ring);
|
||||
--color-sidebar-border: var(--sidebar-border);
|
||||
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
||||
--color-sidebar-accent: var(--sidebar-accent);
|
||||
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
||||
--color-sidebar-primary: var(--sidebar-primary);
|
||||
--color-sidebar-foreground: var(--sidebar-foreground);
|
||||
--color-sidebar: var(--sidebar);
|
||||
--color-chart-5: var(--chart-5);
|
||||
--color-chart-4: var(--chart-4);
|
||||
--color-chart-3: var(--chart-3);
|
||||
--color-chart-2: var(--chart-2);
|
||||
--color-chart-1: var(--chart-1);
|
||||
--color-ring: var(--ring);
|
||||
--color-input: var(--input);
|
||||
--color-border: var(--border);
|
||||
--color-destructive: var(--destructive);
|
||||
--color-accent-foreground: var(--accent-foreground);
|
||||
--color-accent: var(--accent);
|
||||
--color-muted-foreground: var(--muted-foreground);
|
||||
--color-muted: var(--muted);
|
||||
--color-secondary-foreground: var(--secondary-foreground);
|
||||
--color-secondary: var(--secondary);
|
||||
--color-primary-foreground: var(--primary-foreground);
|
||||
--color-primary: var(--primary);
|
||||
--color-popover-foreground: var(--popover-foreground);
|
||||
--color-popover: var(--popover);
|
||||
--color-card-foreground: var(--card-foreground);
|
||||
--color-card: var(--card);
|
||||
--color-foreground: var(--foreground);
|
||||
--color-background: var(--background);
|
||||
--radius-sm: calc(var(--radius) * 0.6);
|
||||
--radius-md: calc(var(--radius) * 0.8);
|
||||
--radius-lg: var(--radius);
|
||||
--radius-xl: calc(var(--radius) * 1.4);
|
||||
--radius-2xl: calc(var(--radius) * 1.8);
|
||||
--radius-3xl: calc(var(--radius) * 2.2);
|
||||
--radius-4xl: calc(var(--radius) * 2.6);
|
||||
}
|
||||
|
||||
:root {
|
||||
--background: oklch(1 0 0);
|
||||
--foreground: oklch(0.141 0.005 285.823);
|
||||
--card: oklch(1 0 0);
|
||||
--card-foreground: oklch(0.141 0.005 285.823);
|
||||
--popover: oklch(1 0 0);
|
||||
--popover-foreground: oklch(0.141 0.005 285.823);
|
||||
--primary: oklch(0.21 0.006 285.885);
|
||||
--primary-foreground: oklch(0.985 0 0);
|
||||
--secondary: oklch(0.967 0.001 286.375);
|
||||
--secondary-foreground: oklch(0.21 0.006 285.885);
|
||||
--muted: oklch(0.967 0.001 286.375);
|
||||
--muted-foreground: oklch(0.552 0.016 285.938);
|
||||
--accent: oklch(0.967 0.001 286.375);
|
||||
--accent-foreground: oklch(0.21 0.006 285.885);
|
||||
--destructive: oklch(0.577 0.245 27.325);
|
||||
--border: oklch(0.92 0.004 286.32);
|
||||
--input: oklch(0.92 0.004 286.32);
|
||||
--ring: oklch(0.705 0.015 286.067);
|
||||
--chart-1: oklch(0.871 0.006 286.286);
|
||||
--chart-2: oklch(0.552 0.016 285.938);
|
||||
--chart-3: oklch(0.442 0.017 285.786);
|
||||
--chart-4: oklch(0.37 0.013 285.805);
|
||||
--chart-5: oklch(0.274 0.006 286.033);
|
||||
--radius: 0.625rem;
|
||||
--sidebar: oklch(0.985 0 0);
|
||||
--sidebar-foreground: oklch(0.141 0.005 285.823);
|
||||
--sidebar-primary: oklch(0.21 0.006 285.885);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
--sidebar-accent: oklch(0.967 0.001 286.375);
|
||||
--sidebar-accent-foreground: oklch(0.21 0.006 285.885);
|
||||
--sidebar-border: oklch(0.92 0.004 286.32);
|
||||
--sidebar-ring: oklch(0.705 0.015 286.067);
|
||||
}
|
||||
|
||||
.dark {
|
||||
--background: oklch(0.18 0.015 250);
|
||||
--foreground: oklch(0.92 0.01 250);
|
||||
--card: oklch(0.22 0.018 250);
|
||||
--card-foreground: oklch(0.92 0.01 250);
|
||||
--popover: oklch(0.22 0.018 250);
|
||||
--popover-foreground: oklch(0.92 0.01 250);
|
||||
--primary: oklch(0.65 0.08 250);
|
||||
--primary-foreground: oklch(0.12 0.01 250);
|
||||
--secondary: oklch(0.28 0.02 250);
|
||||
--secondary-foreground: oklch(0.90 0.01 250);
|
||||
--muted: oklch(0.28 0.02 250);
|
||||
--muted-foreground: oklch(0.65 0.02 250);
|
||||
--accent: oklch(0.30 0.025 250);
|
||||
--accent-foreground: oklch(0.90 0.01 250);
|
||||
--destructive: oklch(0.65 0.22 25);
|
||||
--border: oklch(0.35 0.025 250);
|
||||
--input: oklch(0.28 0.02 250);
|
||||
--ring: oklch(0.60 0.08 250);
|
||||
--sidebar: oklch(0.16 0.012 250);
|
||||
--sidebar-foreground: oklch(0.90 0.01 250);
|
||||
--sidebar-primary: oklch(0.65 0.08 250);
|
||||
--sidebar-primary-foreground: oklch(0.98 0 0);
|
||||
--sidebar-accent: oklch(0.24 0.018 250);
|
||||
--sidebar-accent-foreground: oklch(0.90 0.01 250);
|
||||
--sidebar-border: oklch(0.30 0.02 250);
|
||||
--sidebar-ring: oklch(0.60 0.08 250);
|
||||
|
||||
--chart-1: oklch(0.65 0.08 250);
|
||||
--chart-2: oklch(0.65 0.12 180);
|
||||
--chart-3: oklch(0.72 0.10 90);
|
||||
--chart-4: oklch(0.65 0.15 25);
|
||||
--chart-5: oklch(0.62 0.12 330);
|
||||
--background: oklch(0.141 0.005 285.823);
|
||||
--foreground: oklch(0.985 0 0);
|
||||
--card: oklch(0.21 0.006 285.885);
|
||||
--card-foreground: oklch(0.985 0 0);
|
||||
--popover: oklch(0.21 0.006 285.885);
|
||||
--popover-foreground: oklch(0.985 0 0);
|
||||
--primary: oklch(0.92 0.004 286.32);
|
||||
--primary-foreground: oklch(0.21 0.006 285.885);
|
||||
--secondary: oklch(0.274 0.006 286.033);
|
||||
--secondary-foreground: oklch(0.985 0 0);
|
||||
--muted: oklch(0.274 0.006 286.033);
|
||||
--muted-foreground: oklch(0.705 0.015 286.067);
|
||||
--accent: oklch(0.274 0.006 286.033);
|
||||
--accent-foreground: oklch(0.985 0 0);
|
||||
--destructive: oklch(0.704 0.191 22.216);
|
||||
--border: oklch(1 0 0 / 10%);
|
||||
--input: oklch(1 0 0 / 15%);
|
||||
--ring: oklch(0.552 0.016 285.938);
|
||||
--chart-1: oklch(0.871 0.006 286.286);
|
||||
--chart-2: oklch(0.552 0.016 285.938);
|
||||
--chart-3: oklch(0.442 0.017 285.786);
|
||||
--chart-4: oklch(0.37 0.013 285.805);
|
||||
--chart-5: oklch(0.274 0.006 286.033);
|
||||
--sidebar: oklch(0.21 0.006 285.885);
|
||||
--sidebar-foreground: oklch(0.985 0 0);
|
||||
--sidebar-primary: oklch(0.488 0.243 264.376);
|
||||
--sidebar-primary-foreground: oklch(0.985 0 0);
|
||||
--sidebar-accent: oklch(0.274 0.006 286.033);
|
||||
--sidebar-accent-foreground: oklch(0.985 0 0);
|
||||
--sidebar-border: oklch(1 0 0 / 10%);
|
||||
--sidebar-ring: oklch(0.552 0.016 285.938);
|
||||
}
|
||||
|
||||
@layer base {
|
||||
* {
|
||||
@apply border-border outline-ring/50;
|
||||
}
|
||||
}
|
||||
body {
|
||||
@apply bg-background text-foreground;
|
||||
}
|
||||
}
|
||||
html {
|
||||
@apply font-sans;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useState, useEffect, useRef } from 'react'
|
||||
import { Outlet, Link, useLocation } from 'react-router-dom'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import React, { useState, useEffect, useRef } from "react";
|
||||
import { Outlet, Link, useLocation } from "react-router-dom";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import {
|
||||
Sidebar,
|
||||
SidebarContent,
|
||||
@@ -15,16 +15,15 @@ import {
|
||||
SidebarProvider,
|
||||
SidebarTrigger,
|
||||
useSidebar,
|
||||
} from '@/components/ui/sidebar'
|
||||
import { useAuthStore } from '@/app/store/authStore'
|
||||
import { useThemeStore } from '@/app/store/themeStore'
|
||||
import { useI18nStore } from '@/app/store/i18nStore'
|
||||
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible'
|
||||
} from "@/components/ui/sidebar";
|
||||
import { useAuthStore } from "@/app/store/authStore";
|
||||
import { useThemeStore } from "@/app/store/themeStore";
|
||||
import { useI18nStore } from "@/app/store/i18nStore";
|
||||
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
||||
import {
|
||||
Sun,
|
||||
Moon,
|
||||
Bell,
|
||||
ChevronDown,
|
||||
LayoutDashboard,
|
||||
FileText,
|
||||
Users,
|
||||
@@ -35,8 +34,11 @@ import {
|
||||
Globe,
|
||||
Terminal,
|
||||
ChevronRight,
|
||||
} from 'lucide-react'
|
||||
import { TooltipProvider } from '@/components/ui/tooltip'
|
||||
LogOut,
|
||||
ChevronsUpDown,
|
||||
User,
|
||||
} from "lucide-react";
|
||||
import { TooltipProvider } from "@/components/ui/tooltip";
|
||||
import {
|
||||
Breadcrumb,
|
||||
BreadcrumbItem,
|
||||
@@ -44,72 +46,90 @@ import {
|
||||
BreadcrumbList,
|
||||
BreadcrumbPage,
|
||||
BreadcrumbSeparator,
|
||||
} from '@/components/ui/breadcrumb'
|
||||
import { cn } from '@/lib/utils'
|
||||
import Icon from '@/assets/icon.svg'
|
||||
} from "@/components/ui/breadcrumb";
|
||||
|
||||
import { cn } from "@/lib/utils";
|
||||
import Icon from "@/assets/icon.svg";
|
||||
|
||||
// ─── Collapsible wrappers ──────────────────────────────────────────────────────
|
||||
|
||||
const Collapsible = CollapsiblePrimitive.Root
|
||||
const CollapsibleTrigger = CollapsiblePrimitive.Trigger
|
||||
const CollapsibleContent = CollapsiblePrimitive.Content
|
||||
const Collapsible = CollapsiblePrimitive.Root;
|
||||
const CollapsibleTrigger = CollapsiblePrimitive.Trigger;
|
||||
const CollapsibleContent = CollapsiblePrimitive.Content;
|
||||
|
||||
// ─── Types ────────────────────────────────────────────────────────────────────
|
||||
|
||||
type NavSubSubItem = { title: string; url: string }
|
||||
type NavSubItem = { title: string; url?: string; items?: NavSubSubItem[] }
|
||||
type NavSubSubItem = { title: string; url: string };
|
||||
type NavSubItem = { title: string; url?: string; items?: NavSubSubItem[] };
|
||||
type NavItem = {
|
||||
title: string
|
||||
url?: string
|
||||
icon: React.ElementType
|
||||
items?: NavSubItem[]
|
||||
}
|
||||
title: string;
|
||||
url?: string;
|
||||
icon: React.ElementType;
|
||||
items?: NavSubItem[];
|
||||
};
|
||||
type NavGroup = {
|
||||
label?: string;
|
||||
items: NavItem[];
|
||||
};
|
||||
|
||||
// ─── Nav helpers ──────────────────────────────────────────────────────────────
|
||||
|
||||
function isActiveItem(item: NavItem | NavSubItem, pathname: string): boolean {
|
||||
if ('url' in item && item.url && pathname === item.url) return true
|
||||
if (item.items) return item.items.some((c) => isActiveItem(c, pathname))
|
||||
return false
|
||||
if ("url" in item && item.url && pathname === item.url) return true;
|
||||
if (item.items) return item.items.some((c) => isActiveItem(c, pathname));
|
||||
return false;
|
||||
}
|
||||
|
||||
// ─── Sub-sub collapsible (3rd level) ──────────────────────────────────────────
|
||||
|
||||
function NavSubGroup({ subItem, pathname }: { subItem: NavSubItem; pathname: string }) {
|
||||
const active = subItem.items?.some((s) => pathname === s.url) ?? false
|
||||
const [open, setOpen] = useState(active)
|
||||
function NavSubGroup({
|
||||
subItem,
|
||||
pathname,
|
||||
}: {
|
||||
subItem: NavSubItem;
|
||||
pathname: string;
|
||||
}) {
|
||||
const active = subItem.items?.some((s) => pathname === s.url) ?? false;
|
||||
const [open, setOpen] = useState(active);
|
||||
|
||||
useEffect(() => {
|
||||
if (active) setOpen(true)
|
||||
}, [active])
|
||||
if (active) setOpen(true);
|
||||
}, [active]);
|
||||
|
||||
return (
|
||||
<Collapsible open={open} onOpenChange={setOpen}>
|
||||
<CollapsibleTrigger asChild>
|
||||
<button
|
||||
className={cn(
|
||||
'flex w-full items-center justify-between px-2 py-1.5 mt-1',
|
||||
'text-[10px] font-bold uppercase tracking-widest select-none',
|
||||
'text-sidebar-foreground/40 hover:text-sidebar-foreground/70 transition-colors duration-150 rounded-sm',
|
||||
"flex w-full items-center justify-between px-2 py-1 mt-1",
|
||||
"text-[10px] font-semibold uppercase tracking-widest select-none",
|
||||
"text-sidebar-foreground/40 hover:text-sidebar-foreground/60 transition-colors duration-150 rounded-sm",
|
||||
)}
|
||||
>
|
||||
<span>{subItem.title}</span>
|
||||
<ChevronRight
|
||||
size={10}
|
||||
className={cn('transition-transform duration-200', open && 'rotate-90')}
|
||||
className={cn(
|
||||
"transition-transform duration-200",
|
||||
open && "rotate-90",
|
||||
)}
|
||||
/>
|
||||
</button>
|
||||
</CollapsibleTrigger>
|
||||
|
||||
<CollapsibleContent
|
||||
className={cn(
|
||||
'overflow-hidden data-[state=open]:animate-collapsible-down data-[state=closed]:animate-collapsible-up',
|
||||
)}
|
||||
>
|
||||
<SidebarMenuSub className="border-l border-sidebar-border/50 ml-2 pl-2 mt-0.5 gap-0.5">
|
||||
<CollapsibleContent className="overflow-hidden data-[state=open]:animate-collapsible-down data-[state=closed]:animate-collapsible-up">
|
||||
<SidebarMenuSub className="border-l-2 border-sidebar-border/40 ml-3 pl-2 mt-0.5 gap-0">
|
||||
{subItem.items?.map((item, i) => (
|
||||
<SidebarMenuSubItem key={i}>
|
||||
<SidebarMenuSubButton asChild isActive={pathname === item.url} size="sm">
|
||||
<SidebarMenuSubButton
|
||||
asChild
|
||||
isActive={pathname === item.url}
|
||||
size="sm"
|
||||
className={cn(
|
||||
"rounded-md text-sidebar-foreground/60 hover:text-sidebar-foreground hover:bg-sidebar-accent/60",
|
||||
"data-[active=true]:text-sidebar-foreground data-[active=true]:font-medium data-[active=true]:bg-sidebar-accent",
|
||||
)}
|
||||
>
|
||||
<Link to={item.url}>
|
||||
<span>{item.title}</span>
|
||||
</Link>
|
||||
@@ -119,35 +139,48 @@ function NavSubGroup({ subItem, pathname }: { subItem: NavSubItem; pathname: str
|
||||
</SidebarMenuSub>
|
||||
</CollapsibleContent>
|
||||
</Collapsible>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// ─── Top-level collapsible nav item ──────────────────────────────────────────
|
||||
|
||||
function NavGroupItem({ item }: { item: NavItem }) {
|
||||
const { pathname } = useLocation()
|
||||
const { state } = useSidebar() // 'expanded' | 'collapsed'
|
||||
const collapsed = state === 'collapsed'
|
||||
const active = isActiveItem(item, pathname)
|
||||
const [open, setOpen] = useState(active)
|
||||
const { pathname } = useLocation();
|
||||
const { state } = useSidebar();
|
||||
const collapsed = state === "collapsed";
|
||||
const active = isActiveItem(item, pathname);
|
||||
const [open, setOpen] = useState(active);
|
||||
|
||||
useEffect(() => {
|
||||
if (active && !collapsed) setOpen(true)
|
||||
}, [active, collapsed])
|
||||
if (active && !collapsed) setOpen(true);
|
||||
}, [active, collapsed]);
|
||||
|
||||
return (
|
||||
<Collapsible open={!collapsed && open} onOpenChange={(v) => !collapsed && setOpen(v)}>
|
||||
<Collapsible
|
||||
open={!collapsed && open}
|
||||
onOpenChange={(v) => !collapsed && setOpen(v)}
|
||||
>
|
||||
<SidebarMenuItem>
|
||||
<CollapsibleTrigger asChild>
|
||||
<SidebarMenuButton isActive={active} tooltip={item.title}>
|
||||
<item.icon />
|
||||
<SidebarMenuButton
|
||||
isActive={active}
|
||||
tooltip={item.title}
|
||||
className={cn(
|
||||
"group/btn rounded-md font-medium",
|
||||
"text-sidebar-foreground/70 hover:text-sidebar-foreground hover:bg-sidebar-accent/70",
|
||||
"data-[active=true]:text-sidebar-foreground data-[active=true]:bg-sidebar-accent",
|
||||
)}
|
||||
>
|
||||
<item.icon
|
||||
className={cn("shrink-0", active && "text-sidebar-primary")}
|
||||
/>
|
||||
<span>{item.title}</span>
|
||||
<ChevronRight
|
||||
size={14}
|
||||
className={cn(
|
||||
'ml-auto shrink-0 transition-transform duration-200',
|
||||
'group-data-[collapsible=icon]:hidden', // hide when icon-only
|
||||
open && !collapsed && 'rotate-90',
|
||||
"ml-auto shrink-0 text-sidebar-foreground/40 transition-transform duration-200",
|
||||
"group-data-[collapsible=icon]:hidden",
|
||||
open && !collapsed && "rotate-90",
|
||||
)}
|
||||
/>
|
||||
</SidebarMenuButton>
|
||||
@@ -155,236 +188,423 @@ function NavGroupItem({ item }: { item: NavItem }) {
|
||||
</SidebarMenuItem>
|
||||
|
||||
<CollapsibleContent className="overflow-hidden data-[state=open]:animate-collapsible-down data-[state=closed]:animate-collapsible-up">
|
||||
<SidebarMenuSub>
|
||||
<SidebarMenuSub className="border-l-2 border-sidebar-border/40 ml-3 pl-2 mt-0.5 gap-0">
|
||||
{item.items?.map((subItem, i) => {
|
||||
if (subItem.items) {
|
||||
return <NavSubGroup key={i} subItem={subItem} pathname={pathname} />
|
||||
return (
|
||||
<NavSubGroup key={i} subItem={subItem} pathname={pathname} />
|
||||
);
|
||||
}
|
||||
return (
|
||||
<SidebarMenuSubItem key={i}>
|
||||
<SidebarMenuSubButton asChild isActive={pathname === subItem.url}>
|
||||
<Link to={subItem.url ?? '#'}>
|
||||
<SidebarMenuSubButton
|
||||
asChild
|
||||
isActive={pathname === subItem.url}
|
||||
className={cn(
|
||||
"rounded-md text-sidebar-foreground/60 hover:text-sidebar-foreground hover:bg-sidebar-accent/60",
|
||||
"data-[active=true]:text-sidebar-foreground data-[active=true]:font-medium data-[active=true]:bg-sidebar-accent",
|
||||
)}
|
||||
>
|
||||
<Link to={subItem.url ?? "#"}>
|
||||
<span>{subItem.title}</span>
|
||||
</Link>
|
||||
</SidebarMenuSubButton>
|
||||
</SidebarMenuSubItem>
|
||||
)
|
||||
);
|
||||
})}
|
||||
</SidebarMenuSub>
|
||||
</CollapsibleContent>
|
||||
</Collapsible>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// ─── Nav Group Label ──────────────────────────────────────────────────────────
|
||||
|
||||
function NavGroupLabel({ label }: { label: string }) {
|
||||
const { state } = useSidebar();
|
||||
const collapsed = state === "collapsed";
|
||||
|
||||
if (collapsed) {
|
||||
return <div className="my-1 h-px bg-sidebar-border/50" />;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="px-2 pb-1 pt-3">
|
||||
<p className="text-[10px] font-semibold uppercase tracking-widest text-sidebar-foreground/35 select-none">
|
||||
{label}
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
// ─── Sidebar ──────────────────────────────────────────────────────────────────
|
||||
|
||||
function AppSidebar() {
|
||||
const { t } = useTranslation()
|
||||
const { pathname } = useLocation()
|
||||
const { t } = useTranslation();
|
||||
const { pathname } = useLocation();
|
||||
const user = useAuthStore((s) => s.user);
|
||||
const logout = useAuthStore((s) => s.clearAuth);
|
||||
|
||||
const navItems: NavItem[] = [
|
||||
const navGroups: NavGroup[] = [
|
||||
{
|
||||
title: t('Dashboard', 'Baş sahypa'),
|
||||
url: '/dashboard',
|
||||
icon: LayoutDashboard,
|
||||
},
|
||||
{
|
||||
title: t('Orders', 'Sargytlar'),
|
||||
icon: FileText,
|
||||
items: [
|
||||
{
|
||||
title: t('Loan department', 'KARZ BÖLÜMI'),
|
||||
items: [
|
||||
{ title: t('Loan orders', 'Karz sargytlary'), url: '/loan-orders' },
|
||||
{ title: t('Loan order (Mobile)', 'Karz sargyt (Mobile)'), url: '/loan-order-mobiles' },
|
||||
{ title: t('Loan balance', 'Karzyň galyndysy'), url: '/loan-remaining' },
|
||||
{ title: t('Certificates', 'Karzyň ýapylandygy barada güwanamalar'), url: '/loan-paid-off-letters' },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: t('Card department', 'KART BÖLÜMI'),
|
||||
items: [
|
||||
{ title: t('Order new card', 'Täze kart açmak'), url: '/order-new-card' },
|
||||
{ title: t('Card transactions', 'Kart hereketleri'), url: '/card-transactions' },
|
||||
{ title: t('Card requisites', 'Kart rekwizitler'), url: '/card-requisites' },
|
||||
{ title: t('Card balances', 'Kart galyndylary'), url: '/card-balances' },
|
||||
{ title: t('Card pins', 'Kart pin bukjalar'), url: '/card-pins' },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: t('International payments', 'HALKARA TÖLEGLER'),
|
||||
items: [
|
||||
{ title: t('Visa/Master payments', 'Visa/Master tölegleri'), url: '/visa-master' },
|
||||
{ title: t('Sber payments', 'Sber tölegleri'), url: '/sber-payments' },
|
||||
],
|
||||
title: t("Dashboard", "Baş sahypa"),
|
||||
url: "/dashboard",
|
||||
icon: LayoutDashboard,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: t('Users', 'Ulanyjylar'),
|
||||
icon: Users,
|
||||
items: [
|
||||
{ title: t('Operators', 'Operatorlar'), url: '/users/operators' },
|
||||
{ title: t('Clients', 'Müşderiler'), url: '/users/clients' },
|
||||
{ title: t('All users', 'Ähli ulanyjylar'), url: '/users/all' },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: t('Settings', 'Sazlamalar'),
|
||||
icon: Settings,
|
||||
label: t("Operations", "Operasiýalar"),
|
||||
items: [
|
||||
{
|
||||
title: t('Users', 'ULANYJYLAR'),
|
||||
title: t("Orders", "Sargytlar"),
|
||||
icon: FileText,
|
||||
items: [
|
||||
{ title: t('Roles', 'Rollar'), url: '/settings/users/roles' },
|
||||
{ title: t('Permissions', 'Rugsatlar'), url: '/settings/users/permissions' },
|
||||
{
|
||||
title: t("Loan department", "Karz bölümi"),
|
||||
items: [
|
||||
{
|
||||
title: t("Loan orders", "Karz sargytlary"),
|
||||
url: "/loan-orders",
|
||||
},
|
||||
{
|
||||
title: t("Loan order (Mobile)", "Karz sargyt (Mobile)"),
|
||||
url: "/loan-order-mobiles",
|
||||
},
|
||||
{
|
||||
title: t("Loan balance", "Karzyň galyndysy"),
|
||||
url: "/loan-remaining",
|
||||
},
|
||||
{
|
||||
title: t("Certificates", "Güwanamalar"),
|
||||
url: "/loan-paid-off-letters",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: t("Card department", "Kart bölümi"),
|
||||
items: [
|
||||
{
|
||||
title: t("Order new card", "Täze kart açmak"),
|
||||
url: "/order-new-card",
|
||||
},
|
||||
{
|
||||
title: t("Card transactions", "Kart hereketleri"),
|
||||
url: "/card-transactions",
|
||||
},
|
||||
{
|
||||
title: t("Card requisites", "Kart rekwizitler"),
|
||||
url: "/card-requisites",
|
||||
},
|
||||
{
|
||||
title: t("Card balances", "Kart galyndylary"),
|
||||
url: "/card-balances",
|
||||
},
|
||||
{
|
||||
title: t("Card pins", "Kart pin bukjalar"),
|
||||
url: "/card-pins",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: t("International payments", "Halkara tölegler"),
|
||||
items: [
|
||||
{
|
||||
title: t("Visa/Master payments", "Visa/Master tölegleri"),
|
||||
url: "/visa-master",
|
||||
},
|
||||
{
|
||||
title: t("Sber payments", "Sber tölegleri"),
|
||||
url: "/sber-payments",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: t('Loan', 'KARZ'),
|
||||
title: t("Users", "Ulanyjylar"),
|
||||
icon: Users,
|
||||
items: [
|
||||
{ title: t('Loan types', 'Karz görnüşleri'), url: '/settings/loan/types' },
|
||||
{ title: t('Required Documents', 'Gerekli resminamalar'), url: '/settings/loan/documents' },
|
||||
{ title: t("Operators", "Operatorlar"), url: "/users/operators" },
|
||||
{ title: t("Clients", "Müşderiler"), url: "/users/clients" },
|
||||
{ title: t("All users", "Ähli ulanyjylar"), url: "/users/all" },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: t('Card', 'KART'),
|
||||
title: t("Currencies", "Walýutalar"),
|
||||
icon: DollarSign,
|
||||
items: [
|
||||
{ title: t('Card Issuance Reasons', 'Kartyň çykarylmagynyň sebäpleri'), url: '/settings/card/reasons' },
|
||||
{ title: t('Card types', 'Kart görnüşleri'), url: '/settings/card/types' },
|
||||
{
|
||||
title: t("Currency rates", "Walýuta kurslary"),
|
||||
url: "/currencies/rates",
|
||||
},
|
||||
{
|
||||
title: t(
|
||||
"Visa/Master, Sber Settings",
|
||||
"Visa/Master, Sber sazlamalary",
|
||||
),
|
||||
url: "/currencies/settings",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: t('Location', 'LOKASIÝA'),
|
||||
items: [
|
||||
{ title: t('Provinces', 'Etraplar'), url: '/settings/location/districts' },
|
||||
{ title: t('Branches', 'Şahamçalar'), url: '/settings/location/branches' },
|
||||
],
|
||||
},
|
||||
{
|
||||
title: t('Language', 'DIL'),
|
||||
items: [
|
||||
{ title: t('Locale Manager', 'Locale Manager'), url: '/settings/language/locale-manager' },
|
||||
{ title: t('Resources', 'Resources'), url: '/settings/language/resources' },
|
||||
],
|
||||
title: t("Online payment history", "Onlaýn töleg taryhy"),
|
||||
url: "/online-payments",
|
||||
icon: CreditCard,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: t('Currencies', 'Walýutalar'),
|
||||
icon: DollarSign,
|
||||
label: t("System", "Ulgam"),
|
||||
items: [
|
||||
{ title: t('Currency rates', 'Walýuta kurslary'), url: '/currencies/rates' },
|
||||
{ title: t('Visa/Master, Sber Settings', 'Visa/Master, Sber sazlamalary'), url: '/currencies/settings' },
|
||||
{
|
||||
title: t("Settings", "Sazlamalar"),
|
||||
icon: Settings,
|
||||
items: [
|
||||
{
|
||||
title: t("Users", "Ulanyjylar"),
|
||||
items: [
|
||||
{ title: t("Roles", "Rollar"), url: "/settings/users/roles" },
|
||||
{
|
||||
title: t("Permissions", "Rugsatlar"),
|
||||
url: "/settings/users/permissions",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: t("Loan", "Karz"),
|
||||
items: [
|
||||
{
|
||||
title: t("Loan types", "Karz görnüşleri"),
|
||||
url: "/settings/loan/types",
|
||||
},
|
||||
{
|
||||
title: t("Required Documents", "Gerekli resminamalar"),
|
||||
url: "/settings/loan/documents",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: t("Card", "Kart"),
|
||||
items: [
|
||||
{
|
||||
title: t(
|
||||
"Card Issuance Reasons",
|
||||
"Kartyň çykarylmagynyň sebäpleri",
|
||||
),
|
||||
url: "/settings/card/reasons",
|
||||
},
|
||||
{
|
||||
title: t("Card types", "Kart görnüşleri"),
|
||||
url: "/settings/card/types",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: t("Location", "Lokasiýa"),
|
||||
items: [
|
||||
{
|
||||
title: t("Provinces", "Etraplar"),
|
||||
url: "/settings/location/districts",
|
||||
},
|
||||
{
|
||||
title: t("Branches", "Şahamçalar"),
|
||||
url: "/settings/location/branches",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: t("Language", "Dil"),
|
||||
items: [
|
||||
{
|
||||
title: t("Locale Manager", "Locale Manager"),
|
||||
url: "/settings/language/locale-manager",
|
||||
},
|
||||
{
|
||||
title: t("Resources", "Resources"),
|
||||
url: "/settings/language/resources",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: t("Backups", "Bekaplar"),
|
||||
url: "/backups",
|
||||
icon: Database,
|
||||
},
|
||||
{
|
||||
title: t("Logs", "Loglar"),
|
||||
url: "/logs",
|
||||
icon: Terminal,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: t('Online payment history', 'Onlaýn töleg taryhy'),
|
||||
url: '/online-payments',
|
||||
icon: CreditCard,
|
||||
},
|
||||
{
|
||||
title: t('Backups', 'Bekaplar'),
|
||||
url: '/backups',
|
||||
icon: Database,
|
||||
},
|
||||
{
|
||||
title: t('Logs', 'Loglar'),
|
||||
url: '/logs',
|
||||
icon: Terminal,
|
||||
},
|
||||
]
|
||||
];
|
||||
|
||||
return (
|
||||
<Sidebar collapsible="icon" className="border-r border-sidebar-border">
|
||||
<Sidebar collapsible="icon">
|
||||
{/* Logo */}
|
||||
<SidebarHeader className="h-14 flex-row items-center px-4 border-b border-sidebar-border gap-2.5 overflow-hidden">
|
||||
<img className="h-8 w-8 shrink-0" src={Icon} alt="" />
|
||||
<span className="font-bold text-base tracking-tight text-sidebar-foreground whitespace-nowrap group-data-[collapsible=icon]:hidden transition-opacity duration-200">
|
||||
TBBANK
|
||||
</span>
|
||||
<SidebarHeader className="h-14 flex-row items-center px-3 gap-2.5 overflow-hidden">
|
||||
<div className="flex h-8 w-8 shrink-0 items-center justify-center rounded-lg text-sidebar-primary-foreground">
|
||||
<img className="h-5 w-5" src={Icon} alt="" />
|
||||
</div>
|
||||
<div className="grid flex-1 text-left leading-tight group-data-[collapsible=icon]:hidden">
|
||||
<span className="truncate font-semibold text-sm tracking-tight text-sidebar-foreground">
|
||||
TBBANK
|
||||
</span>
|
||||
<span className="truncate text-[10px] text-sidebar-foreground/40">
|
||||
Admin Panel v2.0
|
||||
</span>
|
||||
</div>
|
||||
</SidebarHeader>
|
||||
|
||||
{/* Nav */}
|
||||
<SidebarContent className="px-2 py-3">
|
||||
<SidebarMenu className="gap-0.5">
|
||||
{navItems.map((item, i) => {
|
||||
// Leaf item
|
||||
if (!item.items) {
|
||||
return (
|
||||
<SidebarMenuItem key={i}>
|
||||
<SidebarMenuButton
|
||||
asChild
|
||||
isActive={pathname === item.url}
|
||||
tooltip={item.title}
|
||||
>
|
||||
<Link to={item.url ?? '#'}>
|
||||
<item.icon />
|
||||
<span>{item.title}</span>
|
||||
</Link>
|
||||
</SidebarMenuButton>
|
||||
</SidebarMenuItem>
|
||||
)
|
||||
}
|
||||
|
||||
return <NavGroupItem key={i} item={item} />
|
||||
})}
|
||||
</SidebarMenu>
|
||||
<SidebarContent className="px-2 py-2">
|
||||
{navGroups.map((group, gi) => (
|
||||
<div key={gi}>
|
||||
{group.label && <NavGroupLabel label={group.label} />}
|
||||
<SidebarMenu className="gap-0.5">
|
||||
{group.items.map((item, i) => {
|
||||
if (!item.items) {
|
||||
return (
|
||||
<SidebarMenuItem key={i}>
|
||||
<SidebarMenuButton
|
||||
asChild
|
||||
isActive={pathname === item.url}
|
||||
tooltip={item.title}
|
||||
className={cn(
|
||||
"rounded-md font-medium",
|
||||
"text-sidebar-foreground/70 hover:text-sidebar-foreground hover:bg-sidebar-accent/70",
|
||||
"data-[active=true]:text-sidebar-foreground data-[active=true]:bg-sidebar-accent",
|
||||
)}
|
||||
>
|
||||
<Link to={item.url ?? "#"}>
|
||||
<item.icon
|
||||
className={cn(
|
||||
"shrink-0",
|
||||
pathname === item.url && "text-sidebar-primary",
|
||||
)}
|
||||
/>
|
||||
<span>{item.title}</span>
|
||||
</Link>
|
||||
</SidebarMenuButton>
|
||||
</SidebarMenuItem>
|
||||
);
|
||||
}
|
||||
return <NavGroupItem key={i} item={item} />;
|
||||
})}
|
||||
</SidebarMenu>
|
||||
</div>
|
||||
))}
|
||||
</SidebarContent>
|
||||
|
||||
{/* Footer */}
|
||||
<SidebarFooter className="border-t border-sidebar-border px-4 py-3">
|
||||
<span className="text-[10px] text-sidebar-foreground/25 group-data-[collapsible=icon]:hidden">
|
||||
TBBANK v2.0
|
||||
</span>
|
||||
<span className="text-[10px] text-sidebar-foreground/25 hidden group-data-[collapsible=icon]:block text-center">
|
||||
v2
|
||||
</span>
|
||||
{/* Footer — user block */}
|
||||
<SidebarFooter className="border-t border-sidebar-border p-2">
|
||||
<Collapsible>
|
||||
{/* Items — trigger'dan ÖNCE render edilir, yukarı doğru açılır */}
|
||||
<CollapsibleContent className="overflow-hidden data-[state=open]:animate-collapsible-down data-[state=closed]:animate-collapsible-up">
|
||||
<div className="mb-1 rounded-lg py-1 group-data-[collapsible=icon]:hidden">
|
||||
<div className="px-3 py-2 border-b border-sidebar-border/50 mb-1">
|
||||
<p className="truncate text-xs font-medium text-sidebar-foreground">
|
||||
{user?.name ?? "Admin"}
|
||||
</p>
|
||||
<p className="truncate text-[11px] text-sidebar-foreground/40">
|
||||
{user?.email ?? ""}
|
||||
</p>
|
||||
</div>
|
||||
<button className="flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-sm text-foreground hover:bg-sidebar-accent/10 transition-colors">
|
||||
<User size={14} />
|
||||
<span>My profile</span>
|
||||
</button>
|
||||
<button
|
||||
onClick={logout}
|
||||
className="flex w-full items-center gap-2 rounded-md px-3 py-1.5 text-sm text-destructive hover:bg-destructive/10 transition-colors"
|
||||
>
|
||||
<LogOut size={14} />
|
||||
<span>Logout</span>
|
||||
</button>
|
||||
</div>
|
||||
</CollapsibleContent>
|
||||
|
||||
{/* Trigger — profil butonu */}
|
||||
<CollapsibleTrigger asChild>
|
||||
<SidebarMenuButton
|
||||
size="lg"
|
||||
className={cn(
|
||||
"rounded-lg data-[state=open]:bg-sidebar-accent data-[state=open]:text-sidebar-foreground",
|
||||
"hover:bg-sidebar-accent/70 transition-colors",
|
||||
)}
|
||||
>
|
||||
{/* Avatar */}
|
||||
<div className="flex h-8 w-8 shrink-0 items-center justify-center rounded-lg bg-sidebar-primary/15 text-sidebar-primary text-xs font-semibold">
|
||||
{(user?.name ?? "A").charAt(0).toUpperCase()}
|
||||
</div>
|
||||
{/* Name + email */}
|
||||
<div className="grid flex-1 text-left leading-tight group-data-[collapsible=icon]:hidden">
|
||||
<span className="truncate text-sm font-medium text-sidebar-foreground">
|
||||
{user?.name ?? "Admin"}
|
||||
</span>
|
||||
<span className="truncate text-[11px] text-sidebar-foreground/40">
|
||||
{user?.email ?? ""}
|
||||
</span>
|
||||
</div>
|
||||
<ChevronsUpDown
|
||||
size={14}
|
||||
className="ml-auto shrink-0 text-sidebar-foreground/40 group-data-[collapsible=icon]:hidden"
|
||||
/>
|
||||
</SidebarMenuButton>
|
||||
</CollapsibleTrigger>
|
||||
</Collapsible>
|
||||
</SidebarFooter>
|
||||
</Sidebar>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// ─── Header ───────────────────────────────────────────────────────────────────
|
||||
|
||||
function DashboardHeader() {
|
||||
const { t } = useTranslation()
|
||||
const location = useLocation()
|
||||
const { theme, toggleTheme } = useThemeStore()
|
||||
const { language, setLanguage } = useI18nStore()
|
||||
const user = useAuthStore((s) => s.user)
|
||||
const logout = useAuthStore((s) => s.clearAuth)
|
||||
const { t } = useTranslation();
|
||||
const location = useLocation();
|
||||
const { theme, toggleTheme } = useThemeStore();
|
||||
const { language, setLanguage } = useI18nStore();
|
||||
|
||||
const [userMenuOpen, setUserMenuOpen] = useState(false)
|
||||
const [langMenuOpen, setLangMenuOpen] = useState(false)
|
||||
const userMenuRef = useRef<HTMLDivElement>(null)
|
||||
const langMenuRef = useRef<HTMLDivElement>(null)
|
||||
const [langMenuOpen, setLangMenuOpen] = useState(false);
|
||||
const langMenuRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
useEffect(() => {
|
||||
function handler(e: MouseEvent) {
|
||||
if (userMenuRef.current && !userMenuRef.current.contains(e.target as Node)) setUserMenuOpen(false)
|
||||
if (langMenuRef.current && !langMenuRef.current.contains(e.target as Node)) setLangMenuOpen(false)
|
||||
if (
|
||||
langMenuRef.current &&
|
||||
!langMenuRef.current.contains(e.target as Node)
|
||||
)
|
||||
setLangMenuOpen(false);
|
||||
}
|
||||
document.addEventListener('mousedown', handler)
|
||||
return () => document.removeEventListener('mousedown', handler)
|
||||
}, [])
|
||||
document.addEventListener("mousedown", handler);
|
||||
return () => document.removeEventListener("mousedown", handler);
|
||||
}, []);
|
||||
|
||||
const languages = [
|
||||
{ code: 'en', label: 'English' },
|
||||
{ code: 'ru', label: 'Русский' },
|
||||
{ code: 'tk', label: 'Türkmençe' },
|
||||
] as const
|
||||
{ code: "en", label: "English" },
|
||||
{ code: "ru", label: "Русский" },
|
||||
{ code: "tk", label: "Türkmençe" },
|
||||
] as const;
|
||||
|
||||
const generateBreadcrumbs = () => {
|
||||
const paths = location.pathname.split('/').filter(Boolean)
|
||||
if (paths.length === 0 || (paths.length === 1 && paths[0] === 'dashboard')) {
|
||||
const paths = location.pathname.split("/").filter(Boolean);
|
||||
if (
|
||||
paths.length === 0 ||
|
||||
(paths.length === 1 && paths[0] === "dashboard")
|
||||
) {
|
||||
return (
|
||||
<BreadcrumbList>
|
||||
<BreadcrumbItem>
|
||||
<BreadcrumbPage>{t('Dashboard', 'Baş sahypa')}</BreadcrumbPage>
|
||||
<BreadcrumbPage>{t("Dashboard", "Baş sahypa")}</BreadcrumbPage>
|
||||
</BreadcrumbItem>
|
||||
</BreadcrumbList>
|
||||
)
|
||||
);
|
||||
}
|
||||
return (
|
||||
<BreadcrumbList>
|
||||
@@ -395,14 +615,14 @@ function DashboardHeader() {
|
||||
</BreadcrumbItem>
|
||||
<BreadcrumbSeparator />
|
||||
{paths.map((path, index) => {
|
||||
const isLast = index === paths.length - 1
|
||||
const url = `/${paths.slice(0, index + 1).join('/')}`
|
||||
const isLast = index === paths.length - 1;
|
||||
const url = `/${paths.slice(0, index + 1).join("/")}`;
|
||||
const formatted = path
|
||||
.replace(/-/g, ' ')
|
||||
.split(' ')
|
||||
.replace(/-/g, " ")
|
||||
.split(" ")
|
||||
.map((w) => w.charAt(0).toUpperCase() + w.slice(1))
|
||||
.join(' ')
|
||||
const title = t(formatted, formatted)
|
||||
.join(" ");
|
||||
const title = t(formatted, formatted);
|
||||
return (
|
||||
<React.Fragment key={url}>
|
||||
<BreadcrumbItem>
|
||||
@@ -416,30 +636,22 @@ function DashboardHeader() {
|
||||
</BreadcrumbItem>
|
||||
{!isLast && <BreadcrumbSeparator />}
|
||||
</React.Fragment>
|
||||
)
|
||||
);
|
||||
})}
|
||||
</BreadcrumbList>
|
||||
)
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<header className="h-14 border-b border-border bg-background/80 backdrop-blur-md flex items-center justify-between px-4 sticky top-0 z-30 gap-3">
|
||||
{/* Left: sidebar trigger + breadcrumb */}
|
||||
<header className="h-16 border-b border-border rounded-t-md bg-background/80 backdrop-blur-md flex items-center justify-between px-4 sticky top-0 z-30 gap-3">
|
||||
<div className="flex items-center gap-2 min-w-0">
|
||||
{/*
|
||||
SidebarTrigger handles BOTH:
|
||||
- Desktop: toggles collapsed/expanded (collapsible="icon")
|
||||
- Mobile: opens the Sheet overlay
|
||||
No custom mobile hamburger needed.
|
||||
*/}
|
||||
<SidebarTrigger className="text-muted-foreground hover:text-foreground hover:bg-accent -ml-1 transition-colors" />
|
||||
|
||||
<div className="hidden sm:block w-px h-4 bg-border/60" />
|
||||
<div className="text-sm text-muted-foreground min-w-0 truncate">
|
||||
<Breadcrumb>{generateBreadcrumbs()}</Breadcrumb>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Right: actions */}
|
||||
<div className="flex items-center gap-1 shrink-0">
|
||||
{/* Language */}
|
||||
<div className="relative" ref={langMenuRef}>
|
||||
@@ -447,25 +659,32 @@ function DashboardHeader() {
|
||||
onClick={() => setLangMenuOpen((p) => !p)}
|
||||
className="flex items-center gap-1.5 h-8 px-2.5 rounded-md hover:bg-accent text-muted-foreground hover:text-foreground transition-colors"
|
||||
>
|
||||
<Globe size={16} />
|
||||
<span className="uppercase font-medium text-xs hidden sm:block">{language}</span>
|
||||
<Globe size={15} />
|
||||
<span className="uppercase font-medium text-xs hidden sm:block">
|
||||
{language}
|
||||
</span>
|
||||
</button>
|
||||
<div
|
||||
className={cn(
|
||||
'absolute right-0 mt-1.5 w-36 bg-popover border border-border rounded-lg shadow-lg py-1 z-50',
|
||||
'transition-all duration-150 origin-top-right',
|
||||
"absolute right-0 mt-1.5 w-36 bg-popover border border-border rounded-lg shadow-lg py-1 z-50",
|
||||
"transition-all duration-150 origin-top-right",
|
||||
langMenuOpen
|
||||
? 'opacity-100 scale-100 pointer-events-auto'
|
||||
: 'opacity-0 scale-95 pointer-events-none',
|
||||
? "opacity-100 scale-100 pointer-events-auto"
|
||||
: "opacity-0 scale-95 pointer-events-none",
|
||||
)}
|
||||
>
|
||||
{languages.map((lang) => (
|
||||
<button
|
||||
key={lang.code}
|
||||
onClick={() => { setLanguage(lang.code); setLangMenuOpen(false) }}
|
||||
onClick={() => {
|
||||
setLanguage(lang.code);
|
||||
setLangMenuOpen(false);
|
||||
}}
|
||||
className={cn(
|
||||
'w-full text-left px-3 py-2 text-sm hover:bg-accent transition-colors',
|
||||
language === lang.code ? 'text-primary font-medium' : 'text-foreground',
|
||||
"w-full text-left px-3 py-2 text-sm hover:bg-accent transition-colors",
|
||||
language === lang.code
|
||||
? "text-primary font-medium"
|
||||
: "text-foreground",
|
||||
)}
|
||||
>
|
||||
{lang.label}
|
||||
@@ -480,60 +699,17 @@ function DashboardHeader() {
|
||||
className="flex items-center justify-center w-8 h-8 rounded-md hover:bg-accent text-muted-foreground hover:text-foreground transition-colors"
|
||||
aria-label="Toggle theme"
|
||||
>
|
||||
{theme === 'dark' ? <Sun size={16} /> : <Moon size={16} />}
|
||||
{theme === "dark" ? <Sun size={15} /> : <Moon size={15} />}
|
||||
</button>
|
||||
|
||||
{/* Notifications */}
|
||||
<button className="relative flex items-center justify-center w-8 h-8 rounded-md hover:bg-accent text-muted-foreground hover:text-foreground transition-colors">
|
||||
<Bell size={16} />
|
||||
<Bell size={15} />
|
||||
<span className="absolute top-1.5 right-1.5 w-1.5 h-1.5 bg-destructive rounded-full ring-1 ring-background" />
|
||||
</button>
|
||||
|
||||
{/* User menu */}
|
||||
<div className="relative" ref={userMenuRef}>
|
||||
<button
|
||||
onClick={() => setUserMenuOpen((p) => !p)}
|
||||
className="flex items-center gap-2 h-8 pl-2 pr-2.5 rounded-md hover:bg-accent transition-colors ml-1"
|
||||
>
|
||||
<div className="w-6 h-6 rounded-full bg-primary/20 flex items-center justify-center text-[10px] font-bold text-primary shrink-0">
|
||||
{(user?.name ?? 'A').charAt(0).toUpperCase()}
|
||||
</div>
|
||||
<span className="text-sm font-medium text-foreground hidden sm:block max-w-[100px] truncate">
|
||||
{user?.name ?? 'Admin'}
|
||||
</span>
|
||||
<ChevronDown
|
||||
size={13}
|
||||
className={cn(
|
||||
'text-muted-foreground transition-transform duration-200',
|
||||
userMenuOpen && 'rotate-180',
|
||||
)}
|
||||
/>
|
||||
</button>
|
||||
|
||||
<div
|
||||
className={cn(
|
||||
'absolute right-0 mt-1.5 w-44 bg-popover border border-border rounded-lg shadow-lg py-1 z-50',
|
||||
'transition-all duration-150 origin-top-right',
|
||||
userMenuOpen
|
||||
? 'opacity-100 scale-100 pointer-events-auto'
|
||||
: 'opacity-0 scale-95 pointer-events-none',
|
||||
)}
|
||||
>
|
||||
<div className="px-3 py-2 border-b border-border mb-1">
|
||||
<p className="text-xs font-medium text-foreground truncate">{user?.name ?? 'Admin'}</p>
|
||||
<p className="text-[11px] text-muted-foreground truncate">{user?.email ?? ''}</p>
|
||||
</div>
|
||||
<button
|
||||
onClick={logout}
|
||||
className="w-full text-left flex items-center gap-2 px-3 py-2 text-sm text-destructive hover:bg-accent transition-colors"
|
||||
>
|
||||
{t('Logout', 'Çykmak')}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
// ─── Layout ───────────────────────────────────────────────────────────────────
|
||||
@@ -542,22 +718,22 @@ export function DashboardLayout() {
|
||||
return (
|
||||
<TooltipProvider>
|
||||
<SidebarProvider>
|
||||
<div className="flex h-screen w-full bg-background text-foreground overflow-hidden">
|
||||
<div className="flex w-full text-foreground ">
|
||||
<AppSidebar />
|
||||
|
||||
<div className="flex-1 flex flex-col min-w-0 overflow-hidden">
|
||||
<div className="flex-1 p-2 flex bg-sidebar flex-col min-w-0">
|
||||
<DashboardHeader />
|
||||
|
||||
<main className="flex-1 p-4 md:p-6 overflow-auto">
|
||||
<main className="flex-1 p-4 rounded-b-md mb-1 bg-background">
|
||||
<Outlet />
|
||||
</main>
|
||||
|
||||
<div className="text-center text-[11px] text-muted-foreground/30 py-3 border-t border-border/50">
|
||||
<div className="text-center text-[11px] text-muted-foreground/30 py-3 ">
|
||||
© 2026 TBBANK.GOV.TM
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</SidebarProvider>
|
||||
</TooltipProvider>
|
||||
)
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,73 +1,306 @@
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { TrendingDown, CreditCard } from 'lucide-react'
|
||||
import {
|
||||
ArrowUpRight,
|
||||
ArrowDownRight,
|
||||
FileText,
|
||||
CreditCard,
|
||||
Users,
|
||||
DollarSign,
|
||||
Activity,
|
||||
} from 'lucide-react'
|
||||
import {
|
||||
AreaChart,
|
||||
Area,
|
||||
BarChart,
|
||||
Bar,
|
||||
XAxis,
|
||||
YAxis,
|
||||
CartesianGrid,
|
||||
PieChart,
|
||||
Pie,
|
||||
Cell,
|
||||
} from 'recharts'
|
||||
import {
|
||||
ChartContainer,
|
||||
ChartTooltip,
|
||||
ChartTooltipContent,
|
||||
ChartLegend,
|
||||
ChartLegendContent,
|
||||
} from '@/components/ui/chart'
|
||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
|
||||
import { Badge } from '@/components/ui/badge'
|
||||
import { cn } from '@/lib/utils'
|
||||
|
||||
// ─── Mock data ────────────────────────────────────────────────────────────────
|
||||
|
||||
const areaData = [
|
||||
{ month: 'Ýan', loans: 420, cards: 240 },
|
||||
{ month: 'Few', loans: 380, cards: 290 },
|
||||
{ month: 'Mar', loans: 510, cards: 310 },
|
||||
{ month: 'Apr', loans: 470, cards: 280 },
|
||||
{ month: 'Maý', loans: 630, cards: 390 },
|
||||
{ month: 'Iýun', loans: 580, cards: 420 },
|
||||
{ month: 'Iýul', loans: 720, cards: 460 },
|
||||
{ month: 'Awg', loans: 690, cards: 500 },
|
||||
{ month: 'Sen', loans: 810, cards: 530 },
|
||||
{ month: 'Okt', loans: 760, cards: 480 },
|
||||
{ month: 'Noý', loans: 890, cards: 560 },
|
||||
{ month: 'Dek', loans: 950, cards: 610 },
|
||||
]
|
||||
|
||||
const barData = [
|
||||
{ day: 'Du', approved: 28, rejected: 4 },
|
||||
{ day: 'Si', approved: 35, rejected: 6 },
|
||||
{ day: 'Ça', approved: 22, rejected: 3 },
|
||||
{ day: 'Pe', approved: 41, rejected: 8 },
|
||||
{ day: 'An', approved: 33, rejected: 5 },
|
||||
{ day: 'Şe', approved: 18, rejected: 2 },
|
||||
{ day: 'Ýe', approved: 12, rejected: 1 },
|
||||
]
|
||||
|
||||
const pieData = [
|
||||
{ name: 'Kanagatlandyrylan', value: 6746, key: 'approved' },
|
||||
{ name: 'Garaşylýar', value: 208, key: 'pending' },
|
||||
{ name: 'Işlenilýär', value: 157, key: 'processing' },
|
||||
{ name: 'Ýatyrylan', value: 245, key: 'rejected' },
|
||||
{ name: 'Bellige alyndy', value: 450, key: 'registered' },
|
||||
]
|
||||
|
||||
const recentActivity = [
|
||||
{ id: '#KS-2841', name: 'Serdar Annagurban', amount: '12 500 TMT', status: 'approved', time: '2 min öň' },
|
||||
{ id: '#KS-2840', name: 'Aýgül Myradowa', amount: '8 000 TMT', status: 'pending', time: '14 min öň' },
|
||||
{ id: '#KS-2839', name: 'Kakajan Durdyýew', amount: '25 000 TMT', status: 'approved', time: '31 min öň' },
|
||||
{ id: '#KS-2838', name: 'Ogulgerek Sähedowa', amount: '5 500 TMT', status: 'rejected', time: '1 sa öň' },
|
||||
{ id: '#KS-2837', name: 'Merdan Hojamyradow', amount: '18 000 TMT', status: 'approved', time: '2 sa öň' },
|
||||
]
|
||||
|
||||
// ─── Chart configs ────────────────────────────────────────────────────────────
|
||||
|
||||
const areaConfig = {
|
||||
loans: { label: 'Karzlar', color: 'var(--chart-1)' },
|
||||
cards: { label: 'Kartlar', color: 'var(--chart-2)' },
|
||||
} satisfies Record<string, { label: string; color: string }>
|
||||
|
||||
const barConfig = {
|
||||
approved: { label: 'Tassyklanan', color: 'var(--chart-1)' },
|
||||
rejected: { label: 'Ýatyryldy', color: 'var(--chart-5)' },
|
||||
} satisfies Record<string, { label: string; color: string }>
|
||||
|
||||
const pieConfig = {
|
||||
approved: { label: 'Kanagatlandyrylan', color: 'var(--chart-2)' },
|
||||
pending: { label: 'Garaşylýar', color: 'var(--chart-4)' },
|
||||
processing: { label: 'Işlenilýär', color: 'var(--chart-1)' },
|
||||
rejected: { label: 'Ýatyrylan', color: 'var(--chart-5)' },
|
||||
registered: { label: 'Bellige alyndy', color: 'var(--chart-3)' },
|
||||
} satisfies Record<string, { label: string; color: string }>
|
||||
|
||||
// ─── Stat card ────────────────────────────────────────────────────────────────
|
||||
|
||||
function StatCard({
|
||||
title, value, change, icon: Icon, accent,
|
||||
}: {
|
||||
title: string
|
||||
value: string
|
||||
change: number
|
||||
icon: React.ElementType
|
||||
accent: string
|
||||
}) {
|
||||
const positive = change >= 0
|
||||
return (
|
||||
<Card>
|
||||
<CardHeader className="flex flex-row items-center justify-between pb-2 space-y-0">
|
||||
<CardTitle className="text-sm font-medium text-muted-foreground">{title}</CardTitle>
|
||||
<div className={cn('flex h-9 w-9 items-center justify-center rounded-lg', accent)}>
|
||||
<Icon size={16} />
|
||||
</div>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<p className="text-3xl font-semibold tracking-tight">{value}</p>
|
||||
<p className={cn(
|
||||
'mt-1 flex items-center gap-1 text-xs font-medium',
|
||||
positive ? 'text-emerald-600 dark:text-emerald-400' : 'text-destructive',
|
||||
)}>
|
||||
{positive ? <ArrowUpRight size={13} /> : <ArrowDownRight size={13} />}
|
||||
{Math.abs(change)}% geçen aýa garanyňda
|
||||
</p>
|
||||
</CardContent>
|
||||
</Card>
|
||||
)
|
||||
}
|
||||
|
||||
// ─── Status badge ─────────────────────────────────────────────────────────────
|
||||
|
||||
function StatusBadge({ status }: { status: string }) {
|
||||
const styles: Record<string, string> = {
|
||||
approved: 'bg-emerald-100 text-emerald-700 dark:bg-emerald-950 dark:text-emerald-400 hover:bg-emerald-100',
|
||||
pending: 'bg-amber-100 text-amber-700 dark:bg-amber-950 dark:text-amber-400 hover:bg-amber-100',
|
||||
rejected: 'bg-red-100 text-red-700 dark:bg-red-950 dark:text-red-400 hover:bg-red-100',
|
||||
}
|
||||
const labels: Record<string, string> = {
|
||||
approved: 'Tassyklandy',
|
||||
pending: 'Garaşylýar',
|
||||
rejected: 'Ýatyryldy',
|
||||
}
|
||||
return (
|
||||
<Badge variant="secondary" className={cn('text-[10px] px-1.5 py-0', styles[status])}>
|
||||
{labels[status]}
|
||||
</Badge>
|
||||
)
|
||||
}
|
||||
|
||||
// ─── Page ─────────────────────────────────────────────────────────────────────
|
||||
|
||||
export default function DashboardPage() {
|
||||
const { t } = useTranslation()
|
||||
const total = pieData.reduce((s, d) => s + d.value, 0)
|
||||
|
||||
return (
|
||||
<div className="w-full">
|
||||
<div className="mb-6">
|
||||
<h1 className="text-2xl font-semibold text-foreground">{t('Dashboard', 'Baş sahypa')}</h1>
|
||||
<div className="w-full space-y-6">
|
||||
|
||||
{/* Header */}
|
||||
<div>
|
||||
<h1 className="text-2xl font-semibold tracking-tight">
|
||||
{t('Dashboard', 'Baş sahypa')}
|
||||
</h1>
|
||||
<p className="text-sm text-muted-foreground mt-0.5">
|
||||
{t('Overview of all operations', 'Ähli amallaryň gysgaça görünüşi')}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<main className="grid gap-6">
|
||||
<div className="grid grid-cols-1 md:grid-cols-3 gap-6">
|
||||
|
||||
<div className="p-6 bg-card rounded-md border border-border shadow-sm flex flex-col relative overflow-hidden">
|
||||
<div className="flex justify-between items-start mb-4">
|
||||
<h3 className="font-medium text-muted-foreground">{t('Loan orders (all)', 'Karz sargytlary (ählisi)')}</h3>
|
||||
<div className="bg-accent text-xs px-2 py-1 rounded text-muted-foreground">30 gün</div>
|
||||
</div>
|
||||
<div className="flex items-center gap-4">
|
||||
<div className="bg-primary/20 p-3 rounded-md">
|
||||
<CreditCard className="text-primary size-6" />
|
||||
</div>
|
||||
<p className="text-4xl font-bold text-foreground">135</p>
|
||||
</div>
|
||||
<div className="mt-4 flex items-center text-destructive text-sm font-medium">
|
||||
<TrendingDown size={16} className="mr-1" />
|
||||
12.34% Pese gaçmak
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="p-6 bg-card rounded-md border border-border shadow-sm flex flex-col relative overflow-hidden">
|
||||
<div className="flex justify-between items-start mb-4">
|
||||
<h3 className="font-medium text-muted-foreground">{t('Loan orders (all)', 'Karz sargytlary (ählisi)')}</h3>
|
||||
<div className="bg-accent text-xs px-2 py-1 rounded text-muted-foreground">30 gün</div>
|
||||
</div>
|
||||
<div className="flex items-center">
|
||||
<p className="text-4xl font-bold text-foreground">0</p>
|
||||
</div>
|
||||
<div className="mt-4 h-12 w-full flex items-end">
|
||||
{/* Mock chart */}
|
||||
<svg className="w-full h-full" viewBox="0 0 200 40" preserveAspectRatio="none">
|
||||
<path d="M0,35 L20,30 L40,32 L60,20 L80,25 L100,10 L120,15 L140,5 L160,25 L180,20 L200,30" fill="none" stroke="hsl(var(--primary))" strokeWidth="2" strokeLinejoin="round" />
|
||||
<circle cx="100" cy="10" r="3" fill="hsl(var(--primary))" />
|
||||
<circle cx="140" cy="5" r="3" fill="hsl(var(--primary))" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
{/* Stat cards */}
|
||||
<div className="grid grid-cols-2 lg:grid-cols-4 gap-4">
|
||||
<StatCard title={t('Loan orders', 'Karz sargytlary')} value="2 841" change={12.4} icon={FileText} accent="bg-blue-100 text-blue-600 dark:bg-blue-950 dark:text-blue-400" />
|
||||
<StatCard title={t('Active cards', 'Işjeň kartlar')} value="6 968" change={5.1} icon={CreditCard} accent="bg-violet-100 text-violet-600 dark:bg-violet-950 dark:text-violet-400" />
|
||||
<StatCard title={t('Active clients', 'Işjeň müşderiler')} value="1 204" change={-3.2} icon={Users} accent="bg-amber-100 text-amber-600 dark:bg-amber-950 dark:text-amber-400" />
|
||||
<StatCard title={t('Online payments', 'Onlaýn tölegler')} value="438" change={18.7} icon={DollarSign} accent="bg-emerald-100 text-emerald-600 dark:bg-emerald-950 dark:text-emerald-400" />
|
||||
</div>
|
||||
|
||||
<div className="p-6 bg-card rounded-md border border-border shadow-sm flex flex-col">
|
||||
<div className="flex justify-between items-start mb-4">
|
||||
<h3 className="font-medium text-muted-foreground">{t('Loan orders (all)', 'Karz sargytlary (ählisi)')}</h3>
|
||||
<div className="text-xs text-muted-foreground">(6,968 jemi)</div>
|
||||
</div>
|
||||
<div className="flex gap-4 items-center">
|
||||
<div className="flex-1 space-y-2 text-sm">
|
||||
<div className="flex items-center gap-2"><span className="size-2 rounded-full bg-yellow-500"></span><span className="text-muted-foreground">Bellige alyndy (1 - 0%)</span></div>
|
||||
<div className="flex items-center gap-2"><span className="size-2 rounded-full bg-green-500"></span><span className="text-muted-foreground">Kanagatlandyrylan (6,746 - 97%)</span></div>
|
||||
<div className="flex items-center gap-2"><span className="size-2 rounded-full bg-red-500"></span><span className="text-muted-foreground">Ýatyrylan (5 - 0%)</span></div>
|
||||
<div className="flex items-center gap-2"><span className="size-2 rounded-full bg-orange-500"></span><span className="text-muted-foreground">Garaşylýar (208 - 3%)</span></div>
|
||||
<div className="flex items-center gap-2"><span className="size-2 rounded-full bg-blue-500"></span><span className="text-muted-foreground">Işlenilýär (8 - 0%)</span></div>
|
||||
</div>
|
||||
<div className="size-20 rounded-full border-8 border-green-500 flex-shrink-0"></div>
|
||||
</div>
|
||||
</div>
|
||||
{/* Area chart + Pie chart */}
|
||||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-4">
|
||||
|
||||
</div>
|
||||
|
||||
</main>
|
||||
<Card className="lg:col-span-2">
|
||||
<CardHeader>
|
||||
<CardTitle>{t('Loan & card trend', 'Karz we kart tendensiýasy')}</CardTitle>
|
||||
<CardDescription>2024 — ýyllyk görünüş</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<ChartContainer config={areaConfig} className="h-[220px] w-full">
|
||||
<AreaChart data={areaData} margin={{ top: 4, right: 4, left: -24, bottom: 0 }}>
|
||||
<defs>
|
||||
<linearGradient id="fillLoans" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="5%" stopColor="var(--color-loans)" stopOpacity={0.2} />
|
||||
<stop offset="95%" stopColor="var(--color-loans)" stopOpacity={0} />
|
||||
</linearGradient>
|
||||
<linearGradient id="fillCards" x1="0" y1="0" x2="0" y2="1">
|
||||
<stop offset="5%" stopColor="var(--color-cards)" stopOpacity={0.2} />
|
||||
<stop offset="95%" stopColor="var(--color-cards)" stopOpacity={0} />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<CartesianGrid strokeDasharray="3 3" vertical={false} stroke="var(--border)" />
|
||||
<XAxis dataKey="month" tickLine={false} axisLine={false} tick={{ fontSize: 11, fill: 'var(--muted-foreground)' }} />
|
||||
<YAxis tickLine={false} axisLine={false} tick={{ fontSize: 11, fill: 'var(--muted-foreground)' }} />
|
||||
<ChartTooltip content={<ChartTooltipContent />} />
|
||||
<Area type="monotone" dataKey="loans" stroke="var(--color-loans)" strokeWidth={2} fill="url(#fillLoans)" dot={false} />
|
||||
<Area type="monotone" dataKey="cards" stroke="var(--color-cards)" strokeWidth={2} fill="url(#fillCards)" dot={false} />
|
||||
<ChartLegend content={<ChartLegendContent />} />
|
||||
</AreaChart>
|
||||
</ChartContainer>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle>{t('Loan status', 'Karz ýagdaýy')}</CardTitle>
|
||||
<CardDescription>{total.toLocaleString()} jemi sargyt</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<ChartContainer config={pieConfig} className="h-[160px] w-full">
|
||||
<PieChart>
|
||||
<Pie data={pieData} cx="50%" cy="50%" innerRadius={48} outerRadius={72} paddingAngle={2} dataKey="value" nameKey="name" strokeWidth={0}>
|
||||
{pieData.map((entry, i) => (
|
||||
<Cell key={i} fill={`var(--color-${entry.key})`} />
|
||||
))}
|
||||
</Pie>
|
||||
<ChartTooltip content={<ChartTooltipContent nameKey="name" hideLabel />} />
|
||||
</PieChart>
|
||||
</ChartContainer>
|
||||
<div className="mt-3 space-y-1.5">
|
||||
{pieData.map((d) => (
|
||||
<div key={d.key} className="flex items-center justify-between text-xs">
|
||||
<span className="flex items-center gap-1.5 text-muted-foreground">
|
||||
<span
|
||||
className="h-1.5 w-1.5 rounded-full flex-shrink-0"
|
||||
style={{ background: `var(--color-${d.key})` }}
|
||||
/>
|
||||
{d.name}
|
||||
</span>
|
||||
<span className="font-medium tabular-nums">
|
||||
{((d.value / total) * 100).toFixed(0)}%
|
||||
</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
</div>
|
||||
|
||||
{/* Bar chart + Recent activity */}
|
||||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-4">
|
||||
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<CardTitle>{t('Weekly orders', 'Hepdelik sargytlar')}</CardTitle>
|
||||
<CardDescription>{t('Last 7 days', 'Soňky 7 gün')}</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<ChartContainer config={barConfig} className="h-[180px] w-full">
|
||||
<BarChart data={barData} margin={{ top: 4, right: 4, left: -24, bottom: 0 }} barGap={3}>
|
||||
<CartesianGrid strokeDasharray="3 3" vertical={false} stroke="var(--border)" />
|
||||
<XAxis dataKey="day" tickLine={false} axisLine={false} tick={{ fontSize: 11, fill: 'var(--muted-foreground)' }} />
|
||||
<YAxis tickLine={false} axisLine={false} tick={{ fontSize: 11, fill: 'var(--muted-foreground)' }} />
|
||||
<ChartTooltip content={<ChartTooltipContent />} />
|
||||
<Bar dataKey="approved" fill="var(--color-approved)" radius={[4, 4, 0, 0]} maxBarSize={20} />
|
||||
<Bar dataKey="rejected" fill="var(--color-rejected)" radius={[4, 4, 0, 0]} maxBarSize={20} />
|
||||
<ChartLegend content={<ChartLegendContent />} />
|
||||
</BarChart>
|
||||
</ChartContainer>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
<Card className="lg:col-span-2">
|
||||
<CardHeader className="flex flex-row items-center justify-between space-y-0 pb-3">
|
||||
<div>
|
||||
<CardTitle>{t('Recent activity', 'Soňky hereketler')}</CardTitle>
|
||||
<CardDescription className="mt-0.5">{t('Latest loan orders', 'Iň soňky karz sargytlary')}</CardDescription>
|
||||
</div>
|
||||
<div className="flex items-center gap-1 text-xs text-muted-foreground">
|
||||
<Activity size={12} />
|
||||
<span>Janly</span>
|
||||
</div>
|
||||
</CardHeader>
|
||||
<CardContent className="p-0">
|
||||
<div className="divide-y divide-border">
|
||||
{recentActivity.map((item) => (
|
||||
<div key={item.id} className="flex items-center gap-3 px-6 py-3">
|
||||
<div className="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-muted text-xs font-semibold text-muted-foreground">
|
||||
{item.name.charAt(0)}
|
||||
</div>
|
||||
<div className="flex-1 min-w-0">
|
||||
<p className="text-sm font-medium truncate">{item.name}</p>
|
||||
<p className="text-xs text-muted-foreground">{item.id} · {item.time}</p>
|
||||
</div>
|
||||
<div className="text-right shrink-0 space-y-0.5">
|
||||
<p className="text-sm font-medium tabular-nums">{item.amount}</p>
|
||||
<StatusBadge status={item.status} />
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import { LoanOrderForm } from "@/features/loanOrderMobiles/components/loanOrderForm";
|
||||
import { LoanOrderForm } from "@/features/loanOrders/components/loanOrderForm";
|
||||
|
||||
export default function LoanOrderCreatePage() {
|
||||
return <LoanOrderForm mode="create" />;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useParams } from "react-router-dom";
|
||||
import { Loader2 } from "lucide-react";
|
||||
import { LoanOrderForm } from "@/features/loanOrderMobiles/components/loanOrderForm";
|
||||
import { LoanOrderForm } from "@/features/loanOrders/components/loanOrderForm";
|
||||
import { useLoanOrderById } from "@/features/loanOrders/hooks/useLoanOrders";
|
||||
|
||||
export default function LoanOrderEditPage() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useNavigate, useParams } from "react-router-dom";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Trash2, Pencil, Download, ChevronRight, Eye } from "lucide-react";
|
||||
import { Trash2, Pencil, ChevronRight } from "lucide-react";
|
||||
import {
|
||||
useLoanOrderMobileById,
|
||||
useDeleteLoanOrderMobile,
|
||||
|
||||
@@ -5,7 +5,22 @@ export default {
|
||||
"./src/**/*.{js,ts,jsx,tsx}",
|
||||
],
|
||||
theme: {
|
||||
extend: {},
|
||||
extend: {
|
||||
keyframes: {
|
||||
'collapsible-down': {
|
||||
from: { height: '0px', opacity: '0' },
|
||||
to: { height: 'var(--radix-collapsible-content-height)', opacity: '1' },
|
||||
},
|
||||
'collapsible-up': {
|
||||
from: { height: 'var(--radix-collapsible-content-height)', opacity: '1' },
|
||||
to: { height: '0px', opacity: '0' },
|
||||
},
|
||||
},
|
||||
animation: {
|
||||
'collapsible-down': 'collapsible-down 0.2s cubic-bezier(0.16, 1, 0.3, 1)',
|
||||
'collapsible-up': 'collapsible-up 0.18s cubic-bezier(0.16, 1, 0.3, 1)',
|
||||
},
|
||||
},
|
||||
},
|
||||
plugins: [],
|
||||
}
|
||||
Reference in New Issue
Block a user