<commit_before>RailsAdmin.config do |config|
  config.main_app_name = ['Small Jobs', 'Adminstration']

  config.authorize_with do
    redirect_to main_app.root_path unless current_admin != nil
  end

  config.model DefaultTemplate do
    list do
      field :template_name
    end

    edit do
      field :template_name
      field :template
    end
  end

  config.model Todo do
    list do
      field :record_id
      field :record_type
    end

    edit do
      field :record_id do
        read_only true
      end
      field :record_type do
        read_only true
      end
      field :created_at do
        read_only true
      end
      field :todotype do
        read_only true
      end
    end
  end

  config.model Todotype do
    list do
      field :title
      field :table
    end

    edit do
      field :title
      field :description, :rich_editor do
        config(insert_many: true)
      end
      field :table
      field :where, :text
    end
  end

  config.model Help do
    list do
      field :title
      field :url
    end

    edit do
      field :title
      field :description, :rich_editor do
        config({
                   :insert_many => true
               })
      end
      field :url
    end
  end

  config.model AccessToken do
    list do
      field :access_token
      # field :seeker
      field :userable
      field :expire_at
    end

    edit do
      field :access_token
      # field :seeker
      field :userable
      field :expire_at
    end
  end

  config.model Place do
    navigation_label I18n.t('admin.menu.geo')

    list do
      field :zip
      field :name
      field :province
      field :state
    end

    edit do
      group :place do
        label I18n.t('admin.groups.place')

        field :zip
        field :name
      end

      group :political do
        label I18n.t('admin.groups.political')

        field :province
        field :state
      end

      group :position do
        label I18n.t('admin.groups.position')

        field :longitude
        field :latitude
      end
    end
  end

  config.model Organization do
    navigation_label I18n.t('admin.menu.org')
    weight 0

    list do
      field :name
      field :website
      field :email
      field :phone
    end

    edit do
      group :organization do
        label I18n.t('admin.groups.organization')

        field :name
        field :description
        field :opening_hours
        field :website
        field :signature_on_contract
        field :wage_factor do
          help I18n.t('admin.groups.wage_factor')
        end
        field :salary_deduction
        field :hide_deduction

        label I18n.t('admin.groups.vacation')
        field :start_vacation_date
        field :end_vacation_date
        field :vacation_active
        field :vacation_title
        field :vacation_text
      end

      group :address do
        label I18n.t('admin.groups.address')

        field :street
        field :place
      end

      group :contact do
        label I18n.t('admin.groups.contact')

        field :phone
        field :email
      end

      group :messages do
        label I18n.t('admin.groups.messages')

        field :welcome_letter_employers_msg
        field :welcome_app_register_msg
        field :welcome_chat_register_msg
        field :not_receive_job_msg
        field :get_job_msg
        field :activation_msg
        field :welcome_email_for_parents_msg

      end

      group :brokers do
        label I18n.t('admin.groups.brokers')

        field :employments
      end

      group :design do
        label I18n.t('admin.groups.design')

        field :logo do
          help I18n.t('admin.format.logo')
        end

        field :background do
          help I18n.t('admin.format.background')
        end
      end

      group :administration do
        label I18n.t('admin.groups.administration')

        field :active
      end
    end
  end

  config.model Region do
    navigation_label I18n.t('admin.menu.org')
    weight 5

    list do
      field :name
      field :subdomain
      field :places
    end

    edit do
      field :name
      field :subdomain
      field :places
      field :content
      field :contact_content

      group :design do
        label I18n.t('admin.groups.design')

        field :logo do
          help I18n.t('admin.format.logo')
        end
        field :header_image do
          help I18n.t('admin.format.header_image')
        end
      end
    end
  end

  config.model Employment do
    navigation_label I18n.t('admin.menu.org')
    weight 10

    list do
      field :organization
      field :broker
      field :region
    end
  end

  config.model Admin do
    navigation_label I18n.t('admin.menu.user')
    weight 0

    list do
      field :email
      field :sign_in_count
    end

    edit do
      group :authenticatable do
        label I18n.t('admin.groups.authenticatable')

        field :email
        field :password
      end
    end
  end

  config.model Broker do
    navigation_label I18n.t('admin.menu.user')
    weight 5

    list do
      field :firstname
      field :lastname
      field :phone
      field :email
      field :active
      field :confirmed
    end

    edit do
      group :authenticatable do
        label I18n.t('admin.groups.authenticatable')

        field :email
        field :password
        field :password_confirmation
      end

      group :contact do
        label I18n.t('admin.groups.contact')<commit_msg>Added rc_username and rc_id to Admin Broker<commit_after>RailsAdmin.config do |config|
  config.main_app_name = ['Small Jobs', 'Adminstration']

  config.authorize_with do
    redirect_to main_app.root_path unless current_admin != nil
  end

  config.model DefaultTemplate do
    list do
      field :template_name
    end

    edit do
      field :template_name
      field :template
    end
  end

  config.model Todo do
    list do
      field :record_id
      field :record_type
    end

    edit do
      field :record_id do
        read_only true
      end
      field :record_type do
        read_only true
      end
      field :created_at do
        read_only true
      end
      field :todotype do
        read_only true
      end
    end
  end

  config.model Todotype do
    list do
      field :title
      field :table
    end

    edit do
      field :title
      field :description, :rich_editor do
        config(insert_many: true)
      end
      field :table
      field :where, :text
    end
  end

  config.model Help do
    list do
      field :title
      field :url
    end

    edit do
      field :title
      field :description, :rich_editor do
        config({
                   :insert_many => true
               })
      end
      field :url
    end
  end

  config.model AccessToken do
    list do
      field :access_token
      # field :seeker
      field :userable
      field :expire_at
    end

    edit do
      field :access_token
      # field :seeker
      field :userable
      field :expire_at
    end
  end

  config.model Place do
    navigation_label I18n.t('admin.menu.geo')

    list do
      field :zip
      field :name
      field :province
      field :state
    end

    edit do
      group :place do
        label I18n.t('admin.groups.place')

        field :zip
        field :name
      end

      group :political do
        label I18n.t('admin.groups.political')

        field :province
        field :state
      end

      group :position do
        label I18n.t('admin.groups.position')

        field :longitude
        field :latitude
      end
    end
  end

  config.model Organization do
    navigation_label I18n.t('admin.menu.org')
    weight 0

    list do
      field :name
      field :website
      field :email
      field :phone
    end

    edit do
      group :organization do
        label I18n.t('admin.groups.organization')

        field :name
        field :description
        field :opening_hours
        field :website
        field :signature_on_contract
        field :wage_factor do
          help I18n.t('admin.groups.wage_factor')
        end
        field :salary_deduction
        field :hide_deduction

        label I18n.t('admin.groups.vacation')
        field :start_vacation_date
        field :end_vacation_date
        field :vacation_active
        field :vacation_title
        field :vacation_text
      end

      group :address do
        label I18n.t('admin.groups.address')

        field :street
        field :place
      end

      group :contact do
        label I18n.t('admin.groups.contact')

        field :phone
        field :email
      end

      group :messages do
        label I18n.t('admin.groups.messages')

        field :welcome_letter_employers_msg
        field :welcome_app_register_msg
        field :welcome_chat_register_msg
        field :not_receive_job_msg
        field :get_job_msg
        field :activation_msg
        field :welcome_email_for_parents_msg

      end

      group :brokers do
        label I18n.t('admin.groups.brokers')

        field :employments
      end

      group :design do
        label I18n.t('admin.groups.design')

        field :logo do
          help I18n.t('admin.format.logo')
        end

        field :background do
          help I18n.t('admin.format.background')
        end
      end

      group :administration do
        label I18n.t('admin.groups.administration')

        field :active
      end
    end
  end

  config.model Region do
    navigation_label I18n.t('admin.menu.org')
    weight 5

    list do
      field :name
      field :subdomain
      field :places
    end

    edit do
      field :name
      field :subdomain
      field :places
      field :content
      field :contact_content

      group :design do
        label I18n.t('admin.groups.design')

        field :logo do
          help I18n.t('admin.format.logo')
        end
        field :header_image do
          help I18n.t('admin.format.header_image')
        end
      end
    end
  end

  config.model Employment do
    navigation_label I18n.t('admin.menu.org')
    weight 10

    list do
      field :organization
      field :broker
      field :region
    end
  end

  config.model Admin do
    navigation_label I18n.t('admin.menu.user')
    weight 0

    list do
      field :email
      field :sign_in_count
    end

    edit do
      group :authenticatable do
        label I18n.t('admin.groups.authenticatable')

        field :email
        field :password
      end
    end
  end

  config.model Broker do
    navigation_label I18n.t('admin.menu.user')
    weight 5

    list do
      field :firstname
      field :lastname
      field :phone
      field :email
      field :active
      field :confirmed
      field :rc_id
      field :rc_username
    end

    edit do
      group :authenticatable do
        label I18n.t('admin.groups.authenticatable')

        field :email
        field :password
        field :password_confirmation
      end

      group :contact do
        label I18n.t('admin.groups.contact')
{'fraction_non_alphanumeric': 0.061430372905782744, 'fraction_numerical': 0.010448567825617006, 'mean_word_length': 1.7233259749816041, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '953544', 'n_tokens_mistral': 3454, 'n_tokens_neox': 3217, 'n_words': 943}