<commit_before><template>
  <uw-card
    v-if="showCard"
    :loaded="isReadyAdvisers && isReadyProfile"
    :errored="isErroredAdvisers || isErroredProfile"
    :errored-show="showError"
  >
    <template #card-heading>
      <h2 class="h4 mb-3 text-dark-beige myuw-font-encode-sans">
        Your Advisers
      </h2>
    </template>
    <template #card-body>
      <ul class="d-flex flex-wrap list-unstyled">
        <li
          v-for="(adviser, index) in advisers"
          :key="index"
          class="mt-3"
          :class="[$mq === 'mobile' ? 'w-100' : 'w-50']"
        >
          <div class="myuw-text-md">
            <div class="font-weight-bold">{{ adviser.program }}</div>
            <div>{{ adviser.full_name }} <span v-if="adviser.pronouns">({{ adviser.pronouns }})</span></div>
            <div>{{ adviser.email_address }}</div>
            <div>{{ formatPhoneNumberDisaply(adviser.phone_number) }}</div>
            <div v-if="adviser.booking_url">
              <a :href="adviser.booking_url">Make an appointment online</a>
            </div>
          </div>
        </li>
      </ul>
      <hr class="my-2">
      <uw-card-property title="Major">
          <ul class="list-unstyled">
            <template v-for="(termMajor, index) in termMajors">
              <li v-if="index == 0" :key="index" class="mb-1">
                {{ degreeListString(termMajor.majors) }}
              </li>
              <li v-else-if="termMajor.degrees_modified" :key="index" class="mb-1">
                Beginning {{ titilizeTerm(termMajor.quarter) }} {{ termMajor.year }}:
                &nbsp;&nbsp;
                <span v-if="termMajor.majors.length > 0">
                  {{ degreeListString(termMajor.majors) }}
                </span>
                <span v-else>
                  None
                </span>
              </li>
            </template>
          </ul>
      </uw-card-property>
      <template #card-error>
      An error occurred and MyUW cannot load your adviser information right now. In the meantime, to contact a general adviser, try the
      <a href="https://www.washington.edu/uaa/advising/">Undergraduate Advising page</a> and to contact a departmental or major adviser, try the 
      <a href="http://www.washington.edu/uaa/advising/degree-overview/majors/advising-offices-by-program/">Departmental and Major Advising Offices page</a>.
    </template>
    </template>
  </uw-card>
</template>

<script>
import {mapGetters, mapState, mapActions} from 'vuex';
import Card from '../_templates/card.vue';
import CardProperty from '../_templates/card-property.vue';
export default {
  components: {
    'uw-card': Card,
    'uw-card-property': CardProperty,<commit_msg>Final version of assigned adviser<commit_after><template>
  <uw-card
    v-if="showCard"
    :loaded="isReadyAdvisers && isReadyProfile"
    :errored="isErroredAdvisers || isErroredProfile"
    :errored-show="showError"
  >
    <template #card-heading>
      <h2 class="h4 mb-3 text-dark-beige myuw-font-encode-sans">
        Your Advisers
      </h2>
    </template>
    <template #card-body>
      <ul class="d-flex flex-wrap list-unstyled mb-0">
        <li
          v-for="(adviser, index) in advisers"
          :key="index"
          class="mb-3"
          :class="[$mq === 'mobile' ? 'w-100' : 'w-50']"
        >
          <div class="myuw-text-md">
            <div
              class="font-weight-bold myuw-font-encode-sans"
              style="color: #333;"
            >{{ adviser.program }}</div>
            <div>{{ adviser.full_name }} <span v-if="adviser.pronouns">({{ adviser.pronouns }})</span></div>
            <div>{{ adviser.email_address }}</div>
            <div>{{ formatPhoneNumberDisaply(adviser.phone_number) }}</div>
            <div v-if="adviser.booking_url">
              <a :href="adviser.booking_url">Make an appointment online</a>
            </div>
          </div>
        </li>
      </ul>
      <hr class="my-0">
      <uw-card-property title="Major" class="mt-3" :noMarginBottom="true">
          <ul class="list-unstyled">
            <template v-for="(termMajor, index) in termMajors">
              <li v-if="index == 0" :key="index" class="mb-1">
                {{ degreeListString(termMajor.majors) }}
              </li>
              <li v-else-if="termMajor.degrees_modified" :key="index" class="mb-1">
                Beginning {{ titilizeTerm(termMajor.quarter) }} {{ termMajor.year }}:
                &nbsp;&nbsp;
                <span v-if="termMajor.majors.length > 0">
                  {{ degreeListString(termMajor.majors) }}
                </span>
                <span v-else>
                  None
                </span>
              </li>
            </template>
          </ul>
      </uw-card-property>
    </template>
    <template #card-error>
      An error occurred and MyUW cannot load your adviser information right now. In the meantime, to contact a general adviser, try the
      <a href="https://www.washington.edu/uaa/advising/">Undergraduate Advising</a> page and to contact a departmental or major adviser, try the 
      <a href="http://www.washington.edu/uaa/advising/degree-overview/majors/advising-offices-by-program/">Departmental and Major Advising Offices</a> page.
    </template>
  </uw-card>
</template>

<script>
import {mapGetters, mapState, mapActions} from 'vuex';
import Card from '../_templates/card.vue';
import CardProperty from '../_templates/card-property.vue';
export default {
  components: {
    'uw-card': Card,
    'uw-card-property': CardProperty,
{'fraction_non_alphanumeric': 0.1562219428981864, 'fraction_numerical': 0.006284790806248878, 'mean_word_length': 2.148671565856416, 'pattern_counts': {'":': 0, '<': 107, '<?xml version=': 0, '>': 109, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, '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': '2978404', 'n_tokens_mistral': 1838, 'n_tokens_neox': 1748, 'n_words': 361}