Sha256: 6da391dc9f44e4f267d30c5882a7a48d4b91b0820ad4405a50c130fc5d906fad

Contents?: true

Size: 1.22 KB

Versions: 3

Compression:

Stored size: 1.22 KB

Contents

class Skr.Components.VendorFinder extends Lanes.React.Component

    propTypes:
        model:      Lanes.PropTypes.Model.isRequired
        commands:   React.PropTypes.object
        autoFocus:  React.PropTypes.bool
        name:       React.PropTypes.string
        selectField:   React.PropTypes.bool

    getDefaultProps: ->
        autoFocus: false, name: 'vendor', label: 'Vendor Code'

    dataObjects:
        query: ->
            new Lanes.Models.Query({
                title: 'Vendors'
                syncOptions: @props.syncOptions, autoRetrieve: true
                src: Skr.Models.Vendor, fields: [
                    {id:'id', visible: false}
                    'code', 'name',
                    { id: 'notes', flex: 2}

                ]
            })

    render: ->
        if @props.selectField
            <LC.SelectField sm=2
                label="Vendor"
                name="vendor"
                labelField="code"
                model={@props.model}
                {...@props} />
        else
            <LC.RecordFinder sm=3 autoFocus
                model={@props.model}
                name='vendor'
                commands={@state.commands}
                query={@query}
                {...@props} />

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
stockor-0.4.0 client/skr/components/VendorFinder.cjsx
stockor-0.3.0 client/skr/components/VendorFinder.cjsx
stockor-0.2 client/skr/components/VendorFinder.cjsx