svn commit: r778965 - in /ofbiz/trunk/applications/marketing: data/ script/org/ofbiz/sfa/lead/ servicedef/ webapp/sfa/WEB-INF/ widget/sfa/ widget/sfa/forms/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r778965 - in /ofbiz/trunk/applications/marketing: data/ script/org/ofbiz/sfa/lead/ servicedef/ webapp/sfa/WEB-INF/ widget/sfa/ widget/sfa/forms/

apatel-2
Author: apatel
Date: Wed May 27 02:21:26 2009
New Revision: 778965

URL: http://svn.apache.org/viewvc?rev=778965&view=rev
Log:
Now LeadSource is saved and shown on profile page.

Modified:
    ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml
    ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml
    ofbiz/trunk/applications/marketing/servicedef/services.xml
    ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml
    ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml
    ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml
    ofbiz/trunk/applications/marketing/widget/sfa/forms/LeadForms.xml

Modified: ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml?rev=778965&r1=778964&r2=778965&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml (original)
+++ ofbiz/trunk/applications/marketing/data/MarketingTypeData.xml Wed May 27 02:21:26 2009
@@ -63,6 +63,20 @@
     <Enumeration description="URL Parameter" enumCode="URL_PARAM" enumId="TKCDSRC_URL_PARAM" sequenceId="01" enumTypeId="TRACKINGCODE_SRC"/>
 
     <DataSourceType dataSourceTypeId="LEAD_SOURCE" description="Lead Source"/>
+    <DataSource dataSourceId="OTHER" dataSourceTypeId="LEAD_SOURCE" description="Other"/>
+    <DataSource dataSourceId="COLD_CALL" dataSourceTypeId="LEAD_SOURCE" description="Cold Call"/>
+    <DataSource dataSourceId="EXISTING_CUSTOMER" dataSourceTypeId="LEAD_SOURCE" description="Existing Customer"/>
+    <DataSource dataSourceId="SELF_GENERATED" dataSourceTypeId="LEAD_SOURCE" description="Self Generated"/>
+    <DataSource dataSourceId="EMPLOYEE" dataSourceTypeId="LEAD_SOURCE" description="Employee"/>
+    <DataSource dataSourceId="PARTNER" dataSourceTypeId="LEAD_SOURCE" description="Partner"/>
+    <DataSource dataSourceId="PUBLIC_RELATIONS" dataSourceTypeId="LEAD_SOURCE" description="Public Relations"/>
+    <DataSource dataSourceId="DIRECT_MAIL" dataSourceTypeId="LEAD_SOURCE" description="Direct Mail"/>
+    <DataSource dataSourceId="CONFERENCE" dataSourceTypeId="LEAD_SOURCE" description="Conference"/>
+    <DataSource dataSourceId="TRADE_SHOW" dataSourceTypeId="LEAD_SOURCE" description="Trade Show"/>
+    <DataSource dataSourceId="WEB_SITE" dataSourceTypeId="LEAD_SOURCE" description="Web Site"/>
+    <DataSource dataSourceId="WORD_OF_MOUTH" dataSourceTypeId="LEAD_SOURCE" description="Word of Mouth"/>
+    <DataSource dataSourceId="EMAIL" dataSourceTypeId="LEAD_SOURCE" description="Email"/>
+    <DataSource dataSourceId="CAMPAIGN" dataSourceTypeId="LEAD_SOURCE" description="Campaign"/>
 
     <StatusType parentTypeId="PARTY_STATUS" hasTable="" statusTypeId="LEAD_STATUS" description="Lead Status"/>
     <StatusItem description="Assigned" sequenceId="01" statusCode="ASSIGNED" statusId="LEAD_ASSIGNED" statusTypeId="LEAD_STATUS"/>

Modified: ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml?rev=778965&r1=778964&r2=778965&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml (original)
+++ ofbiz/trunk/applications/marketing/script/org/ofbiz/sfa/lead/LeadServices.xml Wed May 27 02:21:26 2009
@@ -98,22 +98,10 @@
             <call-service service-name="createPartyRelationship" in-map-name="partyRelationshipCtx"/>
         </if-not-empty>
 
