-- Customer specific once-script ALLI.
--
-- (c) 2011 SG|facilitor bv 
-- $Revision$ 
-- $Modtime: 29-06-12 13:29 $
--
-- Support: +31 53 4800700

SET ECHO ON
SPOOL alli09.lst
SET DEFINE OFF


INSERT INTO fac_srtnotificatie
            (fac_srtnotificatie_code, fac_srtnotificatie_mode,
             fac_srtnotificatie_oms, fac_srtnotificatie_xmlnode,
             fac_srtnotificatie_url, fac_srtnotificatie_groep
            )
     VALUES ('CUST01', 3,
             'Nieuwe bestelaanvraag bouwbord ter beoordeling (bestelling ##KEY##)', 'bestelling',
             'bes/bes_search.asp?urole=bo' || '&' || 'rfo_key=', 0
            );

            
-- Notificatie JOB die elke 3 dagen (3*24 = 72 uur) afgaat: 's ochtends om 7.00u
-- Voorlopig ff met fac_notificatie_job_mode = 0 vullen, zodat de notificatiejob nog niet gaat lopen. 
-- Op moment dat die moet gaan lopen via applicatiebeheer noti-jobs de mode HANDMATIG op 3 zetten.
INSERT INTO fac_notificatie_job
            (fac_notificatie_job_view,
             fac_notificatie_job_oms,
             fac_notificatie_job_interval, fac_notificatie_job_mode, fac_notificatie_job_nextrun
            )
     VALUES ('alli_v_notify_bo_bouwbord',
             'BES: Beoordeling van bouwbord door communicatiemedewerker',
             72, 0, NULL
            );
            
            
----- RTM grafieken op portaal

-- Enkele dummy views om inserts hieronder mogelijk te maken...

CREATE OR REPLACE VIEW alli_v_graph_cat_kantoor
AS SELECT * FROM DUAL;

CREATE OR REPLACE VIEW alli_v_graph_cat_bouwbord
AS SELECT * FROM DUAL;

CREATE OR REPLACE VIEW alli_v_graph_cat_drukwerk
AS SELECT * FROM DUAL;

CREATE OR REPLACE VIEW alli_v_graph_cat_ict
AS SELECT * FROM DUAL;

CREATE OR REPLACE VIEW alli_v_graph_cnt_new_close
AS SELECT * FROM DUAL;

-- RIJ 1: 

-- Kantoorartikelen
INSERT INTO fac_usrgraph (fac_usrgraph_view_name, fac_usrgraph_type, fac_usrgraph_orderby, fac_usrgraph_maxrows, fac_usrgraph_options)
VALUES ('alli_v_graph_cat_kantoor', 4, 'VOLGORDE', 12, '{seriesColors: [''blue'', ''red''] , legend: {location:''n''} , axes: {yaxis: {min: 0}}}');

INSERT INTO fac_widget (fac_widget_groep, fac_widget_volgnr, fac_widget_title, fac_widget_height, fac_widget_width, fac_widget_url, fac_widget_refreshtime)
SELECT 'rtm_bestelaanvragen', 10 ,NULL, 200, 13, 'fac_usrgraph.asp?usrgraph_key=' || MAX(fac_usrgraph_key), NULL FROM fac_usrgraph;


-- Bouwborden
INSERT INTO fac_usrgraph (fac_usrgraph_view_name, fac_usrgraph_type, fac_usrgraph_orderby, fac_usrgraph_maxrows, fac_usrgraph_options)
VALUES ('alli_v_graph_cat_bouwbord', 4, 'VOLGORDE', 12, '{seriesColors: [''blue''] ,  legend: { show: true, placement: ''outsideGrid'', location: ''n''}, axes: {yaxis: {label: '''' ,min: 0}}}');

INSERT INTO fac_widget (fac_widget_groep, fac_widget_volgnr, fac_widget_title, fac_widget_height, fac_widget_width, fac_widget_url, fac_widget_refreshtime)
SELECT 'rtm_bestelaanvragen', 20 ,NULL, 200, 13, 'fac_usrgraph.asp?usrgraph_key=' || MAX(fac_usrgraph_key), NULL FROM fac_usrgraph;


-- Alle drukwerk + visitekaartjes
INSERT INTO fac_usrgraph (fac_usrgraph_view_name, fac_usrgraph_type, fac_usrgraph_orderby, fac_usrgraph_maxrows, fac_usrgraph_options)
VALUES ('alli_v_graph_cat_drukwerk', 4, 'VOLGORDE', 12, '{seriesColors: [''blue'', ''red'', ''green'', ''yellow'', ''black''] , axes: {yaxis: {label: '''' ,min: 0}}}');

INSERT INTO fac_widget (fac_widget_groep, fac_widget_volgnr, fac_widget_title, fac_widget_height, fac_widget_width, fac_widget_url, fac_widget_refreshtime)
SELECT 'rtm_bestelaanvragen', 30 ,NULL, 200, 24, 'fac_usrgraph.asp?usrgraph_key=' || MAX(fac_usrgraph_key), NULL FROM fac_usrgraph;

-- ICT Hardware & CYOD

INSERT INTO fac_usrgraph (fac_usrgraph_view_name, fac_usrgraph_type, fac_usrgraph_orderby, fac_usrgraph_maxrows, fac_usrgraph_options)
VALUES ('alli_v_graph_cat_ict', 4, 'VOLGORDE', 12, '{seriesColors: [''blue'', ''red'', ''black''] , axes: {yaxis: {label: '''' ,min: 0}}}');

INSERT INTO fac_widget (fac_widget_groep, fac_widget_volgnr, fac_widget_title, fac_widget_height, fac_widget_width, fac_widget_url, fac_widget_refreshtime)
SELECT 'rtm_bestelaanvragen', 40 ,NULL, 200, 24, 'fac_usrgraph.asp?usrgraph_key=' || MAX(fac_usrgraph_key), NULL FROM fac_usrgraph;

-- Nieuwe en aflopende contracten

INSERT INTO fac_usrgraph (fac_usrgraph_view_name, fac_usrgraph_type, fac_usrgraph_orderby, fac_usrgraph_maxrows, fac_usrgraph_options)
VALUES ('alli_v_graph_cnt_new_close', 4, 'VOLGORDE', 12, '{seriesColors: [''blue'', ''red''] , legend: {location:''n''} , axes: {yaxis: {min: 0}}}');

INSERT INTO fac_widget (fac_widget_groep, fac_widget_volgnr, fac_widget_title, fac_widget_height, fac_widget_width, fac_widget_url, fac_widget_refreshtime)
SELECT 'rtm_bestelaanvragen', 50 ,NULL, 200, 12, 'fac_usrgraph.asp?usrgraph_key=' || MAX(fac_usrgraph_key), NULL FROM fac_usrgraph;


-- En de laatste stap is dat ...... alle grafieken in portaal worden getoond via autorisatie WEB_USER01 (Analyzer-achtig)
-- Nu for-the-time being onderdrukken met WEB_USER30 (niemand ziet het).

INSERT INTO fac_widget (fac_widget_groep, fac_widget_volgnr, fac_widget_title, fac_widget_height, fac_widget_width, fac_widget_url, fac_widget_refreshtime, fac_functie_key)
SELECT 'myfacilitor', 15 ,NULL, 200, 99, 'fac_widgetspage.asp?wgrp=rtm_bestelaanvragen', 600 , fac_functie_key
FROM fac_functie
WHERE fac_functie_code = 'WEB_USER30';


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

commit;

SPOOL OFF

@alli.sql
