IO-3020 IO-3036 Remove additional TODOs.
This commit is contained in:
@@ -14,7 +14,6 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
<meta name="theme-color" content="#1690ff" />
|
<meta name="theme-color" content="#1690ff" />
|
||||||
<!-- <link rel="apple-touch-icon" href="logo192.png" /> -->
|
<!-- <link rel="apple-touch-icon" href="logo192.png" /> -->
|
||||||
<!-- TODO:AIo Update the individual logos for each.-->
|
|
||||||
<link rel="apple-touch-icon" href="/logo192.png" />
|
<link rel="apple-touch-icon" href="/logo192.png" />
|
||||||
<link rel="mask-icon" href="/mask-icon.svg" color="#FFFFFF" />
|
<link rel="mask-icon" href="/mask-icon.svg" color="#FFFFFF" />
|
||||||
<!--
|
<!--
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ export function JobsAvailableContainer({ bodyshop, currentUser, insertAuditTrail
|
|||||||
|
|
||||||
// } else {
|
// } else {
|
||||||
//IO-539 Check for Parts Rate on PAL for SGI use case.
|
//IO-539 Check for Parts Rate on PAL for SGI use case.
|
||||||
//TODO:AIO Check that the async function is actually waiting before moving on.
|
|
||||||
await InstanceRenderManager({
|
await InstanceRenderManager({
|
||||||
executeFunction: true,
|
executeFunction: true,
|
||||||
imex: CheckTaxRates,
|
imex: CheckTaxRates,
|
||||||
@@ -568,7 +568,6 @@ async function CheckTaxRates(estData, bodyshop) {
|
|||||||
}
|
}
|
||||||
function ResolveCCCLineIssues(estData, bodyshop) {
|
function ResolveCCCLineIssues(estData, bodyshop) {
|
||||||
//Find all misc amounts, populate them to the act price.
|
//Find all misc amounts, populate them to the act price.
|
||||||
//TODO Ensure that this doesnt get violated
|
|
||||||
//This needs to be done before cleansing unq_seq since some misc prices could move over.
|
//This needs to be done before cleansing unq_seq since some misc prices could move over.
|
||||||
estData.joblines.data.forEach((line) => {
|
estData.joblines.data.forEach((line) => {
|
||||||
if (line.misc_amt && line.misc_amt !== 0) {
|
if (line.misc_amt && line.misc_amt !== 0) {
|
||||||
@@ -591,34 +590,34 @@ function ResolveCCCLineIssues(estData, bodyshop) {
|
|||||||
//Group by line no
|
//Group by line no
|
||||||
// For everything but the first one, strip out the price number in
|
// For everything but the first one, strip out the price number in
|
||||||
//TODO: How do we merge these 2 functions together and have it function properly for Rome?
|
//TODO: How do we merge these 2 functions together and have it function properly for Rome?
|
||||||
InstanceRenderManager({
|
// InstanceRenderManager({
|
||||||
executeFunction: true,
|
// executeFunction: true,
|
||||||
args: [],
|
// args: [],
|
||||||
promanager: () => {
|
// promanager: () => {
|
||||||
const groupedByLineRef = _.groupBy(estData.joblines.data, "line_ref");
|
// const groupedByLineRef = _.groupBy(estData.joblines.data, "line_ref");
|
||||||
Object.keys(groupedByLineRef).forEach((lineRef) => {
|
// Object.keys(groupedByLineRef).forEach((lineRef) => {
|
||||||
let index0ActPrice;
|
// let index0ActPrice;
|
||||||
groupedByLineRef[lineRef].forEach((line, index) => {
|
// groupedByLineRef[lineRef].forEach((line, index) => {
|
||||||
//Let the first one keep it
|
// //Let the first one keep it
|
||||||
if (index === 0) {
|
// if (index === 0) {
|
||||||
index0ActPrice = line.act_price;
|
// index0ActPrice = line.act_price;
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
//Web Est seems to have additional costs with UNQ_SEQ 0. Keep them all?
|
// //Web Est seems to have additional costs with UNQ_SEQ 0. Keep them all?
|
||||||
if (line.unq_seq === 0) return;
|
// if (line.unq_seq === 0) return;
|
||||||
if (index0ActPrice !== line.act_price) {
|
// if (index0ActPrice !== line.act_price) {
|
||||||
// line.notes += ` | Price override.`;
|
// // line.notes += ` | Price override.`;
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
const indexInEstData = estData.joblines.data.findIndex((l) => l.unq_seq === line.unq_seq);
|
// const indexInEstData = estData.joblines.data.findIndex((l) => l.unq_seq === line.unq_seq);
|
||||||
//estData.joblines.data[indexInEstData].notes +=
|
// //estData.joblines.data[indexInEstData].notes +=
|
||||||
// ` | Act Price delete. (prev act price = ${estData.joblines.data[indexInEstData].act_price})`;
|
// // ` | Act Price delete. (prev act price = ${estData.joblines.data[indexInEstData].act_price})`;
|
||||||
estData.joblines.data[indexInEstData].act_price = 0;
|
// estData.joblines.data[indexInEstData].act_price = 0;
|
||||||
estData.joblines.data[indexInEstData].db_price = 0;
|
// estData.joblines.data[indexInEstData].db_price = 0;
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
InstanceRenderManager({
|
InstanceRenderManager({
|
||||||
executeFunction: true,
|
executeFunction: true,
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ export default function LoadingSpinner({ loading = true, message, ...props }) {
|
|||||||
position: "relative",
|
position: "relative",
|
||||||
alignContent: "center"
|
alignContent: "center"
|
||||||
}}
|
}}
|
||||||
// TODO: Client Update - if anything funky happens check this out
|
|
||||||
{...(props.children ? { tip: message ? message : null } : {})}
|
{...(props.children ? { tip: message ? message : null } : {})}
|
||||||
delay={200}
|
delay={200}
|
||||||
// TODO: Client Update - tip only works when there are actually children, and this component is used in a lot of places where there are no children
|
// TODO: Client Update - tip only works when there are actually children, and this component is used in a lot of places where there are no children
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
|||||||
names: ["Simple_Inventory"],
|
names: ["Simple_Inventory"],
|
||||||
splitKey: bodyshop && bodyshop.imexshopid
|
splitKey: bodyshop && bodyshop.imexshopid
|
||||||
});
|
});
|
||||||
//TODO:AIO Ensure that there are no duplicates here, it seems like there may be.
|
|
||||||
return (
|
return (
|
||||||
<RbacWrapper action="shop:rbac">
|
<RbacWrapper action="shop:rbac">
|
||||||
<LayoutFormRow>
|
<LayoutFormRow>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ if (import.meta.env.PROD) {
|
|||||||
Sentry.init({
|
Sentry.init({
|
||||||
dsn: InstanceRenderManager({
|
dsn: InstanceRenderManager({
|
||||||
imex: "https://fd7e89369b6b4bdc9c6c4c9f22fa4ee4@o492140.ingest.sentry.io/5651027",
|
imex: "https://fd7e89369b6b4bdc9c6c4c9f22fa4ee4@o492140.ingest.sentry.io/5651027",
|
||||||
rome: "https://a6acc91c073e414196014b8484627a61@o492140.ingest.sentry.io/4504561071161344" //TODO:AIO Add in the sentry tracker for proman.
|
rome: "https://a6acc91c073e414196014b8484627a61@o492140.ingest.sentry.io/4504561071161344"
|
||||||
}),
|
}),
|
||||||
|
|
||||||
ignoreErrors: [
|
ignoreErrors: [
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ export function JobsDetailPage({
|
|||||||
(acc, val) => {
|
(acc, val) => {
|
||||||
acc[val] = {
|
acc[val] = {
|
||||||
...job.parts_tax_rates[val],
|
...job.parts_tax_rates[val],
|
||||||
...values.parts_tax_rates?.[val] //TODO:AIO Verify that these still save for Rome Online with this null coalescing.
|
...values.parts_tax_rates?.[val]
|
||||||
};
|
};
|
||||||
return acc;
|
return acc;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ export const store = configureStore({
|
|||||||
middleware: (getDefaultMiddleware) =>
|
middleware: (getDefaultMiddleware) =>
|
||||||
getDefaultMiddleware({
|
getDefaultMiddleware({
|
||||||
serializableCheck: false,
|
serializableCheck: false,
|
||||||
// TODO: (Note) This is a production board change
|
|
||||||
immutableCheck: false
|
immutableCheck: false
|
||||||
}).concat(middlewares),
|
}).concat(middlewares),
|
||||||
// middleware: middlewares,
|
// middleware: middlewares,
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ const InstanceMgr = require("../utils/instanceMgr").default;
|
|||||||
//****************************************************** */
|
//****************************************************** */
|
||||||
//****************************************************** */
|
//****************************************************** */
|
||||||
//****************************************************** */
|
//****************************************************** */
|
||||||
//THIS IS THE USA/PROMANAGER/ROME REQUIRED JOB TOTALS CALCULATION.
|
//THIS IS THE USA/ROME REQUIRED JOB TOTALS CALCULATION.
|
||||||
//****************************************************** */
|
//****************************************************** */
|
||||||
//****************************************************** */
|
//****************************************************** */
|
||||||
//****************************************************** */
|
//****************************************************** */
|
||||||
@@ -995,8 +995,7 @@ function CalculateTaxesTotals(job, otherTotals) {
|
|||||||
thresholdAmount === 9999.99 ||
|
thresholdAmount === 9999.99 ||
|
||||||
InstanceMgr({
|
InstanceMgr({
|
||||||
imex: false,
|
imex: false,
|
||||||
rome: thresholdAmount === 0 && parseInt(tyCounter) === 1,
|
rome: thresholdAmount === 0 && parseInt(tyCounter) === 1
|
||||||
promanager: "USE_ROME"
|
|
||||||
})
|
})
|
||||||
) {
|
) {
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -2,13 +2,11 @@ const RenderInstanceManager = require("../utils/instanceMgr").default;
|
|||||||
|
|
||||||
exports.totals = RenderInstanceManager({
|
exports.totals = RenderInstanceManager({
|
||||||
imex: require("./job-totals").default,
|
imex: require("./job-totals").default,
|
||||||
rome: require("./job-totals-USA").default,
|
rome: require("./job-totals-USA").default
|
||||||
promanager: require("./job-totals-USA").default
|
|
||||||
});
|
});
|
||||||
exports.totalsSsu = RenderInstanceManager({
|
exports.totalsSsu = RenderInstanceManager({
|
||||||
imex: require("./job-totals").totalsSsu,
|
imex: require("./job-totals").totalsSsu,
|
||||||
rome: require("./job-totals-USA").totalsSsu,
|
rome: require("./job-totals-USA").totalsSsu
|
||||||
promanager: require("./job-totals-USA").totalsSsu
|
|
||||||
});
|
});
|
||||||
exports.costing = require("./job-costing").JobCosting;
|
exports.costing = require("./job-costing").JobCosting;
|
||||||
exports.costingmulti = require("./job-costing").JobCostingMulti;
|
exports.costingmulti = require("./job-costing").JobCostingMulti;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ const express = require("express");
|
|||||||
const router = express.Router();
|
const router = express.Router();
|
||||||
const validateFirebaseIdTokenMiddleware = require("../middleware/validateFirebaseIdTokenMiddleware");
|
const validateFirebaseIdTokenMiddleware = require("../middleware/validateFirebaseIdTokenMiddleware");
|
||||||
const { createAssociation, createShop, updateShop, updateCounter } = require("../admin/adminops");
|
const { createAssociation, createShop, updateShop, updateCounter } = require("../admin/adminops");
|
||||||
const { updateUser, getUser, createUser, sendPromanagerWelcomeEmail } = require("../firebase/firebase-handler");
|
const { updateUser, getUser, createUser } = require("../firebase/firebase-handler");
|
||||||
const validateAdminMiddleware = require("../middleware/validateAdminMiddleware");
|
const validateAdminMiddleware = require("../middleware/validateAdminMiddleware");
|
||||||
|
|
||||||
router.use(validateFirebaseIdTokenMiddleware);
|
router.use(validateFirebaseIdTokenMiddleware);
|
||||||
@@ -15,6 +15,5 @@ router.post("/updatecounter", updateCounter);
|
|||||||
router.post("/updateuser", updateUser);
|
router.post("/updateuser", updateUser);
|
||||||
router.post("/getuser", getUser);
|
router.post("/getuser", getUser);
|
||||||
router.post("/createuser", createUser);
|
router.post("/createuser", createUser);
|
||||||
router.post("/promanagerwelcome", sendPromanagerWelcomeEmail);
|
|
||||||
|
|
||||||
module.exports = router;
|
module.exports = router;
|
||||||
|
|||||||
@@ -95,8 +95,7 @@ exports.receive = async (req, res) => {
|
|||||||
notification: {
|
notification: {
|
||||||
title: InstanceManager({
|
title: InstanceManager({
|
||||||
imex: `ImEX Online Message - ${data.phone_num}`,
|
imex: `ImEX Online Message - ${data.phone_num}`,
|
||||||
rome: `Rome Online Message - ${data.phone_num}`,
|
rome: `Rome Online Message - ${data.phone_num}`
|
||||||
promanager: `ProManager Message - ${data.phone_num}`
|
|
||||||
}),
|
}),
|
||||||
body: message.image_path ? `Image ${message.text}` : message.text
|
body: message.image_path ? `Image ${message.text}` : message.text
|
||||||
//imageUrl: "https://thinkimex.com/img/io-fcm.png", //TODO:AIO Resolve addresses for other instances
|
//imageUrl: "https://thinkimex.com/img/io-fcm.png", //TODO:AIO Resolve addresses for other instances
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
function InstanceManager({ args, instance, debug, executeFunction, rome, promanager, imex }) {
|
function InstanceManager({ args, instance, debug, executeFunction, rome, promanager, imex }) {
|
||||||
let propToReturn = null;
|
let propToReturn = null;
|
||||||
|
|
||||||
//TODO: Remove after debugging.
|
//TODO: Remove after debugging.
|
||||||
if (promanager) {
|
if (promanager) {
|
||||||
console.trace("ProManager Prop was used");
|
console.trace("ProManager Prop was used");
|
||||||
@@ -20,7 +20,11 @@ function InstanceManager({ args, instance, debug, executeFunction, rome, promana
|
|||||||
propToReturn = imex;
|
propToReturn = imex;
|
||||||
break;
|
break;
|
||||||
case "ROME":
|
case "ROME":
|
||||||
propToReturn = rome; //TODO:AIO Implement USE_IMEX
|
if (rome === "USE_IMEX") {
|
||||||
|
propToReturn = imex;
|
||||||
|
} else {
|
||||||
|
propToReturn = rome;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case "PROMANAGER":
|
case "PROMANAGER":
|
||||||
//Return the rome prop if USE_ROME.
|
//Return the rome prop if USE_ROME.
|
||||||
|
|||||||
Reference in New Issue
Block a user