fixed if condtion for view and edit projects