Minor bug fixes. BOD-223 BOD-226

This commit is contained in:
Patrick Fic
2020-08-04 10:16:04 -07:00
parent 69698a2976
commit 470f69b11c
2 changed files with 11 additions and 9 deletions

View File

@@ -25,23 +25,23 @@ const EmployeeSearchSelect = (
width: 400, width: 400,
}} }}
onChange={setOption} onChange={setOption}
optionFilterProp='search' optionFilterProp="search"
onSelect={onSelect} onSelect={onSelect}
onBlur={onBlur}> onBlur={onBlur}
>
{options {options
? options.map((o) => ( ? options.map((o) => (
<Option <Option
key={o.id} key={o.id}
value={o.id} value={o.id}
search={`${o.employee_number} ${o.first_name} ${o.last_name}`} search={`${o.employee_number} ${o.first_name} ${o.last_name}`}
discount={o.discount}> discount={o.discount}
>
<div style={{ display: "flex" }}> <div style={{ display: "flex" }}>
{`${o.employee_number} ${o.first_name} ${o.last_name}`} {`${o.employee_number} ${o.first_name} ${o.last_name}`}
<Tag color='blue'>{o.cost_center}</Tag> <Tag color="blue">{o.cost_center}</Tag>
<Tag color='red'>
<CurrencyFormatter>{o.base_rate}</CurrencyFormatter> <Tag color="green">
</Tag>
<Tag color='green'>
{o.flat_rate {o.flat_rate
? t("timetickets.labels.flat_rate") ? t("timetickets.labels.flat_rate")
: t("timetickets.labels.straight_time")} : t("timetickets.labels.straight_time")}

View File

@@ -68,6 +68,7 @@ export function NoteUpsertModalContainer({
}, },
}).then((r) => { }).then((r) => {
if (refetch) refetch(); if (refetch) refetch();
form.resetFields();
toggleModalVisible(); toggleModalVisible();
notification["success"]({ notification["success"]({
message: t("notes.successes.create"), message: t("notes.successes.create"),
@@ -87,7 +88,8 @@ export function NoteUpsertModalContainer({
onCancel={() => { onCancel={() => {
toggleModalVisible(); toggleModalVisible();
}} }}
destroyOnClose> destroyOnClose
>
<Form form={form} onFinish={handleFinish} initialValues={existingNote}> <Form form={form} onFinish={handleFinish} initialValues={existingNote}>
<NoteUpsertModalComponent /> <NoteUpsertModalComponent />
</Form> </Form>