github.com/benoitkugler/goacve@v0.0.0-20201217100549-151ce6e55dc8/server/frontend/bv/src/shared/fields/FieldSatisfaction.vue (about)

     1  <template>
     2    <b-form-group :label="label">
     3      <b-form-rating
     4        stars="4"
     5        :value="value"
     6        @change="$emit('change', $event)"
     7        variant="accent"
     8        :readonly="readonly"
     9      >
    10      </b-form-rating>
    11    </b-form-group>
    12  </template>
    13  
    14  <script lang="ts">
    15  import Vue from "vue";
    16  import Component from "vue-class-component";
    17  import { Satisfaction } from "@/shared/logic/types";
    18  
    19  const FieldSatisfactionProps = Vue.extend({
    20    props: {
    21      value: Number as () => Satisfaction,
    22      label: String,
    23      readonly: Boolean
    24    },
    25    model: {
    26      prop: "value",
    27      event: "change"
    28    }
    29  });
    30  
    31  @Component({})
    32  export default class FieldSatisfaction extends FieldSatisfactionProps {}
    33  </script>
    34  
    35  <style scoped></style>