Compare commits

..

1 Commits

69 changed files with 230 additions and 1073 deletions

View File

@@ -1,4 +1,4 @@
<babeledit_project version="1.2" be_version="2.7.1"> <babeledit_project be_version="2.7.1" version="1.2">
<!-- <!--
BabelEdit project file BabelEdit project file
@@ -4318,48 +4318,6 @@
<folder_node> <folder_node>
<name>dms</name> <name>dms</name>
<children> <children>
<concept_node>
<name>apcontrol</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>appostingaccount</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> <concept_node>
<name>cashierid</name> <name>cashierid</name>
<definition_loaded>false</definition_loaded> <definition_loaded>false</definition_loaded>
@@ -6664,27 +6622,6 @@
</translation> </translation>
</translations> </translations>
</concept_node> </concept_node>
<concept_node>
<name>void</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>
</children> </children>
</folder_node> </folder_node>
<folder_node> <folder_node>
@@ -14067,48 +14004,6 @@
</translation> </translation>
</translations> </translations>
</concept_node> </concept_node>
<concept_node>
<name>scheduledintoday</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>scheduledouttoday</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>
</children> </children>
</folder_node> </folder_node>
</children> </children>
@@ -23949,27 +23844,6 @@
</translation> </translation>
</translations> </translations>
</concept_node> </concept_node>
<concept_node>
<name>dms_unsold</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> <concept_node>
<name>dms_wip_acctnumber</name> <name>dms_wip_acctnumber</name>
<definition_loaded>false</definition_loaded> <definition_loaded>false</definition_loaded>
@@ -37537,48 +37411,6 @@
</translation> </translation>
</translations> </translations>
</concept_node> </concept_node>
<concept_node>
<name>markexported</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>markforreexport</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> <concept_node>
<name>new</name> <name>new</name>
<definition_loaded>false</definition_loaded> <definition_loaded>false</definition_loaded>
@@ -37710,27 +37542,6 @@
</translation> </translation>
</translations> </translations>
</concept_node> </concept_node>
<concept_node>
<name>markreexported</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> <concept_node>
<name>payment</name> <name>payment</name>
<definition_loaded>false</definition_loaded> <definition_loaded>false</definition_loaded>
@@ -39544,27 +39355,6 @@
</translation> </translation>
</translations> </translations>
</concept_node> </concept_node>
<concept_node>
<name>mpi_final_repair_acct_sheet</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> <concept_node>
<name>paint_grid</name> <name>paint_grid</name>
<definition_loaded>false</definition_loaded> <definition_loaded>false</definition_loaded>
@@ -40643,27 +40433,6 @@
<folder_node> <folder_node>
<name>jobs</name> <name>jobs</name>
<children> <children>
<concept_node>
<name>individual_job_note</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> <concept_node>
<name>parts_order</name> <name>parts_order</name>
<definition_loaded>false</definition_loaded> <definition_loaded>false</definition_loaded>
@@ -43507,27 +43276,6 @@
</translation> </translation>
</translations> </translations>
</concept_node> </concept_node>
<concept_node>
<name>jobs_scheduled_completion</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> <concept_node>
<name>lag_time</name> <name>lag_time</name>
<definition_loaded>false</definition_loaded> <definition_loaded>false</definition_loaded>
@@ -44630,27 +44378,6 @@
</translation> </translation>
</translations> </translations>
</concept_node> </concept_node>
<concept_node>
<name>estimators</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> <concept_node>
<name>ins_co_nm_filter</name> <name>ins_co_nm_filter</name>
<definition_loaded>false</definition_loaded> <definition_loaded>false</definition_loaded>

View File

@@ -148,10 +148,6 @@
background: #e7f3ff !important; background: #e7f3ff !important;
} }
.ant-table-tbody > tr.ant-table-row-selected > td {
background: #e6f7ff !important;
}
.job-line-manual { .job-line-manual {
color: tomato; color: tomato;
font-style: italic; font-style: italic;

View File

@@ -1,18 +1,18 @@
import { useApolloClient, useMutation } from "@apollo/client"; import { useApolloClient, useMutation } from "@apollo/client";
import { Button, Checkbox, Form, Modal, Space, notification } from "antd"; import { Button, Checkbox, Form, Modal, notification, Space } from "antd";
import _ from "lodash"; import _ from "lodash";
import React, { useEffect, useMemo, useState } from "react"; import React, { useEffect, useState, useMemo } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { createStructuredSelector } from "reselect"; import { createStructuredSelector } from "reselect";
import { INSERT_NEW_BILL } from "../../graphql/bills.queries"; import { INSERT_NEW_BILL } from "../../graphql/bills.queries";
import { UPDATE_INVENTORY_LINES } from "../../graphql/inventory.queries";
import { UPDATE_JOB_LINE } from "../../graphql/jobs-lines.queries"; import { UPDATE_JOB_LINE } from "../../graphql/jobs-lines.queries";
import { import {
QUERY_JOB_LBR_ADJUSTMENTS, QUERY_JOB_LBR_ADJUSTMENTS,
UPDATE_JOB, UPDATE_JOB,
} from "../../graphql/jobs.queries"; } from "../../graphql/jobs.queries";
import { MUTATION_MARK_RETURN_RECEIVED } from "../../graphql/parts-orders.queries"; import { MUTATION_MARK_RETURN_RECEIVED } from "../../graphql/parts-orders.queries";
import { UPDATE_INVENTORY_LINES } from "../../graphql/inventory.queries";
import { insertAuditTrail } from "../../redux/application/application.actions"; import { insertAuditTrail } from "../../redux/application/application.actions";
import { toggleModalVisible } from "../../redux/modals/modals.actions"; import { toggleModalVisible } from "../../redux/modals/modals.actions";
import { selectBillEnterModal } from "../../redux/modals/modals.selectors"; import { selectBillEnterModal } from "../../redux/modals/modals.selectors";
@@ -20,15 +20,15 @@ import {
selectBodyshop, selectBodyshop,
selectCurrentUser, selectCurrentUser,
} from "../../redux/user/user.selectors"; } from "../../redux/user/user.selectors";
import AuditTrailMapping from "../../utils/AuditTrailMappings";
import { GenerateDocument } from "../../utils/RenderTemplate";
import { TemplateList } from "../../utils/TemplateConstants";
import confirmDialog from "../../utils/asyncConfirm"; import confirmDialog from "../../utils/asyncConfirm";
import useLocalStorage from "../../utils/useLocalStorage"; import AuditTrailMapping from "../../utils/AuditTrailMappings";
import BillFormContainer from "../bill-form/bill-form.container"; import BillFormContainer from "../bill-form/bill-form.container";
import { CalculateBillTotal } from "../bill-form/bill-form.totals.utility"; import { CalculateBillTotal } from "../bill-form/bill-form.totals.utility";
import { handleUpload as handleLocalUpload } from "../documents-local-upload/documents-local-upload.utility";
import { handleUpload } from "../documents-upload/documents-upload.utility"; import { handleUpload } from "../documents-upload/documents-upload.utility";
import { handleUpload as handleLocalUpload } from "../documents-local-upload/documents-local-upload.utility";
import useLocalStorage from "../../utils/useLocalStorage";
import { GenerateDocument } from "../../utils/RenderTemplate";
import { TemplateList } from "../../utils/TemplateConstants";
const mapStateToProps = createStructuredSelector({ const mapStateToProps = createStructuredSelector({
billEnterModal: selectBillEnterModal, billEnterModal: selectBillEnterModal,
@@ -126,17 +126,6 @@ function BillEnterModalContainer({
deductedfromlbr: deductedfromlbr, deductedfromlbr: deductedfromlbr,
lbr_adjustment, lbr_adjustment,
joblineid: i.joblineid === "noline" ? null : i.joblineid, joblineid: i.joblineid === "noline" ? null : i.joblineid,
applicable_taxes: {
federal:
(i.applicable_taxes && i.applicable_taxes.federal) ||
false,
state:
(i.applicable_taxes && i.applicable_taxes.state) ||
false,
local:
(i.applicable_taxes && i.applicable_taxes.local) ||
false,
},
}; };
}), }),
}, },

View File