-        <log level="verbose" message=" ${partyGroupPartyId}"></log>
-        <if-not-empty field="parameters.leadSource">
-            <make-value entity-name="DataSource" value-field="dataSource"/>
-            <sequenced-id sequence-name="DataSource" field="dataSourceId"/>
-            <set field="dataSource.dataSourceId" from-field="dataSourceId"/>
-            <set field="dataSource.dataSourceTypeId" value="LEAD_SOURCE"/>
-            <set field="dataSource.description" from-field="parameters.leadSource"/>
-            <create-value value-field="dataSource"/>
-
-            <make-value entity-name="PartyDataSource" value-field="partyDataSource"/>
-            <set field="partyDataSource.partyId" from-field="partyId"/>
-            <set field="partyDataSource.dataSourceId" from-field="dataSourceId"/>
-            <now-timestamp field="nowTimestamp"/>
-            <set field="partyDataSource.fromDate" from-field="nowTimestamp"/>
-            <set field="partyDataSource.isCreate" value="Y"/>
-            <create-value value-field="partyDataSource"/>
+        <if-not-empty field="parameters.dataSourceId">
+            <set field="partyDataSourceCtx.partyId" from-field="partyId"/>
+            <set field="partyDataSourceCtx.dataSourceId" from-field="parameters.dataSourceId"/>
+            <call-service service-name="createPartyDataSource" in-map-name="partyDataSourceCtx"/>
         </if-not-empty>
         <field-to-result field="partyId"/>
         <field-to-result field="parameters.roleTypeId" result-name="roleTypeId"/>

Modified: ofbiz/trunk/applications/marketing/servicedef/services.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/servicedef/services.xml?rev=778965&r1=778964&r2=778965&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/servicedef/services.xml (original)
+++ ofbiz/trunk/applications/marketing/servicedef/services.xml Wed May 27 02:21:26 2009
@@ -408,7 +408,7 @@
         <attribute name="numEmployees" type="String" mode="IN" optional="true"/>
         <attribute name="officeSiteName" type="String" mode="IN" optional="true"/>
         <attribute name="partyIdFrom" type="String" mode="IN" optional="true"/>
-        <attribute name="leadSource" type="String" mode="IN" optional="true"/>
+        <attribute name="dataSourceId" type="String" mode="IN" optional="true"/>
         <attribute name="roleTypeId" type="String" mode="OUT"/>
         <attribute name="quickAdd" type="String" mode="IN" optional="true"/>
         <attribute name="extension" type="String" mode="IN" optional="true"/>

Modified: ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml?rev=778965&r1=778964&r2=778965&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/marketing/webapp/sfa/WEB-INF/controller.xml Wed May 27 02:21:26 2009
@@ -128,6 +128,11 @@
         <event type="service" invoke="createLead"/>
         <response name="success" type="request" value="viewprofile"/>
     </request-map>
+    <request-map uri="createLeadPartyDataSource">
+        <security https="true" auth="true"/>
+        <event type="service" invoke="createPartyDataSource"/>
+        <response name="success" type="request" value="viewprofile"/>
+    </request-map>
     <!-- Contact Requests -->
     <request-map uri="FindContacts">
         <security https="true" auth="true"/>

Modified: ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml?rev=778965&r1=778964&r2=778965&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/sfa/CommonScreens.xml Wed May 27 02:21:26 2009
@@ -293,6 +293,7 @@
                                             <include-screen name="Party" location="component://party/widget/partymgr/ProfileScreens.xml"/>
                                             <include-screen name="Contact" location="component://party/widget/partymgr/ProfileScreens.xml"/>
                                             <include-screen name="PaymentMethods" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                            <include-screen name="LeadPartyDataSource" location="component://marketing/widget/sfa/LeadScreens.xml"/>
                                         </container>
                                         <container style="profile-right">
                                             <include-screen name="FinAccounts" location="component://party/widget/partymgr/ProfileScreens.xml"/>
@@ -340,6 +341,7 @@
                                                 </actions>
                                                 <widgets>
                                                     <include-screen name="Contact" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                                    <include-screen name="LeadPartyDataSource" location="component://marketing/widget/sfa/LeadScreens.xml"/>
                                                 </widgets>
                                             </section>
                                         </container>

