spine-framework-portal 0.2.7 → 0.2.9
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/components/PortalSidebar.tsx +18 -37
- package/manifest.json +24 -51
- package/package.json +3 -1
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
import * as React from "react"
|
|
11
11
|
import { PlusIcon, Ticket, BookOpen, GraduationCap, MessageSquare, HelpCircle, Settings, Layout } from "lucide-react"
|
|
12
|
+
import { useAppPath } from "@core/hooks/useAppPath"
|
|
13
|
+
import { useNavigate } from "react-router-dom"
|
|
12
14
|
import {
|
|
13
15
|
Sidebar,
|
|
14
16
|
SidebarContent,
|
|
@@ -24,51 +26,30 @@ import {
|
|
|
24
26
|
} from "@core/components/ui/sidebar"
|
|
25
27
|
import { Button } from "@core/components/ui/button"
|
|
26
28
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
url: "/portal/tickets",
|
|
31
|
-
icon: Ticket,
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
title: "Knowledge Base",
|
|
35
|
-
url: "/portal/kb",
|
|
36
|
-
icon: BookOpen,
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
title: "Courses",
|
|
40
|
-
url: "/portal/courses",
|
|
41
|
-
icon: GraduationCap,
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
title: "Community",
|
|
45
|
-
url: "/portal/community",
|
|
46
|
-
icon: MessageSquare,
|
|
47
|
-
},
|
|
48
|
-
]
|
|
29
|
+
export function PortalSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
|
30
|
+
const appPath = useAppPath()
|
|
31
|
+
const navigate = useNavigate()
|
|
49
32
|
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
title: "
|
|
53
|
-
|
|
54
|
-
icon:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
icon: Settings,
|
|
60
|
-
|
|
61
|
-
]
|
|
33
|
+
const navItems = [
|
|
34
|
+
{ title: "Tickets", url: appPath('/tickets'), icon: Ticket },
|
|
35
|
+
{ title: "Knowledge Base", url: appPath('/kb'), icon: BookOpen },
|
|
36
|
+
{ title: "Courses", url: appPath('/courses'), icon: GraduationCap },
|
|
37
|
+
{ title: "Community", url: appPath('/community'), icon: MessageSquare },
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
const supportItems = [
|
|
41
|
+
{ title: "Help Center", url: appPath('/help'), icon: HelpCircle },
|
|
42
|
+
{ title: "Settings", url: appPath('/settings'), icon: Settings },
|
|
43
|
+
]
|
|
62
44
|
|
|
63
|
-
export function PortalSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
|
|
64
45
|
return (
|
|
65
46
|
<Sidebar {...props}>
|
|
66
47
|
<SidebarHeader>
|
|
67
48
|
{/* Brand Header */}
|
|
68
49
|
<SidebarMenu>
|
|
69
50
|
<SidebarMenuItem>
|
|
70
|
-
<SidebarMenuButton size="lg"
|
|
71
|
-
<a href=
|
|
51
|
+
<SidebarMenuButton size="lg" onClick={() => navigate(appPath('/'))}>
|
|
52
|
+
<a href={appPath('/')}>
|
|
72
53
|
<div className="flex aspect-square size-8 items-center justify-center rounded-lg bg-primary text-primary-foreground">
|
|
73
54
|
<span className="text-sm font-bold">P</span>
|
|
74
55
|
</div>
|
package/manifest.json
CHANGED
|
@@ -2,68 +2,41 @@
|
|
|
2
2
|
"name": "Portal",
|
|
3
3
|
"slug": "portal",
|
|
4
4
|
"description": "Self-service portal for customers to access tickets, knowledge base, courses, and community",
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.9",
|
|
6
6
|
"app_type": "full",
|
|
7
|
+
"route_prefix": "/portal",
|
|
7
8
|
"required_roles": ["member"],
|
|
8
9
|
"routes": [
|
|
9
|
-
"/
|
|
10
|
-
"/
|
|
11
|
-
"/
|
|
12
|
-
"/
|
|
13
|
-
"/
|
|
14
|
-
"/
|
|
15
|
-
"/
|
|
16
|
-
"/
|
|
10
|
+
"/",
|
|
11
|
+
"/tickets",
|
|
12
|
+
"/tickets/:id",
|
|
13
|
+
"/kb",
|
|
14
|
+
"/courses",
|
|
15
|
+
"/community",
|
|
16
|
+
"/marketplace",
|
|
17
|
+
"/team"
|
|
17
18
|
],
|
|
18
19
|
"nav_items": [
|
|
19
|
-
{
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"order":
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"title": "Tickets",
|
|
27
|
-
"path": "/portal/tickets",
|
|
28
|
-
"icon": "Ticket",
|
|
29
|
-
"order": 2
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"title": "Knowledge Base",
|
|
33
|
-
"path": "/portal/kb",
|
|
34
|
-
"icon": "BookOpen",
|
|
35
|
-
"order": 3
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"title": "Courses",
|
|
39
|
-
"path": "/portal/courses",
|
|
40
|
-
"icon": "GraduationCap",
|
|
41
|
-
"order": 4
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"title": "Community",
|
|
45
|
-
"path": "/portal/community",
|
|
46
|
-
"icon": "Users",
|
|
47
|
-
"order": 5
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"title": "Marketplace",
|
|
51
|
-
"path": "/portal/marketplace",
|
|
52
|
-
"icon": "Store",
|
|
53
|
-
"order": 6
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"title": "Team",
|
|
57
|
-
"path": "/portal/team",
|
|
58
|
-
"icon": "UserPlus",
|
|
59
|
-
"order": 7
|
|
60
|
-
}
|
|
20
|
+
{ "title": "Home", "path": "/", "icon": "Home", "order": 1 },
|
|
21
|
+
{ "title": "Tickets", "path": "/tickets", "icon": "Ticket", "order": 2 },
|
|
22
|
+
{ "title": "Knowledge Base", "path": "/kb", "icon": "BookOpen", "order": 3 },
|
|
23
|
+
{ "title": "Courses", "path": "/courses", "icon": "GraduationCap", "order": 4 },
|
|
24
|
+
{ "title": "Community", "path": "/community", "icon": "Users", "order": 5 },
|
|
25
|
+
{ "title": "Marketplace", "path": "/marketplace","icon": "Store", "order": 6 },
|
|
26
|
+
{ "title": "Team", "path": "/team", "icon": "UserPlus", "order": 7 }
|
|
61
27
|
],
|
|
62
28
|
"features": ["tickets", "kb", "courses", "community", "marketplace"],
|
|
63
29
|
"dependencies": ["items", "threads", "messages"],
|
|
64
30
|
"entry_point": "./index.tsx",
|
|
31
|
+
"sidebar_component": "./components/PortalSidebar.tsx",
|
|
65
32
|
"is_public": true,
|
|
66
33
|
"auth_required": true,
|
|
34
|
+
"seed": [
|
|
35
|
+
{ "file": "seed/roles.json", "table": "roles", "conflict": "app_id,slug" },
|
|
36
|
+
{ "file": "seed/types.json", "table": "types", "conflict": "app_id,kind,slug" },
|
|
37
|
+
{ "file": "seed/link-types.json", "table": "link_types", "conflict": "app_id,slug" },
|
|
38
|
+
{ "file": "seed/triggers.json", "table": "triggers", "conflict": "app_id,name" }
|
|
39
|
+
],
|
|
67
40
|
"registration": {
|
|
68
41
|
"enabled": true,
|
|
69
42
|
"default_role": "member",
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spine-framework-portal",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9",
|
|
4
|
+
"private": false,
|
|
4
5
|
"description": "Customer Portal — self-service portal app for Spine Framework",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
"hooks/",
|
|
22
23
|
"utils/",
|
|
23
24
|
"functions/",
|
|
25
|
+
"public/",
|
|
24
26
|
"README.md",
|
|
25
27
|
"LICENSE.md"
|
|
26
28
|
],
|