Skip to content

Commit

Permalink
Manual Confirmation Implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Brijesh committed Aug 21, 2023
1 parent d3b53a1 commit 3edb367
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
exports.up = async function(knex) {
await knex.raw(`
ALTER TABLE plan_confirmation ADD is_manual_confirmation boolean NULL DEFAULT false;
`);

};

exports.down = async function(knex) {
await knex.raw(`
ALTER TABLE plan_confirmation DROP COLUMN is_manual_confirmation;
`);
};
4 changes: 2 additions & 2 deletions src/libs/db2/model/planconfirmation.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default class PlanConfirmation extends Model {
}

static get fields() {
return ['id', 'plan_id', 'client_id', 'confirmed', 'created_at', 'updated_at', 'user_id', 'is_own_signature'];
return ['id', 'plan_id', 'client_id', 'confirmed', 'created_at', 'updated_at', 'user_id', 'is_own_signature', 'is_manual_confirmation'];
}

static get table() {
Expand Down Expand Up @@ -70,4 +70,4 @@ export default class PlanConfirmation extends Model {
const records = await Promise.all(promises);
return records;
}
}
}
6 changes: 3 additions & 3 deletions src/router/controllers_v1/PlanStatusController.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ export default class PlanStatusController {
} catch (err) {
logger.error(`PlanStatusController: update: fail with error: ${err.message} `);
throw err;
}
}

}

/**
* Update plan amendment
* @param {*} req : express req
Expand Down Expand Up @@ -281,4 +281,4 @@ export default class PlanStatusController {
throw err;
}
}
}
}
2 changes: 1 addition & 1 deletion src/router/routes_v1/plan.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,4 +213,4 @@ router.put('/:planId?/management-consideration/:considerationId?', asyncMiddlewa
// Delete a management consideration
router.delete('/:planId?/management-consideration/:considerationId?', asyncMiddleware(PlanManagementConsiderationController.destroy));

module.exports = router;
module.exports = router;

0 comments on commit 3edb367

Please sign in to comment.