Permalink
Browse files

menu bug fixes.

  • Loading branch information...
jgauffin committed Nov 27, 2018
1 parent a6bb982 commit a45563b1718f3a1570d43f60ad80b90d4cb16347
@@ -28,11 +28,7 @@ export default class AnalyzeIncidentComponent extends Vue {
created() {
MyIncidents.Instance.subscribeOnSelectedIncident(x => {
if (x == null) {
this.$router.push({ name: 'analyzeHome' });
} else {
this.loadIncident(x.incidentId);
}
this.selectIncident(x);
});
}
@@ -41,6 +37,10 @@ export default class AnalyzeIncidentComponent extends Vue {
this.loadIncident(incidentId);
}
destroyed() {
MyIncidents.Instance.unsubscribe(this.selectIncident);
}
reAssign() {
AppRoot.modal({
contentId: 'assignToModal',
@@ -162,4 +162,11 @@ export default class AnalyzeIncidentComponent extends Vue {
}
selectIncident(myIncident: IMyIncident | null): void {
if (myIncident == null) {
this.$router.push({ name: 'analyzeHome' });
} else {
this.loadIncident(myIncident.incidentId);
}
}
}
@@ -20,8 +20,8 @@ export default class AnalyzeMenuComponent extends Vue {
incidentId: number | null = null;
created() {
MyIncidents.Instance.subscribeOnSelectedIncident(x => this.onIncidentSelected(x));
MyIncidents.Instance.subscribeOnListChanges(() => this.onListChanged());
MyIncidents.Instance.subscribeOnSelectedIncident(this.onIncidentSelected);
MyIncidents.Instance.subscribeOnListChanges(this.onListChanged);
MyIncidents.Instance.ready()
.then(x => {
this.incidents = MyIncidents.Instance.myIncidents;
@@ -86,7 +86,6 @@ export default class AnalyzeMenuComponent extends Vue {
} else {
var newIncidentId = parseInt(value, 10);
if (this.incidentId === newIncidentId) {
console.log('exiting')
return;
}
this.incidentId = newIncidentId;

0 comments on commit a45563b

Please sign in to comment.