LCOV - code coverage report
Current view: top level - www/src/components - CameraGroup.vue.js (source / functions) Hit Total Coverage
Test: lcov.info Lines: 1 2 50.0 %
Date: 2024-07-30 12:54:47 Functions: 1 2 50.0 %

          Line data    Source code
       1             : // @ts-check
       2             : 
       3             : import Vue from 'vue';
       4             : import { mapGetters, mapState } from 'vuex';
       5             : 
       6             : import CameraControl from './CameraControl.vue';
       7             : 
       8             : export default Vue.extend({
       9             :   name: 'CameraGroup',
      10             :   components: { CameraControl },
      11             :   computed: {
      12             :     /**
      13             :      * @type {{
      14             :      *    page(): string|null,
      15             :      *    loading(): boolean
      16             :      * }}
      17             :      */
      18             :     ...mapState([ "page", "loading" ]),
      19             :     /** @type {{ camConfig(): object }} */
      20             :     ...mapState("cameras", { camConfig: "cameras" }),
      21             :     /**
      22             :      * @returns {string[]}
      23             :      */
      24          13 :     cameras() { return this.camConfig?.[this.page]?.cameras ?? []; },
      25             :     .../** @type {isOperator(): boolean, isExpert(): boolean} */mapGetters([
      26             :       "isOperator", "isExpert"
      27             :     ]),
      28             :     /**
      29             :      * @return {boolean}
      30             :      */
      31             :     canControl() {
      32           0 :       return this.isOperator || this.isExpert;
      33             :     }
      34             :   }
      35             : });

Generated by: LCOV version 1.16