<commit_before><div class="row">
  <div class="col">
    <nav aria-label="breadcrumb">
      <ol class="breadcrumb">
        <li class="breadcrumb-item"><%= link_to("Home", root_path) %></li>
        <li class="breadcrumb-item"><%= link_to("My characters", characters_path) %></li>
        <li class="breadcrumb-item"><%= link_to(@character.name, character_path(@character.character_id)) %></li>
        <li class="breadcrumb-item active" aria-current="page">Manufacturing Jobs</li>
      </ol>
    </nav>
  </div>
</div>

<ul class="nav nav-pills">
  <li class="nav-item">
    <%= link_to("Sheet", character_path(@character.character_id), class: "nav-link") %>
  </li>
  <li class="nav-item">
    <%= link_to("Employment History", character_employment_histories_path(@character.character_id), class: "nav-link") %>
  </li>
  <li class="nav-item">
    <%= link_to("Agents", character_agents_path(@character.character_id), class: "nav-link") %>
  </li>
  <% if Setting.enabled_assets %>
    <li class="nav-item">
      <%= link_to("Assets", character_assets_path(@character.character_id), class: "nav-link") %>
    </li>
  <% end %>
  <li class="nav-item">
    <%= link_to("Loyalty points", character_loyalty_points_path(@character.character_id), class: "nav-link") %>
  </li>
  <% if Setting.enabled_skillqueue %>
    <li class="nav-item">
      <%= link_to("Skill queue", character_skillqueues_path(@character.character_id), class: "nav-link") %>
    </li>
  <% end %>
  <% if Setting.enabled_skills %>
    <li class="nav-item">
      <%= link_to("Skills", character_skills_path(@character.character_id), class: "nav-link") %>
    </li>
  <% end %>
  <% if Setting.enabled_mails %>
    <li class="nav-item">
      <%= link_to("Mail", character_mails_path(@character.character_id), class: "nav-link") %>
    </li>
  <% end %>
  <% if Setting.enabled_standings %>
    <li class="nav-item">
      <%= link_to("Standings", character_standings_path(@character.character_id), class: "nav-link") %>
    </li>
  <% end %>
  <% if Setting.enabled_wallet_journal %>
    <li class="nav-item">
      <%= link_to("Wallet journal", character_wallet_journals_path(@character.character_id), class: "nav-link") %>
    </li>
  <% end %>
  <% if Setting.enabled_wallet_transactions %>
    <li class="nav-item">
      <%= link_to("Wallet transactions", nil, class: "nav-link") %>
    </li>
  <% end %>
  <% if Setting.enabled_industry_jobs %>
    <li class="nav-item">
      <%= link_to("Industry Jobs", character_industry_jobs_path(@character.character_id), class: "nav-link") %>
    </li>
  <% end %>
  <li class="nav-item">
    <%= link_to("Blueprints", character_blueprints_path(@character.character_id), class: "nav-link") %>
  </li>
  <% if Setting.manufacturing_jobs %>
    <li class="nav-item">
      <%= link_to("Manufacturing Jobs", character_manufacturing_jobs_path(@character.character_id), class: "nav-link active") %>
    </li>
  <% end %>
</ul>

<hr>

<div class="row">
  <div class="col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4">
    <div class="clearfix">
      <h4 class="float-left"><%= @character.name %></h4>
      <%= form_with(url: character_path(@character.character_id), method: :patch, class: "float-right") do %>
        <%= button_tag("Refresh", class: "btn btn-primary mb-2") do %>
          <%= image_tag("bootstrap-icons/icons/arrow-repeat.svg") %>
        <% end %>
      <% end %>
    </div>

    <div class="card">
      <ul class="list-group list-group-flush">
        <li class="list-group-item text-center">
          <%= image_tag(@character.icon_medium,
                        alt: @character.name,
                        class: "rounded border",
                        size: "130x130",
                        loading: "lazy") %>
        </li>
        <% if @character.corporation %>
          <li class="list-group-item text-break">
            Corporation: <%= link_to(@character.corporation.name,
                                     universe_corporation_path(@character.corporation.corporation_id)) %>
          </li>
        <% end %>
        <% if @character.alliance %>
          <li class="list-group-item text-break">
            Alliance: <%= link_to(@character.alliance.name,
                                  universe_alliance_path(@character.alliance.alliance_id)) %>
          </li>
        <% end %>
        <li class="list-group-item text-break">
          Total SP: <%= @character.full_sp_formatted %>
        </li>
        <% if @character.unallocated_sp && @character.unallocated_sp > 0 %>
          <li class="list-group-item text-break">
            Unallocated SP: <%= @character.unallocated_sp_formatted %>
          </li>
        <% end %>
        <li class="list-group-item text-break">
          Security status: <%= @character.security_status %>
        </li>
        <li class="list-group-item text-break">
          Wallet: <%= @character.wallet_formatted %> ISK
        </li>
      </ul>
      <p class="card-text text-center">
        <small class="text-muted">
          Last updated <span class="timeago" datetime="<%= @character.updated_at.iso8601 %>"></span>
        </small>
      </p>
    </div>
  </div>

  <div class="col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4">
    <h4 class="text-center text-break">Manufacturing Jobs</h4>

    <%= link_to("Create new job",
                new_character_manufacturing_job_path(@character.character_id),
                class: "btn btn-primary btn-block") %>
  </div>

  <div class="col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4" id="new_manufacturing_job">
    <h4 class="text-center text-break">New Job</h4>

    <form>
      <div class="form-group">
        <label for="name">Name</label>
        <input type="text" class="form-control" id="name">
      </div>

    </form>
    {{ message }}
  </div>
