Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- final type = forceAction != null
- ? forceAction
- : checkIn == null
- ? (state != null)
- ? CheckInTypeUtils.getActionName(
- CheckInTypeUtils.getReverseAction(info != null ? info.type : "out"),
- )
- : "in"
- : checkIn ? "in" : "out";
- if (type == "out" && checkinReason == CheckInReason.END_SHIFT) {
- if (attestations == null) {
- AppToast.error('No attestations ...', length: ToastLength.SHORT);
- } else if (attestationsResult == null) {
- showDialog(
- context: cxt,
- builder: (context) {
- return AttestationPopupScreen(
- attestations: attestations,
- onAttestationsCompleted: (map) {
- logger.i("onAttestationsCompleted: $map");
- attestationsResult = map;
- if (map.length == attestations.attestations.length) {
- _submit(type, attestations: map, skipWarning: skipWarning);
- }
- });
- }).then((map) {
- logger.i("Attestation $attestationsResult");
- if (attestationsResult == null || attestationsResult.length < attestations.attestations.length) {
- AppToast.error('Please answer your attestation questions ...', length: ToastLength.SHORT);
- }
- });
- } else {
- if (attestationsResult.length == attestations.attestations.length) {
- _submit(type, attestations: attestationsResult, skipWarning: skipWarning);
- }
- }
- } else {
- _submit(type, attestations: attestationsResult, skipWarning: skipWarning);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement