You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2008/10/15 11:00:57 UTC

svn commit: r704812 - in /ofbiz/trunk/specialpurpose/projectmgr: data/ProjectMgrDemoData.xml webapp/projectmgr/WEB-INF/actions/GanttChart.groovy widget/CommonScreens.xml widget/ProjectScreens.xml widget/ResourceScreens.xml widget/forms/ProjectForms.xml

Author: hansbak
Date: Wed Oct 15 02:00:55 2008
New Revision: 704812

URL: http://svn.apache.org/viewvc?rev=704812&view=rev
Log:
various enhancements in the display of data and extending the demo data

Modified:
    ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrDemoData.xml
    ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy
    ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/ResourceScreens.xml
    ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml

Modified: ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrDemoData.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrDemoData.xml?rev=704812&r1=704811&r2=704812&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrDemoData.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrDemoData.xml Wed Oct 15 02:00:55 2008
@@ -9,6 +9,7 @@
     <Person partyId="DemoEmployee" firstName="Demo" lastName="Employee" />
     <UserLogin userLoginId="DemoEmployee" partyId="DemoEmployee"/>
     <PartyRole partyId="DemoEmployee" roleTypeId="EMPLOYEE"/>
+    <PartyRole partyId="DemoEmployee" roleTypeId="PROVIDER_ANALYST"/>
     <PartyContactMech partyId="DemoEmployee" contactMechId="9020" fromDate="2000-01-01 10:01:48.933" roleTypeId="EMPLOYEE" />
     <PartyContactMech partyId="DemoEmployee" contactMechId="9001" fromDate="2000-01-01 10:01:48.933" roleTypeId="EMPLOYEE" />
     <PartyContactMech partyId="DemoEmployee" contactMechId="9023" fromDate="2000-01-01 10:01:48.933" roleTypeId="EMPLOYEE" />
@@ -20,6 +21,7 @@
     <Person partyId="DemoEmployee1" firstName="Peter" lastName="Manager" />
     <UserLogin userLoginId="DemoEmployee1" partyId="DemoEmployee1"/>
     <PartyRole partyId="DemoEmployee1" roleTypeId="EMPLOYEE"/>
+    <PartyRole partyId="DemoEmployee1" roleTypeId="PROVIDER_MANAGER"/>
     <PartyContactMech partyId="DemoEmployee1" contactMechId="9020" fromDate="2000-01-01 10:01:48.933" roleTypeId="EMPLOYEE" />
     <PartyContactMech partyId="DemoEmployee1" contactMechId="9001" fromDate="2000-01-01 10:01:48.933" roleTypeId="EMPLOYEE" />
     <PartyContactMech partyId="DemoEmployee1" contactMechId="9023" fromDate="2000-01-01 10:01:48.933" roleTypeId="EMPLOYEE" />
@@ -30,6 +32,7 @@
     <Party partyId="DemoEmployee2" partyTypeId="PERSON" statusId="PARTY_ENABLED" />
     <Person partyId="DemoEmployee2" firstName="Jo" lastName="Analist1" />
     <UserLogin userLoginId="DemoEmployee2"  partyId="DemoEmployee2"/>
+    <PartyRole partyId="DemoEmployee2" roleTypeId="PROVIDER_ANALYST"/>
     <PartyRole partyId="DemoEmployee2" roleTypeId="EMPLOYEE"/>
     <PartyContactMech partyId="DemoEmployee2" contactMechId="9020" fromDate="2000-01-01 10:01:48.933" roleTypeId="EMPLOYEE" />
     <PartyContactMech partyId="DemoEmployee2" contactMechId="9001" fromDate="2000-01-01 10:01:48.933" roleTypeId="EMPLOYEE" />
@@ -41,6 +44,7 @@
     <Party partyId="DemoEmployee3" partyTypeId="PERSON" statusId="PARTY_ENABLED" />
     <Person partyId="DemoEmployee3" firstName="Tom" lastName="Analist2" />
     <UserLogin userLoginId="DemoEmployee3"  partyId="DemoEmployee3"/>
+    <PartyRole partyId="DemoEmployee3" roleTypeId="PROVIDER_ANALYST"/>
     <PartyRole partyId="DemoEmployee3" roleTypeId="EMPLOYEE"/>
     <PartyContactMech partyId="DemoEmployee3" contactMechId="9020" fromDate="2000-01-01 10:01:48.933" roleTypeId="EMPLOYEE" />
     <PartyContactMech partyId="DemoEmployee3" contactMechId="9001" fromDate="2000-01-01 10:01:48.933" roleTypeId="EMPLOYEE" />
