Skip to content

Commit 802c827

Browse files
committed
Fixed pop confirm's ok button on product and domain page, fixed product updating issue, remvoed console.log that was added for debugging prviously
1 parent ec9b002 commit 802c827

File tree

5 files changed

+5
-7
lines changed

5 files changed

+5
-7
lines changed

Diff for: Tombolo/client-reactjs/src/components/admin/Integrations/asr/DomainsTab.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const DomainsTab = ({ domains, setSelectedDomain, setDomainModalOpen }) => {
4242
title="Are you sure you want to delete this domain?"
4343
onConfirm={() => handleDelete(record)}
4444
okText="Yes"
45-
okButtonProps={{ type: 'danger' }}>
45+
okButtonProps={{ type: 'primary', danger: true }}>
4646
<DeleteOutlined style={{ color: 'var(--primary)' }} type="delete" />
4747
</Popconfirm>
4848
</Space>

Diff for: Tombolo/client-reactjs/src/components/admin/Integrations/asr/ProductModal.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ const ProductModal = ({
9393
try {
9494
const payload = {
9595
...values,
96+
id: selectedProduct.id,
9697
updatedBy: { lastName: user.lastName, firstName: user.firstName, email: user.email },
9798
};
9899
await updateProduct({ id: selectedProduct.id, payload });
@@ -112,7 +113,6 @@ const ProductModal = ({
112113
// JSX
113114
return (
114115
<Modal
115-
title="Add product"
116116
open={productModalOpen}
117117
okText={selectedProduct ? 'Update' : 'Save'}
118118
onOk={handleOk}

Diff for: Tombolo/client-reactjs/src/components/admin/Integrations/asr/ProductsTab.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ const ProductsTab = ({ products, setSelectedProduct, setProductModalOpen, setPro
9898
<Popconfirm
9999
title="Are you sure you want to delete this product?"
100100
onConfirm={() => handleDelete(record)}
101-
okButtonProps={{ type: 'danger' }}>
101+
okButtonProps={{ type: 'primary', danger: true }}>
102102
<DeleteOutlined type="delete" />
103103
</Popconfirm>
104104
</Space>

Diff for: Tombolo/server/routes/asr/read.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ router.get("/products/", async(req, res) => {
254254
attributes: ["id", "name"],
255255
},
256256
],
257+
order: [["createdAt", "DESC"]],
257258
raw: true,
258259
});
259260

@@ -283,7 +284,7 @@ router.get("/productsOnly/", async(req, res) => {
283284
router.put(
284285
"/products/:id",
285286
[
286-
param("id").notEmpty().isUUID().withMessage("ID must be a UUID"),
287+
param("id").notEmpty().isInt().withMessage("ID must be an integer"),
287288
body("name").notEmpty().isString().withMessage("Product name is required"),
288289
body("shortCode").notEmpty().isString().withMessage("Short code is required"),
289290
body("tier").notEmpty().isInt().withMessage("Tier is required"),

Diff for: Tombolo/server/routes/monitorings/read.js

-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ const MonitoringTypes = models.monitoring_types;
1313
// Route to get all monitoring types
1414
router.get("/", async(req, res) => {
1515
try{
16-
console.log('------------------------------------------');
17-
console.dir("GET ALL MONITORINGS")
18-
console.log('------------------------------------------');
1916
const monitoringTypes = await MonitoringTypes.findAll();
2017
res.status(200).json(monitoringTypes);
2118
}catch(err){

0 commit comments

Comments
 (0)