public void Post() { StartCoroutine(PostToSlack.Post(savedAssignment, 0)); Variables.HourlyAssignment = savedAssignment; confirmPopup.SetActive(false); successPopup.SetActive(true); SwitchColours(savedAssignment); currentText.GetComponent <Text>().text = "Current Position: " + Variables.HourlyAssignment; }
//submits the current array to the server public void SubmitRounds() { Variables.OnRounds = 0; endConfirmPopup.SetActive(false); endSuccessPopup.SetActive(true); StartCoroutine(Post(0, "FINISH")); Debug.Log("There are " + Variables.ScannedQRCodes.Count + " Scanned codes"); if (Variables.ScannedQRCodes.Count > 0) { UnscannedCodes = Locations.Except(Variables.ScannedQRCodes).ToList(); } else { UnscannedCodes = Variables.ScannedQRCodes; } int numScanned = Variables.ScannedQRCodes.Count; string message = Variables.Name + " scanned " + numScanned + " codes while on property rounds!"; StartCoroutine(PostToSlack.Post(message, 2)); Variables.ScannedQRCodes.Clear(); Debug.Log(message + " Sent to slack ;)"); }
public void SubmitArray() { List <string> Unchecked = new List <string>(); Unchecked = locations.Except(Variables.IssueArray).ToList(); string message = ""; for (int i = 0; i < Variables.IssueArray.Count; i++) { if (Variables.IssueArray[i] != "NO ISSUES") { message += (Variables.IssueArray[i] + "\n"); } } if (Unchecked.Count > 0) { message += "The following restrooms were unchecked:\n"; for (int i = 0; i < Unchecked.Count; i++) { message += Unchecked[i]; } } StartCoroutine(PostToSlack.Post(message, 1)); }