Skip to content

Conversation

@CKegel
Copy link
Contributor

@CKegel CKegel commented Mar 14, 2023

No description provided.

@CKegel CKegel requested review from ddbruce and lramos15 as code owners March 14, 2023 18:13
@CKegel CKegel closed this Mar 14, 2023
@CKegel CKegel reopened this Mar 14, 2023
@CKegel CKegel linked an issue Mar 14, 2023 that may be closed by this pull request
@CKegel CKegel added the bug Something isn't working label Mar 14, 2023

function handleDispatch(determinant, complaint, location) {
clearDispatch();
clearTimeout(dispatchTimeoutID);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be

if (dispatchTimeoutID != "")  {
    clearTimeout(dispatchTimeoutID);
    dispatchTimeoutId = "";
}

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is most definitely more correct if not correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be

if (dispatchTimeoutID != "")  {
    clearTimeout(dispatchTimeoutID);
    dispatchTimeoutId = "";
}

?

I've made the appropriate changes to reflect this corrected logic

}

function handleDispatch(determinant, complaint, location) {
if(dispatchTimeoutID != ""){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a space after if and before (

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And after ) and before {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ESLint should take care of these things. Are you using that?

@CKegel
Copy link
Contributor Author

CKegel commented Mar 15, 2023

An Authentication token has been added for the dispatch endpoint

Copy link
Member

@ddbruce ddbruce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@ddbruce ddbruce merged commit 8e131e4 into techinems:dev Mar 15, 2023
ddbruce added a commit that referenced this pull request Mar 21, 2023
* Master -> dev (#44)

Co-authored-by: Logan Ramos <lramos15@gmail.com>

* Add CAD Display from Herald (#65)

* Restructured Index.html and added endpoint for herald to push dispatch info to

* Styled Dispatch alerts, set dispatch alert duration to three minutes, and fixed odds and ends

* add dev env

* add dev workflow

* match database fields

* add css file to index.html

* this is what happens when you copy and paste a line

* eslint

* work on dispatch styling

* more styling

* add dispatch time

* fix dispatch time text

* Style Changes for Headsup Dispatch (#66)

* Changed Styling to capitalize dispatch info by request of RPIA dev-team coordinator

* Capitalize the start of words and Uppercase the determinant in Dispatch Alerts

* Moved Dispatch style to style-dispatch.scss

* BugFix: Fix issues with dispatches that occur within 3 minutes of each other (#68)

* Changed Styling to capitalize dispatch info by request of RPIA dev-team coordinator

* Capitalize the start of words and Uppercase the determinant in Dispatch Alerts

* Moved Dispatch style to style-dispatch.scss

* Fixed issues with dispatches that occur within 3 minutes of each other

* Correct Logic Errors in ClearDispatch Timeout

* Added authentication token for herald dispatch

* 1.5.0

* Clean Code and Add Admin Authentication (#70)

* Spell checking and code adjustments

* Added token authentication to admin POST endpoints

* restructure admin authentication

* fix double-dispatch clearing time issue

* update build status badge

---------

Co-authored-by: Logan Ramos <lramos15@gmail.com>
Co-authored-by: Christian <57967583+CKegel@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Second successive dispatch doesn't remove the first

2 participants