mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
feat: Colorize due date and make it toggleable (#845)
This commit is contained in:
parent
198518a51a
commit
c4c6d738a5
12 changed files with 207 additions and 38 deletions
|
@ -57,6 +57,9 @@ module.exports = {
|
|||
type: 'string',
|
||||
custom: dueDateValidator,
|
||||
},
|
||||
dueCompleted: {
|
||||
type: 'boolean',
|
||||
},
|
||||
stopwatch: {
|
||||
type: 'json',
|
||||
custom: stopwatchValidator,
|
||||
|
@ -95,7 +98,14 @@ module.exports = {
|
|||
throw Errors.NOT_ENOUGH_RIGHTS;
|
||||
}
|
||||
|
||||
const values = _.pick(inputs, ['position', 'name', 'description', 'dueDate', 'stopwatch']);
|
||||
const values = _.pick(inputs, [
|
||||
'position',
|
||||
'name',
|
||||
'description',
|
||||
'dueDate',
|
||||
'dueCompleted',
|
||||
'stopwatch',
|
||||
]);
|
||||
|
||||
const card = await sails.helpers.cards.createOne
|
||||
.with({
|
||||
|
|
|
@ -80,6 +80,9 @@ module.exports = {
|
|||
custom: dueDateValidator,
|
||||
allowNull: true,
|
||||
},
|
||||
dueCompleted: {
|
||||
type: 'boolean',
|
||||
},
|
||||
stopwatch: {
|
||||
type: 'json',
|
||||
custom: stopwatchValidator,
|
||||
|
@ -173,6 +176,7 @@ module.exports = {
|
|||
'name',
|
||||
'description',
|
||||
'dueDate',
|
||||
'dueCompleted',
|
||||
'stopwatch',
|
||||
'isSubscribed',
|
||||
]);
|
||||
|
|
|
@ -77,6 +77,7 @@ module.exports = {
|
|||
'name',
|
||||
'description',
|
||||
'dueDate',
|
||||
'dueCompleted',
|
||||
'stopwatch',
|
||||
]),
|
||||
...values,
|
||||
|
|
|
@ -28,6 +28,11 @@ module.exports = {
|
|||
type: 'ref',
|
||||
columnName: 'due_date',
|
||||
},
|
||||
dueCompleted: {
|
||||
type: 'boolean',
|
||||
defaultsTo: false,
|
||||
columnName: 'due_completed',
|
||||
},
|
||||
stopwatch: {
|
||||
type: 'json',
|
||||
},
|
||||
|
|
12
server/db/migrations/20240812065305_add_due_completion.js.js
Normal file
12
server/db/migrations/20240812065305_add_due_completion.js.js
Normal file
|
@ -0,0 +1,12 @@
|
|||
module.exports.up = async (knex) =>
|
||||
knex.schema.table('card', (table) => {
|
||||
/* Columns */
|
||||
|
||||
table.boolean('due_completed').notNullable().defaultTo(false);
|
||||
});
|
||||
|
||||
module.exports.down = async (knex) => {
|
||||
await knex.schema.table('card', (table) => {
|
||||
table.dropColumn('due_completed');
|
||||
});
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue