From 90a10058de6c89e2c2dccb0bd4d7dad311a8aea8 Mon Sep 17 00:00:00 2001 From: Delaney H Date: Sun, 24 Mar 2024 21:59:15 -0230 Subject: [PATCH 1/7] Installed react-bootstrap --- frontend/package-lock.json | 322 +++++++++++++++++++++++++++++++++++++ frontend/package.json | 1 + 2 files changed, 323 insertions(+) diff --git a/frontend/package-lock.json b/frontend/package-lock.json index fe3eaac..44b7e97 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -11,7 +11,9 @@ "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", + "mongodb": "^6.5.0", "react": "^18.2.0", + "react-bootstrap": "^2.10.2", "react-dom": "^18.2.0", "react-router-dom": "^6.22.3", "react-scripts": "5.0.1", @@ -3235,6 +3237,14 @@ "resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz", "integrity": "sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A==" }, + "node_modules/@mongodb-js/saslprep": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@mongodb-js/saslprep/-/saslprep-1.1.5.tgz", + "integrity": "sha512-XLNOMH66KhJzUJNwT/qlMnS4WsNDWD5ASdyaSH3EtK+F4r/CFGa3jT4GNi4mfOitGvWXtdLgQJkQjxSVrio+jA==", + "dependencies": { + "sparse-bitfield": "^3.0.3" + } + }, "node_modules/@nicolo-ribaudo/eslint-scope-5-internals": { "version": "5.1.1-v1", "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz", @@ -3353,6 +3363,29 @@ } } }, + "node_modules/@popperjs/core": { + "version": "2.11.8", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz", + "integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, + "node_modules/@react-aria/ssr": { + "version": "3.9.2", + "resolved": "https://registry.npmjs.org/@react-aria/ssr/-/ssr-3.9.2.tgz", + "integrity": "sha512-0gKkgDYdnq1w+ey8KzG9l+H5Z821qh9vVjztk55rUg71vTk/Eaebeir+WtzcLLwTjw3m/asIjx8Y59y1lJZhBw==", + "dependencies": { + "@swc/helpers": "^0.5.0" + }, + "engines": { + "node": ">= 12" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0" + } + }, "node_modules/@remix-run/router": { "version": "1.15.3", "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.15.3.tgz", @@ -3361,6 +3394,45 @@ "node": ">=14.0.0" } }, + "node_modules/@restart/hooks": { + "version": "0.4.16", + "resolved": "https://registry.npmjs.org/@restart/hooks/-/hooks-0.4.16.tgz", + "integrity": "sha512-f7aCv7c+nU/3mF7NWLtVVr0Ra80RqsO89hO72r+Y/nvQr5+q0UFGkocElTH6MJApvReVh6JHUFYn2cw1WdHF3w==", + "dependencies": { + "dequal": "^2.0.3" + }, + "peerDependencies": { + "react": ">=16.8.0" + } + }, + "node_modules/@restart/ui": { + "version": "1.6.8", + "resolved": "https://registry.npmjs.org/@restart/ui/-/ui-1.6.8.tgz", + "integrity": "sha512-6ndCv3oZ7r9vuP1Ok9KH55TM1/UkdBnP/fSraW0DFDMbPMzWKhVKeFAIEUCRCSdzayjZDcFYK6xbMlipN9dmMA==", + "dependencies": { + "@babel/runtime": "^7.21.0", + "@popperjs/core": "^2.11.6", + "@react-aria/ssr": "^3.5.0", + "@restart/hooks": "^0.4.9", + "@types/warning": "^3.0.0", + "dequal": "^2.0.3", + "dom-helpers": "^5.2.0", + "uncontrollable": "^8.0.1", + "warning": "^4.0.3" + }, + "peerDependencies": { + "react": ">=16.14.0", + "react-dom": ">=16.14.0" + } + }, + "node_modules/@restart/ui/node_modules/uncontrollable": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/uncontrollable/-/uncontrollable-8.0.4.tgz", + "integrity": "sha512-ulRWYWHvscPFc0QQXvyJjY6LIXU56f0h8pQFvhxiKk5V1fcI8gp9Ht9leVAhrVjzqMw0BgjspBINx9r6oyJUvQ==", + "peerDependencies": { + "react": ">=16.14.0" + } + }, "node_modules/@rollup/plugin-babel": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-5.3.1.tgz", @@ -3679,6 +3751,14 @@ "url": "https://github.com/sponsors/gregberge" } }, + "node_modules/@swc/helpers": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.7.tgz", + "integrity": "sha512-BVvNZhx362+l2tSwSuyEUV4h7+jk9raNdoTSdLfwTshXJSaGmYKluGRJznziCI3KX02Z19DdsQrdfrpXAU3Hfg==", + "dependencies": { + "tslib": "^2.4.0" + } + }, "node_modules/@testing-library/dom": { "version": "9.3.4", "resolved": "https://registry.npmjs.org/@testing-library/dom/-/dom-9.3.4.tgz", @@ -4480,6 +4560,14 @@ "@types/react": "*" } }, + "node_modules/@types/react-transition-group": { + "version": "4.4.10", + "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.10.tgz", + "integrity": "sha512-hT/+s0VQs2ojCX823m60m5f0sL5idt9SO6Tj6Dg+rdphGPIeJbJ6CxvBYkgkGKrYeDjvIpKTR38UzmtHJOGW3Q==", + "dependencies": { + "@types/react": "*" + } + }, "node_modules/@types/resolve": { "version": "1.17.1", "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", @@ -4556,6 +4644,24 @@ "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==" }, + "node_modules/@types/warning": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/warning/-/warning-3.0.3.tgz", + "integrity": "sha512-D1XC7WK8K+zZEveUPY+cf4+kgauk8N4eHr/XIHXGlGYkHLud6hK9lYfZk1ry1TNh798cZUCgb6MqGEG8DkJt6Q==" + }, + "node_modules/@types/webidl-conversions": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/@types/webidl-conversions/-/webidl-conversions-7.0.3.tgz", + "integrity": "sha512-CiJJvcRtIgzadHCYXw7dqEnMNRjhGZlYK05Mj9OyktqV8uVT8fD2BFOB7S1uwBE3Kj2Z+4UyPmFw/Ixgw/LAlA==" + }, + "node_modules/@types/whatwg-url": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/@types/whatwg-url/-/whatwg-url-11.0.4.tgz", + "integrity": "sha512-lXCmTWSHJvf0TRSO58nm978b8HJ/EdsSsEKLd3ODHFjo+3VGAyyTp4v50nWvwtzBxSMQrVOK7tcuN0zGPLICMw==", + "dependencies": { + "@types/webidl-conversions": "*" + } + }, "node_modules/@types/ws": { "version": "8.5.10", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz", @@ -5973,6 +6079,14 @@ "node-int64": "^0.4.0" } }, + "node_modules/bson": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/bson/-/bson-6.5.0.tgz", + "integrity": "sha512-DXf1BTAS8vKyR90BO4x5v3rKVarmkdkzwOrnYDFdjAY694ILNDkmA3uRh1xXJEl+C1DAh8XCvAQ+Gh3kzubtpg==", + "engines": { + "node": ">=16.20.1" + } + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -6176,6 +6290,11 @@ "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", "integrity": "sha512-0TNiGstbQmCFwt4akjjBg5pLRTSyj/PkWQ1ZoO2zntmg9yLqSRxwEa4iCfQLGjqhiqBfOJa7W/E8wfGrTDmlZQ==" }, + "node_modules/classnames": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.5.1.tgz", + "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==" + }, "node_modules/clean-css": { "version": "5.3.3", "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.3.tgz", @@ -7148,6 +7267,15 @@ "utila": "~0.4" } }, + "node_modules/dom-helpers": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-5.2.1.tgz", + "integrity": "sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==", + "dependencies": { + "@babel/runtime": "^7.8.7", + "csstype": "^3.0.2" + } + }, "node_modules/dom-serializer": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz", @@ -9580,6 +9708,14 @@ "node": ">= 0.4" } }, + "node_modules/invariant": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", + "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", + "dependencies": { + "loose-envify": "^1.0.0" + } + }, "node_modules/ipaddr.js": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.1.0.tgz", @@ -12558,6 +12694,11 @@ "node": ">= 4.0.0" } }, + "node_modules/memory-pager": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz", + "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==" + }, "node_modules/merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", @@ -12753,6 +12894,91 @@ "mkdirp": "bin/cmd.js" } }, + "node_modules/mongodb": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-6.5.0.tgz", + "integrity": "sha512-Fozq68InT+JKABGLqctgtb8P56pRrJFkbhW0ux+x1mdHeyinor8oNzJqwLjV/t5X5nJGfTlluxfyMnOXNggIUA==", + "dependencies": { + "@mongodb-js/saslprep": "^1.1.5", + "bson": "^6.4.0", + "mongodb-connection-string-url": "^3.0.0" + }, + "engines": { + "node": ">=16.20.1" + }, + "peerDependencies": { + "@aws-sdk/credential-providers": "^3.188.0", + "@mongodb-js/zstd": "^1.1.0", + "gcp-metadata": "^5.2.0", + "kerberos": "^2.0.1", + "mongodb-client-encryption": ">=6.0.0 <7", + "snappy": "^7.2.2", + "socks": "^2.7.1" + }, + "peerDependenciesMeta": { + "@aws-sdk/credential-providers": { + "optional": true + }, + "@mongodb-js/zstd": { + "optional": true + }, + "gcp-metadata": { + "optional": true + }, + "kerberos": { + "optional": true + }, + "mongodb-client-encryption": { + "optional": true + }, + "snappy": { + "optional": true + }, + "socks": { + "optional": true + } + } + }, + "node_modules/mongodb-connection-string-url": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/mongodb-connection-string-url/-/mongodb-connection-string-url-3.0.0.tgz", + "integrity": "sha512-t1Vf+m1I5hC2M5RJx/7AtxgABy1cZmIPQRMXw+gEIPn/cZNF3Oiy+l0UIypUwVB5trcWHq3crg2g3uAR9aAwsQ==", + "dependencies": { + "@types/whatwg-url": "^11.0.2", + "whatwg-url": "^13.0.0" + } + }, + "node_modules/mongodb-connection-string-url/node_modules/tr46": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", + "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", + "dependencies": { + "punycode": "^2.3.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/mongodb-connection-string-url/node_modules/webidl-conversions": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", + "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", + "engines": { + "node": ">=12" + } + }, + "node_modules/mongodb-connection-string-url/node_modules/whatwg-url": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-13.0.0.tgz", + "integrity": "sha512-9WWbymnqj57+XEuqADHrCJ2eSXzn8WXIW/YSGaZtb2WKAInQ6CHfaUUcTyyver0p8BDg5StLQq8h1vtZuwmOig==", + "dependencies": { + "tr46": "^4.1.1", + "webidl-conversions": "^7.0.0" + }, + "engines": { + "node": ">=16" + } + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -14759,6 +14985,23 @@ "react-is": "^16.13.1" } }, + "node_modules/prop-types-extra": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/prop-types-extra/-/prop-types-extra-1.1.1.tgz", + "integrity": "sha512-59+AHNnHYCdiC+vMwY52WmvP5dM3QLeoumYuEyceQDi9aEhtwN9zIQ2ZNo25sMyXnbh32h+P1ezDsUpUH3JAew==", + "dependencies": { + "react-is": "^16.3.2", + "warning": "^4.0.0" + }, + "peerDependencies": { + "react": ">=0.14.0" + } + }, + "node_modules/prop-types-extra/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, "node_modules/prop-types/node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", @@ -14933,6 +15176,35 @@ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==" }, + "node_modules/react-bootstrap": { + "version": "2.10.2", + "resolved": "https://registry.npmjs.org/react-bootstrap/-/react-bootstrap-2.10.2.tgz", + "integrity": "sha512-UvB7mRqQjivdZNxJNEA2yOQRB7L9N43nBnKc33K47+cH90/ujmnMwatTCwQLu83gLhrzAl8fsa6Lqig/KLghaA==", + "dependencies": { + "@babel/runtime": "^7.22.5", + "@restart/hooks": "^0.4.9", + "@restart/ui": "^1.6.8", + "@types/react-transition-group": "^4.4.6", + "classnames": "^2.3.2", + "dom-helpers": "^5.2.1", + "invariant": "^2.2.4", + "prop-types": "^15.8.1", + "prop-types-extra": "^1.1.0", + "react-transition-group": "^4.4.5", + "uncontrollable": "^7.2.1", + "warning": "^4.0.3" + }, + "peerDependencies": { + "@types/react": ">=16.14.8", + "react": ">=16.14.0", + "react-dom": ">=16.14.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, "node_modules/react-dev-utils": { "version": "12.0.1", "resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-12.0.1.tgz", @@ -15072,6 +15344,11 @@ "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" }, + "node_modules/react-lifecycles-compat": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", + "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==" + }, "node_modules/react-refresh": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.11.0.tgz", @@ -15182,6 +15459,21 @@ } } }, + "node_modules/react-transition-group": { + "version": "4.4.5", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-4.4.5.tgz", + "integrity": "sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==", + "dependencies": { + "@babel/runtime": "^7.5.5", + "dom-helpers": "^5.0.1", + "loose-envify": "^1.4.0", + "prop-types": "^15.6.2" + }, + "peerDependencies": { + "react": ">=16.6.0", + "react-dom": ">=16.6.0" + } + }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -16101,6 +16393,14 @@ "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", "deprecated": "Please use @jridgewell/sourcemap-codec instead" }, + "node_modules/sparse-bitfield": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz", + "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==", + "dependencies": { + "memory-pager": "^1.0.2" + } + }, "node_modules/spdy": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz", @@ -17198,6 +17498,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/uncontrollable": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/uncontrollable/-/uncontrollable-7.2.1.tgz", + "integrity": "sha512-svtcfoTADIB0nT9nltgjujTi7BzVmwjZClOmskKu/E8FW9BXzg9os8OLr4f8Dlnk0rYWJIWr4wv9eKUXiQvQwQ==", + "dependencies": { + "@babel/runtime": "^7.6.3", + "@types/react": ">=16.9.11", + "invariant": "^2.2.4", + "react-lifecycles-compat": "^3.0.4" + }, + "peerDependencies": { + "react": ">=15.0.0" + } + }, "node_modules/underscore": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.12.1.tgz", @@ -17425,6 +17739,14 @@ "makeerror": "1.0.12" } }, + "node_modules/warning": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz", + "integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==", + "dependencies": { + "loose-envify": "^1.0.0" + } + }, "node_modules/watchpack": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", diff --git a/frontend/package.json b/frontend/package.json index 2ad98da..95ffed3 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -8,6 +8,7 @@ "@testing-library/user-event": "^13.5.0", "mongodb": "^6.5.0", "react": "^18.2.0", + "react-bootstrap": "^2.10.2", "react-dom": "^18.2.0", "react-router-dom": "^6.22.3", "react-scripts": "5.0.1", From b86905023be8ee938a723f8ab702e7a1f2ed180a Mon Sep 17 00:00:00 2001 From: Delaney H Date: Sun, 24 Mar 2024 22:54:46 -0230 Subject: [PATCH 2/7] Changed directory layout for the frontend --- frontend/src/pages/App.js | 17 +++++++++-------- frontend/src/pages/GarageNavbar.js | 12 ------------ .../src/pages/{ => garage}/AddRemoveNavbar.js | 0 frontend/src/pages/{ => garage}/AddVehicle.js | 0 frontend/src/pages/{ => garage}/Garage.js | 12 ++++++------ .../src/pages/{ => garage}/RemoveVehicle.js | 0 .../ManualVehicleHistory.js | 0 .../{ => maintenance-history}/UploadNavbar.js | 0 .../UploadVehicleHistory.js | 0 frontend/src/pages/{ => vehicle}/Vehicle.js | 0 .../src/pages/{ => vehicle}/VehicleHistory.js | 10 +++++----- frontend/src/pages/{ => vehicle}/VehicleInfo.js | 8 ++++---- frontend/src/pages/vehicle/VehicleNavbar.js | 15 +++++++++++++++ 13 files changed, 39 insertions(+), 35 deletions(-) delete mode 100644 frontend/src/pages/GarageNavbar.js rename frontend/src/pages/{ => garage}/AddRemoveNavbar.js (100%) rename frontend/src/pages/{ => garage}/AddVehicle.js (100%) rename frontend/src/pages/{ => garage}/Garage.js (71%) rename frontend/src/pages/{ => garage}/RemoveVehicle.js (100%) rename frontend/src/pages/{ => maintenance-history}/ManualVehicleHistory.js (100%) rename frontend/src/pages/{ => maintenance-history}/UploadNavbar.js (100%) rename frontend/src/pages/{ => maintenance-history}/UploadVehicleHistory.js (100%) rename frontend/src/pages/{ => vehicle}/Vehicle.js (100%) rename frontend/src/pages/{ => vehicle}/VehicleHistory.js (79%) rename frontend/src/pages/{ => vehicle}/VehicleInfo.js (73%) create mode 100644 frontend/src/pages/vehicle/VehicleNavbar.js diff --git a/frontend/src/pages/App.js b/frontend/src/pages/App.js index ce19e66..d47b29e 100644 --- a/frontend/src/pages/App.js +++ b/frontend/src/pages/App.js @@ -1,13 +1,14 @@ import Login from "./Login"; import { BrowserRouter, Routes, Route } from "react-router-dom"; import NavBar from "./NavBar"; -import Garage from "./Garage"; -import VehicleInfo from "./VehicleInfo"; -import VehicleHistory from "./VehicleHistory"; -import UploadVehicleHistory from "./UploadVehicleHistory"; -import ManualVehicleHistory from "./ManualVehicleHistory"; -import AddVehicle from "./AddVehicle"; -import RemoveVehicle from "./RemoveVehicle"; +import Garage from "./garage/Garage"; +import VehicleInfo from "./vehicle/VehicleInfo"; +import VehicleHistory from "./vehicle/VehicleHistory"; +import UploadVehicleHistory from "./maintenance-history/UploadVehicleHistory"; +import ManualVehicleHistory from "./maintenance-history/ManualVehicleHistory"; +import AddVehicle from "./garage/AddVehicle"; +import RemoveVehicle from "./garage/RemoveVehicle"; +import {Settings} from "./Settings"; function App() { return ( @@ -27,7 +28,7 @@ function App() { } /> } /> - + }/> diff --git a/frontend/src/pages/GarageNavbar.js b/frontend/src/pages/GarageNavbar.js deleted file mode 100644 index 3e2d5a5..0000000 --- a/frontend/src/pages/GarageNavbar.js +++ /dev/null @@ -1,12 +0,0 @@ -import {Link} from "react-router-dom"; - -function GarageNavbar() { - return ( -
- Info - History -
- ); -} - -export default GarageNavbar; \ No newline at end of file diff --git a/frontend/src/pages/AddRemoveNavbar.js b/frontend/src/pages/garage/AddRemoveNavbar.js similarity index 100% rename from frontend/src/pages/AddRemoveNavbar.js rename to frontend/src/pages/garage/AddRemoveNavbar.js diff --git a/frontend/src/pages/AddVehicle.js b/frontend/src/pages/garage/AddVehicle.js similarity index 100% rename from frontend/src/pages/AddVehicle.js rename to frontend/src/pages/garage/AddVehicle.js diff --git a/frontend/src/pages/Garage.js b/frontend/src/pages/garage/Garage.js similarity index 71% rename from frontend/src/pages/Garage.js rename to frontend/src/pages/garage/Garage.js index 1c7b6ed..457de3c 100644 --- a/frontend/src/pages/Garage.js +++ b/frontend/src/pages/garage/Garage.js @@ -1,11 +1,11 @@ import {BrowserRouter, Routes, Route, Link, useNavigate} from "react-router-dom"; -import GarageNavbar from "./GarageNavbar"; +import VehicleNavbar from "../vehicle/VehicleNavbar"; import AddRemoveNavbar from "./AddRemoveNavbar"; -import VehicleInfo from "./VehicleInfo"; +import VehicleInfo from "../vehicle/VehicleInfo"; function Garage() { // TODO: REPLACE WITH REAL VALUES, THESE ARE USED AS TEST VALUES - const cars = ["2009 Nord Campy", "2015 Yotota Bav", "2019 Pesla Godel3", "2014 Nord Bustang", + const vehicles = ["2009 Nord Campy", "2015 Yotota Bav", "2019 Pesla Godel3", "2014 Nord Bustang", "2017 Yotota Camry", "2016 Pesla GodelS", "2018 Nord Bustang", "2010 Yotota Bav"] return (
@@ -18,11 +18,11 @@ function Garage() { - {cars.map((car,id) => { - let param = car.replaceAll(" ", "-").toLowerCase(); + {vehicles.map((vehicle,id) => { + let param = vehicle.replaceAll(" ", "-").toLowerCase(); return ( - + ) })} diff --git a/frontend/src/pages/RemoveVehicle.js b/frontend/src/pages/garage/RemoveVehicle.js similarity index 100% rename from frontend/src/pages/RemoveVehicle.js rename to frontend/src/pages/garage/RemoveVehicle.js diff --git a/frontend/src/pages/ManualVehicleHistory.js b/frontend/src/pages/maintenance-history/ManualVehicleHistory.js similarity index 100% rename from frontend/src/pages/ManualVehicleHistory.js rename to frontend/src/pages/maintenance-history/ManualVehicleHistory.js diff --git a/frontend/src/pages/UploadNavbar.js b/frontend/src/pages/maintenance-history/UploadNavbar.js similarity index 100% rename from frontend/src/pages/UploadNavbar.js rename to frontend/src/pages/maintenance-history/UploadNavbar.js diff --git a/frontend/src/pages/UploadVehicleHistory.js b/frontend/src/pages/maintenance-history/UploadVehicleHistory.js similarity index 100% rename from frontend/src/pages/UploadVehicleHistory.js rename to frontend/src/pages/maintenance-history/UploadVehicleHistory.js diff --git a/frontend/src/pages/Vehicle.js b/frontend/src/pages/vehicle/Vehicle.js similarity index 100% rename from frontend/src/pages/Vehicle.js rename to frontend/src/pages/vehicle/Vehicle.js diff --git a/frontend/src/pages/VehicleHistory.js b/frontend/src/pages/vehicle/VehicleHistory.js similarity index 79% rename from frontend/src/pages/VehicleHistory.js rename to frontend/src/pages/vehicle/VehicleHistory.js index 882ceed..4493613 100644 --- a/frontend/src/pages/VehicleHistory.js +++ b/frontend/src/pages/vehicle/VehicleHistory.js @@ -1,6 +1,6 @@ import {BrowserRouter, Routes, Route, useParams} from "react-router-dom"; -import GarageNavbar from "./GarageNavbar"; -import UploadNavbar from "./UploadNavbar"; +import VehicleNavbar from "./VehicleNavbar"; +import UploadNavbar from "../maintenance-history/UploadNavbar"; function VehicleHistory() { let { vehicle } = useParams(); @@ -12,10 +12,10 @@ function VehicleHistory() { make.charAt(0).toUpperCase(); return (
- + - - + + diff --git a/frontend/src/pages/VehicleInfo.js b/frontend/src/pages/vehicle/VehicleInfo.js similarity index 73% rename from frontend/src/pages/VehicleInfo.js rename to frontend/src/pages/vehicle/VehicleInfo.js index d9c4664..8534245 100644 --- a/frontend/src/pages/VehicleInfo.js +++ b/frontend/src/pages/vehicle/VehicleInfo.js @@ -1,5 +1,5 @@ import {BrowserRouter, Routes, Route, useParams} from "react-router-dom"; -import GarageNavbar from "./GarageNavbar"; +import VehicleNavbar from "./VehicleNavbar"; function VehicleInfo() { let { vehicle } = useParams(); @@ -11,10 +11,10 @@ function VehicleInfo() { make = make[0].toUpperCase() + make.slice(1); return (
- + - - + +

{year} {model} {make}

diff --git a/frontend/src/pages/vehicle/VehicleNavbar.js b/frontend/src/pages/vehicle/VehicleNavbar.js new file mode 100644 index 0000000..97b0cef --- /dev/null +++ b/frontend/src/pages/vehicle/VehicleNavbar.js @@ -0,0 +1,15 @@ +import {Link, useParams} from "react-router-dom"; + +function VehicleNavbar() { + let { vehicle } = useParams(); + let param = vehicle.replaceAll(" ", "-").toLowerCase(); + + return ( +
+ Info + History +
+ ); +} + +export default VehicleNavbar; \ No newline at end of file From b971dddc2e329ced716a090b50ae80ff721aa3ec Mon Sep 17 00:00:00 2001 From: Delaney H Date: Sun, 24 Mar 2024 23:29:51 -0230 Subject: [PATCH 3/7] Adding accordions to Garage.js --- frontend/src/pages/garage/Garage.js | 34 ++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/garage/Garage.js b/frontend/src/pages/garage/Garage.js index 457de3c..19b82a4 100644 --- a/frontend/src/pages/garage/Garage.js +++ b/frontend/src/pages/garage/Garage.js @@ -1,7 +1,7 @@ import {BrowserRouter, Routes, Route, Link, useNavigate} from "react-router-dom"; -import VehicleNavbar from "../vehicle/VehicleNavbar"; import AddRemoveNavbar from "./AddRemoveNavbar"; import VehicleInfo from "../vehicle/VehicleInfo"; +import Accordion from 'react-bootstrap/Accordion'; function Garage() { // TODO: REPLACE WITH REAL VALUES, THESE ARE USED AS TEST VALUES @@ -16,6 +16,38 @@ function Garage() { } /> + + + Vehicle List + +
{car}{vehicle}
+ + {vehicles.map((vehicle,id) => { + let param = vehicle.replaceAll(" ", "-").toLowerCase(); + return ( + + + + ) + })} + +
{vehicle}
+ + + + + {vehicles.map((vehicle,id) => { + let param = vehicle.replaceAll(" ", "-").toLowerCase(); + return ( + + {vehicle} + + Info + History + + + ) + })} {vehicles.map((vehicle,id) => { From b67acc978b168b44dc1b97216876a72c78f91641 Mon Sep 17 00:00:00 2001 From: Delaney H Date: Mon, 25 Mar 2024 00:06:26 -0230 Subject: [PATCH 4/7] Vehicle cards added on garage page --- frontend/src/index.js | 1 + frontend/src/pages/garage/Garage.js | 76 +++++++++-------------- frontend/src/pages/vehicle/VehicleInfo.js | 23 ++++++- 3 files changed, 54 insertions(+), 46 deletions(-) diff --git a/frontend/src/index.js b/frontend/src/index.js index a15f953..b40ce2b 100644 --- a/frontend/src/index.js +++ b/frontend/src/index.js @@ -3,6 +3,7 @@ import ReactDOM from 'react-dom/client'; import './index.css'; import App from './pages/App'; import reportWebVitals from './reportWebVitals'; +import 'bootstrap/dist/css/bootstrap.min.css'; const root = ReactDOM.createRoot(document.getElementById('root')); root.render( diff --git a/frontend/src/pages/garage/Garage.js b/frontend/src/pages/garage/Garage.js index 19b82a4..38e2a3c 100644 --- a/frontend/src/pages/garage/Garage.js +++ b/frontend/src/pages/garage/Garage.js @@ -1,12 +1,15 @@ -import {BrowserRouter, Routes, Route, Link, useNavigate} from "react-router-dom"; +import {BrowserRouter, Routes, Route, Link, useNavigate, useParams} from "react-router-dom"; import AddRemoveNavbar from "./AddRemoveNavbar"; import VehicleInfo from "../vehicle/VehicleInfo"; import Accordion from 'react-bootstrap/Accordion'; +import {Button, Card, Col, Row} from "react-bootstrap"; +import Container from 'react-bootstrap/Container'; function Garage() { // TODO: REPLACE WITH REAL VALUES, THESE ARE USED AS TEST VALUES const vehicles = ["2009 Nord Campy", "2015 Yotota Bav", "2019 Pesla Godel3", "2014 Nord Bustang", "2017 Yotota Camry", "2016 Pesla GodelS", "2018 Nord Bustang", "2010 Yotota Bav"] + let length = 0; return (
@@ -16,50 +19,33 @@ function Garage() { } /> - - - Vehicle List - -
- - {vehicles.map((vehicle,id) => { - let param = vehicle.replaceAll(" ", "-").toLowerCase(); - return ( - - - - ) - })} - -
{vehicle}
- - - - - {vehicles.map((vehicle,id) => { - let param = vehicle.replaceAll(" ", "-").toLowerCase(); - return ( - - {vehicle} - - Info - History - - - ) - })} - - - {vehicles.map((vehicle,id) => { - let param = vehicle.replaceAll(" ", "-").toLowerCase(); - return ( - - - - ) - })} - -
{vehicle}
+ + {vehicles.map((vehicle,id) => { + let param = vehicle.replaceAll(" ", "-").toLowerCase(); + let year = vehicle.split(" ")[0]; + let model = vehicle.split(" ")[1] + let make = vehicle.split(" ")[2]; + model = model[0].toUpperCase() + model.slice(1); + make = make[0].toUpperCase() + make.slice(1); + if (length === 2) { + length = 0 + } + length++; + return ( + + + + {vehicle} + + Some quick example text to build on the card title and make up the + bulk of the card's content. + + + + + ) + })} +
); } diff --git a/frontend/src/pages/vehicle/VehicleInfo.js b/frontend/src/pages/vehicle/VehicleInfo.js index 8534245..abf24ba 100644 --- a/frontend/src/pages/vehicle/VehicleInfo.js +++ b/frontend/src/pages/vehicle/VehicleInfo.js @@ -1,5 +1,6 @@ import {BrowserRouter, Routes, Route, useParams} from "react-router-dom"; import VehicleNavbar from "./VehicleNavbar"; +import {Card, Col, Row} from "react-bootstrap"; function VehicleInfo() { let { vehicle } = useParams(); @@ -23,4 +24,24 @@ function VehicleInfo() { ); } -export default VehicleInfo; \ No newline at end of file +export default VehicleInfo; + + + + + {Array.from({ length: 4 }).map((_, idx) => ( + + + + + Card title + + This is a longer card with supporting text below as a natural + lead-in to additional content. This content is a little bit + longer. + + + + + ))} + \ No newline at end of file From 66442f9d45b88a58da997dc508c88308487e9dac Mon Sep 17 00:00:00 2001 From: Delaney H Date: Mon, 25 Mar 2024 13:48:52 -0230 Subject: [PATCH 5/7] Solved issue with 'View Info' buttons not working on Card Converted Add/Remove text into Buttons --- frontend/src/pages/garage/AddRemoveNavbar.js | 5 +++-- frontend/src/pages/garage/Garage.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/pages/garage/AddRemoveNavbar.js b/frontend/src/pages/garage/AddRemoveNavbar.js index db49e21..6ee8a3f 100644 --- a/frontend/src/pages/garage/AddRemoveNavbar.js +++ b/frontend/src/pages/garage/AddRemoveNavbar.js @@ -1,10 +1,11 @@ import {Link} from "react-router-dom"; +import {Button} from "react-bootstrap"; function AddRemoveNavbar() { return (
- Add - Remove + +
) } diff --git a/frontend/src/pages/garage/Garage.js b/frontend/src/pages/garage/Garage.js index 38e2a3c..d901155 100644 --- a/frontend/src/pages/garage/Garage.js +++ b/frontend/src/pages/garage/Garage.js @@ -40,7 +40,7 @@ function Garage() { Some quick example text to build on the card title and make up the bulk of the card's content. - + ) From d48798f4e0cd2e7b22b7a0901bb3af9d4746fc30 Mon Sep 17 00:00:00 2001 From: Delaney H Date: Mon, 25 Mar 2024 14:31:13 -0230 Subject: [PATCH 6/7] Garage fully configured to use cards for display Each card contains a "View Info" and "Remove" button "Add" button near the top of the Garage page Deleted AddRemoveNavbar.js --- frontend/src/pages/App.js | 2 +- frontend/src/pages/garage/AddRemoveNavbar.js | 5 +- frontend/src/pages/garage/Garage.js | 105 ++++++++++++------- 3 files changed, 68 insertions(+), 44 deletions(-) diff --git a/frontend/src/pages/App.js b/frontend/src/pages/App.js index d47b29e..35e57bb 100644 --- a/frontend/src/pages/App.js +++ b/frontend/src/pages/App.js @@ -21,7 +21,7 @@ function App() { }/> }/> - }/> + }/> } /> } /> diff --git a/frontend/src/pages/garage/AddRemoveNavbar.js b/frontend/src/pages/garage/AddRemoveNavbar.js index 6ee8a3f..0bc63f2 100644 --- a/frontend/src/pages/garage/AddRemoveNavbar.js +++ b/frontend/src/pages/garage/AddRemoveNavbar.js @@ -4,10 +4,9 @@ import {Button} from "react-bootstrap"; function AddRemoveNavbar() { return (
- - +
) } -export default AddRemoveNavbar; \ No newline at end of file +export default AddRemoveNavbar; diff --git a/frontend/src/pages/garage/Garage.js b/frontend/src/pages/garage/Garage.js index d901155..005b88d 100644 --- a/frontend/src/pages/garage/Garage.js +++ b/frontend/src/pages/garage/Garage.js @@ -1,53 +1,78 @@ import {BrowserRouter, Routes, Route, Link, useNavigate, useParams} from "react-router-dom"; -import AddRemoveNavbar from "./AddRemoveNavbar"; import VehicleInfo from "../vehicle/VehicleInfo"; import Accordion from 'react-bootstrap/Accordion'; import {Button, Card, Col, Row} from "react-bootstrap"; import Container from 'react-bootstrap/Container'; +// TODO: REPLACE WITH REAL VALUES, THESE ARE USED AS TEST VALUES + + function Garage() { - // TODO: REPLACE WITH REAL VALUES, THESE ARE USED AS TEST VALUES + // Divide the vehicles array into chunks of 3 const vehicles = ["2009 Nord Campy", "2015 Yotota Bav", "2019 Pesla Godel3", "2014 Nord Bustang", - "2017 Yotota Camry", "2016 Pesla GodelS", "2018 Nord Bustang", "2010 Yotota Bav"] + "2017 Yotota Camry", "2016 Pesla GodelS", "2018 Nord Bustang", "2010 Yotota Bav"] + const chunkedVehicles = []; let length = 0; - return ( -
- - - - - } /> - + for (let i = 0; i < vehicles.length; i += 3) { + chunkedVehicles.push(vehicles.slice(i, i + 3)); + } + + return ( +
+
+
+
+
+ + + + + }/> + +
+ + {chunkedVehicles.map((row, rowIndex) => ( + + {/* Map over vehicles in the current row */} + {row.map((vehicle, colIndex) => { + let param = vehicle.replaceAll(" ", "-").toLowerCase(); + let year = vehicle.split(" ")[0]; + let model = vehicle.split(" ")[1]; + let make = vehicle.split(" ")[2]; + model = model[0].toUpperCase() + model.slice(1); + make = make[0].toUpperCase() + make.slice(1); - - {vehicles.map((vehicle,id) => { - let param = vehicle.replaceAll(" ", "-").toLowerCase(); - let year = vehicle.split(" ")[0]; - let model = vehicle.split(" ")[1] - let make = vehicle.split(" ")[2]; - model = model[0].toUpperCase() + model.slice(1); - make = make[0].toUpperCase() + make.slice(1); - if (length === 2) { - length = 0 - } - length++; - return ( - - - - {vehicle} - - Some quick example text to build on the card title and make up the - bulk of the card's content. - - - - - ) - })} - -
- ); + return ( + + + + + {vehicle} + + Some quick example text to build on the card title and make up the bulk of + the card's content. + + + + + + + + + + + + + ); + })} + + ))} +
+
+
+
+ ); } export default Garage; \ No newline at end of file From a0d55a42e64b9512f423725b26ef9a6b00fd8559 Mon Sep 17 00:00:00 2001 From: Delaney H Date: Mon, 25 Mar 2024 18:22:19 -0230 Subject: [PATCH 7/7] Removed 'login' from the navbar Right-justified the 'signed in as' text --- frontend/src/pages/NavBar.js | 28 ++++++++++++++++++++-------- frontend/src/pages/Settings.js | 5 +++++ 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/frontend/src/pages/NavBar.js b/frontend/src/pages/NavBar.js index 6a69218..da79e62 100644 --- a/frontend/src/pages/NavBar.js +++ b/frontend/src/pages/NavBar.js @@ -1,14 +1,26 @@ -import {Link} from "react-router-dom"; +import {Nav, Navbar} from "react-bootstrap"; +import Container from "react-bootstrap/Container"; +import React from "react"; function NavBar() { return ( -
- Home - Login - Garage - Settings -
+ + + Driveline + + + + + + + + ); } -export default NavBar; \ No newline at end of file +export default NavBar; diff --git a/frontend/src/pages/Settings.js b/frontend/src/pages/Settings.js index 14e9e08..9fd4449 100644 --- a/frontend/src/pages/Settings.js +++ b/frontend/src/pages/Settings.js @@ -5,6 +5,11 @@ export const Settings = () => {

Settings

Change your settings here

Placeholder

+ + ); } \ No newline at end of file