@burdenoff/microfe-crewfoundry 2026.1029.2 → 2026.1030.2
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/crewfoundry/components/EmployeeSkillsPanel.d.ts +12 -0
- package/dist/crewfoundry/components/EmployeeSkillsPanel.d.ts.map +1 -0
- package/dist/crewfoundry/components/EmployeeSkillsPanel.js +168 -0
- package/dist/crewfoundry/components/EmployeeSkillsPanel.js.map +1 -0
- package/dist/crewfoundry/lib/useFocusedRecordParam.d.ts +51 -0
- package/dist/crewfoundry/lib/useFocusedRecordParam.d.ts.map +1 -0
- package/dist/crewfoundry/lib/useFocusedRecordParam.js +38 -0
- package/dist/crewfoundry/lib/useFocusedRecordParam.js.map +1 -0
- package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js +119 -112
- package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyClientManagementPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js +78 -71
- package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js +88 -81
- package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringCandidatesPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/HiringCandidatesPagePage.js +133 -126
- package/dist/crewfoundry/pages/HiringCandidatesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringInterviewsPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/HiringInterviewsPagePage.js +150 -143
- package/dist/crewfoundry/pages/HiringInterviewsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrDepartmentsPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/HrDepartmentsPagePage.js +110 -103
- package/dist/crewfoundry/pages/HrDepartmentsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrEmployeeProfilePagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/HrEmployeeProfilePagePage.js +124 -134
- package/dist/crewfoundry/pages/HrEmployeeProfilePagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrLeaveManagementPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js +173 -162
- package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrPayrollPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/HrPayrollPagePage.js +169 -158
- package/dist/crewfoundry/pages/HrPayrollPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrTimeTrackingPagePage.d.ts.map +1 -1
- package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js +179 -163
- package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js.map +1 -1
- package/dist/crewfoundry/store/crewfoundryStore.d.ts +22 -0
- package/dist/crewfoundry/store/crewfoundryStore.d.ts.map +1 -1
- package/dist/crewfoundry/store/crewfoundryStore.js +158 -129
- package/dist/crewfoundry/store/crewfoundryStore.js.map +1 -1
- package/dist/utils/pageContext.d.ts +43 -4
- package/dist/utils/pageContext.d.ts.map +1 -1
- package/dist/utils/pageContext.js +10 -3
- package/dist/utils/pageContext.js.map +1 -1
- package/package.json +3 -2
|
@@ -5,13 +5,14 @@ import { AvatarStack as r } from "../components/viz/AvatarStack.js";
|
|
|
5
5
|
import { SegmentedTabs as ee } from "../components/viz/SegmentedTabs.js";
|
|
6
6
|
import "../components/viz/index.js";
|
|
7
7
|
import { FormModal as te, useFormModal as i } from "../components/forms/FormModal.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
8
|
+
import { useFocusedRecordParam as a } from "../lib/useFocusedRecordParam.js";
|
|
9
|
+
import { clientRevenue as o, totalContractValue as s } from "../lib/companyFinance.js";
|
|
10
|
+
import { useState as c } from "react";
|
|
11
|
+
import { Mail as l, MoreHorizontal as u, Pencil as d, Plus as ne, Search as re, Star as ie, Trash2 as ae } from "lucide-react";
|
|
12
|
+
import { useNavigate as oe } from "react-router";
|
|
13
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
14
|
+
import { AlertDialog as se, AlertDialogAction as ce, AlertDialogCancel as le, AlertDialogContent as ue, AlertDialogDescription as m, AlertDialogFooter as h, AlertDialogHeader as g, AlertDialogTitle as _, Badge as v, Button as y, CardContent as b, CardHeader as x, CardTitle as S, DropdownMenu as C, DropdownMenuContent as w, DropdownMenuItem as T, DropdownMenuSeparator as E, DropdownMenuTrigger as D, GlassCard as O, GradientText as k, IllustratedEmptyState as A, Input as j, PagePurpose as M, Pagination as N, Select as P, SelectContent as F, SelectItem as I, SelectTrigger as L, SelectValue as de } from "@burdenoff/fe-libs/ui";
|
|
15
|
+
import { usePagination as R } from "@burdenoff/fe-libs/shared/hooks";
|
|
15
16
|
//#region src/crewfoundry/pages/CompanyVendorManagementPagePage.tsx
|
|
16
17
|
var z = [
|
|
17
18
|
{
|
|
@@ -91,21 +92,27 @@ var z = [
|
|
|
91
92
|
rating: typeof e.rating == "number" ? e.rating : Number(e.rating) || 0
|
|
92
93
|
}), H = (e) => e >= 1e6 ? `$${(e / 1e6).toFixed(1)}M` : e >= 1e3 ? `$${Math.round(e / 1e3)}k` : `$${Math.round(e)}`;
|
|
93
94
|
function U() {
|
|
94
|
-
let { vendors: U, clients: W, addVendor:
|
|
95
|
+
let { vendors: U, clients: W, addVendor: fe, updateVendor: pe, removeVendor: me } = e(), he = oe(), G = i();
|
|
96
|
+
a({
|
|
97
|
+
records: U,
|
|
98
|
+
activeId: G.open ? G.context?.id ?? null : null,
|
|
99
|
+
onRestore: G.openModal
|
|
100
|
+
});
|
|
101
|
+
let [K, ge] = c(""), [q, _e] = c("all"), [J, Y] = c(null), { page: ve, pageSize: X, offset: Z, setPage: Q } = R({ initialPageSize: 12 }), ye = W.filter((e) => e.status === "active"), be = s(W, U), xe = o(W), $ = U.filter((e) => {
|
|
95
102
|
let t = `${e.name} ${e.category} ${e.contactPerson} ${e.email}`.toLowerCase().includes(K.toLowerCase()), n = q === "all" || e.status === q;
|
|
96
103
|
return t && n;
|
|
97
|
-
}),
|
|
98
|
-
return /* @__PURE__ */
|
|
104
|
+
}), Se = $.slice(Z, Z + X);
|
|
105
|
+
return /* @__PURE__ */ p("div", {
|
|
99
106
|
className: "space-y-6 p-6",
|
|
100
107
|
children: [
|
|
101
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ p("div", {
|
|
102
109
|
className: "flex items-center justify-between",
|
|
103
|
-
children: [/* @__PURE__ */
|
|
104
|
-
/* @__PURE__ */
|
|
110
|
+
children: [/* @__PURE__ */ p("div", { children: [
|
|
111
|
+
/* @__PURE__ */ f("h1", {
|
|
105
112
|
className: "text-2xl font-semibold",
|
|
106
|
-
children: /* @__PURE__ */
|
|
113
|
+
children: /* @__PURE__ */ f(k, { children: "Clients & Vendors" })
|
|
107
114
|
}),
|
|
108
|
-
/* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ p("p", {
|
|
109
116
|
className: "text-sm text-text-secondary",
|
|
110
117
|
children: [
|
|
111
118
|
W.length,
|
|
@@ -114,22 +121,22 @@ function U() {
|
|
|
114
121
|
" vendors"
|
|
115
122
|
]
|
|
116
123
|
}),
|
|
117
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ f(M, {
|
|
118
125
|
className: "mt-1",
|
|
119
126
|
children: "Track the vendors and suppliers you depend on — contracts, contacts, and status — to manage external relationships in one place."
|
|
120
127
|
})
|
|
121
|
-
] }), /* @__PURE__ */
|
|
128
|
+
] }), /* @__PURE__ */ p(y, {
|
|
122
129
|
size: "sm",
|
|
123
130
|
onClick: () => G.openModal(),
|
|
124
|
-
children: [/* @__PURE__ */
|
|
131
|
+
children: [/* @__PURE__ */ f(ne, { className: "h-4 w-4 mr-1" }), "Add Vendor"]
|
|
125
132
|
})]
|
|
126
133
|
}),
|
|
127
|
-
/* @__PURE__ */
|
|
134
|
+
/* @__PURE__ */ f(ee, {
|
|
128
135
|
"aria-label": "Clients and vendors",
|
|
129
136
|
variant: "underline",
|
|
130
137
|
value: "vendors",
|
|
131
138
|
onChange: (e) => {
|
|
132
|
-
e === "clients" &&
|
|
139
|
+
e === "clients" && he("../company/client-management-page");
|
|
133
140
|
},
|
|
134
141
|
tabs: [{
|
|
135
142
|
id: "clients",
|
|
@@ -141,160 +148,160 @@ function U() {
|
|
|
141
148
|
count: U.length
|
|
142
149
|
}]
|
|
143
150
|
}),
|
|
144
|
-
/* @__PURE__ */
|
|
151
|
+
/* @__PURE__ */ p("div", {
|
|
145
152
|
className: "grid gap-4 sm:grid-cols-2 xl:grid-cols-4",
|
|
146
153
|
children: [
|
|
147
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ f(n, {
|
|
148
155
|
label: "Active Clients",
|
|
149
|
-
value:
|
|
156
|
+
value: ye.length
|
|
150
157
|
}),
|
|
151
|
-
/* @__PURE__ */
|
|
158
|
+
/* @__PURE__ */ f(n, {
|
|
152
159
|
label: "Vendors",
|
|
153
160
|
value: U.length
|
|
154
161
|
}),
|
|
155
|
-
/* @__PURE__ */
|
|
162
|
+
/* @__PURE__ */ f(n, {
|
|
156
163
|
label: "Total Contract Value",
|
|
157
|
-
value: H(
|
|
164
|
+
value: H(be)
|
|
158
165
|
}),
|
|
159
|
-
/* @__PURE__ */
|
|
166
|
+
/* @__PURE__ */ f(n, {
|
|
160
167
|
label: "Client Revenue",
|
|
161
|
-
value: H(
|
|
168
|
+
value: H(xe)
|
|
162
169
|
})
|
|
163
170
|
]
|
|
164
171
|
}),
|
|
165
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ p("div", {
|
|
166
173
|
className: "flex flex-col gap-2 sm:flex-row sm:items-center",
|
|
167
|
-
children: [/* @__PURE__ */
|
|
174
|
+
children: [/* @__PURE__ */ p("div", {
|
|
168
175
|
className: "relative flex-1",
|
|
169
|
-
children: [/* @__PURE__ */
|
|
176
|
+
children: [/* @__PURE__ */ f(re, { className: "absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 text-text-secondary" }), /* @__PURE__ */ f(j, {
|
|
170
177
|
placeholder: "Search vendors...",
|
|
171
178
|
className: "pl-9",
|
|
172
179
|
value: K,
|
|
173
180
|
onChange: (e) => {
|
|
174
|
-
|
|
181
|
+
ge(e.target.value), Q(1);
|
|
175
182
|
}
|
|
176
183
|
})]
|
|
177
|
-
}), /* @__PURE__ */
|
|
184
|
+
}), /* @__PURE__ */ p(P, {
|
|
178
185
|
value: q,
|
|
179
186
|
onValueChange: (e) => {
|
|
180
|
-
|
|
187
|
+
_e(e), Q(1);
|
|
181
188
|
},
|
|
182
|
-
children: [/* @__PURE__ */
|
|
189
|
+
children: [/* @__PURE__ */ f(L, {
|
|
183
190
|
className: "w-full sm:w-40",
|
|
184
191
|
"aria-label": "Filter by status",
|
|
185
|
-
children: /* @__PURE__ */
|
|
186
|
-
}), /* @__PURE__ */
|
|
187
|
-
/* @__PURE__ */
|
|
192
|
+
children: /* @__PURE__ */ f(de, {})
|
|
193
|
+
}), /* @__PURE__ */ p(F, { children: [
|
|
194
|
+
/* @__PURE__ */ f(I, {
|
|
188
195
|
value: "all",
|
|
189
196
|
children: "All statuses"
|
|
190
197
|
}),
|
|
191
|
-
/* @__PURE__ */
|
|
198
|
+
/* @__PURE__ */ f(I, {
|
|
192
199
|
value: "active",
|
|
193
200
|
children: "Active"
|
|
194
201
|
}),
|
|
195
|
-
/* @__PURE__ */
|
|
202
|
+
/* @__PURE__ */ f(I, {
|
|
196
203
|
value: "inactive",
|
|
197
204
|
children: "Inactive"
|
|
198
205
|
}),
|
|
199
|
-
/* @__PURE__ */
|
|
206
|
+
/* @__PURE__ */ f(I, {
|
|
200
207
|
value: "pending",
|
|
201
208
|
children: "Pending"
|
|
202
209
|
})
|
|
203
210
|
] })]
|
|
204
211
|
})]
|
|
205
212
|
}),
|
|
206
|
-
/* @__PURE__ */
|
|
213
|
+
/* @__PURE__ */ f("div", {
|
|
207
214
|
className: "grid gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
208
|
-
children: U.length === 0 ? /* @__PURE__ */
|
|
215
|
+
children: U.length === 0 ? /* @__PURE__ */ f("div", {
|
|
209
216
|
className: "col-span-full",
|
|
210
|
-
children: /* @__PURE__ */
|
|
217
|
+
children: /* @__PURE__ */ f(A, {
|
|
211
218
|
illustration: "empty-data",
|
|
212
219
|
title: "No vendors yet",
|
|
213
220
|
description: "Add a vendor to start tracking external relationships."
|
|
214
221
|
})
|
|
215
|
-
}) : $.length === 0 ? /* @__PURE__ */
|
|
222
|
+
}) : $.length === 0 ? /* @__PURE__ */ f("div", {
|
|
216
223
|
className: "col-span-full",
|
|
217
|
-
children: /* @__PURE__ */
|
|
224
|
+
children: /* @__PURE__ */ f(A, {
|
|
218
225
|
illustration: "empty-search",
|
|
219
226
|
title: "No vendors match",
|
|
220
227
|
description: "Try a different search term or status filter."
|
|
221
228
|
})
|
|
222
|
-
}) :
|
|
229
|
+
}) : Se.map((e) => /* @__PURE__ */ p(O, {
|
|
223
230
|
treatment: "glass",
|
|
224
|
-
children: [/* @__PURE__ */
|
|
231
|
+
children: [/* @__PURE__ */ f(x, { children: /* @__PURE__ */ p("div", {
|
|
225
232
|
className: "flex items-center justify-between gap-2",
|
|
226
|
-
children: [/* @__PURE__ */
|
|
233
|
+
children: [/* @__PURE__ */ p("div", {
|
|
227
234
|
className: "flex min-w-0 items-center gap-3",
|
|
228
|
-
children: [/* @__PURE__ */
|
|
235
|
+
children: [/* @__PURE__ */ f(r, {
|
|
229
236
|
people: [{ name: e.name }],
|
|
230
237
|
size: 36
|
|
231
|
-
}), /* @__PURE__ */
|
|
238
|
+
}), /* @__PURE__ */ f(S, {
|
|
232
239
|
className: "truncate text-base",
|
|
233
240
|
children: e.name
|
|
234
241
|
})]
|
|
235
|
-
}), /* @__PURE__ */
|
|
242
|
+
}), /* @__PURE__ */ p("div", {
|
|
236
243
|
className: "flex items-center gap-1",
|
|
237
|
-
children: [/* @__PURE__ */
|
|
244
|
+
children: [/* @__PURE__ */ f(v, {
|
|
238
245
|
variant: e.status === "active" ? "default" : "secondary",
|
|
239
246
|
className: "text-[10px]",
|
|
240
247
|
children: t(e.status)
|
|
241
|
-
}), /* @__PURE__ */
|
|
248
|
+
}), /* @__PURE__ */ p(C, { children: [/* @__PURE__ */ f(D, {
|
|
242
249
|
asChild: !0,
|
|
243
|
-
children: /* @__PURE__ */
|
|
250
|
+
children: /* @__PURE__ */ f(y, {
|
|
244
251
|
variant: "ghost",
|
|
245
252
|
size: "icon",
|
|
246
253
|
className: "h-8 w-8",
|
|
247
254
|
"aria-label": `More actions for ${e.name}`,
|
|
248
|
-
children: /* @__PURE__ */
|
|
255
|
+
children: /* @__PURE__ */ f(u, { className: "h-4 w-4" })
|
|
249
256
|
})
|
|
250
|
-
}), /* @__PURE__ */
|
|
257
|
+
}), /* @__PURE__ */ p(w, {
|
|
251
258
|
align: "end",
|
|
252
259
|
children: [
|
|
253
|
-
/* @__PURE__ */
|
|
260
|
+
/* @__PURE__ */ p(T, {
|
|
254
261
|
onSelect: () => G.openModal(e),
|
|
255
|
-
children: [/* @__PURE__ */
|
|
262
|
+
children: [/* @__PURE__ */ f(d, { className: "mr-2 h-4 w-4" }), "Edit"]
|
|
256
263
|
}),
|
|
257
|
-
/* @__PURE__ */
|
|
258
|
-
/* @__PURE__ */
|
|
264
|
+
/* @__PURE__ */ f(E, {}),
|
|
265
|
+
/* @__PURE__ */ p(T, {
|
|
259
266
|
className: "text-status-error-text",
|
|
260
267
|
onSelect: () => Y(e),
|
|
261
|
-
children: [/* @__PURE__ */
|
|
268
|
+
children: [/* @__PURE__ */ f(ae, { className: "mr-2 h-4 w-4" }), "Delete"]
|
|
262
269
|
})
|
|
263
270
|
]
|
|
264
271
|
})] })]
|
|
265
272
|
})]
|
|
266
|
-
}) }), /* @__PURE__ */
|
|
273
|
+
}) }), /* @__PURE__ */ f(b, { children: /* @__PURE__ */ p("div", {
|
|
267
274
|
className: "space-y-2",
|
|
268
275
|
children: [
|
|
269
|
-
/* @__PURE__ */
|
|
276
|
+
/* @__PURE__ */ f(v, {
|
|
270
277
|
variant: "outline",
|
|
271
278
|
className: "text-[10px]",
|
|
272
279
|
children: e.category
|
|
273
280
|
}),
|
|
274
|
-
/* @__PURE__ */
|
|
281
|
+
/* @__PURE__ */ p("div", {
|
|
275
282
|
className: "grid grid-cols-2 gap-2 mt-2",
|
|
276
|
-
children: [/* @__PURE__ */
|
|
283
|
+
children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
277
284
|
className: "text-xs text-text-secondary",
|
|
278
285
|
children: "Contact"
|
|
279
|
-
}), /* @__PURE__ */
|
|
286
|
+
}), /* @__PURE__ */ f("p", {
|
|
280
287
|
className: "text-sm",
|
|
281
288
|
children: e.contactPerson || "—"
|
|
282
|
-
})] }), /* @__PURE__ */
|
|
289
|
+
})] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("p", {
|
|
283
290
|
className: "text-xs text-text-secondary",
|
|
284
291
|
children: "Contract Value"
|
|
285
|
-
}), /* @__PURE__ */
|
|
292
|
+
}), /* @__PURE__ */ p("p", {
|
|
286
293
|
className: "text-sm font-medium tabular-nums",
|
|
287
294
|
children: ["$", e.contractValue.toLocaleString()]
|
|
288
295
|
})] })]
|
|
289
296
|
}),
|
|
290
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ p("div", {
|
|
291
298
|
className: "flex items-center justify-between pt-2 border-t mt-2",
|
|
292
|
-
children: [/* @__PURE__ */
|
|
299
|
+
children: [/* @__PURE__ */ p("div", {
|
|
293
300
|
className: "flex items-center gap-1 text-xs text-text-secondary",
|
|
294
|
-
children: [/* @__PURE__ */
|
|
295
|
-
}), /* @__PURE__ */
|
|
301
|
+
children: [/* @__PURE__ */ f(l, { className: "h-3 w-3" }), e.email || "—"]
|
|
302
|
+
}), /* @__PURE__ */ p("div", {
|
|
296
303
|
className: "flex items-center gap-1",
|
|
297
|
-
children: [/* @__PURE__ */
|
|
304
|
+
children: [/* @__PURE__ */ f(ie, { className: "h-3 w-3 text-status-warning-text" }), /* @__PURE__ */ f("span", {
|
|
298
305
|
className: "text-sm tabular-nums",
|
|
299
306
|
children: e.rating
|
|
300
307
|
})]
|
|
@@ -304,13 +311,13 @@ function U() {
|
|
|
304
311
|
}) })]
|
|
305
312
|
}, e.id))
|
|
306
313
|
}),
|
|
307
|
-
$.length > X && /* @__PURE__ */
|
|
308
|
-
page:
|
|
314
|
+
$.length > X && /* @__PURE__ */ f(N, {
|
|
315
|
+
page: ve,
|
|
309
316
|
pageSize: X,
|
|
310
317
|
totalItems: $.length,
|
|
311
318
|
onPageChange: Q
|
|
312
319
|
}),
|
|
313
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ f(te, {
|
|
314
321
|
open: G.open,
|
|
315
322
|
onOpenChange: G.onOpenChange,
|
|
316
323
|
title: G.context ? "Edit vendor" : "Add vendor",
|
|
@@ -319,17 +326,17 @@ function U() {
|
|
|
319
326
|
initialValues: G.context ? B(G.context) : void 0,
|
|
320
327
|
submitLabel: G.context ? "Save changes" : "Add vendor",
|
|
321
328
|
onSubmit: async (e) => {
|
|
322
|
-
G.context ? await
|
|
329
|
+
G.context ? await pe(G.context.id, V(e, G.context)) : await fe(V(e));
|
|
323
330
|
}
|
|
324
331
|
}),
|
|
325
|
-
/* @__PURE__ */
|
|
332
|
+
/* @__PURE__ */ f(se, {
|
|
326
333
|
open: J !== null,
|
|
327
334
|
onOpenChange: (e) => {
|
|
328
335
|
e || Y(null);
|
|
329
336
|
},
|
|
330
|
-
children: /* @__PURE__ */
|
|
337
|
+
children: /* @__PURE__ */ p(ue, { children: [/* @__PURE__ */ p(g, { children: [/* @__PURE__ */ f(_, { children: "Delete vendor?" }), /* @__PURE__ */ f(m, { children: J ? `This removes “${J.name}” from your vendor directory. This action cannot be undone.` : "" })] }), /* @__PURE__ */ p(h, { children: [/* @__PURE__ */ f(le, { children: "Cancel" }), /* @__PURE__ */ f(ce, {
|
|
331
338
|
onClick: (e) => {
|
|
332
|
-
e.preventDefault(), J &&
|
|
339
|
+
e.preventDefault(), J && me(J.id), Y(null);
|
|
333
340
|
},
|
|
334
341
|
children: "Delete"
|
|
335
342
|
})] })] })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CompanyVendorManagementPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/CompanyVendorManagementPagePage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n Badge,\n Button,\n CardContent,\n CardHeader,\n CardTitle,\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n Input,\n PagePurpose,\n Pagination,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@burdenoff/fe-libs/ui';\nimport { usePagination } from '@burdenoff/fe-libs/shared/hooks';\nimport { Mail, MoreHorizontal, Pencil, Plus, Search, Star, Trash2 } from 'lucide-react';\nimport { useNavigate } from 'react-router';\nimport {\n FormModal,\n useFormModal,\n type FieldConfig,\n type FormValues,\n} from '../components/forms/FormModal';\nimport { useCrewFoundryStore, type Vendor } from '../store/crewfoundryStore';\nimport { formatEnumLabel } from '../utils/formatEnumLabel';\nimport { AvatarStack, SegmentedTabs, StatCard } from '../components/viz';\nimport { clientRevenue, totalContractValue } from '../lib/companyFinance';\n\nconst VENDOR_FIELDS: FieldConfig[] = [\n { name: 'name', label: 'Vendor name', type: 'text', required: true },\n { name: 'category', label: 'Category', type: 'text', required: true },\n { name: 'contactPerson', label: 'Contact person', type: 'text' },\n { name: 'email', label: 'Contact email', type: 'email' },\n { name: 'phone', label: 'Phone', type: 'text' },\n {\n name: 'status',\n label: 'Status',\n type: 'select',\n options: [\n { label: 'Active', value: 'active' },\n { label: 'Inactive', value: 'inactive' },\n { label: 'Pending', value: 'pending' },\n ],\n },\n { name: 'contractValue', label: 'Contract value (USD)', type: 'number' },\n { name: 'rating', label: 'Rating (0-5)', type: 'number' },\n];\n\nconst toInitialValues = (vendor: Vendor): FormValues => ({\n name: vendor.name,\n category: vendor.category,\n contactPerson: vendor.contactPerson,\n email: vendor.email,\n phone: vendor.phone,\n status: vendor.status,\n contractValue: vendor.contractValue,\n rating: vendor.rating,\n});\n\nconst valuesToVendor = (values: FormValues, base?: Vendor): Vendor => ({\n id: base?.id ?? crypto.randomUUID(),\n name: String(values.name ?? ''),\n category: String(values.category ?? ''),\n contactPerson: String(values.contactPerson ?? ''),\n email: String(values.email ?? ''),\n phone: String(values.phone ?? ''),\n status: (values.status as Vendor['status']) || 'pending',\n contractValue:\n typeof values.contractValue === 'number'\n ? values.contractValue\n : Number(values.contractValue) || 0,\n rating: typeof values.rating === 'number' ? values.rating : Number(values.rating) || 0,\n});\n\nconst compactMoney = (value: number): string => {\n if (value >= 1_000_000) {\n return `$${(value / 1_000_000).toFixed(1)}M`;\n }\n if (value >= 1_000) {\n return `$${Math.round(value / 1_000)}k`;\n }\n return `$${Math.round(value)}`;\n};\n\nexport function CompanyVendorManagementPagePage() {\n const { vendors, clients, addVendor, updateVendor, removeVendor } = useCrewFoundryStore();\n const navigate = useNavigate();\n const modal = useFormModal<Vendor>();\n const [search, setSearch] = useState('');\n const [filterStatus, setFilterStatus] = useState<string>('all');\n const [deleteTarget, setDeleteTarget] = useState<Vendor | null>(null);\n const { page, pageSize, offset, setPage } = usePagination({ initialPageSize: 12 });\n\n const activeClients = clients.filter((c) => c.status === 'active');\n const contractValue = totalContractValue(clients, vendors);\n const revenue = clientRevenue(clients);\n\n const filtered = vendors.filter((v) => {\n const matchSearch = `${v.name} ${v.category} ${v.contactPerson} ${v.email}`\n .toLowerCase()\n .includes(search.toLowerCase());\n const matchStatus = filterStatus === 'all' || v.status === filterStatus;\n return matchSearch && matchStatus;\n });\n const paged = filtered.slice(offset, offset + pageSize);\n\n const handleSubmit = async (values: FormValues) => {\n if (modal.context) {\n await updateVendor(modal.context.id, valuesToVendor(values, modal.context));\n } else {\n await addVendor(valuesToVendor(values));\n }\n };\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">\n <GradientText>Clients & Vendors</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">\n {clients.length} clients · {vendors.length} vendors\n </p>\n <PagePurpose className=\"mt-1\">\n Track the vendors and suppliers you depend on — contracts, contacts, and status — to\n manage external relationships in one place.\n </PagePurpose>\n </div>\n <Button size=\"sm\" onClick={() => modal.openModal()}>\n <Plus className=\"h-4 w-4 mr-1\" />\n Add Vendor\n </Button>\n </div>\n\n <SegmentedTabs\n aria-label=\"Clients and vendors\"\n variant=\"underline\"\n value=\"vendors\"\n onChange={(id) => {\n if (id === 'clients') {\n navigate('../company/client-management-page');\n }\n }}\n tabs={[\n { id: 'clients', label: 'Clients', count: clients.length },\n { id: 'vendors', label: 'Vendors', count: vendors.length },\n ]}\n />\n\n <div className=\"grid gap-4 sm:grid-cols-2 xl:grid-cols-4\">\n <StatCard label=\"Active Clients\" value={activeClients.length} />\n <StatCard label=\"Vendors\" value={vendors.length} />\n <StatCard label=\"Total Contract Value\" value={compactMoney(contractValue)} />\n <StatCard label=\"Client Revenue\" value={compactMoney(revenue)} />\n </div>\n\n <div className=\"flex flex-col gap-2 sm:flex-row sm:items-center\">\n <div className=\"relative flex-1\">\n <Search className=\"absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 text-text-secondary\" />\n <Input\n placeholder=\"Search vendors...\"\n className=\"pl-9\"\n value={search}\n onChange={(event) => {\n setSearch(event.target.value);\n setPage(1);\n }}\n />\n </div>\n <Select\n value={filterStatus}\n onValueChange={(value) => {\n setFilterStatus(value);\n setPage(1);\n }}\n >\n <SelectTrigger className=\"w-full sm:w-40\" aria-label=\"Filter by status\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"all\">All statuses</SelectItem>\n <SelectItem value=\"active\">Active</SelectItem>\n <SelectItem value=\"inactive\">Inactive</SelectItem>\n <SelectItem value=\"pending\">Pending</SelectItem>\n </SelectContent>\n </Select>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-3\">\n {vendors.length === 0 ? (\n <div className=\"col-span-full\">\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title=\"No vendors yet\"\n description=\"Add a vendor to start tracking external relationships.\"\n />\n </div>\n ) : filtered.length === 0 ? (\n <div className=\"col-span-full\">\n <IllustratedEmptyState\n illustration=\"empty-search\"\n title=\"No vendors match\"\n description=\"Try a different search term or status filter.\"\n />\n </div>\n ) : (\n paged.map((vendor) => (\n <GlassCard key={vendor.id} treatment=\"glass\">\n <CardHeader>\n <div className=\"flex items-center justify-between gap-2\">\n <div className=\"flex min-w-0 items-center gap-3\">\n <AvatarStack people={[{ name: vendor.name }]} size={36} />\n <CardTitle className=\"truncate text-base\">{vendor.name}</CardTitle>\n </div>\n <div className=\"flex items-center gap-1\">\n <Badge\n variant={vendor.status === 'active' ? 'default' : 'secondary'}\n className=\"text-[10px]\"\n >\n {formatEnumLabel(vendor.status)}\n </Badge>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n variant=\"ghost\"\n size=\"icon\"\n className=\"h-8 w-8\"\n aria-label={`More actions for ${vendor.name}`}\n >\n <MoreHorizontal className=\"h-4 w-4\" />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\">\n <DropdownMenuItem onSelect={() => modal.openModal(vendor)}>\n <Pencil className=\"mr-2 h-4 w-4\" />\n Edit\n </DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem\n className=\"text-status-error-text\"\n onSelect={() => setDeleteTarget(vendor)}\n >\n <Trash2 className=\"mr-2 h-4 w-4\" />\n Delete\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n </div>\n </CardHeader>\n <CardContent>\n <div className=\"space-y-2\">\n <Badge variant=\"outline\" className=\"text-[10px]\">\n {vendor.category}\n </Badge>\n <div className=\"grid grid-cols-2 gap-2 mt-2\">\n <div>\n <p className=\"text-xs text-text-secondary\">Contact</p>\n <p className=\"text-sm\">{vendor.contactPerson || '—'}</p>\n </div>\n <div>\n <p className=\"text-xs text-text-secondary\">Contract Value</p>\n <p className=\"text-sm font-medium tabular-nums\">\n ${vendor.contractValue.toLocaleString()}\n </p>\n </div>\n </div>\n <div className=\"flex items-center justify-between pt-2 border-t mt-2\">\n <div className=\"flex items-center gap-1 text-xs text-text-secondary\">\n <Mail className=\"h-3 w-3\" />\n {vendor.email || '—'}\n </div>\n <div className=\"flex items-center gap-1\">\n <Star className=\"h-3 w-3 text-status-warning-text\" />\n <span className=\"text-sm tabular-nums\">{vendor.rating}</span>\n </div>\n </div>\n </div>\n </CardContent>\n </GlassCard>\n ))\n )}\n </div>\n {filtered.length > pageSize && (\n <Pagination\n page={page}\n pageSize={pageSize}\n totalItems={filtered.length}\n onPageChange={setPage}\n />\n )}\n\n <FormModal\n open={modal.open}\n onOpenChange={modal.onOpenChange}\n title={modal.context ? 'Edit vendor' : 'Add vendor'}\n description=\"Track the vendor, its contract value, and primary contact.\"\n fields={VENDOR_FIELDS}\n initialValues={modal.context ? toInitialValues(modal.context) : undefined}\n submitLabel={modal.context ? 'Save changes' : 'Add vendor'}\n onSubmit={handleSubmit}\n />\n\n <AlertDialog\n open={deleteTarget !== null}\n onOpenChange={(open) => {\n if (!open) {\n setDeleteTarget(null);\n }\n }}\n >\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>Delete vendor?</AlertDialogTitle>\n <AlertDialogDescription>\n {deleteTarget\n ? `This removes “${deleteTarget.name}” from your vendor directory. This action cannot be undone.`\n : ''}\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>Cancel</AlertDialogCancel>\n <AlertDialogAction\n onClick={(event) => {\n event.preventDefault();\n if (deleteTarget) {\n void removeVendor(deleteTarget.id);\n }\n setDeleteTarget(null);\n }}\n >\n Delete\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AA8CA,IAAM,IAA+B;CACnC;EAAE,MAAM;EAAQ,OAAO;EAAe,MAAM;EAAQ,UAAU;EAAM;CACpE;EAAE,MAAM;EAAY,OAAO;EAAY,MAAM;EAAQ,UAAU;EAAM;CACrE;EAAE,MAAM;EAAiB,OAAO;EAAkB,MAAM;EAAQ;CAChE;EAAE,MAAM;EAAS,OAAO;EAAiB,MAAM;EAAS;CACxD;EAAE,MAAM;EAAS,OAAO;EAAS,MAAM;EAAQ;CAC/C;EACE,MAAM;EACN,OAAO;EACP,MAAM;EACN,SAAS;GACP;IAAE,OAAO;IAAU,OAAO;IAAU;GACpC;IAAE,OAAO;IAAY,OAAO;IAAY;GACxC;IAAE,OAAO;IAAW,OAAO;IAAW;GACvC;EACF;CACD;EAAE,MAAM;EAAiB,OAAO;EAAwB,MAAM;EAAU;CACxE;EAAE,MAAM;EAAU,OAAO;EAAgB,MAAM;EAAU;CAC1D,EAEK,KAAmB,OAAgC;CACvD,MAAM,EAAO;CACb,UAAU,EAAO;CACjB,eAAe,EAAO;CACtB,OAAO,EAAO;CACd,OAAO,EAAO;CACd,QAAQ,EAAO;CACf,eAAe,EAAO;CACtB,QAAQ,EAAO;CAChB,G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,CAAA,CACD,EAAA,CAAA;IACT,CAAA;GACV"}
|
|
1
|
+
{"version":3,"file":"CompanyVendorManagementPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/CompanyVendorManagementPagePage.tsx"],"sourcesContent":["import { useState } from 'react';\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n Badge,\n Button,\n CardContent,\n CardHeader,\n CardTitle,\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n Input,\n PagePurpose,\n Pagination,\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from '@burdenoff/fe-libs/ui';\nimport { usePagination } from '@burdenoff/fe-libs/shared/hooks';\nimport { Mail, MoreHorizontal, Pencil, Plus, Search, Star, Trash2 } from 'lucide-react';\nimport { useNavigate } from 'react-router';\nimport {\n FormModal,\n useFormModal,\n type FieldConfig,\n type FormValues,\n} from '../components/forms/FormModal';\nimport { useCrewFoundryStore, type Vendor } from '../store/crewfoundryStore';\nimport { formatEnumLabel } from '../utils/formatEnumLabel';\nimport { useFocusedRecordParam } from '../lib/useFocusedRecordParam';\nimport { AvatarStack, SegmentedTabs, StatCard } from '../components/viz';\nimport { clientRevenue, totalContractValue } from '../lib/companyFinance';\n\nconst VENDOR_FIELDS: FieldConfig[] = [\n { name: 'name', label: 'Vendor name', type: 'text', required: true },\n { name: 'category', label: 'Category', type: 'text', required: true },\n { name: 'contactPerson', label: 'Contact person', type: 'text' },\n { name: 'email', label: 'Contact email', type: 'email' },\n { name: 'phone', label: 'Phone', type: 'text' },\n {\n name: 'status',\n label: 'Status',\n type: 'select',\n options: [\n { label: 'Active', value: 'active' },\n { label: 'Inactive', value: 'inactive' },\n { label: 'Pending', value: 'pending' },\n ],\n },\n { name: 'contractValue', label: 'Contract value (USD)', type: 'number' },\n { name: 'rating', label: 'Rating (0-5)', type: 'number' },\n];\n\nconst toInitialValues = (vendor: Vendor): FormValues => ({\n name: vendor.name,\n category: vendor.category,\n contactPerson: vendor.contactPerson,\n email: vendor.email,\n phone: vendor.phone,\n status: vendor.status,\n contractValue: vendor.contractValue,\n rating: vendor.rating,\n});\n\nconst valuesToVendor = (values: FormValues, base?: Vendor): Vendor => ({\n id: base?.id ?? crypto.randomUUID(),\n name: String(values.name ?? ''),\n category: String(values.category ?? ''),\n contactPerson: String(values.contactPerson ?? ''),\n email: String(values.email ?? ''),\n phone: String(values.phone ?? ''),\n status: (values.status as Vendor['status']) || 'pending',\n contractValue:\n typeof values.contractValue === 'number'\n ? values.contractValue\n : Number(values.contractValue) || 0,\n rating: typeof values.rating === 'number' ? values.rating : Number(values.rating) || 0,\n});\n\nconst compactMoney = (value: number): string => {\n if (value >= 1_000_000) {\n return `$${(value / 1_000_000).toFixed(1)}M`;\n }\n if (value >= 1_000) {\n return `$${Math.round(value / 1_000)}k`;\n }\n return `$${Math.round(value)}`;\n};\n\nexport function CompanyVendorManagementPagePage() {\n const { vendors, clients, addVendor, updateVendor, removeVendor } = useCrewFoundryStore();\n const navigate = useNavigate();\n const modal = useFormModal<Vendor>();\n // The vendor open in the edit dialog is \"this vendor\" for the assistant.\n useFocusedRecordParam({\n records: vendors,\n activeId: modal.open ? (modal.context?.id ?? null) : null,\n onRestore: modal.openModal,\n });\n const [search, setSearch] = useState('');\n const [filterStatus, setFilterStatus] = useState<string>('all');\n const [deleteTarget, setDeleteTarget] = useState<Vendor | null>(null);\n const { page, pageSize, offset, setPage } = usePagination({ initialPageSize: 12 });\n\n const activeClients = clients.filter((c) => c.status === 'active');\n const contractValue = totalContractValue(clients, vendors);\n const revenue = clientRevenue(clients);\n\n const filtered = vendors.filter((v) => {\n const matchSearch = `${v.name} ${v.category} ${v.contactPerson} ${v.email}`\n .toLowerCase()\n .includes(search.toLowerCase());\n const matchStatus = filterStatus === 'all' || v.status === filterStatus;\n return matchSearch && matchStatus;\n });\n const paged = filtered.slice(offset, offset + pageSize);\n\n const handleSubmit = async (values: FormValues) => {\n if (modal.context) {\n await updateVendor(modal.context.id, valuesToVendor(values, modal.context));\n } else {\n await addVendor(valuesToVendor(values));\n }\n };\n\n return (\n <div className=\"space-y-6 p-6\">\n <div className=\"flex items-center justify-between\">\n <div>\n <h1 className=\"text-2xl font-semibold\">\n <GradientText>Clients & Vendors</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">\n {clients.length} clients · {vendors.length} vendors\n </p>\n <PagePurpose className=\"mt-1\">\n Track the vendors and suppliers you depend on — contracts, contacts, and status — to\n manage external relationships in one place.\n </PagePurpose>\n </div>\n <Button size=\"sm\" onClick={() => modal.openModal()}>\n <Plus className=\"h-4 w-4 mr-1\" />\n Add Vendor\n </Button>\n </div>\n\n <SegmentedTabs\n aria-label=\"Clients and vendors\"\n variant=\"underline\"\n value=\"vendors\"\n onChange={(id) => {\n if (id === 'clients') {\n navigate('../company/client-management-page');\n }\n }}\n tabs={[\n { id: 'clients', label: 'Clients', count: clients.length },\n { id: 'vendors', label: 'Vendors', count: vendors.length },\n ]}\n />\n\n <div className=\"grid gap-4 sm:grid-cols-2 xl:grid-cols-4\">\n <StatCard label=\"Active Clients\" value={activeClients.length} />\n <StatCard label=\"Vendors\" value={vendors.length} />\n <StatCard label=\"Total Contract Value\" value={compactMoney(contractValue)} />\n <StatCard label=\"Client Revenue\" value={compactMoney(revenue)} />\n </div>\n\n <div className=\"flex flex-col gap-2 sm:flex-row sm:items-center\">\n <div className=\"relative flex-1\">\n <Search className=\"absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 text-text-secondary\" />\n <Input\n placeholder=\"Search vendors...\"\n className=\"pl-9\"\n value={search}\n onChange={(event) => {\n setSearch(event.target.value);\n setPage(1);\n }}\n />\n </div>\n <Select\n value={filterStatus}\n onValueChange={(value) => {\n setFilterStatus(value);\n setPage(1);\n }}\n >\n <SelectTrigger className=\"w-full sm:w-40\" aria-label=\"Filter by status\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"all\">All statuses</SelectItem>\n <SelectItem value=\"active\">Active</SelectItem>\n <SelectItem value=\"inactive\">Inactive</SelectItem>\n <SelectItem value=\"pending\">Pending</SelectItem>\n </SelectContent>\n </Select>\n </div>\n\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-3\">\n {vendors.length === 0 ? (\n <div className=\"col-span-full\">\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title=\"No vendors yet\"\n description=\"Add a vendor to start tracking external relationships.\"\n />\n </div>\n ) : filtered.length === 0 ? (\n <div className=\"col-span-full\">\n <IllustratedEmptyState\n illustration=\"empty-search\"\n title=\"No vendors match\"\n description=\"Try a different search term or status filter.\"\n />\n </div>\n ) : (\n paged.map((vendor) => (\n <GlassCard key={vendor.id} treatment=\"glass\">\n <CardHeader>\n <div className=\"flex items-center justify-between gap-2\">\n <div className=\"flex min-w-0 items-center gap-3\">\n <AvatarStack people={[{ name: vendor.name }]} size={36} />\n <CardTitle className=\"truncate text-base\">{vendor.name}</CardTitle>\n </div>\n <div className=\"flex items-center gap-1\">\n <Badge\n variant={vendor.status === 'active' ? 'default' : 'secondary'}\n className=\"text-[10px]\"\n >\n {formatEnumLabel(vendor.status)}\n </Badge>\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n variant=\"ghost\"\n size=\"icon\"\n className=\"h-8 w-8\"\n aria-label={`More actions for ${vendor.name}`}\n >\n <MoreHorizontal className=\"h-4 w-4\" />\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\">\n <DropdownMenuItem onSelect={() => modal.openModal(vendor)}>\n <Pencil className=\"mr-2 h-4 w-4\" />\n Edit\n </DropdownMenuItem>\n <DropdownMenuSeparator />\n <DropdownMenuItem\n className=\"text-status-error-text\"\n onSelect={() => setDeleteTarget(vendor)}\n >\n <Trash2 className=\"mr-2 h-4 w-4\" />\n Delete\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n </div>\n </div>\n </CardHeader>\n <CardContent>\n <div className=\"space-y-2\">\n <Badge variant=\"outline\" className=\"text-[10px]\">\n {vendor.category}\n </Badge>\n <div className=\"grid grid-cols-2 gap-2 mt-2\">\n <div>\n <p className=\"text-xs text-text-secondary\">Contact</p>\n <p className=\"text-sm\">{vendor.contactPerson || '—'}</p>\n </div>\n <div>\n <p className=\"text-xs text-text-secondary\">Contract Value</p>\n <p className=\"text-sm font-medium tabular-nums\">\n ${vendor.contractValue.toLocaleString()}\n </p>\n </div>\n </div>\n <div className=\"flex items-center justify-between pt-2 border-t mt-2\">\n <div className=\"flex items-center gap-1 text-xs text-text-secondary\">\n <Mail className=\"h-3 w-3\" />\n {vendor.email || '—'}\n </div>\n <div className=\"flex items-center gap-1\">\n <Star className=\"h-3 w-3 text-status-warning-text\" />\n <span className=\"text-sm tabular-nums\">{vendor.rating}</span>\n </div>\n </div>\n </div>\n </CardContent>\n </GlassCard>\n ))\n )}\n </div>\n {filtered.length > pageSize && (\n <Pagination\n page={page}\n pageSize={pageSize}\n totalItems={filtered.length}\n onPageChange={setPage}\n />\n )}\n\n <FormModal\n open={modal.open}\n onOpenChange={modal.onOpenChange}\n title={modal.context ? 'Edit vendor' : 'Add vendor'}\n description=\"Track the vendor, its contract value, and primary contact.\"\n fields={VENDOR_FIELDS}\n initialValues={modal.context ? toInitialValues(modal.context) : undefined}\n submitLabel={modal.context ? 'Save changes' : 'Add vendor'}\n onSubmit={handleSubmit}\n />\n\n <AlertDialog\n open={deleteTarget !== null}\n onOpenChange={(open) => {\n if (!open) {\n setDeleteTarget(null);\n }\n }}\n >\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>Delete vendor?</AlertDialogTitle>\n <AlertDialogDescription>\n {deleteTarget\n ? `This removes “${deleteTarget.name}” from your vendor directory. This action cannot be undone.`\n : ''}\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>Cancel</AlertDialogCancel>\n <AlertDialogAction\n onClick={(event) => {\n event.preventDefault();\n if (deleteTarget) {\n void removeVendor(deleteTarget.id);\n }\n setDeleteTarget(null);\n }}\n >\n Delete\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA+CA,IAAM,IAA+B;CACnC;EAAE,MAAM;EAAQ,OAAO;EAAe,MAAM;EAAQ,UAAU;EAAM;CACpE;EAAE,MAAM;EAAY,OAAO;EAAY,MAAM;EAAQ,UAAU;EAAM;CACrE;EAAE,MAAM;EAAiB,OAAO;EAAkB,MAAM;EAAQ;CAChE;EAAE,MAAM;EAAS,OAAO;EAAiB,MAAM;EAAS;CACxD;EAAE,MAAM;EAAS,OAAO;EAAS,MAAM;EAAQ;CAC/C;EACE,MAAM;EACN,OAAO;EACP,MAAM;EACN,SAAS;GACP;IAAE,OAAO;IAAU,OAAO;IAAU;GACpC;IAAE,OAAO;IAAY,OAAO;IAAY;GACxC;IAAE,OAAO;IAAW,OAAO;IAAW;GACvC;EACF;CACD;EAAE,MAAM;EAAiB,OAAO;EAAwB,MAAM;EAAU;CACxE;EAAE,MAAM;EAAU,OAAO;EAAgB,MAAM;EAAU;CAC1D,EAEK,KAAmB,OAAgC;CACvD,MAAM,EAAO;CACb,UAAU,EAAO;CACjB,eAAe,EAAO;CACtB,OAAO,EAAO;CACd,OAAO,EAAO;CACd,QAAQ,EAAO;CACf,eAAe,EAAO;CACtB,QAAQ,EAAO;CAChB,GAEK,KAAkB,GAAoB,OAA2B;CACrE,IAAI,GAAM,MAAM,OAAO,YAAY;CACnC,MAAM,OAAO,EAAO,QAAQ,GAAG;CAC/B,UAAU,OAAO,EAAO,YAAY,GAAG;CACvC,eAAe,OAAO,EAAO,iBAAiB,GAAG;CACjD,OAAO,OAAO,EAAO,SAAS,GAAG;CACjC,OAAO,OAAO,EAAO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../../../src/crewfoundry/pages/HiringCandidatesPagePage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HiringCandidatesPagePage.d.ts","sourceRoot":"","sources":["../../../src/crewfoundry/pages/HiringCandidatesPagePage.tsx"],"names":[],"mappings":"AAwMA,wBAAgB,wBAAwB,gCA4QvC"}
|