-- Customer specific once-script UWVA89.
--
-- (c) 2014 SG|facilitor bv
SET ECHO ON
SPOOL xuwva89.lst
SET DEFINE OFF
---------------------------------------------------------------------------------------------------------------------------------------------------------------
-- FlexWhere API, komt te vervallen en wordt door API2 vervangen...
--INSERT INTO fac_api(fac_api_name, fac_api_omschrijving, fac_api_filepath)
--SELECT 'FLEXWHERE', 'Koppeling met aanwezigheidssensoren', 'appl/API/api_inssoap.asp'
--FROM DUAL;

-- Er bestaat al een user met os_login '_flexwhere', deze wordt gebruikt door flexwhere om res-info op te halen.
-- Bewust deze gebruiker niet hergebruikt voor dit doeleind, nieuwe gebruiker aanmaken en de 'oude' kan t.z.t. worden verwijderd (handmatig door UWVA beheer)

INSERT INTO prs_perslid(prs_perslid_module, prs_srtperslid_key, prs_afdeling_key, prs_perslid_naam, prs_perslid_oslogin, prs_perslid_apikey)
SELECT 'PRS', prs_srtperslid_key, prs_afdeling_key, 'SYSTEM-FLEXWHERE', '_FLEXWHERE2', 'liimJGLXeKhJVgZzeBOZifpacpUQhDPZ'
FROM prs_perslid where prs_perslid_oslogin = '_FACILITOR';

---------------------------------------------------------------------------------------------------------------------------------------------------------------
-- FlexWhere grafieken en rapportage....

-- Dummy views voor definitie om als user-graph of user-rapport te kunnen registreren...

CREATE OR REPLACE VIEW uwva_v_fwhere_pie_maandag_1 AS SELECT * FROM DUAL;
CREATE OR REPLACE VIEW uwva_v_fwhere_pie_dinsdag_1 AS SELECT * FROM DUAL;
CREATE OR REPLACE VIEW uwva_v_fwhere_pie_woensdag_1 AS SELECT * FROM DUAL;
CREATE OR REPLACE VIEW uwva_v_fwhere_pie_donderdag_1 AS SELECT * FROM DUAL;
CREATE OR REPLACE VIEW uwva_v_fwhere_pie_vrijdag_1 AS SELECT * FROM DUAL;
CREATE OR REPLACE VIEW uwva_v_fwhere_pie_maand_1 AS SELECT * FROM DUAL;
CREATE OR REPLACE VIEW uwva_v_fwhere_linegrap_maand_1 AS SELECT * FROM DUAL;

CREATE OR REPLACE VIEW uwva_v_rap_flexwhere AS SELECT * FROM DUAL;



INSERT INTO fac_usrgraph (fac_usrgraph_omschrijving, fac_usrgraph_view_name, fac_usrgraph_type, fac_usrgraph_orderby, fac_usrgraph_options) 
SELECT '', 'uwva_v_fwhere_pie_maandag_1', 3, 'FCLT_SORT',
'{seriesColors: [''#009933'',''#77BB00'',''#F7941E'', ''#990000''], legend: { show:true, location: ''w'' }, seriesDefaults: { shadow: false,  rendererOptions: { sliceMargin: 2, dataLabelPositionFactor: 1.1}  }}'
FROM DUAL;

INSERT INTO fac_usrgraph (fac_usrgraph_omschrijving, fac_usrgraph_view_name, fac_usrgraph_type, fac_usrgraph_orderby, fac_usrgraph_options) 
SELECT '', 'uwva_v_fwhere_pie_dinsdag_1', 3, 'FCLT_SORT',
'{seriesColors: [''#009933'',''#77BB00'',''#F7941E'', ''#990000''], legend: { show:true, location: ''w'' }, seriesDefaults: { shadow: false,  rendererOptions: { sliceMargin: 2, dataLabelPositionFactor: 1.1}  }}'
FROM DUAL;

