SHARE
TWEET

Untitled

a guest Jan 24th, 2020 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. final type = forceAction != null
  2.         ? forceAction
  3.         : checkIn == null
  4.             ? (state != null)
  5.                 ? CheckInTypeUtils.getActionName(
  6.                     CheckInTypeUtils.getReverseAction(info != null ? info.type : "out"),
  7.                   )
  8.                 : "in"
  9.             : checkIn ? "in" : "out";
  10.  
  11.     if (type == "out" && checkinReason == CheckInReason.END_SHIFT) {
  12.       if (attestations == null) {
  13.         AppToast.error('No attestations ...', length: ToastLength.SHORT);
  14.       } else if (attestationsResult == null) {
  15.         showDialog(
  16.             context: cxt,
  17.             builder: (context) {
  18.               return AttestationPopupScreen(
  19.                   attestations: attestations,
  20.                   onAttestationsCompleted: (map) {
  21.                     logger.i("onAttestationsCompleted: $map");
  22.                     attestationsResult = map;
  23.  
  24.                     if (map.length == attestations.attestations.length) {
  25.                       _submit(type, attestations: map, skipWarning: skipWarning);
  26.                     }
  27.                   });
  28.             }).then((map) {
  29.           logger.i("Attestation $attestationsResult");
  30.           if (attestationsResult == null || attestationsResult.length < attestations.attestations.length) {
  31.             AppToast.error('Please answer your attestation questions ...', length: ToastLength.SHORT);
  32.           }
  33.         });
  34.       } else {
  35.         if (attestationsResult.length == attestations.attestations.length) {
  36.           _submit(type, attestations: attestationsResult, skipWarning: skipWarning);
  37.         }
  38.       }
  39.     } else {
  40.       _submit(type, attestations: attestationsResult, skipWarning: skipWarning);
  41.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top