Ignore:
Timestamp:
May 4, 2009, 1:59:11 PM (16 years ago)
Author:
gav
Message:

Detail controller and views for Asset, AssetExtendedAttribute?, PlannedMaintenance?, MaintenanceAction?, RecurringSchedule?, SystemSection?.
Some minor work on Task controller and views.
Change PlannedMaintenance? relationship, adjust ERD, Bootstrap and Domain classes to suite.

Location:
trunk/grails-app/domain
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/grails-app/domain/Asset.groovy

    r122 r124  
    88    boolean isActive = true
    99
    10     static hasMany = [maintenanceActions: MaintenanceAction]
     10    static hasMany = [maintenanceActions: MaintenanceAction, assetExtendedAttributes: AssetExtendedAttribute]
    1111
    1212    static belongsTo = [SystemSection, AssetType]
    1313
    14 //     static constraints = {
    15 //     }
     14    static constraints = {
     15        name(unique:true)
     16    }
    1617
    1718    String toString() {
  • trunk/grails-app/domain/AssetExtendedAttribute.groovy

    r122 r124  
    11class AssetExtendedAttribute {
    22
    3     AssetType assetType
     3    Asset asset
    44    AssetExtendedAttributeType assetExtendedAttributeType
    55
     
    99//     static hasMany = []
    1010
    11     static belongsTo = [AssetType]
     11    static belongsTo = [Asset]
    1212
    1313//     static constraints = {
     
    1616
    1717    String toString() {
    18         "${this.value}"
     18        "${assetExtendedAttributeType.name}: ${this.value}"
    1919    }
    2020}
  • trunk/grails-app/domain/AssetType.groovy

    r122 r124  
    66
    77    static hasMany = [assets: Asset,
    8                                     assemblies: Assembly,
    9                                     assetExtendedAttributes: AssetExtendedAttribute,
     8                                    assemblies: Assembly,
    109                                    maintenanceActions: MaintenanceAction]
    1110
  • trunk/grails-app/domain/MaintenanceAction.groovy

    r122 r124  
    88    SubAssembly subAssembly
    99    ComponentItem componentItem
    10     String description
     10    String maintenanceAction
    1111    String reasoning = ""
     12    Integer pmStepNumber
    1213    boolean isActive = true
    1314
     
    2324        subAssembly(blank:true, nullable:true)
    2425        componentItem(blank:true, nullable:true)
     26        pmStepNumber(blank:true, nullable:true)
    2527    }
    2628
    2729    String toString() {
    28         "${this.description}"
     30        "${this.action}"
    2931    }
    3032}
  • trunk/grails-app/domain/RecurringSchedule.groovy

    r123 r124  
    2121    }
    2222
    23 //     String toString() {
    24 //         "${this.name}"
    25 //     }
     23    String toString() {
     24        "Recur every ${recurEvery} ${period}"
     25    }
    2626}
    2727
Note: See TracChangeset for help on using the changeset viewer.