Skip to content

Commit

Permalink
fix: correctly open note details popup everywhere
Browse files Browse the repository at this point in the history
after the view-architecture rework
  • Loading branch information
sleidig committed Apr 15, 2024
1 parent d64f937 commit 928179a
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { AttendanceService } from "../../attendance.service";
import { Note } from "../../../notes/model/note";
import { EntityMapperService } from "../../../../core/entity/entity-mapper/entity-mapper.service";
import { RecurringActivity } from "../../model/recurring-activity";
import { NoteDetailsComponent } from "../../../notes/note-details/note-details.component";
import { FormDialogService } from "../../../../core/form-dialog/form-dialog.service";
import { AlertService } from "../../../../core/alerts/alert.service";
import { AlertDisplay } from "../../../../core/alerts/alert-display";
Expand Down Expand Up @@ -197,7 +196,7 @@ export class RollCallSetupComponent implements OnInit {
}

this.formDialog
.openFormPopup(newNote, [], NoteDetailsComponent)
.openView(newNote, "NoteDetails")
.afterClosed()
.subscribe((createdNote: Note) => {
if (createdNote) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { EntityMapperService } from "../../../../core/entity/entity-mapper/entit
import { Child } from "../../../children/model/child";
import { LoggingService } from "../../../../core/logging/logging.service";
import { sortByAttribute } from "../../../../utils/utils";
import { NoteDetailsComponent } from "../../../notes/note-details/note-details.component";
import { FormDialogService } from "../../../../core/form-dialog/form-dialog.service";
import { NgClass, NgForOf, NgIf } from "@angular/common";
import { MatProgressBarModule } from "@angular/material/progress-bar";
Expand Down Expand Up @@ -263,7 +262,7 @@ export class RollCallComponent implements OnChanges {
}

showDetails() {
this.formDialog.openFormPopup(this.eventEntity, [], NoteDetailsComponent);
this.formDialog.openView(this.eventEntity, "NoteDetails");
}

async includeInactive() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import moment, { Moment } from "moment";
import { EventAttendance } from "../model/event-attendance";
import { EntityMapperService } from "../../../core/entity/entity-mapper/entity-mapper.service";
import { FormDialogService } from "../../../core/form-dialog/form-dialog.service";
import { NoteDetailsComponent } from "../../notes/note-details/note-details.component";
import {
AverageAttendanceStats,
calculateAverageAttendance,
Expand Down Expand Up @@ -217,6 +216,6 @@ export class AttendanceCalendarComponent implements OnChanges {
}

showEventDetails(selectedEvent: Note) {
this.formDialog.openFormPopup(selectedEvent, [], NoteDetailsComponent);
this.formDialog.openView(selectedEvent, "NoteDetails");
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Component, Inject, Input } from "@angular/core";
import { ActivityAttendance } from "../model/activity-attendance";
import { NoteDetailsComponent } from "../../notes/note-details/note-details.component";
import { Note } from "../../notes/model/note";
import { calculateAverageAttendance } from "../model/calculate-average-event-attendance";
import { FormFieldConfig } from "../../../core/common-components/entity-form/FormConfig";
Expand Down Expand Up @@ -68,6 +67,6 @@ export class AttendanceDetailsComponent {
}

showEventDetails(event: EventNote) {
this.formDialog.openFormPopup(event, [], NoteDetailsComponent);
this.formDialog.openView(event, "NoteDetails");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { Component, Input } from "@angular/core";
import { Note } from "../../model/note";
import { DynamicComponent } from "../../../../core/config/dynamic-components/dynamic-component.decorator";
import { FormDialogService } from "../../../../core/form-dialog/form-dialog.service";
import { NoteDetailsComponent } from "../../note-details/note-details.component";
import { DashboardListWidgetComponent } from "../../../../core/dashboard/dashboard-list-widget/dashboard-list-widget.component";
import { MatTableModule } from "@angular/material/table";
import { DatePipe, NgStyle } from "@angular/common";
Expand Down Expand Up @@ -37,6 +36,6 @@ export class ImportantNotesDashboardComponent extends DashboardWidget {
}

openNote(note: Note) {
this.formDialog.openFormPopup(note, [], NoteDetailsComponent);
this.formDialog.openView(note, "NoteDetails");
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Component } from "@angular/core";
import { Note } from "../model/note";
import { NoteDetailsComponent } from "../note-details/note-details.component";
import { ChildrenService } from "../../children/children.service";
import { FormDialogService } from "../../../core/form-dialog/form-dialog.service";
import { DynamicComponent } from "../../../core/config/dynamic-components/dynamic-component.decorator";
Expand Down Expand Up @@ -129,6 +128,6 @@ export class NotesRelatedToEntityComponent extends RelatedEntitiesComponent<Note
}

showNoteDetails(note: Note) {
this.formDialog.openFormPopup(note, [], NoteDetailsComponent);
this.formDialog.openView(note, "NoteDetails");
}
}

0 comments on commit 928179a

Please sign in to comment.