I'm currently developing a comprehensive full-stack application designed to function as a task and project management tool. It features a table layout with a convenient drag and drop functionality that enables upper-management to easily re-prioritize tasks and projects. The interface presented to upper-management is as follows:
-----------------------------------------
|Priority| Task | Resource|
-----------------------------------------
| 1 | Write some code | Arya S. |
-----------------------------------------
| 2 | Write a spec. | Bran S. |
-----------------------------------------
| 3 | Write some code | Bran S. |
-----------------------------------------
...and so on for over 100 tasks. Each assigned resource has the ability to log in and view only their designated tasks. For example, if Bran logs in:
-----------------------------------------
|Priority| Task | Resource|
-----------------------------------------
| 2 | Write a spec. | Bran S. |
-----------------------------------------
| 3 | Write some code | Bran S. |
-----------------------------------------
The priority column corresponds to a column in our SQL Server database. I am looking for a way to utilize SQL to adjust the priority (either through the middle-tier JAVA code or using a SQL view) so that 'Bran S.' sees his priorities starting from 1. The desired outcome would be:
-----------------------------------------
|Priority| Task | Resource|
-----------------------------------------
| 1 | Write a spec. | Bran S. |
-----------------------------------------
| 2 | Write some code | Bran S. |
-----------------------------------------
I am hoping to avoid using JQuery/DOM manipulation as it can be inefficient and result in a complex system with numerous interconnected components. Any recommendations or guidance on how to achieve this objective would be highly appreciated!