Changeset 431
- Timestamp:
- Mar 5, 2010, 12:45:43 PM (15 years ago)
- Location:
- trunk/grails-app
- Files:
-
- 7 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/grails-app/conf/Config.groovy
r418 r431 297 297 [order:91, controller:'departmentDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] 298 298 ] 299 ], 300 [order:160, controller:'productionReferenceDetailed', title:'productionReference', action:'list', 301 subItems: [ 302 [order:10, controller:'productionReferenceDetailed', title:'Production Reference List', action:'list', isVisible: { true }], 303 [order:20, controller:'productionReferenceDetailed', title:'Create', action:'create', isVisible: { true }], 304 [order:90, controller:'productionReferenceDetailed', title:'Show', action:'show', isVisible: { params.action == 'show' }], 305 [order:91, controller:'productionReferenceDetailed', title:'Edit', action:'edit', isVisible: { params.action == 'edit' }] 306 ] 299 307 ] 300 308 ] -
trunk/grails-app/domain/Entry.groovy
r98 r431 3 3 Task task 4 4 EntryType entryType 5 ProductionReference productionReference 6 5 7 String comment 6 8 Date dateDone = new Date() … … 17 19 durationHour(min:0,max:16) 18 20 durationMinute(min:0,max:59) 19 21 productionReference(nullable: true) 20 22 } 21 23 -
trunk/grails-app/i18n/messages.properties
r429 r431 56 56 entry.duration=Duration 57 57 entry.duration.help=The time (hh:mm) booked against this entry for date done. 58 entry.duration.fault=Down Time. 59 entry.duration.fault.help=The production down time directly attributable to this fault. 58 60 entry.date.done=Date Done 59 61 entry.date.done.help=The date on which the event actually occurred. 60 62 entry.comment.fault=Fault 61 entry.comment.fault.help=Describe the fault and what is happening, NOT what needs doing! \ 62 <br /><br />From an operation perspective, NOT a technical perspective. 63 entry.comment.fault.help=Describe the fault and what is happening, NOT what needs doing! 63 64 entry.comment.cause=Cause 64 65 entry.comment.cause.help=The root cause of the fault. Professional opinion on any faults. \ … … 66 67 entry.comment.work.done=Work Done 67 68 entry.comment.work.done.help=Describe the work that was done. 69 entry.productionReference.fault=Production Reference 70 entry.productionReference.fault.help=The production during which the fault occurred. 68 71 69 72 assignedGroup.estimatedDuration=Estimated Duration … … 94 97 task.description=Task Description 95 98 task.description.help=Short basic description of the task. 99 task.description.immediateCallout=Immediate Callout Description. 100 task.description.immediateCallout.help=Short description of the callout. 96 101 task.comment=Task Comment 97 102 task.comment.help=Long text for additional info, only shown in detail views. 98 103 task.targetStartDate=Target Start Date 99 104 task.targetStartDate.help=The date we would like the task to start, set during scheduling. 105 task.targetStartDate.immediateCallout=Callout Date 106 task.targetStartDate.immediateCallout.help=The date the callout occured. 100 107 task.targetCompletionDate=Target Completion Date 101 108 task.targetCompletionDate.help=The date we would like the task to be completed by, set during scheduling. 102 109 task.leadPerson=Lead Person 103 110 task.leadPerson.help=The primay contact person. 111 task.status.resolved=Resolved. 112 task.status.resolved.help=Indicate that all faults and causes have been completely resolved and there is \ 113 no further work to be carried out. 114 task.status.unresolved=Unresolved. 115 task.status.unresolved.help=Indicate that this task requires further attention and there is further \ 116 work to be carried out. 104 117 105 118 taskRecurringSchedule.nextTargetStartDate.mayNotBePast=Please select a start date that is not in the past. … … 132 145 default.close.text=Close 133 146 default.options.text=Options 147 default.none.text=None 134 148 135 149 default.list.failure=Could not generate list for class {0}. -
trunk/grails-app/services/CreateDataService.groovy
r420 r431 112 112 createDemoSuppliers() 113 113 createDemoManufacturers() 114 createDemoProductionReference() 114 115 115 116 // Tasks … … 146 147 147 148 // Authority #1 148 authInstance = new Authority(description:"Application Admin, not required for daily use! Grants full admin access to the application.", 149 authInstance = new Authority(description:"Application Admin, not required for daily use! \ 150 Grants full admin access to the application.", 149 151 authority:"ROLE_AppAdmin") 150 152 saveAndTest(authInstance) … … 157 159 // Authority #2 158 160 authInstance = new Authority(description:"Business Manager, grants full management access.", 159 authority:"ROLE_Manager")161 authority:"ROLE_Manager") 160 162 saveAndTest(authInstance) 161 163 162 164 // Authority #3 163 authInstance = new Authority(description:"Application User, all application users need this base role to allow login.", 164 authority:"ROLE_AppUser") 165 authInstance = new Authority(description:"Application User, all application users need this base role \ 166 to allow login.", 167 authority:"ROLE_AppUser") 165 168 saveAndTest(authInstance) 166 169 167 170 // Authority #4 168 171 authInstance = new Authority(description:"Task Manager", 169 authority:"ROLE_TaskManager")172 authority:"ROLE_TaskManager") 170 173 saveAndTest(authInstance) 171 174 172 175 // Authority #5 173 176 authInstance = new Authority(description:"Task User", 174 authority:"ROLE_TaskUser")177 authority:"ROLE_TaskUser") 175 178 saveAndTest(authInstance) 176 179 177 180 // Authority #6 178 181 authInstance = new Authority(description:"Inventory Manager", 179 authority:"ROLE_InventoryManager")182 authority:"ROLE_InventoryManager") 180 183 saveAndTest(authInstance) 181 184 182 185 // Authority #7 183 186 authInstance = new Authority(description:"Inventory User", 184 authority:"ROLE_InventoryUser")187 authority:"ROLE_InventoryUser") 185 188 saveAndTest(authInstance) 186 189 187 190 // Authority #8 188 191 authInstance = new Authority(description:"Asset Manager", 189 authority:"ROLE_AssetManager")192 authority:"ROLE_AssetManager") 190 193 saveAndTest(authInstance) 191 194 192 195 // Authority #9 193 196 authInstance = new Authority(description:"Asset User", 194 authority:"ROLE_AssetUser") 197 authority:"ROLE_AssetUser") 198 saveAndTest(authInstance) 199 200 // Authority #10 201 authInstance = new Authority(description:"Production Manager", 202 authority:"ROLE_ProductionManager") 203 saveAndTest(authInstance) 204 205 // Authority #11 206 authInstance = new Authority(description:"Production User", 207 authority:"ROLE_ProductionUser") 195 208 saveAndTest(authInstance) 196 209 } … … 279 292 password:passwordEncoded) 280 293 saveAndTest(personInstance) 281 personInstance.addToAuthorities(Authority.get(2)) 282 personInstance.addToAuthorities(Authority.get(3)) 283 personInstance.addToPersonGroups(PersonGroup.get(5)) 294 personInstance.addToAuthorities(Authority.get(2)) // ROLE_Manager. 295 personInstance.addToAuthorities(Authority.get(3)) // ROLE_AppUser. 284 296 285 297 //Person #4 … … 290 302 password:passwordEncoded) 291 303 saveAndTest(personInstance) 292 personInstance.addToAuthorities(Authority.get(3)) 293 personInstance.addToAuthorities(Authority.get(5)) 294 personInstance.addToAuthorities(Authority.get(7)) 295 personInstance.addToAuthorities(Authority.get(9)) 304 personInstance.addToAuthorities(Authority.get(3)) // ROLE_AppUser. 305 personInstance.addToAuthorities(Authority.get(5)) // ROLE_TaskManager. 306 personInstance.addToAuthorities(Authority.get(7)) // ROLE_InventoryUser. 307 personInstance.addToAuthorities(Authority.get(9)) // ROLE_AssetUser. 296 308 personInstance.addToPersonGroups(PersonGroup.get(1)) 297 309 … … 323 335 324 336 //Person #7 325 personInstance = new Person(loginName:" mann",337 personInstance = new Person(loginName:"production manager", 326 338 firstName:"Production", 327 lastName:"Man n",339 lastName:"Manager", 328 340 pass:passClearText, 329 341 password:passwordEncoded) 330 342 saveAndTest(personInstance) 331 personInstance.addToAuthorities(Authority.get(3)) 332 personInstance.addToAuthorities(Authority.get( 5))343 personInstance.addToAuthorities(Authority.get(3)) // ROLE_AppUser. 344 personInstance.addToAuthorities(Authority.get(10)) // ROLE_ProductionManager. 333 345 personInstance.addToPersonGroups(PersonGroup.get(3)) 334 346 335 //Person #7 347 //Person #8 348 personInstance = new Person(loginName:"production", 349 firstName:"Production", 350 lastName:"User", 351 pass:passClearText, 352 password:passwordEncoded) 353 saveAndTest(personInstance) 354 personInstance.addToAuthorities(Authority.get(3)) // ROLE_AppUser. 355 personInstance.addToAuthorities(Authority.get(11)) // ROLE_ProductionUser. 356 personInstance.addToPersonGroups(PersonGroup.get(3)) 357 358 //Person #9 336 359 personInstance = new Person(loginName:"testmanager", 337 360 firstName:"Test", … … 340 363 password:passwordEncoded) 341 364 saveAndTest(personInstance) 342 personInstance.addToAuthorities(Authority.get(3)) 343 personInstance.addToAuthorities(Authority.get(4)) 344 personInstance.addToAuthorities(Authority.get(6)) 345 personInstance.addToAuthorities(Authority.get(8)) 365 personInstance.addToAuthorities(Authority.get(3)) // ROLE_AppUser. 366 personInstance.addToAuthorities(Authority.get(4)) // ROLE_TaskManager. 367 personInstance.addToAuthorities(Authority.get(6)) // ROLE_InventoryManager. 368 personInstance.addToAuthorities(Authority.get(8)) // ROLE_AssetManager. 346 369 personInstance.addToPersonGroups(PersonGroup.get(3)) 347 370 } … … 621 644 } 622 645 646 def createDemoProductionReference() { 647 648 // ProductionReference 649 def productionReferenceInstance 650 651 // ProductionReference #1 652 productionReferenceInstance = new ProductionReference(name: "Monday Production") 653 saveAndTest(productionReferenceInstance) 654 655 // ProductionReference #2 656 productionReferenceInstance = new ProductionReference(name: "Tuesday Production") 657 saveAndTest(productionReferenceInstance) 658 } 659 623 660 /********************* 624 661 START OF TASK -
trunk/grails-app/services/TaskService.groovy
r418 r431 688 688 } 689 689 690 def productionReference 691 if(params.entryFault.productionReference.id.isLong()) 692 productionReference = ProductionReference.get(params.entryFault.productionReference.id.toLong()) 693 690 694 def faultParams = [task: result.taskInstance, 691 695 entryType: EntryType.get(1), 692 696 comment: params.entryFault.comment, 697 productionReference: productionReference, 693 698 durationHour: params.entryFault.durationHour, 694 699 durationMinute: params.entryFault.durationMinute] -
trunk/grails-app/views/entryDetailed/create.gsp
r230 r431 60 60 </td> 61 61 <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'dateDone','errors')}"> 62 <richui:dateChooser name="dateDone" format="dd-MM-yyyy" value="${ new Date()}" />62 <richui:dateChooser name="dateDone" format="dd-MM-yyyy" value="${entryInstance.dateDone}" /> 63 63 <g:helpBalloon code="entry.date.done" /> 64 64 </td> 65 65 </tr> 66 67 <g:if test="${entryInstance?.entryType?.id == 1}"> 68 <tr class="prop"> 69 <td valign="top" class="name"> 70 <label for="productionReference">Production:</label> 71 </td> 72 <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'productionReference','errors')}"> 73 <g:select optionKey="id" 74 from="${ProductionReference.findAllByIsActive(true)}" 75 name="productionReference.id" 76 value="${entryInstance.productionReference?.id}" 77 noSelection="['null':'--None--']"> 78 </g:select> 79 <g:helpBalloon code="entry.productionReference.fault" /> 80 </td> 81 </tr> 82 </g:if> 66 83 67 84 <tr class="prop"> -
trunk/grails-app/views/entryDetailed/edit.gsp
r395 r431 55 55 </td> 56 56 </tr> 57 58 <g:if test="${entryInstance?.entryType?.id == 1}"> 59 <tr class="prop"> 60 <td valign="top" class="name"> 61 <label for="productionReference">Production:</label> 62 </td> 63 <td valign="top" class="value ${hasErrors(bean:entryInstance,field:'productionReference','errors')}"> 64 <g:select optionKey="id" 65 from="${ProductionReference.findAllByIsActive(true)}" 66 name="productionReference.id" 67 value="${entryInstance.productionReference?.id}" 68 noSelection="['null':'--None--']"> 69 </g:select> 70 <g:helpBalloon code="entry.productionReference.fault" /> 71 </td> 72 </tr> 73 </g:if> 57 74 58 75 <tr class="prop"> -
trunk/grails-app/views/entryDetailed/show.gsp
r147 r431 49 49 50 50 </tr> 51 52 <g:if test="${entryInstance.productionReference}"> 53 <tr class="prop"> 54 <td valign="top" class="name">Production:</td> 55 56 <td valign="top" class="value"> 57 ${fieldValue(bean:entryInstance, field:'productionReference')} 58 </td> 59 60 </tr> 61 </g:if> 51 62 52 63 <tr class="prop"> -
trunk/grails-app/views/taskDetailed/createImmediateCallout.gsp
r418 r431 13 13 <div class="body"> 14 14 <g:render template="/shared/messages" /> 15 <g:hasErrors bean="${taskInstance}"> 16 <div class="errors"> 17 <g:renderErrors bean="${taskInstance}" as="list" /> 18 </div> 19 </g:hasErrors> 20 <g:hasErrors bean="${entryFaultInstance}"> 21 <div class="errors"> 22 <g:renderErrors bean="${entryFaultInstance}" as="list" /> 23 </div> 24 </g:hasErrors> 25 <g:hasErrors bean="${entryCauseInstance}"> 26 <div class="errors"> 27 <g:renderErrors bean="${entryCauseInstance}" as="list" /> 28 </div> 29 </g:hasErrors> 30 <g:hasErrors bean="${entryWorkDoneInstance}"> 31 <div class="errors"> 32 <g:renderErrors bean="${entryWorkDoneInstance}" as="list" /> 33 </div> 15 16 <g:hasErrors> 17 <div class="errors"> 18 <ul> 19 <g:eachError bean="${taskInstance}"> 20 <li><g:message error="${it}" /></li> 21 </g:eachError> 22 <g:eachError bean="${entryFaultInstance}"> 23 <li><g:message error="${it}" /></li> 24 </g:eachError> 25 <g:eachError bean="${entryCauseInstance}"> 26 <li><g:message error="${it}" /></li> 27 </g:eachError> 28 <g:eachError bean="${entryWorkDoneInstance}"> 29 <li><g:message error="${it}" /></li> 30 </g:eachError> 31 </ul> 32 </div> 34 33 </g:hasErrors> 35 34 … … 45 44 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'description','errors')}"> 46 45 <input type="text" class="description" maxlength="75" id="description" name="description" value="${fieldValue(bean:taskInstance,field:'description')}"/> 47 <g:helpBalloon class="helpballoon" code="task.description" /> 46 <g:helpBalloon class="helpballoon" code="task.description.immediateCallout" /> 47 </td> 48 </tr> 49 50 <tr class="prop"> 51 <td valign="top" class="name"> 52 <label for="targetStartDate">Date:</label> 53 </td> 54 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'targetStartDate','errors')}"> 55 <richui:dateChooser name="targetStartDate" format="dd-MM-yyyy" value="${taskInstance.targetStartDate}" /> 56 <g:helpBalloon class="helpballoon" code="task.targetStartDate.immediateCallout" /> 57 </td> 58 </tr> 59 60 <tr class="prop"> 61 <td valign="top" class="name"> 62 <label for="primaryAsset">Asset:</label> 63 </td> 64 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'primaryAsset','errors')}"> 65 <g:select optionKey="id" from="${Asset.list()}" name="primaryAsset.id" value="${taskInstance?.primaryAsset?.id}" noSelection="['null':'--None--']"></g:select> 66 <g:helpBalloon code="task.primaryAsset" /> 67 </td> 68 </tr> 69 70 <tr class="prop"> 71 <td valign="top" class="name"> 72 <label for="productionReference">Production:</label> 73 </td> 74 <td valign="top" class="value ${hasErrors(bean:entryFaultInstance,field:'productionReference','errors')}"> 75 <g:select optionKey="id" 76 from="${ProductionReference.findAllByIsActive(true)}" 77 name="entryFault.productionReference.id" 78 value="${entryFaultInstance?.productionReference?.id}" 79 noSelection="['null':'--None--']"> 80 </g:select> 81 <g:helpBalloon code="entry.productionReference.fault" /> 48 82 </td> 49 83 </tr> … … 62 96 type="text" id="entryFault.durationMinute" name="entryFault.durationMinute" 63 97 value="${fieldValue(bean:entryFaultInstance,field:'durationMinute')}" /> 64 <g:helpBalloon code="entry.duration " />98 <g:helpBalloon code="entry.duration.fault" /> 65 99 </td> 66 100 </tr> … … 113 147 </tr> 114 148 115 <tr class="prop">116 <td valign="top" class="name">117 <label for="primaryAsset">Primary Asset:</label>118 </td>119 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'primaryAsset','errors')}">120 <g:select optionKey="id" from="${Asset.list()}" name="primaryAsset.id" value="${taskInstance?.primaryAsset?.id}" noSelection="['null':'--None--']"></g:select>121 <g:helpBalloon code="task.primaryAsset" />122 </td>123 </tr>124 125 <tr class="prop">126 <td valign="top" class="name">127 <label for="associatedAssets">Associated Assets:</label>128 </td>129 <td valign="top" class="value ${hasErrors(bean:taskInstance,field:'associatedAssets','errors')}">130 <g:select id="associatedAssets" name="associatedAssets"131 from="${Asset.list()}"132 size="5" multiple="yes" optionKey="id"133 value="${taskInstance?.associatedAssets?.id}" noSelection="['':'--None--']"/>134 <g:helpBalloon code="task.associatedAssets" />135 </td>136 </tr>137 138 149 </tbody> 139 150 </table> -
trunk/grails-app/views/taskDetailed/show.gsp
r418 r431 62 62 <td valign="top" class="name">Parent Task:</td> 63 63 64 <td valign="top" class="value"><g:link controller="taskDetailed" action="show" id="${taskInstance.parentTask.id}">${taskInstance.parentTask.encodeAsHTML()}</g:link></td> 64 <td valign="top" class="value"> 65 <g:link controller="taskDetailed" action="show" id="${taskInstance.parentTask.id}"> 66 ${taskInstance.parentTask.encodeAsHTML()} 67 </g:link> 68 </td> 65 69 66 70 </tr> … … 77 81 <td valign="top" class="name">Target Start:</td> 78 82 79 <td valign="top" class="value"><g:formatDate date="${taskInstance.targetStartDate}" format="EEE, dd-MMM-yyyy"/></td> 83 <td valign="top" class="value"> 84 <g:formatDate date="${taskInstance.targetStartDate}" format="EEE, dd-MMM-yyyy"/> 85 </td> 80 86 81 87 </tr> … … 84 90 <td valign="top" class="name">Target Completion:</td> 85 91 86 <td valign="top" class="value"><g:formatDate date="${taskInstance.targetCompletionDate}" format="EEE, dd-MMM-yyyy"/></td> 92 <td valign="top" class="value"> 93 <g:formatDate date="${taskInstance.targetCompletionDate}" format="EEE, dd-MMM-yyyy"/> 94 </td> 87 95 88 96 </tr> … … 236 244 <g:else> 237 245 <span class="button"><g:actionSubmit class="flag" value="Unresolved" action="setAttentionFlag"/></span> 246 <g:helpBalloon class="helpballoon" code="task.status.unresolved" /> 238 247 </g:else> 239 248 240 249 <span class="button"><g:actionSubmit class="complete" value="Resolved" action="complete"/></span> 250 <g:helpBalloon class="helpballoon" code="task.status.resolved" /> 241 251 242 252 <g:if test="${taskInstance.approved}" > … … 272 282 <tr> 273 283 <th>Comment</th> 274 <th>Date Done</th> 284 <th>Date</th> 285 <th>Production</th> 275 286 <th>Down Time</th> 276 287 <th>Entered By</th> … … 282 293 <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'/> 283 294 284 <td style="width:65%">${entry.comment }</td>295 <td style="width:65%">${entry.comment.encodeAsHTML()}</td> 285 296 <td><g:formatDate date="${entry.dateDone}" format="EEE, dd-MMM-yyyy"/></td> 297 <td> 298 <g:if test="${entry.productionReference}"> 299 ${entry.productionReference.encodeAsHTML()} 300 </g:if> 301 <g:else> 302 <g:message code="default.none.text" /> 303 </g:else> 304 </td> 286 305 <td>${entry.durationHour}:${entry.durationMinute}</td> 287 <td>${entry.enteredBy }</td>306 <td>${entry.enteredBy.encodeAsHTML()}</td> 288 307 289 308 <td> … … 332 351 <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'/> 333 352 334 <td style="width:65%">${entry.comment }</td>353 <td style="width:65%">${entry.comment.encodeAsHTML()}</td> 335 354 <td><g:formatDate date="${entry.dateDone}" format="EEE, dd-MMM-yyyy"/></td> 336 <td>${entry.enteredBy }</td>355 <td>${entry.enteredBy.encodeAsHTML()}</td> 337 356 338 357 <td> … … 382 401 <tr class="${(i % 2) == 0 ? 'clickableOdd' : 'clickableEven'}" onclick='window.location = "${request.getContextPath()}/entryDetailed/edit/${entry.id}"'/> 383 402 384 <td width="65%">${entry.comment }</td>403 <td width="65%">${entry.comment.encodeAsHTML()}</td> 385 404 <td><g:formatDate date="${entry.dateDone}" format="EEE, dd-MMM-yyyy"/></td> 386 405 <td>${entry.durationHour}:${entry.durationMinute}</td> 387 <td>${entry.enteredBy }</td>406 <td>${entry.enteredBy.encodeAsHTML()}</td> 388 407 389 408 <td>
Note: See TracChangeset
for help on using the changeset viewer.