</div>

<script type="text/javascript">
  var app = new Vue({
    el: '#new_manufacturing_job',
    data: {
      message: 'Hello Vue!',
      eve_types: <%= raw @eve_types.map { |type| {id: type.type_id, name: type.name_en} }.to_json %>,
      character: {
        blueprints: <%= raw @blueprints.map { |b| {name: b.name_en} }.to_json %>
      }
    }
  });
</script>
<commit_msg>Update view<commit_after><div class="row">
  <div class="col">
    <nav aria-label="breadcrumb">
      <ol class="breadcrumb">
        <li class="breadcrumb-item"><%= link_to("Home", root_path) %></li>
        <li class="breadcrumb-item"><%= link_to("My characters", characters_path) %></li>
        <li class="breadcrumb-item"><%= link_to(@character.name, character_path(@character.character_id)) %></li>
        <li class="breadcrumb-item active" aria-current="page">Manufacturing Jobs</li>
      </ol>
    </nav>
  </div>
</div>

<ul class="nav nav-pills">
  <li class="nav-item">
    <%= link_to("Sheet", character_path(@character.character_id), class: "nav-link") %>
  </li>
  <li class="nav-item">
    <%= link_to("Employment History", character_employment_histories_path(@character.character_id), class: "nav-link") %>
  </li>
  <li class="nav-item">
    <%= link_to("Agents", character_agents_path(@character.character_id), class: "nav-link") %>
  </li>
  <% if Setting.enabled_assets %>
    <li class="nav-item">
      <%= link_to("Assets", character_assets_path(@character.character_id), class: "nav-link") %>
    </li>
  <% end %>
  <li class="nav-item">
    <%= link_to("Loyalty points", character_loyalty_points_path(@character.character_id), class: "nav-link") %>
  </li>
  <% if Setting.enabled_skillqueue %>
    <li class="nav-item">
      <%= link_to("Skill queue", character_skillqueues_path(@character.character_id), class: "nav-link") %>
    </li>
  <% end %>
  <% if Setting.enabled_skills %>
    <li class="nav-item">
      <%= link_to("Skills", character_skills_path(@character.character_id), class: "nav-link") %>
    </li>
  <% end %>
  <% if Setting.enabled_mails %>
    <li class="nav-item">
      <%= link_to("Mail", character_mails_path(@character.character_id), class: "nav-link") %>
    </li>
  <% end %>
  <% if Setting.enabled_standings %>
    <li class="nav-item">
      <%= link_to("Standings", character_standings_path(@character.character_id), class: "nav-link") %>
    </li>
  <% end %>
  <% if Setting.enabled_wallet_journal %>
    <li class="nav-item">
      <%= link_to("Wallet journal", character_wallet_journals_path(@character.character_id), class: "nav-link") %>
    </li>
  <% end %>
  <% if Setting.enabled_wallet_transactions %>
    <li class="nav-item">
      <%= link_to("Wallet transactions", nil, class: "nav-link") %>
    </li>
  <% end %>
  <% if Setting.enabled_industry_jobs %>
    <li class="nav-item">
      <%= link_to("Industry Jobs", character_industry_jobs_path(@character.character_id), class: "nav-link") %>
    </li>
  <% end %>
  <li class="nav-item">
    <%= link_to("Blueprints", character_blueprints_path(@character.character_id), class: "nav-link") %>
  </li>
  <% if Setting.manufacturing_jobs %>
    <li class="nav-item">
      <%= link_to("Manufacturing Jobs", character_manufacturing_jobs_path(@character.character_id), class: "nav-link active") %>
    </li>
  <% end %>
</ul>

<hr>

