IO-2327 parts ordering send by email

This commit is contained in:
swtmply
2023-06-22 06:43:45 +08:00
parent 7ae48db212
commit 12d07f8318
6 changed files with 80 additions and 5 deletions

View File

@@ -497,6 +497,7 @@ export function JobLinesComponent({
{selectedLines.length > 0 && ` (${selectedLines.length})`}
</Button>
<Button
data-cy="order-parts-button"
disabled={
(job && !job.converted) ||
(selectedLines.length > 0 ? false : true) ||
@@ -526,6 +527,7 @@ export function JobLinesComponent({
{selectedLines.length > 0 && ` (${selectedLines.length})`}
</Button>
<Button
data-cy="filter-parts-button"
onClick={() => {
setState((state) => ({
...state,
@@ -575,6 +577,7 @@ export function JobLinesComponent({
}
/>
<Table
data-cy="repair-data-table"
columns={columns}
rowKey="id"
loading={loading}

View File

@@ -74,7 +74,7 @@ export function PartsOrderModalComponent({
);
return (
<div>
<div data-cy="parts-order-modal">
<Form.Item name="returnfrombill" style={{ display: "none" }}>
<Input />
</Form.Item>
@@ -98,6 +98,7 @@ export function PartsOrderModalComponent({
</Form.Item>
<Form.Item
name="deliver_by"
id="deliver_by"
rules={[
{
required: true,
@@ -122,7 +123,7 @@ export function PartsOrderModalComponent({
label={t("parts_orders.labels.removefrompartsqueue")}
valuePropName="checked"
>
<Checkbox />
<Checkbox data-cy="part-order-checkbox-remove" />
</Form.Item>
)}
{OEConnection.treatment === "on" && !isReturn && (
@@ -131,7 +132,7 @@ export function PartsOrderModalComponent({
label={t("parts_orders.labels.is_quote")}
valuePropName="checked"
>
<Checkbox />
<Checkbox data-cy="part-order-checkbox-quote" />
</Form.Item>
)}

View File

@@ -358,7 +358,7 @@ export function PartsOrderModalContainer({
}
onCancel={() => toggleModalVisible()}
onOk={() => form.submit()}
okButtonProps={{ loading: saving }}
okButtonProps={{ loading: saving, "data-cy": "order-part-submit" }}
cancelButtonProps={{ loading: saving }}
destroyOnClose
width="75%"

View File

@@ -30,6 +30,8 @@ const VendorSearchSelect = (
return (
<Select
id="vendor"
className="ant-select-vendor"
ref={ref}
showSearch
value={option}