Resolve non-updated form on bill enter. IO-739

This commit is contained in:
Patrick Fic
2021-03-05 11:20:03 -08:00
parent 89383dccff
commit 9a8e07d2e5
6 changed files with 116 additions and 127 deletions

View File

@@ -1,6 +1,6 @@
import { Col, Row, Select, Tag } from "antd";
import React, { useEffect, useState, forwardRef } from "react";
import { HeartOutlined } from "@ant-design/icons";
import { Select, Tag } from "antd";
import React, { forwardRef, useEffect, useState } from "react";
const { Option } = Select;
//To be used as a form element only.
@@ -45,31 +45,22 @@ const VendorSearchSelect = (
name={o.name}
discount={o.discount}
>
<Row>
<Col span={16}>{o.name}</Col>
<Col span={4}>
<HeartOutlined />
</Col>
{o.discount && (
<Col span={4}>
<Tag color="green">{`${o.discount * 100}%`}</Tag>
</Col>
)}
</Row>
<div className="imex-flex-row">
<div style={{ flex: 1 }}>{o.name}</div>
<HeartOutlined />
<Tag color="green">{`${o.discount * 100}%`}</Tag>
</div>
</Option>
))
: null}
{options
? options.map((o) => (
<Option key={o.id} value={o.id} name={o.name} discount={o.discount}>
<Row>
<Col span={20}>{o.name}</Col>
{o.discount && (
<Col span={4}>
<Tag color="green">{`${o.discount * 100}%`}</Tag>
</Col>
)}
</Row>
<div className="imex-flex-row" style={{ width: "100%" }}>
<div style={{ flex: 1 }}>{o.name}</div>
<Tag color="green">{`${o.discount * 100}%`}</Tag>
</div>
</Option>
))
: null}