Hi All,
I am facing a challenge and giving a brief intro for better understanding of the problem:
I am working on a functionality, where a DB table is having a field status with valid choices as assigned and un-assigned .
I have used ListView class to display the model data as a table and added a column which has a button called “Assign”.
On clicking on assign an Assignment form will open up and they can submit. Once this form is submitted the status will change to assigned and the assignment button will disappear. All this is fine and done already.
-
Now the challenge is to design such that whichever user clicks on assign first will get the option to assign it only and any consecutive users who try to click on assign will not be allowed to assign.
-
Also there has to be check in the “Assignment form” submit (POST method) view to check if that process status is already updated to “Assigned”.
This problem mainly arises when 2 users have opened the page some time back and without refreshing the page they are trying to click on “Assign” button.
It would be life saving if someone can help me out with this.