Added begin_development and begin_test
Added status (changed completed field) fixed internet status connection.
This commit is contained in:
@@ -39,9 +39,9 @@ var ProjectSchema = new mongoose.Schema({
|
||||
priority: {
|
||||
type: Number,
|
||||
},
|
||||
completed: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
status: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
created_at: {
|
||||
type: Date
|
||||
@@ -68,6 +68,18 @@ var ProjectSchema = new mongoose.Schema({
|
||||
modified: {
|
||||
type: Boolean,
|
||||
},
|
||||
live_url: {
|
||||
type: String,
|
||||
},
|
||||
test_url: {
|
||||
type: String,
|
||||
},
|
||||
begin_development: {
|
||||
type: Date,
|
||||
},
|
||||
begin_test: {
|
||||
type: Date,
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -30,9 +30,9 @@ var TodoSchema = new mongoose.Schema({
|
||||
priority: {
|
||||
type: Number,
|
||||
},
|
||||
completed: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
status: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
created_at: {
|
||||
type: Date
|
||||
|
||||
@@ -75,7 +75,7 @@ const userjson = JSON.stringify(users[0]);
|
||||
const todos = [{
|
||||
_id: new ObjectID(),
|
||||
category: "personal",
|
||||
completed: false,
|
||||
status: 0,
|
||||
completed_at: new Date(),
|
||||
created_at: new Date(),
|
||||
descr: "Primo Task Esempio",
|
||||
@@ -91,7 +91,7 @@ const todos = [{
|
||||
}, {
|
||||
_id: new ObjectID(),
|
||||
category: "personal",
|
||||
completed: false,
|
||||
status: 0,
|
||||
completed_at: new Date(),
|
||||
created_at: new Date(),
|
||||
descr: "Secondo Task Esempio",
|
||||
@@ -107,7 +107,7 @@ const todos = [{
|
||||
}, {
|
||||
_id: new ObjectID(),
|
||||
category: "personal",
|
||||
completed: false,
|
||||
status: 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",
|
||||
completed: false,
|
||||
status: 0,
|
||||
completed_at: new Date(),
|
||||
created_at: new Date(),
|
||||
descr: "Nuovo Quarto Task Esempio da Inserire",
|
||||
|
||||
@@ -393,13 +393,13 @@ if (testsingolo) {
|
||||
.patch(`/todos/${hexId}`)
|
||||
.set('x-auth', users[0].tokens[0].token)
|
||||
.send({
|
||||
completed: true,
|
||||
status: 1,
|
||||
descr
|
||||
})
|
||||
.expect(200)
|
||||
.expect((res) => {
|
||||
expect(res.body.todo.descr).toBe(descr);
|
||||
expect(res.body.todo.completed).toBe(true);
|
||||
expect(res.body.todo.status).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({
|
||||
completed: true,
|
||||
status: 1,
|
||||
descr
|
||||
})
|
||||
.expect(404)
|
||||
|
||||
@@ -49,7 +49,7 @@ module.exports = {
|
||||
},
|
||||
|
||||
allfieldTodo: function () {
|
||||
return ['userId', 'pos', 'category', 'descr', 'priority', 'completed', 'created_at', 'modify_at',
|
||||
return ['userId', 'pos', 'category', 'descr', 'priority', 'status', 'created_at', 'modify_at',
|
||||
'completed_at', 'expiring_at', 'enableExpiring', 'id_prev', 'progress', 'modified']
|
||||
},
|
||||
|
||||
@@ -59,8 +59,8 @@ module.exports = {
|
||||
|
||||
// #TODO Projects++ Add fields ...
|
||||
allfieldProject: function () {
|
||||
return ['userId', 'pos', 'id_parent', 'descr', 'longdescr', 'hoursplanned', 'hoursworked', 'priority', 'completed', 'created_at', 'modify_at',
|
||||
'completed_at', 'expiring_at', 'enableExpiring', 'id_prev', 'progressCalc', 'modified']
|
||||
return ['userId', 'pos', 'id_parent', 'descr', 'longdescr', 'hoursplanned', 'hoursworked', 'priority', 'status', 'created_at', 'modify_at',
|
||||
'completed_at', 'expiring_at', 'enableExpiring', 'id_prev', 'progressCalc', 'modified', 'live_url', 'test_url', 'begin_development', 'begin_test']
|
||||
},
|
||||
|
||||
allfieldProjectWithId: function () {
|
||||
|
||||
Reference in New Issue
Block a user