Skip to content

Commit

Permalink
hide institution add functionality until authentication implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
saegi95 committed Mar 25, 2024
1 parent e9ab96e commit f034e0a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
9 changes: 4 additions & 5 deletions frontend/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { RepositoryDetailViewComponent } from './repository-detail-view/reposito
import { UserRankingComponent } from './user-ranking/user-ranking.component';
import { InstitutionPopupComponent } from './institution-popup/institution-popup.component';


const routes: Routes = [
// {
// path: 'explore',
Expand Down Expand Up @@ -49,10 +48,10 @@ const routes: Routes = [
path: 'institution-popup',
component: InstitutionPopupComponent,
},
{
path: 'institution-popup/:institution-popup',
component: InstitutionPopupComponent,
},
// {
// path: 'institution-popup/:institution-popup',
// component: InstitutionPopupComponent,
// },
// {
// path: 'explore/item/:itemName',
// component: ExploreItemComponent,
Expand Down
10 changes: 7 additions & 3 deletions frontend/src/app/nav/nav.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
<mat-icon>groups</mat-icon>
<span>People Ranking</span>
</button>
<button mat-button routerLink="/institution-popup">
<!-- <button mat-button routerLink="/institution-popup">
<mat-icon>apartment</mat-icon>
<span>Add an Institution</span>
</button>
</button> -->
<!-- <button mat-button routerLink="/visualization">
<mat-icon>pie_chart</mat-icon>
<span>Visualizations</span>
Expand Down Expand Up @@ -92,7 +92,11 @@
<mat-icon>groups</mat-icon>
<span>People Ranking</span>
</button>
<button mat-button routerLink="/institution-popup" (click)="onSidenavClick()">
<button
mat-button
routerLink="/institution-popup"
(click)="onSidenavClick()"
>
<mat-icon>apartment</mat-icon>
<span>Add an Institution</span>
</button>
Expand Down
9 changes: 4 additions & 5 deletions oss-api/src/api/api.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,10 @@ export class ApiController {
return (await this.mongoDbService.latestUpdate())[0];
}

@Post('institution')
async addInstitution(@Body('institution') institution: TodoInstitution) {
// TODO: add institution from form input
return this.mongoDbService.createNewTodoInstitution(institution);
}
// @Post('institution')
// async addInstitution(@Body('institution') institution: TodoInstitution) {
// return this.mongoDbService.createNewTodoInstitution(institution);
// }

/***********************************Helper************************************************/
/**
Expand Down

0 comments on commit f034e0a

Please sign in to comment.