@burdenoff/microfe-hookmovies 2026.626.2 → 2026.628.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hookmovies/HookMoviesRoot.js +70 -118
- package/dist/hookmovies/HookMoviesRoot.js.map +1 -1
- package/dist/hookmovies/HookMoviesRoutes.js +63 -183
- package/dist/hookmovies/HookMoviesRoutes.js.map +1 -1
- package/dist/hookmovies/components/MetricsCard.js.map +1 -1
- package/dist/hookmovies/components/Pagination.js +36 -0
- package/dist/hookmovies/components/Pagination.js.map +1 -0
- package/dist/hookmovies/components/StateViews.js +36 -0
- package/dist/hookmovies/components/StateViews.js.map +1 -0
- package/dist/hookmovies/components/StatusBadge.js +26 -14
- package/dist/hookmovies/components/StatusBadge.js.map +1 -1
- package/dist/hookmovies/context/HookMoviesContext.js +22 -30
- package/dist/hookmovies/context/HookMoviesContext.js.map +1 -1
- package/dist/hookmovies/hooks/index.js +1 -0
- package/dist/hookmovies/hooks/useHookMoviesApi.js +463 -169
- package/dist/hookmovies/hooks/useHookMoviesApi.js.map +1 -1
- package/dist/hookmovies/index.js +2 -2
- package/dist/hookmovies/pages/HomePage.js +206 -885
- package/dist/hookmovies/pages/HomePage.js.map +1 -1
- package/dist/hookmovies/pages/auditions/AuditionCreatePage.js +206 -0
- package/dist/hookmovies/pages/auditions/AuditionCreatePage.js.map +1 -0
- package/dist/hookmovies/pages/auditions/AuditionDetailPage.js +266 -0
- package/dist/hookmovies/pages/auditions/AuditionDetailPage.js.map +1 -0
- package/dist/hookmovies/pages/auditions/AuditionsPage.js +137 -0
- package/dist/hookmovies/pages/auditions/AuditionsPage.js.map +1 -0
- package/dist/hookmovies/pages/catalog/PeoplePage.js +175 -0
- package/dist/hookmovies/pages/catalog/PeoplePage.js.map +1 -0
- package/dist/hookmovies/pages/catalog/StudiosPage.js +173 -0
- package/dist/hookmovies/pages/catalog/StudiosPage.js.map +1 -0
- package/dist/hookmovies/pages/catalog/TitleCreatePage.js +251 -0
- package/dist/hookmovies/pages/catalog/TitleCreatePage.js.map +1 -0
- package/dist/hookmovies/pages/catalog/TitleDetailPage.js +323 -0
- package/dist/hookmovies/pages/catalog/TitleDetailPage.js.map +1 -0
- package/dist/hookmovies/pages/catalog/TitlesPage.js +158 -0
- package/dist/hookmovies/pages/catalog/TitlesPage.js.map +1 -0
- package/dist/hookmovies/pages/distribution/RightsWindowsPage.js +294 -0
- package/dist/hookmovies/pages/distribution/RightsWindowsPage.js.map +1 -0
- package/dist/hookmovies/pages/engagement/ReviewsPage.js +242 -0
- package/dist/hookmovies/pages/engagement/ReviewsPage.js.map +1 -0
- package/dist/hookmovies/pages/library/EntitlementsPage.js +90 -0
- package/dist/hookmovies/pages/library/EntitlementsPage.js.map +1 -0
- package/dist/hookmovies/pages/library/ListsPage.js +209 -0
- package/dist/hookmovies/pages/library/ListsPage.js.map +1 -0
- package/dist/hookmovies/pages/productions/ProductionCreatePage.js +204 -0
- package/dist/hookmovies/pages/productions/ProductionCreatePage.js.map +1 -0
- package/dist/hookmovies/pages/productions/ProductionDetailPage.js +234 -0
- package/dist/hookmovies/pages/productions/ProductionDetailPage.js.map +1 -0
- package/dist/hookmovies/pages/productions/ProductionsPage.js +135 -0
- package/dist/hookmovies/pages/productions/ProductionsPage.js.map +1 -0
- package/dist/hookmovies/utils/formatters.js +14 -9
- package/dist/hookmovies/utils/formatters.js.map +1 -1
- package/dist/index.js +4 -4
- package/package.json +1 -1
- package/dist/hookmovies/components/InvestmentCard.js +0 -97
- package/dist/hookmovies/components/InvestmentCard.js.map +0 -1
- package/dist/hookmovies/mocks/data.js +0 -1517
- package/dist/hookmovies/mocks/data.js.map +0 -1
- package/dist/hookmovies/mocks/users.js +0 -34
- package/dist/hookmovies/mocks/users.js.map +0 -1
- package/dist/hookmovies/pages/admin/AdminAnalyticsPage.js +0 -646
- package/dist/hookmovies/pages/admin/AdminAnalyticsPage.js.map +0 -1
- package/dist/hookmovies/pages/admin/AdminDashboard.js +0 -671
- package/dist/hookmovies/pages/admin/AdminDashboard.js.map +0 -1
- package/dist/hookmovies/pages/admin/AdminFinancialPage.js +0 -422
- package/dist/hookmovies/pages/admin/AdminFinancialPage.js.map +0 -1
- package/dist/hookmovies/pages/admin/AdminOrdersPage.js +0 -661
- package/dist/hookmovies/pages/admin/AdminOrdersPage.js.map +0 -1
- package/dist/hookmovies/pages/admin/AdminProfilePage.js +0 -262
- package/dist/hookmovies/pages/admin/AdminProfilePage.js.map +0 -1
- package/dist/hookmovies/pages/admin/AdminSettingsPage.js +0 -650
- package/dist/hookmovies/pages/admin/AdminSettingsPage.js.map +0 -1
- package/dist/hookmovies/pages/admin/CartManagementPage.js +0 -869
- package/dist/hookmovies/pages/admin/CartManagementPage.js.map +0 -1
- package/dist/hookmovies/pages/admin/UserManagementPage.js +0 -893
- package/dist/hookmovies/pages/admin/UserManagementPage.js.map +0 -1
- package/dist/hookmovies/pages/cart-owner/AnalyticsDashboard.js +0 -836
- package/dist/hookmovies/pages/cart-owner/AnalyticsDashboard.js.map +0 -1
- package/dist/hookmovies/pages/cart-owner/BusinessSettingsPage.js +0 -704
- package/dist/hookmovies/pages/cart-owner/BusinessSettingsPage.js.map +0 -1
- package/dist/hookmovies/pages/cart-owner/CartOwnerDashboard.js +0 -801
- package/dist/hookmovies/pages/cart-owner/CartOwnerDashboard.js.map +0 -1
- package/dist/hookmovies/pages/cart-owner/CartOwnerProfilePage.js +0 -888
- package/dist/hookmovies/pages/cart-owner/CartOwnerProfilePage.js.map +0 -1
- package/dist/hookmovies/pages/cart-owner/CartServiceConfigPage.js +0 -635
- package/dist/hookmovies/pages/cart-owner/CartServiceConfigPage.js.map +0 -1
- package/dist/hookmovies/pages/cart-owner/InventoryManagementPage.js +0 -912
- package/dist/hookmovies/pages/cart-owner/InventoryManagementPage.js.map +0 -1
- package/dist/hookmovies/pages/cart-owner/OrderManagementPage.js +0 -913
- package/dist/hookmovies/pages/cart-owner/OrderManagementPage.js.map +0 -1
- package/dist/hookmovies/pages/cart-owner/StaffManagementPage.js +0 -832
- package/dist/hookmovies/pages/cart-owner/StaffManagementPage.js.map +0 -1
- package/dist/hookmovies/pages/common/HelpSupportPage.js +0 -1321
- package/dist/hookmovies/pages/common/HelpSupportPage.js.map +0 -1
- package/dist/hookmovies/pages/common/NotificationCenterPage.js +0 -666
- package/dist/hookmovies/pages/common/NotificationCenterPage.js.map +0 -1
- package/dist/hookmovies/pages/common/SettingsPage.js +0 -965
- package/dist/hookmovies/pages/common/SettingsPage.js.map +0 -1
- package/dist/hookmovies/pages/customer/BookingDetailsPage.js +0 -622
- package/dist/hookmovies/pages/customer/BookingDetailsPage.js.map +0 -1
- package/dist/hookmovies/pages/customer/CartDetailPage.js +0 -653
- package/dist/hookmovies/pages/customer/CartDetailPage.js.map +0 -1
- package/dist/hookmovies/pages/customer/CartDiscoveryPage.js +0 -557
- package/dist/hookmovies/pages/customer/CartDiscoveryPage.js.map +0 -1
- package/dist/hookmovies/pages/customer/CheckoutPage.js +0 -526
- package/dist/hookmovies/pages/customer/CheckoutPage.js.map +0 -1
- package/dist/hookmovies/pages/customer/CustomerDashboard.js +0 -537
- package/dist/hookmovies/pages/customer/CustomerDashboard.js.map +0 -1
- package/dist/hookmovies/pages/customer/CustomerProfilePage.js +0 -623
- package/dist/hookmovies/pages/customer/CustomerProfilePage.js.map +0 -1
- package/dist/hookmovies/pages/customer/DirectServiceBookingPage.js +0 -627
- package/dist/hookmovies/pages/customer/DirectServiceBookingPage.js.map +0 -1
- package/dist/hookmovies/pages/customer/FavoritesPage.js +0 -479
- package/dist/hookmovies/pages/customer/FavoritesPage.js.map +0 -1
- package/dist/hookmovies/pages/customer/OrderHistoryPage.js +0 -442
- package/dist/hookmovies/pages/customer/OrderHistoryPage.js.map +0 -1
- package/dist/hookmovies/pages/customer/OrderTrackingPage.js +0 -390
- package/dist/hookmovies/pages/customer/OrderTrackingPage.js.map +0 -1
- package/dist/hookmovies/pages/customer/PaymentMethodsPage.js +0 -490
- package/dist/hookmovies/pages/customer/PaymentMethodsPage.js.map +0 -1
- package/dist/hookmovies/pages/customer/ReviewsPage.js +0 -607
- package/dist/hookmovies/pages/customer/ReviewsPage.js.map +0 -1
- package/dist/hookmovies/pages/customer/SavedAddressesPage.js +0 -450
- package/dist/hookmovies/pages/customer/SavedAddressesPage.js.map +0 -1
- package/dist/hookmovies/pages/investor/InvestmentDetailsPage.js +0 -880
- package/dist/hookmovies/pages/investor/InvestmentDetailsPage.js.map +0 -1
- package/dist/hookmovies/pages/investor/InvestmentOpportunitiesPage.js +0 -940
- package/dist/hookmovies/pages/investor/InvestmentOpportunitiesPage.js.map +0 -1
- package/dist/hookmovies/pages/investor/InvestorAnalyticsPage.js +0 -683
- package/dist/hookmovies/pages/investor/InvestorAnalyticsPage.js.map +0 -1
- package/dist/hookmovies/pages/investor/InvestorDashboard.js +0 -457
- package/dist/hookmovies/pages/investor/InvestorDashboard.js.map +0 -1
- package/dist/hookmovies/pages/investor/InvestorInvestmentsPage.js +0 -401
- package/dist/hookmovies/pages/investor/InvestorInvestmentsPage.js.map +0 -1
- package/dist/hookmovies/pages/investor/InvestorPortfolioPage.js +0 -571
- package/dist/hookmovies/pages/investor/InvestorPortfolioPage.js.map +0 -1
- package/dist/hookmovies/pages/investor/InvestorProfilePage.js +0 -1067
- package/dist/hookmovies/pages/investor/InvestorProfilePage.js.map +0 -1
- package/dist/hookmovies/pages/worker/TaskDetailsPage.js +0 -528
- package/dist/hookmovies/pages/worker/TaskDetailsPage.js.map +0 -1
- package/dist/hookmovies/pages/worker/WorkerDashboard.js +0 -670
- package/dist/hookmovies/pages/worker/WorkerDashboard.js.map +0 -1
- package/dist/hookmovies/pages/worker/WorkerOrdersPage.js +0 -676
- package/dist/hookmovies/pages/worker/WorkerOrdersPage.js.map +0 -1
- package/dist/hookmovies/pages/worker/WorkerProfilePage.js +0 -689
- package/dist/hookmovies/pages/worker/WorkerProfilePage.js.map +0 -1
- package/dist/hookmovies/pages/worker/WorkerSchedulePage.js +0 -579
- package/dist/hookmovies/pages/worker/WorkerSchedulePage.js.map +0 -1
- package/dist/hookmovies/store/hookmoviesStore.js +0 -38
- package/dist/hookmovies/store/hookmoviesStore.js.map +0 -1
- package/dist/hookmovies/store/index.js +0 -1
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { useHookMovies as e } from "../../context/HookMoviesContext.js";
|
|
2
|
+
import { PageLayout as t } from "../../components/PageLayout.js";
|
|
3
|
+
import { StatusBadge as n } from "../../components/StatusBadge.js";
|
|
4
|
+
import { useApplyToAudition as r, useAuditionApplications as i, useAuditionById as a, useCloseAudition as o, useScoreApplication as s } from "../../hooks/useHookMoviesApi.js";
|
|
5
|
+
import { formatDate as c, formatMinorUnits as l, formatRelativeTime as u } from "../../utils/formatters.js";
|
|
6
|
+
import { ErrorState as d, LoadingState as f } from "../../components/StateViews.js";
|
|
7
|
+
import { useState as p } from "react";
|
|
8
|
+
import { ArrowLeft as m, Clock as h, Coins as g, Languages as _, Lock as v, MapPin as y, Send as b, Users as x } from "lucide-react";
|
|
9
|
+
import { useParams as S } from "react-router-dom";
|
|
10
|
+
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
11
|
+
import { GlassCard as T } from "@burdenoff/fe-libs/ui";
|
|
12
|
+
//#region src/hookmovies/pages/auditions/AuditionDetailPage.tsx
|
|
13
|
+
var E = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", D = () => {
|
|
14
|
+
let { id: D } = S(), { navigateTo: O } = e(), { data: k, isLoading: A, isError: j, refetch: M } = a(D), N = i(D), P = r(), F = s(), I = o(), [L, R] = p(""), [z, B] = p(""), [V, H] = p(null), [U, W] = p(!1), [G, K] = p(null);
|
|
15
|
+
if (A) return /* @__PURE__ */ C(t, {
|
|
16
|
+
title: "Audition",
|
|
17
|
+
children: /* @__PURE__ */ C(f, { label: "Loading audition…" })
|
|
18
|
+
});
|
|
19
|
+
if (j || !k) return /* @__PURE__ */ C(t, {
|
|
20
|
+
title: "Audition",
|
|
21
|
+
children: /* @__PURE__ */ C(d, {
|
|
22
|
+
title: "Audition not found",
|
|
23
|
+
onRetry: () => void M()
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
let q = async (e) => {
|
|
27
|
+
e.preventDefault(), H(null);
|
|
28
|
+
try {
|
|
29
|
+
await P.mutateAsync({
|
|
30
|
+
auditionId: k.id,
|
|
31
|
+
coverNote: L.trim() || void 0,
|
|
32
|
+
selfTapeFileId: z.trim() || void 0
|
|
33
|
+
}), W(!0), R(""), B("");
|
|
34
|
+
} catch (e) {
|
|
35
|
+
H(e instanceof Error ? e.message : "Failed to apply");
|
|
36
|
+
}
|
|
37
|
+
}, J = async (e, t) => {
|
|
38
|
+
K(null);
|
|
39
|
+
try {
|
|
40
|
+
await F.mutateAsync({
|
|
41
|
+
id: e,
|
|
42
|
+
score: t
|
|
43
|
+
});
|
|
44
|
+
} catch (e) {
|
|
45
|
+
K(e instanceof Error ? e.message : "Failed to score");
|
|
46
|
+
}
|
|
47
|
+
}, Y = k.status === "OPEN", X = N.data ?? [];
|
|
48
|
+
return /* @__PURE__ */ C(t, {
|
|
49
|
+
title: /* @__PURE__ */ w("span", {
|
|
50
|
+
className: "flex items-center gap-3",
|
|
51
|
+
children: [/* @__PURE__ */ C("button", {
|
|
52
|
+
type: "button",
|
|
53
|
+
onClick: () => O("auditions"),
|
|
54
|
+
className: "rounded-md p-1 text-text-secondary hover:text-text-primary",
|
|
55
|
+
"aria-label": "Back to auditions",
|
|
56
|
+
children: /* @__PURE__ */ C(m, { className: "h-5 w-5" })
|
|
57
|
+
}), k.roleName]
|
|
58
|
+
}),
|
|
59
|
+
description: k.production?.title ?? "Casting call",
|
|
60
|
+
actions: /* @__PURE__ */ w("div", {
|
|
61
|
+
className: "flex items-center gap-2",
|
|
62
|
+
children: [/* @__PURE__ */ C(n, { status: k.status }), Y && /* @__PURE__ */ w("button", {
|
|
63
|
+
type: "button",
|
|
64
|
+
disabled: I.isPending,
|
|
65
|
+
onClick: () => void I.mutateAsync(k.id),
|
|
66
|
+
className: "inline-flex items-center gap-1 rounded-lg border border-border-seam px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-50 transition-colors",
|
|
67
|
+
children: [/* @__PURE__ */ C(v, { className: "h-3.5 w-3.5" }), "Close"]
|
|
68
|
+
})]
|
|
69
|
+
}),
|
|
70
|
+
children: /* @__PURE__ */ w("div", {
|
|
71
|
+
className: "grid grid-cols-1 gap-6 lg:grid-cols-3",
|
|
72
|
+
children: [/* @__PURE__ */ w("div", {
|
|
73
|
+
className: "space-y-6 lg:col-span-2",
|
|
74
|
+
children: [k.description && /* @__PURE__ */ w(T, {
|
|
75
|
+
treatment: "metric",
|
|
76
|
+
className: "border-border-seam p-5",
|
|
77
|
+
children: [/* @__PURE__ */ C("h2", {
|
|
78
|
+
className: "mb-2 text-sm font-semibold text-text-primary",
|
|
79
|
+
children: "Role Description"
|
|
80
|
+
}), /* @__PURE__ */ C("p", {
|
|
81
|
+
className: "text-sm leading-relaxed text-text-secondary",
|
|
82
|
+
children: k.description
|
|
83
|
+
})]
|
|
84
|
+
}), /* @__PURE__ */ w(T, {
|
|
85
|
+
treatment: "metric",
|
|
86
|
+
className: "border-border-seam p-5",
|
|
87
|
+
children: [
|
|
88
|
+
/* @__PURE__ */ w("h2", {
|
|
89
|
+
className: "mb-3 flex items-center gap-2 text-sm font-semibold text-text-primary",
|
|
90
|
+
children: [
|
|
91
|
+
/* @__PURE__ */ C(x, { className: "h-4 w-4" }),
|
|
92
|
+
"Applicants (",
|
|
93
|
+
X.length,
|
|
94
|
+
")"
|
|
95
|
+
]
|
|
96
|
+
}),
|
|
97
|
+
G && /* @__PURE__ */ C("div", {
|
|
98
|
+
className: "mb-3 rounded-lg border border-status-error-border bg-status-error-bg-subtle px-3 py-2 text-xs text-status-error-text",
|
|
99
|
+
children: G
|
|
100
|
+
}),
|
|
101
|
+
N.isLoading ? /* @__PURE__ */ C(f, {
|
|
102
|
+
label: "Loading applicants…",
|
|
103
|
+
className: "min-h-[120px]"
|
|
104
|
+
}) : X.length === 0 ? /* @__PURE__ */ C("p", {
|
|
105
|
+
className: "text-sm text-text-secondary",
|
|
106
|
+
children: "No applications yet."
|
|
107
|
+
}) : /* @__PURE__ */ C("ul", {
|
|
108
|
+
className: "space-y-3",
|
|
109
|
+
children: X.map((e) => /* @__PURE__ */ w("li", {
|
|
110
|
+
className: "rounded-lg border border-border-seam bg-bg-surface p-3",
|
|
111
|
+
children: [
|
|
112
|
+
/* @__PURE__ */ w("div", {
|
|
113
|
+
className: "flex items-center justify-between gap-2",
|
|
114
|
+
children: [/* @__PURE__ */ w("div", {
|
|
115
|
+
className: "min-w-0",
|
|
116
|
+
children: [/* @__PURE__ */ w("p", {
|
|
117
|
+
className: "truncate text-sm font-medium text-text-primary",
|
|
118
|
+
children: ["Applicant ", e.applicantId.slice(0, 8)]
|
|
119
|
+
}), /* @__PURE__ */ w("p", {
|
|
120
|
+
className: "text-xs text-text-secondary",
|
|
121
|
+
children: ["Applied ", u(e.createdAt)]
|
|
122
|
+
})]
|
|
123
|
+
}), /* @__PURE__ */ C(n, { status: e.status })]
|
|
124
|
+
}),
|
|
125
|
+
e.coverNote && /* @__PURE__ */ C("p", {
|
|
126
|
+
className: "mt-2 text-sm text-text-secondary",
|
|
127
|
+
children: e.coverNote
|
|
128
|
+
}),
|
|
129
|
+
/* @__PURE__ */ w("div", {
|
|
130
|
+
className: "mt-3 flex items-center gap-2",
|
|
131
|
+
children: [/* @__PURE__ */ C("span", {
|
|
132
|
+
className: "text-xs text-text-secondary",
|
|
133
|
+
children: "Score:"
|
|
134
|
+
}), [
|
|
135
|
+
1,
|
|
136
|
+
2,
|
|
137
|
+
3,
|
|
138
|
+
4,
|
|
139
|
+
5
|
|
140
|
+
].map((t) => /* @__PURE__ */ C("button", {
|
|
141
|
+
type: "button",
|
|
142
|
+
disabled: F.isPending,
|
|
143
|
+
onClick: () => void J(e.id, t),
|
|
144
|
+
className: e.score === t ? "h-7 w-7 rounded-md bg-action-primary-bg text-xs font-semibold text-action-primary-text" : "h-7 w-7 rounded-md border border-border-seam text-xs text-text-primary hover:bg-bg-sunken transition-colors",
|
|
145
|
+
children: t
|
|
146
|
+
}, t))]
|
|
147
|
+
})
|
|
148
|
+
]
|
|
149
|
+
}, e.id))
|
|
150
|
+
})
|
|
151
|
+
]
|
|
152
|
+
})]
|
|
153
|
+
}), /* @__PURE__ */ w("div", {
|
|
154
|
+
className: "space-y-6",
|
|
155
|
+
children: [/* @__PURE__ */ w(T, {
|
|
156
|
+
treatment: "metric",
|
|
157
|
+
className: "border-border-seam p-5",
|
|
158
|
+
children: [
|
|
159
|
+
/* @__PURE__ */ C("h2", {
|
|
160
|
+
className: "mb-3 text-sm font-semibold text-text-primary",
|
|
161
|
+
children: "Details"
|
|
162
|
+
}),
|
|
163
|
+
/* @__PURE__ */ w("dl", {
|
|
164
|
+
className: "space-y-2 text-sm",
|
|
165
|
+
children: [
|
|
166
|
+
/* @__PURE__ */ w("div", {
|
|
167
|
+
className: "flex items-center justify-between",
|
|
168
|
+
children: [/* @__PURE__ */ w("dt", {
|
|
169
|
+
className: "flex items-center gap-2 text-text-secondary",
|
|
170
|
+
children: [/* @__PURE__ */ C(g, { className: "h-3.5 w-3.5" }), "Pay"]
|
|
171
|
+
}), /* @__PURE__ */ C("dd", {
|
|
172
|
+
className: "font-medium text-text-primary",
|
|
173
|
+
children: l(k.payMinorUnits, k.currency)
|
|
174
|
+
})]
|
|
175
|
+
}),
|
|
176
|
+
k.location && /* @__PURE__ */ w("div", {
|
|
177
|
+
className: "flex items-center justify-between",
|
|
178
|
+
children: [/* @__PURE__ */ w("dt", {
|
|
179
|
+
className: "flex items-center gap-2 text-text-secondary",
|
|
180
|
+
children: [/* @__PURE__ */ C(y, { className: "h-3.5 w-3.5" }), "Location"]
|
|
181
|
+
}), /* @__PURE__ */ C("dd", {
|
|
182
|
+
className: "font-medium text-text-primary",
|
|
183
|
+
children: k.location
|
|
184
|
+
})]
|
|
185
|
+
}),
|
|
186
|
+
k.language && /* @__PURE__ */ w("div", {
|
|
187
|
+
className: "flex items-center justify-between",
|
|
188
|
+
children: [/* @__PURE__ */ w("dt", {
|
|
189
|
+
className: "flex items-center gap-2 text-text-secondary",
|
|
190
|
+
children: [/* @__PURE__ */ C(_, { className: "h-3.5 w-3.5" }), "Language"]
|
|
191
|
+
}), /* @__PURE__ */ C("dd", {
|
|
192
|
+
className: "font-medium text-text-primary",
|
|
193
|
+
children: k.language
|
|
194
|
+
})]
|
|
195
|
+
}),
|
|
196
|
+
k.submissionDeadline && /* @__PURE__ */ w("div", {
|
|
197
|
+
className: "flex items-center justify-between",
|
|
198
|
+
children: [/* @__PURE__ */ w("dt", {
|
|
199
|
+
className: "flex items-center gap-2 text-text-secondary",
|
|
200
|
+
children: [/* @__PURE__ */ C(h, { className: "h-3.5 w-3.5" }), "Deadline"]
|
|
201
|
+
}), /* @__PURE__ */ C("dd", {
|
|
202
|
+
className: "font-medium text-text-primary",
|
|
203
|
+
children: c(k.submissionDeadline, {
|
|
204
|
+
hour: void 0,
|
|
205
|
+
minute: void 0
|
|
206
|
+
})
|
|
207
|
+
})]
|
|
208
|
+
})
|
|
209
|
+
]
|
|
210
|
+
}),
|
|
211
|
+
k.isMinorRole && /* @__PURE__ */ C("p", {
|
|
212
|
+
className: "mt-3 rounded-lg bg-status-warning-bg-subtle px-3 py-2 text-xs text-status-warning-text",
|
|
213
|
+
children: "This is a minor role. Guardian consent and restricted communications apply."
|
|
214
|
+
})
|
|
215
|
+
]
|
|
216
|
+
}), /* @__PURE__ */ w(T, {
|
|
217
|
+
treatment: "glass",
|
|
218
|
+
className: "border-border-seam p-5",
|
|
219
|
+
children: [/* @__PURE__ */ C("h2", {
|
|
220
|
+
className: "mb-3 text-sm font-semibold text-text-primary",
|
|
221
|
+
children: "Apply"
|
|
222
|
+
}), U ? /* @__PURE__ */ C("p", {
|
|
223
|
+
className: "rounded-lg bg-status-success-bg-subtle px-3 py-2 text-sm text-status-success-text",
|
|
224
|
+
children: "Your application has been submitted."
|
|
225
|
+
}) : Y ? /* @__PURE__ */ w("form", {
|
|
226
|
+
onSubmit: q,
|
|
227
|
+
className: "space-y-3",
|
|
228
|
+
children: [
|
|
229
|
+
V && /* @__PURE__ */ C("div", {
|
|
230
|
+
className: "rounded-lg border border-status-error-border bg-status-error-bg-subtle px-3 py-2 text-xs text-status-error-text",
|
|
231
|
+
children: V
|
|
232
|
+
}),
|
|
233
|
+
/* @__PURE__ */ C("textarea", {
|
|
234
|
+
value: L,
|
|
235
|
+
onChange: (e) => R(e.target.value),
|
|
236
|
+
rows: 3,
|
|
237
|
+
placeholder: "Cover note (why you're right for this role)",
|
|
238
|
+
className: E
|
|
239
|
+
}),
|
|
240
|
+
/* @__PURE__ */ C("input", {
|
|
241
|
+
type: "text",
|
|
242
|
+
value: z,
|
|
243
|
+
onChange: (e) => B(e.target.value),
|
|
244
|
+
placeholder: "Self-tape file ID (optional)",
|
|
245
|
+
className: E
|
|
246
|
+
}),
|
|
247
|
+
/* @__PURE__ */ w("button", {
|
|
248
|
+
type: "submit",
|
|
249
|
+
disabled: P.isPending,
|
|
250
|
+
className: "inline-flex w-full items-center justify-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50 transition-opacity",
|
|
251
|
+
children: [/* @__PURE__ */ C(b, { className: "h-4 w-4" }), P.isPending ? "Submitting…" : "Submit Application"]
|
|
252
|
+
})
|
|
253
|
+
]
|
|
254
|
+
}) : /* @__PURE__ */ C("p", {
|
|
255
|
+
className: "text-sm text-text-secondary",
|
|
256
|
+
children: "This audition is no longer open."
|
|
257
|
+
})]
|
|
258
|
+
})]
|
|
259
|
+
})]
|
|
260
|
+
})
|
|
261
|
+
});
|
|
262
|
+
};
|
|
263
|
+
//#endregion
|
|
264
|
+
export { D as AuditionDetailPage };
|
|
265
|
+
|
|
266
|
+
//# sourceMappingURL=AuditionDetailPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuditionDetailPage.js","names":[],"sources":["../../../../src/hookmovies/pages/auditions/AuditionDetailPage.tsx"],"sourcesContent":["/**\n * Audition detail (Casting marketplace)\n * @module hookmovies/pages/auditions\n *\n * Two-sided surface:\n * - Talent can apply via `hokApplyToAudition` (self-scoped).\n * - Casting teams screen applicants from `hokListApplications`, score them via\n * `hokScoreApplication`, and close the call with `hokCloseAudition`.\n */\n\nimport { type FC, type FormEvent, useState } from 'react';\nimport { useParams } from 'react-router-dom';\nimport {\n ArrowLeft,\n MapPin,\n Languages,\n Clock,\n Coins,\n Send,\n Lock,\n Users,\n} from 'lucide-react';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../../components/PageLayout';\nimport { StatusBadge } from '../../components/StatusBadge';\nimport { LoadingState, ErrorState } from '../../components/StateViews';\nimport { useHookMovies } from '../../context/HookMoviesContext';\nimport {\n useAuditionById,\n useAuditionApplications,\n useApplyToAudition,\n useScoreApplication,\n useCloseAudition,\n} from '../../hooks/useHookMoviesApi';\nimport { formatDate, formatMinorUnits, formatRelativeTime } from '../../utils/formatters';\n\nconst fieldClass =\n 'w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]';\n\nexport const AuditionDetailPage: FC = () => {\n const { id } = useParams<{ id: string }>();\n const { navigateTo } = useHookMovies();\n const { data: audition, isLoading, isError, refetch } = useAuditionById(id);\n const applications = useAuditionApplications(id);\n const apply = useApplyToAudition();\n const score = useScoreApplication();\n const closeAudition = useCloseAudition();\n\n const [coverNote, setCoverNote] = useState('');\n const [selfTapeFileId, setSelfTapeFileId] = useState('');\n const [applyError, setApplyError] = useState<string | null>(null);\n const [applied, setApplied] = useState(false);\n const [scoreError, setScoreError] = useState<string | null>(null);\n\n if (isLoading) {\n return (\n <PageLayout title=\"Audition\">\n <LoadingState label=\"Loading audition…\" />\n </PageLayout>\n );\n }\n\n if (isError || !audition) {\n return (\n <PageLayout title=\"Audition\">\n <ErrorState title=\"Audition not found\" onRetry={() => void refetch()} />\n </PageLayout>\n );\n }\n\n const handleApply = async (e: FormEvent) => {\n e.preventDefault();\n setApplyError(null);\n try {\n await apply.mutateAsync({\n auditionId: audition.id,\n coverNote: coverNote.trim() || undefined,\n selfTapeFileId: selfTapeFileId.trim() || undefined,\n });\n setApplied(true);\n setCoverNote('');\n setSelfTapeFileId('');\n } catch (err) {\n setApplyError(err instanceof Error ? err.message : 'Failed to apply');\n }\n };\n\n const handleScore = async (applicationId: string, value: number) => {\n setScoreError(null);\n try {\n await score.mutateAsync({ id: applicationId, score: value });\n } catch (err) {\n setScoreError(err instanceof Error ? err.message : 'Failed to score');\n }\n };\n\n const isOpen = audition.status === 'OPEN';\n const applicationItems = applications.data ?? [];\n\n return (\n <PageLayout\n title={\n <span className=\"flex items-center gap-3\">\n <button\n type=\"button\"\n onClick={() => navigateTo('auditions')}\n className=\"rounded-md p-1 text-text-secondary hover:text-text-primary\"\n aria-label=\"Back to auditions\"\n >\n <ArrowLeft className=\"h-5 w-5\" />\n </button>\n {audition.roleName}\n </span>\n }\n description={audition.production?.title ?? 'Casting call'}\n actions={\n <div className=\"flex items-center gap-2\">\n <StatusBadge status={audition.status} />\n {isOpen && (\n <button\n type=\"button\"\n disabled={closeAudition.isPending}\n onClick={() => void closeAudition.mutateAsync(audition.id)}\n className=\"inline-flex items-center gap-1 rounded-lg border border-border-seam px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-50 transition-colors\"\n >\n <Lock className=\"h-3.5 w-3.5\" />\n Close\n </button>\n )}\n </div>\n }\n >\n <div className=\"grid grid-cols-1 gap-6 lg:grid-cols-3\">\n <div className=\"space-y-6 lg:col-span-2\">\n {audition.description && (\n <GlassCard treatment=\"metric\" className=\"border-border-seam p-5\">\n <h2 className=\"mb-2 text-sm font-semibold text-text-primary\">Role Description</h2>\n <p className=\"text-sm leading-relaxed text-text-secondary\">{audition.description}</p>\n </GlassCard>\n )}\n\n {/* Applicants (casting view) */}\n <GlassCard treatment=\"metric\" className=\"border-border-seam p-5\">\n <h2 className=\"mb-3 flex items-center gap-2 text-sm font-semibold text-text-primary\">\n <Users className=\"h-4 w-4\" />\n Applicants ({applicationItems.length})\n </h2>\n {scoreError && (\n <div className=\"mb-3 rounded-lg border border-status-error-border bg-status-error-bg-subtle px-3 py-2 text-xs text-status-error-text\">\n {scoreError}\n </div>\n )}\n {applications.isLoading ? (\n <LoadingState label=\"Loading applicants…\" className=\"min-h-[120px]\" />\n ) : applicationItems.length === 0 ? (\n <p className=\"text-sm text-text-secondary\">No applications yet.</p>\n ) : (\n <ul className=\"space-y-3\">\n {applicationItems.map((appn) => (\n <li\n key={appn.id}\n className=\"rounded-lg border border-border-seam bg-bg-surface p-3\"\n >\n <div className=\"flex items-center justify-between gap-2\">\n <div className=\"min-w-0\">\n <p className=\"truncate text-sm font-medium text-text-primary\">\n Applicant {appn.applicantId.slice(0, 8)}\n </p>\n <p className=\"text-xs text-text-secondary\">\n Applied {formatRelativeTime(appn.createdAt)}\n </p>\n </div>\n <StatusBadge status={appn.status} />\n </div>\n {appn.coverNote && (\n <p className=\"mt-2 text-sm text-text-secondary\">{appn.coverNote}</p>\n )}\n <div className=\"mt-3 flex items-center gap-2\">\n <span className=\"text-xs text-text-secondary\">Score:</span>\n {[1, 2, 3, 4, 5].map((value) => (\n <button\n key={value}\n type=\"button\"\n disabled={score.isPending}\n onClick={() => void handleScore(appn.id, value)}\n className={\n appn.score === value\n ? 'h-7 w-7 rounded-md bg-action-primary-bg text-xs font-semibold text-action-primary-text'\n : 'h-7 w-7 rounded-md border border-border-seam text-xs text-text-primary hover:bg-bg-sunken transition-colors'\n }\n >\n {value}\n </button>\n ))}\n </div>\n </li>\n ))}\n </ul>\n )}\n </GlassCard>\n </div>\n\n <div className=\"space-y-6\">\n {/* Details */}\n <GlassCard treatment=\"metric\" className=\"border-border-seam p-5\">\n <h2 className=\"mb-3 text-sm font-semibold text-text-primary\">Details</h2>\n <dl className=\"space-y-2 text-sm\">\n <div className=\"flex items-center justify-between\">\n <dt className=\"flex items-center gap-2 text-text-secondary\">\n <Coins className=\"h-3.5 w-3.5\" />\n Pay\n </dt>\n <dd className=\"font-medium text-text-primary\">\n {formatMinorUnits(audition.payMinorUnits, audition.currency)}\n </dd>\n </div>\n {audition.location && (\n <div className=\"flex items-center justify-between\">\n <dt className=\"flex items-center gap-2 text-text-secondary\">\n <MapPin className=\"h-3.5 w-3.5\" />\n Location\n </dt>\n <dd className=\"font-medium text-text-primary\">{audition.location}</dd>\n </div>\n )}\n {audition.language && (\n <div className=\"flex items-center justify-between\">\n <dt className=\"flex items-center gap-2 text-text-secondary\">\n <Languages className=\"h-3.5 w-3.5\" />\n Language\n </dt>\n <dd className=\"font-medium text-text-primary\">{audition.language}</dd>\n </div>\n )}\n {audition.submissionDeadline && (\n <div className=\"flex items-center justify-between\">\n <dt className=\"flex items-center gap-2 text-text-secondary\">\n <Clock className=\"h-3.5 w-3.5\" />\n Deadline\n </dt>\n <dd className=\"font-medium text-text-primary\">\n {formatDate(audition.submissionDeadline, { hour: undefined, minute: undefined })}\n </dd>\n </div>\n )}\n </dl>\n {audition.isMinorRole && (\n <p className=\"mt-3 rounded-lg bg-status-warning-bg-subtle px-3 py-2 text-xs text-status-warning-text\">\n This is a minor role. Guardian consent and restricted communications apply.\n </p>\n )}\n </GlassCard>\n\n {/* Apply (talent view) */}\n <GlassCard treatment=\"glass\" className=\"border-border-seam p-5\">\n <h2 className=\"mb-3 text-sm font-semibold text-text-primary\">Apply</h2>\n {applied ? (\n <p className=\"rounded-lg bg-status-success-bg-subtle px-3 py-2 text-sm text-status-success-text\">\n Your application has been submitted.\n </p>\n ) : !isOpen ? (\n <p className=\"text-sm text-text-secondary\">This audition is no longer open.</p>\n ) : (\n <form onSubmit={handleApply} className=\"space-y-3\">\n {applyError && (\n <div className=\"rounded-lg border border-status-error-border bg-status-error-bg-subtle px-3 py-2 text-xs text-status-error-text\">\n {applyError}\n </div>\n )}\n <textarea\n value={coverNote}\n onChange={(e) => setCoverNote(e.target.value)}\n rows={3}\n placeholder=\"Cover note (why you're right for this role)\"\n className={fieldClass}\n />\n <input\n type=\"text\"\n value={selfTapeFileId}\n onChange={(e) => setSelfTapeFileId(e.target.value)}\n placeholder=\"Self-tape file ID (optional)\"\n className={fieldClass}\n />\n <button\n type=\"submit\"\n disabled={apply.isPending}\n className=\"inline-flex w-full items-center justify-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50 transition-opacity\"\n >\n <Send className=\"h-4 w-4\" />\n {apply.isPending ? 'Submitting…' : 'Submit Application'}\n </button>\n </form>\n )}\n </GlassCard>\n </div>\n </div>\n </PageLayout>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAoCA,IAAM,IACJ,wMAEW,UAA+B;CAC1C,IAAM,EAAE,UAAO,GAA2B,EACpC,EAAE,kBAAe,GAAe,EAChC,EAAE,MAAM,GAAU,cAAW,YAAS,eAAY,EAAgB,EAAG,EACrE,IAAe,EAAwB,EAAG,EAC1C,IAAQ,GAAoB,EAC5B,IAAQ,GAAqB,EAC7B,IAAgB,GAAkB,EAElC,CAAC,GAAW,KAAgB,EAAS,GAAG,EACxC,CAAC,GAAgB,KAAqB,EAAS,GAAG,EAClD,CAAC,GAAY,KAAiB,EAAwB,KAAK,EAC3D,CAAC,GAAS,KAAc,EAAS,GAAM,EACvC,CAAC,GAAY,KAAiB,EAAwB,KAAK;AAEjE,KAAI,EACF,QACE,kBAAC,GAAD;EAAY,OAAM;YAChB,kBAAC,GAAD,EAAc,OAAM,qBAAsB,CAAA;EAC/B,CAAA;AAIjB,KAAI,KAAW,CAAC,EACd,QACE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;;QAEL;;MACJ,EAAS,eACR,kBAAC,KAAD;OAAG,WAAU;iBAAyF;OAElG,CAAA;MAEI;QAGZ,kBAAC,GAAD;KAAW,WAAU;KAAQ,WAAU;eAAvC,CACE,kBAAC,MAAD;MAAI,WAAU;gBAA+C;MAAU,CAAA,EACtE,IACC,kBAAC,KAAD;MAAG,WAAU;gBAAoF;MAE7F,CAAA,GACD,IAGH,kBAAC,QAAD;MAAM,UAAU;MAAa,WAAU;gBAAvC;OACG,KACC,kBAAC,OAAD;QAAK,WAAU;kBACZ;QACG,CAAA;OAER,kBAAC,YAAD;QACE,OAAO;QACP,WAAW,MAAM,EAAa,EAAE,OAAO,MAAM;QAC7C,MAAM;QACN,aAAY;QACZ,WAAW;QACX,CAAA;OACF,kBAAC,SAAD;QACE,MAAK;QACL,OAAO;QACP,WAAW,MAAM,EAAkB,EAAE,OAAO,MAAM;QAClD,aAAY;QACZ,WAAW;QACX,CAAA;OACF,kBAAC,UAAD;QACE,MAAK;QACL,UAAU,EAAM;QAChB,WAAU;kBAHZ,CAKE,kBAAC,GAAD,EAAM,WAAU,WAAY,CAAA,EAC3B,EAAM,YAAY,gBAAgB,qBAC5B;;OACJ;UA9BP,kBAAC,KAAD;MAAG,WAAU;gBAA8B;MAAoC,CAAA,CAgCvE;OACR;MACF;;EACK,CAAA"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { useHookMovies as e } from "../../context/HookMoviesContext.js";
|
|
2
|
+
import { PageLayout as t } from "../../components/PageLayout.js";
|
|
3
|
+
import { StatusBadge as n } from "../../components/StatusBadge.js";
|
|
4
|
+
import { useAuditions as r } from "../../hooks/useHookMoviesApi.js";
|
|
5
|
+
import { formatDate as i, formatEnumLabel as a, formatMinorUnits as o } from "../../utils/formatters.js";
|
|
6
|
+
import { ErrorState as s, LoadingState as c } from "../../components/StateViews.js";
|
|
7
|
+
import { EmptyState as l } from "../../components/EmptyState.js";
|
|
8
|
+
import { Pagination as u } from "../../components/Pagination.js";
|
|
9
|
+
import { useState as d } from "react";
|
|
10
|
+
import { Clock as f, Languages as p, MapPin as m, Megaphone as h, Plus as g } from "lucide-react";
|
|
11
|
+
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
12
|
+
import { GlassCard as y } from "@burdenoff/fe-libs/ui";
|
|
13
|
+
//#region src/hookmovies/pages/auditions/AuditionsPage.tsx
|
|
14
|
+
var b = [
|
|
15
|
+
"OPEN",
|
|
16
|
+
"REVIEWING",
|
|
17
|
+
"CALLBACKS",
|
|
18
|
+
"CLOSED",
|
|
19
|
+
"CANCELLED"
|
|
20
|
+
], x = 20, S = () => {
|
|
21
|
+
let { navigateTo: S } = e(), [C, w] = d("OPEN"), [T, E] = d(0), { data: D, isLoading: O, isError: k, refetch: A } = r({ status: C || void 0 }, {
|
|
22
|
+
limit: x,
|
|
23
|
+
offset: T * x
|
|
24
|
+
}), j = D?.items ?? [];
|
|
25
|
+
return /* @__PURE__ */ v(t, {
|
|
26
|
+
title: "Auditions",
|
|
27
|
+
description: "Casting & talent marketplace",
|
|
28
|
+
purpose: "Open casting calls across the network. Talent discover and apply to roles with a self-tape; casting teams screen, score, and shortlist applicants.",
|
|
29
|
+
actions: /* @__PURE__ */ v("button", {
|
|
30
|
+
type: "button",
|
|
31
|
+
onClick: () => S("auditions/new"),
|
|
32
|
+
className: "inline-flex items-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 transition-opacity",
|
|
33
|
+
children: [/* @__PURE__ */ _(g, { className: "h-4 w-4" }), "Post Role"]
|
|
34
|
+
}),
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ _("div", {
|
|
37
|
+
className: "mb-4 flex flex-wrap items-center gap-3",
|
|
38
|
+
children: /* @__PURE__ */ v("select", {
|
|
39
|
+
value: C,
|
|
40
|
+
onChange: (e) => {
|
|
41
|
+
w(e.target.value), E(0);
|
|
42
|
+
},
|
|
43
|
+
className: "rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-xs text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
|
|
44
|
+
children: [/* @__PURE__ */ _("option", {
|
|
45
|
+
value: "",
|
|
46
|
+
children: "Any Status"
|
|
47
|
+
}), b.map((e) => /* @__PURE__ */ _("option", {
|
|
48
|
+
value: e,
|
|
49
|
+
children: a(e)
|
|
50
|
+
}, e))]
|
|
51
|
+
})
|
|
52
|
+
}),
|
|
53
|
+
O ? /* @__PURE__ */ _(c, { label: "Loading auditions…" }) : k ? /* @__PURE__ */ _(s, { onRetry: () => void A() }) : j.length === 0 ? /* @__PURE__ */ _(l, {
|
|
54
|
+
icon: /* @__PURE__ */ _(h, { className: "h-12 w-12" }),
|
|
55
|
+
title: "No auditions",
|
|
56
|
+
description: "No casting calls match this filter.",
|
|
57
|
+
action: /* @__PURE__ */ _("button", {
|
|
58
|
+
type: "button",
|
|
59
|
+
onClick: () => S("auditions/new"),
|
|
60
|
+
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 transition-opacity",
|
|
61
|
+
children: "Post a Role"
|
|
62
|
+
})
|
|
63
|
+
}) : /* @__PURE__ */ _("div", {
|
|
64
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",
|
|
65
|
+
children: j.map((e) => /* @__PURE__ */ _("button", {
|
|
66
|
+
type: "button",
|
|
67
|
+
onClick: () => S(`auditions/${e.id}`),
|
|
68
|
+
className: "text-left",
|
|
69
|
+
children: /* @__PURE__ */ v(y, {
|
|
70
|
+
treatment: "metric",
|
|
71
|
+
className: "flex h-full flex-col border-border-seam p-4",
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ v("div", {
|
|
74
|
+
className: "flex items-start justify-between gap-2",
|
|
75
|
+
children: [/* @__PURE__ */ _("h3", {
|
|
76
|
+
className: "line-clamp-2 text-sm font-semibold text-text-primary",
|
|
77
|
+
children: e.roleName
|
|
78
|
+
}), /* @__PURE__ */ _(n, { status: e.status })]
|
|
79
|
+
}),
|
|
80
|
+
e.production && /* @__PURE__ */ _("p", {
|
|
81
|
+
className: "mt-1 text-xs text-text-secondary",
|
|
82
|
+
children: e.production.title
|
|
83
|
+
}),
|
|
84
|
+
e.isMinorRole && /* @__PURE__ */ _("span", {
|
|
85
|
+
className: "mt-2 inline-block w-fit rounded-full bg-status-warning-bg-subtle px-2 py-0.5 text-[10px] text-status-warning-text",
|
|
86
|
+
children: "Minor role — guardian consent required"
|
|
87
|
+
}),
|
|
88
|
+
e.description && /* @__PURE__ */ _("p", {
|
|
89
|
+
className: "mt-2 line-clamp-2 text-xs text-text-secondary",
|
|
90
|
+
children: e.description
|
|
91
|
+
}),
|
|
92
|
+
/* @__PURE__ */ v("div", {
|
|
93
|
+
className: "mt-3 space-y-1 text-xs text-text-secondary",
|
|
94
|
+
children: [
|
|
95
|
+
/* @__PURE__ */ _("p", {
|
|
96
|
+
className: "font-medium text-text-primary",
|
|
97
|
+
children: o(e.payMinorUnits, e.currency)
|
|
98
|
+
}),
|
|
99
|
+
e.location && /* @__PURE__ */ v("p", {
|
|
100
|
+
className: "flex items-center gap-1",
|
|
101
|
+
children: [/* @__PURE__ */ _(m, { className: "h-3 w-3" }), e.location]
|
|
102
|
+
}),
|
|
103
|
+
e.language && /* @__PURE__ */ v("p", {
|
|
104
|
+
className: "flex items-center gap-1",
|
|
105
|
+
children: [/* @__PURE__ */ _(p, { className: "h-3 w-3" }), e.language]
|
|
106
|
+
}),
|
|
107
|
+
e.submissionDeadline && /* @__PURE__ */ v("p", {
|
|
108
|
+
className: "flex items-center gap-1",
|
|
109
|
+
children: [
|
|
110
|
+
/* @__PURE__ */ _(f, { className: "h-3 w-3" }),
|
|
111
|
+
"Deadline",
|
|
112
|
+
" ",
|
|
113
|
+
i(e.submissionDeadline, {
|
|
114
|
+
hour: void 0,
|
|
115
|
+
minute: void 0
|
|
116
|
+
})
|
|
117
|
+
]
|
|
118
|
+
})
|
|
119
|
+
]
|
|
120
|
+
})
|
|
121
|
+
]
|
|
122
|
+
})
|
|
123
|
+
}, e.id))
|
|
124
|
+
}),
|
|
125
|
+
!O && !k && /* @__PURE__ */ _(u, {
|
|
126
|
+
page: T,
|
|
127
|
+
hasMore: D?.pageInfo.hasMore ?? !1,
|
|
128
|
+
onPageChange: E,
|
|
129
|
+
shownCount: j.length
|
|
130
|
+
})
|
|
131
|
+
]
|
|
132
|
+
});
|
|
133
|
+
};
|
|
134
|
+
//#endregion
|
|
135
|
+
export { S as AuditionsPage };
|
|
136
|
+
|
|
137
|
+
//# sourceMappingURL=AuditionsPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AuditionsPage.js","names":[],"sources":["../../../../src/hookmovies/pages/auditions/AuditionsPage.tsx"],"sourcesContent":["/**\n * Auditions list (Casting marketplace)\n * @module hookmovies/pages/auditions\n *\n * Lists casting role postings via `hokListAuditions` with a status filter.\n * Talent open a posting to apply; casting teams open it to screen applicants.\n */\n\nimport { type FC, useState } from 'react';\nimport { Megaphone, Plus, MapPin, Languages, Clock } from 'lucide-react';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../../components/PageLayout';\nimport { StatusBadge } from '../../components/StatusBadge';\nimport { EmptyState } from '../../components/EmptyState';\nimport { LoadingState, ErrorState } from '../../components/StateViews';\nimport { Pagination } from '../../components/Pagination';\nimport { useHookMovies } from '../../context/HookMoviesContext';\nimport { useAuditions, type HokAuditionStatus } from '../../hooks/useHookMoviesApi';\nimport { formatEnumLabel, formatMinorUnits, formatDate } from '../../utils/formatters';\n\nconst STATUS_OPTIONS: HokAuditionStatus[] = [\n 'OPEN',\n 'REVIEWING',\n 'CALLBACKS',\n 'CLOSED',\n 'CANCELLED',\n];\n\nconst PAGE_LIMIT = 20;\n\nexport const AuditionsPage: FC = () => {\n const { navigateTo } = useHookMovies();\n const [statusFilter, setStatusFilter] = useState<HokAuditionStatus | ''>('OPEN');\n const [page, setPage] = useState(0);\n\n const { data, isLoading, isError, refetch } = useAuditions(\n { status: statusFilter || undefined },\n { limit: PAGE_LIMIT, offset: page * PAGE_LIMIT }\n );\n\n const items = data?.items ?? [];\n\n return (\n <PageLayout\n title=\"Auditions\"\n description=\"Casting & talent marketplace\"\n purpose=\"Open casting calls across the network. Talent discover and apply to roles with a self-tape; casting teams screen, score, and shortlist applicants.\"\n actions={\n <button\n type=\"button\"\n onClick={() => navigateTo('auditions/new')}\n className=\"inline-flex items-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 transition-opacity\"\n >\n <Plus className=\"h-4 w-4\" />\n Post Role\n </button>\n }\n >\n <div className=\"mb-4 flex flex-wrap items-center gap-3\">\n <select\n value={statusFilter}\n onChange={(e) => {\n setStatusFilter(e.target.value as HokAuditionStatus | '');\n setPage(0);\n }}\n className=\"rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-xs text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]\"\n >\n <option value=\"\">Any Status</option>\n {STATUS_OPTIONS.map((s) => (\n <option key={s} value={s}>\n {formatEnumLabel(s)}\n </option>\n ))}\n </select>\n </div>\n\n {isLoading ? (\n <LoadingState label=\"Loading auditions…\" />\n ) : isError ? (\n <ErrorState onRetry={() => void refetch()} />\n ) : items.length === 0 ? (\n <EmptyState\n icon={<Megaphone className=\"h-12 w-12\" />}\n title=\"No auditions\"\n description=\"No casting calls match this filter.\"\n action={\n <button\n type=\"button\"\n onClick={() => navigateTo('auditions/new')}\n className=\"rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 transition-opacity\"\n >\n Post a Role\n </button>\n }\n />\n ) : (\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3\">\n {items.map((aud) => (\n <button\n key={aud.id}\n type=\"button\"\n onClick={() => navigateTo(`auditions/${aud.id}`)}\n className=\"text-left\"\n >\n <GlassCard\n treatment=\"metric\"\n className=\"flex h-full flex-col border-border-seam p-4\"\n >\n <div className=\"flex items-start justify-between gap-2\">\n <h3 className=\"line-clamp-2 text-sm font-semibold text-text-primary\">\n {aud.roleName}\n </h3>\n <StatusBadge status={aud.status} />\n </div>\n {aud.production && (\n <p className=\"mt-1 text-xs text-text-secondary\">{aud.production.title}</p>\n )}\n {aud.isMinorRole && (\n <span className=\"mt-2 inline-block w-fit rounded-full bg-status-warning-bg-subtle px-2 py-0.5 text-[10px] text-status-warning-text\">\n Minor role — guardian consent required\n </span>\n )}\n {aud.description && (\n <p className=\"mt-2 line-clamp-2 text-xs text-text-secondary\">{aud.description}</p>\n )}\n <div className=\"mt-3 space-y-1 text-xs text-text-secondary\">\n <p className=\"font-medium text-text-primary\">\n {formatMinorUnits(aud.payMinorUnits, aud.currency)}\n </p>\n {aud.location && (\n <p className=\"flex items-center gap-1\">\n <MapPin className=\"h-3 w-3\" />\n {aud.location}\n </p>\n )}\n {aud.language && (\n <p className=\"flex items-center gap-1\">\n <Languages className=\"h-3 w-3\" />\n {aud.language}\n </p>\n )}\n {aud.submissionDeadline && (\n <p className=\"flex items-center gap-1\">\n <Clock className=\"h-3 w-3\" />\n Deadline{' '}\n {formatDate(aud.submissionDeadline, { hour: undefined, minute: undefined })}\n </p>\n )}\n </div>\n </GlassCard>\n </button>\n ))}\n </div>\n )}\n\n {!isLoading && !isError && (\n <Pagination\n page={page}\n hasMore={data?.pageInfo.hasMore ?? false}\n onPageChange={setPage}\n shownCount={items.length}\n />\n )}\n </PageLayout>\n );\n};\n"],"mappings":";;;;;;;;;;;;;AAoBA,IAAM,IAAsC;CAC1C;CACA;CACA;CACA;CACA;CACD,EAEK,IAAa,IAEN,UAA0B;CACrC,IAAM,EAAE,kBAAe,GAAe,EAChC,CAAC,GAAc,KAAmB,EAAiC,OAAO,EAC1E,CAAC,GAAM,KAAW,EAAS,EAAE,EAE7B,EAAE,SAAM,cAAW,YAAS,eAAY,EAC5C,EAAE,Q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AD,EAAa,QAAQ,EAAI,QAAU,CAAA,CAC/B;;OACL,EAAI,cACH,kBAAC,KAAD;QAAG,WAAU;kBAAoC,EAAI,WAAW;QAAU,CAAA;OAE3E,EAAI,eACH,kBAAC,QAAD;QAAM,WAAU;kBAAoH;QAE7H,CAAA;OAER,EAAI,eACH,kBAAC,KAAD;QAAG,WAAU;kBAAiD,EAAI;QAAgB,CAAA;OAEpF,kBAAC,OAAD;QAAK,WAAU;kBAAf;SACE,kBAAC,KAAD;UAAG,WAAU;oBACV,EAAiB,EAAI,eAAe,EAAI,SAAS;UAChD,CAAA;SACH,EAAI,YACH,kBAAC,KAAD;UAAG,WAAU;oBAAb,CACE,kBAAC,GAAD,EAAQ,WAAU,WAAY,CAAA,EAC7B,EAAI,SACH;;SAEL,EAAI,YACH,kBAAC,KAAD;UAAG,WAAU;oBAAb,CACE,kBAAC,GAAD,EAAW,WAAU,WAAY,CAAA,EAChC,EAAI,SACH;;SAEL,EAAI,sBACH,kBAAC,KAAD;UAAG,WAAU;oBAAb;WACE,kBAAC,GAAD,EAAO,WAAU,WAAY,CAAA;;WACpB;WACR,EAAW,EAAI,oBAAoB;YAAE,MAAM,KAAA;YAAW,QAAQ,KAAA;YAAW,CAAC;WACzE;;SAEF;;OACI;;KACL,EAnDF,EAAI,GAmDF,CACT;IACE,CAAA;GAGP,CAAC,KAAa,CAAC,KACd,kBAAC,GAAD;IACQ;IACN,SAAS,GAAM,SAAS,WAAW;IACnC,cAAc;IACd,YAAY,EAAM;IAClB,CAAA;GAEO"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { PageLayout as e } from "../../components/PageLayout.js";
|
|
2
|
+
import { useCreatePerson as t, usePeople as n } from "../../hooks/useHookMoviesApi.js";
|
|
3
|
+
import { ErrorState as r, LoadingState as i } from "../../components/StateViews.js";
|
|
4
|
+
import { EmptyState as a } from "../../components/EmptyState.js";
|
|
5
|
+
import { Pagination as o } from "../../components/Pagination.js";
|
|
6
|
+
import { useState as s } from "react";
|
|
7
|
+
import { Languages as c, Plus as l, Users as u, X as d } from "lucide-react";
|
|
8
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
9
|
+
import { GlassCard as m } from "@burdenoff/fe-libs/ui";
|
|
10
|
+
//#region src/hookmovies/pages/catalog/PeoplePage.tsx
|
|
11
|
+
var h = 24, g = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", _ = "mb-1.5 block text-xs font-medium text-text-secondary", v = () => {
|
|
12
|
+
let [v, y] = s(0), [b, x] = s(!1), { data: S, isLoading: C, isError: w, refetch: T } = n({
|
|
13
|
+
limit: h,
|
|
14
|
+
offset: v * h
|
|
15
|
+
}), E = t(), [D, O] = s(""), [k, A] = s(""), [j, M] = s(""), [N, P] = s(""), [F, I] = s(null), L = () => {
|
|
16
|
+
O(""), A(""), M(""), P(""), I(null);
|
|
17
|
+
}, R = async (e) => {
|
|
18
|
+
if (e.preventDefault(), I(null), !D.trim()) {
|
|
19
|
+
I("Name is required.");
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
let t = {
|
|
23
|
+
name: D.trim(),
|
|
24
|
+
knownFor: k.trim() || void 0,
|
|
25
|
+
primaryLanguage: j.trim() || void 0,
|
|
26
|
+
biography: N.trim() || void 0
|
|
27
|
+
};
|
|
28
|
+
try {
|
|
29
|
+
await E.mutateAsync(t), L(), x(!1);
|
|
30
|
+
} catch (e) {
|
|
31
|
+
I(e instanceof Error ? e.message : "Failed to create person");
|
|
32
|
+
}
|
|
33
|
+
}, z = S?.items ?? [];
|
|
34
|
+
return /* @__PURE__ */ p(e, {
|
|
35
|
+
title: "People",
|
|
36
|
+
description: "Cast & crew directory",
|
|
37
|
+
purpose: "Actors, directors, writers, and crew across the network. People are credited on titles and can be linked to Artistrybase portfolios.",
|
|
38
|
+
actions: /* @__PURE__ */ p("button", {
|
|
39
|
+
type: "button",
|
|
40
|
+
onClick: () => x((e) => !e),
|
|
41
|
+
className: "inline-flex items-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 transition-opacity",
|
|
42
|
+
children: [/* @__PURE__ */ f(l, { className: "h-4 w-4" }), "New Person"]
|
|
43
|
+
}),
|
|
44
|
+
children: [
|
|
45
|
+
b && /* @__PURE__ */ p(m, {
|
|
46
|
+
treatment: "glass",
|
|
47
|
+
className: "mb-6 border-border-seam p-5",
|
|
48
|
+
children: [/* @__PURE__ */ p("div", {
|
|
49
|
+
className: "mb-3 flex items-center justify-between",
|
|
50
|
+
children: [/* @__PURE__ */ f("h2", {
|
|
51
|
+
className: "text-sm font-semibold text-text-primary",
|
|
52
|
+
children: "Add Person"
|
|
53
|
+
}), /* @__PURE__ */ f("button", {
|
|
54
|
+
type: "button",
|
|
55
|
+
onClick: () => x(!1),
|
|
56
|
+
className: "rounded-md p-1 text-text-secondary hover:text-text-primary",
|
|
57
|
+
children: /* @__PURE__ */ f(d, { className: "h-4 w-4" })
|
|
58
|
+
})]
|
|
59
|
+
}), /* @__PURE__ */ p("form", {
|
|
60
|
+
onSubmit: R,
|
|
61
|
+
className: "space-y-4",
|
|
62
|
+
children: [
|
|
63
|
+
F && /* @__PURE__ */ f("div", {
|
|
64
|
+
className: "rounded-lg border border-status-error-border bg-status-error-bg-subtle px-3 py-2 text-sm text-status-error-text",
|
|
65
|
+
children: F
|
|
66
|
+
}),
|
|
67
|
+
/* @__PURE__ */ p("div", {
|
|
68
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
|
|
69
|
+
children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
70
|
+
htmlFor: "person-name",
|
|
71
|
+
className: _,
|
|
72
|
+
children: "Name *"
|
|
73
|
+
}), /* @__PURE__ */ f("input", {
|
|
74
|
+
id: "person-name",
|
|
75
|
+
type: "text",
|
|
76
|
+
value: D,
|
|
77
|
+
onChange: (e) => O(e.target.value),
|
|
78
|
+
placeholder: "e.g. Aria Mendez",
|
|
79
|
+
className: g,
|
|
80
|
+
required: !0
|
|
81
|
+
})] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
82
|
+
htmlFor: "person-known",
|
|
83
|
+
className: _,
|
|
84
|
+
children: "Known For"
|
|
85
|
+
}), /* @__PURE__ */ f("input", {
|
|
86
|
+
id: "person-known",
|
|
87
|
+
type: "text",
|
|
88
|
+
value: k,
|
|
89
|
+
onChange: (e) => A(e.target.value),
|
|
90
|
+
placeholder: "Acting",
|
|
91
|
+
className: g
|
|
92
|
+
})] })]
|
|
93
|
+
}),
|
|
94
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
95
|
+
htmlFor: "person-lang",
|
|
96
|
+
className: _,
|
|
97
|
+
children: "Primary Language"
|
|
98
|
+
}), /* @__PURE__ */ f("input", {
|
|
99
|
+
id: "person-lang",
|
|
100
|
+
type: "text",
|
|
101
|
+
value: j,
|
|
102
|
+
onChange: (e) => M(e.target.value),
|
|
103
|
+
placeholder: "en",
|
|
104
|
+
className: g
|
|
105
|
+
})] }),
|
|
106
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
107
|
+
htmlFor: "person-bio",
|
|
108
|
+
className: _,
|
|
109
|
+
children: "Biography"
|
|
110
|
+
}), /* @__PURE__ */ f("textarea", {
|
|
111
|
+
id: "person-bio",
|
|
112
|
+
value: N,
|
|
113
|
+
onChange: (e) => P(e.target.value),
|
|
114
|
+
rows: 3,
|
|
115
|
+
className: g
|
|
116
|
+
})] }),
|
|
117
|
+
/* @__PURE__ */ f("button", {
|
|
118
|
+
type: "submit",
|
|
119
|
+
disabled: E.isPending,
|
|
120
|
+
className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50 transition-opacity",
|
|
121
|
+
children: E.isPending ? "Adding…" : "Add Person"
|
|
122
|
+
})
|
|
123
|
+
]
|
|
124
|
+
})]
|
|
125
|
+
}),
|
|
126
|
+
C ? /* @__PURE__ */ f(i, { label: "Loading people…" }) : w ? /* @__PURE__ */ f(r, { onRetry: () => void T() }) : z.length === 0 ? /* @__PURE__ */ f(a, {
|
|
127
|
+
icon: /* @__PURE__ */ f(u, { className: "h-12 w-12" }),
|
|
128
|
+
title: "No people yet",
|
|
129
|
+
description: "Add cast and crew to credit them on your titles."
|
|
130
|
+
}) : /* @__PURE__ */ f("div", {
|
|
131
|
+
className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",
|
|
132
|
+
children: z.map((e) => /* @__PURE__ */ p(m, {
|
|
133
|
+
treatment: "metric",
|
|
134
|
+
className: "flex flex-col border-border-seam p-4",
|
|
135
|
+
children: [
|
|
136
|
+
/* @__PURE__ */ p("div", {
|
|
137
|
+
className: "flex items-center gap-3",
|
|
138
|
+
children: [/* @__PURE__ */ f("span", {
|
|
139
|
+
className: "inline-flex h-10 w-10 items-center justify-center rounded-full bg-bg-sunken text-sm font-semibold text-text-primary",
|
|
140
|
+
children: e.name.charAt(0).toUpperCase()
|
|
141
|
+
}), /* @__PURE__ */ p("div", {
|
|
142
|
+
className: "min-w-0",
|
|
143
|
+
children: [/* @__PURE__ */ f("h3", {
|
|
144
|
+
className: "truncate text-sm font-semibold text-text-primary",
|
|
145
|
+
children: e.name
|
|
146
|
+
}), e.knownFor && /* @__PURE__ */ f("p", {
|
|
147
|
+
className: "truncate text-xs text-text-secondary",
|
|
148
|
+
children: e.knownFor
|
|
149
|
+
})]
|
|
150
|
+
})]
|
|
151
|
+
}),
|
|
152
|
+
e.primaryLanguage && /* @__PURE__ */ p("p", {
|
|
153
|
+
className: "mt-3 inline-flex items-center gap-1 text-xs text-text-secondary",
|
|
154
|
+
children: [/* @__PURE__ */ f(c, { className: "h-3 w-3" }), e.primaryLanguage]
|
|
155
|
+
}),
|
|
156
|
+
e.biography && /* @__PURE__ */ f("p", {
|
|
157
|
+
className: "mt-2 line-clamp-3 text-xs text-text-secondary",
|
|
158
|
+
children: e.biography
|
|
159
|
+
})
|
|
160
|
+
]
|
|
161
|
+
}, e.id))
|
|
162
|
+
}),
|
|
163
|
+
!C && !w && /* @__PURE__ */ f(o, {
|
|
164
|
+
page: v,
|
|
165
|
+
hasMore: S?.pageInfo.hasMore ?? !1,
|
|
166
|
+
onPageChange: y,
|
|
167
|
+
shownCount: z.length
|
|
168
|
+
})
|
|
169
|
+
]
|
|
170
|
+
});
|
|
171
|
+
};
|
|
172
|
+
//#endregion
|
|
173
|
+
export { v as PeoplePage };
|
|
174
|
+
|
|
175
|
+
//# sourceMappingURL=PeoplePage.js.map
|