@dascompany/product 3.4.1 → 3.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/reader/AdminReader.js +1 -1
- package/dist/reader/ClientAccountReader.js +1 -1
- package/dist/reader/FileConnectionsReader.js +1 -1
- package/dist/reader/FilesReader.js +2 -2
- package/dist/reader/OrderProductsReader.js +3 -3
- package/dist/reader/OrderReader.js +2 -2
- package/dist/reader/OrderStatusReader.js +1 -1
- package/dist/reader/ProductReader.js +6 -6
- package/dist/types/CompanyDetailsI.d.ts +1 -1
- package/dist/types/FileI.d.ts +1 -1
- package/dist/types/PaymentMethodI.d.ts +1 -1
- package/dist/types/ProductI.d.ts +1 -1
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@ export default class AdminReader {
|
|
|
13
13
|
}
|
|
14
14
|
static async getQuantity(queryOptions) {
|
|
15
15
|
const quantity = await DatabaseConnection.getInstance().adminAccounts.count(queryOptions);
|
|
16
|
-
return quantity;
|
|
16
|
+
return Number(quantity);
|
|
17
17
|
}
|
|
18
18
|
static correctAdmins(admins) {
|
|
19
19
|
const correctAdmins = [];
|
|
@@ -10,7 +10,7 @@ export default class ClientAccountReader {
|
|
|
10
10
|
}
|
|
11
11
|
static async getQuantity(queryOptions) {
|
|
12
12
|
const quantity = await DatabaseConnection.getInstance().clientAccounts.count(queryOptions);
|
|
13
|
-
return quantity;
|
|
13
|
+
return Number(quantity);
|
|
14
14
|
}
|
|
15
15
|
static async getId(queryOptions) {
|
|
16
16
|
const accountId = await DatabaseConnection.getInstance().clientAccounts.selectId(queryOptions);
|
|
@@ -17,7 +17,7 @@ export default class FileConnectionsReader {
|
|
|
17
17
|
fileId: fileConnections.file_id,
|
|
18
18
|
connectionType: fileConnections.connection_type,
|
|
19
19
|
connectionId: fileConnections.connection_id,
|
|
20
|
-
sequence: fileConnections.sequence
|
|
20
|
+
sequence: Number(fileConnections.sequence)
|
|
21
21
|
};
|
|
22
22
|
return correctFileConnection;
|
|
23
23
|
}
|
|
@@ -14,7 +14,7 @@ export default class FilesReader {
|
|
|
14
14
|
}
|
|
15
15
|
static async getQuantity(queryOptions) {
|
|
16
16
|
const quantity = await DatabaseConnection.getInstance().files.count(queryOptions);
|
|
17
|
-
return quantity;
|
|
17
|
+
return Number(quantity);
|
|
18
18
|
}
|
|
19
19
|
static async getForConnection(queryOptions) {
|
|
20
20
|
const files = await DatabaseConnection.getInstance().files.selectForConnection(queryOptions);
|
|
@@ -33,7 +33,7 @@ export default class FilesReader {
|
|
|
33
33
|
id: file.id,
|
|
34
34
|
name: file.name,
|
|
35
35
|
catalog: file.catalog,
|
|
36
|
-
type: file.type,
|
|
36
|
+
type: Number(file.type),
|
|
37
37
|
createdAt: file.created_at
|
|
38
38
|
};
|
|
39
39
|
return correctFile;
|
|
@@ -23,9 +23,9 @@ export default class OrderProductsReader {
|
|
|
23
23
|
productId: orderProduct.product_id,
|
|
24
24
|
sku: orderProduct.sku,
|
|
25
25
|
title: orderProduct.title,
|
|
26
|
-
netPrice: orderProduct.net_price,
|
|
27
|
-
grossPrice: PriceConverter.netToGrossPrice(orderProduct.net_price, orderProduct.vat),
|
|
28
|
-
vat: orderProduct.vat,
|
|
26
|
+
netPrice: Number(orderProduct.net_price),
|
|
27
|
+
grossPrice: PriceConverter.netToGrossPrice(Number(orderProduct.net_price), Number(orderProduct.vat)),
|
|
28
|
+
vat: Number(orderProduct.vat),
|
|
29
29
|
thumbnail,
|
|
30
30
|
};
|
|
31
31
|
return correctProduct;
|
|
@@ -22,7 +22,7 @@ export default class OrderReader {
|
|
|
22
22
|
}
|
|
23
23
|
static async getQuantity(queryOptions) {
|
|
24
24
|
const quantity = await DatabaseConnection.getInstance().orders.count(queryOptions);
|
|
25
|
-
return quantity;
|
|
25
|
+
return Number(quantity);
|
|
26
26
|
}
|
|
27
27
|
static async correctOrders(orderRows) {
|
|
28
28
|
const orders = [];
|
|
@@ -39,7 +39,7 @@ export default class OrderReader {
|
|
|
39
39
|
const correctOrder = {
|
|
40
40
|
id: order.id,
|
|
41
41
|
email: order.email,
|
|
42
|
-
price: order.price,
|
|
42
|
+
price: Number(order.price),
|
|
43
43
|
createdAt: order.created_at,
|
|
44
44
|
clientId: order.client_id,
|
|
45
45
|
deliveryDetailsId: order.delivery_details_id,
|
|
@@ -23,11 +23,11 @@ export default class ProductReader {
|
|
|
23
23
|
}
|
|
24
24
|
static async getQuantity(queryOptions) {
|
|
25
25
|
const quantity = await DatabaseConnection.getInstance().products.count(queryOptions);
|
|
26
|
-
return quantity;
|
|
26
|
+
return Number(quantity);
|
|
27
27
|
}
|
|
28
28
|
static async getMaxPrice(queryOptions) {
|
|
29
29
|
const price = await DatabaseConnection.getInstance().products.selectMaxPrice(queryOptions);
|
|
30
|
-
return price;
|
|
30
|
+
return Number(price);
|
|
31
31
|
}
|
|
32
32
|
static async correctProducts(products) {
|
|
33
33
|
const correctProducts = [];
|
|
@@ -45,17 +45,17 @@ export default class ProductReader {
|
|
|
45
45
|
url: product.url,
|
|
46
46
|
title: product.title,
|
|
47
47
|
description: product.description,
|
|
48
|
-
netPrice: product.net_price,
|
|
49
|
-
vat: product.vat,
|
|
48
|
+
netPrice: Number(product.net_price),
|
|
49
|
+
vat: Number(product.vat),
|
|
50
50
|
color: product.color,
|
|
51
|
-
quantity: product.quantity,
|
|
51
|
+
quantity: Number(product.quantity),
|
|
52
52
|
width: product.width,
|
|
53
53
|
height: product.height,
|
|
54
54
|
length: product.length,
|
|
55
55
|
createdAt: product.created_at,
|
|
56
56
|
deleted: product.deleted,
|
|
57
57
|
thumbnail: thumbnail ? thumbnail : null,
|
|
58
|
-
grossPrice: PriceConverter.netToGrossPrice(product.net_price, product.vat),
|
|
58
|
+
grossPrice: PriceConverter.netToGrossPrice(Number(product.net_price), Number(product.vat)),
|
|
59
59
|
jsonData: product.json_data
|
|
60
60
|
};
|
|
61
61
|
}
|
package/dist/types/FileI.d.ts
CHANGED
package/dist/types/ProductI.d.ts
CHANGED