@@ -53,6 +57,7 @@
     <Person partyId="DemoCustomer1" firstName="ManagerP1" lastName="Customer 1" />
     <UserLogin userLoginId="DemoCustomer1"  partyId="DemoCustomer1"/>
     <PartyRole partyId="DemoCustomer1" roleTypeId="CUSTOMER"/>
+    <PartyRole partyId="DemoCustomer1" roleTypeId="CLIENT_MANAGER"/>
     <PartyContactMech partyId="DemoCustomer1" contactMechId="9020" fromDate="2000-01-01 10:01:48.933" roleTypeId="CUSTOMER" />
     <PartyContactMech partyId="DemoCustomer1" contactMechId="9001" fromDate="2000-01-01 10:01:48.933" roleTypeId="CUSTOMER" />
     <PartyContactMech partyId="DemoCustomer1" contactMechId="9023" fromDate="2000-01-01 10:01:48.933" roleTypeId="CUSTOMER" />
@@ -64,6 +69,7 @@
     <Person partyId="DemoCustomer2" firstName="ManagerP2" lastName="Customer 2"/>
     <UserLogin userLoginId="DemoCustomer2"  partyId="DemoCustomer2"/>
     <PartyRole partyId="DemoCustomer2" roleTypeId="CUSTOMER"/>
+    <PartyRole partyId="DemoCustomer2" roleTypeId="CLIENT_MANAGER"/>
     <PartyContactMech partyId="DemoCustomer2" contactMechId="9020" fromDate="2000-01-01 10:01:48.933" roleTypeId="CUSTOMER" />
     <PartyContactMech partyId="DemoCustomer2" contactMechId="9001" fromDate="2000-01-01 10:01:48.933" roleTypeId="CUSTOMER" />
     <PartyContactMech partyId="DemoCustomer2" contactMechId="9023" fromDate="2000-01-01 10:01:48.933" roleTypeId="CUSTOMER" />
@@ -75,6 +81,7 @@
     <Person partyId="DemoCustomer3" firstName="Billing" lastName="Customer 2"/>
     <UserLogin userLoginId="DemoCustomer3"  partyId="DemoCustomer3"/>
     <PartyRole partyId="DemoCustomer3" roleTypeId="CUSTOMER"/>
+    <PartyRole partyId="DemoCustomer3" roleTypeId="CLIENT_BILLING"/>
     <PartyContactMech partyId="DemoCustomer3" contactMechId="9020" fromDate="2000-01-01 10:01:48.933" roleTypeId="CUSTOMER" />
     <PartyContactMech partyId="DemoCustomer3" contactMechId="9001" fromDate="2000-01-01 10:01:48.933" roleTypeId="CUSTOMER" />
     <PartyContactMech partyId="DemoCustomer3" contactMechId="9023" fromDate="2000-01-01 10:01:48.933" roleTypeId="CUSTOMER" />

Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy?rev=704812&r1=704811&r2=704812&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/GanttChart.groovy Wed Oct 15 02:00:55 2008
@@ -68,6 +68,7 @@
                 taskInfo = resultTaskInfo.taskInfo;
                 taskInfo.taskNr = task.workEffortId;
                 taskInfo.phaseNr = phase.phaseId;
+                double duration = resultTaskInfo.plannedHours;
                 if (!taskInfo.estimatedStartDate && taskInfo.actualStartDate) {
                     taskInfo.estimatedStartDate = taskInfo.actualStartDate;
                 }
@@ -77,8 +78,10 @@
                 if (!taskInfo.estimatedCompletionDate && taskInfo.actualCompletionDate) {
                     taskInfo.estimatedCompletionDate = taskInfo.actualCompletionDate;
                 }
