Versions Compared

Key

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

255417eb-03fa-3e2f-a6ba-
Jira Legacy
serverSystem Jira
serverId
Jira Legacy
serverSystem Jira
serverId255417eb-03fa-3e2f-a6ba-05d325fec50d
keyIBFEC-2795

...

To address this, we propose an enhancement to the DOP system, allowing for better auditing and management of product availability. This includes the ability to schedule product disablement and automatic reactivation, as well as providing comprehensive reports on the status of disabled products.

🛠️ Potential Solutions

For the navigation/flow

🛠️ Potential Solutions

For the navigation/flow experience, this will be the summarized solution:

image-20250128-174953.pngImage Added

  • The audit process starts when the user clicks on the "Review Restaurants" button in the /restaurants page

  • The user will be sent to a new route /audit-products (name to be defined/confirmed with UX team)

  • On this new page, we'll show the new products table for the audit restaurants experience

    • If the user goes out to another page or cancels the operation, he’ll need to restart the audit process again

    • We want this experience for now to be close to what we already have on the /editor flow

  • Besides the ability to filter what's been presented on the table, the user can also download products status (the filtered products to a The user can also download products status (the filtered products to a CSV file)

To understand the complete flow check this Figmabetter this flow: https://www.figma.com/board/rvDVIJQKsiG1SC1yB93JVn/2024---Q4---%5BIBFEC-2795%5D---Ability-to-audit-per-storeQ4-available-and-unavailable%5BIBFEC-products2795%5D-(DOP)?node-id=0-1&p=f&t=rVNPlynr4mNhYHWv-0.Check the proposed solution to understand the front-end and navigation, technically speaking: https://rbictg.atlassian.net/wiki/spaces/IBC/pages/5243863171/Front-end+refinement+Audit+unavailable+products+on+DOP#New-front-end-page-development.-Ability-to-audit-per-store-available-and-unavailable-products-(DOP)?node-id=0-1&p=f&t=rVNPlynr4mNhYHWv-0.

About DOP Performance

Today we already know that the application has performance problems to deal with big content on the table (high loadings, slowness, etc.). To deal with this problem, we have the following proposals:

  1. To-do

  2. To-do

✅ Proposed Solution

New page to audit products

Important: TheUX team is defining the experience. This document is already out-dated. The main idea could be reused still.

...

Expand
titleNew audit products rematch Model - frontend/src/rematch/models/audit-restaurants.ts - Example
Code Block
languagetypescript
export interface AuditProductsState {
  auditableProducts: Record<string, desiredFragmentHere>;
}

/**
 * Audit products redux store
 */
export const auditProducts = createModel<RootModel>()({
  state: {
    auditableProducts: false,
    filters: {
      // any desirable filter, if we want
    },
  } as AuditProductsState,

  reducers: {
    /**
     * Method to set the auditableProducts
     */
    setAuditableProducts(state, payload: desiredProductsInterface) {
      return { ...state, auditableProducts: payload };
    },

    // any other filter reducer if necessary
  },

  selectors: slice => ({
    auditableProducts() {
      return slice(state => state.auditableProducts);
    },
  }),
});

Update the Rematch models index:

Code Block
languagetypescript
import { Models } from '@rematch/core';

// ...rest of the code
import { auditProducts } from './audit-products';

export interface RootModel extends Models<RootModel> {
  // ...rest of the code
  auditRestaurants: typeof auditProducts;
}

export const models: RootModel = {
  // ...rest of the code
  auditProducts,
};

Front end to-do: Do we need a pagination system? The solutions to deal with performance problems and querie section will answer that.

...

New logic to schedule and automatic reactivation of disabled products

To-do: to confirm if this will be part of this first deliverable or if we’ll only deliver the audit page for now. 

Solutions to deal with performance problems and queries

Today the app depends on data from different places to have the products complete data (considering availability, etc). I'll let here just an example of how the data flow is working for the products page/editor flow → This is only intended for the discovery/draft phase. We can delete this text and the image below later.

...

To-do: proposals to solve this data composition/orchestration layer for the new page and products data

# 1 - To-do solution 1

📈 Metrics

Info

Describe the metrics that will be used to measure the solution’s success, as well as how to measure those KPIs.

...