<template>
  <span class="chill-entity entity-user">
    {{ user.label }}
    <span class="user-job" v-if="user.user_job !== null">
      ({{ localizeString(user.user_job.label) }})</span
    >
    <span class="main-scope" v-if="user.main_scope !== null">
      ({{ localizeString(user.main_scope.name) }})</span
    >
    <span
      v-if="user.isAbsent"
      class="badge bg-danger rounded-pill"
      :title="Absent"
      >A</span
    >
  </span>
</template>

<script>
import { localizeString } from "ChillMainAssets/lib/localizationHelper/localizationHelper";

export default {
  name: "UserRenderBoxBadge",
  methods: {
    localizeString(label) {
      return localizeString(label);
    },
  },
  props: ["user"],
};
</script>
