fragment EmployeeAll on Employee {
  name
  id
  surname
  personnelNumber
  qualification
  occuptationalHealthExamination
  personTransportCertificate
}

fragment PlannedTimeAll on PlannedTime {
  id
  userId
  firstname
  surname
  startDate
  endDate
  department
  pause
  duration
  note
}

fragment WorkTimeAll on WorkTime {
  id
  userId
  firstname
  surname
  startDate
  endDate
  department
  pause
  duration
}

fragment AttendanceRegistrationAll on AttendanceRegistration {
  personnelNumber
  attendanceRegistrationId
  employeeId
  dateTime
  event
}

fragment TourAll on Tour {
  billDate
  billNumber
  carName
  category
  check
  codriverId
  codriverName
  consumptionCosts
  createdAt
  deletedAt
  direction
  done
  driverId
  driverName
  empty
  hasInfection
  healthInsurance
  healthInsuranceNumber
  id
  infectionName
  occupiedKm
  operationId
  ordinanceType
  patientCity
  patientId
  patientName
  patientStreet
  patientSurname
  patientZip
  rangeEndDate
  revenue
  revenueDeviation
  revenueDispoLive
  startBegin
  startCity
  startDate
  startEnd
  startInstitution
  startStreet
  startZip
  target
  targetBegin
  targetCity
  targetInstitution
  targetStreet
  targetZip
  ticketId
  ticket {
    currentState
    approvalState
    createdAt
  }
  totalKm
  transportType
  type
}

query GetAnomaliesAssociatedEntities($id: String!) {
  associatedEntities(id: $id) {
    employee {
      ...EmployeeAll
    }
    plannedTime {
      ...PlannedTimeAll
    }
    workTime {
      ...WorkTimeAll
    }
    attendanceRegistration {
      ...AttendanceRegistrationAll
    }
    tour {
      ...TourAll
    }
  }
}
