Calculation recorsively up completed!
This commit is contained in:
@@ -41,7 +41,7 @@ var ProjectSchema = new mongoose.Schema({
|
||||
priority: {
|
||||
type: Number,
|
||||
},
|
||||
status: {
|
||||
statusproj: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
|
||||
@@ -32,7 +32,7 @@ var TodoSchema = new mongoose.Schema({
|
||||
priority: {
|
||||
type: Number,
|
||||
},
|
||||
status: {
|
||||
statustodo: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
|
||||
@@ -75,7 +75,7 @@ const userjson = JSON.stringify(users[0]);
|
||||
const todos = [{
|
||||
_id: new ObjectID(),
|
||||
category: "personal",
|
||||
status: 0,
|
||||
statustodo: 0,
|
||||
completed_at: new Date(),
|
||||
created_at: new Date(),
|
||||
descr: "Primo Task Esempio",
|
||||
@@ -91,7 +91,7 @@ const todos = [{
|
||||
}, {
|
||||
_id: new ObjectID(),
|
||||
category: "personal",
|
||||
status: 0,
|
||||
statustodo: 0,
|
||||
completed_at: new Date(),
|
||||
created_at: new Date(),
|
||||
descr: "Secondo Task Esempio",
|
||||
@@ -107,7 +107,7 @@ const todos = [{
|
||||
}, {
|
||||
_id: new ObjectID(),
|
||||
category: "personal",
|
||||
status: 0,
|
||||
statustodo: 0,
|
||||
completed_at: new Date(),
|
||||
created_at: new Date(),
|
||||
descr: "Terzo Task Esempio",
|
||||
@@ -123,7 +123,7 @@ const todos = [{
|
||||
}, { // RECORD CHE VERRA' UTILIZZATO PER AGGIUNGERE UN NUOVO TASK
|
||||
_id: new ObjectID(),
|
||||
category: "personal",
|
||||
status: 0,
|
||||
statustodo: 0,
|
||||
completed_at: new Date(),
|
||||
created_at: new Date(),
|
||||
descr: "Nuovo Quarto Task Esempio da Inserire",
|
||||
|
||||
@@ -327,7 +327,7 @@ if (testsingolo) {
|
||||
.set('x-auth', users[0].tokens[0].token)
|
||||
.expect(404)
|
||||
.expect((res) => {
|
||||
console.log('res', res.status)
|
||||
console.log('res', res.statustodo);
|
||||
expect(res.body.todos).toBe(undefined);
|
||||
})
|
||||
.end(done);
|
||||
@@ -393,13 +393,13 @@ if (testsingolo) {
|
||||
.patch(`/todos/${hexId}`)
|
||||
.set('x-auth', users[0].tokens[0].token)
|
||||
.send({
|
||||
status: 1,
|
||||
statustodo: 1,
|
||||
descr
|
||||
})
|
||||
.expect(200)
|
||||
.expect((res) => {
|
||||
expect(res.body.todo.descr).toBe(descr);
|
||||
expect(res.body.todo.status).toBe(1);
|
||||
expect(res.body.todo.statustodo).toBe(1);
|
||||
// expect(res.body.todo.completedAt).toBeA('number');
|
||||
})
|
||||
.end(done);
|
||||
@@ -413,7 +413,7 @@ if (testsingolo) {
|
||||
.patch(`/todos/${hexId}`)
|
||||
.set('x-auth', users[1].tokens[0].token)
|
||||
.send({
|
||||
status: 1,
|
||||
statustodo: 1,
|
||||
descr
|
||||
})
|
||||
.expect(404)
|
||||
|
||||
@@ -51,7 +51,7 @@ module.exports = {
|
||||
},
|
||||
|
||||
allfieldTodo: function () {
|
||||
return ['userId', 'pos', 'category', 'descr', 'priority', 'status', 'created_at', 'modify_at',
|
||||
return ['userId', 'pos', 'category', 'descr', 'priority', 'statustodo', 'created_at', 'modify_at',
|
||||
'completed_at', 'expiring_at', 'enableExpiring', 'id_prev', 'progress', 'modified', 'phase', 'assigned_to_userId', 'hoursplanned', 'hoursworked', 'start_date']
|
||||
},
|
||||
|
||||
@@ -61,7 +61,7 @@ module.exports = {
|
||||
|
||||
// #TODO Projects++ Add fields ...
|
||||
allfieldProject: function () {
|
||||
return ['userId', 'pos', 'id_parent', 'descr', 'longdescr', 'hoursplanned', 'hoursworked', 'priority', 'status', 'created_at', 'modify_at',
|
||||
return ['userId', 'pos', 'id_parent', 'descr', 'longdescr', 'hoursplanned', 'hoursworked', 'priority', 'statusproj', 'created_at', 'modify_at',
|
||||
'completed_at', 'expiring_at', 'enableExpiring', 'id_prev', 'progressCalc', 'modified', 'live_url', 'test_url', 'begin_development', 'begin_test']
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user