Updated product management to use newer materialize libraries

This commit is contained in:
Brian McGonagill 2024-07-23 12:01:33 -05:00
parent df3eb4ff08
commit 27b3c82faf
7 changed files with 65 additions and 83 deletions

View file

@ -1,13 +1,11 @@
import { Products } from '../../../imports/api/products.js';
import { M } from '../../lib/assets/materialize.js';
Template.prodMgmtTbl.onCreated(function() {
this.subscribe("myProducts");
});
Template.prodMgmtTbl.onRendered(function() {
Meteor.setTimeout(function() {
$('.tooltipped').tooltip();
}, 150);
Session.set("searchProds", false);
});
@ -32,7 +30,6 @@ Template.prodMgmtTbl.events({
Session.set("method", "delete.product");
Session.set("item", this.prodName);
Session.set("view", "Products");;
$('#modalDelete').modal('open');
},
'click .editProduct' (event) {
event.preventDefault();
@ -41,7 +38,7 @@ Template.prodMgmtTbl.events({
let prodInfo = Products.findOne({ _id: this._id });
$("#prodName").val(prodInfo.prodName);
$("#prodStore").val(prodInfo.prodStore);
$('select').formSelect();
// $('select').formSelect();
},
'click #filterProds' (event) {
event.preventDefault();