Sha256: fb0224375c8bc7400b62888b7548203347f7e78935e77f3bb1d8a9c1963e7764

Contents?: true

Size: 1.03 KB

Versions: 2

Compression:

Stored size: 1.03 KB

Contents

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

    syncOptions:
        include: [ 'address' ]

    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
                    commands={@state.commands} model={@location} name="code" />
                <LC.Input sm=6 name='name' model={@location} />
            </BS.Row>
            <BS.Row>
                <LC.ImageSaver label='Logo' sm=3 model={@location} name='logo' />
            </BS.Row>
            <BS.Row>
                <SC.Address lg=6 model={@location.address}  />
            </BS.Row>

        </LC.ScreenWrapper>

Version data entries

2 entries across 2 versions & 1 rubygems

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