@ansiversa/components 0.0.70 → 0.0.72

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ansiversa/components",
3
- "version": "0.0.70",
3
+ "version": "0.0.72",
4
4
  "description": "Shared UI components and layouts for the Ansiversa ecosystem",
5
5
  "type": "module",
6
6
  "exports": {
@@ -26,7 +26,7 @@ const { title, description } = Astro.props as Props;
26
26
  type="button"
27
27
  class="av-drawer__close"
28
28
  aria-label="Close"
29
- x-on:click="$dispatch('close-drawer')"
29
+ x-on:click="if (typeof closeDrawer === 'function') closeDrawer(); $dispatch('close-drawer')"
30
30
  >
31
31
  <span aria-hidden="true">×</span>
32
32
  </button>
@@ -12,6 +12,7 @@ interface User {
12
12
  id: string;
13
13
  email: string;
14
14
  name?: string;
15
+ roleId?: number;
15
16
  }
16
17
 
17
18
  interface Props {
@@ -143,6 +144,12 @@ const userInitial =
143
144
  <div class="av-user-menu-divider"></div>
144
145
 
145
146
  <div class="av-nav-user-menu">
147
+ {user?.roleId === 1 && (
148
+ <a href={`${ROOT_URL}/admin`} class="av-user-menu-item av-dropdown-item" role="menuitem">
149
+ <span>Administration</span>
150
+ </a>
151
+ )}
152
+
146
153
  <a href={`${ROOT_URL}/dashboard`} class="av-user-menu-item av-dropdown-item" role="menuitem">
147
154
  <span>Dashboard</span>
148
155
  </a>