diff --git a/client/src/App/App.jsx b/client/src/App/App.jsx
index b8465e18f..97b65977a 100644
--- a/client/src/App/App.jsx
+++ b/client/src/App/App.jsx
@@ -19,9 +19,7 @@ const ResetPassword = lazy(() =>
);
const ManagePage = lazy(() => import("../pages/manage/manage.page.container"));
const SignInPage = lazy(() => import("../pages/sign-in/sign-in.page"));
-const Unauthorized = lazy(() =>
- import("../pages/unauthorized/unauthorized.component")
-);
+
const CsiPage = lazy(() => import("../pages/csi/csi.container.page"));
const MobilePaymentContainer = lazy(() =>
import("../pages/mobile-payment/mobile-payment.container")
@@ -51,30 +49,41 @@ export function App({ checkUserSession, currentUser }) {
return (
-
- }>
+ }>
+
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
);
diff --git a/client/src/pages/owners-detail/owners-detail.page.container.jsx b/client/src/pages/owners-detail/owners-detail.page.container.jsx
index 79c7bcca8..42b7c2ba6 100644
--- a/client/src/pages/owners-detail/owners-detail.page.container.jsx
+++ b/client/src/pages/owners-detail/owners-detail.page.container.jsx
@@ -12,6 +12,7 @@ import {
} from "../../redux/application/application.actions";
import { CreateRecentItem } from "../../utils/create-recent-item";
import OwnersDetailComponent from "./owners-detail.page.component";
+import NotFound from "../../components/not-found/not-found.component";
const mapDispatchToProps = (dispatch) => ({
setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)),
@@ -34,9 +35,9 @@ export function OwnersDetailContainer({
useEffect(() => {
document.title = t("titles.owners-detail", {
name: data
- ? `${data.owners_by_pk.ownr_fn || ""} ${
- data.owners_by_pk.ownr_ln || ""
- } ${data.owners_by_pk.ownr_co_nm || ""}`
+ ? `${(data.owners_by_pk && data.owners_by_pk.ownr_fn) || ""} ${
+ (data.owners_by_pk && data.owners_by_pk.ownr_ln) || ""
+ } ${(data.owners_by_pk && data.owners_by_pk.ownr_co_nm) || ""}`
: "",
});
@@ -46,15 +47,15 @@ export function OwnersDetailContainer({
link: `/manage/owners/${ownerId}`,
label: t("titles.bc.owner-detail", {
name: data
- ? `${data.owners_by_pk.ownr_fn || ""} ${
- data.owners_by_pk.ownr_ln || ""
- } ${data.owners_by_pk.ownr_co_nm || ""}`
+ ? `${(data.owners_by_pk && data.owners_by_pk.ownr_fn) || ""} ${
+ (data.owners_by_pk && data.owners_by_pk.ownr_ln) || ""
+ } ${(data.owners_by_pk && data.owners_by_pk.ownr_co_nm) || ""}`
: "",
}),
},
]);
- if (data)
+ if (data && data.owners_by_pk)
addRecentItem(
CreateRecentItem(
ownerId,
@@ -69,16 +70,12 @@ export function OwnersDetailContainer({
if (loading) return ;
if (error) return ;
+ if (!!!data.owners_by_pk) return ;
- if (data.owners_by_pk)
- return (
-
-
-
- );
- else
- return (
-
- );
+ return (
+
+
+
+ );
}
export default connect(null, mapDispatchToProps)(OwnersDetailContainer);
diff --git a/client/src/pages/unauthorized/unauthorized.component.jsx b/client/src/pages/unauthorized/unauthorized.component.jsx
deleted file mode 100644
index 913be8192..000000000
--- a/client/src/pages/unauthorized/unauthorized.component.jsx
+++ /dev/null
@@ -1,15 +0,0 @@
-import React from "react";
-import { Typography } from "antd";
-import HeaderContainer from "../../components/header/header.container";
-
-export default function Unauthorized() {
- return (
-
-
- Unauthorized
-
- You do not have permission to view the requested page.
-
-
- );
-}
diff --git a/client/src/pages/vehicles-detail/vehicles-detail.page.container.jsx b/client/src/pages/vehicles-detail/vehicles-detail.page.container.jsx
index 3cc16a419..99f5d2b25 100644
--- a/client/src/pages/vehicles-detail/vehicles-detail.page.container.jsx
+++ b/client/src/pages/vehicles-detail/vehicles-detail.page.container.jsx
@@ -11,6 +11,7 @@ import {
} from "../../redux/application/application.actions";
import { connect } from "react-redux";
import { CreateRecentItem } from "../../utils/create-recent-item";
+import NotFound from "../../components/not-found/not-found.component";
const mapDispatchToProps = (dispatch) => ({
setBreadcrumbs: (breadcrumbs) => dispatch(setBreadcrumbs(breadcrumbs)),
@@ -34,7 +35,9 @@ export function VehicleDetailContainer({
document.title = t("titles.vehicledetail", {
vehicle:
data && data.vehicles_by_pk
- ? `${data.vehicles_by_pk.v_model_yr} ${data.vehicles_by_pk.v_make_desc} ${data.vehicles_by_pk.v_model_desc}`
+ ? `${data.vehicles_by_pk && data.vehicles_by_pk.v_model_yr} ${
+ data.vehicles_by_pk && data.vehicles_by_pk.v_make_desc
+ } ${data.vehicles_by_pk && data.vehicles_by_pk.v_model_desc}`
: "",
});
setBreadcrumbs([
@@ -50,7 +53,7 @@ export function VehicleDetailContainer({
},
]);
- if (data)
+ if (data && data.vehicles_by_pk)
addRecentItem(
CreateRecentItem(
vehId,
@@ -64,13 +67,9 @@ export function VehicleDetailContainer({
if (loading) return ;
if (error) return ;
- if (data.vehicles_by_pk)
- return (
-
- );
- else
- return (
-
- );
+ if (!!!data.vehicles_by_pk) return ;
+ return (
+
+ );
}
export default connect(null, mapDispatchToProps)(VehicleDetailContainer);
diff --git a/firebase/functions/.eslintrc.json b/firebase/functions/.eslintrc.json
deleted file mode 100644
index 6b6beb656..000000000
--- a/firebase/functions/.eslintrc.json
+++ /dev/null
@@ -1,123 +0,0 @@
-{
- "parserOptions": {
- // Required for certain syntax usages
- "ecmaVersion": 2017
- },
- "plugins": [
- "promise"
- ],
- "extends": "eslint:recommended",
- "rules": {
- // Removed rule "disallow the use of console" from recommended eslint rules
- "no-console": "off",
-
- // Removed rule "disallow multiple spaces in regular expressions" from recommended eslint rules
- "no-regex-spaces": "off",
-
- // Removed rule "disallow the use of debugger" from recommended eslint rules
- "no-debugger": "off",
-
- // Removed rule "disallow unused variables" from recommended eslint rules
- "no-unused-vars": "off",
-
- // Removed rule "disallow mixed spaces and tabs for indentation" from recommended eslint rules
- "no-mixed-spaces-and-tabs": "off",
-
- // Removed rule "disallow the use of undeclared variables unless mentioned in /*global */ comments" from recommended eslint rules
- "no-undef": "off",
-
- // Warn against template literal placeholder syntax in regular strings
- "no-template-curly-in-string": 1,
-
- // Warn if return statements do not either always or never specify values
- "consistent-return": 1,
-
- // Warn if no return statements in callbacks of array methods
- "array-callback-return": 1,
-
- // Require the use of === and !==
- "eqeqeq": 2,
-
- // Disallow the use of alert, confirm, and prompt
- "no-alert": 2,
-
- // Disallow the use of arguments.caller or arguments.callee
- "no-caller": 2,
-
- // Disallow null comparisons without type-checking operators
- "no-eq-null": 2,
-
- // Disallow the use of eval()
- "no-eval": 2,
-
- // Warn against extending native types
- "no-extend-native": 1,
-
- // Warn against unnecessary calls to .bind()
- "no-extra-bind": 1,
-
- // Warn against unnecessary labels
- "no-extra-label": 1,
-
- // Disallow leading or trailing decimal points in numeric literals
- "no-floating-decimal": 2,
-
- // Warn against shorthand type conversions
- "no-implicit-coercion": 1,
-
- // Warn against function declarations and expressions inside loop statements
- "no-loop-func": 1,
-
- // Disallow new operators with the Function object
- "no-new-func": 2,
-
- // Warn against new operators with the String, Number, and Boolean objects
- "no-new-wrappers": 1,
-
- // Disallow throwing literals as exceptions
- "no-throw-literal": 2,
-
- // Require using Error objects as Promise rejection reasons
- "prefer-promise-reject-errors": 2,
-
- // Enforce “for” loop update clause moving the counter in the right direction
- "for-direction": 2,
-
- // Enforce return statements in getters
- "getter-return": 2,
-
- // Disallow await inside of loops
- "no-await-in-loop": 2,
-
- // Disallow comparing against -0
- "no-compare-neg-zero": 2,
-
- // Warn against catch clause parameters from shadowing variables in the outer scope
- "no-catch-shadow": 1,
-
- // Disallow identifiers from shadowing restricted names
- "no-shadow-restricted-names": 2,
-
- // Enforce return statements in callbacks of array methods
- "callback-return": 2,
-
- // Require error handling in callbacks
- "handle-callback-err": 2,
-
- // Warn against string concatenation with __dirname and __filename
- "no-path-concat": 1,
-
- // Prefer using arrow functions for callbacks
- "prefer-arrow-callback": 1,
-
- // Return inside each then() to create readable and reusable Promise chains.
- // Forces developers to return console logs and http calls in promises.
- "promise/always-return": 2,
-
- //Enforces the use of catch() on un-returned promises
- "promise/catch-or-return": 2,
-
- // Warn against nested then() or catch() statements
- "promise/no-nesting": 1
- }
-}
diff --git a/firebase/functions/.eslintrc.jsonx b/firebase/functions/.eslintrc.jsonx
new file mode 100644
index 000000000..5cb11cd2e
--- /dev/null
+++ b/firebase/functions/.eslintrc.jsonx
@@ -0,0 +1,123 @@
+// {
+// "parserOptions": {
+// // Required for certain syntax usages
+// "ecmaVersion": 2017
+// },
+// "plugins": [
+// "promise"
+// ],
+// "extends": "eslint:recommended",
+// "rules": {
+// // Removed rule "disallow the use of console" from recommended eslint rules
+// "no-console": "off",
+
+// // Removed rule "disallow multiple spaces in regular expressions" from recommended eslint rules
+// "no-regex-spaces": "off",
+
+// // Removed rule "disallow the use of debugger" from recommended eslint rules
+// "no-debugger": "off",
+
+// // Removed rule "disallow unused variables" from recommended eslint rules
+// "no-unused-vars": "off",
+
+// // Removed rule "disallow mixed spaces and tabs for indentation" from recommended eslint rules
+// "no-mixed-spaces-and-tabs": "off",
+
+// // Removed rule "disallow the use of undeclared variables unless mentioned in /*global */ comments" from recommended eslint rules
+// "no-undef": "off",
+
+// // Warn against template literal placeholder syntax in regular strings
+// "no-template-curly-in-string": 1,
+
+// // Warn if return statements do not either always or never specify values
+// "consistent-return": 1,
+
+// // Warn if no return statements in callbacks of array methods
+// "array-callback-return": 1,
+
+// // Require the use of === and !==
+// "eqeqeq": 2,
+
+// // Disallow the use of alert, confirm, and prompt
+// "no-alert": 2,
+
+// // Disallow the use of arguments.caller or arguments.callee
+// "no-caller": 2,
+
+// // Disallow null comparisons without type-checking operators
+// "no-eq-null": 2,
+
+// // Disallow the use of eval()
+// "no-eval": 2,
+
+// // Warn against extending native types
+// "no-extend-native": 1,
+
+// // Warn against unnecessary calls to .bind()
+// "no-extra-bind": 1,
+
+// // Warn against unnecessary labels
+// "no-extra-label": 1,
+
+// // Disallow leading or trailing decimal points in numeric literals
+// "no-floating-decimal": 2,
+
+// // Warn against shorthand type conversions
+// "no-implicit-coercion": 1,
+
+// // Warn against function declarations and expressions inside loop statements
+// "no-loop-func": 1,
+
+// // Disallow new operators with the Function object
+// "no-new-func": 2,
+
+// // Warn against new operators with the String, Number, and Boolean objects
+// "no-new-wrappers": 1,
+
+// // Disallow throwing literals as exceptions
+// "no-throw-literal": 2,
+
+// // Require using Error objects as Promise rejection reasons
+// "prefer-promise-reject-errors": 2,
+
+// // Enforce “for” loop update clause moving the counter in the right direction
+// "for-direction": 2,
+
+// // Enforce return statements in getters
+// "getter-return": 2,
+
+// // Disallow await inside of loops
+// "no-await-in-loop": 2,
+
+// // Disallow comparing against -0
+// "no-compare-neg-zero": 2,
+
+// // Warn against catch clause parameters from shadowing variables in the outer scope
+// "no-catch-shadow": 1,
+
+// // Disallow identifiers from shadowing restricted names
+// "no-shadow-restricted-names": 2,
+
+// // Enforce return statements in callbacks of array methods
+// "callback-return": 2,
+
+// // Require error handling in callbacks
+// "handle-callback-err": 2,
+
+// // Warn against string concatenation with __dirname and __filename
+// "no-path-concat": 1,
+
+// // Prefer using arrow functions for callbacks
+// "prefer-arrow-callback": 1,
+
+// // Return inside each then() to create readable and reusable Promise chains.
+// // Forces developers to return console logs and http calls in promises.
+// "promise/always-return": 2,
+
+// //Enforces the use of catch() on un-returned promises
+// "promise/catch-or-return": 2,
+
+// // Warn against nested then() or catch() statements
+// "promise/no-nesting": 1
+// }
+// }