Additional models
This commit is contained in:
parent
45ecb6fdde
commit
a6f23951a5
@ -1,4 +1,5 @@
|
||||
export * from './top-nav/top-nav.component';
|
||||
export * from './inline-edit/inline-edit.component';
|
||||
export * from './auth/index';
|
||||
export * from './models/index';
|
||||
export * from './notifications/index';
|
||||
|
||||
@ -1,3 +1,7 @@
|
||||
import { Column } from './column.model';
|
||||
import { Category } from './category.model';
|
||||
import { IssueTracker } from './issue-tracker.model';
|
||||
|
||||
export class Board {
|
||||
constructor(public id: number = 0,
|
||||
public name: string = '',
|
||||
@ -5,7 +9,24 @@ export class Board {
|
||||
public columns = [],
|
||||
public categories = [],
|
||||
public auto_actions = [],
|
||||
public issue_trackers = [],
|
||||
public users = []) {
|
||||
}
|
||||
|
||||
addColumn(name: string): void {
|
||||
let column = new Column();
|
||||
column.name = name;
|
||||
column.position = this.columns.length;
|
||||
|
||||
this.columns.push(column);
|
||||
}
|
||||
|
||||
addCategory(name: string, color: string): void {
|
||||
this.categories.push(new Category(0, name, color, 0));
|
||||
}
|
||||
|
||||
addIssueTracker(url: string, regex: string): void {
|
||||
this.issue_trackers.push(new IssueTracker(0, url, regex));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
8
src/app/shared/models/category.model.ts
Normal file
8
src/app/shared/models/category.model.ts
Normal file
@ -0,0 +1,8 @@
|
||||
export class Category {
|
||||
constructor(public id: number = 0,
|
||||
public name: string = '',
|
||||
public default_task_color: string = '',
|
||||
public board_id: number = 0) {
|
||||
}
|
||||
}
|
||||
|
||||
9
src/app/shared/models/column.model.ts
Normal file
9
src/app/shared/models/column.model.ts
Normal file
@ -0,0 +1,9 @@
|
||||
export class Column {
|
||||
constructor(public id: number = 0,
|
||||
public name: string = '',
|
||||
public position: number = 0,
|
||||
public board_id: number = 0,
|
||||
public tasks = []) {
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
export * from './user.model';
|
||||
export * from './board.model';
|
||||
export * from './column.model';
|
||||
export * from './issue-tracker.model';
|
||||
export * from './api-response.model';
|
||||
export * from './notification.model';
|
||||
export * from './user-options.model';
|
||||
|
||||
6
src/app/shared/models/issue-tracker.model.ts
Normal file
6
src/app/shared/models/issue-tracker.model.ts
Normal file
@ -0,0 +1,6 @@
|
||||
export class IssueTracker {
|
||||
constructor(public id: number = 0,
|
||||
public url: string = '',
|
||||
public regex: string = '') {
|
||||
}
|
||||
}
|
||||
@ -85,18 +85,33 @@
|
||||
}
|
||||
}
|
||||
|
||||
.double-edit .first {
|
||||
.inline-edit {
|
||||
margin-right: 1%;
|
||||
width: 70%;
|
||||
}
|
||||
|
||||
[type="text"] {
|
||||
width: 95%;
|
||||
}
|
||||
}
|
||||
|
||||
.double-edit .last {
|
||||
.inline-edit {
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
[type="text"] {
|
||||
width: 86%;
|
||||
}
|
||||
}
|
||||
|
||||
.users {
|
||||
.user-select {
|
||||
display: inline-block;
|
||||
margin-bottom: .3em;
|
||||
margin-top: 0;
|
||||
width: 33%;
|
||||
|
||||
span {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
label {
|
||||
margin-top: auto;
|
||||
}
|
||||
}
|
||||
|
||||
label {
|
||||
@ -141,7 +156,8 @@
|
||||
}
|
||||
|
||||
.badge {
|
||||
margin-right: 5px;
|
||||
margin-left: 5px;
|
||||
margin-right: 13px;
|
||||
}
|
||||
|
||||
.icon-trash-empty,
|
||||
@ -150,6 +166,23 @@
|
||||
}
|
||||
}
|
||||
|
||||
.inline-edit {
|
||||
display: inline-block;
|
||||
width: 82%;
|
||||
|
||||
.icon {
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
[type="text"] {
|
||||
height: 1em;
|
||||
margin: 0;
|
||||
width: 90%;
|
||||
}
|
||||
}
|
||||
|
||||
.icon-resize-vertical {
|
||||
border-right: 1px solid $color-border;
|
||||
cursor: move;
|
||||
|
||||
Reference in New Issue
Block a user