mirror of
https://github.com/plankanban/planka.git
synced 2025-08-02 20:15:27 +02:00
ref: Little refactoring
This commit is contained in:
parent
70cadcd974
commit
3aba4d4a56
14 changed files with 123 additions and 52 deletions
|
@ -48,16 +48,16 @@ module.exports = {
|
|||
stopwatch: {
|
||||
type: 'json',
|
||||
},
|
||||
isClosed: {
|
||||
type: 'boolean',
|
||||
defaultsTo: false,
|
||||
columnName: 'is_closed',
|
||||
},
|
||||
commentsTotal: {
|
||||
type: 'number',
|
||||
defaultsTo: 0,
|
||||
columnName: 'comments_total',
|
||||
},
|
||||
isClosed: {
|
||||
type: 'boolean',
|
||||
defaultsTo: false,
|
||||
columnName: 'is_closed',
|
||||
},
|
||||
listChangedAt: {
|
||||
type: 'ref',
|
||||
columnName: 'list_changed_at',
|
||||
|
|
|
@ -17,6 +17,11 @@ const Types = {
|
|||
TRASH: 'trash',
|
||||
};
|
||||
|
||||
const TypeStates = {
|
||||
OPENED: 'opened',
|
||||
CLOSED: 'closed',
|
||||
};
|
||||
|
||||
const SortFieldNames = {
|
||||
NAME: 'name',
|
||||
DUE_DATE: 'dueDate',
|
||||
|
@ -31,6 +36,11 @@ const SortOrders = {
|
|||
|
||||
const FINITE_TYPES = [Types.ACTIVE, Types.CLOSED];
|
||||
|
||||
const TYPE_STATE_BY_TYPE = {
|
||||
[Types.ACTIVE]: TypeStates.OPENED,
|
||||
[Types.CLOSED]: Types.CLOSED,
|
||||
};
|
||||
|
||||
const COLORS = [
|
||||
'berry-red',
|
||||
'pumpkin-orange',
|
||||
|
@ -46,9 +56,11 @@ const COLORS = [
|
|||
|
||||
module.exports = {
|
||||
Types,
|
||||
TypeStates,
|
||||
SortFieldNames,
|
||||
SortOrders,
|
||||
FINITE_TYPES,
|
||||
TYPE_STATE_BY_TYPE,
|
||||
COLORS,
|
||||
|
||||
attributes: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue