BOD-36 #comment Fixed issue where one of the values could be null and incorrect values would be shown.
This commit is contained in:
@@ -3,11 +3,27 @@ import { List } from "antd";
|
|||||||
import Icon from "@ant-design/icons";
|
import Icon from "@ant-design/icons";
|
||||||
import { FaArrowRight } from "react-icons/fa";
|
import { FaArrowRight } from "react-icons/fa";
|
||||||
export default function AuditTrailValuesComponent({ oldV, newV }) {
|
export default function AuditTrailValuesComponent({ oldV, newV }) {
|
||||||
|
console.log("(!oldV & !newV)", !oldV && !newV);
|
||||||
|
console.log("(!oldV & newV)", !oldV && newV);
|
||||||
|
if (!oldV && !newV) return <div></div>;
|
||||||
|
|
||||||
|
if (!oldV && newV)
|
||||||
|
return (
|
||||||
|
<List bordered size="small">
|
||||||
|
{Object.keys(newV).map((key, idx) => (
|
||||||
|
<List.Item key={idx} value={key}>
|
||||||
|
{key}: {JSON.stringify(newV[key])}
|
||||||
|
</List.Item>
|
||||||
|
))}
|
||||||
|
</List>
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<List bordered size="small">
|
<List bordered size="small">
|
||||||
{Object.keys(oldV).map((key, idx) => (
|
{Object.keys(oldV).map((key, idx) => (
|
||||||
<List.Item key={idx} value={key}>
|
<List.Item key={idx}>
|
||||||
{key}: {oldV[key]} <Icon component={FaArrowRight} /> {newV[key]}
|
{key}: {oldV[key]} <Icon component={FaArrowRight} />
|
||||||
|
{JSON.stringify(newV[key])}
|
||||||
</List.Item>
|
</List.Item>
|
||||||
))}
|
))}
|
||||||
</List>
|
</List>
|
||||||
|
|||||||
@@ -13,13 +13,6 @@ const S3_BUCKET = process.env.Bucket;
|
|||||||
exports.sign_s3 = (req, res) => {
|
exports.sign_s3 = (req, res) => {
|
||||||
console.log("Get S3 Signed Put for bucket: " + S3_BUCKET);
|
console.log("Get S3 Signed Put for bucket: " + S3_BUCKET);
|
||||||
const s3 = new aws.S3(); // Create a new instance of S3
|
const s3 = new aws.S3(); // Create a new instance of S3
|
||||||
// if (!req.body.fileName || req.body.fileType) {
|
|
||||||
// console.log('req.body.fileName', req.body.fileName)
|
|
||||||
// console.log('req.body.fileType', req.body.fileType)
|
|
||||||
// res.json({ success: false, error: "fileName or fileType missing." });
|
|
||||||
// console.log("Error: fileName or fileType missing. ");
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
const fileName = req.body.fileName;
|
const fileName = req.body.fileName;
|
||||||
const fileType = req.body.fileType;
|
const fileType = req.body.fileType;
|
||||||
// Set up the payload of what we are sending to the S3 api
|
// Set up the payload of what we are sending to the S3 api
|
||||||
|
|||||||
Reference in New Issue
Block a user