@dascompany/product 3.4.2 → 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.
|
@@ -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);
|
|
@@ -4,7 +4,6 @@ import createQueryOptionsForId from "../utils/createQueryOptionsForId";
|
|
|
4
4
|
export default class CompanyDataReader {
|
|
5
5
|
static async get() {
|
|
6
6
|
const companyData = await DatabaseConnection.getInstance().companyData.select();
|
|
7
|
-
console.log('companyData', companyData);
|
|
8
7
|
if (companyData) {
|
|
9
8
|
const address = companyData?.address_id ? await AddressesReader.get(createQueryOptionsForId(companyData.address_id)) : null;
|
|
10
9
|
return {
|
|
@@ -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);
|
|
@@ -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 = [];
|
|
@@ -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 = [];
|