INSERT INTO fac_usrgraph (fac_usrgraph_omschrijving, fac_usrgraph_view_name, fac_usrgraph_type, fac_usrgraph_orderby, fac_usrgraph_options) 
SELECT '', 'uwva_v_fwhere_pie_woensdag_1', 3, 'FCLT_SORT',
'{seriesColors: [''#009933'',''#77BB00'',''#F7941E'', ''#990000''], legend: { show:true, location: ''w'' }, seriesDefaults: { shadow: false,  rendererOptions: { sliceMargin: 2, dataLabelPositionFactor: 1.1}  }}'
FROM DUAL;

INSERT INTO fac_usrgraph (fac_usrgraph_omschrijving, fac_usrgraph_view_name, fac_usrgraph_type, fac_usrgraph_orderby, fac_usrgraph_options) 
SELECT '', 'uwva_v_fwhere_pie_donderdag_1', 3, 'FCLT_SORT',
'{seriesColors: [''#009933'',''#77BB00'',''#F7941E'', ''#990000''], legend: { show:true, location: ''w'' }, seriesDefaults: { shadow: false,  rendererOptions: { sliceMargin: 2, dataLabelPositionFactor: 1.1}  }}'
FROM DUAL;

INSERT INTO fac_usrgraph (fac_usrgraph_omschrijving, fac_usrgraph_view_name, fac_usrgraph_type, fac_usrgraph_orderby, fac_usrgraph_options) 
SELECT '', 'uwva_v_fwhere_pie_vrijdag_1', 3, 'FCLT_SORT',
'{seriesColors: [''#009933'',''#77BB00'',''#F7941E'', ''#990000''], legend: { show:true, location: ''w'' }, seriesDefaults: { shadow: false,  rendererOptions: { sliceMargin: 2, dataLabelPositionFactor: 1.1}  }}'
FROM DUAL;

INSERT INTO fac_usrgraph (fac_usrgraph_omschrijving, fac_usrgraph_view_name, fac_usrgraph_type, fac_usrgraph_orderby, fac_usrgraph_options) 
SELECT '', 'uwva_v_fwhere_pie_maand_1', 3, 'FCLT_SORT',
'{seriesColors: [''#009933'',''#77BB00'',''#F7941E'', ''#990000''], legend: { show:true, location: ''w'' }, seriesDefaults: { shadow: false,  rendererOptions: { sliceMargin: 2, dataLabelPositionFactor: 1.1}  }}'
FROM DUAL;

INSERT INTO fac_usrgraph (fac_usrgraph_omschrijving, fac_usrgraph_view_name, fac_usrgraph_type, fac_usrgraph_orderby, fac_usrgraph_options) 
SELECT '', 'uwva_v_fwhere_linegrap_maand_1', 4 , 'FCLT_XAS_',
        '{seriesColors: [''#EDC240'',''#B1D8F6'',''#CC4E4E'', ''#4DA74D'', ''#9440ED''] , axes: {yaxis: {min: 0}} ,seriesDefaults: {showMarker:false} }'
FROM DUAL;




INSERT INTO fac_usrrap
            (fac_usrrap_omschrijving,
             fac_usrrap_view_name,
             fac_usrrap_in_huidige_locatie,
             fac_usrrap_template,
             fac_usrrap_macro,
             fac_usrrap_vraagbegindatum,
             fac_usrrap_vraageinddatum,
             fac_usrrap_functie,
             fac_usrrap_info,
             fac_functie_key,
             fac_usrrap_autorefresh
            )
    SELECT  'RES - Flexwhere bezettingsoverzicht - VORIGE MAAND',
             'uwva_v_rap_flexwhere',
             NULL,
             NULL,
             NULL,
             0,
             0,
             1,
             'Management rapport over de geplande en actuele bezetting van vergaderzalen',
             fac_functie_key,
             0
     FROM fac_functie WHERE fac_functie_code = 'WEB_RESBAC';

COMMIT;


BEGIN adm.systrackscriptId('$Id$'); END;
/
SPOOL OFF

@@uwva_misc.sql


BEGIN fac.registercustversion('UWVA', 89); END;
/
COMMIT;