-                if (!taskInfo.estimatedCompletionDate) {
+                if (!taskInfo.estimatedCompletionDate && !duration) {
                     taskInfo.estimatedCompletionDate = UtilDateTime.addDaysToTimestamp(newPhase.estimatedStartDate, 3);
+                } else if (!taskInfo.estimatedCompletionDate && duration) {
+                    taskInfo.estimatedCompletionDate = UtilDateTime.addDaysToTimestamp(newPhase.estimatedStartDate, duration/8);
                 }
                 taskInfo.estimatedStartDate = UtilDateTime.toDateString(taskInfo.estimatedStartDate, "MM/dd/yyyy");
                 taskInfo.estimatedCompletionDate = UtilDateTime.toDateString(taskInfo.estimatedCompletionDate, "MM/dd/yyyy");

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml?rev=704812&r1=704811&r2=704812&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/CommonScreens.xml Wed Oct 15 02:00:55 2008
@@ -100,6 +100,8 @@
                 </service>
                 <set field="projectId" from-field="result.projectId"/>
                 <set field="projectName" from-field="result.projectName"/>
+                <set field="phaseId" from-field="result.phaseId"/>
+                <set field="phaseName" from-field="result.phaseName"/>
             </actions>
             <widgets>
                 <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
@@ -115,7 +117,7 @@
                                     </condition>
                                     <widgets>                                        
                                         <include-menu name="TaskTabBar" location="component://projectmgr/widget/Menus.xml"/>
-                                        <label style="h1" text="${uiLabelMap.ProjectMgrTaskCurrent}: ${workEffort.workEffortName}[${workEffort.workEffortId}] Project: ${projectName}"/>
+                                        <label style="h1" text="${uiLabelMap.ProjectMgrTaskCurrent}: ${workEffort.workEffortName}[${workEffort.workEffortId}] Phase: ${phaseName} Project: ${projectName}"/>
                                         <link style="h1" text="[${projectId}]" target="projectView?projectId=${projectId}"/>
                                     </widgets>                                    
                                 </section>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml?rev=704812&r1=704811&r2=704812&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/ProjectScreens.xml Wed Oct 15 02:00:55 2008
@@ -712,7 +712,7 @@
                 <entity-one entity-name="PartyAndPerson" value-name="person"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonListResourceDecorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <include-form name="EditPerson" location="component://party/webapp/partymgr/party/PartyForms.xml"/>
                     </decorator-section>
@@ -732,7 +732,7 @@
                 <set field="partyId" from-field="parameters.partyId"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonListResourceDecorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <container><label text="${uiLabelMap.PageTitleNewPartyNote}" style="h2"/></container>
                         <include-form name="AddPartyNote" location="component://party/webapp/partymgr/party/PartyForms.xml"/>
@@ -755,7 +755,7 @@
                 <script location="component://party/webapp/partymgr/WEB-INF/actions/party/EditContactMech.groovy"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonListResourceDecorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <section>
                             <condition>
@@ -810,7 +810,7 @@
                 <script location="component://party/webapp/partymgr/WEB-INF/actions/communication/FindCommEventContactMechs.groovy"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonListResourceDecorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <section>
                             <widgets>
@@ -874,7 +874,7 @@
                 <set field="partyId" from-field="parameters.partyId"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonListResourceDecorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <container><label text="${uiLabelMap.PartyCreateUserLogin}" style="h2"/></container>
                         <include-form name="AddUserLogin" location="component://party/webapp/partymgr/party/PartyForms.xml"/>
@@ -894,7 +894,7 @@
                 <script location="component://party/webapp/partymgr/WEB-INF/actions/visit/ShowVisits.groovy"/>                
             </actions>
             <widgets>
-                <decorator-screen name="CommonListResourceDecorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <section>
                             <!-- do check for PARTYMGR, _VIEW permission -->
@@ -925,7 +925,7 @@
                 <script location="component://party/webapp/partymgr/WEB-INF/actions/visit/VisitDetails.groovy"/>                
             </actions>
             <widgets>
-                <decorator-screen name="CommonListResourceDecorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <section>
                             <!-- do check for PARTYMGR, _VIEW permission -->
@@ -960,7 +960,7 @@
                 <entity-one entity-name="UserLogin" value-name="editUserLogin"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonListResourceDecorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <container><label text="${uiLabelMap.PartyUserLoginChangePassword}" style="h2"/></container>
                         <include-form name="updatePassword" location="component://party/webapp/partymgr/party/PartyForms.xml"/>
@@ -984,7 +984,7 @@
                 <set field="partyId" from-field="parameters.partyId" default-value="${editUserLogin.partyId}"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonListResourceDecorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <container><label style="h2" text="${uiLabelMap.PageTitleEditUserLoginSecurityGroups}"/></container>
                         <include-form name="ListUserLoginSecurityGroups" location="component://party/widget/partymgr/SecurityForms.xml"/>
@@ -1009,7 +1009,7 @@
                 <entity-one entity-name="PartyAndGroup" value-name="partyGroup"/>
             </actions>
             <widgets>
-                <decorator-screen name="CommonListResourceDecorator" location="${parameters.mainDecoratorLocation}">
+                <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
                     <decorator-section name="body">
                         <include-form name="EditPartyGroup" location="component://party/webapp/partymgr/party/PartyForms.xml"/>
                     </decorator-section>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/ResourceScreens.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/ResourceScreens.xml?rev=704812&r1=704811&r2=704812&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/ResourceScreens.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/ResourceScreens.xml Wed Oct 15 02:00:55 2008
@@ -26,11 +26,14 @@
                 <set field="titleProperty" value="PageTitleFindResource"/>
                 <set field="labelTitleProperty" value="ProjectMgrResourceName"/>
                 <set field="workEffortId" from-field="parameters.projectId"/>
-                <entity-and entity-name="PartyRoleAndPartyDetail" list-name="resources">
-                    <field-map field-name="roleTypeId" value="PROJECT_TEAM"/>
+                <entity-condition entity-name="PartyRoleAndPartyDetail" list-name="resources">
+                    <condition-list combine="and">
+                        <condition-expr field-name="roleTypeId" operator="equals" value="PROJECT_TEAM"/>
+                        <condition-expr field-name="statusId" operator="not-equals" value="PARTY_DISABLED"/>
+                    </condition-list>
                     <order-by field-name="lastName"/>
                     <order-by field-name="groupName"/>
-                </entity-and>
+                </entity-condition>
             </actions>                                                
             <widgets>  
                 <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
@@ -80,6 +83,13 @@
                 <set field="layoutSettings.javaScripts[]" value="/partymgr/js/PartyProfileContent.js" global="true"/>                
                 <script location="component://party/webapp/partymgr/WEB-INF/actions/party/ViewProfile.groovy"/>
                 <script location="component://party/webapp/partymgr/WEB-INF/actions/party/GetUserLoginPrimaryEmail.groovy"/>
+                <entity-condition entity-name="RoleTypeAndParty" list-name="partyRoles">
+                    <condition-list combine="and">
+                        <condition-expr field-name="partyId" operator="equals" value="${parameters.partyId}"/>
+                        <condition-expr field-name="roleTypeId" operator="not-equals" value="_NA_"/>
+                        <condition-expr field-name="parentTypeId" operator="equals" value="PROJECT_TEAM"/>
+                    </condition-list>
+                </entity-condition>
             </actions>
             <widgets>
                 <decorator-screen name="CommonPartyDecorator" location="${parameters.mainDecoratorLocation}">
@@ -89,12 +99,20 @@
                                 <not><if-empty field-name="party"/></not>
                             </condition>
                             <widgets>
-                                <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="contactsAndAccounts" location="component://party/widget/partymgr/ProfileScreens.xml"/>
-                                <include-screen name="UserLogin" location="component://party/widget/partymgr/ProfileScreens.xml"/>
-                                <include-screen name="Visits" location="component://party/widget/partymgr/ProfileScreens.xml"/>
-                                <include-screen name="Notes" location="component://party/widget/partymgr/ProfileScreens.xml"/>                               
+                                <container style="lefthalf">
+                                    <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="contactsAndAccounts" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                    <screenlet title="${uiLabelMap.PartyMemberRoles}" navigation-form-name="ViewPartyRoles">
+                                        <include-form name="ViewPartyRoles" location="component://party/webapp/partymgr/party/PartyForms.xml"/>
+                                    </screenlet>
+                                </container>
+                                <container style="righthalf">
+                                    <include-screen name="UserLogin" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                    <include-screen name="Content" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                    <include-screen name="Notes" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                    <include-screen name="Visits" location="component://party/widget/partymgr/ProfileScreens.xml"/>
+                                </container>                               
                             </widgets>
                         </section>
                     </decorator-section>

Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml?rev=704812&r1=704811&r2=704812&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml Wed Oct 15 02:00:55 2008
@@ -334,7 +334,7 @@
     <form name="EditWorkEffortPartyAssigns" target="deleteWorkEffortPartyAssign" title="" type="list" paginate-target="ListWorkEffortPartyAssigns"
         odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
         <actions>
-            <entity-condition entity-name="WorkEffortPartyAssignView">
+            <entity-condition entity-name="WorkEffortPartyAssignView" filter-by-date="true">
                 <condition-expr field-name="workEffortId" operator="equals" env-name="workEffortId"/>
                 <order-by field-name="roleTypeId"/>
             </entity-condition>