subscription TimePerTourUpdated {
  timePerTourUpdated {
    job
  }
}

query GetTourAmountPerTimeKPI($ordinanceType: String!) {
  toursPerTimeKPI(ordinanceTypes: $ordinanceType) {
    kpi {
      value
    }
    interval {
      start
      end
    }
  }
}

query GetTourAmountPerTimeKPIManager($ordinanceType: String!) {
  toursPerTimeKPI(ordinanceTypes: $ordinanceType) {
    kpi {
      value
      meta {
        availableTime
        baseValue
        tourAmount
        breakEven
      }
    }
    interval {
      start
      end
    }
    cars {
      carName
      kpi {
        value
        meta {
          availableTime
          baseValue
          tourAmount
          breakEven
        }
      }
    }
  }
}

query GetTimePerTourMetricForDay($day: DateTime!, $ordinanceType: String!) {
  timePerTourMetricForDay(day: $day, ordinanceType: $ordinanceType) {
    interval {
      start
      end
    }
    availableTime
    tourAmount
    breakEven
    revenue
    averageRevenue
    personnelCost
    consumptionCost
    forecast
    forecastRevenue
    categoryAmounts {
      category
      amount
    }
  }
}

query GetTimePerTourMetricForMonth($day: DateTime!, $ordinanceType: String!) {
  timePerTourMetricForMonth(day: $day, ordinanceType: $ordinanceType) {
    interval {
      start
      end
    }
    availableTime
    tourAmount
    breakEven
    revenue
    averageRevenue
    personnelCost
    consumptionCost
    forecast
    forecastRevenue
    categoryAmounts {
      category
      amount
    }
  }
}

query TicketStateKpi($state: TicketValidationState!) {
  ticketStateKpi(state: $state) {
    main {
      label
      value
    }
    secondary {
      label
      value
    }
    additional {
      label
      value
    }
  }
}

query ManagerKpi($ordinanceType: String!) {
  managerKpi(ordinanceType: $ordinanceType) {
    main {
      label
      value
    }
    secondary {
      label
      value
    }
    additional {
      label
      value
    }
  }
}
