gm-mcp 2.0.14 → 2.0.16

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.
@@ -161,7 +161,7 @@ function elgibilityToolV2(phoneNumber) {
161
161
  var _a;
162
162
  let mess = "";
163
163
  const name = (_a = FIELD_LABELS[criteria.key]) !== null && _a !== void 0 ? _a : criteria.key;
164
- mess = `tiêu chí ${name} có giá trị: ${criteria.currentLabel}, yêu cầu: ${criteria.requiredLabel}, trạng thái kiểm tra: ${criteria.pass ? "thoà mãn" : "không thoả mãn"}`;
164
+ mess = `tiêu chí ${name} có giá trị: ${criteria.currentLabel}, yêu cầu: ${criteria.requiredLabel}, trạng thái kiểm tra: ${criteria.pass ? "đạt" : "không đạt"}`;
165
165
  if (criteria.reason) {
166
166
  mess = mess + `lý do: ${criteria.reason}`;
167
167
  }
@@ -173,7 +173,7 @@ function elgibilityToolV2(phoneNumber) {
173
173
  current: customer.ewa_status,
174
174
  currentLabel: (_f = (_e = customer_ewa_1.CUSTOMER_EWA_STATUS_MAPS[customer.ewa_status]) === null || _e === void 0 ? void 0 : _e.label) !== null && _f !== void 0 ? _f : "",
175
175
  required: "active",
176
- requiredLabel: customer_ewa_1.CUSTOMER_EWA_STATUS_MAPS.ACTIVE.LABEL,
176
+ requiredLabel: customer_ewa_1.CUSTOMER_EWA_STATUS_MAPS.ACTIVE.label,
177
177
  pass: compare(customer.ewa_status, customer_ewa_1.CustomerEwaStatus.ACTIVE),
178
178
  reason: ewaDeactiveReason,
179
179
  },
@@ -185,22 +185,13 @@ function elgibilityToolV2(phoneNumber) {
185
185
  requiredLabel: `>= 0.3 năm`,
186
186
  pass: !!(employee === null || employee === void 0 ? void 0 : employee.seniority) && employee.seniority >= 0.3,
187
187
  },
188
- {
189
- key: "seniority",
190
- current: employee === null || employee === void 0 ? void 0 : employee.seniority,
191
- currentLabel: `${employee === null || employee === void 0 ? void 0 : employee.seniority} năm`,
192
- required: ">= 0.3",
193
- requiredLabel: `>= 0.3 năm`,
194
- pass: !!(employee === null || employee === void 0 ? void 0 : employee.seniority) && employee.seniority >= 0.3,
195
- reason: ewaDeactiveReason,
196
- },
197
188
  {
198
189
  key: "employee_status",
199
190
  current: employee === null || employee === void 0 ? void 0 : employee.status,
200
191
  currentLabel: ((_g = employee_1.EMPLOYEE_STATUS_MAPS[(employee === null || employee === void 0 ? void 0 : employee.status) || ""]) === null || _g === void 0 ? void 0 : _g.label) || "",
201
192
  required: employee_1.EmployeeStatus.ACTIVE,
202
193
  requiredLabel: employee_1.EMPLOYEE_STATUS_MAPS.ACTIVE.label,
203
- pass: ((_h = employee === null || employee === void 0 ? void 0 : employee.status) === null || _h === void 0 ? void 0 : _h.toLowerCase()) === employee_1.EmployeeStatus.ACTIVE,
194
+ pass: ((_h = employee === null || employee === void 0 ? void 0 : employee.status) === null || _h === void 0 ? void 0 : _h.toLowerCase()) === employee_1.EmployeeStatus.ACTIVE.toLocaleLowerCase(),
204
195
  reason: employee === null || employee === void 0 ? void 0 : employee.reason,
205
196
  },
206
197
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gm-mcp",
3
- "version": "2.0.14",
3
+ "version": "2.0.16",
4
4
  "description": "Mcp server for Gm",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -193,7 +193,7 @@ export async function elgibilityToolV2(phoneNumber: string): Promise<CallToolRes
193
193
  const formatter2 = (criteria: CompareResult) => {
194
194
  let mess = "";
195
195
  const name = FIELD_LABELS[criteria.key] ?? criteria.key;
196
- mess = `tiêu chí ${name} có giá trị: ${criteria.currentLabel}, yêu cầu: ${criteria.requiredLabel}, trạng thái kiểm tra: ${criteria.pass ? "thoà mãn" : "không thoả mãn"}`;
196
+ mess = `tiêu chí ${name} có giá trị: ${criteria.currentLabel}, yêu cầu: ${criteria.requiredLabel}, trạng thái kiểm tra: ${criteria.pass ? "đạt" : "không đạt"}`;
197
197
  if (criteria.reason) {
198
198
  mess = mess + `lý do: ${criteria.reason}`;
199
199
  }
@@ -206,7 +206,7 @@ export async function elgibilityToolV2(phoneNumber: string): Promise<CallToolRes
206
206
  current: customer.ewa_status,
207
207
  currentLabel: CUSTOMER_EWA_STATUS_MAPS[customer.ewa_status]?.label ?? "",
208
208
  required: "active",
209
- requiredLabel: CUSTOMER_EWA_STATUS_MAPS.ACTIVE.LABEL,
209
+ requiredLabel: CUSTOMER_EWA_STATUS_MAPS.ACTIVE.label,
210
210
  pass: compare(customer.ewa_status, CustomerEwaStatus.ACTIVE),
211
211
  reason: ewaDeactiveReason,
212
212
  },
@@ -218,22 +218,14 @@ export async function elgibilityToolV2(phoneNumber: string): Promise<CallToolRes
218
218
  requiredLabel: `>= 0.3 năm`,
219
219
  pass: !!employee?.seniority && employee.seniority >= 0.3,
220
220
  },
221
- {
222
- key: "seniority",
223
- current: employee?.seniority,
224
- currentLabel: `${employee?.seniority} năm`,
225
- required: ">= 0.3",
226
- requiredLabel: `>= 0.3 năm`,
227
- pass: !!employee?.seniority && employee.seniority >= 0.3,
228
- reason: ewaDeactiveReason,
229
- },
221
+
230
222
  {
231
223
  key: "employee_status",
232
224
  current: employee?.status,
233
225
  currentLabel: EMPLOYEE_STATUS_MAPS[employee?.status || ""]?.label || "",
234
226
  required: EmployeeStatus.ACTIVE,
235
227
  requiredLabel: EMPLOYEE_STATUS_MAPS.ACTIVE.label,
236
- pass: employee?.status?.toLowerCase() === EmployeeStatus.ACTIVE,
228
+ pass: employee?.status?.toLowerCase() === EmployeeStatus.ACTIVE.toLocaleLowerCase(),
237
229
  reason: employee?.reason,
238
230
  },
239
231
  {