diff --git a/dev-scripts/Cdevgohorsejobsfrontendsrcappdashboardsettingsimports.txt b/dev-scripts/Cdevgohorsejobsfrontendsrcappdashboardsettingsimports.txt new file mode 100644 index 0000000..8798fc6 --- /dev/null +++ b/dev-scripts/Cdevgohorsejobsfrontendsrcappdashboardsettingsimports.txt @@ -0,0 +1,60 @@ +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" +import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table" +import { Badge } from "@/components/ui/badge" +import { Input } from "@/components/ui/input" +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/components/ui/select" +import { + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, + DialogTrigger, +} from "@/components/ui/dialog" +import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" +import { Label } from "@/components/ui/label" +import { Textarea } from "@/components/ui/textarea" +import { + adminAccessApi, + adminAuditApi, + adminCompaniesApi, + adminJobsApi, + adminTagsApi, + backofficeApi, + plansApi, + type AdminCompany, + type AdminJob, + type AdminLoginAudit, + type AdminRoleAccess, + type AdminTag, +} from "@/lib/api" +import { getCurrentUser, isAdminUser } from "@/lib/auth" +import { toast } from "sonner" +import { Archive, CheckCircle, Copy, ExternalLink, PauseCircle, Plus, RefreshCw, XCircle } from "lucide-react" +import { ConfirmModal } from "@/components/confirm-modal" + +const auditDateFormatter = new Intl.DateTimeFormat("pt-BR", { + dateStyle: "short", + timeStyle: "short", + timeZone: "America/Sao_Paulo", +}) + +const jobStatusBadge: Record = { + draft: { label: "Draft", variant: "outline" }, + review: { label: "Review", variant: "secondary" }, + published: { label: "Published", variant: "default" }, + paused: { label: "Paused", variant: "outline" }, + expired: { label: "Expired", variant: "destructive" }, + archived: { label: "Archived", variant: "outline" }, + reported: { label: "Reported", variant: "destructive" }, + open: { label: "Open", variant: "default" }, + closed: { label: "Closed", variant: "outline" }, +} + diff --git a/dev-scripts/Cdevgohorsejobsfrontendsrcappdashboardsettingsmodal.txt b/dev-scripts/Cdevgohorsejobsfrontendsrcappdashboardsettingsmodal.txt new file mode 100644 index 0000000..2b8a703 --- /dev/null +++ b/dev-scripts/Cdevgohorsejobsfrontendsrcappdashboardsettingsmodal.txt @@ -0,0 +1,7 @@ + setDeletePlanId(null)} + onConfirm={confirmDeletePlan} + title="Are you sure you want to delete this plan?" + description="This action cannot be undone." + /> diff --git a/dev-scripts/Cdevgohorsejobsfrontendsrcappdashboardsettingstabs.txt b/dev-scripts/Cdevgohorsejobsfrontendsrcappdashboardsettingstabs.txt new file mode 100644 index 0000000..95fc1fa --- /dev/null +++ b/dev-scripts/Cdevgohorsejobsfrontendsrcappdashboardsettingstabs.txt @@ -0,0 +1,262 @@ + + {/* Stats Overview */} + {stats && ( +
+ + + Total Revenue + $ + + +
${stats.monthlyRevenue?.toLocaleString() || '0'}
+

{stats.revenueGrowth ? `+${stats.revenueGrowth}% from last month` : 'This month'}

+
+
+ + + Active Subscriptions + + + +
{stats.activeSubscriptions || 0}
+

{stats.subscriptionGrowth ? `+${stats.subscriptionGrowth} this week` : 'Current active'}

+
+
+ + + Companies +
+ + +
{stats.totalCompanies || 0}
+

Platform total

+
+ + + + New (Month) + + + +
+{stats.newCompaniesThisMonth || 0}
+

Since start of month

+
+
+
+ )} + +
+ + + Empresas pendentes + Aprovação e verificação de empresas. + + + + + + Empresa + Status + Ações + + + + {companies.slice(0, 5).map((company) => ( + + {company.name} + + {company.verified ? Verificada : Pendente} + + + + + + ))} + +
+
+
+ + + Auditoria Recente + Últimos acessos. + + +
+ {audits.slice(0, 5).map((audit) => ( +
+
+

{audit.identifier}

+

{auditDateFormatter.format(new Date(audit.createdAt))}

+
+
{audit.roles}
+
+ ))} +
+
+
+
+ + + +
+ +
+ + + Plans Management + Configure subscription plans. + + + + + + Name + Monthly + Yearly + Actions + + + + {plans.map((plan) => ( + + {plan.name} + ${plan.monthlyPrice} + ${plan.yearlyPrice} + + + + + + ))} + +
+
+
+ + + + + {editingPlanId ? 'Edit Plan' : 'Create Plan'} + +
+
+ + setPlanForm({ ...planForm, name: e.target.value })} /> +
+
+ + setPlanForm({ ...planForm, description: e.target.value })} /> +
+
+
+ + setPlanForm({ ...planForm, monthlyPrice: e.target.value })} /> +
+
+ + setPlanForm({ ...planForm, yearlyPrice: e.target.value })} /> +
+
+
+ +