Just changes.

This commit is contained in:
Brian McGonagill 2026-01-27 12:42:20 -06:00
parent 5ba618f471
commit 8bd3fb1853
8 changed files with 214 additions and 13 deletions

View file

@ -0,0 +1,33 @@
import { Roles } from 'meteor/roles';
import { FlowRouter } from 'meteor/ostrio:flow-router-extra';
import { Locations } from '../../imports/api/locations.js';
import { LocationTypes } from '../../imports/api/locationTypes.js';
import _classCheckPrivateStaticFieldDescriptor from '@babel/runtime/helpers/classCheckPrivateStaticFieldDescriptor';
Template.locationInfo.onCreated(function () {
this.subscribe("LocationTypes");
this.subscribe("Locations");
});
Template.locationInfo.onRendered(function () {
});
Template.locationInfo.helpers({
parentLocations: function () {
return Locations.find({ isChild: false });
},
childLocation: function () {
let parId = Session.get("parentId");
console.log("Child Loc: " + parId);
return Locations.find({ parentId: parId });
},
});
Template.locationInfo.events({
'click .topLevel'(e) {
let parentId = e.currentTarget.id;
console.log("Parent ID: " + parentId);
Session.set("parentId", parentId);
},
});