diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 9bdee7699..6ce263e40 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -8238,6 +8238,48 @@ labels + + agreement + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + + + availablecars + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + convertform @@ -8306,6 +8348,27 @@ + + driverinformation + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + noteconvertedfrom false @@ -8348,6 +8411,27 @@ + + rates + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + vehicle false diff --git a/client/src/components/audit-trail-list/audit-trail-list.component.jsx b/client/src/components/audit-trail-list/audit-trail-list.component.jsx index c2d5d01c5..1858085d6 100644 --- a/client/src/components/audit-trail-list/audit-trail-list.component.jsx +++ b/client/src/components/audit-trail-list/audit-trail-list.component.jsx @@ -75,7 +75,7 @@ export default function AuditTrailListComponent({ loading, data }) { {...formItemLayout} loading={loading} pagination={{ position: "top", defaultPageSize: 25 }} - columns={columns.map((item) => ({ ...item }))} + columns={columns} rowKey="id" dataSource={data} onChange={handleTableChange} diff --git a/client/src/components/bill-detail-edit/bill-detail-edit.container.jsx b/client/src/components/bill-detail-edit/bill-detail-edit.container.jsx index 2b4b83541..6d763d311 100644 --- a/client/src/components/bill-detail-edit/bill-detail-edit.container.jsx +++ b/client/src/components/bill-detail-edit/bill-detail-edit.container.jsx @@ -1,5 +1,5 @@ import { useMutation, useQuery } from "@apollo/client"; -import { Button, Form, Popconfirm } from "antd"; +import { Button, Form, PageHeader, Popconfirm } from "antd"; import moment from "moment"; import queryString from "query-string"; import React, { useEffect, useState } from "react"; @@ -112,27 +112,36 @@ export default function BillDetailEditcontainer() { return ( - form.submit()} - onCancel={() => setVisible(false)} - okButtonProps={{ loading: updateLoading }} - title={t("bills.labels.editadjwarning")} - > - - + form.submit()} + onCancel={() => setVisible(false)} + okButtonProps={{ loading: updateLoading }} + title={t("bills.labels.editadjwarning")} + > + + + } + />
( + setState({ ...state, search: e.target.value })} /> - )} - pagination={{ position: "top" }} - columns={columns.map((item) => ({ ...item }))} - rowKey="id" - dataSource={filteredData} - onChange={handleTableChange} - rowSelection={{ - onSelect: handleSelect, - type: "radio", - selectedRowKeys: [selectedCar], - }} - onRow={(record, rowIndex) => { - return { - onClick: (event) => { - handleSelect(record); - }, - }; - }} - /> + } + > + { + return { + onClick: (event) => { + handleSelect(record); + }, + }; + }} + /> + ); } diff --git a/client/src/components/contract-cars/contract-cars.container.jsx b/client/src/components/contract-cars/contract-cars.container.jsx index eeed7bce0..f4689aed2 100644 --- a/client/src/components/contract-cars/contract-cars.container.jsx +++ b/client/src/components/contract-cars/contract-cars.container.jsx @@ -15,10 +15,6 @@ export default function ContractCarsContainer({ selectedCarState, form }) { const handleSelect = (record) => { setSelectedCar(record.id); - console.log( - "🚀 ~ file: contract-cars.container.jsx ~ line 19 ~ record", - record - ); form.setFieldsValue({ kmstart: record.mileage, dailyrate: record.dailycost, @@ -28,13 +24,11 @@ export default function ContractCarsContainer({ selectedCarState, form }) { if (error) return ; return ( -
- -
+ ); } diff --git a/client/src/components/contract-courtesy-car-block/contract-courtesy-car-block.component.jsx b/client/src/components/contract-courtesy-car-block/contract-courtesy-car-block.component.jsx index 43ae5f8bb..4c251405d 100644 --- a/client/src/components/contract-courtesy-car-block/contract-courtesy-car-block.component.jsx +++ b/client/src/components/contract-courtesy-car-block/contract-courtesy-car-block.component.jsx @@ -1,25 +1,31 @@ +import { Card } from "antd"; import React from "react"; import { useTranslation } from "react-i18next"; -import { Descriptions, Card } from "antd"; import { Link } from "react-router-dom"; +import DataLabel from "../data-label/data-label.component"; + export default function ContractCourtesyCarBlock({ courtesyCar }) { const { t } = useTranslation(); return ( - - - + +
+ {(courtesyCar && courtesyCar.fleetnumber) || ""} - - + + {(courtesyCar && courtesyCar.plate) || ""} - - + + {`${(courtesyCar && courtesyCar.year) || ""} ${ (courtesyCar && courtesyCar.make) || "" } ${(courtesyCar && courtesyCar.model) || ""}`} - - + +
); diff --git a/client/src/components/contract-form/contract-form.component.jsx b/client/src/components/contract-form/contract-form.component.jsx index 8454660cf..1cf6e81cb 100644 --- a/client/src/components/contract-form/contract-form.component.jsx +++ b/client/src/components/contract-form/contract-form.component.jsx @@ -12,6 +12,7 @@ import InputPhone, { } from "../form-items-formatted/phone-form-item.component"; import LayoutFormRow from "../layout-form-row/layout-form-row.component"; import ContractFormJobPrefill from "./contract-form-job-prefill.component"; + export default function ContractFormComponent({ form, create = false, @@ -83,10 +84,11 @@ export default function ContractFormComponent({ )} - + {create ? null : ( - + )} - - {selectedJobState && ( -
- -
- )} - -
- +
+ + {selectedJobState && ( +
+ +
+ )} + +
+
+ - + diff --git a/client/src/components/contract-job-block/contract-job-block.component.jsx b/client/src/components/contract-job-block/contract-job-block.component.jsx index 9878235dc..64732a1f0 100644 --- a/client/src/components/contract-job-block/contract-job-block.component.jsx +++ b/client/src/components/contract-job-block/contract-job-block.component.jsx @@ -1,28 +1,33 @@ +import { Card } from "antd"; import React from "react"; import { useTranslation } from "react-i18next"; -import { Descriptions, Card } from "antd"; import { Link } from "react-router-dom"; +import DataLabel from "../data-label/data-label.component"; export default function ContractJobBlock({ job }) { const { t } = useTranslation(); return ( - - - + +
+ {(job && job.ro_number) || ""} - - + + {`${(job && job.v_model_yr) || ""} ${ (job && job.v_make_desc) || "" } ${(job && job.v_model_desc) || ""}`} - - + + {`${(job && job.ownr_fn) || ""} ${(job && job.ownr_ln) || ""} ${ (job && job.ownr_co_nm) || "" }`} - - + +
); diff --git a/client/src/components/contract-jobs/contract-jobs.component.jsx b/client/src/components/contract-jobs/contract-jobs.component.jsx index 88a7e7fc5..416274989 100644 --- a/client/src/components/contract-jobs/contract-jobs.component.jsx +++ b/client/src/components/contract-jobs/contract-jobs.component.jsx @@ -1,4 +1,4 @@ -import { Input, Table } from "antd"; +import { Card, Input, Table } from "antd"; import React, { useMemo, useState } from "react"; import { useTranslation } from "react-i18next"; import { alphaSort } from "../../utils/sorters"; @@ -162,44 +162,48 @@ export default function ContractsJobsComponent({ const defaultCurrent = useMemo(() => { const page = Math.floor( - (filteredData.findIndex((v) => v.id === selectedJob) || 0) / 3 + (filteredData.findIndex((v) => v.id === selectedJob) || 0) / 10 ) + 1; - + if (page === 0) return 1; return page; }, [filteredData, selectedJob]); if (loading) return ; return ( -
( + setState({ ...state, search: e.target.value })} /> - )} - pagination={{ - position: "top", - defaultPageSize: 3, - defaultCurrent: defaultCurrent, - }} - columns={columns} - rowKey="id" - dataSource={filteredData} - onChange={handleTableChange} - rowSelection={{ - onSelect: handleSelect, - type: "radio", - selectedRowKeys: [selectedJob], - }} - onRow={(record, rowIndex) => { - return { - onClick: (event) => { - handleSelect(record); - }, - }; - }} - /> + } + > +
{ + return { + onClick: (event) => { + handleSelect(record); + }, + }; + }} + /> + ); } diff --git a/client/src/components/contract-jobs/contract-jobs.container.jsx b/client/src/components/contract-jobs/contract-jobs.container.jsx index a446e1282..f90c0f0fc 100644 --- a/client/src/components/contract-jobs/contract-jobs.container.jsx +++ b/client/src/components/contract-jobs/contract-jobs.container.jsx @@ -25,14 +25,12 @@ export function ContractJobsContainer({ selectedJobState, bodyshop }) { if (error) return ; return ( -
- -
+ ); } export default connect(mapStateToProps, null)(ContractJobsContainer); diff --git a/client/src/components/contracts-list/contracts-list.component.jsx b/client/src/components/contracts-list/contracts-list.component.jsx index 2e9bc896b..1b8227ff2 100644 --- a/client/src/components/contracts-list/contracts-list.component.jsx +++ b/client/src/components/contracts-list/contracts-list.component.jsx @@ -1,5 +1,5 @@ import { SyncOutlined } from "@ant-design/icons"; -import { Button, Input, Table } from "antd"; +import { Button, Card, Input, Space, Table } from "antd"; import queryString from "query-string"; import React, { useState } from "react"; import { useTranslation } from "react-i18next"; @@ -123,38 +123,39 @@ export default function ContractsList({ loading, contracts, refetch, total }) { }; return ( -
( -
+ -
- -
-
- { - search.search = value; - history.push({ search: queryString.stringify(search) }); - }} - /> -
-
- )} - scroll={{ x: "50%", y: "40rem" }} - pagination={{ - position: "top", - pageSize: 25, - current: parseInt(page || 1), - total: total, - }} - columns={columns} - rowKey="id" - dataSource={contracts} - onChange={handleTableChange} - /> + + + + { + search.search = value; + history.push({ search: queryString.stringify(search) }); + }} + /> + + } + > +
+ ); } diff --git a/client/src/components/courtesy-car-fuel-select/courtesy-car-fuel-select.component.jsx b/client/src/components/courtesy-car-fuel-select/courtesy-car-fuel-select.component.jsx index 1e93405c2..2f9226b83 100644 --- a/client/src/components/courtesy-car-fuel-select/courtesy-car-fuel-select.component.jsx +++ b/client/src/components/courtesy-car-fuel-select/courtesy-car-fuel-select.component.jsx @@ -27,6 +27,14 @@ const CourtesyCarFuelComponent = (props, ref) => { }, }; - return ; + return ( + + ); }; export default forwardRef(CourtesyCarFuelComponent); diff --git a/client/src/components/courtesy-cars-list/courtesy-cars-list.component.jsx b/client/src/components/courtesy-cars-list/courtesy-cars-list.component.jsx index 9d2bc1fdc..98d5b06bc 100644 --- a/client/src/components/courtesy-cars-list/courtesy-cars-list.component.jsx +++ b/client/src/components/courtesy-cars-list/courtesy-cars-list.component.jsx @@ -143,7 +143,7 @@ export default function CourtesyCarsList({ loading, courtesycars, refetch }) {
({ ...item }))} + columns={columns} rowKey="id" dataSource={tableData} onChange={handleTableChange} diff --git a/client/src/components/job-totals-table/job-totals-table.component.jsx b/client/src/components/job-totals-table/job-totals-table.component.jsx index 2159339f6..ab660b784 100644 --- a/client/src/components/job-totals-table/job-totals-table.component.jsx +++ b/client/src/components/job-totals-table/job-totals-table.component.jsx @@ -39,7 +39,7 @@ export function JobsTotalsTableComponent({ jobRO, job }) { return (
- +
diff --git a/client/src/components/jobs-create-owner-info/jobs-create-owner-info.component.jsx b/client/src/components/jobs-create-owner-info/jobs-create-owner-info.component.jsx index d7e96772a..0b75e6826 100644 --- a/client/src/components/jobs-create-owner-info/jobs-create-owner-info.component.jsx +++ b/client/src/components/jobs-create-owner-info/jobs-create-owner-info.component.jsx @@ -1,6 +1,7 @@ -import { Col, Row, Typography } from "antd"; -import React from "react"; +import { Checkbox, Col, Row } from "antd"; +import React, { useContext } from "react"; import { useTranslation } from "react-i18next"; +import JobCreateContext from "../../pages/jobs-create/jobs-create.context"; import JobsCreateOwnerInfoNewComponent from "./jobs-create-owner-info.new.component"; import JobsCreateOwnerInfoSearchComponent from "./jobs-create-owner-info.search.component"; @@ -11,12 +12,30 @@ const colSpan = { export default function JobsCreateOwnerInfoComponent({ loading, owners }) { const { t } = useTranslation(); + const [state, setState] = useContext(JobCreateContext); + return (
- - {t("jobs.labels.create.ownerinfo")} - - + +
+ { + setState({ + ...state, + owner: { + ...state.owner, + new: !state.owner.new, + selectedid: null, + }, + }); + }} + > + {t("jobs.labels.create.newowner")} + + + - { - setState({ - ...state, - owner: { - ...state.owner, - new: !state.owner.new, - selectedid: null, - }, - }); - }} - > - {t("jobs.labels.create.newowner")} - - { - return ( -
- { - setState({ - ...state, - owner: { ...state.owner, search: value }, - }); - }} - enterButton - /> -
- ); - }} - scroll={{ x: true }} - pagination={{ position: "top" }} - columns={columns} - rowKey="id" - dataSource={owners} - onChange={handleTableChange} - rowSelection={{ - onSelect: (props) => { - setState({ - ...state, - owner: { ...state.owner, new: false, selectedid: props.id }, - }); - }, - type: "radio", - selectedRowKeys: [state.owner.selectedid], - }} - onRow={(record, rowIndex) => { - return { - onClick: (event) => { - if (record) { - if (record.id) { - setState({ - ...state, - owner: { - ...state.owner, - new: false, - selectedid: record.id, - }, - }); - - return; - } - } + { setState({ ...state, - owner: { ...state.owner, selectedid: null }, + owner: { ...state.owner, search: value }, + }); + }} + enterButton + /> + } + > +
{ + setState({ + ...state, + owner: { ...state.owner, new: false, selectedid: props.id }, }); }, - }; - }} - /> + type: "radio", + selectedRowKeys: [state.owner.selectedid], + }} + onRow={(record, rowIndex) => { + return { + onClick: (event) => { + if (record) { + if (record.id) { + setState({ + ...state, + owner: { + ...state.owner, + new: false, + selectedid: record.id, + }, + }); + + return; + } + } + setState({ + ...state, + owner: { ...state.owner, selectedid: null }, + }); + }, + }; + }} + /> + ); } diff --git a/client/src/components/jobs-create-vehicle-info/jobs-create-vehicle-info.component.jsx b/client/src/components/jobs-create-vehicle-info/jobs-create-vehicle-info.component.jsx index c964ffb7c..583418c5f 100644 --- a/client/src/components/jobs-create-vehicle-info/jobs-create-vehicle-info.component.jsx +++ b/client/src/components/jobs-create-vehicle-info/jobs-create-vehicle-info.component.jsx @@ -1,20 +1,56 @@ -import { Col, Row, Typography } from "antd"; -import React from "react"; -import { useTranslation } from "react-i18next"; +import { Checkbox, Col, Row } from "antd"; +import React, { useContext } from "react"; +import JobCreateContext from "../../pages/jobs-create/jobs-create.context"; import JobsCreateVehicleInfoNewComponent from "./jobs-create-vehicle-info.new.component"; import JobsCreateVehicleInfoSearchComponent from "./jobs-create-vehicle-info.search.component"; - +import { useTranslation } from "react-i18next"; const colSpan = { sm: { span: 24 }, lg: { span: 12 }, }; export default function JobsCreateVehicleInfoComponent({ loading, vehicles }) { + const [state, setState] = useContext(JobCreateContext); const { t } = useTranslation(); return (
- {t("jobs.labels.create.vehicleinfo")} - + +
+ { + setState({ + ...state, + vehicle: { + ...state.vehicle, + none: false, + new: !state.vehicle.new, + selectedid: null, + }, + }); + }} + > + {t("jobs.labels.create.newvehicle")} + + { + setState({ + ...state, + vehicle: { + ...state.vehicle, + new: false, + none: !state.vehicle.none, + selectedid: null, + }, + }); + }} + > + {t("jobs.labels.create.novehicle")} + + - { - setState({ - ...state, - vehicle: { - ...state.vehicle, - none: false, - new: !state.vehicle.new, - selectedid: null, - }, - }); - }} - > - {t("jobs.labels.create.newvehicle")} - - { - setState({ - ...state, - vehicle: { - ...state.vehicle, - new: false, - none: !state.vehicle.none, - selectedid: null, - }, - }); - }} - > - {t("jobs.labels.create.novehicle")} - - { - return ( -
- { - setState({ - ...state, - vehicle: { ...state.vehicle, search: value }, - }); - }} - enterButton - /> -
- ); - }} - scroll={{ x: true }} - pagination={{ position: "top" }} - columns={columns} - rowKey="id" - dataSource={vehicles} - onChange={handleTableChange} - rowSelection={{ - onSelect: (props) => { - setState({ - ...state, - vehicle: { - ...state.vehicle, - none: false, - new: false, - selectedid: props.id, - vehicleObj: props, - }, - }); - }, - type: "radio", - selectedRowKeys: [state.vehicle.selectedid], - }} - onRow={(record, rowIndex) => { - return { - onClick: (event) => { - if (record) { - if (record.id) { - setState({ - ...state, - vehicle: { - ...state.vehicle, - none: false, - new: false, - selectedid: record.id, - vehicleObj: record, - }, - }); - - return; - } - } + + { + setState({ + ...state, + vehicle: { ...state.vehicle, search: value }, + }); + }} + enterButton + /> + + } + > +
{ setState({ ...state, - vehicle: { ...state.vehicle, selectedid: null, vehicleObj: null }, + vehicle: { + ...state.vehicle, + none: false, + new: false, + selectedid: props.id, + vehicleObj: props, + }, }); }, - }; - }} - /> + type: "radio", + selectedRowKeys: [state.vehicle.selectedid], + }} + onRow={(record, rowIndex) => { + return { + onClick: (event) => { + if (record) { + if (record.id) { + setState({ + ...state, + vehicle: { + ...state.vehicle, + none: false, + new: false, + selectedid: record.id, + vehicleObj: record, + }, + }); + + return; + } + } + setState({ + ...state, + vehicle: { + ...state.vehicle, + selectedid: null, + vehicleObj: null, + }, + }); + }, + }; + }} + /> + ); } diff --git a/client/src/components/jobs-detail-header/jobs-detail-header.component.jsx b/client/src/components/jobs-detail-header/jobs-detail-header.component.jsx index ceff24182..4b5901ad9 100644 --- a/client/src/components/jobs-detail-header/jobs-detail-header.component.jsx +++ b/client/src/components/jobs-detail-header/jobs-detail-header.component.jsx @@ -142,46 +142,6 @@ export function JobsDetailHeader({ job, bodyshop }) { ); - - // return ( - // , - // , - // - // {t("jobs.labels.inproduction")} - // , - // - // {job.clm_total} - // / - // {job.owner_owing} - // , - // ]} - // extra={menuExtra} - // > - //
- // {(job.inproduction || jobInPostProduction) && ( - // <> - //
- //
- // {t("jobs.fields.production_vars.note")} - //
- // - //
- // - // - // )} - - // - //
- //
- // ); } export default connect(mapStateToProps, mapDispatchToProps)(JobsDetailHeader); diff --git a/client/src/components/jobs-find-modal/jobs-find-modal.component.jsx b/client/src/components/jobs-find-modal/jobs-find-modal.component.jsx index 1c941d253..48eedd45f 100644 --- a/client/src/components/jobs-find-modal/jobs-find-modal.component.jsx +++ b/client/src/components/jobs-find-modal/jobs-find-modal.component.jsx @@ -156,7 +156,7 @@ export default function JobsFindModalComponent({ )} pagination={{ position: "bottom" }} - columns={columns.map((item) => ({ ...item }))} + columns={columns} rowKey="id" loading={jobsListLoading} dataSource={jobsList} diff --git a/client/src/components/jobs-list-paginated/jobs-list-paginated.component.jsx b/client/src/components/jobs-list-paginated/jobs-list-paginated.component.jsx index 8f16f1d53..2e8dc3665 100644 --- a/client/src/components/jobs-list-paginated/jobs-list-paginated.component.jsx +++ b/client/src/components/jobs-list-paginated/jobs-list-paginated.component.jsx @@ -1,5 +1,5 @@ import { SyncOutlined } from "@ant-design/icons"; -import { Button, Input, Table } from "antd"; +import { Button, Card, Input, Space, Table } from "antd"; import queryString from "query-string"; import React from "react"; import { useTranslation } from "react-i18next"; @@ -191,7 +191,23 @@ export function JobsList({ bodyshop, refetch, loading, jobs, total }) { }; return ( -
+ + + { + search.search = value; + history.push({ search: queryString.stringify(search) }); + }} + enterButton + /> + + } + >
{ - return ( -
- - { - search.search = value; - history.push({ search: queryString.stringify(search) }); - }} - enterButton - /> -
- ); - }} /> - + ); } export default connect(mapStateToProps, mapDispatchToProps)(JobsList); diff --git a/client/src/components/owner-find-modal/owner-find-modal.component.jsx b/client/src/components/owner-find-modal/owner-find-modal.component.jsx index 31702a7a5..9207a24d3 100644 --- a/client/src/components/owner-find-modal/owner-find-modal.component.jsx +++ b/client/src/components/owner-find-modal/owner-find-modal.component.jsx @@ -68,7 +68,7 @@ export default function OwnerFindModalComponent({
t("owners.labels.existing_owners")} pagination={{ position: "bottom" }} - columns={columns.map((item) => ({ ...item }))} + columns={columns} rowKey="id" loading={ownersListLoading} dataSource={ownersList} diff --git a/client/src/components/production-board-filters/production-board-filters.component.jsx b/client/src/components/production-board-filters/production-board-filters.component.jsx index 68fab1b6d..017efed88 100644 --- a/client/src/components/production-board-filters/production-board-filters.component.jsx +++ b/client/src/components/production-board-filters/production-board-filters.component.jsx @@ -1,4 +1,4 @@ -import { Input } from "antd"; +import { Input, PageHeader, Space, Spin } from "antd"; import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; @@ -17,25 +17,35 @@ export default connect( mapDispatchToProps )(ProductionBoardFilters); -export function ProductionBoardFilters({ bodyshop, filter, setFilter }) { +export function ProductionBoardFilters({ + bodyshop, + filter, + setFilter, + loading, +}) { const { t } = useTranslation(); return ( -
- { - setFilter({ ...filter, search: e.target.value }); - }} - /> - e.active)} - value={filter.employeeId} - placeholder={t("production.labels.employeesearch")} - onChange={(emp) => setFilter({ ...filter, employeeId: emp })} - allowClear - /> -
+ + {loading && } + { + setFilter({ ...filter, search: e.target.value }); + }} + /> + e.active)} + value={filter.employeeId} + placeholder={t("production.labels.employeesearch")} + onChange={(emp) => setFilter({ ...filter, employeeId: emp })} + allowClear + /> + + } + > ); } diff --git a/client/src/components/production-board-kanban-card/production-board-card.styles.scss b/client/src/components/production-board-kanban-card/production-board-card.styles.scss index ad85d8be4..4b70517a4 100644 --- a/client/src/components/production-board-kanban-card/production-board-card.styles.scss +++ b/client/src/components/production-board-kanban-card/production-board-card.styles.scss @@ -1,3 +1,9 @@ .imex-kanban-card { padding: 0px !important; + .ant-card-body { + padding: 0.8rem; + } + .ant-card-head { + padding: 0rem 0.8rem; + } } diff --git a/client/src/components/production-board-kanban-card/production-board-kanban-card.component.jsx b/client/src/components/production-board-kanban-card/production-board-kanban-card.component.jsx index caf925831..cedfb4d38 100644 --- a/client/src/components/production-board-kanban-card/production-board-kanban-card.component.jsx +++ b/client/src/components/production-board-kanban-card/production-board-kanban-card.component.jsx @@ -24,7 +24,7 @@ export default function ProductionBoardCard(technician, card) { - + ( -
- - - - setSearchText(e.target.value)} - placeholder={t("general.labels.search")} - value={searchText} - /> -
- ); + const tableTitle = () =>
; // const handleSelectRecord = (record) => { // if (selected !== record.id) { @@ -139,6 +131,29 @@ export function ProductionListTable({ return (
+ + + + + setSearchText(e.target.value)} + placeholder={t("general.labels.search")} + value={searchText} + /> + + } + />
{ - // // const classes = []; - // // if (!!record.scheduled_completion) { - // // if (new Date(record.scheduled_completion) - Now < OneCalendarDay) - // // classes.push("production-completion-1"); - // // } - // // return classes.join(" "); - // }} /> diff --git a/client/src/components/production-list-table/production-list-table.container.jsx b/client/src/components/production-list-table/production-list-table.container.jsx index cdfff68a3..9831dfa36 100644 --- a/client/src/components/production-list-table/production-list-table.container.jsx +++ b/client/src/components/production-list-table/production-list-table.container.jsx @@ -16,11 +16,10 @@ const mapStateToProps = createStructuredSelector({ export default connect(mapStateToProps, null)(ProductionListTableContainer); export function ProductionListTableContainer({ bodyshop, technician }) { - const { loading, data } = useSubscription(SUBSCRIPTION_JOBS_IN_PRODUCTION, { - // variables: { - // statusList: bodyshop.md_ro_statuses.production_statuses || [], - // }, - }); + const { loading, data } = useSubscription( + SUBSCRIPTION_JOBS_IN_PRODUCTION, + {} + ); const columnState = useState( (bodyshop.production_config && diff --git a/client/src/components/profile-shops/profile-shops.component.jsx b/client/src/components/profile-shops/profile-shops.component.jsx index edd1f211b..99acbd032 100644 --- a/client/src/components/profile-shops/profile-shops.component.jsx +++ b/client/src/components/profile-shops/profile-shops.component.jsx @@ -48,7 +48,7 @@ export default function ProfileShopsComponent({ )} loading={loading} - columns={columns.map((item) => ({ ...item }))} + columns={columns} rowKey="id" dataSource={data} /> diff --git a/client/src/components/schedule-job-modal/schedule-job-modal.component.jsx b/client/src/components/schedule-job-modal/schedule-job-modal.component.jsx index 41106603a..759a56d35 100644 --- a/client/src/components/schedule-job-modal/schedule-job-modal.component.jsx +++ b/client/src/components/schedule-job-modal/schedule-job-modal.component.jsx @@ -63,7 +63,7 @@ export function ScheduleJobModalComponent({ }; return ( - + ({ ...item }))} + columns={columns} rowKey="id" dataSource={employees} rowSelection={{ diff --git a/client/src/components/shop-users/shop-users.component.jsx b/client/src/components/shop-users/shop-users.component.jsx index 39595cfdb..4d5af6b82 100644 --- a/client/src/components/shop-users/shop-users.component.jsx +++ b/client/src/components/shop-users/shop-users.component.jsx @@ -49,7 +49,7 @@ export default function ShopInfoUsersComponent() {
({ ...item }))} + columns={columns} rowKey="id" dataSource={data && data.associations} /> diff --git a/client/src/components/ticket-tickets-dates-selector/time-tickets-dates-selector.component.jsx b/client/src/components/ticket-tickets-dates-selector/time-tickets-dates-selector.component.jsx index 8aa7f3e7f..66afbda58 100644 --- a/client/src/components/ticket-tickets-dates-selector/time-tickets-dates-selector.component.jsx +++ b/client/src/components/ticket-tickets-dates-selector/time-tickets-dates-selector.component.jsx @@ -33,15 +33,13 @@ export default function TimeTicketsDatesSelector() { }; return ( -
- -
+ ); } diff --git a/client/src/pages/bills/bills.page.component.jsx b/client/src/pages/bills/bills.page.component.jsx index 04307aeca..80d9e2670 100644 --- a/client/src/pages/bills/bills.page.component.jsx +++ b/client/src/pages/bills/bills.page.component.jsx @@ -1,5 +1,5 @@ import { SyncOutlined } from "@ant-design/icons"; -import { Button, Checkbox, Input, Space, Table, Typography } from "antd"; +import { Button, Card, Checkbox, Input, Space, Table } from "antd"; import queryString from "query-string"; import React, { useState } from "react"; import { useTranslation } from "react-i18next"; @@ -201,37 +201,39 @@ export function BillsListPage({ }; return ( -
+ + + +
+ { + search.search = value; + history.push({ search: queryString.stringify(search) }); + }} + /> +
+ + } + > - {t("bills.labels.bills")} +
( -
- - -
- { - search.search = value; - history.push({ search: queryString.stringify(search) }); - }} - /> -
-
- )} scroll={{ x: "50%", y: "40rem" }} pagination={{ position: "top", @@ -244,7 +246,7 @@ export function BillsListPage({ dataSource={data} onChange={handleTableChange} /> - + ); } export default connect(null, mapDispatchToProps)(BillsListPage); diff --git a/client/src/pages/contract-create/contract-create.page.component.jsx b/client/src/pages/contract-create/contract-create.page.component.jsx index 29f90f027..251f025ef 100644 --- a/client/src/pages/contract-create/contract-create.page.component.jsx +++ b/client/src/pages/contract-create/contract-create.page.component.jsx @@ -1,4 +1,4 @@ -import { Button } from "antd"; +import { Button, Col, PageHeader, Row } from "antd"; import React from "react"; import { useTranslation } from "react-i18next"; import ContractCarsContainer from "../../components/contract-cars/contract-cars.container"; @@ -25,22 +25,31 @@ export default function ContractCreatePageComponent({ return (
- {CreateButton} - - - -
- -
- {CreateButton} + +
+ + + + + + +
+ +
+ + + ); } diff --git a/client/src/pages/contract-detail/contract-detail.page.component.jsx b/client/src/pages/contract-detail/contract-detail.page.component.jsx index b47cdcf18..6076377d6 100644 --- a/client/src/pages/contract-detail/contract-detail.page.component.jsx +++ b/client/src/pages/contract-detail/contract-detail.page.component.jsx @@ -1,4 +1,4 @@ -import { Button, Col, Row, Space, Typography, Form } from "antd"; +import { Button, Col, Row, Space, Typography, Form, PageHeader } from "antd"; import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; @@ -28,17 +28,14 @@ export function ContractDetailPage({ return (
- {`Agreement ${ - (contract && contract.agreementnumber) || "" - } - ${t((contract && contract.status) || "")}`} + - - -
- - - - + {() => { return ( @@ -94,6 +91,16 @@ export function ContractDetailPage({ ); }} + } + /> + + + + + + + + diff --git a/client/src/pages/contracts/contracts.page.component.jsx b/client/src/pages/contracts/contracts.page.component.jsx index 8185728bb..51609a00c 100644 --- a/client/src/pages/contracts/contracts.page.component.jsx +++ b/client/src/pages/contracts/contracts.page.component.jsx @@ -8,13 +8,11 @@ export default function ContractsPageComponent({ total, }) { return ( -
- -
+ ); } diff --git a/client/src/pages/jobs-checklist-view/jobs-checklist-view.page.jsx b/client/src/pages/jobs-checklist-view/jobs-checklist-view.page.jsx index 01306b1a1..e47b10d42 100644 --- a/client/src/pages/jobs-checklist-view/jobs-checklist-view.page.jsx +++ b/client/src/pages/jobs-checklist-view/jobs-checklist-view.page.jsx @@ -72,7 +72,7 @@ export function JobsChecklistViewContainer({ return ( - +
{t("jobs.labels.intakechecklist")} diff --git a/client/src/pages/jobs-create/jobs-create.component.jsx b/client/src/pages/jobs-create/jobs-create.component.jsx index 795d5e7f7..b170f8bc0 100644 --- a/client/src/pages/jobs-create/jobs-create.component.jsx +++ b/client/src/pages/jobs-create/jobs-create.component.jsx @@ -1,4 +1,4 @@ -import { Button, Result, Steps } from "antd"; +import { Button, PageHeader, Result, Space, Steps } from "antd"; import React, { useContext, useState } from "react"; import { useTranslation } from "react-i18next"; import { Link } from "react-router-dom"; @@ -44,36 +44,68 @@ export default function JobsCreateComponent({ form }) { }; const { Step } = Steps; - const ProgressButtons = () => { + const ProgressButtons = ({ top }) => { return ( -
- {pageIndex > 0 && } - {pageIndex < steps.length - 1 && ( - + + {pageIndex > 0 && } + {pageIndex < steps.length - 1 && ( + + )} + {pageIndex === steps.length - 1 && ( + + )} + + } + > + {top && ( + + {steps.map((item, idx) => ( + { + form + .validateFields() + .then((r) => { + if (steps[pageIndex].validation) { + setErrorMessage(null); + setPageIndex(idx); + } else { + setErrorMessage(steps[pageIndex].error); + } + }) + .catch((error) => console.log("error", error)); + }} + /> + ))} + )} - {pageIndex === steps.length - 1 && ( - - )} -
+ ); }; @@ -96,29 +128,7 @@ export default function JobsCreateComponent({ form }) { ) : (
- - {steps.map((item, idx) => ( - { - form - .validateFields() - .then((r) => { - if (steps[pageIndex].validation) { - setErrorMessage(null); - setPageIndex(idx); - } else { - setErrorMessage(steps[pageIndex].error); - } - }) - .catch((error) => console.log("error", error)); - }} - /> - ))} - - + {errorMessage ? (
diff --git a/client/src/pages/jobs-create/jobs-create.container.jsx b/client/src/pages/jobs-create/jobs-create.container.jsx index 54c302264..2bf15463b 100644 --- a/client/src/pages/jobs-create/jobs-create.container.jsx +++ b/client/src/pages/jobs-create/jobs-create.container.jsx @@ -149,6 +149,7 @@ function JobsCreateContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) { ; } diff --git a/client/src/pages/production-list/production-list.container.jsx b/client/src/pages/production-list/production-list.container.jsx index 51bbf092a..c8275c1ea 100644 --- a/client/src/pages/production-list/production-list.container.jsx +++ b/client/src/pages/production-list/production-list.container.jsx @@ -1,18 +1,12 @@ import React, { useEffect } from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; -import { createStructuredSelector } from "reselect"; +import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component"; import { setBreadcrumbs, setSelectedHeader, } from "../../redux/application/application.actions"; -import { selectBodyshop } from "../../redux/user/user.selectors"; import ProductionListComponent from "./production-list.component"; -import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component"; - -const mapStateToProps = createStructuredSelector({ - bodyshop: selectBodyshop, -}); const mapDispatchToProps = (dispatch) => ({ setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)), @@ -21,7 +15,7 @@ const mapDispatchToProps = (dispatch) => ({ export function ProductionListContainer({ setBreadcrumbs, - bodyshop, + setSelectedHeader, }) { const { t } = useTranslation(); @@ -40,7 +34,4 @@ export function ProductionListContainer({ ); } -export default connect( - mapStateToProps, - mapDispatchToProps -)(ProductionListContainer); +export default connect(null, mapDispatchToProps)(ProductionListContainer); diff --git a/client/src/translations/en_us/common.json b/client/src/translations/en_us/common.json index b862dd9f2..ae44b0a0b 100644 --- a/client/src/translations/en_us/common.json +++ b/client/src/translations/en_us/common.json @@ -520,13 +520,17 @@ "status": "Status" }, "labels": { + "agreement": "Agreement {{agreement_num}} - {{status}}", + "availablecars": "Available Cars", "convertform": { "applycleanupcharge": "Apply cleanup charge?", "refuelqty": "Refuel qty.?" }, "correctdataonform": "Please review the information above. If any of it is not correct, you can fix it later.", + "driverinformation": "Driver's Information", "noteconvertedfrom": "R.O. created from converted Courtesy Car Contract {{agreementnumber}}.", "populatefromjob": "Populate from Job", + "rates": "Contract Rates", "vehicle": "Vehicle", "waitingforscan": "Please scan driver's license barcode..." }, diff --git a/client/src/translations/es/common.json b/client/src/translations/es/common.json index d17627a8e..2ef0ac47c 100644 --- a/client/src/translations/es/common.json +++ b/client/src/translations/es/common.json @@ -520,13 +520,17 @@ "status": "" }, "labels": { + "agreement": "", + "availablecars": "", "convertform": { "applycleanupcharge": "", "refuelqty": "" }, "correctdataonform": "", + "driverinformation": "", "noteconvertedfrom": "", "populatefromjob": "", + "rates": "", "vehicle": "", "waitingforscan": "" }, diff --git a/client/src/translations/fr/common.json b/client/src/translations/fr/common.json index 76251f7e0..b942637d7 100644 --- a/client/src/translations/fr/common.json +++ b/client/src/translations/fr/common.json @@ -520,13 +520,17 @@ "status": "" }, "labels": { + "agreement": "", + "availablecars": "", "convertform": { "applycleanupcharge": "", "refuelqty": "" }, "correctdataonform": "", + "driverinformation": "", "noteconvertedfrom": "", "populatefromjob": "", + "rates": "", "vehicle": "", "waitingforscan": "" },