<%@page import="com.edeal.frontline.helper.InteractionBaseHelper.ContextObjectInformation"%> <%@page import="java.util.Iterator"%> <%@page import="java.util.HashMap"%> <%@page import="com.edeal.frontline.ObjectsBean"%> <%@page import="com.edeal.frontline.helper.InteractionBaseHelper"%> <%@page import="com.edeal.frontline.InteractionBean"%> <%@page import="com.edeal.frontline.ActorBean"%> <%@page import="org.json.JSONArray"%> <% /****************************************************************************** * Copyright (c) 2000-2013 E-DEAL * * E-DEAL S.A. * 41, rue Périer * 92120 Montrouge * France * * T: +33 (0)1 73 03 29 80 * F: +33 (0)1 73 01 69 77 * http://www.e-deal.com * * La diffusion de ce code source sous quelque forme que ce soit sans * l'autorisation de E-DEAL est interdite. * * Vous êtes autorisés à modifier ce code source uniquement pour votre usage * propre et sous réserve que les mentions de copyright demeurent intactes. * * Ce code est fourni en l'état. Aucune garantie d'aucune sorte, explicite ou * implicite n'est donnée. En aucun cas E-DEAL ne pourra être tenu pour * responsable des dommages pouvant résulter de l'utilisation de ce code * source. ******************************************************************************/ %> <%@ page session="true" %> <%@ page import="com.edeal.frontline.CorrespondentBean" %> <%@ page import="com.edeal.frontline.navigation.FlRequest" %> <%@ page import="com.edeal.frontline.FlContext" %> <%@ page import="com.edeal.frontline.Utils" %> <%@ page import="com.edeal.frontline.FieldNotInitializedException" %> <%@ page import="com.edeal.frontline.FrontlineException" %> <%@ page import="java.util.Date" %> <%@ page import="java.util.Vector" %> <%@ page import="java.util.Hashtable" %> <%@ page import="com.edeal.frontline.FlLocale" %> <%@ page import="com.edeal.frontline.SalesInvestBean" %> <%@ page import="com.edeal.frontline.DataDictionary" %> <%@ page import="com.edeal.frontline.CorrespondentBean" %> <%@ page import="com.edeal.frontline.SolicitationBean" %> <%@ page import="com.edeal.frontline.helper.ContextHelper" %> <%@ taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <% final org.apache.commons.logging.Log logger = org.apache.commons.logging.LogFactory.getLog(getClass()); FlRequest flRequest = new FlRequest(request); FlContext context = flRequest.getContext(); DataDictionary dico = context.getDataDictionary(); InteractionBaseHelper ibh = new InteractionBaseHelper(Interaction); String id = null; try { id = Interaction.getID(); } catch (FieldNotInitializedException fnie) { } String idSolicitation = null; try { idSolicitation = (String)Interaction.getCustomProperty("IntSolicitation_"); } catch (FieldNotInitializedException fnie) { } String correspondentListString = Utils.formatStringForHtmlED(ibh.getCorrespondentJSONArray().toString()); ObjectsBean actorBean = dico.getTable("sql", "Actor"); String xmlListSelectID = null; try { xmlListSelectID = actorBean.getObjSelectListID(); } catch (FieldNotInitializedException e) { } String xmlListSelect = ""; if (xmlListSelectID != null) { xmlListSelect = "xml_select_multiple_list.fl?id=" + xmlListSelectID + "&field=IntActID"; } else { xmlListSelect = "select_multiple.fl?type=Actor&field=IntActID"; } String inboundMailIntAtvID = null; String outboundMailIntAtvID = null; try { inboundMailIntAtvID = dico.getRefIdByCode("IntAtvID", "INEMAIL"); } catch (FrontlineException e) { } try { outboundMailIntAtvID = dico.getRefIdByCode("IntAtvID", "OUTEMAIL"); } catch (FrontlineException e) { } FlLocale locale = FlLocale.getInstance(session); String typeInterID = null; String typeInteraction = ""; String titreFen; String codetitreFen; Boolean prompTypeInteraction = false; try{ typeInterID = (String)Interaction.getCustomProperty("IntType_"); }catch(FieldNotInitializedException e){ typeInterID = ""; prompTypeInteraction = true; } if(typeInterID.equals(dico.getRefIdByCode("IntType_", "ACT"))){ titreFen = "Todo"; codetitreFen ="FF072"; typeInteraction = "TODO"; } else if (typeInterID.equals(dico.getRefIdByCode("IntType_", "COR"))){ titreFen = "Correspondance"; codetitreFen ="FF09A"; typeInteraction = "CORR"; } else { titreFen = "Interaction"; codetitreFen ="L30B2"; } String initIntActID = null; String initIntTimeBeg = null; String initIntDate = flRequest.getRequestParameterOrAttribute("initIntDate"); initIntActID = flRequest.getRequestParameterOrAttribute("initIntActID"); initIntTimeBeg = flRequest.getRequestParameterOrAttribute("initIntTimeBeg"); String param = flRequest.getRequestParameterOrAttribute("done"); String initIntAtvID = flRequest.getRequestParameterOrAttribute("initIntAtvID"); boolean isFromAgenda = "1".equals(flRequest.getRequestParameterOrAttribute("fromAgenda")); boolean isIntExceptionalCostActive = SalesInvestBean.isIntExceptionalCostActive(context); if (param != null && param.equals("1")) { Interaction.setIntStiID(dico.getRefIdByCode("IntStiID", "DONE")); } String correspondentEntId = ""; Vector vIntCorID = new Vector(); if(initIntAtvID == null || "".equals(initIntAtvID)) { try { initIntAtvID = Interaction.getIntAtvID(); } catch (FieldNotInitializedException e) { } } //category code String catCode = null; if (initIntAtvID != null && !"".equals(initIntAtvID)) { try { catCode = (String) dico.getRefDisp("Acv", "Te2", initIntAtvID); } catch (FrontlineException e) {} } String subCatCode = null; if (initIntAtvID != null && !"".equals(initIntAtvID)) { try { subCatCode = (String) dico.getRefCode("Acv", null, initIntAtvID); } catch (FrontlineException e) {} } try { vIntCorID.addAll(Interaction.getIntCorID()); } catch (FieldNotInitializedException e) { //nothing todo } for (int i = 0; i < vIntCorID.size(); i++) { CorrespondentBean corBean = new CorrespondentBean(vIntCorID.get(i), session); try { if (i > 1) { correspondentEntId += ","; } correspondentEntId += "'" + corBean.getCorEntID() + "'"; } catch (FieldNotInitializedException fnie) { } } String intReqContratID_ = null; String intContratID_ = null; intReqContratID_ = flRequest.getRequestParameterOrAttribute("initIntContratID_"); if(intReqContratID_ != null && !"".equals(intReqContratID_)) { intContratID_ = intReqContratID_; } else { try { intContratID_ = (String)Interaction.getCustomProperty("IntContratID_"); } catch (FieldNotInitializedException e) { intContratID_ = ""; } } %> "> <% if(idSolicitation != null && !idSolicitation.equalsIgnoreCase("") ) {%> <%} %> <% if(!prompTypeInteraction) {%> <%} %> <% if(intContratID_ != null && !intContratID_.equalsIgnoreCase("") ) {%> <%} %> <% if (flRequest.getParameter("fromAgenda") != null) { %> <% } %> <% if(prompTypeInteraction) {%> ">
<%} else {%> ">
<% if(typeInteraction.equals("CORR")){%> <%}%> <%if(typeInteraction.equals("CORR")){%> <%} else if(typeInteraction.equals("TODO")) {%> <%} %> <% } %> <%---------------------- Tester s'il faut afficher la liste des correspondants en dehors du cas d'une TODO------------------------%> <%if(typeInteraction.equals("CORR")){%> <%} %> <%---------------------- Seulement si c'est une TODO------------------------%> <% if(typeInteraction.equals("TODO")){%> <%}%> <%---------------------- Seulement si c'est une TODO------------------------%>
<% if (Interaction.hasTimePeriodDisplay()) { Date begHour = null; try { begHour = Interaction.getIntTimeBeg(); } catch (FieldNotInitializedException fnie) { } Date endHour = null; try { endHour = Interaction.getIntTimeEnd(); } catch (FieldNotInitializedException fnie) { } String begHourS = Utils.formatToWebTime(session, begHour, true); String endHourS = Utils.formatToWebTime(session, endHour, true); boolean isMorning = false; boolean isAfternoon = false; boolean isAllDay = false; if ("08:30:00".equals(begHourS) && "12:00:00".equals(endHourS)) { isMorning = true; } else if ("14:00:00".equals(begHourS) && "17:30:00".equals(endHourS)) { isAfternoon = true; } else if ("08:30:00".equals(begHourS) && "17:30:00".equals(endHourS)) { isAllDay = true; } %> <% } else { %>
"> "> value="" onclick="document.forms[0].IntTimeBeg.value='08:30';document.forms[0].IntTimeEnd.value='12:00';">
value="" onclick="document.forms[0].IntTimeBeg.value='14:00';document.forms[0].IntTimeEnd.value='17:30';">
value="" onclick="document.forms[0].IntTimeBeg.value='08:30';document.forms[0].IntTimeEnd.value='17:30';">
" js='doSelectCorrespondent();' >
<% if ("CORROUT".equals(subCatCode)) { %> <% } %>
" target="POPUP" url='<%= xmlListSelect %>' options='{"id": "Select", "resizeable":"yes","scrollbars":"yes","menubar":"no","toolbar":"no","height":"780","width":"800"}' > " js='doVerifDisp()' style="display:none;" > " js='doComputeDisp()' style="display:none;" >
<%---------------------- Seulement si c'est une TODO------------------------%> <% if(typeInteraction.equals("TODO")){%>
<%}%> <%---------------------- Seulement si c'est une CORR------------------------%> <% if(typeInteraction.equals("CORR")){%>
<%}%> "> <%---------------------- Seulement si c'est une Correspondance------------------------%> <% if(typeInteraction.equals("CORR")){%>
<%}%>
<%} %>