Sha256: 914dfa28bc44a89dc456d0dbe5118b1ded7a3ef89d9f198588cafd4daf03c0fc

Contents?: true

Size: 1.1 KB

Versions: 1

Compression:

Stored size: 1.1 KB

Contents

class Skr.Screens.Locations extends Skr.Screens.Base

    syncOptions:
        include: [ 'address', 'logo' ]

    dataObjects:
        location: ->
            @loadOrCreateModel({
                syncOptions: @syncOptions, klass: Skr.Models.Location
                prop: 'location', attribute: 'code'
            })

    getInitialState: ->
        commands: new Skr.Screens.Commands(this, modelName: 'location')

    render: ->
        <LC.ScreenWrapper identifier="locations">
            <SC.ScreenControls commands={@state.commands} />
            <BS.Row>
                <SC.LocationChooser label='Code' editOnly displayFinder
                    syncOptions={@syncOptions}
                    commands={@state.commands} model={@location} name="code" />
                <LC.Input sm=6 name='name' model={@location} />
            </BS.Row>
            <BS.Row>
                <LC.ImageAsset sm=3 model={@location} name='logo' label='Logo' size='thumb' />
            </BS.Row>
            <BS.Row>
                <SC.Address lg=6 model={@location.address}  />
            </BS.Row>

        </LC.ScreenWrapper>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
stockor-0.4.0 client/skr/screens/locations/Locations.cjsx