Added parts marking BOD-102
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<babeledit_project be_version="2.6.1" version="1.2">
|
||||
<babeledit_project version="1.2" be_version="2.6.1">
|
||||
<!--
|
||||
|
||||
BabelEdit project file
|
||||
@@ -7563,6 +7563,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>mark</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>postInvoices</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -11347,6 +11368,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>partsfilter</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
<description></description>
|
||||
<comment></comment>
|
||||
<default_text></default_text>
|
||||
<translations>
|
||||
<translation>
|
||||
<language>en-US</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>es-MX</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
<translation>
|
||||
<language>fr-CA</language>
|
||||
<approved>false</approved>
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>partssubletstotal</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
|
||||
@@ -149,11 +149,7 @@ export default function InvoiceFormComponent({
|
||||
form={form}
|
||||
responsibilityCenters={responsibilityCenters}
|
||||
/>
|
||||
{
|
||||
// <Form.Item name="upload" label="Upload">
|
||||
// <DocumentsUploadContainer jobId={form.getFieldValue("jobid")} />
|
||||
// </Form.Item>
|
||||
}
|
||||
|
||||
<Form.Item
|
||||
name='upload'
|
||||
label='Upload'
|
||||
|
||||
@@ -16,13 +16,13 @@ export default function InvoiceEnterModalLinesComponent({
|
||||
const { setFieldsValue, getFieldsValue } = form;
|
||||
|
||||
return (
|
||||
<Form.List name="invoicelines">
|
||||
<Form.List name='invoicelines'>
|
||||
{(fields, { add, remove }) => {
|
||||
return (
|
||||
<div className="invoice-form-lines-wrapper">
|
||||
<div className='invoice-form-lines-wrapper'>
|
||||
{fields.map((field, index) => (
|
||||
<Form.Item required={false} key={field.key}>
|
||||
<div className="invoice-form-line">
|
||||
<div className='invoice-form-line'>
|
||||
<Form.Item
|
||||
label={t("invoicelines.fields.jobline")}
|
||||
key={`${index}joblinename`}
|
||||
@@ -32,8 +32,7 @@ export default function InvoiceEnterModalLinesComponent({
|
||||
required: true,
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
>
|
||||
]}>
|
||||
<InvoiceLineSearchSelect
|
||||
options={lineData}
|
||||
onBlur={null}
|
||||
@@ -48,7 +47,7 @@ export default function InvoiceEnterModalLinesComponent({
|
||||
line_desc: opt.line_desc,
|
||||
actual_price: opt.cost,
|
||||
cost_center: opt.part_type
|
||||
? responsibilityCenters.defaults[
|
||||
? responsibilityCenters.defaults.costs[
|
||||
opt.part_type
|
||||
] || null
|
||||
: null,
|
||||
@@ -69,8 +68,7 @@ export default function InvoiceEnterModalLinesComponent({
|
||||
required: true,
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
>
|
||||
]}>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
@@ -82,8 +80,7 @@ export default function InvoiceEnterModalLinesComponent({
|
||||
required: true,
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
>
|
||||
]}>
|
||||
<CurrencyInput
|
||||
onBlur={(e) => {
|
||||
setFieldsValue({
|
||||
@@ -113,8 +110,7 @@ export default function InvoiceEnterModalLinesComponent({
|
||||
required: true,
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
>
|
||||
]}>
|
||||
<CurrencyInput />
|
||||
</Form.Item>
|
||||
<Form.Item shouldUpdate>
|
||||
@@ -143,11 +139,12 @@ export default function InvoiceEnterModalLinesComponent({
|
||||
required: true,
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}
|
||||
>
|
||||
]}>
|
||||
<Select style={{ width: "150px" }}>
|
||||
{responsibilityCenters.costs.map((item) => (
|
||||
<Select.Option key={item.name}>{item.name}</Select.Option>
|
||||
<Select.Option key={item.name}>
|
||||
{item.name}
|
||||
</Select.Option>
|
||||
))}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
@@ -155,25 +152,22 @@ export default function InvoiceEnterModalLinesComponent({
|
||||
label={t("invoicelines.fields.federal_tax_applicable")}
|
||||
key={`${index}fedtax`}
|
||||
initialValue={true}
|
||||
valuePropName="checked"
|
||||
name={[field.name, "applicable_taxes", "federal"]}
|
||||
>
|
||||
valuePropName='checked'
|
||||
name={[field.name, "applicable_taxes", "federal"]}>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("invoicelines.fields.state_tax_applicable")}
|
||||
key={`${index}statetax`}
|
||||
valuePropName="checked"
|
||||
name={[field.name, "applicable_taxes", "state"]}
|
||||
>
|
||||
valuePropName='checked'
|
||||
name={[field.name, "applicable_taxes", "state"]}>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("invoicelines.fields.local_tax_applicable")}
|
||||
key={`${index}localtax`}
|
||||
valuePropName="checked"
|
||||
name={[field.name, "applicable_taxes", "local"]}
|
||||
>
|
||||
valuePropName='checked'
|
||||
name={[field.name, "applicable_taxes", "local"]}>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
<DeleteFilled
|
||||
@@ -186,12 +180,11 @@ export default function InvoiceEnterModalLinesComponent({
|
||||
))}
|
||||
<Form.Item>
|
||||
<Button
|
||||
type="dashed"
|
||||
type='dashed'
|
||||
onClick={() => {
|
||||
add();
|
||||
}}
|
||||
style={{ width: "50%" }}
|
||||
>
|
||||
style={{ width: "50%" }}>
|
||||
{t("invoicelines.actions.newline")}
|
||||
</Button>
|
||||
</Form.Item>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Button, Input, Table } from "antd";
|
||||
import { Button, Input, Table, Dropdown, Menu } from "antd";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { connect } from "react-redux";
|
||||
@@ -96,6 +96,16 @@ export function JobLinesComponent({
|
||||
sorter: (a, b) => alphaSort(a.part_type, b.part_type),
|
||||
sortOrder:
|
||||
state.sortedInfo.columnKey === "part_type" && state.sortedInfo.order,
|
||||
filters: [
|
||||
{
|
||||
text: t("jobs.labels.partsfilter"),
|
||||
value: "parts",
|
||||
},
|
||||
],
|
||||
// specify the condition of filtering result
|
||||
// here is that finding the name started with `value`
|
||||
onFilter: (value, record) =>
|
||||
["PAN", "PAL", "PAA", "PAS", "PASL"].includes(record.part_type),
|
||||
ellipsis: true,
|
||||
editable: true,
|
||||
},
|
||||
@@ -217,6 +227,18 @@ export function JobLinesComponent({
|
||||
setState({ ...state, filteredInfo: filters, sortedInfo: sorter });
|
||||
};
|
||||
|
||||
const handleMark = (e) => {
|
||||
setSelectedLines(jobLines.filter((item) => item.part_type === e.key));
|
||||
};
|
||||
|
||||
const markMenu = (
|
||||
<Menu onClick={handleMark}>
|
||||
<Menu.Item key='PAA'>PAA</Menu.Item>
|
||||
<Menu.Item key='PAN'>PAN</Menu.Item>
|
||||
<Menu.Item key='PAL'>PAL</Menu.Item>
|
||||
</Menu>
|
||||
);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<PartsOrderModalContainer />
|
||||
@@ -244,6 +266,9 @@ export function JobLinesComponent({
|
||||
}}>
|
||||
{t("parts.actions.order")}
|
||||
</Button>
|
||||
<Dropdown overlay={markMenu} trigger={["click"]}>
|
||||
<Button>{t("jobs.actions.mark")}</Button>
|
||||
</Dropdown>
|
||||
<AllocationsBulkAssignmentContainer
|
||||
jobLines={selectedLines}
|
||||
refetch={refetch}
|
||||
@@ -278,14 +303,14 @@ export function JobLinesComponent({
|
||||
)}
|
||||
pagination={{ position: "top", defaultPageSize: 25 }}
|
||||
rowSelection={{
|
||||
// selectedRowKeys: selectedLines,
|
||||
selectedRowKeys: selectedLines.map((item) => item.id),
|
||||
onSelectAll: (selected, selectedRows, changeRows) => {
|
||||
setSelectedLines(selectedRows);
|
||||
},
|
||||
onSelect: (record, selected, selectedRows, nativeEvent) =>
|
||||
setSelectedLines(selectedRows),
|
||||
}}
|
||||
columns={columns.map((item) => ({ ...item }))}
|
||||
columns={columns}
|
||||
rowKey='id'
|
||||
dataSource={jobLines}
|
||||
onChange={handleTableChange}
|
||||
|
||||
@@ -30,6 +30,7 @@ export const QUERY_BODYSHOP = gql`
|
||||
invoice_tax_rates
|
||||
inhousevendorid
|
||||
accountingconfig
|
||||
appt_length
|
||||
employees {
|
||||
id
|
||||
first_name
|
||||
|
||||
@@ -509,6 +509,7 @@
|
||||
"export": "Export",
|
||||
"gotojob": "Go to Job",
|
||||
"manualnew": "Create New Job Manually",
|
||||
"mark": "Mark",
|
||||
"postInvoices": "Post Invoices",
|
||||
"printCenter": "Print Center",
|
||||
"reconcile": "Reconcile",
|
||||
@@ -698,6 +699,7 @@
|
||||
"override_header": "Override estimate header on import?",
|
||||
"paint_mat": "Paint Materials",
|
||||
"parts": "Parts",
|
||||
"partsfilter": "Parts Only",
|
||||
"partssubletstotal": "Parts & Sublets Total",
|
||||
"partstotal": "Parts Total",
|
||||
"rates": "Rates",
|
||||
|
||||
@@ -509,6 +509,7 @@
|
||||
"export": "",
|
||||
"gotojob": "",
|
||||
"manualnew": "",
|
||||
"mark": "",
|
||||
"postInvoices": "Contabilizar facturas",
|
||||
"printCenter": "Centro de impresión",
|
||||
"reconcile": "",
|
||||
@@ -698,6 +699,7 @@
|
||||
"override_header": "¿Anular encabezado estimado al importar?",
|
||||
"paint_mat": "",
|
||||
"parts": "Partes",
|
||||
"partsfilter": "",
|
||||
"partssubletstotal": "",
|
||||
"partstotal": "",
|
||||
"rates": "Tarifas",
|
||||
|
||||
@@ -509,6 +509,7 @@
|
||||
"export": "",
|
||||
"gotojob": "",
|
||||
"manualnew": "",
|
||||
"mark": "",
|
||||
"postInvoices": "Poster des factures",
|
||||
"printCenter": "Centre d'impression",
|
||||
"reconcile": "",
|
||||
@@ -698,6 +699,7 @@
|
||||
"override_header": "Remplacer l'en-tête d'estimation à l'importation?",
|
||||
"paint_mat": "",
|
||||
"parts": "les pièces",
|
||||
"partsfilter": "",
|
||||
"partssubletstotal": "",
|
||||
"partstotal": "",
|
||||
"rates": "Les taux",
|
||||
|
||||
Reference in New Issue
Block a user