Copy and pasted content in and pressed enter and got an error #553

Closed
opened 2026-02-16 17:27:17 -05:00 by yindo · 1 comment
Owner

Originally created by @jackberger03 on GitHub (Jul 8, 2025).

Originally assigned to: @adamdotdevin on GitHub.

Copied content:
➜ Local: http://localhost:5173/
➜ Network: use --host to expose
➜ press h + enter to show help
10:49:34 AM [vite] (ssr) Error when evaluating SSR module /src/routes/(auth)/admin/customers/[id]/+page.svelte: src/routes/(auth)/admin/customers/[id]/+page.svelte:403:3 </div> attempted to close an element that was not open
https://svelte.dev/e/element_invalid_closing_tag
Plugin: vite-plugin-svelte
File: src/routes/(auth)/admin/customers/[id]/+page.svelte:403:3
401 |
402 |
403 |
^
404 |
405 | {:else}
[Error [CompileError]: src/routes/(auth)/admin/customers/[id]/+page.svelte:403:3 </div> attempted to close an element that was not open
https://svelte.dev/e/element_invalid_closing_tag] {
id: 'src/routes/(auth)/admin/customers/[id]/+page.svelte',
frame: ' 401 | \n' +
' 402 | \n' +
' 403 | \n' +
' ^\n' +
' 404 | \n' +
' 405 | {:else}',
code: 'element_invalid_closing_tag',
loc: {
line: 403,
column: 3,
file: 'src/routes/(auth)/admin/customers/[id]/+page.svelte'
},
plugin: 'vite-plugin-svelte',
pluginCode: '<script lang="ts">\n' +
"\timport { onMount } from 'svelte';\n" +
"\timport { page } from '$app/stores';\n" +
"\timport { goto } from '$app/navigation';\n" +
"\timport { ApiService, type Customer, type Job } from '$lib/api.js';\n" +
"\timport { formatDate, formatDateTime } from '$lib/dateUtils.js';\n" +
"\timport UserManagement from '$lib/components/UserManagement.svelte';\n" +
"\timport TailwindButton from '$lib/components/TailwindButton.svelte';\n" +
"\timport TailwindCard from '$lib/components/TailwindCard.svelte';\n" +
"\timport TailwindBadge from '$lib/components/TailwindBadge.svelte';\n" +
"\timport { Plus, Calendar, User, Wrench, Trash2, Edit, AlertCircle, CreditCard, ExternalLink, Settings, ChevronRight } from 'lucide-svelte';\n" +
"\timport SubscriptionBadge from '$lib/components/SubscriptionBadge.svelte';\n" +
'\n' +
'\tlet customer: Customer | null = null;\n' +
'\tlet jobs: Job[] = [];\n' +
'\tlet loading = true;\n' +
'\tlet jobsLoading = true;\n' +
'\tlet deleting = false;\n' +
"\tlet error = '';\n" +
"\tlet jobError = '';\n" +
'\n' +
'\t$: customerId = $page.params.id;\n' +
'\n' +
'\tonMount(async () => {\n' +
'\t\tawait Promise.all([loadCustomer(), loadJobs()]);\n' +
'\t});\n' +
'\n' +
'\tasync function loadCustomer() {\n' +
'\t\ttry {\n' +
'\t\t\tcustomer = await ApiService.getCustomer(customerId);\n' +
'\t\t} catch (err) {\n' +
"\t\t\terror = err instanceof Error ? err.message : 'Failed to load customer';\n" +
'\t\t} finally {\n' +
'\t\t\tloading = false;\n' +
'\t\t}\n' +
'\t}\n' +
'\n' +
'\tasync function loadJobs() {\n' +
'\t\ttry {\n' +
'\t\t\tjobs = await ApiService.getCustomerJobs(customerId);\n' +
'\t\t\t\n' +
'\t\t\t// DEBUG: Log raw API response\n' +
"\t\t\tconsole.log('=== ADMIN CUSTOMER DETAIL VIEW DEBUG ===');\n" +
"\t\t\tconsole.log('Customer ID:', customerId);\n" +
"\t\t\tconsole.log('Total jobs loaded:', jobs.length);\n" +
"\t\t\tconsole.log('Raw jobs data from API:', JSON.parse(JSON.stringify(jobs)));\n" +
"\t\t\tconsole.log('Job statuses:', jobs.map(j => ({ id: j.id, title: j.title, status: j.status })));\n" +
"\t\t\tconsole.log('=====================================');\n" +
'\t\t} catch (err) {\n' +
"\t\t\tjobError = err instanceof Error ? err.message : 'Failed to load jobs';\n" +
'\t\t} finally {\n' +
'\t\t\tjobsLoading = false;\n' +
'\t\t}\n' +
'\t}\n' +
'\n' +
'\tasync function deleteJob(jobId: string) {\n' +
"\t\tif (!confirm('Are you sure you want to delete this job?')) return;\n" +
'\t\t\n' +
'\t\ttry {\n' +
'\t\t\tawait ApiService.deleteJob(jobId);\n' +
'\t\t\tawait loadJobs(); // Reload jobs\n' +
'\t\t} catch (err) {\n' +
"\t\t\tjobError = err instanceof Error ? err.message : 'Failed to delete job';\n" +
'\t\t}\n' +
'\t}\n' +
'\n' +
"\tfunction getStatusVariant(status: string): 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger' {\n" +
'\t\tswitch (status) {\n' +
"\t\t\tcase 'open': return 'primary';\n" +
"\t\t\tcase 'assigned': return 'warning';\n" +
"\t\t\tcase 'in-progress': return 'secondary';\n" +
"\t\t\tcase 'closed': return 'success';\n" +
"\t\t\tcase 'needs_manual_assignment': return 'danger';\n" +
"\t\t\tdefault: return 'default';\n" +
'\t\t}\n' +
'\t}\n' +
'\n' +
'\tfunction formatStatus(status: string): string {\n' +
"\t\treturn status.charAt(0).toUpperCase() + status.slice(1).replace('
', ' ').replace('-', ' ');\n" +
'\t}\n' +
'\n' +
'\n' +
'\tasync function handleDelete() {\n' +
'\t\tif (!confirm(Are you sure you want to delete "${customer?.info.legalName}"? This action cannot be undone.)) {\n' +
'\t\t\treturn;\n' +
'\t\t}\n' +
'\n' +
'\t\tdeleting = true;\n' +
"\t\terror = '';\n" +
'\n' +
'\t\ttry {\n' +
'\t\t\tawait ApiService.deleteCustomer(customerId);\n' +
"\t\t\tgoto('/admin/customers');\n" +
'\t\t} catch (err) {\n' +
"\t\t\terror = err instanceof Error ? err.message : 'Failed to delete customer';\n" +
'\t\t\tdeleting = false;\n' +
'\t\t}\n' +
'\t}\n' +
'</script>\n' +
'\n' +
'svelte:head\n' +
"\t\n" +
'</svelte:head>\n' +
'\n' +
'

\n' +
'\t\n' +
'\t\n' +
'\t\tCustomers\n' +
'\t\t\n' +
\t\t<span class="text-[#1B2438]">{customer ? customer.info.legalName : 'Loading...'}</span>\n +
'\t\n' +
'\n' +
'\t{#if loading}\n' +
'\t\t
\n' +
'\t\t\t
\n' +
'\t\t\t\t
\n' +
'\t\t\t
\n' +
'\t\t\t

Loading customer details...

\n' +
'\t\t
\n' +
'\t{:else if error}\n' +
'\t\t
\n' +
'\t\t\t

Error: {error}

\n' +
'\t\t
\n' +
'\t{:else if customer}\n' +
'\t\t
\n' +
'\t\t\t\n' +
'\t\t\t
\n' +
'\t\t\t\t
\n' +
'\t\t\t\t\t

{customer.info.legalName}

\n' +
'\t\t\t\t\t

Customer ID: {customer._id}

\n' +
'\t\t\t\t
\n' +
'\t\t\t\t
\n' +
'\t\t\t\t\t\n' +
'\t\t\t\t\t\t\n' +
'\t\t\t\t\t\tEdit Customer\n' +
'\t\t\t\t\t\n' +
'\t\t\t\t\t<TailwindButton \n' +
'\t\t\t\t\t\tvariant="danger"\n' +
'\t\t\t\t\t\ton:click={handleDelete}\n' +
'\t\t\t\t\t\tdisabled={deleting}\n' +
'\t\t\t\t\t>\n' +
'\t\t\t\t\t\t\n' +
"\t\t\t\t\t\t{deleting ? 'Deleting...' : 'Delete Customer'}\n" +
'\t\t\t\t\t\n' +
'\t\t\t\t
\n' +
'\t\t\t
\n' +
'\n' +
'\t\t\t
\n' +
'\t\t\t\t\n' +
'\t\t\t\t
\n' +
'\t\t\t\t\t\n' +
'\t\t\t\t\t\n' +
'\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t

Subscription Information

\n' +
'\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t

Current Plan

\n' +
'\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t\t
\n' +
"\t\t\t\t\t\t\t\t\t{#if customer.subscriptionTier && customer.subscriptionTier !== 'none'}\n" +
'\t\t\t\t\t\t\t\t\t\t

\n' +
'\t\t\t\t\t\t\t\t\t\t\tCustomer has an active subscription plan\n' +
'\t\t\t\t\t\t\t\t\t\t

\n' +
'\t\t\t\t\t\t\t\t\t{:else}\n' +
'\t\t\t\t\t\t\t\t\t\t

\n' +
'\t\t\t\t\t\t\t\t\t\t\tNo active subscription\n' +
'\t\t\t\t\t\t\t\t\t\t

\n' +
'\t\t\t\t\t\t\t\t\t{/if}\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t

Stripe Information

\n' +
'\t\t\t\t\t\t\t\t\t{#if customer.info.payment?.stripeCustomerId}\n' +
'\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\t\tCustomer ID:\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\t{customer.info.payment.stripeCustomerId}\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\t{#if customer.info.payment?.stripeSubscriptionId}\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\tSubscription ID:\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\t\t{customer.info.payment.stripeSubscriptionId}\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\t{/if}\n' +
'\t\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t<TailwindButton \n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\tvariant="outline" \n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\tsize="sm"\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\thref="https://dashboard.stripe.com/customers/{customer.info.payment.stripeCustomerId}"\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\ttarget="_blank"\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\trel="noopener noreferrer"\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t>\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\tView in Stripe\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t{:else}\n' +
'\t\t\t\t\t\t\t\t\t\t

\n' +
'\t\t\t\t\t\t\t\t\t\t\tNo Stripe customer ID associated\n' +
'\t\t\t\t\t\t\t\t\t\t

\n' +
'\t\t\t\t\t\t\t\t\t{/if}\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\n' +
'\t\t\t\t
\n' +
'\n' +
'\t\t\t\t\t\n' +
'\t\t\t\t\t\n' +
'\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t

Jobs ({jobs.length})

\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t\tNew Job\n' +
'\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t{#if jobError}\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t\t{jobError}\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t{/if}\n' +
'\n' +
'\t\t\t\t\t\t\t{#if jobsLoading}\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t

Loading jobs...

\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t{:else if jobs.length === 0}\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t

No jobs found for this customer

\n' +
'\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t\t\tCreate First Job\n' +
'\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t{:else}\n' +
'\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t{#each jobs as job}\n' +
'\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\t\t

\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{job.title}\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t
\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\t\t

\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\t\t{#if job.status}\n' +
'\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TailwindBadge variant={getStatusVariant(job.status)} cla'... 6435 more characters,
runnerError: Error: RunnerError
at reviveInvokeError (file:///Users/jackberger/Code/ios_app/Resilient%20Power/sv-resilient/node_modules/vite/dist/node/module-runner.js:552:18)
at Object.invoke (file:///Users/jackberger/Code/ios_app/Resilient%20Power/sv-resilient/node_modules/vite/dist/node/module-runner.js:635:15)
at async SSRCompatModuleRunner.getModuleInformation (file:///Users/jackberger/Code/ios_app/Resilient%20Power/sv-resilient/node_modules/vite/dist/node/module-runner.js:1205:73)
at async SSRCompatModuleRunner.import (file:///Users/jackberger/Code/ios_app/Resilient%20Power/sv-resilient/node_modules/vite/dist/node/module-runner.js:1116:27)
at async instantiateModule (file:///Users/jackberger/Code/ios_app/Resilient%20Power/sv-resilient/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:25231:12)
at async loud_ssr_load_module (file:///Users/jackberger/Code/ios_app/Resilient%20Power/sv-resilient/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:70:11)
at async resolve (file:///Users/jackberger/Code/ios_app/Resilient%20Power/sv-resilient/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:97:18)
at async result.component (file:///Users/jackberger/Code/ios_app/Resilient%20Power/sv-resilient/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:206:41)
at async Promise.all (index 3)
at async render_response (eval at runInlinedModule (file:///Users/jackberger/Code/ios_app/Resilient%20Power/sv-resilient/node_modules/vite/dist/node/module-runner.js:1062:11), :77:21)
}

Google Chrome is requesting /.well-known/appspecific/com.chrome.devtools.json to automatically configure devtools project settings. To serve this file, add this plugin to your Vite config:

https://github.com/ChromeDevTools/vite-plugin-devtools-json
Error:

failed to send message: POST
"http://127.0.0.1:64306/session/ses_ 815b1ebc7ffezLaR2MhvH7RipW/message":
400 Bad Request
{"name": "UnknownError", "data": {"mess age": "Error: Session
ses_815b1ebc7ffezLaR2MhvH7RipWis
busy "}}

Originally created by @jackberger03 on GitHub (Jul 8, 2025). Originally assigned to: @adamdotdevin on GitHub. Copied content: ➜ Local: http://localhost:5173/ ➜ Network: use --host to expose ➜ press h + enter to show help 10:49:34 AM [vite] (ssr) Error when evaluating SSR module /src/routes/(auth)/admin/customers/[id]/+page.svelte: src/routes/(auth)/admin/customers/[id]/+page.svelte:403:3 `</div>` attempted to close an element that was not open https://svelte.dev/e/element_invalid_closing_tag Plugin: vite-plugin-svelte File: src/routes/(auth)/admin/customers/[id]/+page.svelte:403:3 401 | </TailwindCard> 402 | </div> 403 | </div> ^ 404 | </div> 405 | {:else} [Error [CompileError]: src/routes/(auth)/admin/customers/[id]/+page.svelte:403:3 `</div>` attempted to close an element that was not open https://svelte.dev/e/element_invalid_closing_tag] { id: 'src/routes/(auth)/admin/customers/[id]/+page.svelte', frame: ' 401 | </TailwindCard>\n' + ' 402 | </div>\n' + ' 403 | </div>\n' + ' ^\n' + ' 404 | </div>\n' + ' 405 | {:else}', code: 'element_invalid_closing_tag', loc: { line: 403, column: 3, file: 'src/routes/(auth)/admin/customers/[id]/+page.svelte' }, plugin: 'vite-plugin-svelte', pluginCode: '<script lang="ts">\n' + "\timport { onMount } from 'svelte';\n" + "\timport { page } from '$app/stores';\n" + "\timport { goto } from '$app/navigation';\n" + "\timport { ApiService, type Customer, type Job } from '$lib/api.js';\n" + "\timport { formatDate, formatDateTime } from '$lib/dateUtils.js';\n" + "\timport UserManagement from '$lib/components/UserManagement.svelte';\n" + "\timport TailwindButton from '$lib/components/TailwindButton.svelte';\n" + "\timport TailwindCard from '$lib/components/TailwindCard.svelte';\n" + "\timport TailwindBadge from '$lib/components/TailwindBadge.svelte';\n" + "\timport { Plus, Calendar, User, Wrench, Trash2, Edit, AlertCircle, CreditCard, ExternalLink, Settings, ChevronRight } from 'lucide-svelte';\n" + "\timport SubscriptionBadge from '$lib/components/SubscriptionBadge.svelte';\n" + '\n' + '\tlet customer: Customer | null = null;\n' + '\tlet jobs: Job[] = [];\n' + '\tlet loading = true;\n' + '\tlet jobsLoading = true;\n' + '\tlet deleting = false;\n' + "\tlet error = '';\n" + "\tlet jobError = '';\n" + '\n' + '\t$: customerId = $page.params.id;\n' + '\n' + '\tonMount(async () => {\n' + '\t\tawait Promise.all([loadCustomer(), loadJobs()]);\n' + '\t});\n' + '\n' + '\tasync function loadCustomer() {\n' + '\t\ttry {\n' + '\t\t\tcustomer = await ApiService.getCustomer(customerId);\n' + '\t\t} catch (err) {\n' + "\t\t\terror = err instanceof Error ? err.message : 'Failed to load customer';\n" + '\t\t} finally {\n' + '\t\t\tloading = false;\n' + '\t\t}\n' + '\t}\n' + '\n' + '\tasync function loadJobs() {\n' + '\t\ttry {\n' + '\t\t\tjobs = await ApiService.getCustomerJobs(customerId);\n' + '\t\t\t\n' + '\t\t\t// DEBUG: Log raw API response\n' + "\t\t\tconsole.log('=== ADMIN CUSTOMER DETAIL VIEW DEBUG ===');\n" + "\t\t\tconsole.log('Customer ID:', customerId);\n" + "\t\t\tconsole.log('Total jobs loaded:', jobs.length);\n" + "\t\t\tconsole.log('Raw jobs data from API:', JSON.parse(JSON.stringify(jobs)));\n" + "\t\t\tconsole.log('Job statuses:', jobs.map(j => ({ id: j._id, title: j.title, status: j.status })));\n" + "\t\t\tconsole.log('=====================================');\n" + '\t\t} catch (err) {\n' + "\t\t\tjobError = err instanceof Error ? err.message : 'Failed to load jobs';\n" + '\t\t} finally {\n' + '\t\t\tjobsLoading = false;\n' + '\t\t}\n' + '\t}\n' + '\n' + '\tasync function deleteJob(jobId: string) {\n' + "\t\tif (!confirm('Are you sure you want to delete this job?')) return;\n" + '\t\t\n' + '\t\ttry {\n' + '\t\t\tawait ApiService.deleteJob(jobId);\n' + '\t\t\tawait loadJobs(); // Reload jobs\n' + '\t\t} catch (err) {\n' + "\t\t\tjobError = err instanceof Error ? err.message : 'Failed to delete job';\n" + '\t\t}\n' + '\t}\n' + '\n' + "\tfunction getStatusVariant(status: string): 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger' {\n" + '\t\tswitch (status) {\n' + "\t\t\tcase 'open': return 'primary';\n" + "\t\t\tcase 'assigned': return 'warning';\n" + "\t\t\tcase 'in-progress': return 'secondary';\n" + "\t\t\tcase 'closed': return 'success';\n" + "\t\t\tcase 'needs_manual_assignment': return 'danger';\n" + "\t\t\tdefault: return 'default';\n" + '\t\t}\n' + '\t}\n' + '\n' + '\tfunction formatStatus(status: string): string {\n' + "\t\treturn status.charAt(0).toUpperCase() + status.slice(1).replace('_', ' ').replace('-', ' ');\n" + '\t}\n' + '\n' + '\n' + '\tasync function handleDelete() {\n' + '\t\tif (!confirm(`Are you sure you want to delete "${customer?.info.legalName}"? This action cannot be undone.`)) {\n' + '\t\t\treturn;\n' + '\t\t}\n' + '\n' + '\t\tdeleting = true;\n' + "\t\terror = '';\n" + '\n' + '\t\ttry {\n' + '\t\t\tawait ApiService.deleteCustomer(customerId);\n' + "\t\t\tgoto('/admin/customers');\n" + '\t\t} catch (err) {\n' + "\t\t\terror = err instanceof Error ? err.message : 'Failed to delete customer';\n" + '\t\t\tdeleting = false;\n' + '\t\t}\n' + '\t}\n' + '</script>\n' + '\n' + '<svelte:head>\n' + "\t<title>{customer ? customer.info.legalName : 'Customer'} - Resilient Schedule</title>\n" + '</svelte:head>\n' + '\n' + '<div class="container mx-auto px-4 sm:px-6 lg:px-8 py-8 lg:py-12">\n' + '\t<!-- Breadcrumb -->\n' + '\t<nav class="flex items-center gap-2 text-sm text-[#1B2438]/60 mb-6">\n' + '\t\t<a href="/admin/customers" class="hover:text-[#1E54B4] transition-colors">Customers</a>\n' + '\t\t<span>›</span>\n' + `\t\t<span class="text-[#1B2438]">{customer ? customer.info.legalName : 'Loading...'}</span>\n` + '\t</nav>\n' + '\n' + '\t{#if loading}\n' + '\t\t<div class="text-center py-12">\n' + '\t\t\t<div class="inline-flex items-center justify-center">\n' + '\t\t\t\t<div class="w-12 h-12 border-4 border-[#1E54B4] border-t-transparent rounded-full animate-spin"></div>\n' + '\t\t\t</div>\n' + '\t\t\t<p class="text-[#1B2438]/70 mt-4">Loading customer details...</p>\n' + '\t\t</div>\n' + '\t{:else if error}\n' + '\t\t<div class="bg-red-50 border border-red-200 text-red-700 px-6 py-4 rounded-2xl mb-6">\n' + '\t\t\t<p class="font-medium">Error: {error}</p>\n' + '\t\t</div>\n' + '\t{:else if customer}\n' + '\t\t<div class="space-y-8">\n' + '\t\t\t<!-- Customer Header -->\n' + '\t\t\t<div class="flex flex-col sm:flex-row sm:items-center justify-between gap-4">\n' + '\t\t\t\t<div>\n' + '\t\t\t\t\t<h1 class="text-3xl sm:text-4xl lg:text-5xl font-bold text-[#1B2438]">{customer.info.legalName}</h1>\n' + '\t\t\t\t\t<p class="text-lg text-[#1B2438]/70 mt-2">Customer ID: {customer._id}</p>\n' + '\t\t\t\t</div>\n' + '\t\t\t\t<div class="flex gap-3">\n' + '\t\t\t\t\t<TailwindButton variant="outline" href="/admin/customers/{customer._id}/edit">\n' + '\t\t\t\t\t\t<Edit class="h-4 w-4 mr-2" />\n' + '\t\t\t\t\t\tEdit Customer\n' + '\t\t\t\t\t</TailwindButton>\n' + '\t\t\t\t\t<TailwindButton \n' + '\t\t\t\t\t\tvariant="danger"\n' + '\t\t\t\t\t\ton:click={handleDelete}\n' + '\t\t\t\t\t\tdisabled={deleting}\n' + '\t\t\t\t\t>\n' + '\t\t\t\t\t\t<Trash2 class="h-4 w-4 mr-2" />\n' + "\t\t\t\t\t\t{deleting ? 'Deleting...' : 'Delete Customer'}\n" + '\t\t\t\t\t</TailwindButton>\n' + '\t\t\t\t</div>\n' + '\t\t\t</div>\n' + '\n' + '\t\t\t<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">\n' + '\t\t\t\t<!-- Left Column: Customer Info -->\n' + '\t\t\t\t<div class="lg:col-span-2 space-y-6">\n' + '\t\t\t\t\t<!-- Subscription Information Section -->\n' + '\t\t\t\t\t<TailwindCard variant="default">\n' + '\t\t\t\t\t\t<div class="p-6">\n' + '\t\t\t\t\t\t\t<div class="flex items-center gap-3 mb-6">\n' + '\t\t\t\t\t\t\t\t<div class="w-10 h-10 bg-[#E6E9FF] rounded-xl flex items-center justify-center">\n' + '\t\t\t\t\t\t\t\t\t<CreditCard class="h-5 w-5 text-[#1E54B4]" />\n' + '\t\t\t\t\t\t\t\t</div>\n' + '\t\t\t\t\t\t\t\t<h3 class="text-xl font-semibold text-[#1B2438]">Subscription Information</h3>\n' + '\t\t\t\t\t\t\t</div>\n' + '\t\t\t\t\t\t\t<div class="grid grid-cols-1 md:grid-cols-2 gap-6">\n' + '\t\t\t\t\t\t\t\t<div>\n' + '\t\t\t\t\t\t\t\t\t<p class="text-sm text-muted-foreground mb-2">Current Plan</p>\n' + '\t\t\t\t\t\t\t\t\t<div class="mb-4">\n' + '\t\t\t\t\t\t\t\t\t\t<SubscriptionBadge tier={customer.subscriptionTier} size="lg" plain />\n' + '\t\t\t\t\t\t\t\t\t</div>\n' + "\t\t\t\t\t\t\t\t\t{#if customer.subscriptionTier && customer.subscriptionTier !== 'none'}\n" + '\t\t\t\t\t\t\t\t\t\t<p class="text-sm text-muted-foreground">\n' + '\t\t\t\t\t\t\t\t\t\t\tCustomer has an active subscription plan\n' + '\t\t\t\t\t\t\t\t\t\t</p>\n' + '\t\t\t\t\t\t\t\t\t{:else}\n' + '\t\t\t\t\t\t\t\t\t\t<p class="text-sm text-muted-foreground">\n' + '\t\t\t\t\t\t\t\t\t\t\tNo active subscription\n' + '\t\t\t\t\t\t\t\t\t\t</p>\n' + '\t\t\t\t\t\t\t\t\t{/if}\n' + '\t\t\t\t\t\t\t\t</div>\n' + '\t\t\t\t\t\t\t\t\n' + '\t\t\t\t\t\t\t\t<div>\n' + '\t\t\t\t\t\t\t\t\t<p class="text-sm text-muted-foreground mb-2">Stripe Information</p>\n' + '\t\t\t\t\t\t\t\t\t{#if customer.info.payment?.stripeCustomerId}\n' + '\t\t\t\t\t\t\t\t\t\t<div class="space-y-2">\n' + '\t\t\t\t\t\t\t\t\t\t\t<div class="flex items-center gap-2">\n' + '\t\t\t\t\t\t\t\t\t\t\t\t<span class="text-sm font-medium">Customer ID:</span>\n' + '\t\t\t\t\t\t\t\t\t\t\t\t<code class="text-xs bg-gray-100 px-2 py-1 rounded">\n' + '\t\t\t\t\t\t\t\t\t\t\t\t\t{customer.info.payment.stripeCustomerId}\n' + '\t\t\t\t\t\t\t\t\t\t\t\t</code>\n' + '\t\t\t\t\t\t\t\t\t\t\t</div>\n' + '\t\t\t\t\t\t\t\t\t\t\t{#if customer.info.payment?.stripeSubscriptionId}\n' + '\t\t\t\t\t\t\t\t\t\t\t\t<div class="flex items-center gap-2">\n' + '\t\t\t\t\t\t\t\t\t\t\t\t\t<span class="text-sm font-medium">Subscription ID:</span>\n' + '\t\t\t\t\t\t\t\t\t\t\t\t\t<code class="text-xs bg-gray-100 px-2 py-1 rounded">\n' + '\t\t\t\t\t\t\t\t\t\t\t\t\t\t{customer.info.payment.stripeSubscriptionId}\n' + '\t\t\t\t\t\t\t\t\t\t\t\t\t</code>\n' + '\t\t\t\t\t\t\t\t\t\t\t\t</div>\n' + '\t\t\t\t\t\t\t\t\t\t\t{/if}\n' + '\t\t\t\t\t\t\t\t\t\t\t<div class="mt-3">\n' + '\t\t\t\t\t\t\t\t\t\t\t\t<TailwindButton \n' + '\t\t\t\t\t\t\t\t\t\t\t\t\tvariant="outline" \n' + '\t\t\t\t\t\t\t\t\t\t\t\t\tsize="sm"\n' + '\t\t\t\t\t\t\t\t\t\t\t\t\thref="https://dashboard.stripe.com/customers/{customer.info.payment.stripeCustomerId}"\n' + '\t\t\t\t\t\t\t\t\t\t\t\t\ttarget="_blank"\n' + '\t\t\t\t\t\t\t\t\t\t\t\t\trel="noopener noreferrer"\n' + '\t\t\t\t\t\t\t\t\t\t\t\t>\n' + '\t\t\t\t\t\t\t\t\t\t\t\t\t<ExternalLink class="h-3 w-3 mr-2" />\n' + '\t\t\t\t\t\t\t\t\t\t\t\t\tView in Stripe\n' + '\t\t\t\t\t\t\t\t\t\t\t\t</TailwindButton>\n' + '\t\t\t\t\t\t\t\t\t\t\t</div>\n' + '\t\t\t\t\t\t\t\t\t\t</div>\n' + '\t\t\t\t\t\t\t\t\t{:else}\n' + '\t\t\t\t\t\t\t\t\t\t<p class="text-sm text-muted-foreground">\n' + '\t\t\t\t\t\t\t\t\t\t\tNo Stripe customer ID associated\n' + '\t\t\t\t\t\t\t\t\t\t</p>\n' + '\t\t\t\t\t\t\t\t\t{/if}\n' + '\t\t\t\t\t\t\t\t</div>\n' + '\t\t\t\t\t\t\t</div>\n' + '\t\t\t\t\t\t</div>\n' + '\t\t\t\t\t</TailwindCard>\n' + '\t\t\t\t</div>\n' + '\n' + '\t\t\t\t\t<!-- Jobs Management Section -->\n' + '\t\t\t\t\t<TailwindCard variant="default">\n' + '\t\t\t\t\t\t<div class="p-6">\n' + '\t\t\t\t\t\t\t<div class="flex items-center justify-between mb-6">\n' + '\t\t\t\t\t\t\t\t<div class="flex items-center gap-3">\n' + '\t\t\t\t\t\t\t\t\t<div class="w-10 h-10 bg-[#FE8F65]/10 rounded-xl flex items-center justify-center">\n' + '\t\t\t\t\t\t\t\t\t\t<Wrench class="h-5 w-5 text-[#FE8F65]" />\n' + '\t\t\t\t\t\t\t\t\t</div>\n' + '\t\t\t\t\t\t\t\t\t<h3 class="text-xl font-semibold text-[#1B2438]">Jobs ({jobs.length})</h3>\n' + '\t\t\t\t\t\t\t\t</div>\n' + '\t\t\t\t\t\t\t\t<TailwindButton href="/admin/customers/{customer._id}/jobs/new" variant="primary" size="sm">\n' + '\t\t\t\t\t\t\t\t\t<Plus class="h-4 w-4 mr-2" />\n' + '\t\t\t\t\t\t\t\t\tNew Job\n' + '\t\t\t\t\t\t\t\t</TailwindButton>\n' + '\t\t\t\t\t\t\t</div>\n' + '\t\t\t\t\t\t\t{#if jobError}\n' + '\t\t\t\t\t\t\t\t<div class="bg-destructive/15 text-destructive px-3 py-2 rounded-md text-sm mb-4 flex items-center gap-2">\n' + '\t\t\t\t\t\t\t\t\t<AlertCircle class="h-4 w-4" />\n' + '\t\t\t\t\t\t\t\t\t{jobError}\n' + '\t\t\t\t\t\t\t\t</div>\n' + '\t\t\t\t\t\t\t{/if}\n' + '\n' + '\t\t\t\t\t\t\t{#if jobsLoading}\n' + '\t\t\t\t\t\t\t\t<div class="text-center py-8">\n' + '\t\t\t\t\t\t\t\t\t<div class="inline-flex items-center justify-center">\n' + '\t\t\t\t\t\t\t\t\t\t<div class="w-8 h-8 border-3 border-[#FE8F65] border-t-transparent rounded-full animate-spin"></div>\n' + '\t\t\t\t\t\t\t\t\t</div>\n' + '\t\t\t\t\t\t\t\t\t<p class="text-[#1B2438]/70 mt-3">Loading jobs...</p>\n' + '\t\t\t\t\t\t\t\t</div>\n' + '\t\t\t\t\t\t\t{:else if jobs.length === 0}\n' + '\t\t\t\t\t\t\t\t<div class="text-center py-12">\n' + '\t\t\t\t\t\t\t\t\t<div class="w-16 h-16 bg-[#FE8F65]/10 rounded-full flex items-center justify-center mx-auto mb-4">\n' + '\t\t\t\t\t\t\t\t\t\t<Wrench class="w-8 h-8 text-[#FE8F65]" />\n' + '\t\t\t\t\t\t\t\t\t</div>\n' + '\t\t\t\t\t\t\t\t\t<p class="text-[#1B2438]/70 mb-4">No jobs found for this customer</p>\n' + '\t\t\t\t\t\t\t\t\t<TailwindButton href="/admin/customers/{customer._id}/jobs/new" variant="outline">\n' + '\t\t\t\t\t\t\t\t\t\t<Plus class="h-4 w-4 mr-2" />\n' + '\t\t\t\t\t\t\t\t\t\tCreate First Job\n' + '\t\t\t\t\t\t\t\t\t</TailwindButton>\n' + '\t\t\t\t\t\t\t\t</div>\n' + '\t\t\t\t\t\t\t{:else}\n' + '\t\t\t\t\t\t\t\t<div class="space-y-4">\n' + '\t\t\t\t\t\t\t\t\t{#each jobs as job}\n' + '\t\t\t\t\t\t\t\t\t\t<div class="bg-white rounded-xl border border-[#E6E9FF]/30 p-4 hover:shadow-lg transition-all duration-300">\n' + '\t\t\t\t\t\t\t\t\t\t\t<div class="flex items-start justify-between gap-4">\n' + '\t\t\t\t\t\t\t\t\t\t\t\t<div class="flex-1 space-y-3">\n' + '\t\t\t\t\t\t\t\t\t\t\t\t\t<div class="flex items-center gap-3">\n' + '\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h4 class="font-semibold text-lg">\n' + '\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href="/admin/jobs/{job._id}" class="text-[#1B2438] hover:text-[#1E54B4] transition-colors">\n' + '\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{job.title}\n' + '\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</a>\n' + '\t\t\t\t\t\t\t\t\t\t\t\t\t\t</h4>\n' + '\t\t\t\t\t\t\t\t\t\t\t\t\t\t{#if job.status}\n' + '\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<TailwindBadge variant={getStatusVariant(job.status)} cla'... 6435 more characters, runnerError: Error: RunnerError at reviveInvokeError (file:///Users/jackberger/Code/ios_app/Resilient%20Power/sv-resilient/node_modules/vite/dist/node/module-runner.js:552:18) at Object.invoke (file:///Users/jackberger/Code/ios_app/Resilient%20Power/sv-resilient/node_modules/vite/dist/node/module-runner.js:635:15) at async SSRCompatModuleRunner.getModuleInformation (file:///Users/jackberger/Code/ios_app/Resilient%20Power/sv-resilient/node_modules/vite/dist/node/module-runner.js:1205:73) at async SSRCompatModuleRunner.import (file:///Users/jackberger/Code/ios_app/Resilient%20Power/sv-resilient/node_modules/vite/dist/node/module-runner.js:1116:27) at async instantiateModule (file:///Users/jackberger/Code/ios_app/Resilient%20Power/sv-resilient/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:25231:12) at async loud_ssr_load_module (file:///Users/jackberger/Code/ios_app/Resilient%20Power/sv-resilient/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:70:11) at async resolve (file:///Users/jackberger/Code/ios_app/Resilient%20Power/sv-resilient/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:97:18) at async result.component (file:///Users/jackberger/Code/ios_app/Resilient%20Power/sv-resilient/node_modules/@sveltejs/kit/src/exports/vite/dev/index.js:206:41) at async Promise.all (index 3) at async render_response (eval at runInlinedModule (file:///Users/jackberger/Code/ios_app/Resilient%20Power/sv-resilient/node_modules/vite/dist/node/module-runner.js:1062:11), <anonymous>:77:21) } Google Chrome is requesting /.well-known/appspecific/com.chrome.devtools.json to automatically configure devtools project settings. To serve this file, add this plugin to your Vite config: https://github.com/ChromeDevTools/vite-plugin-devtools-json Error: failed to send message: POST "http://127.0.0.1:64306/session/ses_ 815b1ebc7ffezLaR2MhvH7RipW/message": 400 Bad Request {"name": "UnknownError", "data": {"mess age": "Error: Session ses_815b1ebc7ffezLaR2MhvH7RipWis busy "}}
yindo closed this issue 2026-02-16 17:27:17 -05:00
Author
Owner

@rekram1-node commented on GitHub (Dec 27, 2025):

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

@rekram1-node commented on GitHub (Dec 27, 2025): [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#553