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="theme-color" content="#1690ff" />
|
||||
<!-- <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="mask-icon" href="/mask-icon.svg" color="#FFFFFF" />
|
||||
<!--
|
||||
|
||||
@@ -115,7 +115,7 @@ export function JobsAvailableContainer({ bodyshop, currentUser, insertAuditTrail
|
||||
|
||||
// } else {
|
||||
//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({
|
||||
executeFunction: true,
|
||||
imex: CheckTaxRates,
|
||||
@@ -568,7 +568,6 @@ async function CheckTaxRates(estData, bodyshop) {
|
||||
}
|
||||
function ResolveCCCLineIssues(estData, bodyshop) {
|
||||
//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.
|
||||
estData.joblines.data.forEach((line) => {
|
||||
if (line.misc_amt && line.misc_amt !== 0) {
|
||||
@@ -591,34 +590,34 @@ function ResolveCCCLineIssues(estData, bodyshop) {
|
||||
//Group by line no
|
||||
// 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?
|
||||
InstanceRenderManager({
|
||||
executeFunction: true,
|
||||
args: [],
|
||||
promanager: () => {
|
||||
const groupedByLineRef = _.groupBy(estData.joblines.data, "line_ref");
|
||||
Object.keys(groupedByLineRef).forEach((lineRef) => {
|
||||
let index0ActPrice;
|
||||
groupedByLineRef[lineRef].forEach((line, index) => {
|
||||
//Let the first one keep it
|
||||
if (index === 0) {
|
||||
index0ActPrice = line.act_price;
|
||||
return;
|
||||
}
|
||||
//Web Est seems to have additional costs with UNQ_SEQ 0. Keep them all?
|
||||
if (line.unq_seq === 0) return;
|
||||
if (index0ActPrice !== line.act_price) {
|
||||
// line.notes += ` | Price override.`;
|
||||
return;
|
||||
}
|
||||
const indexInEstData = estData.joblines.data.findIndex((l) => l.unq_seq === line.unq_seq);
|
||||
//estData.joblines.data[indexInEstData].notes +=
|
||||
// ` | Act Price delete. (prev act price = ${estData.joblines.data[indexInEstData].act_price})`;
|
||||
estData.joblines.data[indexInEstData].act_price = 0;
|
||||
estData.joblines.data[indexInEstData].db_price = 0;
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
// InstanceRenderManager({
|
||||
// executeFunction: true,
|
||||
// args: [],
|
||||
// promanager: () => {
|
||||
// const groupedByLineRef = _.groupBy(estData.joblines.data, "line_ref");
|
||||
// Object.keys(groupedByLineRef).forEach((lineRef) => {
|
||||
// let index0ActPrice;
|
||||
// groupedByLineRef[lineRef].forEach((line, index) => {
|
||||
// //Let the first one keep it
|
||||
// if (index === 0) {
|
||||
// index0ActPrice = line.act_price;
|
||||
// return;
|
||||
// }
|
||||
// //Web Est seems to have additional costs with UNQ_SEQ 0. Keep them all?
|
||||
// if (line.unq_seq === 0) return;
|
||||
// if (index0ActPrice !== line.act_price) {
|
||||
// // line.notes += ` | Price override.`;
|
||||
// return;
|
||||
// }
|
||||
// const indexInEstData = estData.joblines.data.findIndex((l) => l.unq_seq === line.unq_seq);
|
||||
// //estData.joblines.data[indexInEstData].notes +=
|
||||
// // ` | Act Price delete. (prev act price = ${estData.joblines.data[indexInEstData].act_price})`;
|
||||
// estData.joblines.data[indexInEstData].act_price = 0;
|
||||
// estData.joblines.data[indexInEstData].db_price = 0;
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
|
||||
InstanceRenderManager({
|
||||
executeFunction: true,
|
||||
|
||||
@@ -12,7 +12,6 @@ export default function LoadingSpinner({ loading = true, message, ...props }) {
|
||||
position: "relative",
|
||||
alignContent: "center"
|
||||
}}
|
||||
// TODO: Client Update - if anything funky happens check this out
|
||||
{...(props.children ? { tip: message ? message : null } : {})}
|
||||
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
|
||||
|
||||
@@ -26,7 +26,6 @@ export function ShopInfoRbacComponent({ form, bodyshop }) {
|
||||
names: ["Simple_Inventory"],
|
||||
splitKey: bodyshop && bodyshop.imexshopid
|
||||
});
|
||||
//TODO:AIO Ensure that there are no duplicates here, it seems like there may be.
|
||||
return (
|
||||
<RbacWrapper action="shop:rbac">
|
||||
<LayoutFormRow>
|
||||
|
||||
@@ -31,7 +31,7 @@ if (import.meta.env.PROD) {
|
||||
Sentry.init({
|
||||
dsn: InstanceRenderManager({
|
||||
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: [
|
||||
|
||||
@@ -158,7 +158,7 @@ export function JobsDetailPage({
|
||||
(acc, val) => {
|
||||
acc[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;
|
||||
},
|
||||
|
||||
@@ -30,7 +30,6 @@ export const store = configureStore({
|
||||
middleware: (getDefaultMiddleware) =>
|
||||
getDefaultMiddleware({
|
||||
serializableCheck: false,
|
||||
// TODO: (Note) This is a production board change
|
||||
immutableCheck: false
|
||||
}).concat(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 ||
|
||||
InstanceMgr({
|
||||
imex: false,
|
||||
rome: thresholdAmount === 0 && parseInt(tyCounter) === 1,
|
||||
promanager: "USE_ROME"
|
||||
rome: thresholdAmount === 0 && parseInt(tyCounter) === 1
|
||||
})
|
||||
) {
|
||||
//
|
||||
|
||||
@@ -2,13 +2,11 @@ const RenderInstanceManager = require("../utils/instanceMgr").default;
|
||||
|
||||
exports.totals = RenderInstanceManager({
|
||||
imex: require("./job-totals").default,
|
||||
rome: require("./job-totals-USA").default,
|
||||
promanager: require("./job-totals-USA").default
|
||||
rome: require("./job-totals-USA").default
|
||||
});
|
||||
exports.totalsSsu = RenderInstanceManager({
|
||||
imex: require("./job-totals").totalsSsu,
|
||||
rome: require("./job-totals-USA").totalsSsu,
|
||||
promanager: require("./job-totals-USA").totalsSsu
|
||||
rome: require("./job-totals-USA").totalsSsu
|
||||
});
|
||||
exports.costing = require("./job-costing").JobCosting;
|
||||
exports.costingmulti = require("./job-costing").JobCostingMulti;
|
||||
|
||||
@@ -2,7 +2,7 @@ const express = require("express");
|
||||
const router = express.Router();
|
||||
const validateFirebaseIdTokenMiddleware = require("../middleware/validateFirebaseIdTokenMiddleware");
|
||||
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");
|
||||
|
||||
router.use(validateFirebaseIdTokenMiddleware);
|
||||
@@ -15,6 +15,5 @@ router.post("/updatecounter", updateCounter);
|
||||
router.post("/updateuser", updateUser);
|
||||
router.post("/getuser", getUser);
|
||||
router.post("/createuser", createUser);
|
||||
router.post("/promanagerwelcome", sendPromanagerWelcomeEmail);
|
||||
|
||||
module.exports = router;
|
||||
|
||||
@@ -95,8 +95,7 @@ exports.receive = async (req, res) => {
|
||||
notification: {
|
||||
title: InstanceManager({
|
||||
imex: `ImEX Online Message - ${data.phone_num}`,
|
||||
rome: `Rome Online Message - ${data.phone_num}`,
|
||||
promanager: `ProManager Message - ${data.phone_num}`
|
||||
rome: `Rome Online Message - ${data.phone_num}`
|
||||
}),
|
||||
body: message.image_path ? `Image ${message.text}` : message.text
|
||||
//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 }) {
|
||||
let propToReturn = null;
|
||||
|
||||
|
||||
//TODO: Remove after debugging.
|
||||
if (promanager) {
|
||||
console.trace("ProManager Prop was used");
|
||||
@@ -20,7 +20,11 @@ function InstanceManager({ args, instance, debug, executeFunction, rome, promana
|
||||
propToReturn = imex;
|
||||
break;
|
||||
case "ROME":
|
||||
propToReturn = rome; //TODO:AIO Implement USE_IMEX
|
||||
if (rome === "USE_IMEX") {
|
||||
propToReturn = imex;
|
||||
} else {
|
||||
propToReturn = rome;
|
||||
}
|
||||
break;
|
||||
case "PROMANAGER":
|
||||
//Return the rome prop if USE_ROME.
|
||||
|
||||
Reference in New Issue
Block a user