Modified: ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml?rev=778965&r1=778964&r2=778965&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/sfa/LeadScreens.xml Wed May 27 02:21:26 2009
@@ -224,4 +224,21 @@
             </widgets>
         </section>
     </screen>
+    
+    <screen name="LeadPartyDataSource">
+        <section>
+            <actions>
+                <set field="partyId" from-field="parameters.partyId"/>
+                <entity-and entity-name="PartyDataSource" list="partyDataSources">
+                    <field-map field-name="partyId" from-field="partyId"/>
+                </entity-and>
+            </actions>
+            <widgets>
+                <screenlet title="${uiLabelMap.SfaLeadSource}" >
+                    <include-form name="AddLeadPartyDataSource" location="component://marketing/widget/sfa/forms/LeadForms.xml"/>
+                    <include-form name="ViewLeadPartyDataSources" location="component://marketing/widget/sfa/forms/LeadForms.xml"/>
+                </screenlet>
+            </widgets>
+        </section>
+    </screen>
 </screens>
\ No newline at end of file

Modified: ofbiz/trunk/applications/marketing/widget/sfa/forms/LeadForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/marketing/widget/sfa/forms/LeadForms.xml?rev=778965&r1=778964&r2=778965&view=diff
==============================================================================
--- ofbiz/trunk/applications/marketing/widget/sfa/forms/LeadForms.xml (original)
+++ ofbiz/trunk/applications/marketing/widget/sfa/forms/LeadForms.xml Wed May 27 02:21:26 2009
@@ -78,7 +78,14 @@
         <field name="emailAddressTitle" title="${uiLabelMap.PartyEmailAddress}" title-area-style="group-label"><display/></field>
         <field name="emailAddress" title="${uiLabelMap.CommonEmail}"><text size="50" maxlength="60"/></field>
         <field name="leadSourceTitle" title="${uiLabelMap.SfaLeadSource}" title-area-style="group-label"><display/></field>
-        <field name="leadSource" title="${uiLabelMap.SfaLeadSource}"><text size="50" maxlength="60"/></field>
+        <field name="dataSourceId" title="${uiLabelMap.SfaLeadSource}">
+            <drop-down allow-empty="true">
+                <entity-options entity-name="DataSource" key-field-name="dataSourceId" description="${dataSourceId} - ${description}">
+                    <entity-constraint name="dataSourceTypeId" operator="equals" value="LEAD_SOURCE"/>
+                    <entity-order-by field-name="dataSourceId"/>
+                </entity-options>
+            </drop-down>
+        </field>
         <field name="contactListTitle" title="${uiLabelMap.MarketingContactList}" title-area-style="group-label"><display/></field>
         <field name="contactListId" title="${uiLabelMap.MarketingContactList}">
             <drop-down allow-empty="true">
@@ -145,4 +152,27 @@
         <field name="quickAdd"><hidden value="Y"/></field>
         <field name="submitButton"><submit/></field>
     </form>
+    <form name="AddLeadPartyDataSource" type="single" target="createLeadPartyDataSource">
+        <auto-fields-service service-name="createPartyDataSource"/>
+        <field name="partyId"><hidden/></field>
+        <field name="dataSourceId" title="${uiLabelMap.SfaLeadSource}">
+            <drop-down allow-empty="true">
+                <entity-options entity-name="DataSource" key-field-name="dataSourceId" description="${dataSourceId} - ${description}">
+                    <entity-constraint name="dataSourceTypeId" operator="equals" value="LEAD_SOURCE"/>
+                    <entity-order-by field-name="dataSourceId"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field>
+    </form>
+    <form name="ViewLeadPartyDataSources" type="list" list-name="partyDataSources"
+        odd-row-style="alternate-row" default-table-style="basic-table hover-bar" header-row-style="header-row-2">
+        <field name="partyId"><hidden/></field>
+        <field name="dataSourceId" title="${uiLabelMap.SfaLeadSource}">
+            <display-entity entity-name="DataSource"/>
+        </field>
+        <field name="fromDate"><display></display> </field>
+        
+    </form>
+    
 </forms>