gohorsejobs/frontend/build_errors.txt

1659 lines
64 KiB
Text
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.


> my-v0-project@0.1.0 build
> next build
Γû▓ Next.js 15.5.12
- Environments: .env.local
Creating an optimized production build ...
node.exe : Failed to
compile.
At line:1 char:1
+ & "C:\Program Files\
nodejs/node.exe" "C:\U
sers\Administrator\App
Data\ ...
+ ~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~
~~~~~
+ CategoryInfo
: NotSpeci
fied: (Failed to
compile.:String)
[], RemoteExcepti
on
+ FullyQualifiedE
rrorId : NativeCo
mmandError
./src/app/dashboard/ba
ckoffice/page.tsx
Error: x
Return statement is
not allowed here
,-[C:\de
v\gohorsejobs\frontend
\src\app\dashboard\bac
koffice\page.tsx:2
57:1]
254 |
}
255 |
256 |
if (loading) {
257 | 
,-[35;
1m>
return (
258 |
|
<div
className="flex
items-center
justify-center
h-full">
259 |
|
<div classNam
e="animate-spin
rounded-full h-8 w-8
border-b-2
border-primary"></div>
260 |
|
</div>
261 | 
`-[35;
1m> )
262 |
}
263 |
263 |
return (
`----
x Return
statement is not
allowed here
,-[C:\de
v\gohorsejobs\frontend
\src\app\dashboard\bac
koffice\page.tsx:2
64:1]
261 |
)
262 |
}
263 |
264 | 
,-[35;
1m> return (
265 |
|
<div
className="space-y-6">
266 |
|
<div
className="flex
items-center
justify-between">
267 |
|
<div>
268 |
|
<h1
className="text-3xl
font-bold text-foregro
und">Backoffice</h1>
269 |
|
<p classN
ame="text-muted-foregr
ound mt-1">SaaS
Administration &
Operations</p>
270 |
|
</div>
271 |
|
<div
className="flex
gap-2">
272 |
|
<Button
variant="outline"
onClick={() => loadBac
koffice(false)}
className="gap-2">
273 |
|
<RefreshCw
className="h-4 w-4" />
274 |
|
Refresh
275 |
|
</Button>
276 |
|
</div>
277 |
|
</div>
278 |
|
279 |
|
<Tabs defaultValu
e="dashboard"
className="space-y-4">
280 |
|
<TabsList>
281 |
|
<TabsTrigger value="da
shboard">Dashboard</Ta
bsTrigger>
282 |
|
<TabsTrigger value="pl
ans">Plans</TabsTrigge
r>
283 |
|
<TabsTrigger value="st
ripe">Stripe</TabsTrig
ger>
284 |
|
<TabsTrigger value="sy
stem">System</TabsTrig
ger>
285 |
|
</TabsList>
286 |
|
287 |
|
<TabsContent
value="dashboard"
className="space-y-4">
288 |
|
{/*
Stats Overview */}
289 |
|
{stats
&& (
290 |
|
<div
className="grid gap-4
md:grid-cols-2
lg:grid-cols-4">
291 |
|
<Card>
292 |
|
<CardHeader
className="flex
flex-row items-center
justify-between
space-y-0 pb-2">
293 |
|
<CardTitle
className="text-sm
font-medium">Total
Revenue</CardTitle>
294 |
|
<span
className="text-xs tex
t-muted-foreground">$<
/span>
295 |
|
</CardHeader>
296 |
|
<CardContent>
297 |
|
<div
className="text-2xl fo
nt-bold">${stats.month
lyRevenue?.toLocaleStr
ing() || '0'}</div>
298 |
|
<p
className="text-xs tex
t-muted-foreground">{s
tats.revenueGrowth ? `
+${stats.revenueGrowth
}% from last month` :
'This month'}</p>
299 |
|
</CardContent>
300 |
|
</Card>
301 |
|
<Card>
302 |
|
<CardHeader
className="flex
flex-row items-center
justify-between
space-y-0 pb-2">
303 |
|
<CardTitle
className="text-sm
font-medium">Active Su
bscriptions</CardTitle
>
304 |
|
<CheckCircle
className="h-4 w-4 tex
t-muted-foreground" />
305 |
|
</CardHeader>
306 |
|
<CardContent>
307 |
|
<div
className="text-2xl fo
nt-bold">{stats.active
Subscriptions ||
0}</div>
308 |
|
<p
className="text-xs tex
t-muted-foreground">{s
tats.subscriptionGrowt
h ? `+${stats.subscrip
tionGrowth} this
week` : 'Current
active'}</p>
309 |
|
</CardContent>
310 |
|
</Card>
311 |
|
<Card>
312 |
|
<CardHeader
className="flex
flex-row items-center
justify-between
space-y-0 pb-2">
313 |
|
<CardTitle
className="text-sm fon
t-medium">Companies</C
ardTitle>
314 |
|
<div
className="h-4 w-4 tex
t-muted-foreground" />
315 |
|
</CardHeader>
316 |
|
<CardContent>
317 |
|
<div
className="text-2xl fo
nt-bold">{stats.totalC
ompanies || 0}</div>
318 |
|
<p
className="text-xs tex
t-muted-foreground">Pl
atform total</p>
319 |
|
</CardContent>
320 |
|
</Card>
321 |
|
<Card>
322 |
|
<CardHeader
className="flex
flex-row items-center
justify-between
space-y-0 pb-2">
323 |
|
<CardTitle
className="text-sm
font-medium">New
(Month)</CardTitle>
324 |
|
<Plus
className="h-4 w-4 tex
t-muted-foreground" />
325 |
|
</CardHeader>
326 |
|
<CardContent>
327 |
|
<div
className="text-2xl fo
nt-bold">+{stats.newCo
mpaniesThisMonth ||
0}</div>
328 |
|
<p
className="text-xs tex
t-muted-foreground">Si
nce start of month</p>
329 |
|
</CardContent>
330 |
|
</Card>
331 |
|
</div>
332 |
|
)}
333 |
|
334 |
|
<div
className="grid gap-4
md:grid-cols-2
lg:grid-cols-7">
335 |
|
<Card className="col-s
pan-4">
336 |
|
<CardHeader>
337 |
|
<CardTitle>Empresas
pendentes</CardTitle>
338 |
|
<CardDescription>Ap
rovação e
verificação de empre
sas.</CardDescription>
339 |
|
</CardHeader>
340 |
|
<CardContent>
341 |
|
<Table>
342 |
|
<TableHeader>
343 |
|
<TableRow>
344 |
|
<TableH
ead>Empresa</TableHead
>
345 |
|
<TableH
ead>Status</TableHead>
346 |
|
<TableHead className="
text-right">Ações</T
ableHead>
347 |
|
</TableRow>
348 |
|
</TableHeader>
349 |
|
<TableBody>
350 |
|
{companies.slice(0,
5).map((company) => (
351 |
|
<TableRow
key={company.id}>
352 |
|
<TableCell className="
font-medium">{company.
name}</TableCell>
353 |
|
<TableCell>
354 |
|
{company.verified ?
<Badge className="bg-g
reen-500">Verificada</
Badge> : <Badge varian
t="secondary">Pendente
</Badge>}
355 |
|
</TableCell>
356 |
|
<TableCell className="
text-right">
357 |
|
<Button size="sm"
variant="ghost"
onClick={() => handleA
pproveCompany(company.
id)}>
358 |
|
<CheckCircle
className="h-4 w-4" />
359 |
|
</Button>
360 |
|
</TableCell>
361 |
|
</TableRow>
362 |
|
))}
363 |
|
</TableBody>
364 |
|
</Table>
365 |
|
</CardContent>
366 |
|
</Card>
367 |
|
<Card className="col-s
pan-3">
368 |
|
<CardHeader>
369 |
|
<CardTitle>Auditoria
Recente</CardTitle>
370 |
|
<CardDescription>Ú
ltimos acessos.</CardD
escription>
371 |
|
</CardHeader>
372 |
|
<CardContent>
373 |
|
<div
className="space-y-8">
374 |
|
{audits.slice(0,
5).map((audit) => (
375 |
|
<div
key={audit.id}
className="flex
items-center">
376 |
|
<div
className="ml-4
space-y-1">
377 |
|
<p
className="text-sm
font-medium leading-no
ne">{audit.identifier}
</p>
378 |
|
<p
className="text-xs tex
t-muted-foreground">{a
uditDateFormatter.form
at(new Date(audit.crea
tedAt))}</p>
379 |
|
</div>
380 |
|
<div
className="ml-auto
font-medium text-xs te
xt-muted-foreground">{
audit.roles}</div>
381 |
|
</div>
382 |
|
))}
383 |
|
</div>
384 |
|
</CardContent>
385 |
|
</Card>
386 |
|
</div>
387 |
|
</TabsContent>
388 |
|
389 |
|
<TabsContent
value="plans"
className="space-y-4">
390 |
|
<div
className="flex
justify-end">
391 |
|
<Button onClick={()
=> { setEditingPlanId(
null); setPlanForm({
name: "",
description: "",
monthlyPrice: 0,
yearlyPrice: 0,
features: [] }); setIs
PlanDialogOpen(true)
}}>
392 |
|
<Plus className="mr-2
h-4 w-4" /> Create
Plan
393 |
|
</Button>
394 |
|
</div>
395 |
|
<Card>
396 |
|
<CardHeader>
397 |
|
<CardTitle>Plans
Management</CardTitle>
398 |
|
<
CardDescription>Config
ure subscription plans
.</CardDescription>
399 |
|
</CardHeader>
400 |
|
<CardContent>
401 |
|
<Table>
402 |
|
<TableHeader>
403 |
|
<TableRow>
404 |
|
<TableHead>
Name</TableHead>
405 |
|
<TableHead>
Monthly</TableHead>
406 |
|
<TableHead>
Yearly</TableHead>
407 |
|
<TableHead
className="text-right"
>Actions</TableHead>
408 |
|
</TableRow>
409 |
|
</TableHeader>
410 |
|
<TableBody>
411 |
|
{plans.map((plan) => (
412 |
|
<TableRow
key={plan.id}>
413 |
|
<TableCell className="
font-medium">{plan.nam
e}</TableCell>
414 |
|
<TableC
ell>${plan.monthlyPric
e}</TableCell>
415 |
|
<TableC
ell>${plan.yearlyPrice
}</TableCell>
416 |
|
<TableCell
className="text-right
space-x-2">
417 |
|
<Button size="sm"
variant="outline"
onClick={() => { setEd
itingPlanId(plan.id);
setPlanForm({ ...plan
}); setIsPlanDialogOpe
n(true)
}}>Edit</Button>
418 |
|
<Button size="sm"
variant="destructive"
onClick={() => handleD
eletePlan(plan.id)}>De
lete</Button>
419 |
|
</TableCell>
420 |
|
</TableRow>
421 |
|
))}
422 |
|
</TableBody>
423 |
|
</Table>
424 |
|
</CardContent>
425 |
|
</Card>
426 |
|
427 |
|
<Dialog o
pen={isPlanDialogOpen}
onOpenChange={setIsPl
anDialogOpen}>
428 |
|
<DialogContent>
429 |
|
<DialogHeader>
430 |
|
<DialogTitle>{editi
ngPlanId ? 'Edit
Plan' : 'Create
Plan'}</DialogTitle>
431 |
|
</DialogHeader>
432 |
|
<div className="grid
gap-4 py-4">
433 |
|
<div
className="grid
gap-2">
434 |
|
<Label>Name</Label>
435 |
|
<Input
value={planForm.name}
onChange={(e) =>
setPlanForm({
...planForm, name:
e.target.value })} />
436 |
|
</div>
437 |
|
<div
className="grid
gap-2">
438 |
|
<Label>Descript
ion</Label>
439 |
|
<Input value={p
lanForm.description}
onChange={(e) =>
setPlanForm({
...planForm,
description:
e.target.value })} />
440 |
|
</div>
441 |
|
<div
className="grid
grid-cols-2 gap-4">
442 |
|
<div
className="grid
gap-2">
443 |
|
<Label>Monthly
Price</Label>
444 |
|
<Input
type="number" value={p
lanForm.monthlyPrice}
onChange={(e) =>
setPlanForm({
...planForm,
monthlyPrice:
e.target.value })} />
445 |
|
</div>
446 |
|
<div
className="grid
gap-2">
447 |
|
<Label>Yearly
Price</Label>
448 |
|
<Input
type="number" value={p
lanForm.yearlyPrice}
onChange={(e) =>
setPlanForm({
...planForm,
yearlyPrice:
e.target.value })} />
449 |
|
</div>
450 |
|
</div>
451 |
|
<div
className="grid
gap-2">
452 |
|
<Label>Features
(comma
separated)</Label>
453 |
|
<Textarea value
={Array.isArray(planFo
rm.features) ? planFor
m.features.join(', ')
: planForm.features}
onChange={(e) =>
setPlanForm({
...planForm,
features:
e.target.value })} />
454 |
|
</div>
455 |
|
</div>
456 |
|
<DialogFooter>
457 |
|
<Button
variant="outline"
onClick={() => setIsPl
anDialogOpen(false)}>C
ancel</Button>
458 |
|
<Button onClick={ha
ndleSavePlan}>Save</Bu
tton>
459 |
|
</DialogFooter>
460 |
|
</DialogContent>
461 |
|
</Dialog>
462 |
|
</TabsContent>
463 |
|
464 |
|
<TabsContent
value="stripe"
className="space-y-4">
465 |
|
<Card>
466 |
|
<CardHeader>
467 |
|
<CardTitle>Stripe Inte
gration</CardTitle>
468 |
|
<
CardDescription>Manage
subscriptions and
payments directly in
Stripe Dashboard.</Car
dDescription>
469 |
|
</CardHeader>
470 |
|
<CardContent
className="space-y-4">
471 |
|
<div className="p-4
border rounded
bg-muted/20">
472 |
|
<p
className="text-sm">
473 |
|
For security
and advanced
management (refunds,
disputes, tax
settings), please use
the official Stripe
Dashboard.
474 |
|
</p>
475 |
|
<div
className="mt-4">
476 |
|
<a href="https:
//dashboard.stripe.com
" target="_blank"
rel="noreferrer">
477 |
|
<Button
variant="outline">
478 |
|
Open
Stripe Dashboard
<ExternalLink
className="ml-2 h-4
w-4" />
479 |
|
</Button>
480 |
|
</a>
481 |
|
</div>
482 |
|
</div>
483 |
|
</CardContent>
484 |
|
</Card>
485 |
|
</TabsContent>
486 |
|
487 |
|
<TabsContent
value="system"
className="space-y-4">
488 |
|
<Card>
489 |
|
<CardHeader>
490 |
|
<CardTitle>System &
Caching</CardTitle>
491 |
|
<
CardDescription>Mainte
nance tasks.</CardDesc
ription>
492 |
|
</CardHeader>
493 |
|
<CardContent>
494 |
|
<div className="flex
items-center
justify-between p-4
border rounded">
495 |
|
<div>
496 |
|
<p className="f
ont-medium">Cloudflare
Cache</p>
497 |
|
<p
className="text-sm tex
t-muted-foreground">Pu
rge all cached files
from the edge.</p>
498 |
|
</div>
499 |
|
<Button
variant="outline" onCl
ick={handlePurgeCache}
>Purge Cache</Button>
500 |
|
</div>
501 |
|
</CardContent>
502 |
|
</Card>
503 |
|
504 |
|
<Card>
505 |
|
<CardHeader>
506 |
|
<CardTitle>Tags
Management</CardTitle>
507 |
|
</CardHeader>
508 |
|
<CardContent>
509 |
|
{/* Reusing existing
Tags Table logic here
if desired, or keep
it in a sub-section
*/}
510 |
|
<div className="flex
flex-col md:flex-row
gap-4 mb-4">
511 |
|
<Input
placeholder="New Tag"
value={tagForm.name}
onChange={(e) =>
setTagForm({
...tagForm, name:
e.target.value })} />
512 |
|
<Select value={tagF
orm.category}
onValueChange={(val:
any) => setTagForm({
...tagForm, category:
val })}>
513 |
|
<SelectTrigger
className="w-40"><Sele
ctValue placeholder="C
ategory"
/></SelectTrigger>
514 |
|
<SelectContent>
515 |
|
<SelectItem value="are
a">Area</SelectItem>
516 |
|
<SelectItem value="lev
el">Level</SelectItem>
517 |
|
<SelectItem value="sta
ck">Stack</SelectItem>
518 |
|
</SelectContent>
519 |
|
</Select>
520 |
|
<Button onClick={ha
ndleCreateTag} disable
d={creatingTag}><Plus
className="mr-2 h-4
w-4" /> Add</Button>
521 |
|
</div>
522 |
|
<Table>
523 |
|
<TableHeader>
524 |
|
<TableRow>
525 |
|
<TableHead>
Tag</TableHead>
526 |
|
<TableHead>
Category</TableHead>
527 |
|
<TableHead>
Status</TableHead>
528 |
|
<TableHead
className="text-right"
>Action</TableHead>
529 |
|
</TableRow>
530 |
|
</TableHeader>
531 |
|
<TableBody>
532 |
|
{tags.map((tag) => (
533 |
|
<TableRow
key={tag.id}>
534 |
|
<TableC
ell>{tag.name}</TableC
ell>
535 |
|
<TableC
ell>{tag.category}</Ta
bleCell>
536 |
|
<TableC
ell>{tag.active ?
<Badge className="bg-g
reen-500">Active</Badg
e> : <Badge variant="o
utline">Inactive</Badg
e>}</TableCell>
537 |
|
<TableCell className="
text-right">
538 |
|
<Button size="sm"
variant="ghost"
onClick={() => handleT
oggleTag(tag)}>Toggle<
/Button>
539 |
|
</TableCell>
540 |
|
</TableRow>
541 |
|
))}
542 |
|
</TableBody>
543 |
|
</Table>
544 |
|
</CardContent>
545 |
|
</Card>
546 |
|
</TabsContent>
547 |
|
</Tabs>
548 |
|
<ConfirmModal
549 |
|
isOpen={!!del
etePlanId}
550 |
|
onClose={()
=>
setDeletePlanId(null)}
551 |
|
onConfirm={co
nfirmDeletePlan}
552 |
|
title="Are
you sure you want to
delete this plan?"
553 |
|
description="This
action cannot be
undone."
554 |
|
/>
555 |
|
<ConfirmModal
556 |
|
isOpen={!!del
etePlanId}
557 |
|
onClose={()
=>
setDeletePlanId(null)}
558 |
|
onConfirm={co
nfirmDeletePlan}
559 |
|
title="Are
you sure you want to
delete this plan?"
560 |
|
description="This
action cannot be
undone."
561 |
|
/>
562 |
|
</div>
563 | 
`-[35;
1m> )
564 | }
`----
x
Expression expected
,-[C:\de
v\gohorsejobs\frontend
\src\app\dashboard\bac
koffice\page.tsx:5
64:1]
561 |
/>
562 |
</div>
563 | )
564 | }
: ^
`----
Caused by:
Syntax Error
Import trace for
requested module:
./src/app/dashboard/ba
ckoffice/page.tsx
> Build failed
because of webpack
errors