/* $Id$ */
/*============================================================================*
 |                 Copyright (c) 2015 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 VIEW xxas_general_settings_v
AS
select
 1 autosetup_id
,fnd_profile.value('XXAS_COM_GUEST_PAGE') as  guest_home_page
,fnd_profile.value('XXAS_COM_HOME_PAGE') as  authenticated_home_page
,fnd_profile.value('XXAS_EMP_REG_VIEWS_MENU') as emp_reg_views_menu
,fnd_profile.value('XXAS_ORG_REG_VIEWS_MENU') as org_reg_views_menu
,fnd_profile.value('XXAS_GLOBAL_SEARCH') as show_search
,fnd_profile.value('XXAS_COM_CLOUD_TENANT_ID') as tenant_id
,fnd_profile.value('XXAS_COM_CLOUD_API_KEY') as cloud_api_key
,fnd_profile.value('XXAS_API_KEY') as push_notification_api_key
,fnd_profile.value('XXAS_COM_BRANDING_IMAGE') as branding_logo
,fnd_profile.value('XXAS_COM_BRANDING_FAVICON') as fav_icon
,fnd_profile.value('XXAS_COM_CSS') as style_sheet
,fnd_profile.value('XXAS_COM_COLOR_THEME') as FLASH_THEME
,fnd_profile.value('XXAS_COM_GOOGLE_ANALYTICS_CODE') as google_analytics_code
,fnd_profile.value('XXAS_COM_SRV_AUDIT_ENABLED') as audit_enabled
,fnd_profile.value('XXAS_COM_SEND_TO_APPLAUD') as send_diag_to_applaud
,fnd_profile.value('XXAS_COM_SUPPORT_ROLE') as support_role
,fnd_profile.value('XXAS_SSO_LOGIN_URL') as sso_login_url
,fnd_profile.value('XXAS_AUTH_CUSTOM_CLASS') as custom_auth_class
,fnd_profile.value('XXAS_AUTH_USE_2FA') as two_factor
from dual;

BEGIN
  xxas_fnd_dictionary_pkg.add_view
   (p_application_short_name => xxas_util_pkg.app
   ,p_view_name              => 'XXAS_GENERAL_SETTINGS_V'
   ,p_description            => 'Applaud General Settings View');
END;
/

COMMIT;
EXIT;
