Adding more methods and views, updated dashboards a bit. Still not ready

This commit is contained in:
Brian McGonagill 2022-08-16 16:46:14 -05:00
parent 266dbd0856
commit 42643a37f5
23 changed files with 374 additions and 32 deletions

View file

@ -62,6 +62,10 @@ Template.prodMgmtForm.events({
// console.log(" ERROR: can't add product: " + err);
} else {
// console.log(" SUCCESS adding product.");
$("#prodName").val("");
$("#prodCategory").val("");
$("#prodStore").val("");
$("#prodLocation").val("");
}
});
}
@ -71,7 +75,7 @@ Template.prodMgmtForm.events({
$("#prodName").val("");
$("#prodCategory").val("");
$("#prodStore").val("");
$("#prodLocation").val("")
$("#prodLocation").val("");
},
'change #prodStore' (event) {
event.preventDefault();
@ -81,7 +85,6 @@ Template.prodMgmtForm.events({
$("#prodStore").val("");
// open a modal to enter store information.
$('#modalStore').modal('open');
}
},
'change #prodLocation' (event) {
@ -98,10 +101,13 @@ Template.prodMgmtForm.events({
event.preventDefault();
let val = $("#prodCategory").val();
if (val == "addNewCategory") {
if (val == "addNewCat") {
$("#prodCategory").val("");
// open a modal to enter store information.
$('#modalCategory').modal('open');
}
},
'click .modal-close' (event) {
$('select').formSelect();
}
});