Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Repos that we’ll change

Whitelabel App: https://github.com/rbilabs/intl-whitelabel-app


Solution proposal

In the Sanity went can set images of the product to Restaurant, Delivery and Kiosk

The White Label must show images of accord selected channel, Restaurant with delivered, Restaurant selected or without restaurant.


Task summary

Intl Whitelabel App:

  • Task 1 - Create a Feature Flag

  • Task 2 - Add imagesByChannels in Graphql

  • Task 3 - Implement logic to prepared image show


Tasks breakdown

Intl Whitelabel APP

Task 1 - Create a Feature Flag

  • New feature flag for front-end: ENABLE_IMAGES_BY_CHANNELS

Task 2 - Add imagesByChannels in Graphql

  • Update Sanity Graphql (yarn apollo-generate)

  • Should create a new graphql file to imagesByChannel

  • Update Combo Graphql to add imagesByChannel

    • workspaces/frontend/src/queries/sanity/fragments/combo.graphql

  • Update Item Graphql to add imagesByChannel

    • workspaces/frontend/src/queries/sanity/fragments/item.graphql

  • Update Picker Graphql to add imagesByChannel

    • workspaces/frontend/src/queries/sanity/fragments/picker-availability.graphql

  • Update Product List Graphql to add imagesByChannel

    • workspaces/frontend/src/queries/sanity/fragments/product-list-section.graphql

Task 3 - Add new interfaces and changes

Link reference: https://github.com/rbilabs/intl-whitelabel-app/pull/1841/files#diff-3c5a6dd1f32b86cde31b8257a1e8332e9f8ccd97ae8931f47c64ad105103601c

File: workspaces/frontend/src/types/menu.d.ts

  • Should add new imagesByChannels interface with imageDelivery, imageKiosk and imageRestaurant.

  • Should add imagesByChannel in IPickerItem

  • Should add imagesByChannel in IBasePicker

  • Should add imagesByChannel in IBaseCombo

  • Should add imagesByChannel in IBaseItem

  • Should add imagesByChannel in IMainMenuPickerView

Task 3 - Implement logic to change image.

Link reference: https://github.com/rbilabs/intl-whitelabel-app/pull/1841/files#diff-4516aec29cee97c67b42f2b6e7ebb3e2a78da046f48149a0002e9cb815c0e505

  • Should create a new function to change image.

    • Example: changeImageByChannel

      • workspaces/frontend/src/state/main-menu/new-main-menu.tsx

    • This function should be used everywhere

Task 3 - Implement logic to change image in the Ketchup

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.