-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Enable drag-and-drop task reordering within status columns 🔄 (#156
) This update introduces the ability to reorder tasks within status columns using drag-and-drop functionality. Tasks now maintain their order through WBS codes, with visual indicators showing drop positions. A database migration removes the unique constraint on WBS codes to support this feature. Key changes: - Add reorderTasksInStatus server action - Implement drag-and-drop reordering UI with visual guides - Remove unique constraint on WBS codes - Sort tasks by WBS code in status columns 🧙♀️ "Dorothy would be proud - we're not in static task orders anymore! Now our tasks can dance down the yellow brick road in any order they choose ✨"
- Loading branch information
1 parent
4684624
commit dc50b2b
Showing
5 changed files
with
213 additions
and
19 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
server/migrations/20250103224828_remove_wbs_code_unique_constraint.cjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* Remove unique constraint on wbs_code in project_tasks table | ||
* @param { import("knex").Knex } knex | ||
* @returns { Promise<void> } | ||
*/ | ||
exports.up = async function(knex) { | ||
await knex.schema.alterTable('project_tasks', table => { | ||
table.dropUnique(['tenant', 'phase_id', 'wbs_code'], 'project_tasks_tenant_phase_id_wbs_code_unique'); | ||
}); | ||
}; | ||
|
||
/** | ||
* Restore unique constraint on wbs_code in project_tasks table | ||
* @param { import("knex").Knex } knex | ||
* @returns { Promise<void> } | ||
*/ | ||
exports.down = async function(knex) { | ||
await knex.schema.alterTable('project_tasks', table => { | ||
table.unique(['tenant', 'phase_id', 'wbs_code'], 'project_tasks_tenant_phase_id_wbs_code_unique'); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters