Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Acceptance Criteria

  • On Sanity, you can activate the QRCode when add a service mode, we will have can to add the other fields, as Stores, Items, Duration for bottom sheets and recent orders.

  • When then finished the order, the system will generate a QRCode;

  • The QRCode will work just for orders that finished with success;

  • The QRCode will work for orders scheduled too, will show QRCode when orders are done status with success.

  • Need to save in DynamoDB the secrets key for generate MD5, for each market and brand that use QRCodeSanity - The activatino/desactivation of the QR code feature is associated with the service mode toggle. If , at least, one service mode is active, it means that the sub-fields for duration (botton sheet in Home, recent order) must be mandatory filled. In addition, configurator needs to ensure that the list of eligible refill drinks (items) and store are properly set.

  • The QR code generation happens upon the order is placed with success or updated with success. No refunded order is considered for QR code generation.

  • QR code for scheduled orders must be displayed according to the order pick-up time.

  • The dispenser password is a secret that must be stored in the database. It will allow whitelabel to create a MD5 hash that is converted into the QR code. RBIberia needs to ensure that the configured secret in EMEA whitelabel is in sync with the vending machine password.

  •  Reviewed by Paula Winter
  •  Reviewed by Felipe Gonçalves
  •  Reviewed by Raphael Gomes

...

  • Add secrets in DynamoDB

  • Create a new provider into directory src/functions/graphql/providers/ RefillDrinkQRCodeProvider;

    • Create a request for get secrets of MD5

    • In this provider, we need to create a hash, this code is an example of how to create the logic for it.

    • Run graphql:types

  • Create a new function for generated hash with MD5, but we need to get the key of cryptography of MD5;

  • Use the library crypto to create a hash with MD5, we have an example in src/functions/graphql/providers/users.ts

    • Image RemovedImage Added

  • Create a new resolver into directory src/functions/graphql/resolvers/;

  • Create new types, interface, etc;

...