kanban dashboard refactor

This commit is contained in:
Mazyar
2026-05-27 22:06:23 +03:30
parent 42cd0452ce
commit ce2dc7a61b
12 changed files with 457 additions and 176 deletions
+19 -17
View File
@@ -7,9 +7,9 @@ import (
// Board represents a kanban board
type Board struct {
mongo.Model `bson:",inline"`
Name string `bson:"name" json:"name"`
Description string `bson:"description" json:"description"`
mongo.Model `bson:",inline"`
Name string `bson:"name" json:"name"`
Description string `bson:"description" json:"description"`
Columns []Column `bson:"columns" json:"columns"`
IsDefault bool `bson:"is_default" json:"is_default"` // Whether this is the default board
UserID string `bson:"user_id" json:"user_id"` // User who owns this board
@@ -17,24 +17,26 @@ type Board struct {
// Column represents a column on a kanban board
type Column struct {
mongo.Model `bson:",inline"`
BoardID string `bson:"board_id" json:"board_id"`
Name string `bson:"name" json:"name"`
Order int `bson:"order" json:"order"` // Display order in the board
Color string `bson:"color" json:"color"` // Hex color code for the column
Limit *int `bson:"limit,omitempty" json:"limit,omitempty"` // WIP limit (optional)
mongo.Model `bson:",inline"`
BoardID string `bson:"board_id" json:"board_id"`
Name string `bson:"name" json:"name"`
Status string `bson:"status" json:"status"`
StatusCategory string `bson:"status_category" json:"status_category"`
Order int `bson:"order" json:"order"` // Display order in the board
Color string `bson:"color" json:"color"` // Hex color code for the column
Limit *int `bson:"limit,omitempty" json:"limit,omitempty"` // WIP limit (optional)
}
// Card represents a card on a kanban board (references a tender)
type Card struct {
mongo.Model `bson:",inline"`
ColumnID string `bson:"column_id" json:"column_id"`
TenderID string `bson:"tender_id" json:"tender_id"` // Reference to the tender
Title string `bson:"title" json:"title"` // Cached title from tender
Order int `bson:"order" json:"order"` // Position within the column
Priority CardPriority `bson:"priority" json:"priority"`
Labels []string `bson:"labels,omitempty" json:"labels,omitempty"`
DueDate *int64 `bson:"due_date,omitempty" json:"due_date,omitempty"` // Unix timestamp
mongo.Model `bson:",inline"`
ColumnID string `bson:"column_id" json:"column_id"`
TenderID string `bson:"tender_id" json:"tender_id"` // Reference to the tender
Title string `bson:"title" json:"title"` // Cached title from tender
Order int `bson:"order" json:"order"` // Position within the column
Priority CardPriority `bson:"priority" json:"priority"`
Labels []string `bson:"labels,omitempty" json:"labels,omitempty"`
DueDate *int64 `bson:"due_date,omitempty" json:"due_date,omitempty"` // Unix timestamp
}
// CardPriority represents the priority level of a card