create note on note admin

This commit is contained in:
Jason Wall 2020-08-17 13:59:20 -04:00
parent 51bb486d67
commit be7f7e9c37
4 changed files with 15 additions and 4 deletions

View File

@ -28,9 +28,6 @@ To get more help on the Angular CLI use `ng help` or go check out the [Angular C
# Punch List
- Notes Admin \*\*
- Create Note
- Note: Auto link passages using markdown link syntax
- Incorporate Jacob's Geo Work
- Android and IOS mobile apps with Ionic Capactor
- Test note persistence
@ -42,6 +39,8 @@ To get more help on the Angular CLI use `ng help` or go check out the [Angular C
## Optionally for Future
- Notes Admin
- Note: Auto link passages using markdown link syntax
- Page Admin
- Make page public (private edit only) [available only when logged in]
- Edit card query

View File

@ -47,6 +47,7 @@ export class SettingsComponent extends SubscriberBase {
) {
super();
this.fonts = CardFonts;
// tslint:disable-next-line: forin
for (const enumIdx in Overlap) {
this.cardMergeStrategies.push(Overlap[enumIdx]);
}

View File

@ -3,6 +3,12 @@
<mat-icon md-48 aria-hidden="false" aria-label="Menu Toggle">menu</mat-icon>
</button>
<span class="page-title">Manage Your Notes</span>
<button type="button" mat-icon-button (click)="addNote()">
<mat-icon md-48 aria-hidden="false" aria-label="Create a new Note"
>add</mat-icon
>
</button>
</mat-toolbar>
<div class="page-content">
<ng-container *ngIf="notes$ | async as notes; else nonotes">

View File

@ -3,6 +3,8 @@ import { AppService } from '../../services/app.service';
import { NavService } from '../../services/nav.service';
import { SubscriberBase } from '../../common/subscriber-base';
import { CardItem, CardType } from 'src/app/models/card-state';
import { NoteEditModalComponent } from 'src/app/components/note/edit-modal/note-edit-modal.component';
import { MatDialog } from '@angular/material/dialog';
@Component({
selector: 'app-notes-admin',
@ -23,10 +25,13 @@ export class NotesAdminPage extends SubscriberBase implements OnInit {
)
);
constructor(public navService: NavService, private appService: AppService) {
constructor(public navService: NavService, private appService: AppService, private dialog: MatDialog) {
super();
}
addNote() {
this.dialog.open(NoteEditModalComponent);
}
ngOnInit() {
this.navService.closeNav(); // close the nav immediately.
}