import { inject , injectable } from 'inversify' ; import * as apid from '../../../../../api' ; import IReservesApiModel from '../../api/reserves/IReservesApiModel' ; import IDashboardState from './IDashboardState' ; @ injectable ( ) export default class DashboardState implements IDashboardState { private reserveApiModel : IReservesApiModel ; constructor ( @ inject ( 'IReservesApiModel' ) reserveApiModel ) { this . reserveApiModel = reserveApiModel ; } private cnts : apid . ReserveCnts = { normal : 0 , conflicts : 0 , skips : 0 , overlaps : 0 , } ; /**
     * 取得した予約数情報をクリア
     */ public clearDate ( ) { this . cnts = { normal : 0 , conflicts : 0 , skips : 0 , overlaps : 0 , } ; } return public async fetchData ( ) { this . cnts = await this . reserveApiModel . getCnts ( ) ; } public getConflictCnt ( ) { return this . cnts . conflicts ; } }