get_my/client/ListItems/listItemTblByStore.js

30 lines
860 B
JavaScript

import { ListItems } from '../../imports/api/listItems.js';
import { M } from '../lib/assets/materialize.js';
import { UserLast } from '../../imports/api/userLast.js';
import { Stores } from '../../imports/api/stores.js';
Template.listItemTblByStore.onCreated(function() {
this.autorun( () => {
this.subscribe("myListItems", Session.get("listId"));
});
this.subscribe("storeInfo");
this.subscribe("userLastView");
});
Template.listItemTblByStore.onRendered(function() {
Session.set("showReceivedItems", false);
Session.set("searchVal", "");
});
Template.listItemTblByStore.helpers({
thisListItems: function() {
let showReceved = Session.get("showReceivedItems");
let searchVal = Session.get("searchVal");
let stores = Stores.find({}).fetch();
}
});
Template.listItemTblByStore.events({
});