-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* add edit and approve functionality * remove rejection code * fix snap * integrate endpoint * disable approve button for approved requests * use comments instead of comment * use searchString instead of searchQuery * fix snap
- Loading branch information
1 parent
4a54001
commit 62750b0
Showing
13 changed files
with
205 additions
and
11 deletions.
There are no files selected for viewing
4 changes: 3 additions & 1 deletion
4
src/web/app/components/account-requests-table/account-request-table-model.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
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
9 changes: 9 additions & 0 deletions
9
...ponents/account-requests-table/admin-edit-request-modal/admin-edit-request-modal-model.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,9 @@ | ||
/** | ||
* Result of {@link EditRequestModalComponent} | ||
Check warning on line 2 in src/web/app/components/account-requests-table/admin-edit-request-modal/admin-edit-request-modal-model.ts GitHub Actions / lint (ubuntu-latest)
|
||
*/ | ||
export interface EditRequestModalComponentResult { | ||
accountRequestName: string; | ||
accountRequestEmail: string; | ||
accountRequestInstitution: string; | ||
accountRequestComment: string; | ||
} |
34 changes: 34 additions & 0 deletions
34
...s/account-requests-table/admin-edit-request-modal/admin-edit-request-modal.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,34 @@ | ||
<div class="modal-header bg-primary"> | ||
<h5 class="modal-title text-white"> | ||
<div>Edit Account Request for {{ accountRequestName }}</div> | ||
</h5> | ||
<button type="button" class="btn-close" (click)="activeModal.dismiss()"></button> | ||
</div> | ||
<div id="reject-account-request-modal" class="modal-body"> | ||
<div> | ||
<label><b>Name:</b></label> | ||
<input id="request-name" type="text" class="form-control" value="{{ accountRequestName }}" (input)="accountRequestName = $event.target.value"> | ||
</div> | ||
<div> | ||
<label><b>Email:</b></label> | ||
<input id="request-email" type="text" class="form-control" value="{{ accountRequestEmail }}" (input)="accountRequestEmail = $event.target.value"> | ||
</div> | ||
<div> | ||
<label><b>Institution, Country:</b></label> | ||
<input id="request-institution" type="text" class="form-control" value="{{ accountRequestInstitution }}" (input)="accountRequestInstitution = $event.target.value"> | ||
</div> | ||
<div class="row"> | ||
<div class="col-12"> | ||
<div> | ||
<label><b>Comments:</b></label> | ||
</div> | ||
<div class="form-group"> | ||
<textarea id="request-comments" class="form-control" rows="5" value="{{ accountRequestComments }}" (input)="accountRequestComments = $event.target.value"></textarea> | ||
</div> | ||
</div> | ||
<div class="modal-footer"> | ||
<button type="button" class="btn btn-light" (click)="activeModal.dismiss()">Cancel</button> | ||
<button id="btn-confirm-reject-request" type="button" class="btn btn-primary" (click)="edit()"> | ||
Save | ||
</button> | ||
</div> |
Empty file.
40 changes: 40 additions & 0 deletions
40
...nts/account-requests-table/admin-edit-request-modal/admin-edit-request-modal.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,40 @@ | ||
import { Component, Input } from '@angular/core'; | ||
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap'; | ||
import { EditRequestModalComponentResult } from './admin-edit-request-modal-model'; | ||
|
||
/** | ||
* Modal to select reject account requests with reason. | ||
*/ | ||
@Component({ | ||
selector: 'tm-edit-request-modal', | ||
templateUrl: './admin-edit-request-modal.component.html', | ||
styleUrls: ['./admin-edit-request-modal.component.scss'], | ||
}) | ||
|
||
export class EditRequestModalComponent { | ||
|
||
@Input() | ||
accountRequestName: string = ''; | ||
@Input() | ||
accountRequestEmail: string = ''; | ||
@Input() | ||
accountRequestInstitution: string = ''; | ||
@Input() | ||
accountRequestComments: string = ''; | ||
|
||
constructor(public activeModal: NgbActiveModal) {} | ||
|
||
/** | ||
* Fires the edit event. | ||
*/ | ||
edit(): void { | ||
const result: EditRequestModalComponentResult = { | ||
accountRequestName: this.accountRequestName, | ||
accountRequestEmail: this.accountRequestEmail, | ||
accountRequestInstitution: this.accountRequestInstitution, | ||
accountRequestComment: this.accountRequestComments, | ||
}; | ||
|
||
this.activeModal.close(result); | ||
} | ||
} |
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