<div class="row">
  <div class="col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4">
    <div class="clearfix">
      <h4 class="float-left"><%= @character.name %></h4>
      <%= form_with(url: character_path(@character.character_id), method: :patch, class: "float-right") do %>
        <%= button_tag("Refresh", class: "btn btn-primary mb-2") do %>
          <%= image_tag("bootstrap-icons/icons/arrow-repeat.svg") %>
        <% end %>
      <% end %>
    </div>

    <div class="card">
      <ul class="list-group list-group-flush">
        <li class="list-group-item text-center">
          <%= image_tag(@character.icon_medium,
                        alt: @character.name,
                        class: "rounded border",
                        size: "130x130",
                        loading: "lazy") %>
        </li>
        <% if @character.corporation %>
          <li class="list-group-item text-break">
            Corporation: <%= link_to(@character.corporation.name,
                                     universe_corporation_path(@character.corporation.corporation_id)) %>
          </li>
        <% end %>
        <% if @character.alliance %>
          <li class="list-group-item text-break">
            Alliance: <%= link_to(@character.alliance.name,
                                  universe_alliance_path(@character.alliance.alliance_id)) %>
          </li>
        <% end %>
        <li class="list-group-item text-break">
          Total SP: <%= @character.full_sp_formatted %>
        </li>
        <% if @character.unallocated_sp && @character.unallocated_sp > 0 %>
          <li class="list-group-item text-break">
            Unallocated SP: <%= @character.unallocated_sp_formatted %>
          </li>
        <% end %>
        <li class="list-group-item text-break">
          Security status: <%= @character.security_status %>
        </li>
        <li class="list-group-item text-break">
          Wallet: <%= @character.wallet_formatted %> ISK
        </li>
      </ul>
      <p class="card-text text-center">
        <small class="text-muted">
          Last updated <span class="timeago" datetime="<%= @character.updated_at.iso8601 %>"></span>
        </small>
      </p>
    </div>
  </div>

  <div class="col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4">
    <h4 class="text-center text-break">Manufacturing Jobs</h4>

    <%= link_to("Create new job",
                new_character_manufacturing_job_path(@character.character_id),
                class: "btn btn-primary btn-block") %>
  </div>

  <div class="col-12 col-sm-12 col-md-6 col-lg-4 col-xl-4" id="new_manufacturing_job">
    <h4 class="text-center text-break">New Job</h4>

    <form>
      <div class="form-group">
        <label for="name">Name</label>
        <input type="text" class="form-control" id="name">
      </div>

      <div class="form-group">
        <label>{{selectedEvent}}</label>
        <vue-instant :suggestOnAllWords="true"
                     :suggestion-attribute="suggestionAttribute"
                     v-model="value"
                     :disabled="false"
                     @input="changed"
                     @click-input="clickInput"
                     @click-button="clickButton"
                     @selected="selected"
                     @enter="enter"
                     @key-up="keyUp"
                     @key-down="keyDown"
                     @key-right="keyRight"
                     @clear="clear"
                     @escape="escape"
                     :show-autocomplete="true"
                     :autofocus="false"
                     :suggestions="suggestions"
                     name="customName"
                     placeholder="custom placeholder"
                     type="google">
        </vue-instant>
      </div>

    </form>
    {{ message }}
  </div>
</div>

<script type="text/javascript">

  console.log(VueInstant)


  var app = new Vue({
    el: '#new_manufacturing_job',
    data: {
      message: 'Hello Vue!',
      character: {
        blueprints: <%= raw @blueprints.map { |b| {name: b.name_en} }.to_json %>
      },

      value: '',
      suggestionAttribute: 'name',
      suggestions: <%= raw @eve_types.map { |type| {id: type.type_id, name: type.name_en} }.to_json %>,
      selectedEvent: ""
    },
    methods: {
      clickInput: function() {
        this.selectedEvent = 'click input'
      },
      clickButton: function() {
        this.selectedEvent = 'click button'
      },
      selected: function() {
        this.selectedEvent = 'selection changed'
      },
      enter: function() {
        this.selectedEvent = 'enter'
      },
      keyUp: function() {
        this.selectedEvent = 'keyup pressed'
      },
      keyDown: function() {
        this.selectedEvent = 'keyDown pressed'
      },
      keyRight: function() {
        this.selectedEvent = 'keyRight pressed'
        console.log('keyRight pressed');
      },
      clear: function() {
        this.selectedEvent = 'clear input'
        console.log('clear input');
      },
      escape: function() {
        this.selectedEvent = 'escape'
        console.log('escape');
      },
      changed: function() {
        console.log('changed');
      //   var that = this
      //   this.suggestions = []
      //   axios.get('https://api.themoviedb.org/3/search/movie?api_key=342d3061b70d2747a1e159ae9a7e9a36&query=' + this.value)
      //       .then(function(response) {
      //         response.data.results.forEach(function(a) {
      //           that.suggestions.push(a)
      //         })
      //       })
      }
    }
  });
</script>

{'fraction_non_alphanumeric': 0.17553263672140046, 'fraction_numerical': 0.006853032975980459, 'mean_word_length': 2.4729029217719134, 'pattern_counts': {'":': 0, '<': 317, '<?xml version=': 0, '>': 319, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2221848', 'n_tokens_mistral': 5046, 'n_tokens_neox': 4682, 'n_words': 824}