Major changes to the structure of pages to utilize the flex layout system.

This commit is contained in:
Wynne Crisman
2016-11-19 19:39:02 -08:00
parent 46ef9680c3
commit 4315418aa1
64 changed files with 3590 additions and 16015 deletions

View File

@@ -29,14 +29,10 @@ module.exports = function(sequelize, DataTypes) {
updatedAt: {
type: DataTypes.DATE,
allowNull: false
},
deletedAt: {
type: DataTypes.DATE,
allowNull: true
}
}, {
freezeTableName: true, // Model tableName will be the same as the model name
paranoid: true,
paranoid: false,
classMethods: {
associate: function(models) {
Sale.belongsTo(models.Item, {as: 'item', foreignKey: {name: 'itemId', field: 'itemId'}});

View File

@@ -14,10 +14,10 @@ module.exports = function(sequelize, DataTypes) {
login: {
type: DataTypes.STRING
},
password: {
password: { //Note: The salt should be stored as part of the hash.
type: DataTypes.STRING,
set: function(val) {
this.setDataValue('password', sequelize.models.User.generateHash(val));
this.setDataValue('password', bcrypt.hashSync(val, bcrypt.genSaltSync(8), null));
}
},
admin: {
@@ -35,16 +35,8 @@ module.exports = function(sequelize, DataTypes) {
freezeTableName: true, // Model tableName will be the same as the model name
//paranoid: true, //Keep deleted data but flag it as deleted
comment: "A system user authorized to access and manipulate the application data.",
classMethods: {
generateHash: function(password) {
return bcrypt.hashSync(password, bcrypt.genSaltSync(8), null);
}
},
instanceMethods: {
generateHash: function(password) {
return bcrypt.hashSync(password, bcrypt.genSaltSync(8), null);
},
validPassword: function(password) {
isPasswordValid: function(password) {
return bcrypt.compareSync(password, this.password);
}
}