/* $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 VIEW xxas_menus_list_v
AS
SELECT decode(m.menu_type
             ,'G', 'burger'
             ,'U', 'personal'
             ,'S', 'arrow-down4') "icon"
      ,'flexible' "type"
      ,m.menu_id
      ,m.menu_id  "id"
      ,m.title    "line1"
      ,m.title
      ,'menu-items' "pageId"
      ,m.menu_id "objectId"
      ,'modal' "target"
      ,m.menu_type
      ,m.user_menu_name
      ,m.object_id_format
      ,m.object_id_handler context_handler
      ,m.subnav_header_provider subnav_header
      ,xxas_emp_menu_pkg.menu_actions(m.menu_id,m.user_menu_name).get_xml() "linked"
FROM   xxas_menus_v m;

BEGIN
  xxas_fnd_dictionary_pkg.add_view
   (p_application_short_name => xxas_util_pkg.app
   ,p_view_name              => 'XXAS_MENUS_LIST_V'
   ,p_description            => 'Applaud Menus');
END;
/

COMMIT;
EXIT;

