Versions Compared

Key

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

...

The first solution is allowing the offer name to be editable using a different component (AutoComplete) and when the offer is searched it will look for the offer comparing the name with what was typed.

...

Expand
titlesrc/components/customer-offers/forms/offer-form.tsx
Code Block
const searchByOfferName =
    customer?.supportOffers?.filter(
      (offer) => offer?.name && offer?.name?.toLowerCase().includes(offerTemplate),
    );
    
return {
  ...
  <form onSubmit={handleSubmit}>
    <DialogContent>
      <Grid container spacing={2}>
        <Grid item xs={12}>
          <FormControl
            variant="outlined"
            className={classes.formControl}
            error={hasSubmitted && !offerTemplate}
          >
            {searchByOfferName && (
              <Autocomplete
                ...
              )}

For more references:

✅ Pros:

  • Quick implementation

(error) Disregarding Solution

Solution #1

This solution allows the offer name to be still editable using a TextBox and when the offer is searched it will look for the offer by comparing the name with what was typed, in another component(Select) or a List that would render according to the list of offer available

(error) Cons:

  • Creation of more dependencies between component

  • Use at least two components to do the same search instead of a specific one that does all the work

Solution #1.1

Use of regex to get any part of the text typed to compare to the list of offers to be assigned

...

Info

List here potential challenges that have come across the opportunity definition or from the potential solutions so far.

💰 Cost

Info

Describe any additional cost this solution may imply.

🎛️ Configuration

Info

Include here any configuration required (Sanity, LaunchDarkly flags, etc.) required to enable the solution.

📈 Metrics

Info

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

🗓️ Delivery Plan

Info

Link to the task or list of all the tasks required to deliver the solution, along with its progress.

🧑‍🚒 QA Plan

Info

Testing scenarios. See example /wiki/spaces/EGMT/pages/4080861189.

⚠️ Call-outs

...

(error) Cons:

  • Creation of a new constant to search offers names by anything typed instead of using native properties.

🧑‍🚒 QA Plan