<%@page import="com.edeal.frontline.FieldBean"%> <%@page import="com.edeal.frontline.helper.InteractionBaseHelper.ContextObjectInformation"%> <%@page import="java.util.Iterator"%> <%@page import="com.sun.syndication.feed.impl.ObjectBean"%> <%@page import="com.edeal.frontline.helper.ActorBaseHelper"%> <%@page import="java.util.Calendar"%> <%@page import="com.edeal.frontline.helper.InteractionBaseHelper"%> <%@page import="com.edeal.frontline.ActorBean"%> <%@page import="com.edeal.frontline.PersonEventBean"%> <%@page import="com.edeal.frontline.EventBean"%> <%@page import="com.edeal.frontline.MessagesBean"%> <%@page import="com.edeal.frontline.OpportunityBean"%> <%@page import="org.apache.commons.lang.StringUtils"%> <%@page import="java.util.Date"%> <%@page import="com.edeal.frontline.navigation.FlRequest"%> <%@page import="com.edeal.frontline.FlContext"%> <%@page import="com.edeal.frontline.DataDictionary"%> <%@page import="com.edeal.frontline.FieldNotInitializedException"%> <%@page import="com.edeal.frontline.Utils"%> <%@ taglib uri="http://www.e-deal.com/taglib/fl" prefix="fl" %> <% FlRequest flRequest = new FlRequest(request); FlContext context = flRequest.getContext(); DataDictionary dico = context.getDataDictionary(); InteractionBaseHelper ibh = new InteractionBaseHelper(Interaction); HashMap contextObjectInformation = ibh.getContextObjectInformation(); String id = null; try { id = Interaction.getID(); } catch (FieldNotInitializedException fnie) {} String categoryCode = null; try { categoryCode = dico.getRefCode("Acv", null, Interaction.getIntAtvID()); } catch (FieldNotInitializedException fnie) {} EventBean event = (EventBean) request.getAttribute("event"); EventBean eventFromPersonEvent = (EventBean) request.getAttribute("eventFromPersonEvent"); OpportunityBean opportunity = (OpportunityBean) request.getAttribute("opportunity"); PersonEventBean personEvent = (PersonEventBean) request.getAttribute("personEvent"); String typeInterID = null; String typeInteraction = ""; String titreFen; String codetitreFen; try{ typeInterID = (String)Interaction.getCustomProperty("IntType_"); }catch(FieldNotInitializedException e){ typeInterID = ""; } 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"; } // Get message for outmail messaging MessagesBean message = null; if("OUTEMAIL".equals(categoryCode)) { try { message = new MessagesBean(Interaction.getIntMsgID(), session); } catch (FieldNotInitializedException fnie) { message = new MessagesBean(session); } pageContext.setAttribute("message", message); } String taskDoneRefID = dico.getRefIdByCode("Sti", null, "DONE"); //http://u-project2.umanis.com/view.php?id=30488 //0030488: Correspondances : heures de début et de fin incohérentes %> <% String formulaireAction="/save_realize_interaction.fl"; if("CORROUT".equals(categoryCode)) { formulaireAction="/save_and_fusion_mail_interaction.fl"; } // Case of interaction custom fields String customContextFobBeanStr = ""; if (contextObjectInformation!=null) { Iterator contextObjectBeanIt = contextObjectInformation.keySet().iterator(); while (contextObjectBeanIt.hasNext()) { ObjectsBean contextObjectBean = contextObjectBeanIt.next(); ContextObjectInformation contextInfo = contextObjectInformation.get(contextObjectBean); // is it a context object from a custom field? if (!contextInfo.getInteractionFobField().isFldStd()) { customContextFobBeanStr+=";"+contextObjectBean.getObjSql(); } } } %> " > <% String IntStiIDValue = taskDoneRefID; if("OUTEMAIL".equals(categoryCode)) { IntStiIDValue = Interaction.getIntStiID(); } %> "> <% if(typeInteraction.equals("CORR")){%> <%}%> <% if (opportunity != null || personEvent != null || event != null) { %> <% } %> <% if(!"OUTEMAIL".equals(categoryCode) && !"CORROUT".equals(categoryCode)) { %> <% } %>
<%= Interaction.getCategoryAltImg() %>
<% 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';">
 
<%@include file="context_info.jsp" %>
<% if("CORROUT".equals(categoryCode)) { %> <%@include file="realize_letter.jsp" %> <% } else if("OUTEMAIL".equals(categoryCode)) { %> <%@include file="realize_email.jsp" %> <% } else if("OUTPHONE".equals(categoryCode)) { %> <%@include file="realize_phone.jsp" %> <% } else if("RDVCOM".equals(categoryCode)) { %> <%@include file="realize_appointement.jsp" %> <% } %>
<% String details = null; try { details = Interaction.getIntDetails(); } catch (FieldNotInitializedException e) {} if (details!=null) { %> <% } %> <% Vector> shouldBeDisplayedFields = dico.getRefCodeList("Iuf", null); %> <% if (opportunity != null) { %> " /> <% for (int i=0; i <% } } %> <% } if (personEvent != null) { %> <% for (int i=0; i <% } } } %> <% // Case of interaction custom fields Iterator contextObjectBeanIt = contextObjectInformation.keySet().iterator(); while (contextObjectBeanIt.hasNext()) { ObjectsBean contextObjectBean = contextObjectBeanIt.next(); ContextObjectInformation contextInfo = contextObjectInformation.get(contextObjectBean); // is it a context object from a custom field? if (!contextInfo.getInteractionFobField().isFldStd()) { %> <% for (FieldBean field: contextInfo.getFieldsToDisplayInInteractionView()) { %> <% } } } %>
<% if("CORROUT".equals(categoryCode) || "OUTEMAIL".equals(categoryCode) || "OUTPHONE".equals(categoryCode)) { /* Calendar newIntTimeBeg = Calendar.getInstance(); Calendar newIntTimeEnd = Calendar.getInstance(); newIntTimeEnd.add(Calendar.MINUTE, (int)(Interaction.getDefaultDuration()*60)); Interaction.setIntTimeBeg(newIntTimeBeg.getTime()); Interaction.setIntTimeEnd(newIntTimeEnd.getTime()); Interaction.setIntDate(newIntTimeBeg.getTime()); Date begHour = null; try { begHour = Interaction.getIntTimeBeg(); } catch (FieldNotInitializedException fnie) { } Date endHour = null; try { endHour = Interaction.getIntTimeEnd(); } catch (FieldNotInitializedException fnie) { } if(id==null || (begHour==null && endHour==null)){ */ %> <% } %>