Author: hansbak
Date: Tue Dec 25 21:08:47 2007 New Revision: 606847 URL: http://svn.apache.org/viewvc?rev=606847&view=rev Log: introduced a 'readOnly' timesheet after the status has been set to 'complete Modified: ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrTypeData.xml ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.bsh ofbiz/trunk/specialpurpose/projectmgr/widget/TimeSheetScreens.xml ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml Modified: ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrTypeData.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrTypeData.xml?rev=606847&r1=606846&r2=606847&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrTypeData.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/data/ProjectMgrTypeData.xml Tue Dec 25 21:08:47 2007 @@ -27,8 +27,8 @@ <RoleType description="Provider Accounting" hasTable="N" parentTypeId="PROJECT_TEAM" roleTypeId="PROVIDER_ACCOUNTING"/> <RoleType description="Provider Analyst" hasTable="N" parentTypeId="PROJECT_TEAM" roleTypeId="PROVIDER_ANALYST"/> <RoleType description="Provider Validator" hasTable="N" parentTypeId="PROJECT_TEAM" roleTypeId="PROVIDER_VALIDATOR"/> - <RoleType description="Provider Functional Implementer" hasTable="N" parentTypeId="PROJECT_TEAM" roleTypeId="PRVDER_FUNCTNAL_IMPL"/> - <RoleType description="Provider Test Implementer" hasTable="N" parentTypeId="PROJECT_TEAM" roleTypeId="PRVDER_TEST_IMPL"/> + <RoleType description="Provider Func. Impl" hasTable="N" parentTypeId="PROJECT_TEAM" roleTypeId="PROVIDER_FUNCTIONAL"/> + <RoleType description="Provider Tester" hasTable="N" parentTypeId="PROJECT_TEAM" roleTypeId="PROVIDER_TESTER"/> <!-- to be able to store project templates --> <WorkEffortType workEffortTypeId="TEMPLATE" description="Template"/> @@ -41,7 +41,7 @@ <SkillType skillTypeId="9001" description="Mini Language"/> <SkillType skillTypeId="9002" description="HTML/FTL"/> <SkillType skillTypeId="9003" description="Javascript/Dojo"/> - <SkillType skillTypeId="9004" description="Screens/forms"/> + <SkillType skillTypeId="9004" description="Screens/Forms"/> <SkillType skillTypeId="9005" description="OFBiz Installation"/> <SkillType skillTypeId="_NA_" description="Not Applicable"/> Modified: ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml?rev=606847&r1=606846&r2=606847&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/script/org/ofbiz/project/ProjectServices.xml Tue Dec 25 21:08:47 2007 @@ -270,6 +270,8 @@ <get-related-one value-name="phase" relation-name="ParentWorkEffort" to-value-name="project"/> <field-to-result field-name="project.workEffortId" result-name="projectId"/> <field-to-result field-name="project.workEffortName" result-name="projectName"/> + <field-to-result field-name="phase.workEffortId" result-name="phaseId"/> + <field-to-result field-name="phase.workEffortName" result-name="phaseName"/> </simple-method> <simple-method method-name="createProject" short-description="if templateId is present copy a project from a template"> @@ -545,7 +547,6 @@ <call-simple-method method-name="getHours"/> <set field="highInfo.currentStatusId" from-field="lowInfo.currentStatusId"/> <field-to-result field-name="highInfo" result-name="taskInfo"/> - <call-simple-method method-name="getProjectIdAndName"/> </simple-method> <simple-method method-name="getProjectsByParties" short-description="get Project information by party member" login-required="true"> Modified: ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml?rev=606847&r1=606846&r2=606847&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/servicedef/services.xml Tue Dec 25 21:08:47 2007 @@ -91,6 +91,8 @@ <attribute name="phaseId" type="String" mode="IN" optional="true"/> <attribute name="projectId" type="String" mode="OUT" optional="true"/> <attribute name="projectName" type="String" mode="OUT" optional="true"/> + <attribute name="phaseId" type="String" mode="OUT" optional="true"/> + <attribute name="phaseName" type="String" mode="OUT" optional="true"/> </service> <service name="getProjectPhaseList" engine="simple" Modified: ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.bsh URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.bsh?rev=606847&r1=606846&r2=606847&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.bsh (original) +++ ofbiz/trunk/specialpurpose/projectmgr/webapp/projectmgr/WEB-INF/actions/EditWeekTimesheet.bsh Tue Dec 25 21:08:47 2007 @@ -92,7 +92,12 @@ if (UtilValidate.isNotEmpty(timeEntry.get("workEffortId"))) { workEffort = timeEntry.getRelatedOne("WorkEffort"); entry.put("workEffortId", workEffort.getString("workEffortId")); - entry.put("workEffortName", workEffort.getString("workEffortName")); + entry.put("workEffortName", workEffort.getString("workEffortName")); + result = dispatcher.runSync("getProjectIdAndName", UtilMisc.toMap("userLogin", parameters.get("userLogin"),"taskId",timeEntry.getString("workEffortId"))); + entry.put("phaseId",result.get("phaseId")); + entry.put("phaseName",result.get("phaseName")); + entry.put("projectId",result.get("projectId")); + entry.put("projectName",result.get("projectName")); } entry.put("timesheetId", timesheet.get("timesheetId")); if (timeEntry.get("hours") != null) { @@ -124,8 +129,10 @@ entry.put("total", taskTotal); entries.add(entry); } -for (c=0; c < 3; c++) { // add 5 empty lines - entries.add(UtilMisc.toMap("timesheetId", timesheet.get("timesheetId"))); +if (!timesheet.getString("statusId").equals("TIMESHEET_COMPLETED")) { + for (c=0; c < 3; c++) { // add 5 empty lines + entries.add(UtilMisc.toMap("timesheetId", timesheet.get("timesheetId"))); + } } if (lastWorkEffortId != null) { entry = UtilMisc.toMap("timesheetId", timesheet.get("timesheetId")); Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/TimeSheetScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/TimeSheetScreens.xml?rev=606847&r1=606846&r2=606847&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/TimeSheetScreens.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/TimeSheetScreens.xml Tue Dec 25 21:08:47 2007 @@ -84,12 +84,15 @@ <widgets> <decorator-screen name="CommonMyTimeDecorator" location="${parameters.mainDecoratorLocation}"> <decorator-section name="body"> - <section> + <section> + <condition> + <if-compare field-name="timesheet.statusId" operator="equals" value="TIMESHEET_COMPLETED"/> + </condition> <widgets> <container style="screenlet"> <container style="screenlet-title-bar"><label style="boxhead">${uiLabelMap.PageTitleEditCurrentTimesheet} # ${timesheet.timesheetId} week: ${weekNumber}</label></container> <container style="screenlet-body"> - <include-form name="EditWeekTimesheet" location="component://projectmgr/widget/forms/TimeSheetForms.xml"/> + <include-form name="WeekTimesheet" location="component://projectmgr/widget/forms/TimeSheetForms.xml"/> </container> </container> <container style="screenlet"> @@ -98,7 +101,21 @@ <include-form name="ListTimeSheets" location="component://projectmgr/widget/forms/TimeSheetForms.xml"/> </container> </container> - </widgets> + </widgets> + <fail-widgets> + <container style="screenlet"> + <container style="screenlet-title-bar"><label style="boxhead">${uiLabelMap.PageTitleEditCurrentTimesheet} # ${timesheet.timesheetId} week: ${weekNumber}</label></container> + <container style="screenlet-body"> + <include-form name="EditWeekTimesheet" location="component://projectmgr/widget/forms/TimeSheetForms.xml"/> + </container> + </container> + <container style="screenlet"> + <container style="screenlet-title-bar"><label style="boxhead">${uiLabelMap.PageTitleMyTimesheets} # ${timesheet.timesheetId}</label></container> + <container style="screenlet-body"> + <include-form name="ListTimeSheets" location="component://projectmgr/widget/forms/TimeSheetForms.xml"/> + </container> + </container> + </fail-widgets> </section> </decorator-section> </decorator-screen> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml?rev=606847&r1=606846&r2=606847&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TaskForms.xml Tue Dec 25 21:08:47 2007 @@ -21,7 +21,13 @@ <forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > - <form name="EditTask" type="single" target="updateTask" default-map-name="task"> + <form name="EditTask" type="single" target="updateTask" default-map-name="task"> + <actions> + <service service-name="getProjectTask" result-map-name="result"> + <field-map field-name="taskId" env-name="workEffortId"/> + </service> + <set field="statusId" from-field="result.taskInfo.currentStatusId"/> + </actions> <alt-target use-when="myTask!=null" target="createMyTask"/> <alt-target use-when="task==null" target="createTask"/> <field use-when="myTask!=null" name="partyId"><hidden value="${userLogin.partyId}"/></field> @@ -64,8 +70,8 @@ </drop-down> </field> <field name="description" title="${uiLabelMap.CommonDescription}"><text/></field> - <field use-when="myTask==null" name="currentStatusId"><hidden value="PTS_CREATED"/></field> - <field use-when="myTask!=null" name="statusId"><hidden/></field> + <field use-when="myTask!=null||task==null" name="currentStatusId"><hidden value="PTS_CREATED"/></field> + <field use-when="task!=null" name="statusId"><display-entity entity-name="StatusItem" key-field-name="statusId"/></field> <field name="priority" title="${uiLabelMap.CommonPriority}"> <drop-down allow-empty="true" current="selected"> <option key="1" description="1 (${uiLabelMap.WorkEffortPriorityHigh})"/> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml?rev=606847&r1=606846&r2=606847&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/TimeSheetForms.xml Tue Dec 25 21:08:47 2007 @@ -172,6 +172,29 @@ description="${uiLabelMap.CommonDelete}" also-hidden="false"/> </field> </form> - + <form name="WeekTimesheet" type="multi" list-name="timeEntries" use-row-submit="true" + separate-columns="true" target="" > + <field name="timesheetId"><hidden/></field> + <field name="workEffortName" title="${uiLabelMap.ProjectMgrTaskName}"> + <hyperlink target="taskView?workEffortId=${workEffortId} " description="${workEffortName}"/> + </field> + <field name="phaseName" title="${uiLabelMap.ProjectMgrPhaseName}"> + <hyperlink target="FindPhase?projectId=${projectId}" description="${phaseName}"/> + </field> + <field name="projectName" title="${uiLabelMap.ProjectMgrProjectName}"> + <hyperlink target="projectView?projectId=${projectId} " description="${projectName}"/> + </field> + <field name="0" parameter-name="hoursDay0" title="Sun"><display/></field> + <field name="1" parameter-name="hoursDay1" title="Mon"><display/></field> + <field name="2" parameter-name="hoursDay2" title="Tue"><display/></field> + <field name="3" parameter-name="hoursDay3" title="Wen"><display/></field> + <field name="4" parameter-name="hoursDay4" title="Thu"><display/></field> + <field name="5" parameter-name="hoursDay5" title="Fri"><display/></field> + <field name="6" parameter-name="hoursDay6" title="Sat"><display/></field> + <field name="total" title="Act Total"><display/></field> + <field name="plannedHours" title="Plan.Hrs"><display/></field> + <!--field name="update"><submit button-type="button"/></field--> + <!--field name="_rowSubmit"><hidden value="Y"/></field--> + </form> </forms> |
Free forum by Nabble | Edit this page |