Dual listbox 데이터 변경 화면 예제

두개 타입의 데이터를 변경하면서 확인할 수 있는 화면 예제입니다.

menus:
- path: pages/251-V2
  name: dual listbox
pages:
- path: pages/251-V2
  blocks:
    - type: left
      title: 호텔 리스트
      style:
        padding: 20px
      blocks:
        - type: query          
          resource: mysql.qa
          sqlType: select
          sql: >
            SELECT id, type
            FROM properties
            WHERE id between 1 and 10
            AND type = 'HOTEL'
          showDownload: false
          selectOptions: 
            enabled: true
          tableOptions:
            sortable: false
            bordered: false
            striped: false
            small: true
          actions:
            - label: '>'
              placement: bottom right
              button:
                type: primary
              type: query
              resource: mysql.qa
              sql: >
                UPDATE properties
                SET type = 'RESORT'
                WHERE id = :id
              params:
                - key: id
                  valueFromSelectedRows: id
              forEach: true
              reloadAfterSubmit: true
    - type: right
      title: 리조트 리스트
      style:
        padding: 20px
      blocks:
        - type: query
          resource: mysql.qa
          sqlType: select
          sql: >
            SELECT id, type
            FROM properties
            WHERE id between 1 and 10
            AND type = 'RESORT'
          showDownload: false
          selectOptions: 
            enabled: true
          tableOptions:
            sortable: false
            bordered: false
            striped: false
            small: true
          actions:
            - label: '<'              
              button:
                type: danger
              placement: bottom left
              type: query
              resource: mysql.qa
              sql: >
                UPDATE properties
                SET type = 'HOTEL'
                WHERE id = :id
              params:
                - key: id
                  valueFromSelectedRows: id
              forEach: true
              reloadAfterSubmit: true