<commit_before>/*
Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
*/
<template>
    <fieldset>
      <b-row>
        <b-col xs="12">
          <legend :id="id">
            Person Responsible for Work
          </legend>
        </b-col>
        <b-col xs="12">
          <div class="float-right">
            <b-btn v-if="isStaffEdit" variant="primary" class="ml-2" @click="$emit('save')" :disabled="saveDisabled">Save</b-btn>
            <a href="#top" v-if="isStaffEdit">Back to top</a>
          </div>
        </b-col>
      </b-row>
      <b-row>
        <b-col cols="12" md="12" lg="4">
          <b-form-group
              aria-describedby="personResponsibleInvalidFeedback"
              :state="false">
            <label>Person Responsible for Drilling</label>
            <v-select
                :class="errors.person_responsible?'border border-danger dropdown-error-border':''"
                :disabled="persons === null"
                id="personResponsibleSelect"
                :filterable="false"
                :options="personOptions"
                label="name"
                v-model="personResponsibleInput"
                @search="onPersonSearch"
                ref="personResponsible"
                @search:blur="handleSearchBlur(personOptions, $refs.personResponsible, 'personResponsibleInput')">
              <template slot="no-options">
                  Type to search registry...
              </template>
              <template slot="option" slot-scope="option">
                <div>
                  {{ option.name }}
                  </div>
              </template>
              <template slot="selected-option" slot-scope="option">
                <div>
                  {{ option.name }}
                </div>
              </template>
            </v-select>
            <small id="personResponsibleSelectHint" class="form-text text-muted">
              *displays a maximum of {{MAX_RESULTS}} results
            </small>
            <b-form-text id="personResponsibleInvalidFeedback" v-if="errors.person_responsible">
              <div v-for="(error, index) in errors.person_responsible" :key="`personResponsible error ${index}`" class="text-danger">
                {{ error }}
              </div>
            </b-form-text>
          </b-form-group>
        </b-col>
        <b-col cols="12" md="6" lg="4">
          <form-input
              id="drillerName"
              label="Name of Person Who Did the Drilling"
              type="text"
              :disabled="drillerSameAsPersonResponsible"
              v-model="drillerNameInput"
              :errors="errors['driller_name']"
              :loaded="fieldsLoaded['driller_name']"
          ></form-input>
        </b-col>
        <b-col cols="12" md="6" lg="4">
          <b-form-group class="pt-md-4 mt-md-2">
            <b-form-checkbox id="checkbox1"
                  v-model="drillerSameAsPersonResponsibleInput"
                  :value="true"
                  :unchecked-value="false"
                  :disabled="!personResponsible">
              Same as Person Responsible for Drilling
            </b-form-checkbox>
          </b-form-group>
        </b-col>
      </b-row>
      <b-row>
        <b-col cols="12" md="12" lg="4">
          <b-form-group
              aria-describedby="companyOfPersonResponsibleInvalidFeedback"
              :state="false"><commit_msg>Revised Person Responsible wording and arrangement<commit_after>/*
Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
*/
<template>
    <fieldset>
      <b-row>
        <b-col xs="12">
          <legend :id="id">
            Person Responsible for Work
          </legend>
        </b-col>
        <b-col xs="12">
          <div class="float-right">
            <b-btn v-if="isStaffEdit" variant="primary" class="ml-2" @click="$emit('save')" :disabled="saveDisabled">Save</b-btn>
            <a href="#top" v-if="isStaffEdit">Back to top</a>
          </div>
        </b-col>
      </b-row>
      <b-row>
        <b-col cols="12" md="12" lg="4">
          <b-form-group
              label="Drill Supervisor *"
              aria-describedby="personResponsibleInvalidFeedback"
              :state="false">
            <label>Person Responsible for Drilling</label>
            <v-select
                :class="errors.person_responsible?'border border-danger dropdown-error-border':''"
                :disabled="persons === null"
                id="personResponsibleSelect"
                :filterable="false"
                :options="personOptions"
                label="name"
                v-model="personResponsibleInput"
                @search="onPersonSearch"
                ref="personResponsible"
                @search:blur="handleSearchBlur(personOptions, $refs.personResponsible, 'personResponsibleInput')">
              <template slot="no-options">
                  Type to search registry...
              </template>
              <template slot="option" slot-scope="option">
                <div>
                  {{ option.name }}
                  </div>
              </template>
              <template slot="selected-option" slot-scope="option">
                <div>
                  {{ option.name }}
                </div>
              </template>
            </v-select>
            <small id="personResponsibleSelectHint" class="form-text text-muted">
              *displays a maximum of {{MAX_RESULTS}} results
            </small>
            <b-form-text id="personResponsibleInvalidFeedback" v-if="errors.person_responsible">
              <div v-for="(error, index) in errors.person_responsible" :key="`personResponsible error ${index}`" class="text-danger">
                {{ error }}
              </div>
            </b-form-text>
          </b-form-group>
        </b-col>
        <b-col cols="12" md="8" lg="4">
          <p class="d-inline">Drill Operator</p>
          <b-form-checkbox id="checkbox1"
            v-model="drillerSameAsPersonResponsibleInput"
            :value="true"
            :unchecked-value="false"
            :disabled="!personResponsible">
            Same as Supervisor
          </b-form-checkbox>
          <form-input
              id="drillerName"
              label=""
              type="text"
              :disabled="drillerSameAsPersonResponsible"
              v-model="drillerNameInput"
              :errors="errors['driller_name']"
              :loaded="fieldsLoaded['driller_name']"
          ></form-input>
        </b-col>
      </b-row>
      <b-row>
        <b-col cols="12" md="12" lg="4">
          <b-form-group
              aria-describedby="companyOfPersonResponsibleInvalidFeedback"
              :state="false">
{'fraction_non_alphanumeric': 0.1272774260240341, 'fraction_numerical': 0.0069776456906577074, 'mean_word_length': 1.7505330490405118, 'pattern_counts': {'":': 0, '<': 111, '<?xml version=': 0, '>': 111, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7394219', 'n_tokens_mistral': 2197, 'n_tokens_neox': 2093, 'n_words': 469}