added js functionality to manage orders