generated from nhcarrigan/template
This commit is contained in:
@@ -165,7 +165,8 @@ export class ApiService {
|
||||
| "events"
|
||||
| "meetings"
|
||||
| "mentorships"
|
||||
| "staff",
|
||||
| "staff"
|
||||
| "testimonials",
|
||||
token: string,
|
||||
): Promise<DataResponse | ErrorResponse> {
|
||||
const request = await fetch(`${this.url}/list/${type}`, {
|
||||
@@ -187,7 +188,8 @@ export class ApiService {
|
||||
| "events"
|
||||
| "meetings"
|
||||
| "mentorships"
|
||||
| "staff",
|
||||
| "staff"
|
||||
| "testimonials",
|
||||
id: string,
|
||||
token: string,
|
||||
): Promise<SuccessResponse | ErrorResponse> {
|
||||
|
||||
@@ -58,11 +58,21 @@
|
||||
>
|
||||
Staff Applications
|
||||
</button>
|
||||
<button
|
||||
[disabled]="view === 'testimonials'"
|
||||
type="button"
|
||||
(click)="setView('testimonials')"
|
||||
>
|
||||
Testimonials
|
||||
</button>
|
||||
<h2>{{ view }}</h2>
|
||||
<div *ngFor="let datum of data">
|
||||
<h3>{{ datum.email }}</h3>
|
||||
<div *ngFor="let obj of datum.info">
|
||||
<p><strong>{{ obj.key }}</strong>: {{ obj.value }}</p>
|
||||
<p>
|
||||
<strong>{{ obj.key }}</strong
|
||||
>: {{ obj.value }}
|
||||
</p>
|
||||
</div>
|
||||
<button type="button" (click)="markReviewed(datum.id)">
|
||||
Mark as Reviewed
|
||||
|
||||
@@ -41,7 +41,8 @@ export class ReviewComponent {
|
||||
| "events"
|
||||
| "meetings"
|
||||
| "mentorships"
|
||||
| "staff" = "";
|
||||
| "staff"
|
||||
| "testimonials" = "";
|
||||
|
||||
public constructor(private readonly apiService: ApiService) {
|
||||
const storedToken = localStorage.getItem("token");
|
||||
@@ -98,7 +99,8 @@ export class ReviewComponent {
|
||||
| "events"
|
||||
| "meetings"
|
||||
| "mentorships"
|
||||
| "staff";
|
||||
| "staff"
|
||||
| "testimonials";
|
||||
void this.apiService.
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- We know token is not null
|
||||
markReviewed(view, id, this.token.value!).then((data) => {
|
||||
@@ -120,7 +122,8 @@ export class ReviewComponent {
|
||||
| "events"
|
||||
| "meetings"
|
||||
| "mentorships"
|
||||
| "staff",
|
||||
| "staff"
|
||||
| "testimonials",
|
||||
): void {
|
||||
this.view = view;
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- We know token is not null
|
||||
|
||||
Reference in New Issue
Block a user