juansedo / tuya-credit-fe

"El problema a resolver es cómo antes de realizar una compra puede un cliente conocer cuánto terminara pagando al final y así tomar una decisión correcta".
0 stars 1 forks source link

Modal for "Fináncialo!" #19

Open juansedo opened 2 years ago

juansedo commented 2 years ago

Description

When user clicks on "Fináncialo!", a Modal for choosing the credit card of the user must appear. This is an example of credit cards response from backend:

const creditCards = [
  {
    type: "PRIVADA",
    lastDigits: "2291",
    fee: "21500.00",
    feeMode: "MONTHLY IN USE",
    capacity: "8600000.00",
    available: "5160000.00",
    interestRate: "0.1600",
    userKey: "QRST"
  },
  {
    type: "CREDICOMPRAS",
    lastDigits: "7263",
    fee: "12500.00",
    feeMode: "MONTHLY",
    capacity: "16200000.00",
    available: "14580000.00",
    interestRate: "0.9300",
    userKey: "QRST"
  },
  {
    type: "PRIVADA",
    lastDigits: "2993",
    fee: "21500.00",
    feeMode: "MONTHLY",
    capacity: "17600000.00",
    available: "10560000.00",
    interestRate: "1.9700",
    userKey: "QRST"
  },
]

This modal redirects to "Resultado" with "cuotas", "cuota de manejo" and "interés" values according to the user selection on this form.

Insufficient founds is checked with "available" property.

Preview

juansedo commented 2 years ago

Cuotas min: 1 max: 96