view: orch_app_ar_orchadmin_users {
  sql_table_name: orchard_app_reporting_v2.art_relations_prod_art_relations.orchadmin_users ;;

  dimension: id {
    type: number
    sql: ${TABLE}.id ;;
    primary_key: yes
    hidden: yes
  }

  dimension: orchadmin_user {
    label: "
    {% if _view._name == 'label_manager' %} Label Manager
    {% elsif _view._name == 'closer' %} Closer
    {% elsif _view._name == 'quarterback_label_manager' %} Quarterback Label Manager
    {% elsif _view._name == 'oa_user_registry' %} OA User who locked track
    {% else %} OA User {% endif %}"
    type: string
    bypass_suggest_restrictions: yes
    sql: ${TABLE}.f_name||' '||${TABLE}.l_name ;;
  }

  dimension: email {
    label:"Manager Email"
    type: string
    sql: label_manager.email ;;
    view_label: "Label"
  }

#   dimension: active {
#     type: string
#     sql: ${TABLE}.active ;;
#   }
#
#   dimension: alt_phone {
#     type: string
#     sql: ${TABLE}.alt_phone ;;
#   }
#
#   dimension: closer {
#     type: string
#     sql: ${TABLE}.closer ;;
#   }
#
#   dimension: department {
#     type: string
#     sql: ${TABLE}.department ;;
#   }
#
#   dimension: display {
#     type: string
#     sql: ${TABLE}.display ;;
#   }
#
#
#   dimension: extension {
#     type: number
#     sql: ${TABLE}.extension ;;
#   }
#
#   dimension: f_name {
#     type: string
#     sql: ${TABLE}.f_name ;;
#   }
#
#   dimension: last_search {
#     type: string
#     sql: ${TABLE}.last_search ;;
#   }
#
#   dimension: login {
#     type: string
#     sql: ${TABLE}.login ;;
#   }
#
#   dimension: l_name {
#     type: string
#     sql: ${TABLE}.l_name ;;
#   }
#
#   dimension: office_location {
#     type: string
#     sql: ${TABLE}.office_location ;;
#   }
#
#   dimension: office_phone {
#     type: string
#     sql: ${TABLE}.office_phone ;;
#   }
#
#   dimension: old_password {
#     type: string
#     sql: ${TABLE}.old_password ;;
#   }
#
#   dimension: owner {
#     type: string
#     sql: ${TABLE}.owner ;;
#   }
#
#   dimension: pass {
#     type: string
#     sql: ${TABLE}.pass ;;
#   }
#
#   dimension: password {
#     type: string
#     sql: ${TABLE}.password ;;
#   }
#
#   dimension: password_date_changed {
#     type: date_time
#     sql: ${TABLE}.password_date_changed ;;
#   }
#
#   dimension: password_request_key {
#     type: string
#     sql: ${TABLE}.password_request_key ;;
#   }
#
#   dimension: password_reset_datetime {
#     type: date_time
#     sql: ${TABLE}.password_reset_datetime ;;
#   }
#
#   dimension: role {
#     type: number
#     sql: ${TABLE}.role ;;
#   }
#
#   dimension: title {
#     type: string
#     sql: ${TABLE}.title ;;
#   }
}
