@provis/provis-common-be-module 1.4.0 → 1.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.
|
@@ -12,12 +12,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.default = (obj1, obj2) => __awaiter(this, void 0, void 0, function* () {
|
|
13
13
|
const keys = Object.keys(obj2);
|
|
14
14
|
return new Promise((res) => {
|
|
15
|
-
res(keys.
|
|
15
|
+
res(keys.filter((key) => {
|
|
16
16
|
if (obj1[key] != obj2[key]) {
|
|
17
|
-
return
|
|
18
|
-
[key]: obj1[key],
|
|
19
|
-
};
|
|
17
|
+
return true;
|
|
20
18
|
}
|
|
21
|
-
}))
|
|
19
|
+
}).map((key) => ({
|
|
20
|
+
[key]: `${obj1[key]} - ${obj2[key]}`,
|
|
21
|
+
})));
|
|
22
22
|
});
|
|
23
23
|
});
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -10,8 +10,9 @@ import convertToCurrency from "./convertToCurrency";
|
|
|
10
10
|
import filterObj from "./filterObj";
|
|
11
11
|
import generateRelationId from "./generateRelationId";
|
|
12
12
|
import getCurrentDate from "./getCurrentDate";
|
|
13
|
+
import getDiffValue from "./getDiffValue";
|
|
13
14
|
import getObjByKeys from "./getObjByKeys";
|
|
14
15
|
import loop from "./loop";
|
|
15
16
|
import loopBackward from "./loopBackward";
|
|
16
17
|
import searchValue from "./searchValue";
|
|
17
|
-
export { addDateTime, axiosGet, axiosPost, axiosPut, compareDiffObj, convertCurrencySymbol, convertDateTimeFormat, convertObjToNumber, convertToCurrency, filterObj, generateRelationId, getCurrentDate, getObjByKeys, loop, loopBackward, searchValue, };
|
|
18
|
+
export { addDateTime, axiosGet, axiosPost, axiosPut, compareDiffObj, convertCurrencySymbol, convertDateTimeFormat, convertObjToNumber, convertToCurrency, filterObj, generateRelationId, getCurrentDate, getDiffValue, getObjByKeys, loop, loopBackward, searchValue, };
|
package/dist/helpers/index.js
CHANGED
|
@@ -24,6 +24,8 @@ const generateRelationId_1 = require("./generateRelationId");
|
|
|
24
24
|
exports.generateRelationId = generateRelationId_1.default;
|
|
25
25
|
const getCurrentDate_1 = require("./getCurrentDate");
|
|
26
26
|
exports.getCurrentDate = getCurrentDate_1.default;
|
|
27
|
+
const getDiffValue_1 = require("./getDiffValue");
|
|
28
|
+
exports.getDiffValue = getDiffValue_1.default;
|
|
27
29
|
const getObjByKeys_1 = require("./getObjByKeys");
|
|
28
30
|
exports.getObjByKeys = getObjByKeys_1.default;
|
|
29
31
|
const loop_1 = require("./loop");
|
|
@@ -44,6 +44,18 @@ exports.default = ({ searchValue, searchKey, operatorValue, keyName = searchKey,
|
|
|
44
44
|
key: searchKey,
|
|
45
45
|
value,
|
|
46
46
|
};
|
|
47
|
+
case operator_1.default.OPERATOR_IN:
|
|
48
|
+
return {
|
|
49
|
+
query: `${keyName} IN (:${searchKey})`,
|
|
50
|
+
key: searchKey,
|
|
51
|
+
value,
|
|
52
|
+
};
|
|
53
|
+
case operator_1.default.v:
|
|
54
|
+
return {
|
|
55
|
+
query: `${keyName} NOT IN (:${searchKey})`,
|
|
56
|
+
key: searchKey,
|
|
57
|
+
value,
|
|
58
|
+
};
|
|
47
59
|
default:
|
|
48
60
|
return undefined;
|
|
49
61
|
}
|