UNPKG

alpha-version-dce-check-in-ui

Version:

UI for taking attendance and checking people in.

50 lines (43 loc) 1.1 kB
import React from 'react'; /** * Event property for whether to assign groups across occurrences. * @author Benedikt Arnarsson */ declare enum AssignToGroups { Always = "Always", Never = "Never", Ask = "Ask" } /** * Type describing a function for visiting server endpoints. * @author Benedikt Arnarsson */ type VisitServerEndpoint = (opts: { path: string; method?: ('GET' | 'POST' | 'DELETE' | 'PUT'); params?: { [key in string]: any; }; }) => Promise<any>; /** * Input to the CheckInUI and starting point for constructing Occurrences. * @author Benedikt Arnarsson */ type CheckInUIProps = { courseId: number; ihid: string; visitServerEndpoint: VisitServerEndpoint; }; /** * Main component which manages the check-in flow. * Wraps all subsequent steps in a body. * Should be opened on a button click. * @author Benedikt Arnarsson */ type Props = (CheckInUIProps & { onClose: () => void; assignToGroups: AssignToGroups; subText?: string; }); declare const CheckInUi: React.FC<Props>; export { CheckInUIProps, CheckInUi };