UI Updates & Bill Entering

This commit is contained in:
Patrick Fic
2021-03-31 17:49:43 -07:00
parent 3c7ce84be2
commit 8b5ea08cae
31 changed files with 953 additions and 704 deletions

View File

@@ -1,4 +1,4 @@
import { Form, Input, Switch } from "antd";
import { Col, Form, Input, Row, Switch } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
import NotesPresetButton from "../notes-preset-button/notes-preset-button.component";
@@ -7,37 +7,45 @@ export default function NoteUpsertModalComponent({ form }) {
const { t } = useTranslation();
return (
<div>
<Form.Item
label={t("notes.fields.critical")}
name="critical"
valuePropName="checked"
>
<Switch />
</Form.Item>
<Form.Item
label={t("notes.fields.private")}
name="private"
valuePropName="checked"
>
<Switch />
</Form.Item>
<Form.Item
label={t("notes.fields.text")}
name="text"
rules={[
{
required: true,
message: t("general.validation.required"),
},
]}
>
<Input.TextArea
rows={8}
placeholder={t("notes.labels.newnoteplaceholder")}
/>
</Form.Item>
<NotesPresetButton form={form} />
</div>
<Row gutter={[16, 16]}>
<Col span={8}>
<Form.Item
label={t("notes.fields.critical")}
name="critical"
valuePropName="checked"
>
<Switch />
</Form.Item>
</Col>
<Col span={8}>
<Form.Item
label={t("notes.fields.private")}
name="private"
valuePropName="checked"
>
<Switch />
</Form.Item>
</Col>
<Col span={8}>
<NotesPresetButton form={form} />
</Col>
<Col span={24}>
<Form.Item
label={t("notes.fields.text")}
name="text"
rules={[
{
required: true,
message: t("general.validation.required"),
},
]}
>
<Input.TextArea
rows={8}
placeholder={t("notes.labels.newnoteplaceholder")}
/>
</Form.Item>
</Col>
</Row>
);
}

View File

@@ -90,7 +90,12 @@ export function NoteUpsertModalContainer({
}}
destroyOnClose
>
<Form form={form} onFinish={handleFinish} initialValues={existingNote}>
<Form
form={form}
onFinish={handleFinish}
initialValues={existingNote}
layout="vertical"
>
<NoteUpsertModalComponent form={form} />
</Form>
</Modal>