gm-mcp 1.1.21 → 1.1.23

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.
@@ -60,14 +60,25 @@ function debtCollectionRateTool(options) {
60
60
  const messages = [];
61
61
  for (const item of foundMonths) {
62
62
  messages.push([
63
- `Sản phẩm: ${item.fields[productKey] || "N/A"}`,
64
- `Kỳ lương: ${(item === null || item === void 0 ? void 0 : item.fields[preiodKey]) || "N/A"}`,
65
- `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"}`,
66
- `Tháng cắt nợ: ${item.fields[monthReductionDebtKey] || "N/A"}`,
67
- `Tỷ lệ thu nợ: ${typeof item.fields[debtCollectionRateKey] === "undefined"
63
+ item.fields[productKey] || "N/A",
64
+ typeof item.fields[debtCollectionRateKey] === "undefined"
68
65
  ? "N/A"
69
- : round(Number(item.fields[debtCollectionRateKey])) + "%"}`,
70
- ].join("<br>"));
66
+ : round(Number(item.fields[debtCollectionRateKey])) + "%",
67
+ ((_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",
68
+ ].join(" | "));
69
+ // messages.push(
70
+ // [
71
+ // `Sản phẩm: ${item.fields[productKey] || "N/A"}`,
72
+ // `Kỳ lương: ${item?.fields[preiodKey] || "N/A"}`,
73
+ // `Tr.thái cắt nợ: ${item?.fields[statusKey]?.[0]?.text || "N/A"}`,
74
+ // `Tháng cắt nợ: ${item.fields[monthReductionDebtKey] || "N/A"}`,
75
+ // `Tỷ lệ thu nợ: ${
76
+ // typeof item.fields[debtCollectionRateKey] === "undefined"
77
+ // ? "N/A"
78
+ // : round(Number(item.fields[debtCollectionRateKey])) + "%"
79
+ // }`,
80
+ // ].join("<br>")
81
+ // );
71
82
  }
72
83
  // return {} as any;
73
84
  if (sendMessageToLark) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-mcp",
3
- "version": "1.1.21",
3
+ "version": "1.1.23",
4
4
  "description": "Mcp server for Gm",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -57,17 +57,27 @@ export async function debtCollectionRateTool(options: {
57
57
  for (const item of foundMonths) {
58
58
  messages.push(
59
59
  [
60
- `Sản phẩm: ${item.fields[productKey] || "N/A"}`,
61
- `Kỳ lương: ${item?.fields[preiodKey] || "N/A"}`,
62
- `Tr.thái cắt nợ: ${item?.fields[statusKey]?.[0]?.text || "N/A"}`,
63
- `Tháng cắt nợ: ${item.fields[monthReductionDebtKey] || "N/A"}`,
64
- `Tỷ lệ thu nợ: ${
65
- typeof item.fields[debtCollectionRateKey] === "undefined"
66
- ? "N/A"
67
- : round(Number(item.fields[debtCollectionRateKey])) + "%"
68
- }`,
69
- ].join("<br>")
60
+ item.fields[productKey] || "N/A",
61
+ typeof item.fields[debtCollectionRateKey] === "undefined"
62
+ ? "N/A"
63
+ : round(Number(item.fields[debtCollectionRateKey])) + "%",
64
+ item?.fields[statusKey]?.[0]?.text || "N/A",
65
+
66
+ ].join(" | ")
70
67
  );
68
+ // messages.push(
69
+ // [
70
+ // `Sản phẩm: ${item.fields[productKey] || "N/A"}`,
71
+ // `Kỳ lương: ${item?.fields[preiodKey] || "N/A"}`,
72
+ // `Tr.thái cắt nợ: ${item?.fields[statusKey]?.[0]?.text || "N/A"}`,
73
+ // `Tháng cắt nợ: ${item.fields[monthReductionDebtKey] || "N/A"}`,
74
+ // `Tỷ lệ thu nợ: ${
75
+ // typeof item.fields[debtCollectionRateKey] === "undefined"
76
+ // ? "N/A"
77
+ // : round(Number(item.fields[debtCollectionRateKey])) + "%"
78
+ // }`,
79
+ // ].join("<br>")
80
+ // );
71
81
  }
72
82
 
73
83
  // return {} as any;