added logic to view for completed orders