/* $Id$ */
/*============================================================================*
 |                 Copyright (c) 2016 Applaud Solutions UK Ltd                |
 |                             All rights reserved                            |
 *===========================================================================*/

SET VERIFY OFF
SET FEEDBACK OFF
WHENEVER OSERROR  EXIT FAILURE ROLLBACK
WHENEVER SQLERROR EXIT FAILURE ROLLBACK

CREATE OR REPLACE FORCE VIEW xxas_goals_in_review_v
AS
SELECT
   xg.goal_id
  ,xg.perf_plan_enrollment_id
  ,xg.goal_type_code
  ,xg.goal_type_meaning
  ,xg.category_code
  ,xg.category_meaning
  ,xg.goal
  ,xg.access_code
  ,xg.access_meaning
  ,xg.parent_goal_id
  ,xg.weighting_percent
  ,xg.start_date
  ,xg.due_date
  ,xg.status_code
  ,xg.status_meaning
  ,xg.complete_percent
  ,xg.weighted_complete_percent
  ,xg.created_by
  ,xg.creation_date
  ,xg.last_update_date
  ,xg.last_updated_by
  ,xg.last_update_login
  ,xg.attribute_category
  ,xg.attribute1
  ,xg.attribute2
  ,xg.attribute3
  ,xg.attribute4
  ,xg.attribute5
  ,xg.attribute6
  ,xg.attribute7
  ,xg.attribute8
  ,xg.attribute9
  ,xg.attribute10
  ,xg.attribute11
  ,xg.attribute12
  ,xg.attribute13
  ,xg.attribute14
  ,xg.attribute15
  ,xg.attribute16
  ,xg.attribute17
  ,xg.attribute18
  ,xg.attribute19
  ,xg.attribute20
  ,xg.attribute21
  ,xg.attribute22
  ,xg.attribute23
  ,xg.attribute24
  ,xg.attribute25
  ,xg.attribute26
  ,xg.attribute27
  ,xg.attribute28
  ,xg.attribute29
  ,xg.attribute30
  ,xprf.perf_review_form_id
  ,xprf.current_step_id
  ,xprf.current_step_person_id
  FROM xxas_goals_v xg,
            xxas_perf_review_forms_v xprf
      WHERE xprf.perf_plan_enrollment_id = xg.perf_plan_enrollment_id; 
            
BEGIN
  xxas_fnd_dictionary_pkg.add_view
   (p_application_short_name => xxas_util_pkg.app
   ,p_view_name              => 'XXAS_GOALS_IN_REVIEW_V'
   ,p_description            => 'Applaud Performance Goals View within a performance review');
END;     
/       

COMMIT;
EXIT;

