diff --git a/.claude/launch.json b/.claude/launch.json index 6bf0d19..0c42af1 100644 --- a/.claude/launch.json +++ b/.claude/launch.json @@ -4,8 +4,8 @@ { "name": "admin-solid", "runtimeExecutable": "sh", - "runtimeArgs": ["-c", "cd /Users/ashwin/workspace/nxtgauge-admin-solid && npm run dev -- --port 3002"], - "port": 3002 + "runtimeArgs": ["-c", "cd /Users/ashwin/workspace/nxtgauge-admin-solid && npm run dev -- --port 3020 --host"], + "port": 3020 } ] } diff --git a/src/routes/admin/applications.tsx b/src/routes/admin/applications.tsx index 91768b6..313fd85 100644 --- a/src/routes/admin/applications.tsx +++ b/src/routes/admin/applications.tsx @@ -75,86 +75,109 @@ export default function ApplicationsPage() { return requirements().find((item) => item.id === id); } - function statusClass(status: string): string { - if (status === 'ACCEPTED') return 'status-approved'; - if (status === 'REJECTED' || status === 'WITHDRAWN') return 'status-rejected'; - return 'status-pending'; + function statusBadge(status: string) { + if (status === 'ACCEPTED') return 'bg-green-100 text-green-800'; + if (status === 'REJECTED' || status === 'WITHDRAWN') return 'bg-red-100 text-red-700'; + return 'bg-yellow-100 text-yellow-800'; } return ( -
-

Applications

-

Review submitted applications and update acceptance status.

-
+
- -

Loading applications...

-
+ {/* ── Page header ── */} +
+

Applications

+

Review submitted applications and update acceptance status.

+
- -

{error()}

-
+ {/* ── Content ── */} +
+ +
{error()}
+
- -

No applications found.

-
+ +
+

Loading applications…

+
+
-
- - {(app) => { - const req = createMemo(() => requirementFor(app.requirementId)); - return ( -
-
-
-

{req()?.title || 'Unknown Requirement'}

-

ID: {app.id}

+ +
+

No applications found.

+
+
+ +
+ + {(app) => { + const req = createMemo(() => requirementFor(app.requirementId)); + return ( +
+
+
+

{req()?.title || 'Unknown Requirement'}

+

ID: {app.id}

+
+ {app.status} +
+ +
+

Message

+

{app.message || 'No message provided.'}

+
+ +
+
+

Quote

+

₹ {app.quote || 0}

+
+
+

Category

+

{req()?.profession || '—'}

+
+
+

Location

+

{req()?.location || '—'}

+
+
+

Applied On

+

{app.createdAt ? new Date(app.createdAt).toLocaleDateString() : '—'}

+
+
+ +
+ + + + + +
- {app.status} -
- -
-

Message

-

{app.message || 'No message provided.'}

-
- -
-
-

Quote

-

₹ {app.quote || 0}

-
-
-

Category

-

{req()?.profession || '—'}

-
-
-

Location

-

{req()?.location || '—'}

-
-
-

Applied On

-

{app.createdAt ? new Date(app.createdAt).toLocaleDateString() : '—'}

-
-
- -
- - - - - - - - - - - -
-
- ); - }} -
+ ); + }} + +
+
); diff --git a/src/routes/admin/approval.tsx b/src/routes/admin/approval.tsx index 408566e..508afed 100644 --- a/src/routes/admin/approval.tsx +++ b/src/routes/admin/approval.tsx @@ -975,7 +975,7 @@ export default function ApprovalPage() {
-
@@ -1010,7 +1010,7 @@ export default function ApprovalPage() {
- @@ -1096,7 +1096,7 @@ function ApprovalDetailPanel(props: { }>
-

Approval Detail

+

Approval Detail

{a()!._typeLabel || 'Request'}

diff --git a/src/routes/admin/approval/[id].tsx b/src/routes/admin/approval/[id].tsx index 2449cf6..40a8c61 100644 --- a/src/routes/admin/approval/[id].tsx +++ b/src/routes/admin/approval/[id].tsx @@ -247,13 +247,15 @@ export default function ApprovalDetailPage() { return ( -
+
+
-

Submission Review

-

Review a user's onboarding form submission and take action.

+

Submission Review

+

Review a user's onboarding form submission and take action.

- ← Back to Approvals + ← Back to Approvals
+
{actionError()}
@@ -389,6 +391,8 @@ export default function ApprovalDetailPage() {
+
+
); } diff --git a/src/routes/admin/company/[id].tsx b/src/routes/admin/company/[id].tsx index 70f367d..d525cbf 100644 --- a/src/routes/admin/company/[id].tsx +++ b/src/routes/admin/company/[id].tsx @@ -96,19 +96,21 @@ export default function CompanyDetailPage() { return ( -
+
+
-

{name()}

-

{companyId()}

+

{name()}

+

{companyId()}

- + {isVerified() ? 'Verified - Can Post Jobs' : 'Not Verified'} - Back to Companies - Open Approval Management + Back to Companies + Open Approval Management
+

Loading company...

@@ -294,6 +296,8 @@ export default function CompanyDetailPage() {
+
+
); } diff --git a/src/routes/admin/company/create.tsx b/src/routes/admin/company/create.tsx index 5acc0bd..6fa954d 100644 --- a/src/routes/admin/company/create.tsx +++ b/src/routes/admin/company/create.tsx @@ -50,62 +50,74 @@ export default function CreateCompanyPage() { } }; + const inputCls = 'w-full rounded-lg border border-gray-200 px-3 py-2 text-sm outline-none focus:border-[#0a1d37] focus:ring-1 focus:ring-[#0a1d37]'; + const labelCls = 'mb-1.5 block text-sm font-medium text-gray-700'; + return ( -
-
-

Create Company

-

Add a new organization profile to the admin company catalog.

+
+ + {/* ── Page header ── */} +
+
+

Create Company

+

Add a new organization profile to the admin company catalog.

+
+ + Back to Companies + +
+ + {/* ── Content ── */} +
+ +
{error()}
+
+ +
+
+
+ + setField('companyName', e.currentTarget.value)} /> +
+
+ + setField('companyId', e.currentTarget.value)} /> +
+
+ + setField('industry', e.currentTarget.value)} /> +
+
+ + setField('websiteUrl', e.currentTarget.value)} /> +
+
+ + setField('email', e.currentTarget.value)} /> +
+
+ + setField('phone', e.currentTarget.value)} /> +
+
+ + setField('address', e.currentTarget.value)} /> +
+
+ +