@etsoo/smarterp-core 1.1.52 → 1.1.53

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.
@@ -79,7 +79,7 @@ export interface ICoreApp {
79
79
  * @param kind Kind
80
80
  * @returns Label
81
81
  */
82
- getDocumentKind(kind?: DocumentKind): string | undefined;
82
+ getDocumentKind(kind?: DocumentKind | string): string | undefined;
83
83
  /**
84
84
  * Get document kinds
85
85
  * 获取文档类型列表
@@ -212,7 +212,7 @@ export declare class CoreApp implements ICoreApp {
212
212
  * @param kind Kind
213
213
  * @returns Label
214
214
  */
215
- getDocumentKind(kind?: DocumentKind): string | undefined;
215
+ getDocumentKind(kind?: DocumentKind | string): string | undefined;
216
216
  /**
217
217
  * Get document kinds
218
218
  * 获取文档类型列表
@@ -131,7 +131,7 @@ class CoreApp {
131
131
  getDocumentKind(kind) {
132
132
  if (kind == null)
133
133
  return undefined;
134
- const key = DocumentKind_1.DocumentKind[kind];
134
+ const key = typeof kind === "string" ? kind : DocumentKind_1.DocumentKind[kind];
135
135
  return this.app.get("template" + key) ?? key;
136
136
  }
137
137
  /**
@@ -125,7 +125,7 @@
125
125
  "targetId": "Target id",
126
126
  "template": "Template",
127
127
  "templateCMSASSETCHECKALERT": "CMS asset check alert",
128
- "templateCMSASSETEXPIRYALERT": "CMS asset expiry alert",
128
+ "templateCMSASSETEXPIRYALERT": "CMS asset expiry reminder",
129
129
  "templateCMSCUSTOMERDATA": "CMS customer data",
130
130
  "templateCMSORDERDATA": "CMS order data",
131
131
  "templateCMSPODATA": "CMS PO data",
@@ -124,8 +124,8 @@
124
124
  "target": "目标",
125
125
  "targetId": "目标编号",
126
126
  "template": "模板",
127
- "templateCMSASSETCHECKALERT": "CMS资产检查警告",
128
- "templateCMSASSETEXPIRYALERT": "CMS资产过期警告",
127
+ "templateCMSASSETCHECKALERT": "CMS资产检查警报",
128
+ "templateCMSASSETEXPIRYALERT": "CMS资产过期提醒",
129
129
  "templateCMSCUSTOMERDATA": "CMS客户数据",
130
130
  "templateCMSORDERDATA": "CMS订单数据",
131
131
  "templateCMSPODATA": "CMS采购数据",
@@ -124,8 +124,8 @@
124
124
  "target": "目標",
125
125
  "targetId": "目標編號",
126
126
  "template": "模板",
127
- "templateCMSASSETCHECKALERT": "CMS資產檢查警告",
128
- "templateCMSASSETEXPIRYALERT": "CMS資產過期警告",
127
+ "templateCMSASSETCHECKALERT": "CMS資產檢查警报",
128
+ "templateCMSASSETEXPIRYALERT": "CMS資產過期提醒",
129
129
  "templateCMSCUSTOMERDATA": "CMS客戶數據",
130
130
  "templateCMSORDERDATA": "CMS訂單數據",
131
131
  "templateCMSPODATA": "CMS採購數據",
@@ -79,7 +79,7 @@ export interface ICoreApp {
79
79
  * @param kind Kind
80
80
  * @returns Label
81
81
  */
82
- getDocumentKind(kind?: DocumentKind): string | undefined;
82
+ getDocumentKind(kind?: DocumentKind | string): string | undefined;
83
83
  /**
84
84
  * Get document kinds
85
85
  * 获取文档类型列表
@@ -212,7 +212,7 @@ export declare class CoreApp implements ICoreApp {
212
212
  * @param kind Kind
213
213
  * @returns Label
214
214
  */
215
- getDocumentKind(kind?: DocumentKind): string | undefined;
215
+ getDocumentKind(kind?: DocumentKind | string): string | undefined;
216
216
  /**
217
217
  * Get document kinds
218
218
  * 获取文档类型列表
@@ -128,7 +128,7 @@ export class CoreApp {
128
128
  getDocumentKind(kind) {
129
129
  if (kind == null)
130
130
  return undefined;
131
- const key = DocumentKind[kind];
131
+ const key = typeof kind === "string" ? kind : DocumentKind[kind];
132
132
  return this.app.get("template" + key) ?? key;
133
133
  }
134
134
  /**
@@ -125,7 +125,7 @@
125
125
  "targetId": "Target id",
126
126
  "template": "Template",
127
127
  "templateCMSASSETCHECKALERT": "CMS asset check alert",
128
- "templateCMSASSETEXPIRYALERT": "CMS asset expiry alert",
128
+ "templateCMSASSETEXPIRYALERT": "CMS asset expiry reminder",
129
129
  "templateCMSCUSTOMERDATA": "CMS customer data",
130
130
  "templateCMSORDERDATA": "CMS order data",
131
131
  "templateCMSPODATA": "CMS PO data",
@@ -124,8 +124,8 @@
124
124
  "target": "目标",
125
125
  "targetId": "目标编号",
126
126
  "template": "模板",
127
- "templateCMSASSETCHECKALERT": "CMS资产检查警告",
128
- "templateCMSASSETEXPIRYALERT": "CMS资产过期警告",
127
+ "templateCMSASSETCHECKALERT": "CMS资产检查警报",
128
+ "templateCMSASSETEXPIRYALERT": "CMS资产过期提醒",
129
129
  "templateCMSCUSTOMERDATA": "CMS客户数据",
130
130
  "templateCMSORDERDATA": "CMS订单数据",
131
131
  "templateCMSPODATA": "CMS采购数据",
@@ -124,8 +124,8 @@
124
124
  "target": "目標",
125
125
  "targetId": "目標編號",
126
126
  "template": "模板",
127
- "templateCMSASSETCHECKALERT": "CMS資產檢查警告",
128
- "templateCMSASSETEXPIRYALERT": "CMS資產過期警告",
127
+ "templateCMSASSETCHECKALERT": "CMS資產檢查警报",
128
+ "templateCMSASSETEXPIRYALERT": "CMS資產過期提醒",
129
129
  "templateCMSCUSTOMERDATA": "CMS客戶數據",
130
130
  "templateCMSORDERDATA": "CMS訂單數據",
131
131
  "templateCMSPODATA": "CMS採購數據",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/smarterp-core",
3
- "version": "1.1.52",
3
+ "version": "1.1.53",
4
4
  "description": "TypeScript APIs for SmartERP Core",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -57,7 +57,7 @@
57
57
  },
58
58
  "dependencies": {
59
59
  "@etsoo/appscript": "^1.6.65",
60
- "@etsoo/materialui": "^1.6.67",
60
+ "@etsoo/materialui": "^1.6.68",
61
61
  "@etsoo/react": "^1.8.90",
62
62
  "@etsoo/shared": "^1.2.84",
63
63
  "@etsoo/toolpad": "^1.0.49",
package/src/CoreApp.ts CHANGED
@@ -93,7 +93,7 @@ export interface ICoreApp {
93
93
  * @param kind Kind
94
94
  * @returns Label
95
95
  */
96
- getDocumentKind(kind?: DocumentKind): string | undefined;
96
+ getDocumentKind(kind?: DocumentKind | string): string | undefined;
97
97
 
98
98
  /**
99
99
  * Get document kinds
@@ -279,10 +279,10 @@ export class CoreApp implements ICoreApp {
279
279
  * @param kind Kind
280
280
  * @returns Label
281
281
  */
282
- getDocumentKind(kind?: DocumentKind) {
282
+ getDocumentKind(kind?: DocumentKind | string) {
283
283
  if (kind == null) return undefined;
284
284
 
285
- const key = DocumentKind[kind];
285
+ const key = typeof kind === "string" ? kind : DocumentKind[kind];
286
286
  return this.app.get("template" + key) ?? key;
287
287
  }
288
288
 
package/src/i18n/en.json CHANGED
@@ -125,7 +125,7 @@
125
125
  "targetId": "Target id",
126
126
  "template": "Template",
127
127
  "templateCMSASSETCHECKALERT": "CMS asset check alert",
128
- "templateCMSASSETEXPIRYALERT": "CMS asset expiry alert",
128
+ "templateCMSASSETEXPIRYALERT": "CMS asset expiry reminder",
129
129
  "templateCMSCUSTOMERDATA": "CMS customer data",
130
130
  "templateCMSORDERDATA": "CMS order data",
131
131
  "templateCMSPODATA": "CMS PO data",
@@ -124,8 +124,8 @@
124
124
  "target": "目标",
125
125
  "targetId": "目标编号",
126
126
  "template": "模板",
127
- "templateCMSASSETCHECKALERT": "CMS资产检查警告",
128
- "templateCMSASSETEXPIRYALERT": "CMS资产过期警告",
127
+ "templateCMSASSETCHECKALERT": "CMS资产检查警报",
128
+ "templateCMSASSETEXPIRYALERT": "CMS资产过期提醒",
129
129
  "templateCMSCUSTOMERDATA": "CMS客户数据",
130
130
  "templateCMSORDERDATA": "CMS订单数据",
131
131
  "templateCMSPODATA": "CMS采购数据",
@@ -124,8 +124,8 @@
124
124
  "target": "目標",
125
125
  "targetId": "目標編號",
126
126
  "template": "模板",
127
- "templateCMSASSETCHECKALERT": "CMS資產檢查警告",
128
- "templateCMSASSETEXPIRYALERT": "CMS資產過期警告",
127
+ "templateCMSASSETCHECKALERT": "CMS資產檢查警报",
128
+ "templateCMSASSETEXPIRYALERT": "CMS資產過期提醒",
129
129
  "templateCMSCUSTOMERDATA": "CMS客戶數據",
130
130
  "templateCMSORDERDATA": "CMS訂單數據",
131
131
  "templateCMSPODATA": "CMS採購數據",