Author: hansbak
Date: Mon Aug 25 03:41:09 2008 New Revision: 688690 URL: http://svn.apache.org/viewvc?rev=688690&view=rev Log: allow the customer to enter requests and set the priority Modified: ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml ofbiz/trunk/specialpurpose/projectmgr/widget/forms/RequestForms.xml Modified: ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml?rev=688690&r1=688689&r2=688690&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/webapp/mypage/WEB-INF/controller.xml Mon Aug 25 03:41:09 2008 @@ -183,7 +183,25 @@ <response name="error" type="view" value="main"/> </request-map> - + <!-- Create Customer Request--> + <request-map uri="newrequest"> + <security https="true" auth="true"/> + <response name="success" type="view" value="EditRequest"/> + </request-map> + <request-map uri="createrequest"> + <security https="true" auth="true"/> + <event type="service" invoke="createCustRequest"/> + <response name="success" type="view" value="main"/> + <response name="error" type="view" value="EditRequest"/> + </request-map> + <request-map uri="updateRequest"> + <security https="true" auth="true"/> + <event type="service" invoke="updateCustRequest"/> + <response name="success" type="view" value="main"/> + <response name="error" type="view" value="main"/> + </request-map> + + <view-map name="main" type="screen" page="component://mypage/widget/CommonScreens.xml#main"/> <view-map name="preferences" type="screen" page="component://mypage/widget/CommonScreens.xml#preferences"/> <view-map name="myTasks" type="screen" page="component://mypage/widget/CommonScreens.xml#MyTasks"/> @@ -194,4 +212,5 @@ <view-map name="newEvent" type="screen" page="component://mypage/widget/MyPageScreens.xml#newEvent"/> <view-map name="ViewCommunicationEvent" type="screen" page="component://mypage/widget/MyPageScreens.xml#ViewCommunicationEvent"/> <view-map name="ViewRequest" type="screen" page="component://projectmgr/widget/RequestScreens.xml#ViewRequest"/> + <view-map name="EditRequest" type="screen" page="component://mypage/widget/MyPageScreens.xml#EditRequest"/> </site-conf> Modified: ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml?rev=688690&r1=688689&r2=688690&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/widget/CommonScreens.xml Mon Aug 25 03:41:09 2008 @@ -282,9 +282,15 @@ <set field="partyId" from-field="userLogin.partyId"/> <set field="status" from-field="parameters.status" default-value="open"/> <set field="status" value="${bsh:"all".equals(status)?"%":"open"}"/> + <entity-condition list-name="custRequests" entity-name="CustRequestInfoAndWorkEffort"> + <condition-list combine="and"> + <condition-expr field-name="fromPartyId" operator="equals" value="userLogin.partyId"/> + </condition-list> + <order-by field-name="-custRequestDate"/> + </entity-condition> <entity-and list-name="custRequests" entity-name="CustRequestInfoAndWorkEffort"> <field-map field-name="fromPartyId" env-name="userLogin.partyId"/> - <order-by field-name="createdDate"/> + <order-by field-name="-custRequestDate"/> </entity-and> <!-- only list internal notes to the customer do not show the incoming or outgoing emails: will confuse only --> <entity-condition entity-name="CommunicationEventAndRole" list-name="commEvents"> @@ -303,6 +309,7 @@ </actions> <widgets> <screenlet title="${uiLabelMap.MyCustRequests}" navigation-form-name="ListRequestList" > + <link target="newrequest" text="${uiLabelMap.OrderNewRequest}" style="buttontext"/> <include-form name="ListCustRequests" location="component://mypage/widget/MyPageForms.xml"/> </screenlet> <screenlet title="${uiLabelMap.CommunicationsOfParty}: ${partyName.firstName} ${partyName.middleName} ${partyName.lastName} ${partyName.groupName} [${partyId}] " Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml?rev=688690&r1=688689&r2=688690&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageForms.xml Mon Aug 25 03:41:09 2008 @@ -127,16 +127,30 @@ <hyperlink target="/projectmgr/control/taskView?workEffortId=${workEffortId}" description="${workEffortName} [${workEffortId}]" target-type="inter-app"/> </field> </form> - <form name="ListCustRequests" type="list" list-name="custRequests" odd-row-style="alternate-row" default-table-style="basic-table hover-bar"> + <form name="ListCustRequests" type="list" list-name="custRequests" odd-row-style="alternate-row" default-table-style="basic-table hover-bar" target="updateRequest"> <row-actions> <service service-name="getProjectTask" result-map-name="taskResult"> <field-map field-name="taskId" env-name="workEffortId"/> </service> </row-actions> + <field name="custRequestId"><hidden/></field> <field name="custRequestName"><hyperlink description="${custRequestName} [${custRequestId}]" target="ViewRequest?custRequestId=${custRequestId}"/></field> - <field name="description" title="${uiLabelMap.CommonDescription}"><display/></field> - <field name="createdDate" title="Date"><display type="date"/></field> + <field name="custRequestDate" title="Date"><display type="date"/></field> <field name="statusId"><display-entity entity-name="StatusItem" description="${description}"/></field> + <field name="priority"> + <drop-down allow-empty="true"> + <option key="9"/> + <option key="8"/> + <option key="7"/> + <option key="6"/> + <option key="5"/> + <option key="4"/> + <option key="3"/> + <option key="2"/> + <option key="1"/> + </drop-down> + </field> + <field name="updateButton" widget-style="smallSubmit"><submit /></field> <field name="currentStatusId" map-name="taskResult.taskInfo" title="${uiLabelMap.TaskStatus}"><display-entity entity-name="StatusItem" key-field-name="statusId"/></field> <field name="estimatedStartDate" map-name="taskResult.taskInfo" title="${uiLabelMap.TaskPlanStartDate}"><display type="date"/></field> <field name="estimatedCompletionDate" map-name="taskResult.taskInfo" title="${uiLabelMap.TaskPlanEndDate}"><display type="date"/></field> @@ -145,4 +159,10 @@ <field name="plannedHours" map-name="taskResult.taskInfo"><display/></field> <field name="actualHours" map-name="taskResult.taskInfo"><display/></field> </form> + + <form name="EditCustRequest" extends="EditCustRequest" extends-resource="component://projectmgr/widget/forms/RequestForms.xml"> + <field name="fromPartyId" title="${uiLabelMap.OrderRequestingParty}"><hidden value="${userLogin.partyId}"/></field> + <field name="custRequestDate"><ignored/></field> + </form> + </forms> \ No newline at end of file Modified: ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml?rev=688690&r1=688689&r2=688690&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml (original) +++ ofbiz/trunk/specialpurpose/mypage/widget/MyPageScreens.xml Mon Aug 25 03:41:09 2008 @@ -434,4 +434,33 @@ </widgets> </section> </screen> + <screen name="EditRequest"> + <section> + <actions> + <set field="titleProperty" value="OrderRequest"/> + <set field="tabButtonItem" value="editRequest"/> + <set field="headerItem" value="request"/> + + <set field="custRequestId" from-field="parameters.custRequestId"/> + <entity-one entity-name="CustRequest" value-name="custRequest"/> + + <set field="statusId" from-field="custRequest.statusId"/> + <entity-one entity-name="StatusItem" value-name="currentStatus"/> + </actions> + <widgets> + <section> + <widgets> + <decorator-screen name="main-decorator" + location="${parameters.mainDecoratorLocation}"> + <decorator-section name="body"> + <screenlet title="${uiLabelMap.OrderNewRequest}"> + <include-form name="EditCustRequest" location="component://mypage/widget/MyPageForms.xml"/> + </screenlet> + </decorator-section> + </decorator-screen> + </widgets> + </section> + </widgets> + </section> + </screen> </screens> Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/RequestForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/RequestForms.xml?rev=688690&r1=688689&r2=688690&view=diff ============================================================================== --- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/RequestForms.xml (original) +++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/RequestForms.xml Mon Aug 25 03:41:09 2008 @@ -32,13 +32,13 @@ <field name="fromPartyId" title="${uiLabelMap.OrderRequestingParty}"> <lookup target-form-name="LookupPartyName"/> </field> - <field name="custRequestName" title="${uiLabelMap.CommonTitle}"><text/></field> - <field name="description" parameter-name="story" use-when="custRequest==null"><textarea cols="60" rows="12"/></field> + <field name="custRequestName" title="${uiLabelMap.PartySubject}"><text/></field> <field name="custRequestTypeId"> <drop-down allow-empty="false"> <entity-options entity-name="CustRequestType" description="${description}"/> </drop-down> </field> + <field name="description" parameter-name="story" use-when="custRequest==null"><textarea cols="60" rows="12"/></field> <field use-when="custRequest!=null" name="statusId"> <drop-down allow-empty="false" current="first-in-list" current-description="${currentStatus.description}"> <entity-options entity-name="StatusValidChangeToDetail" key-field-name="statusIdTo" description="${transitionName} (${description})"> |
Free forum by Nabble | Edit this page |