[쇼룸] 디바이스 규제 yaml

셀렉트 쇼룸의 디바이스 규제 페이지의 YAML 코드입니다.

궁금한 점은 댓글이나 이메일, 서비스 내 채팅, 슬랙 등으로 편하게 문의주세요.

menus:
  - path: device-regulation
    name: 📱     디바이스 규제
  - path: device-regulation/{{id}}
    placement: page-only

pages:
  - path: device-regulation
    blocks:
    - type: query
      resource: mysql.qa
      sqlType: select
      showDownload: csv
      tableOptions:
        sortable: false
      sql: >
        SELECT * FROM AppUser
      columns:
        id:          
          label: ID
        created_at:
          label: 생성일
        updated_at:
          hidden: true
        deleted_at:
          hidden: true
        uid:
          label: UID
          openPage: device-regulation/{{id}}
        nick_name:
          label: 닉네임
        login_type:
          label: 로그인타입
        device_os:
          label: 디바이스OS
        device_model:
          label: 디바이스모델
        device_name:
          label: 디바이스명 
        regulation_reason:
          hidden: true
        regulation_status:
          hidden: true
  
  - path: device-regulation/{{id}}
    class: container
    blocks:
      - type: header 
        items:
          - label: 디바이스
            path: device-regulation
            icon: home
          - label: 상세 프로필

      - type: left
        style:
          width: calc(60% - 1rem)
        blocks:
          - type: query
            title: 프로필 조회
            resource: mysql.qa
            sqlType: select
            showDownload: false
            sql: >
              SELECT *
              FROM AppUser
              WHERE id = :id
            display: card
            columns:
              id:
                label: ID
              created_at:
                label: 생성일
              updated_at:
                hidden: true
              deleted_at:
                hidden: true
              uid:
                label: UID
              nick_name:
                label: 닉네임
              login_type:
                label: 로그인타입
              device_os:
                label: 디바이스OS
              device_model:
                label: 디바이스모델
              device_name:
                label: 디바이스명
              regulation_reason:
                label: 규제 사유
              regulation_status:
                label: 규제 상태

      - type: right
        style:
          width: calc(30% - 1rem)
        blocks:
          - type: query
            subtitle: 디바이스 규제
            name: 1 
            resource: mysql.qa
            sqlType: select
            sql: >
              SELECT uid FROM AppUser WHERE id = :id
            columns:
              uid:
                label: 디바이스UID
            display: form

          - type: query     
            resource: mysql.qa
            sqlType: update
            sql: >
              UPDATE AppUser
              SET updated_at = NOW()
                , regulation_status = 'regulated'
                , regulation_reason = :regulation_reason
              WHERE id = :id
            params:
              - key: regulation_reason
                label: 규제 사유 입력
                placeholder: 누가 어떤 사유로 규제하는지 작성해주세요.
                format: textarea
                required: true
            submitButton:
              label: 디바이스 규제하기
              type: danger
1개의 좋아요