Properly sort/filter dashboard appointment table