Skip to content

Commit 1307192

Browse files
committed
User type updates
1 parent cd5620d commit 1307192

File tree

7 files changed

+23
-24
lines changed

7 files changed

+23
-24
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "seed",
3-
"version": "3.2.3",
3+
"version": "3.2.4",
44
"description": "Standard Energy Efficiency Data (SEED) Platform™",
55
"license": "SEE LICENSE IN LICENSE.md",
66
"packageManager": "pnpm@10.0.0",

proxy.conf.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { config } from '@dotenvx/dotenvx'
33
config({ quiet: true })
44

55
export default {
6-
'/api': {
6+
'/api/': {
77
target: process.env.SEED_HOST ?? 'http://127.0.0.1:8000',
88
changeOrigin: true,
99
logLevel: 'debug',

src/@seed/api/user/user.types.ts

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
export type UserRole = 'viewer' | 'member' | 'owner'
22

33
export type CurrentUser = {
4+
first_name: string;
5+
last_name: string;
6+
email: string;
7+
username: string;
8+
api_key: string;
9+
is_superuser: boolean;
10+
id: number;
11+
pk: number;
12+
two_factor_method: 'disabled' | 'email' | 'token';
413
org_id: number;
514
org_name: string;
615
org_role: UserRole;
716
ali_name: string;
817
ali_id: number;
918
is_ali_root: boolean;
1019
is_ali_leaf: boolean;
11-
pk: number;
12-
id: number;
13-
first_name: string;
14-
last_name: string;
15-
email: string;
16-
username: string;
17-
is_superuser: boolean;
18-
api_key: string;
1920
}
2021

2122
export type SetDefaultOrganizationResponse = {

src/@seed/components/navigation/horizontal/components/branch/branch.component.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { BooleanInput } from '@angular/cdk/coercion'
22
import { NgClass, NgTemplateOutlet } from '@angular/common'
33
import type { OnDestroy, OnInit } from '@angular/core'
4-
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, forwardRef, inject, Input, viewChild } from '@angular/core'
4+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, inject, Input, viewChild } from '@angular/core'
55
import { MatIconModule } from '@angular/material/icon'
66
import type { MatMenu } from '@angular/material/menu'
77
import { MatMenuModule } from '@angular/material/menu'
@@ -22,7 +22,6 @@ import type { NavigationItem } from '@seed/components/navigation/navigation.type
2222
MatMenuModule,
2323
NgTemplateOutlet,
2424
HorizontalNavigationBasicItemComponent,
25-
forwardRef(() => HorizontalNavigationBranchItemComponent),
2625
HorizontalNavigationDividerItemComponent,
2726
MatTooltipModule,
2827
MatIconModule,

src/@seed/components/navigation/vertical/components/collapsible/collapsible.component.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { BooleanInput } from '@angular/cdk/coercion'
22
import { NgClass } from '@angular/common'
33
import type { OnDestroy, OnInit } from '@angular/core'
4-
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, forwardRef, HostBinding, inject, Input } from '@angular/core'
4+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, HostBinding, inject, Input } from '@angular/core'
55
import { MatIconModule } from '@angular/material/icon'
66
import { MatTooltipModule } from '@angular/material/tooltip'
77
import { NavigationEnd, Router } from '@angular/router'
@@ -27,7 +27,6 @@ import { exactMatchOptions, subsetMatchOptions } from '@seed/utils'
2727
MatTooltipModule,
2828
MatIconModule,
2929
VerticalNavigationBasicItemComponent,
30-
forwardRef(() => VerticalNavigationCollapsibleItemComponent),
3130
VerticalNavigationDividerItemComponent,
3231
VerticalNavigationGroupItemComponent,
3332
VerticalNavigationSpacerItemComponent,

src/@seed/components/navigation/vertical/components/group/group.component.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { BooleanInput } from '@angular/cdk/coercion'
22
import { NgClass } from '@angular/common'
33
import type { OnDestroy, OnInit } from '@angular/core'
4-
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, forwardRef, inject, Input } from '@angular/core'
4+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, inject, Input } from '@angular/core'
55
import { MatIconModule } from '@angular/material/icon'
66
import { Subject, takeUntil } from 'rxjs'
77
import type { NavigationItem, VerticalNavigationComponent } from '@seed/components'
@@ -23,7 +23,6 @@ import {
2323
VerticalNavigationBasicItemComponent,
2424
VerticalNavigationCollapsibleItemComponent,
2525
VerticalNavigationDividerItemComponent,
26-
forwardRef(() => VerticalNavigationGroupItemComponent),
2726
VerticalNavigationSpacerItemComponent,
2827
],
2928
})

src/app/mock-api/common/user/data.ts

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
import type { CurrentUser } from '@seed/api/user'
22

33
export const user: CurrentUser = {
4+
first_name: 'Alex',
5+
last_name: 'Swindler',
6+
email: 'Alex.Swindler@nrel.gov',
7+
username: 'alex.swindler@nrel.gov',
8+
api_key: '226347f24542d889e2f76c043696cfd21d1e0556',
9+
is_superuser: true,
10+
id: 1,
11+
pk: 1,
12+
two_factor_method: 'disabled',
413
org_id: 1,
514
org_name: 'NREL',
615
org_role: 'owner',
716
ali_name: 'root',
817
ali_id: 1,
918
is_ali_root: true,
1019
is_ali_leaf: true,
11-
pk: 1,
12-
id: 1,
13-
first_name: 'Alex',
14-
last_name: 'Swindler',
15-
email: 'Alex.Swindler@nrel.gov',
16-
username: 'alex.swindler@nrel.gov',
17-
is_superuser: true,
18-
api_key: '226347f24542d889e2f76c043696cfd21d1e0556',
1920
}

0 commit comments

Comments
 (0)