Sha256: 9e065572be9959af5ec3db031fcbcd4992d85d7e2e37db6a0cc61d5648bbd495

Contents?: true

Size: 846 Bytes

Versions: 1

Compression:

Stored size: 846 Bytes

Contents

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

    dataObjects:
        banks: ->
            Skr.Models.BankAccount.Collection.fetch()

    setBankAccount: (value) ->
        Lanes.config.system_settings
            .setValueForExtension('skr', 'bank_account_id', value.id)
        @forceUpdate()

    getBankAccount: ->
        id = Lanes.config.system_settings.forExtension('skr').bank_account_id
        if id then {id} else undefined

    render: ->
        <BS.Row className="skr-system-settings">

            <SC.BankAccountFinder selectField
                sm=3 label="Default Bank Account"
                model={Lanes.config.system_settings}
                choices={this.banks.models}
                setSelection={@setBankAccount}
                getSelection={@getBankAccount}
            />

        </BS.Row>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stockor-0.3.0 client/skr/components/SystemSettings.cjsx