gm-mcp 1.1.3 → 1.1.4
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/tools/lark-tool.js
CHANGED
|
@@ -21,8 +21,10 @@ const debtCollectionRateKey = "TỈ LỆ THU NỢ";
|
|
|
21
21
|
const debReductionMonthKey = "THÁNG CẮT NỢ";
|
|
22
22
|
const productKey = "Loại Sản phẩm";
|
|
23
23
|
const monthReductionDebtKey = "THÁNG CẮT NỢ";
|
|
24
|
+
const statusKey = "TRẠNG THÁI";
|
|
24
25
|
function debtCollectionRateTool(options) {
|
|
25
26
|
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
+
var _c, _d;
|
|
26
28
|
const { sendMessageToLark, companyName, monthDate } = options;
|
|
27
29
|
const monthParts = (0, helpers_1.extractMonth)(monthDate);
|
|
28
30
|
if (monthParts === null) {
|
|
@@ -52,10 +54,11 @@ function debtCollectionRateTool(options) {
|
|
|
52
54
|
messages.push([
|
|
53
55
|
`Sản phẩm: ${item.fields[productKey] || "N/A"}`,
|
|
54
56
|
`Kỳ lương: ${(item === null || item === void 0 ? void 0 : item.fields[preiodKey]) || "N/A"}`,
|
|
57
|
+
`Tr.thái cắt nợ: ${((_d = (_c = item === null || item === void 0 ? void 0 : item.fields[statusKey]) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.text) || "N/A"}`,
|
|
55
58
|
`Tháng cắt nợ: ${item.fields[monthReductionDebtKey] || "N/A"}`,
|
|
56
59
|
`Tỷ lệ thu nợ: ${typeof item.fields[debtCollectionRateKey] === "undefined"
|
|
57
60
|
? "N/A"
|
|
58
|
-
: round(Number(item.fields[debtCollectionRateKey]))}
|
|
61
|
+
: round(Number(item.fields[debtCollectionRateKey])) + "%"}`,
|
|
59
62
|
].join("<br>"));
|
|
60
63
|
}
|
|
61
64
|
// return {} as any;
|
package/package.json
CHANGED
package/src/tools/lark-tool.ts
CHANGED
|
@@ -11,6 +11,7 @@ const debtCollectionRateKey = "TỈ LỆ THU NỢ";
|
|
|
11
11
|
const debReductionMonthKey = "THÁNG CẮT NỢ";
|
|
12
12
|
const productKey = "Loại Sản phẩm";
|
|
13
13
|
const monthReductionDebtKey = "THÁNG CẮT NỢ";
|
|
14
|
+
const statusKey = "TRẠNG THÁI";
|
|
14
15
|
|
|
15
16
|
export async function debtCollectionRateTool(options: {
|
|
16
17
|
sendMessageToLark: boolean;
|
|
@@ -55,12 +56,13 @@ export async function debtCollectionRateTool(options: {
|
|
|
55
56
|
[
|
|
56
57
|
`Sản phẩm: ${item.fields[productKey] || "N/A"}`,
|
|
57
58
|
`Kỳ lương: ${item?.fields[preiodKey] || "N/A"}`,
|
|
59
|
+
`Tr.thái cắt nợ: ${item?.fields[statusKey]?.[0]?.text || "N/A"}`,
|
|
58
60
|
`Tháng cắt nợ: ${item.fields[monthReductionDebtKey] || "N/A"}`,
|
|
59
61
|
`Tỷ lệ thu nợ: ${
|
|
60
62
|
typeof item.fields[debtCollectionRateKey] === "undefined"
|
|
61
63
|
? "N/A"
|
|
62
|
-
: round(Number(item.fields[debtCollectionRateKey]))
|
|
63
|
-
}
|
|
64
|
+
: round(Number(item.fields[debtCollectionRateKey])) + "%"
|
|
65
|
+
}`,
|
|
64
66
|
].join("<br>")
|
|
65
67
|
);
|
|
66
68
|
}
|