Script for Google Sheets to Move Row to New Sheet

I am having some issues with a shop schedule I am trying to set up. I would like to have en entire row be moved the corresponding new tab when certain data is entered into column "J". I have included an editable link for a sample sheet I created that also helps explain what I am trying to do.

If possible, it would also be helpful to be able to make the backgrounds change to the colors on the sample sheet as well.

This is a crude code that will work, however if you change the value to the same that it is on (so if it's in complete, and you edit it to change to 20) it will just delete the row. It would be easy to fix, but I just don't have the time right now :)

EDIT: just remembered to note, that it will use the last row, so for moving stuff back to appointments you should move the legend to the top of the sheet :) Or you should just get rid of the move back to appointments bit altogether. You can also play around with how the variables are worked with, I just don't like grabbing the sheets again so I send a lot of them to the move function.

As for sorting, this is where you need to have destSheet = spreadSheet.getSheetByName(destName); before calling the moveRow(). So bellow, let's assume that you retrieve the destSheet somewhere before the if or in the if itself. This sample will sort it by column A in ascending order (so adjust the 1 to what you need, let's say you want J, then it would be 10)