mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
Adding more methods and views, updated dashboards a bit. Still not ready
This commit is contained in:
parent
266dbd0856
commit
42643a37f5
23 changed files with 374 additions and 32 deletions
35
client/AdminMgmt/StoreMgmt/storeMgmtForm.js
Normal file
35
client/AdminMgmt/StoreMgmt/storeMgmtForm.js
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
import { Stores } from '../../../imports/api/stores';
|
||||
|
||||
Template.storeMgmtForm.onCreated(function() {
|
||||
this.subscribe("storeInfo");
|
||||
});
|
||||
|
||||
Template.storeMgmtForm.onRendered(function() {
|
||||
Session.set("borderRed", false);
|
||||
});
|
||||
|
||||
Template.storeMgmtForm.helpers({
|
||||
|
||||
});
|
||||
|
||||
Template.storeMgmtForm.events({
|
||||
'click .saveStoreMgmt' (event) {
|
||||
event.preventDefault();
|
||||
let storeName = $("#storeName").val();
|
||||
let storeType = $("#storeType").val();
|
||||
if (storeName == "" || storeName == null) {
|
||||
Session.set("borderRed", true);
|
||||
return;
|
||||
} else {
|
||||
Meteor.call("add.store", storeName, storeType, function(err, result) {
|
||||
if (err) {
|
||||
// console.log("ERROR: Store add failed: " + err);
|
||||
} else {
|
||||
// console.log("Success adding store!");
|
||||
$("#storeName").val("");
|
||||
$("#storeType").val("");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue