aws-samples / aws-serverless-workshop-innovator-island

Welcome to the Innovator Island serverless workshop! This repo contains all the instructions and code you need to complete the workshop.
MIT No Attribution
564 stars 228 forks source link

No background colour if wait time == 0 #68

Closed nmoutschen closed 2 years ago

nmoutschen commented 3 years ago

Describe the bug

On the park map, if the ride wait time is zero minute, the wait time badge doesn't have a background color. Thus, the text is then white on light gray, which is hard to read.

It looks like it comes from the src/components/ParkMap.vue file, lines 92 and following:

    getVariantFromWait: (wait) => {
      if (wait > 100) return 'bg-danger'
      if (wait > 90) return 'bg-warning'
      if (wait > 60) return 'bg-info'
      if (wait > 0) return 'bg-success'
    }

Should be:

    getVariantFromWait: (wait) => {
      if (wait > 100) return 'bg-danger'
      if (wait > 90) return 'bg-warning'
      if (wait > 60) return 'bg-info'
      return 'bg-success'
    }

Link to workshop URL

To Reproduce

Expected behavior

All possible wait times should have a background color.

Screenshots

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

jbesw commented 2 years ago

Thanks - this has now been fixed for the re:Invent 2021 workshop version.