feat: Adding warehouse role to user, fix: when creating new employee genKey error
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
'user strict';
|
||||
const { ROOT_PATH, HANDLERS_PATH, LIB_PATH } = process.env;
|
||||
const { getModel } = require( '../Models' );
|
||||
const { GenericHandler } = require( `${ROOT_PATH}/${HANDLERS_PATH}/Generic.handler.js` );
|
||||
const { getPagination } = require( `${ROOT_PATH}/${LIB_PATH}/Misc.js` );
|
||||
const { GenericHandler } = require( '../Handlers/Generic.handler' );
|
||||
const { getPagination, genKey } = require( '../../lib/Misc' );
|
||||
|
||||
const usersModel = getModel('users');
|
||||
const companiesModel = getModel('companies');
|
||||
|
||||
@@ -27,7 +27,7 @@ const schema = new Schema({
|
||||
dob: { type: String },
|
||||
|
||||
// vehicle_status: { type: String, enum: ['Free', 'Loading', 'Moving', 'Downloading'] },
|
||||
job_role: { type: String, enum : [ 'admin', 'owner', 'manager', 'driver', 'staff' ] },
|
||||
job_role: { type: String, enum : [ 'admin', 'owner', 'manager', 'driver', 'staff', 'warehouse' ] },
|
||||
|
||||
employee_id: { type: String }, //EM-1000-1 EM-1000-2
|
||||
company: { type: Schema.Types.ObjectId, ref: 'companies' },
|
||||
|
||||
Reference in New Issue
Block a user