@@ -20,7 +20,11 @@ const BillLineSearchSelect = ({ options, disabled, ...restProps }, ref) => {
|
||||
.toLowerCase()
|
||||
.includes(inputValue.toLowerCase())) ||
|
||||
(option.oem_partno &&
|
||||
option.oem_partno.toLowerCase().includes(inputValue.toLowerCase()))
|
||||
option.oem_partno
|
||||
.toLowerCase()
|
||||
.includes(inputValue.toLowerCase())) ||
|
||||
(option.act_price &&
|
||||
option.act_price.toString().startsWith(inputValue.toString()))
|
||||
);
|
||||
}}
|
||||
notFoundContent={"Removed."}
|
||||
@@ -40,13 +44,14 @@ const BillLineSearchSelect = ({ options, disabled, ...restProps }, ref) => {
|
||||
line_desc={item.line_desc}
|
||||
part_qty={item.part_qty}
|
||||
oem_partno={item.oem_partno}
|
||||
act_price={item.act_price}
|
||||
style={{
|
||||
...(item.removed ? { textDecoration: "line-through" } : {}),
|
||||
}}
|
||||
>
|
||||
{`${item.removed ? `(REMOVED) ` : ""}${item.line_desc}${
|
||||
item.oem_partno ? ` - ${item.oem_partno}` : ""
|
||||
}`}
|
||||
}${item.act_price ? ` - $${item.act_price}` : ``}`}
|
||||
</Option>
|
||||
))
|
||||
: null}
|
||||
|
||||
@@ -55,6 +55,7 @@ function ChatSendMessageComponent({
|
||||
messagingServiceSid: bodyshop.messagingservicesid,
|
||||
conversationid: conversation.id,
|
||||
selectedMedia: selectedImages,
|
||||
imexshopid: bodyshop.imexshopid,
|
||||
});
|
||||
setSelectedMedia(
|
||||
selectedMedia.map((i) => {
|
||||
|
||||
@@ -53,7 +53,7 @@ export function ContractConvertToRo({
|
||||
const billingLines = [];
|
||||
if (contractLength > 0)
|
||||
billingLines.push({
|
||||
manual_line:true,
|
||||
manual_line: true,
|
||||
unq_seq: 1,
|
||||
line_no: 1,
|
||||
line_ref: 1,
|
||||
@@ -71,7 +71,7 @@ export function ContractConvertToRo({
|
||||
contract.kmend - contract.kmstart - contract.dailyfreekm * contractLength;
|
||||
if (mileageDiff > 0) {
|
||||
billingLines.push({
|
||||
manual_line:true,
|
||||
manual_line: true,
|
||||
unq_seq: 2,
|
||||
line_no: 2,
|
||||
line_ref: 2,
|
||||
@@ -88,7 +88,7 @@ export function ContractConvertToRo({
|
||||
|
||||
if (values.refuelqty > 0) {
|
||||
billingLines.push({
|
||||
manual_line:true,
|
||||
manual_line: true,
|
||||
unq_seq: 3,
|
||||
line_no: 3,
|
||||
line_ref: 3,
|
||||
@@ -104,7 +104,7 @@ export function ContractConvertToRo({
|
||||
}
|
||||
if (values.applyCleanupCharge) {
|
||||
billingLines.push({
|
||||
manual_line:true,
|
||||
manual_line: true,
|
||||
unq_seq: 4,
|
||||
line_no: 4,
|
||||
line_ref: 4,
|
||||
@@ -121,7 +121,7 @@ export function ContractConvertToRo({
|
||||
if (contract.damagewaiver) {
|
||||
//Add for cleanup fee.
|
||||
billingLines.push({
|
||||
manual_line:true,
|
||||
manual_line: true,
|
||||
unq_seq: 5,
|
||||
line_no: 5,
|
||||
line_ref: 5,
|
||||
@@ -153,10 +153,10 @@ export function ContractConvertToRo({
|
||||
ownr_co_nm: contract.job.owner.ownr_co_nm,
|
||||
ownr_ph1: contract.job.owner.ownr_ph1,
|
||||
ownr_ea: contract.job.owner.ownr_ea,
|
||||
v_model_desc: contract.job.vehicle.v_model_desc,
|
||||
v_model_yr: contract.job.vehicle.v_model_yr,
|
||||
v_make_desc: contract.job.vehicle.v_make_desc,
|
||||
v_vin: contract.job.vehicle.v_vin,
|
||||
v_model_desc: contract.job.vehicle && contract.job.vehicle.v_model_desc,
|
||||
v_model_yr: contract.job.vehicle && contract.job.vehicle.v_model_yr,
|
||||
v_make_desc: contract.job.vehicle && contract.job.vehicle.v_make_desc,
|
||||
v_vin: contract.job.vehicle && contract.job.vehicle.v_vin,
|
||||
status: bodyshop.md_ro_statuses.default_completed,
|
||||
notes: {
|
||||
data: [
|
||||
|
||||
@@ -118,7 +118,7 @@ export default function CourtesyCarCreateFormComponent({ form, saveLoading }) {
|
||||
},
|
||||
]}
|
||||
>
|
||||
<InputNumber />
|
||||
<InputNumber precision={0} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("courtesycars.fields.fleetnumber")}
|
||||
|
||||
@@ -31,7 +31,7 @@ export default function CourtesyCarReturnModalComponent() {
|
||||
},
|
||||
]}
|
||||
>
|
||||
<InputNumber />
|
||||
<InputNumber precision={0} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("contracts.fields.fuelin")}
|
||||
|
||||
@@ -56,17 +56,23 @@ export default function JobLineNotePopup({ jobline, disabled }) {
|
||||
</div>
|
||||
);
|
||||
return (
|
||||
<div
|
||||
style={{ width: "100%", minHeight: "2rem", cursor: "pointer" }}
|
||||
onClick={() => !disabled && setEditing(true)}
|
||||
>
|
||||
<div>
|
||||
{jobline.ioucreated && (
|
||||
<Space>
|
||||
<FieldTimeOutlined />
|
||||
{t("joblines.labels.ioucreated")}
|
||||
</Space>
|
||||
)}
|
||||
{jobline.notes}
|
||||
<div
|
||||
style={{
|
||||
width: "100%",
|
||||
minHeight: "2rem",
|
||||
cursor: "pointer",
|
||||
}}
|
||||
onClick={() => !disabled && setEditing(true)}
|
||||
>
|
||||
{jobline.notes}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ export function JobsCreateJobsInfo({ bodyshop, form, selected }) {
|
||||
<Collapse.Panel
|
||||
key="insurance"
|
||||
header={t("menus.jobsdetail.insurance")}
|
||||
forceRender
|
||||
>
|
||||
<LayoutFormRow>
|
||||
<Form.Item label={t("jobs.fields.ins_co_id")} name="ins_co_id">
|
||||
@@ -145,7 +146,7 @@ export function JobsCreateJobsInfo({ bodyshop, form, selected }) {
|
||||
</Form.Item>
|
||||
</LayoutFormRow>
|
||||
</Collapse.Panel>
|
||||
<Collapse.Panel key="claim" header={t("menus.jobsdetail.claimdetail")}>
|
||||
<Collapse.Panel forceRender key="claim" header={t("menus.jobsdetail.claimdetail")}>
|
||||
<LayoutFormRow>
|
||||
<Form.Item label={t("jobs.fields.loss_desc")} name="loss_desc">
|
||||
<Input />
|
||||
@@ -192,7 +193,7 @@ export function JobsCreateJobsInfo({ bodyshop, form, selected }) {
|
||||
</Form.Item>
|
||||
</LayoutFormRow>
|
||||
</Collapse.Panel>
|
||||
<Collapse.Panel
|
||||
<Collapse.Panel forceRender
|
||||
key="financial"
|
||||
header={t("menus.jobsdetail.financials")}
|
||||
>
|
||||
|
||||
@@ -108,6 +108,8 @@ export async function CreateIouForJob(
|
||||
_tempLines.forEach((line) => {
|
||||
delete line.id;
|
||||
delete line.__typename;
|
||||
line.oem_partno = `line.oem_partno - IOU Price $${line.act_price}`
|
||||
delete line.act_price;
|
||||
line.manual_line = true;
|
||||
});
|
||||
|
||||
|
||||
@@ -14,6 +14,22 @@ export default async function FcmHandler({ client, payload }) {
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "messaging-outbound":
|
||||
client.cache.modify({
|
||||
id: client.cache.identify({
|
||||
__typename: "conversations",
|
||||
id: payload.conversationid,
|
||||
}),
|
||||
fields: {
|
||||
updated_at(oldupdated0) {
|
||||
return new Date();
|
||||
},
|
||||
messages_aggregate(cached) {
|
||||
return { aggregate: { count: cached.aggregate.count + 1 } };
|
||||
},
|
||||
},
|
||||
});
|
||||
break;
|
||||
case "messaging-mark-conversation-read":
|
||||
client.cache.modify({
|
||||
id: client.cache.identify({
|
||||
|
||||
@@ -96,8 +96,6 @@ exports.receive = async (req, res) => {
|
||||
type: "messaging-inbound",
|
||||
conversationid: message.conversationid || "",
|
||||
text: message.text || "",
|
||||
image_path: message.image_path || "",
|
||||
image: (message.image && message.image.toString()) || "",
|
||||
messageid: message.id || "",
|
||||
phone_num: message.conversation.phone_num || "",
|
||||
};
|
||||
|
||||
@@ -13,11 +13,12 @@ const logger = require("../utils/logger");
|
||||
const client = twilio(
|
||||
process.env.TWILIO_AUTH_TOKEN,
|
||||
process.env.TWILIO_AUTH_KEY
|
||||
);
|
||||
);const { admin } = require("../firebase/firebase-handler");
|
||||
|
||||
const gqlClient = require("../graphql-client/graphql-client").client;
|
||||
|
||||
exports.send = (req, res) => {
|
||||
const { to, messagingServiceSid, body, conversationid, selectedMedia } =
|
||||
const { to, messagingServiceSid, body, conversationid, selectedMedia, imexshopid } =
|
||||
req.body;
|
||||
|
||||
logger.log("sms-outbound", "DEBUG", req.user.email, null, {
|
||||
@@ -63,6 +64,17 @@ exports.send = (req, res) => {
|
||||
conversationid,
|
||||
});
|
||||
|
||||
const data = {
|
||||
type: "messaging-outbound",
|
||||
conversationid: newMessage.conversationid || "",
|
||||
|
||||
};
|
||||
|
||||
admin.messaging().send({
|
||||
topic: `${imexshopid}-messaging`,
|
||||
data,
|
||||
});
|
||||
|
||||
res.sendStatus(200);
|
||||
})
|
||||
.catch((e2) => {
|
||||
|
||||
Reference in New Issue
Block a user