-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1d90dbd
commit de1defc
Showing
4 changed files
with
94 additions
and
7 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
61 changes: 61 additions & 0 deletions
61
src/app/components/annotations/components/reset-progress-warning/reset-progress-warning.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,61 @@ | ||
import { Component, Input } from "@angular/core"; | ||
import { ModalComponent } from "@menu/widget.component"; | ||
import { NgbActiveModal } from "@ng-bootstrap/ng-bootstrap"; | ||
|
||
@Component({ | ||
selector: "baw-reset-progress-warning-modal", | ||
template: ` | ||
<div class="modal-header"> | ||
<h4 class="modal-title">Confirm Loss of Progress</h4> | ||
<button | ||
type="button" | ||
class="btn-close" | ||
aria-label="Close" | ||
(click)="closeModal()" | ||
></button> | ||
</div> | ||
<div class="modal-body"> | ||
<p> | ||
Because you have changed the verification tasks search parameters, your | ||
progress will be reset if you continue. | ||
</p> | ||
<p> | ||
Do you wish to reset your progress and continue with the new search | ||
parameters? | ||
</p> | ||
<div class="clearfix"> | ||
<button | ||
id="cancel-btn" | ||
class="btn btn-outline-primary float-start" | ||
(click)="closeModal()" | ||
> | ||
Undo Changes | ||
</button> | ||
<button | ||
id="next-btn" | ||
class="btn btn-danger text-white float-end" | ||
(click)="success()" | ||
> | ||
Reset Progress and Continue | ||
</button> | ||
</div> | ||
</div> | ||
`, | ||
}) | ||
export class ResetProgressWarningComponent implements ModalComponent { | ||
@Input() public modal: NgbActiveModal; | ||
@Input() public successCallback: () => void; | ||
|
||
public closeModal(): void { | ||
this.modal.close(); | ||
} | ||
|
||
public success(): void { | ||
this.successCallback(); | ||
this.modal.close(); | ||
} | ||
} |
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