Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable red pin for Viewer Work Order Details page #104

Merged
merged 4 commits into from
Jul 22, 2019

Conversation

mddilley
Copy link
Collaborator

Closes #103

@mddilley mddilley added the WIP Work in progress label Jul 12, 2019
@mddilley mddilley removed the WIP Work in progress label Jul 16, 2019
Copy link
Contributor

@mateoclarke mateoclarke left a comment

Choose a reason for hiding this comment

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

Once we make sure the iframe src reference is correct, we're good to go...

dancing_homie

@@ -34,7 +34,7 @@
// Add React app as iframe if iframe doesn't already exist
if ($(myView + " #mapIFrame").length === 0) {
$(
'<iframe src="https://atd-geo-knack-ui.netlify.com/" frameborder="0" scrolling="yes" id="mapIFrame" \
'<iframe src="https://localhost:9001/" frameborder="0" scrolling="yes" id="mapIFrame" \
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we want this referencing localhost in prod right @mddilley?

Copy link
Contributor

Choose a reason for hiding this comment

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

Right now in the knack js code (index.js), it references the "https://dnb4pix4gcpf6.cloudfront.net/atd-knack-signs-markings/98_marker_render/iframeMapMessenger.js". Do we need to update that?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch! Just changed and pushed. I'll update the Knack JS in builder with the latest from master after merging this branch.

@@ -368,6 +369,10 @@ export default class SelectLocation extends Component {

switch (data.message) {
case "SIGNS_API_REQUEST":
// Use workOrderDetailsViewable state to disable red pin and pulse if user is Viewer role
if (data.view === "view_2619") {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice, this is pretty clever. Kinda of a hard-coded hack but let's count our wins and never talk about this again.

@mddilley mddilley merged commit 2370aaf into master Jul 22, 2019
@mddilley mddilley deleted the 103_remove_red_pin branch July 22, 2019 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove red select location pin on Work Order Details Page - Viewable - view_2619
2 participants