Worker module fixes
This commit is contained in:
parent
1bcaf27563
commit
e63e4319cd
|
@ -1,4 +1,7 @@
|
|||
{
|
||||
"Department": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"Worker": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"name": "Department",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "department"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"id": {
|
||||
"id": true,
|
||||
"type": "Number"
|
||||
},
|
||||
"name": {
|
||||
"type": "String"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"father": {
|
||||
"type": "belongsTo",
|
||||
"model": "Department",
|
||||
"foreignKey": "fatherFk"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -11,8 +11,8 @@
|
|||
"id": true,
|
||||
"type": "Number"
|
||||
},
|
||||
"department": {
|
||||
"type": "String"
|
||||
"departmentFk": {
|
||||
"type": "Number"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
|
@ -20,6 +20,11 @@
|
|||
"type": "belongsTo",
|
||||
"model": "Worker",
|
||||
"foreignKey": "workerFk"
|
||||
},
|
||||
"department": {
|
||||
"type": "belongsTo",
|
||||
"model": "Department",
|
||||
"foreignKey": "departmentFk"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,31 +1,31 @@
|
|||
{
|
||||
"name": "WorkerTeam",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "workerTeam"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "Number",
|
||||
"id": true,
|
||||
"description": "Identifier"
|
||||
"name": "WorkerTeam",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "workerTeam"
|
||||
}
|
||||
},
|
||||
"team": {
|
||||
"type": "Number"
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"user": {
|
||||
"type": "belongsTo",
|
||||
"model": "Account",
|
||||
"foreignKey": "userFk"
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "Number",
|
||||
"id": true,
|
||||
"description": "Identifier"
|
||||
},
|
||||
"team": {
|
||||
"type": "Number"
|
||||
}
|
||||
},
|
||||
"worker": {
|
||||
"type": "belongsTo",
|
||||
"model": "Worker",
|
||||
"foreignKey": "Id_Trabajador"
|
||||
"relations": {
|
||||
"user": {
|
||||
"type": "belongsTo",
|
||||
"model": "Account",
|
||||
"foreignKey": "userFk"
|
||||
},
|
||||
"worker": {
|
||||
"type": "belongsTo",
|
||||
"model": "Worker",
|
||||
"foreignKey": "Id_Trabajador"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,59 +1,59 @@
|
|||
{
|
||||
"name": "Worker",
|
||||
"description": "Company employees",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "worker"
|
||||
"name": "Worker",
|
||||
"description": "Company employees",
|
||||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "worker"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "Number",
|
||||
"id": true,
|
||||
"description": "Identifier"
|
||||
},
|
||||
"firstName": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"phone": {
|
||||
"type" : "String"
|
||||
},
|
||||
"userFk": {
|
||||
"type" : "Number",
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"user": {
|
||||
"type": "belongsTo",
|
||||
"model": "Account",
|
||||
"foreignKey": "userFk"
|
||||
},
|
||||
"client": {
|
||||
"type": "belongsTo",
|
||||
"model": "Client",
|
||||
"foreignKey": "userFk"
|
||||
},
|
||||
"sip": {
|
||||
"type": "belongsTo",
|
||||
"model": "Sip",
|
||||
"foreignKey": "userFk"
|
||||
},
|
||||
"department": {
|
||||
"type": "belongsTo",
|
||||
"model": "WorkerDepartment",
|
||||
"foreignKey": "id"
|
||||
},
|
||||
"collegues": {
|
||||
"type": "hasMany",
|
||||
"model": "WorkerTeamCollegues",
|
||||
"foreignKey": "workerFk"
|
||||
}
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "Number",
|
||||
"id": true,
|
||||
"description": "Identifier"
|
||||
},
|
||||
"firstName": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"phone": {
|
||||
"type" : "String"
|
||||
},
|
||||
"userFk": {
|
||||
"type" : "Number",
|
||||
"required": true
|
||||
}
|
||||
},
|
||||
"relations": {
|
||||
"user": {
|
||||
"type": "belongsTo",
|
||||
"model": "Account",
|
||||
"foreignKey": "userFk"
|
||||
},
|
||||
"client": {
|
||||
"type": "belongsTo",
|
||||
"model": "Client",
|
||||
"foreignKey": "userFk"
|
||||
},
|
||||
"sip": {
|
||||
"type": "belongsTo",
|
||||
"model": "Sip",
|
||||
"foreignKey": "userFk"
|
||||
},
|
||||
"department": {
|
||||
"type": "belongsTo",
|
||||
"model": "WorkerDepartment",
|
||||
"foreignKey": "id"
|
||||
},
|
||||
"collegues": {
|
||||
"type": "hasMany",
|
||||
"model": "WorkerTeamCollegues",
|
||||
"foreignKey": "workerFk"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -22,9 +22,6 @@ class Controller {
|
|||
}, {
|
||||
relation: 'client',
|
||||
scope: {fields: ['fi']}
|
||||
}, {
|
||||
relation: 'department',
|
||||
scope: {fields: ['department']}
|
||||
}, {
|
||||
relation: 'sip',
|
||||
scope: {fields: ['extension']}
|
||||
|
|
|
@ -12,9 +12,6 @@ export default class Controller {
|
|||
}, {
|
||||
relation: 'client',
|
||||
scope: {fields: ['fi']}
|
||||
}, {
|
||||
relation: 'department',
|
||||
scope: {fields: ['department']}
|
||||
}
|
||||
]
|
||||
});
|
||||
|
|
|
@ -32,9 +32,6 @@ class Controller {
|
|||
}, {
|
||||
relation: 'client',
|
||||
scope: {fields: ['fi']}
|
||||
}, {
|
||||
relation: 'department',
|
||||
scope: {fields: ['department']}
|
||||
}, {
|
||||
relation: 'sip',
|
||||
scope: {fields: ['extension']}
|
||||
|
|
|
@ -117,7 +117,7 @@ let devConfig = {
|
|||
new webpack.HotModuleReplacementPlugin()
|
||||
],
|
||||
devServer: {
|
||||
host: 'localhost',
|
||||
host: '0.0.0.0',
|
||||
port: 5000,
|
||||
publicPath: '/',
|
||||
contentBase: 'dist',
|
||||
|
|
Loading…
Reference in New Issue