All files / components/Appointment/AppointmentSelection AvailabilityInfoModal.vue

100% Statements 9/9
50% Branches 1/2
100% Functions 4/4
100% Lines 8/8

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39  81x             80x       80x                     75x             75x   79x   75x 1x      
<template>
  <muc-modal
    :open="open"
    :close-aria-label="closeAriaLabel"
    @close="handleClose"
    @cancel="handleClose"
  >
    <template #title>
      {{ t("newAppointmentsInfoLink") }}
    </template>
 
    <template #body>
      <div v-html="sanitizedHtml"></div>
    </template>
  </muc-modal>
</template>
 
<script setup lang="ts">
import { MucModal } from "@muenchen/muc-patternlab-vue";
import { computed } from "vue";
 
import { sanitizeHtml } from "@/utils/sanitizeHtml";
 
const props = defineProps<{
  open: boolean;
  html: string;
  closeAriaLabel: string;
  t: (key: string) => string;
}>();
 
const emit = defineEmits<(e: "update:open", value: boolean) => void>();
 
const sanitizedHtml = computed(() => sanitizeHtml(props.html ?? ""));
 
const handleClose = () => {
  emit("update:open", false);
};
</script>