Poniżej kod napisany w Vue.js. Po naciśnięciu klawisza Enter w 2-text-field nie jest wysyłany request do /api/services/app/IcdCodes/SearchIcd. Jak to naprawić?

/// KOD Vue.js

<template>
  <div>
    <v-row dense>
      <v-col cols="12" md="4">
        <template-based-input
          v-model="model.interview"
          :specialization-id="specializationId"
          rows="14"
          :readonly="readonly"
          type="interview"
          class="mt-2" />
      </v-col>
      <v-col cols="12" md="4">
        <examination-card
          v-model="model.examination"
          :readonly="readonly"
          :specialization-id="specializationId"
          :type="type"
          class="mt-2" />
      </v-col>
      <v-col cols="12" md="4">
        <icd-code-list
          v-if="previewMode"
          v-model="model.procedures"
          class="mt-2"
          :readonly="readonly"
          title="Zastosowane procedury"
          type="Icd9" />
        <slot v-else name="visit-history"></slot>
      </v-col>
    </v-row>
    <v-row dense>
      <v-col cols="12" md="4">
        <icd-code-list
          v-model="model.diagnoses"
          title="Rozpoznania"
          :readonly="readonly"
          use-remarks
          type="Icd10"
          class="mt-2">
          <template #actions="{ item }">
            <slot name="diagnose-actions" :item="item"></slot>
          </template>
        </icd-code-list>
        <v2-text-field
          v-model="icdCodeInput"
          label="Wprowadź kod ICD-10"
          placeholder="np. A00.0"
          :filled="true"
          class="mt-2"
          @keyup.enter="handleIcdCodeInput"/>
      </v-col>
      <v-col cols="12" md="4">
        <text-area-with-staff-template
          v-model="model.recommendations"
          :readonly="readonly"
          label="Zalecenia dodatkowe"
          class="mt-2"
          rows="10"
          toolbar
          high
          :type="staffTemplateTypes.visitRecommendations">
          <template #actions>
            <submit-icon-button
              icon="mdi-printer"
              color="primary lighten-5"
              tooltip="Drukuj"
              :action="printRecommendations" />
          </template>
        </text-area-with-staff-template>
      </v-col>
      <v-col cols="12" md="4">
        <medical-items-card
          ref="medicalItemsRef"
          :readonly="readonly"
          class="mt-2"
          :context="context" />
      </v-col>
    </v-row>
    <v-row dense>
      <v-col cols="12" md="8">
        <slot name="patient-conditions"></slot>
      </v-col>
      <v-col v-if="!previewMode" cols="12" md="4">
        <icd-code-list
          v-model="model.procedures"
          class="mt-3"
          :readonly="readonly"
          title="Zastosowane procedury"
          type="Icd9" />
      </v-col>
    </v-row>
    <v-row dense>
      <v-col cols="12">
        <ophthalmic-care-card
          v-if="isOphthalmicCardType"
          v-model="model.ophthalmicCare.model"
          class="mt-2"
          :readonly="readonly"
          @print-ophthalmic="printOphthalmic" />
        <surgery-care-card
          v-if="isSurgeryCardType"
          v-model="model.surgeryCare.model"
          class="mt-2"
          :specialization-id="specializationId"
          :readonly="readonly" />
        <gynecology-care-card
          v-if="isGynecologyCardType"
          v-model="model.gynecologyCare.model"
          :prenatal-referral-id="prenatalReferralId"
          :readonly="readonly"
          @update:prenatal-referral-id="onPrenatalReferralIdUpdate" />
      </v-col>
    </v-row>
  </div>
</template>

<script lang="ts">
import MaskUtils from "@/components/enums/mask-utils";
import SubmitIconButton from "@/components/action-buttons/submit-icon-button.vue";
import type GovServicesBaseContext from "@/views/commerce/gov-services/gov-services-base-context";
import SpecializationCardType from "@/views/commerce/specializations/specialization-card-type";
import StaffTemplateType from "@/views/commerce/staff-templates/staff-template-type";
import TextAreaWithStaffTemplate from "@/views/commerce/staff-templates/text-templates/text-area-with-staff-template.vue";
import type CareData from "@/views/commerce/visits/process/care-data";
import ExaminationCard from "@/views/commerce/visits/process/examination/examination-card.vue";
import IcdCodeList from "@/views/commerce/visits/process/icd-codes/icd-code-list.vue";
import MedicalItemsCard from "@/views/commerce/visits/process/medical-data/medical-items-card.vue";
import OphthalmicCareCard from "@/views/commerce/visits/process/ophthalmic/ophthalmic-care-card.vue";
import SurgeryCareCard from "@/views/commerce/visits/process/surgery/surgery-care-card.vue";
import TemplateBasedInput from "@/views/commerce/visits/summary-template/template-based-input.vue";
import type { PropType } from "@vue/composition-api";
import {
  computed,
  defineComponent,
  inject,
  onBeforeUpdate,
  onMounted,
  ref,
  watch
} from "@vue/composition-api";
import { objectProp } from "@/compatibility-layer/model-prop";
import ModelConstants from "@/compatibility-layer/model-constants";
import { useObjectModel } from "@/compatibility-layer/object-model";
import GynecologyCareCard from "@/views/commerce/visits/process/gynecology/gynecology-care-card.vue";
import FixedData from "@/views/main-wrap/fixed-data";
import PregnancyCodes from "@/views/commerce/visits/process/pregnancy-codes";
import V2TextField from "@/compatibility-layer/components/v2-text-field.vue";
import IcdCode from "@/views/commerce/visits/process/icd-codes/icd-code";
import axios from "@/lib/axios";

