-
-
Notifications
You must be signed in to change notification settings - Fork 354
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Admin initial setup: event stubs + org selector + load current org + …
…user (#1157) * load current org/user + stubs for event visualization + org selector #1127 * display correctly org on first load #1127
- Loading branch information
Showing
21 changed files
with
193 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
<h1 translate="admin.dashboard.my-events"></h1> | ||
<app-filter-button text="Active" [checked]="activeFilter" (toggleFilter)="toggleActiveFilter($event)"></app-filter-button> | ||
<app-filter-button text="Inactive" [checked]="inactiveFilter" (toggleFilter)="toggleInactiveFilter($event)"></app-filter-button> | ||
<app-filter-button text="Past" [checked]="inactiveFilter" (toggleFilter)="toggleInactiveFilter($event)"></app-filter-button> | ||
<ng-container *ngIf="activeFilter"> | ||
<h2>Active</h2> | ||
<ul> | ||
<li *ngFor="let ev of activeEvents$ | async"> | ||
{{ev.displayName}} {{ev.formattedBegin}} {{ev.formattedEnd}} | ||
<a [routerLink]="['./event', ev.id]">{{ev.displayName}} {{ev.formattedBegin}} {{ev.formattedEnd}}</a> | ||
</li> | ||
</ul> | ||
</ng-container> | ||
<ng-container *ngIf="inactiveFilter"> | ||
<h2>Expired</h2> | ||
<h2>Past</h2> | ||
<ul> | ||
<li *ngFor="let ev of expiredEvents$ | async"> | ||
{{ev.displayName}} {{ev.formattedBegin}} {{ev.formattedEnd}} | ||
<a [routerLink]="['./event', ev.id]">{{ev.displayName}} {{ev.formattedBegin}} {{ev.formattedEnd}}</a> | ||
</li> | ||
</ul> | ||
</ng-container> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
frontend-admin/src/app/event/event-dashboard/event-dashboard.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<p>event-dashboard works!</p> |
Empty file.
15 changes: 15 additions & 0 deletions
15
frontend-admin/src/app/event/event-dashboard/event-dashboard.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-event-dashboard', | ||
templateUrl: './event-dashboard.component.html', | ||
styleUrls: ['./event-dashboard.component.scss'] | ||
}) | ||
export class EventDashboardComponent implements OnInit { | ||
|
||
constructor() { } | ||
|
||
ngOnInit(): void { | ||
} | ||
|
||
} |
1 change: 1 addition & 0 deletions
1
frontend-admin/src/app/event/event-menu/event-menu.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<p>event-menu works!</p> |
Empty file.
15 changes: 15 additions & 0 deletions
15
frontend-admin/src/app/event/event-menu/event-menu.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-event-menu', | ||
templateUrl: './event-menu.component.html', | ||
styleUrls: ['./event-menu.component.scss'] | ||
}) | ||
export class EventMenuComponent implements OnInit { | ||
|
||
constructor() { } | ||
|
||
ngOnInit(): void { | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { TranslateModule } from '@ngx-translate/core'; | ||
import { provideSvgIconsConfig, SvgIconComponent } from '@ngneat/svg-icon'; | ||
import { RouterModule } from '@angular/router'; | ||
import { OrganizationService } from '../shared/organization.service'; | ||
import { EventService } from '../shared/event.service'; | ||
import { ICON_CONFIG } from '../shared/icons'; | ||
import { EventDashboardComponent } from './event-dashboard/event-dashboard.component'; | ||
import { EventMenuComponent } from './event-menu/event-menu.component'; | ||
|
||
@NgModule({ | ||
declarations: [ | ||
EventMenuComponent, | ||
EventDashboardComponent | ||
], | ||
imports: [ | ||
TranslateModule.forChild(), | ||
CommonModule, | ||
SvgIconComponent, | ||
RouterModule.forChild([ | ||
{path: '', component: EventDashboardComponent}, | ||
{path: '', component: EventMenuComponent, outlet: 'sidebar-content'} | ||
]) | ||
], | ||
providers: [ | ||
OrganizationService, | ||
EventService, | ||
provideSvgIconsConfig(ICON_CONFIG) | ||
] | ||
}) | ||
export class EventModule { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
export interface UserInfo { | ||
id: number; | ||
type: UserType; | ||
username: string; | ||
description: string; | ||
firstName: string; | ||
lastName: string; | ||
emailAddress: string; | ||
role: Role; | ||
} | ||
|
||
export enum UserType { | ||
INTERNAL = 'INTERNAL', | ||
DEMO = 'DEMO', | ||
API_KEY = 'API_KEY' | ||
} | ||
|
||
export enum Role { | ||
ADMIN = 'ADMIN', | ||
OWNER = 'OWNER', | ||
SUPERVISOR = 'SUPERVISOR', | ||
OPERATOR = 'OPERATOR', | ||
SPONSOR = 'SPONSOR', | ||
API_CONSUMER = 'API_CONSUMER' | ||
} |
14 changes: 14 additions & 0 deletions
14
frontend-admin/src/app/org-selector/org-selector.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<div class="modal-header"> | ||
<h4 class="modal-title">Select organization</h4> | ||
<button type="button" class="btn-close" aria-label="Close" (click)="activeModal.dismiss('Cross click')"></button> | ||
</div> | ||
<div class="modal-body"> | ||
<ul> | ||
<li *ngFor="let org of organizations$ | async"> | ||
<button class="btn btn-link" (click)="selectOrganization(org)">{{org.name}}</button> | ||
</li> | ||
</ul> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-outline-dark" (click)="activeModal.close('Close click')">Close</button> | ||
</div> |
Empty file.
25 changes: 25 additions & 0 deletions
25
frontend-admin/src/app/org-selector/org-selector.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; | ||
import { Observable } from 'rxjs'; | ||
import { Organization } from '../model/organization'; | ||
|
||
@Component({ | ||
selector: 'app-org-selector', | ||
templateUrl: './org-selector.component.html', | ||
styleUrls: ['./org-selector.component.scss'] | ||
}) | ||
export class OrgSelectorComponent implements OnInit { | ||
|
||
public organizations$?: Observable<Organization[]>; | ||
public organizationId$?: Observable<string | null>; | ||
|
||
constructor(public activeModal: NgbActiveModal) { } | ||
|
||
ngOnInit(): void { | ||
} | ||
|
||
public selectOrganization(org: Organization): void { | ||
this.activeModal.close(org); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.