@@ -1,6 +1,6 @@
import Icon, { UploadOutlined } from "@ant-design/icons"; import Icon, { UploadOutlined } from "@ant-design/icons";
import { useApolloClient } from "@apollo/client"; import { useApolloClient } from "@apollo/client";
import { useTreatments } from "@splitsoftware/splitio-react"; import { MdOpenInNew } from "react-icons/md";
import { import {
Alert, Alert,
Divider, Divider,
@@ -12,17 +12,14 @@ import {
Switch, Switch,
Upload, Upload,
} from "antd"; } from "antd";
import moment from "moment";
import React, { useEffect, useState } from "react"; import React, { useEffect, useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { MdOpenInNew } from "react-icons/md";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
import { createStructuredSelector } from "reselect"; import { createStructuredSelector } from "reselect";
import { CHECK_BILL_INVOICE_NUMBER } from "../../graphql/bills.queries"; import { CHECK_BILL_INVOICE_NUMBER } from "../../graphql/bills.queries";
import { selectBodyshop } from "../../redux/user/user.selectors"; import { selectBodyshop } from "../../redux/user/user.selectors";
import AlertComponent from "../alert/alert.component"; import AlertComponent from "../alert/alert.component";
import BillFormLinesExtended from "../bill-form-lines-extended/bill-form-lines-extended.component";
import FormDatePicker from "../form-date-picker/form-date-picker.component"; import FormDatePicker from "../form-date-picker/form-date-picker.component";
import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component"; import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component";
import CurrencyInput from "../form-items-formatted/currency-form-item.component"; import CurrencyInput from "../form-items-formatted/currency-form-item.component";
@@ -31,6 +28,8 @@ import LayoutFormRow from "../layout-form-row/layout-form-row.component";
import VendorSearchSelect from "../vendor-search-select/vendor-search-select.component"; import VendorSearchSelect from "../vendor-search-select/vendor-search-select.component";
import BillFormLines from "./bill-form.lines.component"; import BillFormLines from "./bill-form.lines.component";
import { CalculateBillTotal } from "./bill-form.totals.utility"; import { CalculateBillTotal } from "./bill-form.totals.utility";
import { useTreatments } from "@splitsoftware/splitio-react";
import BillFormLinesExtended from "../bill-form-lines-extended/bill-form-lines-extended.component";
const mapStateToProps = createStructuredSelector({ const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop, bodyshop: selectBodyshop,
@@ -59,11 +58,6 @@ export function BillFormComponent({
{}, {},
bodyshop.imexshopid bodyshop.imexshopid
); );
const { ClosingPeriod } = useTreatments(
["ClosingPeriod"],
{},
bodyshop.imexshopid
);
const handleVendorSelect = (props, opt) => { const handleVendorSelect = (props, opt) => {
setDiscount(opt.discount); setDiscount(opt.discount);
@@ -265,37 +259,6 @@ export function BillFormComponent({
required: true, required: true,
//message: t("general.validation.required"), //message: t("general.validation.required"),
}, },
({ getFieldValue }) => ({
validator(rule, value) {
if (
ClosingPeriod.treatment === "on" &&
bodyshop.accountingconfig.ClosingPeriod
) {
if (
moment(value)
.startOf("day")
.isSameOrAfter(
moment(
bodyshop.accountingconfig.ClosingPeriod[0]
).startOf("day")
) &&
moment(value)
.startOf("day")
.isSameOrBefore(
moment(
bodyshop.accountingconfig.ClosingPeriod[1]
).endOf("day")
)
) {
return Promise.resolve();
} else {
return Promise.reject(t("bills.validation.closingperiod"));
}
} else {
return Promise.resolve();
}
},
}),
]} ]}
> >
<FormDatePicker disabled={disabled} /> <FormDatePicker disabled={disabled} />

View File

@@ -59,14 +59,6 @@ export default function ContractsCarsComponent({
sortOrder: sortOrder:
state.sortedInfo.columnKey === "model" && state.sortedInfo.order, state.sortedInfo.columnKey === "model" && state.sortedInfo.order,
}, },
{
title: t("courtesycars.fields.color"),
dataIndex: "color",
key: "color",
sorter: (a, b) => alphaSort(a.color, b.color),
sortOrder:
state.sortedInfo.columnKey === "color" && state.sortedInfo.order,
},
{ {
title: t("courtesycars.fields.plate"), title: t("courtesycars.fields.plate"),
dataIndex: "plate", dataIndex: "plate",
@@ -101,9 +93,6 @@ export default function ContractsCarsComponent({
(cc.model || "") (cc.model || "")
.toLowerCase() .toLowerCase()
.includes(state.search.toLowerCase()) || .includes(state.search.toLowerCase()) ||
(cc.color || "")
.toLowerCase()
.includes(state.search.toLowerCase()) ||
(cc.plate || "").toLowerCase().includes(state.search.toLowerCase()) (cc.plate || "").toLowerCase().includes(state.search.toLowerCase())
); );

View File

@@ -23,36 +23,40 @@ export default function DashboardScheduledInToday({ data, ...cardProps }) {
const appt = []; // Flatten Data const appt = []; // Flatten Data
data.scheduled_in_today.forEach((item) => { data.scheduled_in_today.forEach((item) => {
var i = { if (item.job) {
canceled: item.canceled, var i = {
id: item.id, canceled: item.canceled,
alt_transport: item.job.alt_transport, id: item.id,
clm_no: item.job.clm_no, alt_transport: item.job.alt_transport,
jobid: item.job.jobid, clm_no: item.job.clm_no,
ins_co_nm: item.job.ins_co_nm, jobid: item.job.jobid,
iouparent: item.job.iouparent, ins_co_nm: item.job.ins_co_nm,
ownerid: item.job.ownerid, iouparent: item.job.iouparent,
ownr_co_nm: item.job.ownr_co_nm, ownerid: item.job.ownerid,
ownr_ea: item.job.ownr_ea, ownr_co_nm: item.job.ownr_co_nm,
ownr_fn: item.job.ownr_fn, ownr_ea: item.job.ownr_ea,
ownr_ln: item.job.ownr_ln, ownr_fn: item.job.ownr_fn,
ownr_ph1: item.job.ownr_ph1, ownr_ln: item.job.ownr_ln,
ownr_ph2: item.job.ownr_ph2, ownr_ph1: item.job.ownr_ph1,
production_vars: item.job.production_vars, ownr_ph2: item.job.ownr_ph2,
ro_number: item.job.ro_number, production_vars: item.job.production_vars,
suspended: item.job.suspended, ro_number: item.job.ro_number,
v_make_desc: item.job.v_make_desc, suspended: item.job.suspended,
v_model_desc: item.job.v_model_desc, v_make_desc: item.job.v_make_desc,
v_model_yr: item.job.v_model_yr, v_model_desc: item.job.v_model_desc,
v_vin: item.job.v_vin, v_model_yr: item.job.v_model_yr,
vehicleid: item.job.vehicleid, v_vin: item.job.v_vin,
note: item.note, vehicleid: item.job.vehicleid,
start: moment(item.start).format("hh:mm a"), note: item.note,
title: item.title, start: moment(item.start).format("hh:mm a"),
}; title: item.title,
appt.push(i); };
appt.push(i);
}
});
appt.sort(function (a, b) {
return new moment(a.start) - new moment(b.start);
}); });
appt.sort ( function (a, b) { return new Date(a.start) - new Date(b.start); });
const columns = [ const columns = [
{ {
@@ -182,7 +186,12 @@ export default function DashboardScheduledInToday({ data, ...cardProps }) {
}; };
return ( return (
<Card title={t("dashboard.titles.scheduledintoday", {date: moment().startOf("day").format("MM/DD/YYYY")})} {...cardProps}> <Card
title={t("dashboard.titles.scheduledintoday", {
date: moment().startOf("day").format("MM/DD/YYYY"),
})}
{...cardProps}
>
<div style={{ height: "100%" }}> <div style={{ height: "100%" }}>
<Table <Table
onChange={handleTableChange} onChange={handleTableChange}

View File

@@ -11,7 +11,6 @@ import {
Select, Select,
Space, Space,
Statistic, Statistic,
Switch,
Typography, Typography,
} from "antd"; } from "antd";
import Dinero from "dinero.js"; import Dinero from "dinero.js";
@@ -184,13 +183,6 @@ export function DmsPostForm({ bodyshop, socket, job, logsRef }) {
<Space> <Space>
<DmsCdkMakes form={form} socket={socket} job={job} /> <DmsCdkMakes form={form} socket={socket} job={job} />
<DmsCdkMakesRefetch /> <DmsCdkMakesRefetch />
<Form.Item
name="dms_unsold"
label={t("jobs.fields.dms.dms_unsold")}
initialValue={false}
>
<Switch />
</Form.Item>
</Space> </Space>
</div> </div>
)} )}

View File

@@ -1,9 +1,10 @@
import { useTreatments } from "@splitsoftware/splitio-react";
import Icon, { import Icon, {
BankFilled, BankFilled,
BarChartOutlined, BarChartOutlined,
CarFilled, CarFilled,
CheckCircleOutlined,
ClockCircleFilled, ClockCircleFilled,
CheckCircleOutlined,
DashboardFilled, DashboardFilled,
DollarCircleFilled, DollarCircleFilled,
ExportOutlined, ExportOutlined,
@@ -25,7 +26,6 @@ import Icon, {
UnorderedListOutlined, UnorderedListOutlined,
UserOutlined, UserOutlined,
} from "@ant-design/icons"; } from "@ant-design/icons";
import { useTreatments } from "@splitsoftware/splitio-react";
import { Layout, Menu } from "antd"; import { Layout, Menu } from "antd";
import React from "react"; import React from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
@@ -252,11 +252,7 @@ function Header({
onClick={() => { onClick={() => {
setTimeTicketContext({ setTimeTicketContext({
actions: {}, actions: {},
context: { context: {},
created_by: currentUser.displayName
? currentUser.email.concat(" | ", currentUser.displayName)
: currentUser.email,
},
}); });
}} }}
> >

View File

@@ -5,7 +5,6 @@ import { useTranslation } from "react-i18next";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { createStructuredSelector } from "reselect"; import { createStructuredSelector } from "reselect";
import { SEARCH_VENDOR_AUTOCOMPLETE_WITH_ADDR } from "../../graphql/vendors.queries"; import { SEARCH_VENDOR_AUTOCOMPLETE_WITH_ADDR } from "../../graphql/vendors.queries";
import { selectTechnician } from "../../redux/tech/tech.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors"; import { selectBodyshop } from "../../redux/user/user.selectors";
import { GenerateDocument } from "../../utils/RenderTemplate"; import { GenerateDocument } from "../../utils/RenderTemplate";
import { TemplateList } from "../../utils/TemplateConstants"; import { TemplateList } from "../../utils/TemplateConstants";
@@ -14,14 +13,13 @@ import VendorSearchSelect from "../vendor-search-select/vendor-search-select.com
const mapStateToProps = createStructuredSelector({ const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop, bodyshop: selectBodyshop,
technician: selectTechnician,
}); });
const mapDispatchToProps = (dispatch) => ({ const mapDispatchToProps = (dispatch) => ({
//setUserLanguage: language => dispatch(setUserLanguage(language)) //setUserLanguage: language => dispatch(setUserLanguage(language))
}); });
export default connect(mapStateToProps, mapDispatchToProps)(Jobd3RdPartyModal); export default connect(mapStateToProps, mapDispatchToProps)(Jobd3RdPartyModal);
export function Jobd3RdPartyModal({ bodyshop, jobId, job, technician }) { export function Jobd3RdPartyModal({ bodyshop, jobId, job }) {
const [isModalVisible, setIsModalVisible] = useState(false); const [isModalVisible, setIsModalVisible] = useState(false);
const { t } = useTranslation(); const { t } = useTranslation();
const [form] = Form.useForm(); const [form] = Form.useForm();
@@ -214,9 +212,7 @@ export function Jobd3RdPartyModal({ bodyshop, jobId, job, technician }) {
]} ]}
> >
<Radio.Group> <Radio.Group>
{!technician ? ( <Radio value={"e"}>{t("parts_orders.labels.email")}</Radio>
<Radio value={"e"}>{t("parts_orders.labels.email")}</Radio>
) : null}
<Radio value={"p"}>{t("parts_orders.labels.print")}</Radio> <Radio value={"p"}>{t("parts_orders.labels.print")}</Radio>
</Radio.Group> </Radio.Group>
</Form.Item> </Form.Item>

View File

@@ -1,14 +1,14 @@
import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component";
import { useMutation } from "@apollo/client"; import { useMutation } from "@apollo/client";
import { Button, Form, notification } from "antd"; import { Button, Form, notification } from "antd";
import moment from "moment";
import React, { useEffect, useState } from "react"; import React, { useEffect, useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { UPDATE_JOB } from "../../graphql/jobs.queries"; import { UPDATE_JOB } from "../../graphql/jobs.queries";
import AuditTrailMapping from "../../utils/AuditTrailMappings";
import FormDatePicker from "../form-date-picker/form-date-picker.component";
import DateTimePicker from "../form-date-time-picker/form-date-time-picker.component"; import DateTimePicker from "../form-date-time-picker/form-date-time-picker.component";
import FormFieldsChanged from "../form-fields-changed-alert/form-fields-changed-alert.component";
import LayoutFormRow from "../layout-form-row/layout-form-row.component"; import LayoutFormRow from "../layout-form-row/layout-form-row.component";
import moment from "moment";
import FormDatePicker from "../form-date-picker/form-date-picker.component";
import AuditTrailMapping from "../../utils/AuditTrailMappings";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { createStructuredSelector } from "reselect"; import { createStructuredSelector } from "reselect";
@@ -38,8 +38,8 @@ export function JobsAdminDatesChange({ insertAuditTrail, job }) {
setLoading(true); setLoading(true);
const result = await updateJob({ const result = await updateJob({
variables: { jobId: job.id, job: values }, variables: { jobId: job.id, job: values },
refetchQueries: ["GET_JOB_BY_PK"], refetchQueries: ['GET_JOB_BY_PK'],
awaitRefetchQueries: true, awaitRefetchQueries:true
}); });
const changedAuditFields = form.getFieldsValue( const changedAuditFields = form.getFieldsValue(
@@ -126,10 +126,7 @@ export function JobsAdminDatesChange({ insertAuditTrail, job }) {
<Form.Item label={t("jobs.fields.actual_in")} name="actual_in"> <Form.Item label={t("jobs.fields.actual_in")} name="actual_in">
<DateTimePicker /> <DateTimePicker />
</Form.Item> </Form.Item>
<Form.Item <Form.Item label={t("jobs.fields.date_repairstarted")} name="date_repairstarted">
label={t("jobs.fields.date_repairstarted")}
name="date_repairstarted"
>
<DateTimePicker /> <DateTimePicker />
</Form.Item> </Form.Item>
<Form.Item <Form.Item
@@ -176,9 +173,6 @@ export function JobsAdminDatesChange({ insertAuditTrail, job }) {
> >
<DateTimePicker /> <DateTimePicker />
</Form.Item> </Form.Item>
<Form.Item label={t("jobs.fields.date_void")} name="date_void">
<DateTimePicker />
</Form.Item>
</LayoutFormRow> </LayoutFormRow>
</Form> </Form>

View File

@@ -1,18 +1,19 @@
import { gql, useMutation } from "@apollo/client"; import { useMutation } from "@apollo/client";
import { Button, notification } from "antd"; import { Button, notification } from "antd";
import { gql } from "@apollo/client";
import React, { useState } from "react"; import React, { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import moment from "moment";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { createStructuredSelector } from "reselect"; import { createStructuredSelector } from "reselect";
import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries";
import { insertAuditTrail } from "../../redux/application/application.actions";
import { import {
selectBodyshop, selectBodyshop,
selectCurrentUser, selectCurrentUser,
} from "../../redux/user/user.selectors"; } from "../../redux/user/user.selectors";
import moment from "moment";
import AuditTrailMapping from "../../utils/AuditTrailMappings"; import AuditTrailMapping from "../../utils/AuditTrailMappings";
import { insertAuditTrail } from "../../redux/application/application.actions";
import { INSERT_EXPORT_LOG } from "../../graphql/accounting.queries";
const mapStateToProps = createStructuredSelector({ const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop, bodyshop: selectBodyshop,
currentUser: selectCurrentUser, currentUser: selectCurrentUser,
@@ -149,10 +150,6 @@ export function JobAdminMarkReexport({
if (!result.errors) { if (!result.errors) {
notification["success"]({ message: t("jobs.successes.save") }); notification["success"]({ message: t("jobs.successes.save") });
insertAuditTrail({
jobid: job.id,
operation: AuditTrailMapping.admin_jobuninvoice(),
});
} else { } else {
notification["error"]({ notification["error"]({
message: t("jobs.errors.saving", { message: t("jobs.errors.saving", {

View File

@@ -33,9 +33,8 @@ export function JobsAdminUnvoid({
mutation UNVOID_JOB($jobId: uuid!) { mutation UNVOID_JOB($jobId: uuid!) {
update_jobs_by_pk(pk_columns: {id: $jobId}, _set: {voided: false, status: "${ update_jobs_by_pk(pk_columns: {id: $jobId}, _set: {voided: false, status: "${
bodyshop.md_ro_statuses.default_imported bodyshop.md_ro_statuses.default_imported
}", date_void: null}) { }"}) {
id id
date_void
voided voided
status status
} }

View File

@@ -141,10 +141,6 @@ export function JobsDetailDatesComponent({ jobRO, job, bodyshop }) {
<Form.Item label={t("jobs.fields.date_exported")} name="date_exported"> <Form.Item label={t("jobs.fields.date_exported")} name="date_exported">
<DateTimePicker disabled={true || jobRO} /> <DateTimePicker disabled={true || jobRO} />
</Form.Item> </Form.Item>
<Form.Item label={t("jobs.fields.date_void")} name="date_void">
<DateTimePicker disabled={true || jobRO} />
</Form.Item>
</FormRow> </FormRow>
</div> </div>
); );

View File

@@ -5,10 +5,10 @@ import {
Dropdown, Dropdown,
Form, Form,
Menu, Menu,
notification,
Popconfirm, Popconfirm,
Popover, Popover,
Select, Select,
notification,
} from "antd"; } from "antd";
import React, { useMemo } from "react"; import React, { useMemo } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
@@ -24,12 +24,12 @@ import {
selectBodyshop, selectBodyshop,
selectCurrentUser, selectCurrentUser,
} from "../../redux/user/user.selectors"; } from "../../redux/user/user.selectors";
import RbacWrapper from "../rbac-wrapper/rbac-wrapper.component";
import JobsDetailHeaderActionsAddevent from "./jobs-detail-header-actions.addevent"; import JobsDetailHeaderActionsAddevent from "./jobs-detail-header-actions.addevent";
import AddToProduction from "./jobs-detail-header-actions.addtoproduction.util"; import AddToProduction from "./jobs-detail-header-actions.addtoproduction.util";
import JobsDetaiLheaderCsi from "./jobs-detail-header-actions.csi.component"; import JobsDetaiLheaderCsi from "./jobs-detail-header-actions.csi.component";
import DuplicateJob from "./jobs-detail-header-actions.duplicate.util"; import DuplicateJob from "./jobs-detail-header-actions.duplicate.util";
import JobsDetailHeaderActionsExportcustdataComponent from "./jobs-detail-header-actions.exportcustdata.component"; import JobsDetailHeaderActionsExportcustdataComponent from "./jobs-detail-header-actions.exportcustdata.component";
import RbacWrapper from "../rbac-wrapper/rbac-wrapper.component";
const mapStateToProps = createStructuredSelector({ const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop, bodyshop: selectBodyshop,
@@ -480,7 +480,6 @@ export function JobsDetailHeaderActions({
scheduled_in: null, scheduled_in: null,
scheduled_completion: null, scheduled_completion: null,
inproduction: false, inproduction: false,
date_void: new Date(),
}, },
note: [ note: [
{ {

View File

@@ -5,13 +5,11 @@ import { connect } from "react-redux";
import { createStructuredSelector } from "reselect"; import { createStructuredSelector } from "reselect";
import { setEmailOptions } from "../../redux/email/email.actions"; import { setEmailOptions } from "../../redux/email/email.actions";
import { selectPrintCenter } from "../../redux/modals/modals.selectors"; import { selectPrintCenter } from "../../redux/modals/modals.selectors";
import { selectTechnician } from "../../redux/tech/tech.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors"; import { selectBodyshop } from "../../redux/user/user.selectors";
import { GenerateDocument } from "../../utils/RenderTemplate"; import { GenerateDocument } from "../../utils/RenderTemplate";
const mapStateToProps = createStructuredSelector({ const mapStateToProps = createStructuredSelector({
printCenterModal: selectPrintCenter, printCenterModal: selectPrintCenter,
bodyshop: selectBodyshop, bodyshop: selectBodyshop,
technician: selectTechnician,
}); });
const mapDispatchToProps = (dispatch) => ({ const mapDispatchToProps = (dispatch) => ({
setEmailOptions: (e) => dispatch(setEmailOptions(e)), setEmailOptions: (e) => dispatch(setEmailOptions(e)),
@@ -24,7 +22,6 @@ export function PrintCenterItemComponent({
id, id,
bodyshop, bodyshop,
disabled, disabled,
technician,
}) { }) {
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const { context } = printCenterModal; const { context } = printCenterModal;
@@ -47,24 +44,19 @@ export function PrintCenterItemComponent({
<Space wrap> <Space wrap>
{item.title} {item.title}
<PrinterOutlined onClick={renderToNewWindow} /> <PrinterOutlined onClick={renderToNewWindow} />
{!technician ? ( <MailOutlined
<MailOutlined onClick={() => {
onClick={() => { GenerateDocument(
GenerateDocument( {
{ name: item.key,
name: item.key, variables: { id: id },
variables: { id: id }, },
}, { to: context.job && context.job.ownr_ea, subject: item.subject },
{ "e",
to: context.job && context.job.ownr_ea, id
subject: item.subject, );
}, }}
"e", />
id
);
}}
/>
) : null}
{loading && <Spin />} {loading && <Spin />}
</Space> </Space>
</li> </li>

View File

@@ -1,33 +1,31 @@
import { PrinterFilled } from "@ant-design/icons";
import { useQuery } from "@apollo/client"; import { useQuery } from "@apollo/client";
import { Button, Descriptions, Drawer, PageHeader, Space } from "antd"; import { Descriptions, Drawer, Space, PageHeader, Button } from "antd";
import queryString from "query-string"; import queryString from "query-string";
import React from "react"; import React from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { useHistory, useLocation } from "react-router-dom"; import { useHistory, useLocation } from "react-router-dom";
import { createStructuredSelector } from "reselect";
import { QUERY_JOB_CARD_DETAILS } from "../../graphql/jobs.queries"; import { QUERY_JOB_CARD_DETAILS } from "../../graphql/jobs.queries";
import { setModalContext } from "../../redux/modals/modals.actions";
import { selectTechnician } from "../../redux/tech/tech.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import CurrencyFormatter from "../../utils/CurrencyFormatter"; import CurrencyFormatter from "../../utils/CurrencyFormatter";
import { DateFormatter } from "../../utils/DateFormatter"; import { DateFormatter } from "../../utils/DateFormatter";
import AlertComponent from "../alert/alert.component"; import AlertComponent from "../alert/alert.component";
import StartChatButton from "../chat-open-button/chat-open-button.component"; import StartChatButton from "../chat-open-button/chat-open-button.component";
import JobAtChange from "../job-at-change/job-at-change.component";
import JobDetailCardsDocumentsComponent from "../job-detail-cards/job-detail-cards.documents.component"; import JobDetailCardsDocumentsComponent from "../job-detail-cards/job-detail-cards.documents.component";
import JobDetailCardsNotesComponent from "../job-detail-cards/job-detail-cards.notes.component"; import JobDetailCardsNotesComponent from "../job-detail-cards/job-detail-cards.notes.component";
import JobDetailCardsPartsComponent from "../job-detail-cards/job-detail-cards.parts.component"; import JobDetailCardsPartsComponent from "../job-detail-cards/job-detail-cards.parts.component";
import JobEmployeeAssignments from "../job-employee-assignments/job-employee-assignments.container"; import JobEmployeeAssignments from "../job-employee-assignments/job-employee-assignments.container";
import ScoreboardAddButton from "../job-scoreboard-add-button/job-scoreboard-add-button.component";
import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component"; import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component";
import OwnerNameDisplay from "../owner-name-display/owner-name-display.component";
import ProductionRemoveButton from "../production-remove-button/production-remove-button.component"; import ProductionRemoveButton from "../production-remove-button/production-remove-button.component";
import JobAtChange from "../job-at-change/job-at-change.component";
import { PrinterFilled } from "@ant-design/icons";
import OwnerNameDisplay from "../owner-name-display/owner-name-display.component";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { setModalContext } from "../../redux/modals/modals.actions";
import ScoreboardAddButton from "../job-scoreboard-add-button/job-scoreboard-add-button.component";
import { selectBodyshop } from "../../redux/user/user.selectors";
const mapStateToProps = createStructuredSelector({ const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop, bodyshop: selectBodyshop,
technician: selectTechnician,
}); });
const mapDispatchToProps = (dispatch) => ({ const mapDispatchToProps = (dispatch) => ({
setPrintCenterContext: (context) => setPrintCenterContext: (context) =>
@@ -42,7 +40,6 @@ export function ProductionListDetail({
bodyshop, bodyshop,
jobs, jobs,
setPrintCenterContext, setPrintCenterContext,
technician,
}) { }) {
const search = queryString.parse(useLocation().search); const search = queryString.parse(useLocation().search);
const history = useHistory(); const history = useHistory();
@@ -69,9 +66,7 @@ export function ProductionListDetail({
title={theJob.ro_number} title={theJob.ro_number}
extra={ extra={
<Space wrap> <Space wrap>
{!technician ? ( <ProductionRemoveButton jobId={theJob.id} />{" "}
<ProductionRemoveButton jobId={theJob.id} />
) : null}
<Button <Button
onClick={() => { onClick={() => {
setPrintCenterContext({ setPrintCenterContext({
@@ -87,9 +82,7 @@ export function ProductionListDetail({
<PrinterFilled /> <PrinterFilled />
{t("jobs.actions.printCenter")} {t("jobs.actions.printCenter")}
</Button> </Button>
{!technician ? ( <ScoreboardAddButton job={data ? data.jobs_by_pk : {}} />
<ScoreboardAddButton job={data ? data.jobs_by_pk : {}} />
) : null}
</Space> </Space>
} }
/> />

View File

@@ -47,7 +47,9 @@ export function ScoreboardChart({ sbEntriesByDate, bodyshop }) {
bodyhrs: dayAcc.bodyhrs + dayVal.bodyhrs, bodyhrs: dayAcc.bodyhrs + dayVal.bodyhrs,
painthrs: dayAcc.painthrs + dayVal.painthrs, painthrs: dayAcc.painthrs + dayVal.painthrs,
sales: sales:
dayAcc.sales + dayVal.job.job_totals.totals.subtotal.amount / 100, dayAcc.painthrs +
dayVal.job.job_totals.totals.subtotal.amount / 100 +
2500,
}; };
}, },
{ bodyhrs: 0, painthrs: 0, sales: 0 } { bodyhrs: 0, painthrs: 0, sales: 0 }

View File

@@ -1,14 +1,14 @@
import { useMutation, useQuery } from "@apollo/client";
import { Form, notification } from "antd";
import moment from "moment";
import React, { useEffect, useState } from "react"; import React, { useEffect, useState } from "react";
import ShopInfoComponent from "./shop-info.component";
import { Form, notification } from "antd";
import { useQuery, useMutation } from "@apollo/client";
import { QUERY_BODYSHOP, UPDATE_SHOP } from "../../graphql/bodyshop.queries";
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
import AlertComponent from "../alert/alert.component";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { logImEXEvent } from "../../firebase/firebase.utils"; import { logImEXEvent } from "../../firebase/firebase.utils";
import { QUERY_BODYSHOP, UPDATE_SHOP } from "../../graphql/bodyshop.queries";
import AlertComponent from "../alert/alert.component";
import FormsFieldChanged from "../form-fields-changed-alert/form-fields-changed-alert.component"; import FormsFieldChanged from "../form-fields-changed-alert/form-fields-changed-alert.component";
import LoadingSpinner from "../loading-spinner/loading-spinner.component"; import moment from "moment";
import ShopInfoComponent from "./shop-info.component";
export default function ShopInfoContainer() { export default function ShopInfoContainer() {
const [form] = Form.useForm(); const [form] = Form.useForm();
const { t } = useTranslation(); const { t } = useTranslation();
@@ -52,28 +52,13 @@ export default function ShopInfoContainer() {
onFinish={handleFinish} onFinish={handleFinish}
initialValues={ initialValues={
data data
? data.bodyshops[0].accountingconfig.ClosingPeriod ? {
? { ...data.bodyshops[0],
...data.bodyshops[0], schedule_start_time: moment(
accountingconfig: { data.bodyshops[0].schedule_start_time
...data.bodyshops[0].accountingconfig, ),
ClosingPeriod: [ schedule_end_time: moment(data.bodyshops[0].schedule_end_time),
moment(data.bodyshops[0].accountingconfig.ClosingPeriod[0]), }
moment(data.bodyshops[0].accountingconfig.ClosingPeriod[1]),
],
},
schedule_start_time: moment(
data.bodyshops[0].schedule_start_time
),
schedule_end_time: moment(data.bodyshops[0].schedule_end_time),
}
: {
...data.bodyshops[0],
schedule_start_time: moment(
data.bodyshops[0].schedule_start_time
),
schedule_end_time: moment(data.bodyshops[0].schedule_end_time),
}
: null : null
} }
> >

View File

@@ -1,8 +1,6 @@
import { DeleteFilled } from "@ant-design/icons"; import { DeleteFilled } from "@ant-design/icons";
import { useTreatments } from "@splitsoftware/splitio-react";
import { import {
Button, Button,
DatePicker,
Form, Form,
Input, Input,
InputNumber, InputNumber,
@@ -11,13 +9,8 @@ import {
Space, Space,
Switch, Switch,
} from "antd"; } from "antd";
import momentTZ from "moment-timezone";
import React from "react"; import React from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectBodyshop } from "../../redux/user/user.selectors";
import DatePickerRanges from "../../utils/DatePickerRanges";
import CurrencyInput from "../form-items-formatted/currency-form-item.component"; import CurrencyInput from "../form-items-formatted/currency-form-item.component";
import FormItemEmail from "../form-items-formatted/email-form-item.component"; import FormItemEmail from "../form-items-formatted/email-form-item.component";
import PhoneFormItem, { import PhoneFormItem, {
@@ -25,22 +18,12 @@ import PhoneFormItem, {
} from "../form-items-formatted/phone-form-item.component"; } from "../form-items-formatted/phone-form-item.component";
import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component"; import FormListMoveArrows from "../form-list-move-arrows/form-list-move-arrows.component";
import LayoutFormRow from "../layout-form-row/layout-form-row.component"; import LayoutFormRow from "../layout-form-row/layout-form-row.component";
const timeZonesList = momentTZ.tz.names();
const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop,
});
const mapDispatchToProps = (dispatch) => ({
//setUserLanguage: language => dispatch(setUserLanguage(language))
});
export default connect(mapStateToProps, mapDispatchToProps)(ShopInfoGeneral);
export function ShopInfoGeneral({ form, bodyshop }) { import momentTZ from "moment-timezone";
const timeZonesList = momentTZ.tz.names();
export default function ShopInfoGeneral({ form }) {
const { t } = useTranslation(); const { t } = useTranslation();
const { ClosingPeriod } = useTreatments(
["ClosingPeriod"],
{},
bodyshop && bodyshop.imexshopid
);
return ( return (
<div> <div>
@@ -409,20 +392,6 @@ export function ShopInfoGeneral({ form, bodyshop }) {
> >
<Select mode="tags" /> <Select mode="tags" />
</Form.Item> </Form.Item>
{ClosingPeriod.treatment === "on" && (
<>
<Form.Item
allowClear
name={["accountingconfig", "ClosingPeriod"]}
label={t("bodyshop.fields.closingperiod")} //{t("reportcenter.labels.dates")}
>
<DatePicker.RangePicker
format="MM/DD/YYYY"
ranges={DatePickerRanges}
/>
</Form.Item>
</>
)}
</LayoutFormRow> </LayoutFormRow>
<LayoutFormRow <LayoutFormRow
header={t("bodyshop.labels.scoreboardsetup")} header={t("bodyshop.labels.scoreboardsetup")}
@@ -633,20 +602,6 @@ export function ShopInfoGeneral({ form, bodyshop }) {
> >
<Select mode="tags" /> <Select mode="tags" />
</Form.Item> </Form.Item>
<Form.Item
name={["md_email_cc", "parts_return_slip"]}
label={t("bodyshop.fields.md_email_cc", {
template: "parts_return_slip",
})}
rules={[
{
//message: t("general.validation.required"),
type: "array",
},
]}
>
<Select mode="tags" />
</Form.Item>
<Form.Item <Form.Item
name={["tt_allow_post_to_invoiced"]} name={["tt_allow_post_to_invoiced"]}
label={t("bodyshop.fields.tt_allow_post_to_invoiced")} label={t("bodyshop.fields.tt_allow_post_to_invoiced")}

View File

@@ -162,32 +162,6 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
<Switch /> <Switch />
</Form.Item> </Form.Item>
)} )}
{bodyshop.pbs_serialnumber && (
<Form.Item
label={t("bodyshop.fields.dms.appostingaccount")}
name={["pbs_configuration", "appostingaccount"]}
>
<Select
options={[
{ value: "wip", label: "WIP" },
{ value: "cogs", label: "COGS" },
]}
/>
</Form.Item>
)}
{bodyshop.pbs_serialnumber && (
<Form.Item
label={t("bodyshop.fields.dms.apcontrol")}
name={["pbs_configuration", "apcontrol"]}
>
<Select
options={[
{ value: "ro", label: "RO Number" },
{ value: "vendordmsid", label: "Vendor DMS ID" },
]}
/>
</Form.Item>
)}
</LayoutFormRow> </LayoutFormRow>
<LayoutFormRow header={t("bodyshop.labels.dms.cdk.payers")}> <LayoutFormRow header={t("bodyshop.labels.dms.cdk.payers")}>
<Form.List name={["cdk_configuration", "payers"]}> <Form.List name={["cdk_configuration", "payers"]}>

View File

@@ -1,25 +1,21 @@
import { useMutation } from "@apollo/client"; import { useMutation } from "@apollo/client";
import { Button, Card, Form, notification, Space } from "antd"; import { Button, Card, Form, notification, Space } from "antd";
import axios from "axios"; import axios from "axios";
import moment from "moment";
import React, { useState } from "react"; import React, { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { createStructuredSelector } from "reselect"; import { createStructuredSelector } from "reselect";
import { INSERT_NEW_TIME_TICKET } from "../../graphql/timetickets.queries"; import { INSERT_NEW_TIME_TICKET } from "../../graphql/timetickets.queries";
import { setModalContext } from "../../redux/modals/modals.actions";
import { selectTechnician } from "../../redux/tech/tech.selectors"; import { selectTechnician } from "../../redux/tech/tech.selectors";
import { import { selectBodyshop } from "../../redux/user/user.selectors";
selectBodyshop,
selectCurrentUser,
} from "../../redux/user/user.selectors";
import TechJobPrintTickets from "../tech-job-print-tickets/tech-job-print-tickets.component";
import TechClockInComponent from "./tech-job-clock-in-form.component"; import TechClockInComponent from "./tech-job-clock-in-form.component";
import TechJobPrintTickets from "../tech-job-print-tickets/tech-job-print-tickets.component";
import moment from "moment";
import { setModalContext } from "../../redux/modals/modals.actions";
const mapStateToProps = createStructuredSelector({ const mapStateToProps = createStructuredSelector({
technician: selectTechnician, technician: selectTechnician,
bodyshop: selectBodyshop, bodyshop: selectBodyshop,
currentUser: selectCurrentUser,
}); });
const mapDispatchToProps = (dispatch) => ({ const mapDispatchToProps = (dispatch) => ({
setTimeTicketContext: (context) => setTimeTicketContext: (context) =>
@@ -29,10 +25,9 @@ export function TechClockInContainer({
setTimeTicketContext, setTimeTicketContext,
technician, technician,
bodyshop, bodyshop,
currentUser,
}) { }) {
console.log( console.log(
"🚀 ~ file: tech-job-clock-in-form.container.jsx:30 ~ technician:", "🚀 ~ file: tech-job-clock-in-form.container.jsx:29 ~ technician:",
technician technician
); );
const [form] = Form.useForm(); const [form] = Form.useForm();
@@ -71,12 +66,6 @@ export function TechClockInContainer({
values.cost_center values.cost_center
); );
}), }),
created_by: currentUser.email.concat(
" | ",
technician.employee_number
.concat(" ", technician.first_name, " ", technician.last_name)
.trim()
),
}, },
], ],
}, },
@@ -111,24 +100,13 @@ export function TechClockInContainer({
employeeid: technician.id, employeeid: technician.id,
flat_rate: emps.flat_rate, flat_rate: emps.flat_rate,
}, },
created_by: currentUser.email.concat(
" | ",
technician.employee_number
.concat(
" ",
technician.first_name,
" ",
technician.last_name
)
.trim()
),
}, },
}); });
}} }}
> >
{t("timetickets.actions.enter")} {t("timetickets.actions.enter")}
</Button> </Button>
<TechJobPrintTickets attendacePrint={false} /> <TechJobPrintTickets />
<Button <Button
type="primary" type="primary"
onClick={() => form.submit()} onClick={() => form.submit()}

View File

@@ -5,10 +5,10 @@ import {
Col, Col,
Form, Form,
InputNumber, InputNumber,
notification,
Popover, Popover,
Row, Row,
Select, Select,
notification,
} from "antd"; } from "antd";
import axios from "axios"; import axios from "axios";
import React, { useState } from "react"; import React, { useState } from "react";
@@ -16,14 +16,13 @@ import { useTranslation } from "react-i18next";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { createStructuredSelector } from "reselect"; import { createStructuredSelector } from "reselect";
import { logImEXEvent } from "../../firebase/firebase.utils"; import { logImEXEvent } from "../../firebase/firebase.utils";
import { GET_LINE_TICKET_BY_PK } from "../../graphql/jobs-lines.queries";
import { UPDATE_JOB_STATUS } from "../../graphql/jobs.queries";
import { UPDATE_TIME_TICKET } from "../../graphql/timetickets.queries"; import { UPDATE_TIME_TICKET } from "../../graphql/timetickets.queries";
import { selectTechnician } from "../../redux/tech/tech.selectors"; import { selectTechnician } from "../../redux/tech/tech.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors"; import { selectBodyshop } from "../../redux/user/user.selectors";
import { CalculateAllocationsTotals } from "../labor-allocations-table/labor-allocations-table.utility";
import TechJobClockoutDelete from "../tech-job-clock-out-delete/tech-job-clock-out-delete.component"; import TechJobClockoutDelete from "../tech-job-clock-out-delete/tech-job-clock-out-delete.component";
import { LaborAllocationContainer } from "../time-ticket-modal/time-ticket-modal.component"; import { LaborAllocationContainer } from "../time-ticket-modal/time-ticket-modal.component";
import { GET_LINE_TICKET_BY_PK } from "../../graphql/jobs-lines.queries";
import { CalculateAllocationsTotals } from "../labor-allocations-table/labor-allocations-table.utility";
const mapStateToProps = createStructuredSelector({ const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop, bodyshop: selectBodyshop,
@@ -41,7 +40,6 @@ export function TechClockOffButton({
}) { }) {
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [updateTimeticket] = useMutation(UPDATE_TIME_TICKET); const [updateTimeticket] = useMutation(UPDATE_TIME_TICKET);
const [updateJobStatus] = useMutation(UPDATE_JOB_STATUS);
const [form] = Form.useForm(); const [form] = Form.useForm();
const { queryLoading, data: lineTicketData } = useQuery( const { queryLoading, data: lineTicketData } = useQuery(
GET_LINE_TICKET_BY_PK, GET_LINE_TICKET_BY_PK,
@@ -61,8 +59,7 @@ export function TechClockOffButton({
const handleFinish = async (values) => { const handleFinish = async (values) => {
logImEXEvent("tech_clock_out_job"); logImEXEvent("tech_clock_out_job");
const status = values.status;
delete values.status;
setLoading(true); setLoading(true);
const result = await updateTimeticket({ const result = await updateTimeticket({
variables: { variables: {
@@ -101,26 +98,6 @@ export function TechClockOffButton({
message: t("timetickets.successes.clockedout"), message: t("timetickets.successes.clockedout"),
}); });
} }
if (!isShiftTicket) {
const job_update_result = await updateJobStatus({
variables: {
jobId: jobId,
status: status,
},
});
if (!!job_update_result.errors) {
notification["error"]({
message: t("jobs.errors.updating", {
message: JSON.stringify(result.errors),
}),
});
} else {
notification["success"]({
message: t("jobs.successes.updated"),
});
}
}
setLoading(false); setLoading(false);
if (completedCallback) completedCallback(); if (completedCallback) completedCallback();
}; };
@@ -218,6 +195,7 @@ export function TechClockOffButton({
</Form.Item> </Form.Item>
</div> </div>
) : null} ) : null}
<Form.Item <Form.Item
name="cost_center" name="cost_center"
label={t("timetickets.fields.cost_center")} label={t("timetickets.fields.cost_center")}
@@ -250,29 +228,6 @@ export function TechClockOffButton({
</Select> </Select>
</Form.Item> </Form.Item>
{isShiftTicket ? (
<div></div>
) : (
<Form.Item
name="status"
label={t("jobs.fields.status")}
initialValue={
lineTicketData && lineTicketData.jobs_by_pk.status
}
rules={[
{
required: true,
//message: t("general.validation.required"),
},
]}
>
<Select>
{bodyshop.md_ro_statuses.production_statuses.map((item) => (
<Select.Option key={item}></Select.Option>
))}
</Select>
</Form.Item>
)}
<Button type="primary" htmlType="submit" loading={loading}> <Button type="primary" htmlType="submit" loading={loading}>
{t("general.actions.save")} {t("general.actions.save")}
</Button> </Button>

View File

@@ -1,4 +1,4 @@
import { Button, Card, DatePicker, Form, Popover, Radio, Space } from "antd"; import { Button, Card, DatePicker, Form, Popover, Space } from "antd";
import moment from "moment"; import moment from "moment";
import React, { useEffect, useState } from "react"; import React, { useEffect, useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
@@ -21,13 +21,12 @@ export default connect(
mapDispatchToProps mapDispatchToProps
)(TechJobPrintTickets); )(TechJobPrintTickets);
export function TechJobPrintTickets({ technician, event, attendacePrint }) { export function TechJobPrintTickets({ technician, event }) {
const { t } = useTranslation(); const { t } = useTranslation();
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [form] = Form.useForm(); const [form] = Form.useForm();
const [visibility, setVisibility] = useState(false); const [visibility, setVisibility] = useState(false);
const Templates = TemplateList("report_center");
useEffect(() => { useEffect(() => {
if (visibility && event) { if (visibility && event) {
@@ -45,10 +44,7 @@ export function TechJobPrintTickets({ technician, event, attendacePrint }) {
try { try {
await GenerateDocument( await GenerateDocument(
{ {
name: name: TemplateList().timetickets_employee.key,
attendacePrint === true
? Templates.attendance_employee.key
: Templates.timetickets_employee.key,
variables: { variables: {
...(start ...(start
? { start: moment(start).startOf("day").format("YYYY-MM-DD") } ? { start: moment(start).startOf("day").format("YYYY-MM-DD") }
@@ -64,12 +60,9 @@ export function TechJobPrintTickets({ technician, event, attendacePrint }) {
}, },
{ {
to: technician.email, to: technician.email,
subject: subject: TemplateList().timetickets_employee.subject,
attendacePrint === true
? Templates.attendance_employee.subject
: Templates.timetickets_employee.subject,
}, },
values.sendby // === "email" ? "e" : "p" "p"
); );
} catch (error) { } catch (error) {
console.log(error); console.log(error);
@@ -99,25 +92,10 @@ export function TechJobPrintTickets({ technician, event, attendacePrint }) {
format={"MM/DD/YYYY"} format={"MM/DD/YYYY"}
/> />
</Form.Item> </Form.Item>
<Form.Item dependencies={["dates"]}>
{() => {
return (
<Form.Item
label={t("general.labels.sendby")}
name="sendby"
initialValue="p"
>
<Radio.Group>
<Radio value="e">{t("general.labels.email")}</Radio>
<Radio value="p">{t("general.labels.print")}</Radio>
</Radio.Group>
</Form.Item>
);
}}
</Form.Item>
<Space wrap> <Space wrap>
<Button type="primary" onClick={() => form.submit()}> <Button type="primary" onClick={() => form.submit()}>
{t("reportcenter.actions.generate")} {t("general.actions.print")}
</Button> </Button>
<Button <Button
onClick={() => { onClick={() => {
@@ -140,7 +118,7 @@ export function TechJobPrintTickets({ technician, event, attendacePrint }) {
return ( return (
<Popover content={overlay} visible={visibility}> <Popover content={overlay} visible={visibility}>
<Button loading={loading} onClick={handleClick}> <Button loading={loading} onClick={handleClick}>
{t("general.labels.reports")} {t("general.actions.print")}
</Button> </Button>
</Popover> </Popover>
); );

View File

@@ -9,10 +9,9 @@ import { createStructuredSelector } from "reselect";
import { import {
selectAuthLevel, selectAuthLevel,
selectBodyshop, selectBodyshop,
selectCurrentUser,
} from "../../redux/user/user.selectors"; } from "../../redux/user/user.selectors";
import { DateFormatter, DateTimeFormatter } from "../../utils/DateFormatter";
import { onlyUnique } from "../../utils/arrayHelper"; import { onlyUnique } from "../../utils/arrayHelper";
import { DateFormatter, DateTimeFormatter } from "../../utils/DateFormatter";
import { alphaSort, dateSort } from "../../utils/sorters"; import { alphaSort, dateSort } from "../../utils/sorters";
import RbacWrapper, { import RbacWrapper, {
HasRbacAccess, HasRbacAccess,
@@ -21,7 +20,6 @@ import TimeTicketEnterButton from "../time-ticket-enter-button/time-ticket-enter
const mapStateToProps = createStructuredSelector({ const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop, bodyshop: selectBodyshop,
authLevel: selectAuthLevel, authLevel: selectAuthLevel,
currentUser: selectCurrentUser,
}); });
const mapDispatchToProps = (dispatch) => ({ const mapDispatchToProps = (dispatch) => ({
//setUserLanguage: language => dispatch(setUserLanguage(language)) //setUserLanguage: language => dispatch(setUserLanguage(language))
@@ -31,7 +29,6 @@ export default connect(mapStateToProps, mapDispatchToProps)(TimeTicketList);
export function TimeTicketList({ export function TimeTicketList({
bodyshop, bodyshop,
authLevel, authLevel,
currentUser,
disabled, disabled,
loading, loading,
timetickets, timetickets,
@@ -196,15 +193,7 @@ export function TimeTicketList({
} }
}, },
}, },
{
title: t("timetickets.fields.created_by"),
dataIndex: "created_by",
key: "created_by",
sorter: (a, b) => alphaSort(a.created_by, b.created_by),
sortOrder:
state.sortedInfo.columnKey === "created_by" && state.sortedInfo.order,
render: (text, record) => record.created_by,
},
{ {
title: t("general.labels.actions"), title: t("general.labels.actions"),
dataIndex: "actions", dataIndex: "actions",
@@ -265,12 +254,7 @@ export function TimeTicketList({
(techConsole ? null : ( (techConsole ? null : (
<TimeTicketEnterButton <TimeTicketEnterButton
actions={{ refetch }} actions={{ refetch }}
context={{ context={{ jobId: jobId }}
jobId: jobId,
created_by: currentUser.displayName
? currentUser.email.concat(" | ", currentUser.displayName)
: currentUser.email,
}}
disabled={disabled} disabled={disabled}
> >
{t("timetickets.actions.enter")} {t("timetickets.actions.enter")}

View File

@@ -1,5 +1,5 @@
import { useMutation, useQuery } from "@apollo/client"; import { useMutation, useQuery } from "@apollo/client";
import { Button, Form, Modal, PageHeader, Space, notification } from "antd"; import { Button, Form, Modal, notification, PageHeader, Space } from "antd";
import moment from "moment"; import moment from "moment";
import React, { useEffect, useState } from "react"; import React, { useEffect, useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
@@ -77,7 +77,6 @@ export function TimeTicketModalContainer({
)[0].rate )[0].rate
: null, : null,
bodyshopid: bodyshop.id, bodyshopid: bodyshop.id,
created_by: timeTicketModal.context.created_by,
}, },
], ],
}, },

View File

@@ -4,67 +4,48 @@ import { useTranslation } from "react-i18next";
import { DateTimeFormatter } from "../../utils/DateFormatter"; import { DateTimeFormatter } from "../../utils/DateFormatter";
import DataLabel from "../data-label/data-label.component"; import DataLabel from "../data-label/data-label.component";
import TechClockOffButton from "../tech-job-clock-out-button/tech-job-clock-out-button.component"; import TechClockOffButton from "../tech-job-clock-out-button/tech-job-clock-out-button.component";
import TechJobPrintTickets from "../tech-job-print-tickets/tech-job-print-tickets.component";
export default function TimeTicketShiftActive({ export default function TimeTicketShiftActive({ timetickets, refetch }) {
timetickets,
refetch,
isTechConsole,
}) {
const { t } = useTranslation(); const { t } = useTranslation();
return ( return (
<div> <div>
{timetickets.length > 0 ? ( {timetickets.length > 0 ? (
<div <div>
style={{ <Typography.Title level={2}>
display: "flex", {t("timetickets.labels.shiftalreadyclockedon")}
justifyContent: "space-between", </Typography.Title>
flexDirection: "column", <List
height: "100%", grid={{
}} gutter: 32,
> xs: 1,
<div style={{ display: "flex", justifyContent: "space-between" }}> sm: 2,
<Typography.Title level={2}> md: 3,
{t("timetickets.labels.shiftalreadyclockedon")} lg: 4,
</Typography.Title> xl: 5,
{isTechConsole ? ( xxl: 6,
<TechJobPrintTickets attendacePrint={true} /> }}
) : null} dataSource={timetickets || []}
</div> renderItem={(ticket) => (
<div style={{ flexGrow: 1 }}> <List.Item>
<List <Card
grid={{ title={t(ticket.memo)}
gutter: 32, actions={[
xs: 1, <TechClockOffButton
sm: 2, jobId={ticket.jobid}
md: 3, timeTicketId={ticket.id}
lg: 4, completedCallback={refetch}
xl: 5, isShiftTicket
xxl: 6, />,
}} ]}
dataSource={timetickets || []} >
renderItem={(ticket) => ( <DataLabel label={t("timetickets.fields.clockon")}>
<List.Item> <DateTimeFormatter>{ticket.clockon}</DateTimeFormatter>
<Card </DataLabel>
title={t(ticket.memo)} </Card>
actions={[ </List.Item>
<TechClockOffButton )}
jobId={ticket.jobid} ></List>
timeTicketId={ticket.id}
completedCallback={refetch}
isShiftTicket
/>,
]}
>
<DataLabel label={t("timetickets.fields.clockon")}>
<DateTimeFormatter>{ticket.clockon}</DateTimeFormatter>
</DataLabel>
</Card>
</List.Item>
)}
></List>
</div>
</div> </div>
) : null} ) : null}
</div> </div>

View File

@@ -1,5 +1,5 @@
import { useMutation } from "@apollo/client"; import { useMutation } from "@apollo/client";
import { Button, Form, Space, notification } from "antd"; import { Button, Form, notification } from "antd";
import axios from "axios"; import axios from "axios";
import moment from "moment"; import moment from "moment";
import React, { useMemo, useState } from "react"; import React, { useMemo, useState } from "react";
@@ -12,7 +12,6 @@ import {
selectBodyshop, selectBodyshop,
selectCurrentUser, selectCurrentUser,
} from "../../redux/user/user.selectors"; } from "../../redux/user/user.selectors";
import TechJobPrintTickets from "../tech-job-print-tickets/tech-job-print-tickets.component";
import TimeTicektShiftComponent from "./time-ticket-shift-form.component"; import TimeTicektShiftComponent from "./time-ticket-shift-form.component";
const mapStateToProps = createStructuredSelector({ const mapStateToProps = createStructuredSelector({
currentUser: selectCurrentUser, currentUser: selectCurrentUser,
@@ -30,10 +29,6 @@ export function TimeTicektShiftContainer({
isTechConsole, isTechConsole,
checkIfAlreadyClocked, checkIfAlreadyClocked,
}) { }) {
console.log(
"🚀 ~ file: time-ticket-shift-form.container.jsx:28 ~ technician:",
technician
);
const [form] = Form.useForm(); const [form] = Form.useForm();
const [insertTimeTicket] = useMutation(INSERT_NEW_TIME_TICKET); const [insertTimeTicket] = useMutation(INSERT_NEW_TIME_TICKET);
const { t } = useTranslation(); const { t } = useTranslation();
@@ -70,21 +65,6 @@ export function TimeTicektShiftContainer({
clockon: theTime, clockon: theTime,
date: theTime, date: theTime,
memo: values.memo, memo: values.memo,
created_by: isTechConsole
? currentUser.email.concat(
" | ",
technician.employee_number
.concat(
" ",
technician.first_name,
" ",
technician.last_name
)
.trim()
)
: currentUser.displayName
? currentUser.email.concat(" | ", currentUser.displayName)
: currentUser.email,
}, },
], ],
}, },
@@ -118,14 +98,9 @@ export function TimeTicektShiftContainer({
initialValues={{ cost_center: t("timetickets.labels.shift") }} initialValues={{ cost_center: t("timetickets.labels.shift") }}
> >
<TimeTicektShiftComponent form={form} /> <TimeTicektShiftComponent form={form} />
<Space wrap> <Button htmlType="submit" loading={loading}>
<Button htmlType="submit" loading={loading} type="primary"> {t("timetickets.actions.clockin")}
{t("timetickets.actions.clockin")} </Button>
</Button>
{isTechConsole === true ? (
<TechJobPrintTickets attendacePrint={true} />
) : null}
</Space>
</Form> </Form>
</div> </div>
); );

View File

@@ -76,7 +76,6 @@ export function TimeTicketShiftContainer({
<TimeTicketShiftActive <TimeTicketShiftActive
timetickets={data ? data.timetickets : []} timetickets={data ? data.timetickets : []}
refetch={refetch} refetch={refetch}
isTechConsole={isTechConsole}
/> />
) : ( ) : (
<TimeTicketShiftFormContainer <TimeTicketShiftFormContainer

View File

@@ -34,7 +34,6 @@ export const GET_LINE_TICKET_BY_PK = gql`
id id
lbr_adjustments lbr_adjustments
converted converted
status
} }
joblines(where: { jobid: { _eq: $id }, removed: { _eq: false } }) { joblines(where: { jobid: { _eq: $id }, removed: { _eq: false } }) {
id id
@@ -57,7 +56,6 @@ export const GET_LINE_TICKET_BY_PK = gql`
actualhrs actualhrs
ciecacode ciecacode
cost_center cost_center
created_by
date date
id id
jobid jobid

View File

@@ -682,7 +682,6 @@ export const GET_JOB_BY_PK = gql`
date_rentalresp date_rentalresp
date_exported date_exported
date_repairstarted date_repairstarted
date_void
status status
owner_owing owner_owing
tax_registration_number tax_registration_number
@@ -1079,7 +1078,6 @@ export const UPDATE_JOB = gql`
scheduled_completion scheduled_completion
actual_in actual_in
date_repairstarted date_repairstarted
date_void
} }
} }
} }
@@ -1127,7 +1125,6 @@ export const VOID_JOB = gql`
update_jobs_by_pk(_set: $job, pk_columns: { id: $jobId }) { update_jobs_by_pk(_set: $job, pk_columns: { id: $jobId }) {
id id
date_exported date_exported
date_void
status status
alt_transport alt_transport
ro_number ro_number
@@ -1222,10 +1219,10 @@ export const ACTIVE_JOBS_FOR_AUTOCOMPLETE = gql`
query ACTIVE_JOBS_FOR_AUTOCOMPLETE($statuses: [String!]!) { query ACTIVE_JOBS_FOR_AUTOCOMPLETE($statuses: [String!]!) {
jobs(where: { status: { _in: $statuses } }) { jobs(where: { status: { _in: $statuses } }) {
id id
ownr_co_nm
ownr_fn ownr_fn
ownr_ln ownr_ln
ro_number ro_number
vehicleid vehicleid
v_make_desc v_make_desc
v_model_desc v_model_desc
@@ -1253,7 +1250,6 @@ export const SEARCH_JOBS_FOR_AUTOCOMPLETE = gql`
} }
) { ) {
id id
ownr_co_nm
ownr_fn ownr_fn
ownr_ln ownr_ln
ro_number ro_number
@@ -1270,7 +1266,6 @@ export const SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE = gql`
query SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE($id: uuid!) { query SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE($id: uuid!) {
jobs_by_pk(id: $id) { jobs_by_pk(id: $id) {
id id
ownr_co_nm
ownr_fn ownr_fn
ownr_ln ownr_ln
ro_number ro_number
@@ -1289,7 +1284,6 @@ export const SEARCH_FOR_JOBS = gql`
search_jobs(args: { search: $search }, limit: 25) { search_jobs(args: { search: $search }, limit: 25) {
id id
ro_number ro_number
ownr_co_nm
ownr_fn ownr_fn
ownr_ln ownr_ln
} }

View File

@@ -37,7 +37,6 @@ export const QUERY_TIME_TICKETS_IN_RANGE = gql`
clockon clockon
cost_center cost_center
created_at created_at
created_by
date date
id id
rate rate
@@ -81,7 +80,6 @@ export const QUERY_TIME_TICKETS_TECHNICIAN_IN_RANGE = gql`
clockon clockon
cost_center cost_center
created_at created_at
created_by
date date
id id
rate rate
@@ -114,7 +112,6 @@ export const QUERY_TIME_TICKETS_TECHNICIAN_IN_RANGE = gql`
clockon clockon
cost_center cost_center
created_at created_at
created_by
date date
id id
rate rate
@@ -154,7 +151,6 @@ export const QUERY_TIME_TICKETS_IN_RANGE_SB = gql`
clockon clockon
cost_center cost_center
created_at created_at
created_by
date date
id id
rate rate
@@ -185,7 +181,6 @@ export const QUERY_TIME_TICKETS_IN_RANGE_SB = gql`
clockon clockon
cost_center cost_center
created_at created_at
created_by
date date
id id
rate rate
@@ -215,7 +210,6 @@ export const INSERT_NEW_TIME_TICKET = gql`
insert_timetickets(objects: $timeTicketInput) { insert_timetickets(objects: $timeTicketInput) {
returning { returning {
id id
created_by
clockon clockon
clockoff clockoff
employeeid employeeid

View File

@@ -13,7 +13,7 @@ import queryString from "query-string";
import React, { useEffect, useRef, useState } from "react"; import React, { useEffect, useRef, useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { Link, useHistory, useLocation } from "react-router-dom"; import { useHistory, useLocation, Link } from "react-router-dom";
import { createStructuredSelector } from "reselect"; import { createStructuredSelector } from "reselect";
import SocketIO from "socket.io-client"; import SocketIO from "socket.io-client";
import AlertComponent from "../../components/alert/alert.component"; import AlertComponent from "../../components/alert/alert.component";
@@ -22,7 +22,6 @@ import DmsCustomerSelector from "../../components/dms-customer-selector/dms-cust
import DmsLogEvents from "../../components/dms-log-events/dms-log-events.component"; import DmsLogEvents from "../../components/dms-log-events/dms-log-events.component";
import DmsPostForm from "../../components/dms-post-form/dms-post-form.component"; import DmsPostForm from "../../components/dms-post-form/dms-post-form.component";
import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component"; import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
import { OwnerNameDisplayFunction } from "../../components/owner-name-display/owner-name-display.component";
import { auth } from "../../firebase/firebase.utils"; import { auth } from "../../firebase/firebase.utils";
import { QUERY_JOB_EXPORT_DMS } from "../../graphql/jobs.queries"; import { QUERY_JOB_EXPORT_DMS } from "../../graphql/jobs.queries";
import { import {
@@ -30,6 +29,7 @@ import {
setSelectedHeader, setSelectedHeader,
} from "../../redux/application/application.actions"; } from "../../redux/application/application.actions";
import { selectBodyshop } from "../../redux/user/user.selectors"; import { selectBodyshop } from "../../redux/user/user.selectors";
import { OwnerNameDisplayFunction } from "../../components/owner-name-display/owner-name-display.component";
const mapStateToProps = createStructuredSelector({ const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop, bodyshop: selectBodyshop,
@@ -46,7 +46,6 @@ export const socket = SocketIO(
process.env.NODE_ENV === "production" process.env.NODE_ENV === "production"
? process.env.REACT_APP_AXIOS_BASE_API_URL ? process.env.REACT_APP_AXIOS_BASE_API_URL
: window.location.origin, : window.location.origin,
// "http://localhost:4000", // for dev testing,
{ {
path: "/ws", path: "/ws",
withCredentials: true, withCredentials: true,

View File

@@ -8,6 +8,7 @@ import {
Form, Form,
Input, Input,
InputNumber, InputNumber,
notification,
PageHeader, PageHeader,
Popconfirm, Popconfirm,
Row, Row,
@@ -16,14 +17,12 @@ import {
Statistic, Statistic,
Switch, Switch,
Typography, Typography,
notification,
} from "antd"; } from "antd";
import React, { useState } from "react"; import React, { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { connect } from "react-redux"; import { connect } from "react-redux";
//import { useHistory } from "react-router-dom"; //import { useHistory } from "react-router-dom";
import { useTreatments } from "@splitsoftware/splitio-react"; import { useTreatments } from "@splitsoftware/splitio-react";
import Dinero from "dinero.js";
import moment from "moment"; import moment from "moment";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
import { createStructuredSelector } from "reselect"; import { createStructuredSelector } from "reselect";
@@ -38,6 +37,7 @@ import { generateJobLinesUpdatesForInvoicing } from "../../graphql/jobs-lines.qu
import { UPDATE_JOB } from "../../graphql/jobs.queries"; import { UPDATE_JOB } from "../../graphql/jobs.queries";
import { selectJobReadOnly } from "../../redux/application/application.selectors"; import { selectJobReadOnly } from "../../redux/application/application.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors"; import { selectBodyshop } from "../../redux/user/user.selectors";
import Dinero from "dinero.js";
const mapStateToProps = createStructuredSelector({ const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop, bodyshop: selectBodyshop,
jobRO: selectJobReadOnly, jobRO: selectJobReadOnly,
@@ -55,11 +55,6 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) {
{}, {},
bodyshop && bodyshop.imexshopid bodyshop && bodyshop.imexshopid
); );
const { ClosingPeriod } = useTreatments(
["ClosingPeriod"],
{},
bodyshop && bodyshop.imexshopid
);
const handleFinish = async ({ removefromproduction, ...values }) => { const handleFinish = async ({ removefromproduction, ...values }) => {
setLoading(true); setLoading(true);
@@ -259,40 +254,12 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) {
if (!value || moment(value).isSameOrAfter(moment(), "day")) { if (!value || moment(value).isSameOrAfter(moment(), "day")) {
return Promise.resolve(); return Promise.resolve();
} }
return Promise.reject( return Promise.reject(
new Error(t("jobs.labels.dms.invoicedatefuture")) new Error(t("jobs.labels.dms.invoicedatefuture"))
); );
}, },
}), }),
({ getFieldValue }) => ({
validator(_, value) {
if (
ClosingPeriod.treatment === "on" &&
bodyshop.accountingconfig.ClosingPeriod
) {
if (
moment(value).isSameOrAfter(
moment(
bodyshop.accountingconfig.ClosingPeriod[0]
).startOf("day")
) &&
moment(value).isSameOrBefore(
moment(
bodyshop.accountingconfig.ClosingPeriod[1]
).endOf("day")
)
) {
return Promise.resolve();
} else {
return Promise.reject(
new Error(t("jobs.labels.closingperiod"))
);
}
} else {
return Promise.resolve();
}
},
}),
]} ]}
> >
<DateTimePicker <DateTimePicker

View File

@@ -1,24 +1,21 @@
import { BackTop, Layout } from "antd"; import { BackTop, Layout } from "antd";
import React, { Suspense, lazy, useEffect } from "react"; import React, { lazy, Suspense, useEffect } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { connect } from "react-redux"; import { connect } from "react-redux";
import { Redirect, Route, Switch } from "react-router-dom"; import { Redirect, Route, Switch } from "react-router-dom";
import { createStructuredSelector } from "reselect"; import { createStructuredSelector } from "reselect";
import ErrorBoundary from "../../components/error-boundary/error-boundary.component"; import ErrorBoundary from "../../components/error-boundary/error-boundary.component";
import FeatureWrapper from "../../components/feature-wrapper/feature-wrapper.component";
import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component"; import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
import TechHeader from "../../components/tech-header/tech-header.component"; import TechHeader from "../../components/tech-header/tech-header.component";
import TechSider from "../../components/tech-sider/tech-sider.component"; import TechSider from "../../components/tech-sider/tech-sider.component";
import UpdateAlert from "../../components/update-alert/update-alert.component";
import { selectTechnician } from "../../redux/tech/tech.selectors"; import { selectTechnician } from "../../redux/tech/tech.selectors";
import FeatureWrapper from "../../components/feature-wrapper/feature-wrapper.component";
import "./tech.page.styles.scss"; import "./tech.page.styles.scss";
import UpdateAlert from "../../components/update-alert/update-alert.component";
const TimeTicketModalContainer = lazy(() => const TimeTicketModalContainer = lazy(() =>
import("../../components/time-ticket-modal/time-ticket-modal.container") import("../../components/time-ticket-modal/time-ticket-modal.container")
); );
const EmailOverlayContainer = lazy(() =>
import("../../components/email-overlay/email-overlay.container.jsx")
);
const PrintCenterModalContainer = lazy(() => const PrintCenterModalContainer = lazy(() =>
import("../../components/print-center-modal/print-center-modal.container") import("../../components/print-center-modal/print-center-modal.container")
); );
@@ -72,7 +69,6 @@ export function TechPage({ technician, match }) {
> >
<FeatureWrapper featureName="tech-console"> <FeatureWrapper featureName="tech-console">
<TimeTicketModalContainer /> <TimeTicketModalContainer />
<EmailOverlayContainer />
<PrintCenterModalContainer /> <PrintCenterModalContainer />
<Switch> <Switch>
<Route <Route

View File

@@ -101,7 +101,6 @@
"messages": { "messages": {
"admin_jobmarkexported": "ADMIN: Job marked as exported.", "admin_jobmarkexported": "ADMIN: Job marked as exported.",
"admin_jobmarkforreexport": "ADMIN: Job marked for re-export.", "admin_jobmarkforreexport": "ADMIN: Job marked for re-export.",
"admin_jobuninvoice": "ADMIN: Job has been uninvoiced.",
"admin_jobunvoid": "ADMIN: Job has been unvoided.", "admin_jobunvoid": "ADMIN: Job has been unvoided.",
"billposted": "Bill with invoice number {{invoice_number}} posted.", "billposted": "Bill with invoice number {{invoice_number}} posted.",
"billupdated": "Bill with invoice number {{invoice_number}} updated.", "billupdated": "Bill with invoice number {{invoice_number}} updated.",
@@ -223,7 +222,6 @@
"reexport": "Bill marked for re-export." "reexport": "Bill marked for re-export."
}, },
"validation": { "validation": {
"closingperiod": "This Bill Date is outside of the Closing Period.",
"inventoryquantity": "Quantity must be greater than or equal to what has been added to inventory ({{number}}).", "inventoryquantity": "Quantity must be greater than or equal to what has been added to inventory ({{number}}).",
"manualinhouse": "Manual posting to the in house vendor is restricted. ", "manualinhouse": "Manual posting to the in house vendor is restricted. ",
"unique_invoice_number": "This invoice number has already been entered for this vendor." "unique_invoice_number": "This invoice number has already been entered for this vendor."
@@ -263,7 +261,6 @@
"bill_local_tax_rate": "Bill - Provincial/State Tax Rate %", "bill_local_tax_rate": "Bill - Provincial/State Tax Rate %",
"bill_state_tax_rate": "Bill - Provincial/State Tax Rate %", "bill_state_tax_rate": "Bill - Provincial/State Tax Rate %",
"city": "City", "city": "City",
"closingperiod": "Closing Period",
"country": "Country", "country": "Country",
"dailybodytarget": "Scoreboard - Daily Body Target", "dailybodytarget": "Scoreboard - Daily Body Target",
"dailypainttarget": "Scoreboard - Daily Paint Target", "dailypainttarget": "Scoreboard - Daily Paint Target",
@@ -272,8 +269,6 @@
"templates": "Delivery Templates" "templates": "Delivery Templates"
}, },
"dms": { "dms": {
"apcontrol": "AP Control Number",
"appostingaccount": "AP Posting Account",
"cashierid": "Cashier ID", "cashierid": "Cashier ID",
"default_journal": "Default Journal", "default_journal": "Default Journal",
"disablebillwip": "Disable bill WIP for A/P Posting", "disablebillwip": "Disable bill WIP for A/P Posting",
@@ -1092,7 +1087,6 @@
"passwordsdonotmatch": "The passwords you have entered do not match.", "passwordsdonotmatch": "The passwords you have entered do not match.",
"print": "Print", "print": "Print",
"refresh": "Refresh", "refresh": "Refresh",
"reports": "Reports",
"required": "Required", "required": "Required",
"saturday": "Saturday", "saturday": "Saturday",
"search": "Search...", "search": "Search...",
@@ -1443,7 +1437,6 @@
"date_repairstarted": "Repairs Started", "date_repairstarted": "Repairs Started",
"date_scheduled": "Scheduled", "date_scheduled": "Scheduled",
"date_towin": "Towed In", "date_towin": "Towed In",
"date_void": "Void",
"ded_amt": "Deductible", "ded_amt": "Deductible",
"ded_note": "Deductible Note", "ded_note": "Deductible Note",
"ded_status": "Deductible Status", "ded_status": "Deductible Status",
@@ -1459,7 +1452,6 @@
"cost_dms_acctnumber": "Cost DMS Acct #", "cost_dms_acctnumber": "Cost DMS Acct #",
"dms_make": "DMS Make", "dms_make": "DMS Make",
"dms_model": "DMS Model", "dms_model": "DMS Model",
"dms_unsold": "New, Unsold Vehicle",
"dms_wip_acctnumber": "Cost WIP DMS Acct #", "dms_wip_acctnumber": "Cost WIP DMS Acct #",
"id": "DMS ID", "id": "DMS ID",
"inservicedate": "In Service Date", "inservicedate": "In Service Date",
@@ -1691,7 +1683,6 @@
"checklists": "Checklists", "checklists": "Checklists",
"closeconfirm": "Are you sure you want to close this job? This cannot be easily undone.", "closeconfirm": "Are you sure you want to close this job? This cannot be easily undone.",
"closejob": "Close Job {{ro_number}}", "closejob": "Close Job {{ro_number}}",
"closingperiod": "This Invoice Date is outside of the Closing Period.",
"contracts": "CC Contracts", "contracts": "CC Contracts",
"convertedtolabor": "Lines Converted to Labor", "convertedtolabor": "Lines Converted to Labor",
"cost": "Cost", "cost": "Cost",
@@ -2226,17 +2217,17 @@
"external": "External", "external": "External",
"findermodal": "ICBC Payment Finder", "findermodal": "ICBC Payment Finder",
"insurance": "Insurance", "insurance": "Insurance",
"markexported": "Mark Exported",
"markforreexport": "Mark for Re-export",
"new": "New Payment", "new": "New Payment",
"signup": "Please contact support to sign up for electronic payments.", "signup": "Please contact support to sign up for electronic payments.",
"title": "Payments", "title": "Payments",
"totalpayments": "Total Payments" "totalpayments": "Total Payments",
"markexported": "Mark Exported",
"markforreexport": "Mark for Re-export"
}, },
"successes": { "successes": {
"exported": "Payment(s) exported successfully.", "exported": "Payment(s) exported successfully.",
"markexported": "Payment(s) marked exported.",
"markreexported": "Payment marked for re-export successfully", "markreexported": "Payment marked for re-export successfully",
"markexported": "Payment(s) marked exported.",
"payment": "Payment created successfully. ", "payment": "Payment created successfully. ",
"stripe": "Credit card transaction charged successfully." "stripe": "Credit card transaction charged successfully."
} }
@@ -2412,7 +2403,6 @@
"jobs": { "jobs": {
"individual_job_note": "Job Note RO: {{ro_number}}", "individual_job_note": "Job Note RO: {{ro_number}}",
"parts_order": "Parts Order PO: {{ro_number}} - {{name}}", "parts_order": "Parts Order PO: {{ro_number}} - {{name}}",
"parts_return_slip":"Parts Return PO: {{ro_number}} - {{name}}",
"sublet_order": "Sublet Order PO: {{ro_number}} - {{name}}" "sublet_order": "Sublet Order PO: {{ro_number}} - {{name}}"
} }
}, },
@@ -2580,7 +2570,6 @@
"jobs_completed_not_invoiced": "Jobs Completed not Invoiced", "jobs_completed_not_invoiced": "Jobs Completed not Invoiced",
"jobs_invoiced_not_exported": "Jobs Invoiced not Exported", "jobs_invoiced_not_exported": "Jobs Invoiced not Exported",
"jobs_reconcile": "Parts/Sublet/Labor Reconciliation", "jobs_reconcile": "Parts/Sublet/Labor Reconciliation",
"jobs_scheduled_completion": "Jobs Scheduled Completion",
"lag_time": "Lag Time", "lag_time": "Lag Time",
"open_orders": "Open Orders by Date", "open_orders": "Open Orders by Date",
"open_orders_csr": "Open Orders by CSR", "open_orders_csr": "Open Orders by CSR",
@@ -2629,7 +2618,6 @@
"timetickets_summary": "Time Tickets Summary", "timetickets_summary": "Time Tickets Summary",
"unclaimed_hrs": "Unclaimed Hours", "unclaimed_hrs": "Unclaimed Hours",
"void_ros": "Void ROs", "void_ros": "Void ROs",
"work_in_progress_jobs": "Work in Progress - Jobs",
"work_in_progress_labour": "Work in Progress - Labor", "work_in_progress_labour": "Work in Progress - Labor",
"work_in_progress_payables": "Work in Progress - Payables" "work_in_progress_payables": "Work in Progress - Payables"
} }
@@ -2638,8 +2626,8 @@
"labels": { "labels": {
"atssummary": "ATS Summary", "atssummary": "ATS Summary",
"employeevacation": "Employee Vacations", "employeevacation": "Employee Vacations",
"estimators": "Filter by Writer/Customer Rep.",
"ins_co_nm_filter": "Filter by Insurance Company", "ins_co_nm_filter": "Filter by Insurance Company",
"estimators": "Filter by Writer/Customer Rep.",
"intake": "Intake Events", "intake": "Intake Events",
"manual": "Manual Events", "manual": "Manual Events",
"manualevent": "Add Manual Event" "manualevent": "Add Manual Event"
@@ -2731,7 +2719,6 @@
"clockon": "Clocked In", "clockon": "Clocked In",
"committed": "", "committed": "",
"cost_center": "Cost Center", "cost_center": "Cost Center",
"created_by": "Created By",
"date": "Ticket Date", "date": "Ticket Date",
"efficiency": "Efficiency", "efficiency": "Efficiency",
"employee": "Employee", "employee": "Employee",

View File

@@ -101,7 +101,6 @@
"messages": { "messages": {
"admin_jobmarkexported": "", "admin_jobmarkexported": "",
"admin_jobmarkforreexport": "", "admin_jobmarkforreexport": "",
"admin_jobuninvoice": "",
"admin_jobunvoid": "", "admin_jobunvoid": "",
"billposted": "", "billposted": "",
"billupdated": "", "billupdated": "",
@@ -223,7 +222,6 @@
"reexport": "" "reexport": ""
}, },
"validation": { "validation": {
"closingperiod": "",
"inventoryquantity": "", "inventoryquantity": "",
"manualinhouse": "", "manualinhouse": "",
"unique_invoice_number": "" "unique_invoice_number": ""
@@ -263,7 +261,6 @@
"bill_local_tax_rate": "", "bill_local_tax_rate": "",
"bill_state_tax_rate": "", "bill_state_tax_rate": "",
"city": "", "city": "",
"closingperiod": "",
"country": "", "country": "",
"dailybodytarget": "", "dailybodytarget": "",
"dailypainttarget": "", "dailypainttarget": "",
@@ -272,8 +269,6 @@
"templates": "" "templates": ""
}, },
"dms": { "dms": {
"apcontrol": "",
"appostingaccount": "",
"cashierid": "", "cashierid": "",
"default_journal": "", "default_journal": "",
"disablebillwip": "", "disablebillwip": "",
@@ -1092,7 +1087,6 @@
"passwordsdonotmatch": "", "passwordsdonotmatch": "",
"print": "", "print": "",
"refresh": "", "refresh": "",
"reports": "",
"required": "", "required": "",
"saturday": "", "saturday": "",
"search": "Buscar...", "search": "Buscar...",
@@ -1443,7 +1437,6 @@
"date_repairstarted": "", "date_repairstarted": "",
"date_scheduled": "Programado", "date_scheduled": "Programado",
"date_towin": "", "date_towin": "",
"date_void": "",
"ded_amt": "Deducible", "ded_amt": "Deducible",
"ded_note": "", "ded_note": "",
"ded_status": "Estado deducible", "ded_status": "Estado deducible",
@@ -1459,7 +1452,6 @@
"cost_dms_acctnumber": "", "cost_dms_acctnumber": "",
"dms_make": "", "dms_make": "",
"dms_model": "", "dms_model": "",
"dms_unsold": "",
"dms_wip_acctnumber": "", "dms_wip_acctnumber": "",
"id": "", "id": "",
"inservicedate": "", "inservicedate": "",
@@ -1691,7 +1683,6 @@
"checklists": "", "checklists": "",
"closeconfirm": "", "closeconfirm": "",
"closejob": "", "closejob": "",
"closingperiod": "",
"contracts": "", "contracts": "",
"convertedtolabor": "", "convertedtolabor": "",
"cost": "", "cost": "",
@@ -2226,8 +2217,6 @@
"external": "", "external": "",
"findermodal": "", "findermodal": "",
"insurance": "", "insurance": "",
"markexported": "",
"markforreexport": "",
"new": "", "new": "",
"signup": "", "signup": "",
"title": "", "title": "",
@@ -2236,7 +2225,6 @@
"successes": { "successes": {
"exported": "", "exported": "",
"markexported": "", "markexported": "",
"markreexported": "",
"payment": "", "payment": "",
"stripe": "" "stripe": ""
} }
@@ -2412,7 +2400,6 @@
"jobs": { "jobs": {
"individual_job_note": "", "individual_job_note": "",
"parts_order": "", "parts_order": "",
"parts_return_slip": "",
"sublet_order": "" "sublet_order": ""
} }
}, },
@@ -2580,7 +2567,6 @@
"jobs_completed_not_invoiced": "", "jobs_completed_not_invoiced": "",
"jobs_invoiced_not_exported": "", "jobs_invoiced_not_exported": "",
"jobs_reconcile": "", "jobs_reconcile": "",
"jobs_scheduled_completion": "",
"lag_time": "", "lag_time": "",
"open_orders": "", "open_orders": "",
"open_orders_csr": "", "open_orders_csr": "",
@@ -2629,7 +2615,6 @@
"timetickets_summary": "", "timetickets_summary": "",
"unclaimed_hrs": "", "unclaimed_hrs": "",
"void_ros": "", "void_ros": "",
"work_in_progress_jobs": "",
"work_in_progress_labour": "", "work_in_progress_labour": "",
"work_in_progress_payables": "" "work_in_progress_payables": ""
} }
@@ -2638,7 +2623,6 @@
"labels": { "labels": {
"atssummary": "", "atssummary": "",
"employeevacation": "", "employeevacation": "",
"estimators": "",
"ins_co_nm_filter": "", "ins_co_nm_filter": "",
"intake": "", "intake": "",
"manual": "", "manual": "",
@@ -2731,7 +2715,6 @@
"clockon": "", "clockon": "",
"committed": "", "committed": "",
"cost_center": "", "cost_center": "",
"created_by": "",
"date": "", "date": "",
"efficiency": "", "efficiency": "",
"employee": "", "employee": "",

View File

@@ -101,7 +101,6 @@
"messages": { "messages": {
"admin_jobmarkexported": "", "admin_jobmarkexported": "",
"admin_jobmarkforreexport": "", "admin_jobmarkforreexport": "",
"admin_jobuninvoice": "",
"admin_jobunvoid": "", "admin_jobunvoid": "",
"billposted": "", "billposted": "",
"billupdated": "", "billupdated": "",
@@ -223,7 +222,6 @@
"reexport": "" "reexport": ""
}, },
"validation": { "validation": {
"closingperiod": "",
"inventoryquantity": "", "inventoryquantity": "",
"manualinhouse": "", "manualinhouse": "",
"unique_invoice_number": "" "unique_invoice_number": ""
@@ -263,7 +261,6 @@
"bill_local_tax_rate": "", "bill_local_tax_rate": "",
"bill_state_tax_rate": "", "bill_state_tax_rate": "",
"city": "", "city": "",
"closingperiod": "",
"country": "", "country": "",
"dailybodytarget": "", "dailybodytarget": "",
"dailypainttarget": "", "dailypainttarget": "",
@@ -272,8 +269,6 @@
"templates": "" "templates": ""
}, },
"dms": { "dms": {
"apcontrol": "",
"appostingaccount": "",
"cashierid": "", "cashierid": "",
"default_journal": "", "default_journal": "",
"disablebillwip": "", "disablebillwip": "",
@@ -1092,7 +1087,6 @@
"passwordsdonotmatch": "", "passwordsdonotmatch": "",
"print": "", "print": "",
"refresh": "", "refresh": "",
"reports": "",
"required": "", "required": "",
"saturday": "", "saturday": "",
"search": "Chercher...", "search": "Chercher...",
@@ -1443,7 +1437,6 @@
"date_repairstarted": "", "date_repairstarted": "",
"date_scheduled": "Prévu", "date_scheduled": "Prévu",
"date_towin": "", "date_towin": "",
"date_void": "",
"ded_amt": "Déductible", "ded_amt": "Déductible",
"ded_note": "", "ded_note": "",
"ded_status": "Statut de franchise", "ded_status": "Statut de franchise",
@@ -1459,7 +1452,6 @@
"cost_dms_acctnumber": "", "cost_dms_acctnumber": "",
"dms_make": "", "dms_make": "",
"dms_model": "", "dms_model": "",
"dms_unsold": "",
"dms_wip_acctnumber": "", "dms_wip_acctnumber": "",
"id": "", "id": "",
"inservicedate": "", "inservicedate": "",
@@ -1691,7 +1683,6 @@
"checklists": "", "checklists": "",
"closeconfirm": "", "closeconfirm": "",
"closejob": "", "closejob": "",
"closingperiod": "",
"contracts": "", "contracts": "",
"convertedtolabor": "", "convertedtolabor": "",
"cost": "", "cost": "",
@@ -2226,8 +2217,6 @@
"external": "", "external": "",
"findermodal": "", "findermodal": "",
"insurance": "", "insurance": "",
"markexported": "",
"markforreexport": "",
"new": "", "new": "",
"signup": "", "signup": "",
"title": "", "title": "",
@@ -2236,7 +2225,6 @@
"successes": { "successes": {
"exported": "", "exported": "",
"markexported": "", "markexported": "",
"markreexported": "",
"payment": "", "payment": "",
"stripe": "" "stripe": ""
} }
@@ -2412,7 +2400,6 @@
"jobs": { "jobs": {
"individual_job_note": "", "individual_job_note": "",
"parts_order": "", "parts_order": "",
"parts_return_slip": "",
"sublet_order": "" "sublet_order": ""
} }
}, },
@@ -2580,7 +2567,6 @@
"jobs_completed_not_invoiced": "", "jobs_completed_not_invoiced": "",
"jobs_invoiced_not_exported": "", "jobs_invoiced_not_exported": "",
"jobs_reconcile": "", "jobs_reconcile": "",
"jobs_scheduled_completion": "",
"lag_time": "", "lag_time": "",
"open_orders": "", "open_orders": "",
"open_orders_csr": "", "open_orders_csr": "",
@@ -2629,7 +2615,6 @@
"timetickets_summary": "", "timetickets_summary": "",
"unclaimed_hrs": "", "unclaimed_hrs": "",
"void_ros": "", "void_ros": "",
"work_in_progress_jobs": "",
"work_in_progress_labour": "", "work_in_progress_labour": "",
"work_in_progress_payables": "" "work_in_progress_payables": ""
} }
@@ -2638,7 +2623,6 @@
"labels": { "labels": {
"atssummary": "", "atssummary": "",
"employeevacation": "", "employeevacation": "",
"estimators": "",
"ins_co_nm_filter": "", "ins_co_nm_filter": "",
"intake": "", "intake": "",
"manual": "", "manual": "",
@@ -2731,7 +2715,6 @@
"clockon": "", "clockon": "",
"committed": "", "committed": "",
"cost_center": "", "cost_center": "",
"created_by": "",
"date": "", "date": "",
"efficiency": "", "efficiency": "",
"employee": "", "employee": "",

View File

@@ -36,7 +36,6 @@ const AuditTrailMapping = {
jobnoteupdated: () => i18n.t("audit_trail.messages.jobnoteupdated"), jobnoteupdated: () => i18n.t("audit_trail.messages.jobnoteupdated"),
jobnotedeleted: () => i18n.t("audit_trail.messages.jobnotedeleted"), jobnotedeleted: () => i18n.t("audit_trail.messages.jobnotedeleted"),
admin_jobunvoid: () => i18n.t("audit_trail.messages.admin_jobunvoid"), admin_jobunvoid: () => i18n.t("audit_trail.messages.admin_jobunvoid"),
admin_jobuninvoice: () => i18n.t("audit_trail.messages.admin_jobuninvoice"),
admin_jobmarkforreexport: () => admin_jobmarkforreexport: () =>
i18n.t("audit_trail.messages.admin_jobmarkforreexport"), i18n.t("audit_trail.messages.admin_jobmarkforreexport"),
admin_jobmarkexported: () => admin_jobmarkexported: () =>

View File

@@ -606,14 +606,7 @@ export const TemplateList = (type, context) => {
}, },
parts_return_slip: { parts_return_slip: {
title: i18n.t("printcenter.jobs.parts_return_slip"), title: i18n.t("printcenter.jobs.parts_return_slip"),
subject: i18n.t("printcenter.subjects.jobs.parts_return_slip", { subject: i18n.t("printcenter.jobs.parts_return_slip"),
ro_number: context && context.job && context.job.ro_number,
name: (
(context && context.job && context.job.ownr_ln) ||
(context && context.job && context.job.ownr_co_nm) ||
""
).trim(),
}),
description: "", description: "",
key: "parts_return_slip", key: "parts_return_slip",
disabled: false, disabled: false,
@@ -1040,7 +1033,7 @@ export const TemplateList = (type, context) => {
disabled: false, disabled: false,
rangeFilter: { rangeFilter: {
object: i18n.t("reportcenter.labels.objects.jobs"), object: i18n.t("reportcenter.labels.objects.jobs"),
field: i18n.t("jobs.fields.date_invoiced"), field: i18n.t("jobs.fields.date_open"),
}, },
group: "jobs", group: "jobs",
}, },
@@ -1244,7 +1237,7 @@ export const TemplateList = (type, context) => {
disabled: false, disabled: false,
rangeFilter: { rangeFilter: {
object: i18n.t("reportcenter.labels.objects.jobs"), object: i18n.t("reportcenter.labels.objects.jobs"),
field: i18n.t("jobs.fields.date_void"), field: i18n.t("jobs.fields.date_open"),
}, },
group: "sales", group: "sales",
}, },
@@ -1547,19 +1540,6 @@ export const TemplateList = (type, context) => {
}, },
group: "payroll", group: "payroll",
}, },
work_in_progress_jobs_excel: {
title: i18n.t("reportcenter.templates.work_in_progress_jobs"),
subject: i18n.t("reportcenter.templates.work_in_progress_jobs"),
key: "work_in_progress_jobs_excel",
//idtype: "vendor",
reporttype: "excel",
disabled: false,
rangeFilter: {
object: i18n.t("reportcenter.labels.objects.jobs"),
field: i18n.t("jobs.fields.date_open"),
},
group: "jobs",
},
work_in_progress_labour: { work_in_progress_labour: {
title: i18n.t("reportcenter.templates.work_in_progress_labour"), title: i18n.t("reportcenter.templates.work_in_progress_labour"),
description: "", description: "",
@@ -1917,18 +1897,6 @@ export const TemplateList = (type, context) => {
}, },
group: "sales", group: "sales",
}, },
jobs_scheduled_completion: {
title: i18n.t("reportcenter.templates.jobs_scheduled_completion"),
subject: i18n.t("reportcenter.templates.jobs_scheduled_completion"),
key: "jobs_scheduled_completion",
//idtype: "vendor",
disabled: false,
rangeFilter: {
object: i18n.t("reportcenter.labels.objects.jobs"),
field: i18n.t("jobs.fields.scheduled_completion"),
},
group: "jobs",
},
} }
: {}), : {}),
...(!type || type === "courtesycarcontract" ...(!type || type === "courtesycarcontract"

View File

@@ -2092,13 +2092,6 @@
table: table:
name: employee_team_members name: employee_team_members
schema: public schema: public
- name: joblines
using:
foreign_key_constraint_on:
column: assigned_team
table:
name: joblines
schema: public
insert_permissions: insert_permissions:
- role: user - role: user
permission: permission:
@@ -2672,9 +2665,6 @@
name: joblines name: joblines
schema: public schema: public
object_relationships: object_relationships:
- name: employee_team
using:
foreign_key_constraint_on: assigned_team
- name: job - name: job
using: using:
foreign_key_constraint_on: jobid foreign_key_constraint_on: jobid
@@ -2736,7 +2726,6 @@
- alt_part_i - alt_part_i
- alt_partm - alt_partm
- alt_partno - alt_partno
- assigned_team
- bett_amt - bett_amt
- bett_pctg - bett_pctg
- bett_tax - bett_tax
@@ -2745,7 +2734,6 @@
- convertedtolbr - convertedtolbr
- convertedtolbr_data - convertedtolbr_data
- created_at - created_at
- critical
- db_hrs - db_hrs
- db_price - db_price
- db_ref - db_ref
@@ -2805,7 +2793,6 @@
- alt_part_i - alt_part_i
- alt_partm - alt_partm
- alt_partno - alt_partno
- assigned_team
- bett_amt - bett_amt
- bett_pctg - bett_pctg
- bett_tax - bett_tax
@@ -2885,7 +2872,6 @@
- alt_part_i - alt_part_i
- alt_partm - alt_partm
- alt_partno - alt_partno
- assigned_team
- bett_amt - bett_amt
- bett_pctg - bett_pctg
- bett_tax - bett_tax
@@ -3300,7 +3286,6 @@
- clm_total - clm_total
- clm_zip - clm_zip
- comment - comment
- completed_tasks
- converted - converted
- created_at - created_at
- cust_pr - cust_pr
@@ -3495,7 +3480,6 @@
- v_model_yr - v_model_yr
- v_vin - v_vin
- vehicleid - vehicleid
- date_void
- voided - voided
select_permissions: select_permissions:
- role: user - role: user
@@ -3566,7 +3550,6 @@
- clm_total - clm_total
- clm_zip - clm_zip
- comment - comment
- completed_tasks
- converted - converted
- created_at - created_at
- cust_pr - cust_pr
@@ -3762,7 +3745,6 @@
- v_model_yr - v_model_yr
- v_vin - v_vin
- vehicleid - vehicleid
- date_void
- voided - voided
filter: filter:
bodyshop: bodyshop:
@@ -3843,7 +3825,6 @@
- clm_total - clm_total
- clm_zip - clm_zip
- comment - comment
- completed_tasks
- converted - converted
- created_at - created_at
- cust_pr - cust_pr
@@ -4039,7 +4020,6 @@
- v_model_yr - v_model_yr
- v_vin - v_vin
- vehicleid - vehicleid
- date_void
- voided - voided
filter: filter:
bodyshop: bodyshop:
@@ -4649,7 +4629,6 @@
_eq: X-Hasura-User-Id _eq: X-Hasura-User-Id
- active: - active:
_eq: true _eq: true
allow_aggregations: true
update_permissions: update_permissions:
- role: user - role: user
permission: permission:
@@ -4727,7 +4706,6 @@
_eq: X-Hasura-User-Id _eq: X-Hasura-User-Id
- active: - active:
_eq: true _eq: true
allow_aggregations: true
update_permissions: update_permissions:
- role: user - role: user
permission: permission:
@@ -5556,7 +5534,6 @@
- committed_at - committed_at
- cost_center - cost_center
- created_at - created_at
- created_by
- date - date
- employeeid - employeeid
- flat_rate - flat_rate
@@ -5565,7 +5542,6 @@
- memo - memo
- productivehrs - productivehrs
- rate - rate
- task_name
- ttapprovalqueueid - ttapprovalqueueid
- updated_at - updated_at
select_permissions: select_permissions:
@@ -5581,7 +5557,6 @@
- committed_at - committed_at
- cost_center - cost_center
- created_at - created_at
- created_by
- date - date
- employeeid - employeeid
- flat_rate - flat_rate
@@ -5590,7 +5565,6 @@
- memo - memo
- productivehrs - productivehrs
- rate - rate
- task_name
- ttapprovalqueueid - ttapprovalqueueid
- updated_at - updated_at
filter: filter:
@@ -5615,7 +5589,6 @@
- committed_at - committed_at
- cost_center - cost_center
- created_at - created_at
- created_by
- date - date
- employeeid - employeeid
- flat_rate - flat_rate
@@ -5624,7 +5597,6 @@
- memo - memo
- productivehrs - productivehrs
- rate - rate
- task_name
- ttapprovalqueueid - ttapprovalqueueid
- updated_at - updated_at
filter: filter:

View File

@@ -1,4 +0,0 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "public"."joblines" add column "assigned_team" uuid
-- null;

View File

@@ -1,2 +0,0 @@
alter table "public"."joblines" add column "assigned_team" uuid
null;

View File

@@ -1 +0,0 @@
alter table "public"."joblines" drop constraint "joblines_assigned_team_fkey";

View File

@@ -1,5 +0,0 @@
alter table "public"."joblines"
add constraint "joblines_assigned_team_fkey"
foreign key ("assigned_team")
references "public"."employee_teams"
("id") on update restrict on delete restrict;

View File

@@ -1,4 +0,0 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "public"."jobs" add column "completed_tasks" jsonb
-- null default jsonb_build_array();

View File

@@ -1,2 +0,0 @@
alter table "public"."jobs" add column "completed_tasks" jsonb
null default jsonb_build_array();

View File

@@ -1,4 +0,0 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "public"."jobs" add column "void_date" Timestamp
-- null;

View File

@@ -1,2 +0,0 @@
alter table "public"."jobs" add column "void_date" Timestamp
null;

View File

@@ -1 +0,0 @@
ALTER TABLE "public"."jobs" ALTER COLUMN "void_date" TYPE timestamp without time zone;

View File

@@ -1 +0,0 @@
ALTER TABLE "public"."jobs" ALTER COLUMN "void_date" TYPE timestamptz;

View File

@@ -1 +0,0 @@
alter table "public"."jobs" rename column "date_void" to "void_date";

View File

@@ -1 +0,0 @@
alter table "public"."jobs" rename column "void_date" to "date_void";

View File

@@ -1,4 +0,0 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "public"."timetickets" add column "task_name" text
-- null;

View File

@@ -1,2 +0,0 @@
alter table "public"."timetickets" add column "task_name" text
null;

View File

@@ -1 +0,0 @@
DROP INDEX IF EXISTS "public"."parts_dispatch_employeeid";

View File

@@ -1,2 +0,0 @@
CREATE INDEX "parts_dispatch_employeeid" on
"public"."parts_dispatch" using btree ("employeeid");

View File

@@ -1 +0,0 @@
DROP INDEX IF EXISTS "public"."parts_dispatch_dispatchid";

View File

@@ -1,2 +0,0 @@
CREATE INDEX "parts_dispatch_dispatchid" on
"public"."parts_dispatch_lines" using btree ("partsdispatchid");

View File

@@ -1 +0,0 @@
DROP INDEX IF EXISTS "public"."parts_dispatch_line_accepted_at";

View File

@@ -1,2 +0,0 @@
CREATE INDEX "parts_dispatch_line_accepted_at" on
"public"."parts_dispatch_lines" using btree ("accepted_at");

View File

@@ -1,4 +0,0 @@
-- Could not auto-generate a down migration.
-- Please write an appropriate down migration for the SQL below:
-- alter table "public"."timetickets" add column "created_by" text
-- null;

View File

@@ -1,2 +0,0 @@
alter table "public"."timetickets" add column "created_by" text
null;

View File

@@ -123,14 +123,8 @@ async function PbsCalculateAllocationsAp(socket, billids) {
if (!billHash[cc.name]) { if (!billHash[cc.name]) {
billHash[cc.name] = { billHash[cc.name] = {
Account: Account: cc.dms_acctnumber,
bodyshop.pbs_configuration.appostingaccount === "wip" ControlNumber: bill.vendor.dmsid,
? cc.dms_wip_acctnumber
: cc.dms_acctnumber,
ControlNumber:
bodyshop.pbs_configuration.apcontrol === "ro"
? bill.job.ro_number
: bill.vendor.dmsid,
Amount: Dinero(), Amount: Dinero(),
// Comment: "String", // Comment: "String",
AdditionalInfo: bill.vendor.name, AdditionalInfo: bill.vendor.name,

View File

@@ -133,13 +133,7 @@ const generateBillLine = (billLine, responsibilityCenters, jobClass) => {
const findTaxCode = (billLine, taxcode) => { const findTaxCode = (billLine, taxcode) => {
const { const {
applicable_taxes: { local, state, federal }, applicable_taxes: { local, state, federal },
} = } = billLine;
billLine.applicable_taxes === null
? {
...billLine,
applicable_taxes: { local: false, state: false, federal: false },
}
: billLine;
const t = taxcode.filter( const t = taxcode.filter(
(t) => (t) =>
!!t.local === !!local && !!t.local === !!local &&

View File

@@ -262,10 +262,10 @@ const generateInvoiceQbxml = (
RefNumber: jobs_by_pk.ro_number, RefNumber: jobs_by_pk.ro_number,
BillAddress: { BillAddress: {
Addr1: jobs_by_pk.ownr_co_nm Addr1: jobs_by_pk.ownr_co_nm
? jobs_by_pk.ownr_co_nm.substring(0, 30).trim() ? jobs_by_pk.ownr_co_nm.substring(0, 30)
: `${`${jobs_by_pk.ownr_ln || ""} ${jobs_by_pk.ownr_fn || ""}` : `${`${jobs_by_pk.ownr_ln || ""} ${
.substring(0, 30) jobs_by_pk.ownr_fn || ""
.trim()}`, }`.substring(0, 30)}`,
Addr2: jobs_by_pk.ownr_addr1, Addr2: jobs_by_pk.ownr_addr1,
Addr3: jobs_by_pk.ownr_addr2, Addr3: jobs_by_pk.ownr_addr2,
City: jobs_by_pk.ownr_city, City: jobs_by_pk.ownr_city,
@@ -274,10 +274,10 @@ const generateInvoiceQbxml = (
}, },
ShipAddress: { ShipAddress: {
Addr1: jobs_by_pk.ownr_co_nm Addr1: jobs_by_pk.ownr_co_nm
? jobs_by_pk.ownr_co_nm.substring(0, 30).trim() ? jobs_by_pk.ownr_co_nm.substring(0, 30)
: `${`${jobs_by_pk.ownr_ln || ""} ${jobs_by_pk.ownr_fn || ""}` : `${`${jobs_by_pk.ownr_ln || ""} ${
.substring(0, 30) jobs_by_pk.ownr_fn || ""
.trim()}`, }`.substring(0, 30)}`,
Addr2: jobs_by_pk.ownr_addr1, Addr2: jobs_by_pk.ownr_addr1,
Addr3: jobs_by_pk.ownr_addr2, Addr3: jobs_by_pk.ownr_addr2,
City: jobs_by_pk.ownr_city, City: jobs_by_pk.ownr_city,

View File

@@ -21,9 +21,9 @@ exports.generateOwnerTier = (jobs_by_pk, isThreeTier, twotierpref) => {
? `${jobs_by_pk.ownr_co_nm.substring(0, 30)} #${ ? `${jobs_by_pk.ownr_co_nm.substring(0, 30)} #${
jobs_by_pk.owner.accountingid || "" jobs_by_pk.owner.accountingid || ""
}` }`
: `${`${jobs_by_pk.ownr_ln || ""} ${jobs_by_pk.ownr_fn || ""}` : `${`${jobs_by_pk.ownr_ln || ""} ${
.substring(0, 30) jobs_by_pk.ownr_fn || ""
.trim()} #${jobs_by_pk.owner.accountingid || ""}` }`.substring(0, 30)} #${jobs_by_pk.owner.accountingid || ""}`
) )
.trim() .trim()
.replace(":", " "); .replace(":", " ");
@@ -39,9 +39,9 @@ exports.generateOwnerTier = (jobs_by_pk, isThreeTier, twotierpref) => {
? `${jobs_by_pk.ownr_co_nm.substring(0, 30)} #${ ? `${jobs_by_pk.ownr_co_nm.substring(0, 30)} #${
jobs_by_pk.owner.accountingid || "" jobs_by_pk.owner.accountingid || ""
}` }`
: `${`${jobs_by_pk.ownr_ln || ""} ${jobs_by_pk.ownr_fn || ""}` : `${`${jobs_by_pk.ownr_ln || ""} ${
.substring(0, 30) jobs_by_pk.ownr_fn || ""
.trim()} #${jobs_by_pk.owner.accountingid || ""}` }`.substring(0, 30)} #${jobs_by_pk.owner.accountingid || ""}`
) )
.trim() .trim()
.replace(":", " "); .replace(":", " ");

View File

@@ -717,24 +717,18 @@ async function InsertDmsVehicle(socket) {
dealer: { dealer: {
dealerNumber: socket.JobData.bodyshop.cdk_dealerid, dealerNumber: socket.JobData.bodyshop.cdk_dealerid,
...(socket.txEnvelope.inservicedate && { ...(socket.txEnvelope.inservicedate && {
inServiceDate: inServiceDate: moment(socket.txEnvelope.inservicedate)
socket.txEnvelope.dms_unsold === true //.tz(socket.JobData.bodyshop.timezone)
? "" .startOf("day")
: moment(socket.txEnvelope.inservicedate) .toISOString(),
//.tz(socket.JobData.bodyshop.timezone)
.startOf("day")
.toISOString(),
}), }),
vehicleId: socket.DMSVid.vehiclesVehId, vehicleId: socket.DMSVid.vehiclesVehId,
}, },
manufacturer: {}, manufacturer: {},
vehicle: { vehicle: {
deliveryDate: deliveryDate: moment()
socket.txEnvelope.dms_unsold === true // .tz(socket.JobData.bodyshop.timezone)
? "" .format("YYYYMMDD"),
: moment()
// .tz(socket.JobData.bodyshop.timezone)
.format("YYYYMMDD"),
licensePlateNo: licensePlateNo:
socket.JobData.plate_no === null socket.JobData.plate_no === null
? null ? null
@@ -866,25 +860,19 @@ async function UpdateDmsVehicle(socket) {
...socket.DMSVeh.dealer, ...socket.DMSVeh.dealer,
...((socket.txEnvelope.inservicedate || ...((socket.txEnvelope.inservicedate ||
socket.DMSVeh.dealer.inServiceDate) && { socket.DMSVeh.dealer.inServiceDate) && {
inServiceDate: inServiceDate: moment(
socket.txEnvelope.dms_unsold === true socket.DMSVeh.dealer.inServiceDate ||
? "" socket.txEnvelope.inservicedate
: moment( )
socket.DMSVeh.dealer.inServiceDate || // .tz(socket.JobData.bodyshop.timezone)
socket.txEnvelope.inservicedate .toISOString(),
)
// .tz(socket.JobData.bodyshop.timezone)
.toISOString(),
}), }),
}, },
vehicle: { vehicle: {
...socket.DMSVeh.vehicle, ...socket.DMSVeh.vehicle,
deliveryDate: deliveryDate: moment(socket.DMSVeh.vehicle.deliveryDate)
socket.txEnvelope.dms_unsold === true //.tz(socket.JobData.bodyshop.timezone)
? "" .toISOString(),
: moment(socket.DMSVeh.vehicle.deliveryDate)
//.tz(socket.JobData.bodyshop.timezone)
.toISOString(),
}, },
owners: ids, owners: ids,
}, },

View File

@@ -620,7 +620,6 @@ exports.QUERY_EMPLOYEE_PIN = `query QUERY_EMPLOYEE_PIN($shopId: uuid!, $employee
employee_number employee_number
id id
pin pin
active
} }
}`; }`;
@@ -1698,7 +1697,6 @@ query GET_PBS_AP_ALLOCATIONS($billids: [uuid!]) {
md_responsibility_centers md_responsibility_centers
timezone timezone
pbs_serialnumber pbs_serialnumber
pbs_configuration
id id
} }
bills(where: {id: {_in: $billids}, exported:{_eq: false}}) { bills(where: {id: {_in: $billids}, exported:{_eq: false}}) {

View File

@@ -23,7 +23,7 @@ exports.techLogin = async (req, res) => {
let technician; let technician;
if (result.employees && result.employees[0]) { if (result.employees && result.employees[0]) {
const dbRecord = result.employees[0]; const dbRecord = result.employees[0];
if (dbRecord.pin === pin && dbRecord.active === true) { if (dbRecord.pin === pin) {
valid = true; valid = true;
delete dbRecord.pin; delete dbRecord.pin;
technician = dbRecord; technician = dbRecord;