Ignore:
Timestamp:
Dec 8, 2009, 4:03:29 AM (14 years ago)
Author:
gav
Message:

Complete inventory movement implementation as per ticket #24.
Refactor showTab function in both Task and Inventory (which now has tabs).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/controllers/TaskDetailedController.groovy

    r216 r225  
    154154        { params.action='show' }
    155155
     156        def showTab = [:]
     157        switch (params.showTab) {
     158            case "showProcedureTab":
     159                showTab.procedure =  new String("true")
     160                break
     161            case "showRecurrenceTab":
     162                showTab.recurrence =  new String("true")
     163                break
     164            case "showInventoryTab":
     165                showTab.inventory = new String("true")
     166                break
     167            case "showSubTasksTab":
     168                showTab.subTasks = new String("true")
     169                break
     170            default:
     171                showTab.task = new String("true")
     172        }
     173
    156174        def taskInstance = Task.get( params.id )
    157175
     
    177195            def subTaskInstanceList = Task.findAllByParentTaskAndTrash(taskInstance, false, params)
    178196            def subTaskInstanceTotal = Task.countByParentTaskAndTrash(taskInstance, false)
    179             def showTaskTab = new String("true")
    180197
    181198            def inventoryMovementList = InventoryMovement.findAllByTask(taskInstance, [max:100, sort:"id", order:"desc", offset:0])
     
    204221                            taskProcedureInstance: taskProcedureInstance,
    205222                            taskProcedureExits: taskProcedureExits,
    206                             showTaskTab: showTaskTab,
     223                            showTab: showTab,
    207224                            subTaskInstanceList: subTaskInstanceList,
    208225                            subTaskInstanceTotal: subTaskInstanceTotal,
Note: See TracChangeset for help on using the changeset viewer.