@burdenoff/microfe-crewfoundry 2026.704.2 → 2026.704.4
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/pages/AdminAdminPagePage.js +76 -75
- package/dist/crewfoundry/pages/AdminAdminPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js +118 -117
- package/dist/crewfoundry/pages/AnalyticsFinancialAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.js +115 -114
- package/dist/crewfoundry/pages/AnalyticsHiringAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js +105 -104
- package/dist/crewfoundry/pages/CommunicationsAnnouncementsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CommunicationsTeamsPagePage.js +52 -51
- package/dist/crewfoundry/pages/CommunicationsTeamsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js +94 -93
- package/dist/crewfoundry/pages/CompanyClientManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyCompanyProfilePagePage.js +97 -96
- package/dist/crewfoundry/pages/CompanyCompanyProfilePagePage.js.map +1 -1
- package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js +68 -67
- package/dist/crewfoundry/pages/CompanyVendorManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardAnalyticsPagePage.js +96 -95
- package/dist/crewfoundry/pages/DashboardAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardDashboardPagePage.js +153 -152
- package/dist/crewfoundry/pages/DashboardDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/DashboardEnhancedDashboardPagePage.js +107 -106
- package/dist/crewfoundry/pages/DashboardEnhancedDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringApplicationsPagePage.js +77 -76
- package/dist/crewfoundry/pages/HiringApplicationsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringCandidatesPagePage.js +80 -79
- package/dist/crewfoundry/pages/HiringCandidatesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringCreateJobPagePage.js +1 -1
- package/dist/crewfoundry/pages/HiringCreateJobPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringInterviewsPagePage.js +102 -101
- package/dist/crewfoundry/pages/HiringInterviewsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js +126 -125
- package/dist/crewfoundry/pages/HiringJobDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HiringJobsPagePage.js +64 -63
- package/dist/crewfoundry/pages/HiringJobsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrDepartmentsPagePage.js +96 -95
- package/dist/crewfoundry/pages/HrDepartmentsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js +127 -126
- package/dist/crewfoundry/pages/HrLeaveManagementPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrPayrollPagePage.js +118 -117
- package/dist/crewfoundry/pages/HrPayrollPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js +123 -122
- package/dist/crewfoundry/pages/HrTimeTrackingPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js +77 -76
- package/dist/crewfoundry/pages/LearningCourseDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js +49 -48
- package/dist/crewfoundry/pages/LearningCourseLearningPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningCoursesPagePage.js +62 -61
- package/dist/crewfoundry/pages/LearningCoursesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningPagePage.js +72 -71
- package/dist/crewfoundry/pages/LearningLearningPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js +70 -69
- package/dist/crewfoundry/pages/LearningLearningPathDetailPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js +57 -56
- package/dist/crewfoundry/pages/LearningLearningPathsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.js +58 -57
- package/dist/crewfoundry/pages/MarketplaceEarningsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.js +122 -121
- package/dist/crewfoundry/pages/MarketplaceFreelancerProfilePageEnhancedPage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js +70 -69
- package/dist/crewfoundry/pages/MarketplaceMarketplacePagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.js +41 -40
- package/dist/crewfoundry/pages/MarketplaceMarketplaceServicesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.js +65 -64
- package/dist/crewfoundry/pages/MarketplaceMyServicesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/MarketplaceProjectDetailsPagePage.js +75 -74
- package/dist/crewfoundry/pages/MarketplaceProjectDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js +60 -59
- package/dist/crewfoundry/pages/PaymentsInvoicesPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.js +53 -52
- package/dist/crewfoundry/pages/PaymentsPaymentDashboardPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.js +37 -36
- package/dist/crewfoundry/pages/PaymentsPaymentMethodsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/ProjectsProjectDetailsPagePage.js +126 -125
- package/dist/crewfoundry/pages/ProjectsProjectDetailsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js +62 -61
- package/dist/crewfoundry/pages/ProjectsProjectsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamAnalyticsPagePage.js +50 -49
- package/dist/crewfoundry/pages/TeamsTeamAnalyticsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamDetailPagePage.js +72 -71
- package/dist/crewfoundry/pages/TeamsTeamDetailPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamDirectoryPagePage.js +40 -39
- package/dist/crewfoundry/pages/TeamsTeamDirectoryPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamSettingsPagePage.js +130 -129
- package/dist/crewfoundry/pages/TeamsTeamSettingsPagePage.js.map +1 -1
- package/dist/crewfoundry/pages/TeamsTeamsPagePage.js +60 -59
- package/dist/crewfoundry/pages/TeamsTeamsPagePage.js.map +1 -1
- package/dist/crewfoundry/store/crewfoundryStore.js +177 -146
- package/dist/crewfoundry/store/crewfoundryStore.js.map +1 -1
- package/dist/crewfoundry/utils/formatEnumLabel.js +8 -0
- package/dist/crewfoundry/utils/formatEnumLabel.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { useCrewFoundryStore as e } from "../store/crewfoundryStore.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { formatEnumLabel as t } from "../utils/formatEnumLabel.js";
|
|
3
|
+
import { FormModal as n, useFormModal as r } from "../components/forms/FormModal.js";
|
|
4
|
+
import { Eye as i, Pencil as a, Plus as o, Star as s, Trash2 as c } from "lucide-react";
|
|
5
|
+
import { useNavigate as l } from "react-router-dom";
|
|
6
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
7
|
+
import { AlertDialog as f, AlertDialogAction as p, AlertDialogCancel as m, AlertDialogContent as h, AlertDialogDescription as g, AlertDialogFooter as _, AlertDialogHeader as v, AlertDialogTitle as y, AlertDialogTrigger as b, Badge as x, Button as S, CardContent as C, CardHeader as w, CardTitle as T, GlassCard as E, GradientText as D, IllustratedEmptyState as O, PagePurpose as k, Pagination as A } from "@burdenoff/fe-libs/ui";
|
|
8
|
+
import { usePagination as j } from "@burdenoff/fe-libs/shared/hooks";
|
|
8
9
|
//#region src/crewfoundry/pages/MarketplaceMyServicesPagePage.tsx
|
|
9
|
-
var
|
|
10
|
+
var M = [
|
|
10
11
|
{
|
|
11
12
|
name: "title",
|
|
12
13
|
label: "Service title",
|
|
@@ -91,7 +92,7 @@ var j = [
|
|
|
91
92
|
type: "tags",
|
|
92
93
|
colSpan: 2
|
|
93
94
|
}
|
|
94
|
-
],
|
|
95
|
+
], N = (e) => ({
|
|
95
96
|
title: e.title,
|
|
96
97
|
provider: e.provider,
|
|
97
98
|
category: e.category,
|
|
@@ -101,7 +102,7 @@ var j = [
|
|
|
101
102
|
status: e.status,
|
|
102
103
|
description: e.description,
|
|
103
104
|
skills: e.skills
|
|
104
|
-
}),
|
|
105
|
+
}), P = (e, t) => ({
|
|
105
106
|
id: t?.id ?? crypto.randomUUID(),
|
|
106
107
|
title: String(e.title ?? ""),
|
|
107
108
|
provider: String(e.provider ?? ""),
|
|
@@ -115,62 +116,62 @@ var j = [
|
|
|
115
116
|
status: e.status || "active",
|
|
116
117
|
skills: Array.isArray(e.skills) ? e.skills : []
|
|
117
118
|
});
|
|
118
|
-
function
|
|
119
|
-
let
|
|
120
|
-
return /* @__PURE__ */
|
|
119
|
+
function F() {
|
|
120
|
+
let F = l(), { marketplaceServices: I, addMarketplaceService: L, updateMarketplaceService: R, removeMarketplaceService: z } = e(), B = r(), { page: V, pageSize: H, offset: U, setPage: W } = j({ initialPageSize: 9 }), G = I.slice(U, U + H);
|
|
121
|
+
return /* @__PURE__ */ d("div", {
|
|
121
122
|
className: "space-y-6 p-6",
|
|
122
123
|
children: [
|
|
123
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ d("div", {
|
|
124
125
|
className: "flex items-center justify-between",
|
|
125
|
-
children: [/* @__PURE__ */
|
|
126
|
-
/* @__PURE__ */
|
|
126
|
+
children: [/* @__PURE__ */ d("div", { children: [
|
|
127
|
+
/* @__PURE__ */ u("h1", {
|
|
127
128
|
className: "text-2xl font-semibold",
|
|
128
|
-
children: /* @__PURE__ */
|
|
129
|
+
children: /* @__PURE__ */ u(D, { children: "My Services" })
|
|
129
130
|
}),
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ u("p", {
|
|
131
132
|
className: "text-sm text-text-secondary",
|
|
132
133
|
children: "Manage your listed services"
|
|
133
134
|
}),
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
+
/* @__PURE__ */ u(k, {
|
|
135
136
|
className: "mt-1",
|
|
136
137
|
children: "Manage the services you offer to clients — list, edit, and showcase your offerings to win more work on the marketplace."
|
|
137
138
|
})
|
|
138
|
-
] }), /* @__PURE__ */
|
|
139
|
+
] }), /* @__PURE__ */ d(S, {
|
|
139
140
|
size: "sm",
|
|
140
|
-
onClick: () =>
|
|
141
|
-
children: [/* @__PURE__ */
|
|
141
|
+
onClick: () => B.openModal(),
|
|
142
|
+
children: [/* @__PURE__ */ u(o, { className: "h-4 w-4 mr-1" }), "Create Service"]
|
|
142
143
|
})]
|
|
143
144
|
}),
|
|
144
|
-
/* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ u("div", {
|
|
145
146
|
className: "grid gap-4 md:grid-cols-2 lg:grid-cols-3",
|
|
146
|
-
children:
|
|
147
|
+
children: I.length === 0 ? /* @__PURE__ */ u("div", {
|
|
147
148
|
className: "col-span-full",
|
|
148
|
-
children: /* @__PURE__ */
|
|
149
|
+
children: /* @__PURE__ */ u(O, {
|
|
149
150
|
illustration: "empty-generic",
|
|
150
151
|
title: "No services listed",
|
|
151
152
|
description: "List a service to start winning work on the marketplace."
|
|
152
153
|
})
|
|
153
|
-
}) :
|
|
154
|
-
treatment:
|
|
155
|
-
glow:
|
|
156
|
-
children: [/* @__PURE__ */
|
|
154
|
+
}) : G.map((e, n) => /* @__PURE__ */ d(E, {
|
|
155
|
+
treatment: n === 0 ? "glass" : "plain",
|
|
156
|
+
glow: n === 0,
|
|
157
|
+
children: [/* @__PURE__ */ u(w, { children: /* @__PURE__ */ d("div", {
|
|
157
158
|
className: "flex items-center justify-between",
|
|
158
|
-
children: [/* @__PURE__ */
|
|
159
|
+
children: [/* @__PURE__ */ u(T, {
|
|
159
160
|
className: "text-base",
|
|
160
161
|
children: e.title
|
|
161
|
-
}), /* @__PURE__ */
|
|
162
|
+
}), /* @__PURE__ */ u(x, {
|
|
162
163
|
variant: e.status === "active" ? "default" : "secondary",
|
|
163
164
|
className: "text-[10px]",
|
|
164
|
-
children: e.status
|
|
165
|
+
children: t(e.status)
|
|
165
166
|
})]
|
|
166
|
-
}) }), /* @__PURE__ */
|
|
167
|
-
/* @__PURE__ */
|
|
167
|
+
}) }), /* @__PURE__ */ d(C, { children: [
|
|
168
|
+
/* @__PURE__ */ u("p", {
|
|
168
169
|
className: "text-sm text-text-secondary mb-3",
|
|
169
170
|
children: e.description
|
|
170
171
|
}),
|
|
171
|
-
/* @__PURE__ */
|
|
172
|
+
/* @__PURE__ */ d("div", {
|
|
172
173
|
className: "flex items-center justify-between text-sm",
|
|
173
|
-
children: [/* @__PURE__ */
|
|
174
|
+
children: [/* @__PURE__ */ d("span", {
|
|
174
175
|
className: "font-bold",
|
|
175
176
|
children: [
|
|
176
177
|
"$",
|
|
@@ -178,10 +179,10 @@ function P() {
|
|
|
178
179
|
"/",
|
|
179
180
|
e.priceType
|
|
180
181
|
]
|
|
181
|
-
}), /* @__PURE__ */
|
|
182
|
+
}), /* @__PURE__ */ d("span", {
|
|
182
183
|
className: "flex items-center gap-1",
|
|
183
184
|
children: [
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
+
/* @__PURE__ */ u(s, { className: "h-3 w-3 text-status-warning-text" }),
|
|
185
186
|
e.rating,
|
|
186
187
|
" (",
|
|
187
188
|
e.reviews,
|
|
@@ -189,36 +190,36 @@ function P() {
|
|
|
189
190
|
]
|
|
190
191
|
})]
|
|
191
192
|
}),
|
|
192
|
-
/* @__PURE__ */
|
|
193
|
+
/* @__PURE__ */ d("div", {
|
|
193
194
|
className: "flex gap-2 mt-3",
|
|
194
195
|
children: [
|
|
195
|
-
/* @__PURE__ */
|
|
196
|
+
/* @__PURE__ */ d(S, {
|
|
196
197
|
variant: "outline",
|
|
197
198
|
size: "sm",
|
|
198
199
|
className: "flex-1",
|
|
199
|
-
onClick: () =>
|
|
200
|
-
children: [/* @__PURE__ */
|
|
200
|
+
onClick: () => B.openModal(e),
|
|
201
|
+
children: [/* @__PURE__ */ u(a, { className: "h-3.5 w-3.5 mr-1" }), "Edit"]
|
|
201
202
|
}),
|
|
202
|
-
/* @__PURE__ */
|
|
203
|
+
/* @__PURE__ */ d(S, {
|
|
203
204
|
size: "sm",
|
|
204
205
|
className: "flex-1",
|
|
205
|
-
onClick: () =>
|
|
206
|
-
children: [/* @__PURE__ */
|
|
206
|
+
onClick: () => F(`../../marketplace/service-details-page?id=${e.id}`),
|
|
207
|
+
children: [/* @__PURE__ */ u(i, { className: "h-3.5 w-3.5 mr-1" }), "View"]
|
|
207
208
|
}),
|
|
208
|
-
/* @__PURE__ */
|
|
209
|
+
/* @__PURE__ */ d(f, { children: [/* @__PURE__ */ u(b, {
|
|
209
210
|
asChild: !0,
|
|
210
|
-
children: /* @__PURE__ */
|
|
211
|
+
children: /* @__PURE__ */ u(S, {
|
|
211
212
|
variant: "ghost",
|
|
212
213
|
size: "icon",
|
|
213
214
|
"aria-label": `Delete ${e.title}`,
|
|
214
|
-
children: /* @__PURE__ */
|
|
215
|
+
children: /* @__PURE__ */ u(c, { className: "h-4 w-4 text-status-error-text" })
|
|
215
216
|
})
|
|
216
|
-
}), /* @__PURE__ */
|
|
217
|
+
}), /* @__PURE__ */ d(h, { children: [/* @__PURE__ */ d(v, { children: [/* @__PURE__ */ u(y, { children: "Delete service?" }), /* @__PURE__ */ d(g, { children: [
|
|
217
218
|
"This removes “",
|
|
218
219
|
e.title,
|
|
219
220
|
"” from your marketplace listings. This action cannot be undone."
|
|
220
|
-
] })] }), /* @__PURE__ */
|
|
221
|
-
onClick: () => void
|
|
221
|
+
] })] }), /* @__PURE__ */ d(_, { children: [/* @__PURE__ */ u(m, { children: "Cancel" }), /* @__PURE__ */ u(p, {
|
|
222
|
+
onClick: () => void z(e.id),
|
|
222
223
|
children: "Delete"
|
|
223
224
|
})] })] })] })
|
|
224
225
|
]
|
|
@@ -226,28 +227,28 @@ function P() {
|
|
|
226
227
|
] })]
|
|
227
228
|
}, e.id))
|
|
228
229
|
}),
|
|
229
|
-
|
|
230
|
-
page:
|
|
231
|
-
pageSize:
|
|
232
|
-
totalItems:
|
|
233
|
-
onPageChange:
|
|
230
|
+
I.length > 0 ? /* @__PURE__ */ u(A, {
|
|
231
|
+
page: V,
|
|
232
|
+
pageSize: H,
|
|
233
|
+
totalItems: I.length,
|
|
234
|
+
onPageChange: W
|
|
234
235
|
}) : null,
|
|
235
|
-
/* @__PURE__ */
|
|
236
|
-
open:
|
|
237
|
-
onOpenChange:
|
|
238
|
-
title:
|
|
236
|
+
/* @__PURE__ */ u(n, {
|
|
237
|
+
open: B.open,
|
|
238
|
+
onOpenChange: B.onOpenChange,
|
|
239
|
+
title: B.context ? "Edit service" : "Create service",
|
|
239
240
|
description: "Describe the service you offer clients on the marketplace.",
|
|
240
|
-
fields:
|
|
241
|
-
initialValues:
|
|
242
|
-
submitLabel:
|
|
241
|
+
fields: M,
|
|
242
|
+
initialValues: B.context ? N(B.context) : void 0,
|
|
243
|
+
submitLabel: B.context ? "Save changes" : "Create service",
|
|
243
244
|
onSubmit: async (e) => {
|
|
244
|
-
|
|
245
|
+
B.context ? await R(B.context.id, P(e, B.context)) : await L(P(e));
|
|
245
246
|
}
|
|
246
247
|
})
|
|
247
248
|
]
|
|
248
249
|
});
|
|
249
250
|
}
|
|
250
251
|
//#endregion
|
|
251
|
-
export {
|
|
252
|
+
export { F as MarketplaceMyServicesPagePage };
|
|
252
253
|
|
|
253
254
|
//# sourceMappingURL=MarketplaceMyServicesPagePage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarketplaceMyServicesPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/MarketplaceMyServicesPagePage.tsx"],"sourcesContent":["import { useNavigate } from 'react-router-dom';\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n AlertDialogTrigger,\n Badge,\n Button,\n CardContent,\n CardHeader,\n CardTitle,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n PagePurpose,\n Pagination,\n} from '@burdenoff/fe-libs/ui';\nimport { usePagination } from '@burdenoff/fe-libs/shared/hooks';\nimport { Eye, Pencil, Plus, Star, Trash2 } from 'lucide-react';\nimport {\n FormModal,\n useFormModal,\n type FieldConfig,\n type FormValues,\n} from '../components/forms/FormModal';\nimport { useCrewFoundryStore, type MarketplaceService } from '../store/crewfoundryStore';\n\nconst SERVICE_FIELDS: FieldConfig[] = [\n { name: 'title', label: 'Service title', type: 'text', required: true, colSpan: 2 },\n { name: 'provider', label: 'Provider', type: 'text', required: true },\n { name: 'category', label: 'Category', type: 'text', required: true },\n { name: 'price', label: 'Price', type: 'number', required: true },\n {\n name: 'priceType',\n label: 'Price type',\n type: 'select',\n required: true,\n options: [\n { label: 'Hourly', value: 'hourly' },\n { label: 'Fixed', value: 'fixed' },\n { label: 'Monthly', value: 'monthly' },\n ],\n },\n {\n name: 'deliveryTime',\n label: 'Delivery time',\n type: 'text',\n required: true,\n placeholder: 'e.g. 3 days',\n },\n {\n name: 'status',\n label: 'Status',\n type: 'select',\n options: [\n { label: 'Active', value: 'active' },\n { label: 'Paused', value: 'paused' },\n { label: 'Pending', value: 'pending' },\n ],\n },\n { name: 'description', label: 'Description', type: 'textarea', required: true, colSpan: 2 },\n { name: 'skills', label: 'Skills', type: 'tags', colSpan: 2 },\n];\n\nconst toInitialValues = (service: MarketplaceService): FormValues => ({\n title: service.title,\n provider: service.provider,\n category: service.category,\n price: service.price,\n priceType: service.priceType,\n deliveryTime: service.deliveryTime,\n status: service.status,\n description: service.description,\n skills: service.skills,\n});\n\nconst valuesToService = (values: FormValues, base?: MarketplaceService): MarketplaceService => ({\n id: base?.id ?? crypto.randomUUID(),\n title: String(values.title ?? ''),\n provider: String(values.provider ?? ''),\n category: String(values.category ?? ''),\n price: typeof values.price === 'number' ? values.price : Number(values.price) || 0,\n priceType: (values.priceType as MarketplaceService['priceType']) || 'hourly',\n rating: base?.rating ?? 0,\n reviews: base?.reviews ?? 0,\n description: String(values.description ?? ''),\n deliveryTime: String(values.deliveryTime ?? ''),\n status: (values.status as MarketplaceService['status']) || 'active',\n skills: Array.isArray(values.skills) ? values.skills : [],\n});\n\nexport function MarketplaceMyServicesPagePage() {\n const navigate = useNavigate();\n const {\n marketplaceServices,\n addMarketplaceService,\n updateMarketplaceService,\n removeMarketplaceService,\n } = useCrewFoundryStore();\n const modal = useFormModal<MarketplaceService>();\n const { page, pageSize, offset, setPage } = usePagination({ initialPageSize: 9 });\n // Every marketplace service in this workspace is managed here as an owned listing.\n const myServices = marketplaceServices.slice(offset, offset + pageSize);\n\n const handleSubmit = async (values: FormValues) => {\n if (modal.context) {\n await updateMarketplaceService(modal.context.id, valuesToService(values, modal.context));\n } else {\n await addMarketplaceService(valuesToService(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>My Services</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">Manage your listed services</p>\n <PagePurpose className=\"mt-1\">\n Manage the services you offer to clients — list, edit, and showcase your offerings to\n win more work on the marketplace.\n </PagePurpose>\n </div>\n <Button size=\"sm\" onClick={() => modal.openModal()}>\n <Plus className=\"h-4 w-4 mr-1\" />\n Create Service\n </Button>\n </div>\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-3\">\n {marketplaceServices.length === 0 ? (\n <div className=\"col-span-full\">\n <IllustratedEmptyState\n illustration=\"empty-generic\"\n title=\"No services listed\"\n description=\"List a service to start winning work on the marketplace.\"\n />\n </div>\n ) : (\n myServices.map((svc, _idx) => (\n <GlassCard key={svc.id} treatment={_idx === 0 ? 'glass' : 'plain'} glow={_idx === 0}>\n <CardHeader>\n <div className=\"flex items-center justify-between\">\n <CardTitle className=\"text-base\">{svc.title}</CardTitle>\n <Badge\n variant={svc.status === 'active' ? 'default' : 'secondary'}\n className=\"text-[10px]\"\n >\n {svc.status}\n </Badge>\n </div>\n </CardHeader>\n <CardContent>\n <p className=\"text-sm text-text-secondary mb-3\">{svc.description}</p>\n <div className=\"flex items-center justify-between text-sm\">\n <span className=\"font-bold\">\n ${svc.price}/{svc.priceType}\n </span>\n <span className=\"flex items-center gap-1\">\n <Star className=\"h-3 w-3 text-status-warning-text\" />\n {svc.rating} ({svc.reviews})\n </span>\n </div>\n <div className=\"flex gap-2 mt-3\">\n <Button\n variant=\"outline\"\n size=\"sm\"\n className=\"flex-1\"\n onClick={() => modal.openModal(svc)}\n >\n <Pencil className=\"h-3.5 w-3.5 mr-1\" />\n Edit\n </Button>\n <Button\n size=\"sm\"\n className=\"flex-1\"\n onClick={() => navigate(`../../marketplace/service-details-page?id=${svc.id}`)}\n >\n <Eye className=\"h-3.5 w-3.5 mr-1\" />\n View\n </Button>\n <AlertDialog>\n <AlertDialogTrigger asChild>\n <Button variant=\"ghost\" size=\"icon\" aria-label={`Delete ${svc.title}`}>\n <Trash2 className=\"h-4 w-4 text-status-error-text\" />\n </Button>\n </AlertDialogTrigger>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>Delete service?</AlertDialogTitle>\n <AlertDialogDescription>\n This removes “{svc.title}” from your marketplace listings. This action\n cannot be undone.\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>Cancel</AlertDialogCancel>\n <AlertDialogAction onClick={() => void removeMarketplaceService(svc.id)}>\n Delete\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n </div>\n </CardContent>\n </GlassCard>\n ))\n )}\n </div>\n {marketplaceServices.length > 0 ? (\n <Pagination\n page={page}\n pageSize={pageSize}\n totalItems={marketplaceServices.length}\n onPageChange={setPage}\n />\n ) : null}\n\n <FormModal\n open={modal.open}\n onOpenChange={modal.onOpenChange}\n title={modal.context ? 'Edit service' : 'Create service'}\n description=\"Describe the service you offer clients on the marketplace.\"\n fields={SERVICE_FIELDS}\n initialValues={modal.context ? toInitialValues(modal.context) : undefined}\n submitLabel={modal.context ? 'Save changes' : 'Create service'}\n onSubmit={handleSubmit}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAgCA,IAAM,IAAgC;CACpC;EAAE,MAAM;EAAS,OAAO;EAAiB,MAAM;EAAQ,UAAU;EAAM,SAAS;EAAG;CACnF;EAAE,MAAM;EAAY,OAAO;EAAY,MAAM;EAAQ,UAAU;EAAM;CACrE;EAAE,MAAM;EAAY,OAAO;EAAY,MAAM;EAAQ,UAAU;EAAM;CACrE;EAAE,MAAM;EAAS,OAAO;EAAS,MAAM;EAAU,UAAU;EAAM;CACjE;EACE,MAAM;EACN,OAAO;EACP,MAAM;EACN,UAAU;EACV,SAAS;GACP;IAAE,OAAO;IAAU,OAAO;IAAU;GACpC;IAAE,OAAO;IAAS,OAAO;IAAS;GAClC;IAAE,OAAO;IAAW,OAAO;IAAW;GACvC;EACF;CACD;EACE,MAAM;EACN,OAAO;EACP,MAAM;EACN,UAAU;EACV,aAAa;EACd;CACD;EACE,MAAM;EACN,OAAO;EACP,MAAM;EACN,SAAS;GACP;IAAE,OAAO;IAAU,OAAO;IAAU;GACpC;IAAE,OAAO;IAAU,OAAO;IAAU;GACpC;IAAE,OAAO;IAAW,OAAO;IAAW;GACvC;EACF;CACD;EAA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,IAAI,EAAgB,GAAQ,EAAM,QAAQ,CAAC,GAExF,MAAM,EAAsB,EAAgB,EAAO,CAAC;;IAwHlD,CAAA;GACE"}
|
|
1
|
+
{"version":3,"file":"MarketplaceMyServicesPagePage.js","names":[],"sources":["../../../src/crewfoundry/pages/MarketplaceMyServicesPagePage.tsx"],"sourcesContent":["import { useNavigate } from 'react-router-dom';\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n AlertDialogTrigger,\n Badge,\n Button,\n CardContent,\n CardHeader,\n CardTitle,\n GlassCard,\n GradientText,\n IllustratedEmptyState,\n PagePurpose,\n Pagination,\n} from '@burdenoff/fe-libs/ui';\nimport { usePagination } from '@burdenoff/fe-libs/shared/hooks';\nimport { Eye, Pencil, Plus, Star, Trash2 } from 'lucide-react';\nimport {\n FormModal,\n useFormModal,\n type FieldConfig,\n type FormValues,\n} from '../components/forms/FormModal';\nimport { useCrewFoundryStore, type MarketplaceService } from '../store/crewfoundryStore';\nimport { formatEnumLabel } from '../utils/formatEnumLabel';\n\nconst SERVICE_FIELDS: FieldConfig[] = [\n { name: 'title', label: 'Service title', type: 'text', required: true, colSpan: 2 },\n { name: 'provider', label: 'Provider', type: 'text', required: true },\n { name: 'category', label: 'Category', type: 'text', required: true },\n { name: 'price', label: 'Price', type: 'number', required: true },\n {\n name: 'priceType',\n label: 'Price type',\n type: 'select',\n required: true,\n options: [\n { label: 'Hourly', value: 'hourly' },\n { label: 'Fixed', value: 'fixed' },\n { label: 'Monthly', value: 'monthly' },\n ],\n },\n {\n name: 'deliveryTime',\n label: 'Delivery time',\n type: 'text',\n required: true,\n placeholder: 'e.g. 3 days',\n },\n {\n name: 'status',\n label: 'Status',\n type: 'select',\n options: [\n { label: 'Active', value: 'active' },\n { label: 'Paused', value: 'paused' },\n { label: 'Pending', value: 'pending' },\n ],\n },\n { name: 'description', label: 'Description', type: 'textarea', required: true, colSpan: 2 },\n { name: 'skills', label: 'Skills', type: 'tags', colSpan: 2 },\n];\n\nconst toInitialValues = (service: MarketplaceService): FormValues => ({\n title: service.title,\n provider: service.provider,\n category: service.category,\n price: service.price,\n priceType: service.priceType,\n deliveryTime: service.deliveryTime,\n status: service.status,\n description: service.description,\n skills: service.skills,\n});\n\nconst valuesToService = (values: FormValues, base?: MarketplaceService): MarketplaceService => ({\n id: base?.id ?? crypto.randomUUID(),\n title: String(values.title ?? ''),\n provider: String(values.provider ?? ''),\n category: String(values.category ?? ''),\n price: typeof values.price === 'number' ? values.price : Number(values.price) || 0,\n priceType: (values.priceType as MarketplaceService['priceType']) || 'hourly',\n rating: base?.rating ?? 0,\n reviews: base?.reviews ?? 0,\n description: String(values.description ?? ''),\n deliveryTime: String(values.deliveryTime ?? ''),\n status: (values.status as MarketplaceService['status']) || 'active',\n skills: Array.isArray(values.skills) ? values.skills : [],\n});\n\nexport function MarketplaceMyServicesPagePage() {\n const navigate = useNavigate();\n const {\n marketplaceServices,\n addMarketplaceService,\n updateMarketplaceService,\n removeMarketplaceService,\n } = useCrewFoundryStore();\n const modal = useFormModal<MarketplaceService>();\n const { page, pageSize, offset, setPage } = usePagination({ initialPageSize: 9 });\n // Every marketplace service in this workspace is managed here as an owned listing.\n const myServices = marketplaceServices.slice(offset, offset + pageSize);\n\n const handleSubmit = async (values: FormValues) => {\n if (modal.context) {\n await updateMarketplaceService(modal.context.id, valuesToService(values, modal.context));\n } else {\n await addMarketplaceService(valuesToService(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>My Services</GradientText>\n </h1>\n <p className=\"text-sm text-text-secondary\">Manage your listed services</p>\n <PagePurpose className=\"mt-1\">\n Manage the services you offer to clients — list, edit, and showcase your offerings to\n win more work on the marketplace.\n </PagePurpose>\n </div>\n <Button size=\"sm\" onClick={() => modal.openModal()}>\n <Plus className=\"h-4 w-4 mr-1\" />\n Create Service\n </Button>\n </div>\n <div className=\"grid gap-4 md:grid-cols-2 lg:grid-cols-3\">\n {marketplaceServices.length === 0 ? (\n <div className=\"col-span-full\">\n <IllustratedEmptyState\n illustration=\"empty-generic\"\n title=\"No services listed\"\n description=\"List a service to start winning work on the marketplace.\"\n />\n </div>\n ) : (\n myServices.map((svc, _idx) => (\n <GlassCard key={svc.id} treatment={_idx === 0 ? 'glass' : 'plain'} glow={_idx === 0}>\n <CardHeader>\n <div className=\"flex items-center justify-between\">\n <CardTitle className=\"text-base\">{svc.title}</CardTitle>\n <Badge\n variant={svc.status === 'active' ? 'default' : 'secondary'}\n className=\"text-[10px]\"\n >\n {formatEnumLabel(svc.status)}\n </Badge>\n </div>\n </CardHeader>\n <CardContent>\n <p className=\"text-sm text-text-secondary mb-3\">{svc.description}</p>\n <div className=\"flex items-center justify-between text-sm\">\n <span className=\"font-bold\">\n ${svc.price}/{svc.priceType}\n </span>\n <span className=\"flex items-center gap-1\">\n <Star className=\"h-3 w-3 text-status-warning-text\" />\n {svc.rating} ({svc.reviews})\n </span>\n </div>\n <div className=\"flex gap-2 mt-3\">\n <Button\n variant=\"outline\"\n size=\"sm\"\n className=\"flex-1\"\n onClick={() => modal.openModal(svc)}\n >\n <Pencil className=\"h-3.5 w-3.5 mr-1\" />\n Edit\n </Button>\n <Button\n size=\"sm\"\n className=\"flex-1\"\n onClick={() => navigate(`../../marketplace/service-details-page?id=${svc.id}`)}\n >\n <Eye className=\"h-3.5 w-3.5 mr-1\" />\n View\n </Button>\n <AlertDialog>\n <AlertDialogTrigger asChild>\n <Button variant=\"ghost\" size=\"icon\" aria-label={`Delete ${svc.title}`}>\n <Trash2 className=\"h-4 w-4 text-status-error-text\" />\n </Button>\n </AlertDialogTrigger>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>Delete service?</AlertDialogTitle>\n <AlertDialogDescription>\n This removes “{svc.title}” from your marketplace listings. This action\n cannot be undone.\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel>Cancel</AlertDialogCancel>\n <AlertDialogAction onClick={() => void removeMarketplaceService(svc.id)}>\n Delete\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n </div>\n </CardContent>\n </GlassCard>\n ))\n )}\n </div>\n {marketplaceServices.length > 0 ? (\n <Pagination\n page={page}\n pageSize={pageSize}\n totalItems={marketplaceServices.length}\n onPageChange={setPage}\n />\n ) : null}\n\n <FormModal\n open={modal.open}\n onOpenChange={modal.onOpenChange}\n title={modal.context ? 'Edit service' : 'Create service'}\n description=\"Describe the service you offer clients on the marketplace.\"\n fields={SERVICE_FIELDS}\n initialValues={modal.context ? toInitialValues(modal.context) : undefined}\n submitLabel={modal.context ? 'Save changes' : 'Create service'}\n onSubmit={handleSubmit}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAiCA,IAAM,IAAgC;CACpC;EAAE,MAAM;EAAS,OAAO;EAAiB,MAAM;EAAQ,UAAU;EAAM,SAAS;EAAG;CACnF;EAAE,MAAM;EAAY,OAAO;EAAY,MAAM;EAAQ,UAAU;EAAM;CACrE;EAAE,MAAM;EAAY,OAAO;EAAY,MAAM;EAAQ,UAAU;EAAM;CACrE;EAAE,MAAM;EAAS,OAAO;EAAS,MAAM;EAAU,UAAU;EAAM;CACjE;EACE,MAAM;EACN,OAAO;EACP,MAAM;EACN,UAAU;EACV,SAAS;GACP;IAAE,OAAO;IAAU,OAAO;IAAU;GACpC;IAAE,OAAO;IAAS,OAAO;IAAS;GAClC;IAAE,OAAO;IAAW,OAAO;IAAW;GACvC;EACF;CACD;EACE,MAAM;EACN,OAAO;EACP,MAAM;EACN,UAAU;EACV,aAAa;EACd;CACD;EACE,MAAM;EACN,OAAO;EACP,MAAM;EACN,SAAS;GACP;IAAE,OAAO;IAAU,OAAO;IAAU;GACpC;IAAE,OAAO;IAAU,OAAO;IAAU;GACpC;IAAE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AO,MAAuB;AACjD,KAAI,EAAM,UACR,MAAM,EAAyB,EAAM,QAAQ,IAAI,EAAgB,GAAQ,EAAM,QAAQ,CAAC,GAExF,MAAM,EAAsB,EAAgB,EAAO,CAAC;;IAwHlD,CAAA;GACE"}
|
|
@@ -1,122 +1,123 @@
|
|
|
1
1
|
import { useCrewFoundryStore as e } from "../store/crewfoundryStore.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { formatEnumLabel as t } from "../utils/formatEnumLabel.js";
|
|
3
|
+
import { Calendar as n, DollarSign as r, MessageSquare as i, Users as a } from "lucide-react";
|
|
4
|
+
import { useLocation as o, useNavigate as s } from "react-router-dom";
|
|
5
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
|
+
import { Badge as u, Card as d, CardContent as f, EmphasisPanel as p, GradientText as m, IllustratedEmptyState as h, NextSteps as g, PagePurpose as _ } from "@burdenoff/fe-libs/ui";
|
|
6
7
|
//#region src/crewfoundry/pages/MarketplaceProjectDetailsPagePage.tsx
|
|
7
|
-
function
|
|
8
|
-
let
|
|
9
|
-
return
|
|
8
|
+
function v() {
|
|
9
|
+
let v = s(), y = o(), { projects: b } = e(), x = new URLSearchParams(y.search).get("id"), S = b.find((e) => e.id === x) ?? b[0];
|
|
10
|
+
return S ? /* @__PURE__ */ l("div", {
|
|
10
11
|
className: "space-y-6 p-6 max-w-4xl",
|
|
11
12
|
children: [
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
+
/* @__PURE__ */ l("div", {
|
|
13
14
|
className: "flex items-center justify-between",
|
|
14
|
-
children: [/* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */
|
|
15
|
+
children: [/* @__PURE__ */ l("div", { children: [
|
|
16
|
+
/* @__PURE__ */ c("h1", {
|
|
16
17
|
className: "text-2xl font-semibold",
|
|
17
|
-
children: /* @__PURE__ */
|
|
18
|
+
children: /* @__PURE__ */ c(m, { children: S.name })
|
|
18
19
|
}),
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
+
/* @__PURE__ */ c("p", {
|
|
20
21
|
className: "text-sm text-text-secondary",
|
|
21
|
-
children:
|
|
22
|
+
children: S.description
|
|
22
23
|
}),
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
+
/* @__PURE__ */ c(_, {
|
|
24
25
|
className: "mt-2",
|
|
25
26
|
children: "The full picture of a marketplace project — scope, budget, timeline, and progress — so you can track delivery and stay aligned with the team doing the work."
|
|
26
27
|
})
|
|
27
|
-
] }), /* @__PURE__ */
|
|
28
|
-
variant:
|
|
29
|
-
children:
|
|
28
|
+
] }), /* @__PURE__ */ c(u, {
|
|
29
|
+
variant: S.status === "active" ? "default" : "secondary",
|
|
30
|
+
children: t(S.status)
|
|
30
31
|
})]
|
|
31
32
|
}),
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ c(g, {
|
|
33
34
|
storageKey: "crewfoundry-marketplace-project-details",
|
|
34
35
|
steps: [
|
|
35
36
|
{
|
|
36
37
|
id: "message",
|
|
37
38
|
label: "Message the team",
|
|
38
39
|
description: "Coordinate on scope, blockers, and next milestones.",
|
|
39
|
-
icon: /* @__PURE__ */
|
|
40
|
-
onClick: () =>
|
|
40
|
+
icon: /* @__PURE__ */ c(i, { className: "h-4 w-4" }),
|
|
41
|
+
onClick: () => v("../../marketplace/messaging-page")
|
|
41
42
|
},
|
|
42
43
|
{
|
|
43
44
|
id: "bookings",
|
|
44
45
|
label: "Review bookings",
|
|
45
46
|
description: "Check the engagements tied to this project.",
|
|
46
|
-
icon: /* @__PURE__ */
|
|
47
|
-
onClick: () =>
|
|
47
|
+
icon: /* @__PURE__ */ c(n, { className: "h-4 w-4" }),
|
|
48
|
+
onClick: () => v("../../marketplace/booking-management-page")
|
|
48
49
|
},
|
|
49
50
|
{
|
|
50
51
|
id: "earnings",
|
|
51
52
|
label: "Track earnings",
|
|
52
53
|
description: "See payouts and balances connected to your work.",
|
|
53
|
-
icon: /* @__PURE__ */
|
|
54
|
-
onClick: () =>
|
|
54
|
+
icon: /* @__PURE__ */ c(r, { className: "h-4 w-4" }),
|
|
55
|
+
onClick: () => v("../../marketplace/earnings-page")
|
|
55
56
|
}
|
|
56
57
|
]
|
|
57
58
|
}),
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
+
/* @__PURE__ */ l("div", {
|
|
59
60
|
className: "grid gap-4 md:grid-cols-4",
|
|
60
61
|
children: [
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ c(d, { children: /* @__PURE__ */ l(f, {
|
|
62
63
|
className: "p-4 text-center",
|
|
63
64
|
children: [
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ c(r, { className: "h-5 w-5 mx-auto text-text-secondary mb-1" }),
|
|
66
|
+
/* @__PURE__ */ l("p", {
|
|
66
67
|
className: "text-lg font-bold",
|
|
67
68
|
children: [
|
|
68
69
|
"$",
|
|
69
|
-
(
|
|
70
|
+
(S.budget / 1e3).toFixed(0),
|
|
70
71
|
"K"
|
|
71
72
|
]
|
|
72
73
|
}),
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ c("p", {
|
|
74
75
|
className: "text-xs text-text-secondary",
|
|
75
76
|
children: "Budget"
|
|
76
77
|
})
|
|
77
78
|
]
|
|
78
79
|
}) }),
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ c(d, { children: /* @__PURE__ */ l(f, {
|
|
80
81
|
className: "p-4 text-center",
|
|
81
82
|
children: [
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
/* @__PURE__ */
|
|
83
|
+
/* @__PURE__ */ c(r, { className: "h-5 w-5 mx-auto text-status-success-text mb-1" }),
|
|
84
|
+
/* @__PURE__ */ l("p", {
|
|
84
85
|
className: "text-lg font-bold",
|
|
85
86
|
children: [
|
|
86
87
|
"$",
|
|
87
|
-
(
|
|
88
|
+
(S.spent / 1e3).toFixed(0),
|
|
88
89
|
"K"
|
|
89
90
|
]
|
|
90
91
|
}),
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
+
/* @__PURE__ */ c("p", {
|
|
92
93
|
className: "text-xs text-text-secondary",
|
|
93
94
|
children: "Spent"
|
|
94
95
|
})
|
|
95
96
|
]
|
|
96
97
|
}) }),
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
+
/* @__PURE__ */ c(d, { children: /* @__PURE__ */ l(f, {
|
|
98
99
|
className: "p-4 text-center",
|
|
99
100
|
children: [
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ c(a, { className: "h-5 w-5 mx-auto text-text-secondary mb-1" }),
|
|
102
|
+
/* @__PURE__ */ c("p", {
|
|
102
103
|
className: "text-lg font-bold",
|
|
103
|
-
children:
|
|
104
|
+
children: S.teamName
|
|
104
105
|
}),
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
+
/* @__PURE__ */ c("p", {
|
|
106
107
|
className: "text-xs text-text-secondary",
|
|
107
108
|
children: "Team"
|
|
108
109
|
})
|
|
109
110
|
]
|
|
110
111
|
}) }),
|
|
111
|
-
/* @__PURE__ */
|
|
112
|
+
/* @__PURE__ */ c(d, { children: /* @__PURE__ */ l(f, {
|
|
112
113
|
className: "p-4 text-center",
|
|
113
114
|
children: [
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
/* @__PURE__ */
|
|
115
|
+
/* @__PURE__ */ c(n, { className: "h-5 w-5 mx-auto text-text-secondary mb-1" }),
|
|
116
|
+
/* @__PURE__ */ c("p", {
|
|
116
117
|
className: "text-lg font-bold",
|
|
117
|
-
children:
|
|
118
|
+
children: S.endDate
|
|
118
119
|
}),
|
|
119
|
-
/* @__PURE__ */
|
|
120
|
+
/* @__PURE__ */ c("p", {
|
|
120
121
|
className: "text-xs text-text-secondary",
|
|
121
122
|
children: "Deadline"
|
|
122
123
|
})
|
|
@@ -124,70 +125,70 @@ function _() {
|
|
|
124
125
|
}) })
|
|
125
126
|
]
|
|
126
127
|
}),
|
|
127
|
-
/* @__PURE__ */
|
|
128
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ l(p, { children: [
|
|
129
|
+
/* @__PURE__ */ c("div", {
|
|
129
130
|
className: "mb-2 text-lg font-semibold",
|
|
130
131
|
children: "Progress"
|
|
131
132
|
}),
|
|
132
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ l("div", {
|
|
133
134
|
className: "space-y-2",
|
|
134
|
-
children: [/* @__PURE__ */
|
|
135
|
+
children: [/* @__PURE__ */ l("div", {
|
|
135
136
|
className: "flex justify-between text-sm",
|
|
136
|
-
children: [/* @__PURE__ */
|
|
137
|
-
|
|
137
|
+
children: [/* @__PURE__ */ l("span", { children: [
|
|
138
|
+
S.completedTasks,
|
|
138
139
|
" of ",
|
|
139
|
-
|
|
140
|
+
S.tasks,
|
|
140
141
|
" tasks"
|
|
141
|
-
] }), /* @__PURE__ */
|
|
142
|
+
] }), /* @__PURE__ */ l("span", {
|
|
142
143
|
className: "font-medium",
|
|
143
|
-
children: [
|
|
144
|
+
children: [S.progress, "%"]
|
|
144
145
|
})]
|
|
145
|
-
}), /* @__PURE__ */
|
|
146
|
+
}), /* @__PURE__ */ c("div", {
|
|
146
147
|
className: "h-3 bg-bg-sunken rounded overflow-hidden",
|
|
147
|
-
children: /* @__PURE__ */
|
|
148
|
+
children: /* @__PURE__ */ c("div", {
|
|
148
149
|
className: "h-3 bg-action-primary-bg rounded",
|
|
149
|
-
style: { width: `${
|
|
150
|
+
style: { width: `${S.progress}%` }
|
|
150
151
|
})
|
|
151
152
|
})]
|
|
152
153
|
}),
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ l("div", {
|
|
154
155
|
className: "grid grid-cols-2 gap-4 mt-4",
|
|
155
156
|
children: [
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("p", {
|
|
157
158
|
className: "text-xs text-text-secondary",
|
|
158
159
|
children: "Manager"
|
|
159
|
-
}), /* @__PURE__ */
|
|
160
|
+
}), /* @__PURE__ */ c("p", {
|
|
160
161
|
className: "text-sm font-medium",
|
|
161
|
-
children:
|
|
162
|
+
children: S.managerName
|
|
162
163
|
})] }),
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
+
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("p", {
|
|
164
165
|
className: "text-xs text-text-secondary",
|
|
165
166
|
children: "Priority"
|
|
166
|
-
}), /* @__PURE__ */
|
|
167
|
-
variant:
|
|
168
|
-
children:
|
|
167
|
+
}), /* @__PURE__ */ c(u, {
|
|
168
|
+
variant: S.priority === "critical" ? "destructive" : S.priority === "high" ? "default" : "secondary",
|
|
169
|
+
children: t(S.priority)
|
|
169
170
|
})] }),
|
|
170
|
-
/* @__PURE__ */
|
|
171
|
+
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("p", {
|
|
171
172
|
className: "text-xs text-text-secondary",
|
|
172
173
|
children: "Start Date"
|
|
173
|
-
}), /* @__PURE__ */
|
|
174
|
+
}), /* @__PURE__ */ c("p", {
|
|
174
175
|
className: "text-sm",
|
|
175
|
-
children:
|
|
176
|
+
children: S.startDate
|
|
176
177
|
})] }),
|
|
177
|
-
/* @__PURE__ */
|
|
178
|
+
/* @__PURE__ */ l("div", { children: [/* @__PURE__ */ c("p", {
|
|
178
179
|
className: "text-xs text-text-secondary",
|
|
179
180
|
children: "End Date"
|
|
180
|
-
}), /* @__PURE__ */
|
|
181
|
+
}), /* @__PURE__ */ c("p", {
|
|
181
182
|
className: "text-sm",
|
|
182
|
-
children:
|
|
183
|
+
children: S.endDate
|
|
183
184
|
})] })
|
|
184
185
|
]
|
|
185
186
|
})
|
|
186
187
|
] })
|
|
187
188
|
]
|
|
188
|
-
}) : /* @__PURE__ */
|
|
189
|
+
}) : /* @__PURE__ */ c("div", {
|
|
189
190
|
className: "p-6",
|
|
190
|
-
children: /* @__PURE__ */
|
|
191
|
+
children: /* @__PURE__ */ c(h, {
|
|
191
192
|
illustration: "empty-search",
|
|
192
193
|
title: "Project not found",
|
|
193
194
|
description: "This project is no longer available."
|
|
@@ -195,6 +196,6 @@ function _() {
|
|
|
195
196
|
});
|
|
196
197
|
}
|
|
197
198
|
//#endregion
|
|
198
|
-
export {
|
|
199
|
+
export { v as MarketplaceProjectDetailsPagePage };
|
|
199
200
|
|
|
200
201
|
//# sourceMappingURL=MarketplaceProjectDetailsPagePage.js.map
|