diff --git a/.nvmrc b/.nvmrc index 0828ab7..3f430af 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v18 \ No newline at end of file +v18 diff --git a/package-lock.json b/package-lock.json index 488de30..2b90492 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,6 +23,7 @@ "@vercel/speed-insights": "^1.0.2", "axios": "^1.7.7", "bcrypt": "^5.1.1", + "chart.js": "^4.4.6", "cheerio": "^1.0.0", "crypto-random-string": "^5.0.0", "cssnano": "^6.0.3", @@ -35,6 +36,7 @@ "nodemailer": "^6.9.12", "openai": "^4.73.0", "stripe": "^17.3.1", + "svelte-chartjs": "^3.1.5", "svelteship-soen-343": "file:", "three": "^0.170.0", "ws": "^8.16.0", @@ -863,6 +865,11 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "node_modules/@kurkle/color": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.4.tgz", + "integrity": "sha512-M5UknZPHRu3DEDWoipU6sE8PdkZ6Z/S+v4dD+Ke8IaNlpdSQah50lz1KtcFBa2vsdOnwbbnxJwVM4wty6udA5w==" + }, "node_modules/@mapbox/corslite": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/@mapbox/corslite/-/corslite-0.0.7.tgz", @@ -2733,6 +2740,17 @@ "url": "https://github.com/chalk/chalk?sponsor=1" } }, + "node_modules/chart.js": { + "version": "4.4.6", + "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.6.tgz", + "integrity": "sha512-8Y406zevUPbbIBA/HRk33khEmQPk5+cxeflWE/2rx1NJsjVWMPw/9mSP9rxHP5eqi6LNoPBVMfZHxbwLSgldYA==", + "dependencies": { + "@kurkle/color": "^0.3.0" + }, + "engines": { + "pnpm": ">=8" + } + }, "node_modules/check-error": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz", @@ -7902,6 +7920,15 @@ "node": ">=16" } }, + "node_modules/svelte-chartjs": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/svelte-chartjs/-/svelte-chartjs-3.1.5.tgz", + "integrity": "sha512-ka2zh7v5FiwfAX1oMflZ0HkNkgjHjFqANgRyC+vNYXfxtx2ku68Zo+2KgbKeBH2nS1ThDqkIACPzGxy4T0UaoA==", + "peerDependencies": { + "chart.js": "^3.5.0 || ^4.0.0", + "svelte": "^4.0.0" + } + }, "node_modules/svelte-check": { "version": "3.8.6", "resolved": "https://registry.npmjs.org/svelte-check/-/svelte-check-3.8.6.tgz", diff --git a/package.json b/package.json index fa6f0a2..62fcbd6 100644 --- a/package.json +++ b/package.json @@ -77,6 +77,7 @@ "@vercel/speed-insights": "^1.0.2", "axios": "^1.7.7", "bcrypt": "^5.1.1", + "chart.js": "^4.4.6", "cheerio": "^1.0.0", "crypto-random-string": "^5.0.0", "cssnano": "^6.0.3", @@ -89,6 +90,7 @@ "nodemailer": "^6.9.12", "openai": "^4.73.0", "stripe": "^17.3.1", + "svelte-chartjs": "^3.1.5", "svelteship-soen-343": "file:", "three": "^0.170.0", "ws": "^8.16.0", diff --git a/prisma/seed.ts b/prisma/seed.ts index dd06182..ac68205 100644 --- a/prisma/seed.ts +++ b/prisma/seed.ts @@ -9,7 +9,6 @@ async function seedAll() { where: { id: 1 }, update: {}, create: { - id: 1, email: "admin@svelteship.test", name: "Joe Admin", comment: "Created from the Prisma seed file", @@ -22,7 +21,6 @@ async function seedAll() { where: { id: 2 }, update: {}, create: { - id: 2, email: "customer@svelteship.test", name: "First Customer", comment: "Created from the Prisma seed file", @@ -35,7 +33,6 @@ async function seedAll() { where: { id: 1 }, update: {}, create: { - id: 1, heightCm: 50, widthCm: 40, depthCm: 30, @@ -47,7 +44,6 @@ async function seedAll() { where: { id: 1 }, update: {}, create: { - id: 1, address1: "1455 boul de Maisonneuve O", city: "Montreal", administartiveArea: "QC", @@ -62,7 +58,6 @@ async function seedAll() { where: { id: 2 }, update: {}, create: { - id: 2, address1: "7141 rue Sherbrooke O", city: "Montreal", administartiveArea: "QC", @@ -77,7 +72,6 @@ async function seedAll() { where: { id: 1 }, update: {}, create: { - id: 1, originId: concordia.id, destinationId: loyola.id, amountQuotedCents: 2000, @@ -90,7 +84,6 @@ async function seedAll() { where: { id: 2 }, update: {}, create: { - id: 2, originId: concordia.id, destinationId: loyola.id, amountQuotedCents: 2000, @@ -102,7 +95,6 @@ async function seedAll() { where: { id: 3 }, update: {}, create: { - id: 3, originId: concordia.id, destinationId: loyola.id, amountQuotedCents: 2000, @@ -114,7 +106,6 @@ async function seedAll() { where: { id: 1 }, update: {}, create: { - id: 1, trackingNumber: "111111111111", quotationId: quote.id, transactionType: TransactionType.MANUAL, @@ -127,7 +118,6 @@ async function seedAll() { where: { id: 1 }, update: {}, create: { - id: 1, type: TrackingStatus.PICKED_UP_AT_ORIGIN, locationId: concordia.id, shipmentTransactionId: shipment.id, diff --git a/src/lib/components/NavBar.svelte b/src/lib/components/NavBar.svelte index 9fcfa04..1af0319 100644 --- a/src/lib/components/NavBar.svelte +++ b/src/lib/components/NavBar.svelte @@ -15,13 +15,16 @@ flex="flex-1 lg:flex-none justify-center" rounded="" border="" - class="bg-surface-100-800-token hidden h-full md:block "> + class="bg-surface-100-800-token hidden h-full md:block"> {#each links as link (link.name)} - -
+ (window.location.href = link.href)} + selected={$page.url.pathname === link.href}> + +
-
+
+
{link.name}
{/each} diff --git a/src/lib/components/map/map.svelte b/src/lib/components/map/map.svelte index 4fe20f0..63dd130 100644 --- a/src/lib/components/map/map.svelte +++ b/src/lib/components/map/map.svelte @@ -1,11 +1,9 @@
@@ -118,6 +189,8 @@ {/if}