const ProcessVisitCoreCard = defineComponent({
  components: {
    GynecologyCareCard,
    SubmitIconButton,
    SurgeryCareCard,
    OphthalmicCareCard,
    IcdCodeList,
    MedicalItemsCard,
    ExaminationCard,
    TextAreaWithStaffTemplate,
    TemplateBasedInput,
    V2TextField
  },

  props: {
    ...objectProp<CareData>(),
    type: {
      type: Number,
      required: true
    },
    specializationId: {
      type: Number,
      required: true
    },
    prenatalReferralId: {
      type: [String, null] as PropType<string | null>,
      required: false,
      default: null
    },
    previewMode: {
      type: Boolean,
      required: false,
      default: false
    },
    context: {
      type: Object as PropType<GovServicesBaseContext>,
      required: true
    }
  },

  emits: [
    ModelConstants.modelEvent,
    "print-ophthalmic",
    "print-recommendations",
    "update:prenatal-referral-id"
  ],

  setup(props, context) {
    const fixedData = inject(FixedData.Key) as FixedData;
    const model = useObjectModel<CareData>(props, context);
    const pregnancyCodes = ref(PregnancyCodes.empty());
    const inPatientConditionsEditMode = ref(false);

    const medicalItemsRef = ref(null);

    onBeforeUpdate(() => {
      medicalItemsRef.value = null;
    });
    onMounted(async () => {
      pregnancyCodes.value = await fixedData.loadPregnancyCodes();
    });

    const isSurgeryCardType = computed(() =>
      MaskUtils.hasFlag(props.type, SpecializationCardType.Surgery)
    );
    const isOphthalmicCardType = computed(() =>
      MaskUtils.hasFlag(props.type, SpecializationCardType.Ophthalmic)
    );
    const isAestheticCardType = computed(() =>
      MaskUtils.hasFlag(props.type, SpecializationCardType.Aesthetic)
    );

    const isGynecologyCardType = computed(() =>
      MaskUtils.hasFlag(props.type, SpecializationCardType.Gynecology)
    );

    const printRecommendations = (): Promise<void> =>
      new Promise<void>(resolve => context.emit("print-recommendations", resolve));

    const reload = () => {
      const entity = medicalItemsRef.value as any;
      if (entity) {
        entity.reload();
      }
    };

    const pregnancyImplied = ref(false);

    watch(
      () => model.value.diagnoses,
      (nv, _) => {
        if (pregnancyImplied.value) return;
        if (!isGynecologyCardType.value) return;
        if (nv.find(v => pregnancyCodes.value.all.has(v.code))) {
          model.value.gynecologyCare.isPregnant = true;
          pregnancyImplied.value = true;
        }
      },
      { deep: true }
    );

    const icdCodeInput = ref("");

    const handleIcdCodeInput = async () => {
      const code = icdCodeInput.value.trim().toUpperCase();
      if (!code) return;

      try {
        const response = await axios.post("/api/services/app/IcdCodes/SearchIcd", {
          searchPhrase: code
        });

        if (response.status !== 200) {
          throw new Error("Błąd sieciowy.");
        }

        const data = response.data.result.items as any[];

        const foundItemDto = data.find(item => item.code.toUpperCase() === code);

        if (foundItemDto) {
            const newIcdCode = IcdCode.fromDto(foundItemDto);
            model.value.diagnoses.push(newIcdCode);
            icdCodeInput.value = "";
        } else {
          alert("Nie znaleziono rozpoznania dla podanego kodu ICD-10.");
        }
      } catch (error) {
        console.error(error);
        alert("Wystąpił błąd podczas wyszukiwania kodu ICD-10.");
      }
    };

    return {
      model,
      isSurgeryCardType,
      isOphthalmicCardType,
      isAestheticCardType,
      isGynecologyCardType,
      inPatientConditionsEditMode,
      printOphthalmic: resolve => context.emit("print-ophthalmic", resolve),
      printRecommendations,
      medicalItemsRef,
      reload,
      staffTemplateTypes: StaffTemplateType.instance,
      onPrenatalReferralIdUpdate: v => context.emit("update:prenatal-referral-id", v),
      icdCodeInput,
      handleIcdCodeInput
    };
  }
});

export default ProcessVisitCoreCard;
</script>