@etsoo/appscript 1.2.26 → 1.2.30

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/README.md CHANGED
@@ -64,9 +64,12 @@ $ yarn add @etsoo/appscript
64
64
  - BusinessTax - Business tax
65
65
 
66
66
  #### BusinessUtils.ts ####
67
- - addIdLabelBlankItem - Add blank item to id/label data array
67
+ - getCurrencies - Get currency collection
68
+ - getEntityStatusLabel - Get entity status's label
69
+ - getEntityStatus - Get entity status collection
68
70
  - getUnitLabel - Get product unit's label
69
71
  - getUnits - Get all product units
72
+ - getRepeatOptions - Get all repeat options
70
73
 
71
74
  #### ProductUnit.ts ####
72
75
  - ProductUnit - Product units enum
@@ -55,7 +55,7 @@ AddressRegion.US = new AddressRegion('US', 'USA', '840', AddressContinent_1.Addr
55
55
  * CA - Canada
56
56
  * 加拿大
57
57
  */
58
- AddressRegion.CA = new AddressRegion('CA', 'CAN', '124', AddressContinent_1.AddressContinent.NA, '011', '1', 'USD', ['en-CA', 'fr-CA']);
58
+ AddressRegion.CA = new AddressRegion('CA', 'CAN', '124', AddressContinent_1.AddressContinent.NA, '011', '1', 'CAD', ['en-CA', 'fr-CA']);
59
59
  /**
60
60
  * AU - Australia
61
61
  * 澳大利亚
@@ -75,7 +75,7 @@ AddressRegion.GB = new AddressRegion('GB', 'GBR', '826', AddressContinent_1.Addr
75
75
  * IE - Ireland
76
76
  * 爱尔兰
77
77
  */
78
- AddressRegion.IE = new AddressRegion('IE', 'IRL', '372', AddressContinent_1.AddressContinent.EU, '00', '353', 'IEP', ['en-IE']);
78
+ AddressRegion.IE = new AddressRegion('IE', 'IRL', '372', AddressContinent_1.AddressContinent.EU, '00', '353', 'EUR', ['en-IE']);
79
79
  /**
80
80
  * DE - Germany
81
81
  * 德国
@@ -1,4 +1,3 @@
1
- import { DataTypes } from '@etsoo/shared';
2
1
  import { IdLabelDto } from '../dto/IdLabelDto';
3
2
  import { ICultureGet } from '../state/Culture';
4
3
  import { EntityStatus } from './EntityStatus';
@@ -8,23 +7,22 @@ import { ProductUnit } from './ProductUnit';
8
7
  */
9
8
  export declare namespace BusinessUtils {
10
9
  /**
11
- * Add blank item to id/label data array
12
- * @param input Input array
13
- * @param copy Copy or change the current inpu
14
- * @returns Items with blank item
10
+ * Get currency collection
11
+ * @param currencyNames Names like CNY, USD
12
+ * @param func Label delegate
13
+ * @returns Collection
15
14
  */
16
- function addIdLabelBlankItem<T extends DataTypes.IdType = number>(input: IdLabelDto<T>[], copy?: boolean): IdLabelDto<T>[];
15
+ function getCurrencies(currencyNames: string[], func: ICultureGet): IdLabelDto<string>[];
17
16
  /**
18
- * Get product unit's label
19
- * Please define the label in culture with key 'statusNormal' for Normal status
17
+ * Get entity status's label
18
+ * Please define the label with key 'statusNormal' for Normal status
20
19
  * @param unit Unit
21
20
  * @param func Label delegate
22
21
  * @returns Label
23
22
  */
24
23
  function getEntityStatusLabel(status: EntityStatus, func: ICultureGet): string;
25
24
  /**
26
- * Get product unit's label
27
- * Please define the label in culture with key 'unitPC' for ProductUnit.PC like that
25
+ * Get entity status collection
28
26
  * @param unit Unit
29
27
  * @param func Label delegate
30
28
  * @returns Label
@@ -11,22 +11,24 @@ const ProductUnit_1 = require("./ProductUnit");
11
11
  var BusinessUtils;
12
12
  (function (BusinessUtils) {
13
13
  /**
14
- * Add blank item to id/label data array
15
- * @param input Input array
16
- * @param copy Copy or change the current inpu
17
- * @returns Items with blank item
14
+ * Get currency collection
15
+ * @param currencyNames Names like CNY, USD
16
+ * @param func Label delegate
17
+ * @returns Collection
18
18
  */
19
- function addIdLabelBlankItem(input, copy = false) {
20
- const blankItem = { id: '', label: '---' };
21
- if (copy)
22
- return [blankItem, ...input];
23
- input.unshift(blankItem);
24
- return input;
19
+ function getCurrencies(currencyNames, func) {
20
+ return currencyNames.map((name) => {
21
+ var _a;
22
+ return ({
23
+ id: name,
24
+ label: (_a = func(`currency${name}`)) !== null && _a !== void 0 ? _a : name
25
+ });
26
+ });
25
27
  }
26
- BusinessUtils.addIdLabelBlankItem = addIdLabelBlankItem;
28
+ BusinessUtils.getCurrencies = getCurrencies;
27
29
  /**
28
- * Get product unit's label
29
- * Please define the label in culture with key 'statusNormal' for Normal status
30
+ * Get entity status's label
31
+ * Please define the label with key 'statusNormal' for Normal status
30
32
  * @param unit Unit
31
33
  * @param func Label delegate
32
34
  * @returns Label
@@ -38,8 +40,7 @@ var BusinessUtils;
38
40
  }
39
41
  BusinessUtils.getEntityStatusLabel = getEntityStatusLabel;
40
42
  /**
41
- * Get product unit's label
42
- * Please define the label in culture with key 'unitPC' for ProductUnit.PC like that
43
+ * Get entity status collection
43
44
  * @param unit Unit
44
45
  * @param func Label delegate
45
46
  * @returns Label
@@ -1,6 +1,11 @@
1
1
  {
2
+ "accountant": "Accountant",
2
3
  "actions": "Actions",
3
4
  "add": "Add",
5
+ "audits": "Audits",
6
+ "authorizer": "Authorizer",
7
+ "applicant": "Applicant",
8
+ "approve": "Approve it",
4
9
  "back": "Back",
5
10
  "cancel": "Cancel",
6
11
  "clear": "Clear",
@@ -11,6 +16,18 @@
11
16
  "copy": "Copy",
12
17
  "creation": "Creation",
13
18
  "currency": "Currency",
19
+ "currencyAUD": "Australia Dollar $",
20
+ "currencyCAD": "Canada Dollar $",
21
+ "currencyCNY": "Renminbi(RMB) ¥",
22
+ "currencyEUR": "Euro €",
23
+ "currencyGBP": "British Pound £",
24
+ "currencyHKD": "Hong Kong Dollar $",
25
+ "currencyJPY": "Japan Yen ¥",
26
+ "currencyNZD": "New Zealand Dollar $",
27
+ "currencySGD": "Singapore Dollar $",
28
+ "currencyUSD": "U.S. Dollar $",
29
+ "data": "Data",
30
+ "dataComparison": "Data comparison",
14
31
  "delete": "Delete",
15
32
  "deleteConfirm": "Are you sure you want to permanently delete this {0}?",
16
33
  "description": "Description",
@@ -77,6 +94,13 @@
77
94
  "statusInactivated": "Inactivated",
78
95
  "submit": "Submit",
79
96
  "success": "Success",
97
+ "taxId": "Tax ID number",
98
+ "taxIdHelp": "Used for real-name authentication and invoicing",
99
+ "taxCABN": "Business number",
100
+ "taxCNUSCC": "Unified social credit code",
101
+ "taxHKBRN": "Business registration number",
102
+ "taxNZIRD": "IRD",
103
+ "taxUSEIN": "Employer identification number",
80
104
  "timeDifferenceInvalid": "The time difference between the device and the server is {0}, which exceeds the limit of {1} seconds. Please adjust the device time. If it is abnormal, please inform the administrator",
81
105
  "tokenExpiry": "Your session is about to expire. Click the Cancel button to continue",
82
106
  "yes": "Yes",
@@ -97,6 +121,9 @@
97
121
  "unitGRAM": "g",
98
122
  "unitJIN": "½Kg",
99
123
  "unitKILOGRAM": "Kg",
124
+ "update": "Update",
125
+ "user": "User",
126
+ "view": "View",
100
127
  "warning": "Warning",
101
128
  "welcome": "{0}, welcome!"
102
129
  }
@@ -1,6 +1,11 @@
1
1
  {
2
+ "accountant": "会计",
2
3
  "actions": "操作",
3
4
  "add": "添加",
5
+ "audits": "稽核历史",
6
+ "authorizer": "授权人",
7
+ "applicant": "申请人",
8
+ "approve": "批准",
4
9
  "back": "后退",
5
10
  "cancel": "取消",
6
11
  "clear": "清除",
@@ -11,6 +16,18 @@
11
16
  "copy": "复制",
12
17
  "creation": "登记时间",
13
18
  "currency": "币种",
19
+ "currencyAUD": "澳元$",
20
+ "currencyCAD": "加元$",
21
+ "currencyCNY": "人民币¥",
22
+ "currencyEUR": "欧元€",
23
+ "currencyGBP": "英镑£",
24
+ "currencyHKD": "港币$",
25
+ "currencyJPY": "日元¥",
26
+ "currencyNZD": "纽币$",
27
+ "currencySGD": "新币$",
28
+ "currencyUSD": "美元$",
29
+ "data": "数据",
30
+ "dataComparison": "数据对比",
14
31
  "delete": "删除",
15
32
  "deleteConfirm": "确定要永久删除此{0}吗?",
16
33
  "description": "描述",
@@ -77,6 +94,13 @@
77
94
  "statusInactivated": "已停用",
78
95
  "submit": "提交",
79
96
  "success": "成功",
97
+ "taxId": "税号",
98
+ "taxIdHelp": "用于实名认证和开具发票",
99
+ "taxCABN": "营业编号(BN)",
100
+ "taxCNUSCC": "统一信用代码",
101
+ "taxHKBRN": "商业登记号码(BRN)",
102
+ "taxNZIRD": "IRD",
103
+ "taxUSEIN": "雇主识别号码(EIN)",
80
104
  "timeDifferenceInvalid": "设备时间和服务器时间差为{0},超过{1}秒的限制,请调整设备时间,如果异常请告知管理员",
81
105
  "tokenExpiry": "您的会话即将过期。点击 取消 按钮继续使用",
82
106
  "yes": "是",
@@ -98,6 +122,9 @@
98
122
  "unitJIN": "斤",
99
123
  "unitKILOGRAM": "公斤",
100
124
  "unitTON": "吨",
125
+ "update": "更新",
126
+ "user": "用户",
127
+ "view": "查看",
101
128
  "warning": "警告",
102
129
  "welcome": "{0}, 欢迎光临!"
103
130
  }
@@ -1,6 +1,11 @@
1
1
  {
2
+ "accountant": "會計",
2
3
  "actions": "操作",
3
4
  "add": "添加",
5
+ "audits": "稽核歷史",
6
+ "authorizer": "授權人",
7
+ "applicant": "申請人",
8
+ "approve": "批准",
4
9
  "back": "後退",
5
10
  "cancel": "取消",
6
11
  "clear": "清除",
@@ -11,6 +16,18 @@
11
16
  "copy": "複製",
12
17
  "creation": "登記時間",
13
18
  "currency": "幣種",
19
+ "currencyAUD": "澳元$",
20
+ "currencyCAD": "加元$",
21
+ "currencyCNY": "人民幣¥",
22
+ "currencyEUR": "歐元€",
23
+ "currencyGBP": "英鎊£",
24
+ "currencyHKD": "港幣$",
25
+ "currencyJPY": "日元¥",
26
+ "currencyNZD": "紐幣$",
27
+ "currencySGD": "新幣$",
28
+ "currencyUSD": "美元$",
29
+ "data": "數據",
30
+ "dataComparison": "數據對比",
14
31
  "delete": "刪除",
15
32
  "deleteConfirm": "確定要永久刪除此{0}嗎?",
16
33
  "description": "描述",
@@ -77,6 +94,13 @@
77
94
  "statusInactivated": "已停用",
78
95
  "submit": "提交",
79
96
  "success": "成功",
97
+ "taxId": "稅號",
98
+ "taxIdHelp": "用於實名認證和開具發票",
99
+ "taxCABN": "營業編號(BN)",
100
+ "taxCNUSCC": "統一信用代碼",
101
+ "taxHKBRN": "商業登記號碼(BRN)",
102
+ "taxNZIRD": "IRD",
103
+ "taxUSEIN": "雇主識別號碼(EIN)",
80
104
  "timeDifferenceInvalid": "設備時間和服務器時間差為{0},超過{1}秒的限制,請調整設備時間,如果異常請告知管理員",
81
105
  "tokenExpiry": "您的會話即將過期。點擊 取消 按鈕繼續使用",
82
106
  "yes": "是",
@@ -97,6 +121,9 @@
97
121
  "unitGRAM": "克",
98
122
  "unitJIN": "斤",
99
123
  "unitKILOGRAM": "公斤",
124
+ "update": "更新",
125
+ "user": "用戶",
126
+ "view": "查看",
100
127
  "warning": "警告",
101
128
  "welcome": "{0}, 歡迎光臨!"
102
129
  }
@@ -51,7 +51,7 @@ AddressRegion.US = new AddressRegion('US', 'USA', '840', AddressContinent.NA, '0
51
51
  * CA - Canada
52
52
  * 加拿大
53
53
  */
54
- AddressRegion.CA = new AddressRegion('CA', 'CAN', '124', AddressContinent.NA, '011', '1', 'USD', ['en-CA', 'fr-CA']);
54
+ AddressRegion.CA = new AddressRegion('CA', 'CAN', '124', AddressContinent.NA, '011', '1', 'CAD', ['en-CA', 'fr-CA']);
55
55
  /**
56
56
  * AU - Australia
57
57
  * 澳大利亚
@@ -71,7 +71,7 @@ AddressRegion.GB = new AddressRegion('GB', 'GBR', '826', AddressContinent.EU, '0
71
71
  * IE - Ireland
72
72
  * 爱尔兰
73
73
  */
74
- AddressRegion.IE = new AddressRegion('IE', 'IRL', '372', AddressContinent.EU, '00', '353', 'IEP', ['en-IE']);
74
+ AddressRegion.IE = new AddressRegion('IE', 'IRL', '372', AddressContinent.EU, '00', '353', 'EUR', ['en-IE']);
75
75
  /**
76
76
  * DE - Germany
77
77
  * 德国
@@ -1,4 +1,3 @@
1
- import { DataTypes } from '@etsoo/shared';
2
1
  import { IdLabelDto } from '../dto/IdLabelDto';
3
2
  import { ICultureGet } from '../state/Culture';
4
3
  import { EntityStatus } from './EntityStatus';
@@ -8,23 +7,22 @@ import { ProductUnit } from './ProductUnit';
8
7
  */
9
8
  export declare namespace BusinessUtils {
10
9
  /**
11
- * Add blank item to id/label data array
12
- * @param input Input array
13
- * @param copy Copy or change the current inpu
14
- * @returns Items with blank item
10
+ * Get currency collection
11
+ * @param currencyNames Names like CNY, USD
12
+ * @param func Label delegate
13
+ * @returns Collection
15
14
  */
16
- function addIdLabelBlankItem<T extends DataTypes.IdType = number>(input: IdLabelDto<T>[], copy?: boolean): IdLabelDto<T>[];
15
+ function getCurrencies(currencyNames: string[], func: ICultureGet): IdLabelDto<string>[];
17
16
  /**
18
- * Get product unit's label
19
- * Please define the label in culture with key 'statusNormal' for Normal status
17
+ * Get entity status's label
18
+ * Please define the label with key 'statusNormal' for Normal status
20
19
  * @param unit Unit
21
20
  * @param func Label delegate
22
21
  * @returns Label
23
22
  */
24
23
  function getEntityStatusLabel(status: EntityStatus, func: ICultureGet): string;
25
24
  /**
26
- * Get product unit's label
27
- * Please define the label in culture with key 'unitPC' for ProductUnit.PC like that
25
+ * Get entity status collection
28
26
  * @param unit Unit
29
27
  * @param func Label delegate
30
28
  * @returns Label
@@ -8,22 +8,24 @@ import { ProductUnit } from './ProductUnit';
8
8
  export var BusinessUtils;
9
9
  (function (BusinessUtils) {
10
10
  /**
11
- * Add blank item to id/label data array
12
- * @param input Input array
13
- * @param copy Copy or change the current inpu
14
- * @returns Items with blank item
11
+ * Get currency collection
12
+ * @param currencyNames Names like CNY, USD
13
+ * @param func Label delegate
14
+ * @returns Collection
15
15
  */
16
- function addIdLabelBlankItem(input, copy = false) {
17
- const blankItem = { id: '', label: '---' };
18
- if (copy)
19
- return [blankItem, ...input];
20
- input.unshift(blankItem);
21
- return input;
16
+ function getCurrencies(currencyNames, func) {
17
+ return currencyNames.map((name) => {
18
+ var _a;
19
+ return ({
20
+ id: name,
21
+ label: (_a = func(`currency${name}`)) !== null && _a !== void 0 ? _a : name
22
+ });
23
+ });
22
24
  }
23
- BusinessUtils.addIdLabelBlankItem = addIdLabelBlankItem;
25
+ BusinessUtils.getCurrencies = getCurrencies;
24
26
  /**
25
- * Get product unit's label
26
- * Please define the label in culture with key 'statusNormal' for Normal status
27
+ * Get entity status's label
28
+ * Please define the label with key 'statusNormal' for Normal status
27
29
  * @param unit Unit
28
30
  * @param func Label delegate
29
31
  * @returns Label
@@ -35,8 +37,7 @@ export var BusinessUtils;
35
37
  }
36
38
  BusinessUtils.getEntityStatusLabel = getEntityStatusLabel;
37
39
  /**
38
- * Get product unit's label
39
- * Please define the label in culture with key 'unitPC' for ProductUnit.PC like that
40
+ * Get entity status collection
40
41
  * @param unit Unit
41
42
  * @param func Label delegate
42
43
  * @returns Label
@@ -1,6 +1,11 @@
1
1
  {
2
+ "accountant": "Accountant",
2
3
  "actions": "Actions",
3
4
  "add": "Add",
5
+ "audits": "Audits",
6
+ "authorizer": "Authorizer",
7
+ "applicant": "Applicant",
8
+ "approve": "Approve it",
4
9
  "back": "Back",
5
10
  "cancel": "Cancel",
6
11
  "clear": "Clear",
@@ -11,6 +16,18 @@
11
16
  "copy": "Copy",
12
17
  "creation": "Creation",
13
18
  "currency": "Currency",
19
+ "currencyAUD": "Australia Dollar $",
20
+ "currencyCAD": "Canada Dollar $",
21
+ "currencyCNY": "Renminbi(RMB) ¥",
22
+ "currencyEUR": "Euro €",
23
+ "currencyGBP": "British Pound £",
24
+ "currencyHKD": "Hong Kong Dollar $",
25
+ "currencyJPY": "Japan Yen ¥",
26
+ "currencyNZD": "New Zealand Dollar $",
27
+ "currencySGD": "Singapore Dollar $",
28
+ "currencyUSD": "U.S. Dollar $",
29
+ "data": "Data",
30
+ "dataComparison": "Data comparison",
14
31
  "delete": "Delete",
15
32
  "deleteConfirm": "Are you sure you want to permanently delete this {0}?",
16
33
  "description": "Description",
@@ -77,6 +94,13 @@
77
94
  "statusInactivated": "Inactivated",
78
95
  "submit": "Submit",
79
96
  "success": "Success",
97
+ "taxId": "Tax ID number",
98
+ "taxIdHelp": "Used for real-name authentication and invoicing",
99
+ "taxCABN": "Business number",
100
+ "taxCNUSCC": "Unified social credit code",
101
+ "taxHKBRN": "Business registration number",
102
+ "taxNZIRD": "IRD",
103
+ "taxUSEIN": "Employer identification number",
80
104
  "timeDifferenceInvalid": "The time difference between the device and the server is {0}, which exceeds the limit of {1} seconds. Please adjust the device time. If it is abnormal, please inform the administrator",
81
105
  "tokenExpiry": "Your session is about to expire. Click the Cancel button to continue",
82
106
  "yes": "Yes",
@@ -97,6 +121,9 @@
97
121
  "unitGRAM": "g",
98
122
  "unitJIN": "½Kg",
99
123
  "unitKILOGRAM": "Kg",
124
+ "update": "Update",
125
+ "user": "User",
126
+ "view": "View",
100
127
  "warning": "Warning",
101
128
  "welcome": "{0}, welcome!"
102
129
  }
@@ -1,6 +1,11 @@
1
1
  {
2
+ "accountant": "会计",
2
3
  "actions": "操作",
3
4
  "add": "添加",
5
+ "audits": "稽核历史",
6
+ "authorizer": "授权人",
7
+ "applicant": "申请人",
8
+ "approve": "批准",
4
9
  "back": "后退",
5
10
  "cancel": "取消",
6
11
  "clear": "清除",
@@ -11,6 +16,18 @@
11
16
  "copy": "复制",
12
17
  "creation": "登记时间",
13
18
  "currency": "币种",
19
+ "currencyAUD": "澳元$",
20
+ "currencyCAD": "加元$",
21
+ "currencyCNY": "人民币¥",
22
+ "currencyEUR": "欧元€",
23
+ "currencyGBP": "英镑£",
24
+ "currencyHKD": "港币$",
25
+ "currencyJPY": "日元¥",
26
+ "currencyNZD": "纽币$",
27
+ "currencySGD": "新币$",
28
+ "currencyUSD": "美元$",
29
+ "data": "数据",
30
+ "dataComparison": "数据对比",
14
31
  "delete": "删除",
15
32
  "deleteConfirm": "确定要永久删除此{0}吗?",
16
33
  "description": "描述",
@@ -77,6 +94,13 @@
77
94
  "statusInactivated": "已停用",
78
95
  "submit": "提交",
79
96
  "success": "成功",
97
+ "taxId": "税号",
98
+ "taxIdHelp": "用于实名认证和开具发票",
99
+ "taxCABN": "营业编号(BN)",
100
+ "taxCNUSCC": "统一信用代码",
101
+ "taxHKBRN": "商业登记号码(BRN)",
102
+ "taxNZIRD": "IRD",
103
+ "taxUSEIN": "雇主识别号码(EIN)",
80
104
  "timeDifferenceInvalid": "设备时间和服务器时间差为{0},超过{1}秒的限制,请调整设备时间,如果异常请告知管理员",
81
105
  "tokenExpiry": "您的会话即将过期。点击 取消 按钮继续使用",
82
106
  "yes": "是",
@@ -98,6 +122,9 @@
98
122
  "unitJIN": "斤",
99
123
  "unitKILOGRAM": "公斤",
100
124
  "unitTON": "吨",
125
+ "update": "更新",
126
+ "user": "用户",
127
+ "view": "查看",
101
128
  "warning": "警告",
102
129
  "welcome": "{0}, 欢迎光临!"
103
130
  }
@@ -1,6 +1,11 @@
1
1
  {
2
+ "accountant": "會計",
2
3
  "actions": "操作",
3
4
  "add": "添加",
5
+ "audits": "稽核歷史",
6
+ "authorizer": "授權人",
7
+ "applicant": "申請人",
8
+ "approve": "批准",
4
9
  "back": "後退",
5
10
  "cancel": "取消",
6
11
  "clear": "清除",
@@ -11,6 +16,18 @@
11
16
  "copy": "複製",
12
17
  "creation": "登記時間",
13
18
  "currency": "幣種",
19
+ "currencyAUD": "澳元$",
20
+ "currencyCAD": "加元$",
21
+ "currencyCNY": "人民幣¥",
22
+ "currencyEUR": "歐元€",
23
+ "currencyGBP": "英鎊£",
24
+ "currencyHKD": "港幣$",
25
+ "currencyJPY": "日元¥",
26
+ "currencyNZD": "紐幣$",
27
+ "currencySGD": "新幣$",
28
+ "currencyUSD": "美元$",
29
+ "data": "數據",
30
+ "dataComparison": "數據對比",
14
31
  "delete": "刪除",
15
32
  "deleteConfirm": "確定要永久刪除此{0}嗎?",
16
33
  "description": "描述",
@@ -77,6 +94,13 @@
77
94
  "statusInactivated": "已停用",
78
95
  "submit": "提交",
79
96
  "success": "成功",
97
+ "taxId": "稅號",
98
+ "taxIdHelp": "用於實名認證和開具發票",
99
+ "taxCABN": "營業編號(BN)",
100
+ "taxCNUSCC": "統一信用代碼",
101
+ "taxHKBRN": "商業登記號碼(BRN)",
102
+ "taxNZIRD": "IRD",
103
+ "taxUSEIN": "雇主識別號碼(EIN)",
80
104
  "timeDifferenceInvalid": "設備時間和服務器時間差為{0},超過{1}秒的限制,請調整設備時間,如果異常請告知管理員",
81
105
  "tokenExpiry": "您的會話即將過期。點擊 取消 按鈕繼續使用",
82
106
  "yes": "是",
@@ -97,6 +121,9 @@
97
121
  "unitGRAM": "克",
98
122
  "unitJIN": "斤",
99
123
  "unitKILOGRAM": "公斤",
124
+ "update": "更新",
125
+ "user": "用戶",
126
+ "view": "查看",
100
127
  "warning": "警告",
101
128
  "welcome": "{0}, 歡迎光臨!"
102
129
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/appscript",
3
- "version": "1.2.26",
3
+ "version": "1.2.30",
4
4
  "description": "Applications shared TypeScript framework",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/mjs/index.js",
@@ -54,24 +54,24 @@
54
54
  "dependencies": {
55
55
  "@etsoo/notificationbase": "^1.1.0",
56
56
  "@etsoo/restclient": "^1.0.64",
57
- "@etsoo/shared": "^1.1.5",
57
+ "@etsoo/shared": "^1.1.9",
58
58
  "@types/crypto-js": "^4.1.0",
59
59
  "crypto-js": "^4.1.1"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@babel/cli": "^7.16.8",
63
- "@babel/core": "^7.16.7",
64
- "@babel/plugin-transform-runtime": "^7.16.8",
65
- "@babel/preset-env": "^7.16.8",
63
+ "@babel/core": "^7.16.12",
64
+ "@babel/plugin-transform-runtime": "^7.16.10",
65
+ "@babel/preset-env": "^7.16.11",
66
66
  "@babel/runtime-corejs3": "^7.16.8",
67
67
  "@types/jest": "^27.4.0",
68
- "@typescript-eslint/eslint-plugin": "^5.10.0",
69
- "@typescript-eslint/parser": "^5.10.0",
70
- "eslint": "^8.7.0",
68
+ "@typescript-eslint/eslint-plugin": "^5.10.1",
69
+ "@typescript-eslint/parser": "^5.10.1",
70
+ "eslint": "^8.8.0",
71
71
  "eslint-config-airbnb-base": "^15.0.0",
72
72
  "eslint-plugin-import": "^2.25.4",
73
73
  "jest": "^27.4.7",
74
74
  "ts-jest": "^27.1.3",
75
- "typescript": "^4.5.4"
75
+ "typescript": "^4.5.5"
76
76
  }
77
77
  }
@@ -149,7 +149,7 @@ export class AddressRegion implements IAddressRegion {
149
149
  AddressContinent.NA,
150
150
  '011',
151
151
  '1',
152
- 'USD',
152
+ 'CAD',
153
153
  ['en-CA', 'fr-CA']
154
154
  );
155
155
 
@@ -209,7 +209,7 @@ export class AddressRegion implements IAddressRegion {
209
209
  AddressContinent.EU,
210
210
  '00',
211
211
  '353',
212
- 'IEP',
212
+ 'EUR',
213
213
  ['en-IE']
214
214
  );
215
215
 
@@ -10,25 +10,24 @@ import { ProductUnit } from './ProductUnit';
10
10
  */
11
11
  export namespace BusinessUtils {
12
12
  /**
13
- * Add blank item to id/label data array
14
- * @param input Input array
15
- * @param copy Copy or change the current inpu
16
- * @returns Items with blank item
13
+ * Get currency collection
14
+ * @param currencyNames Names like CNY, USD
15
+ * @param func Label delegate
16
+ * @returns Collection
17
17
  */
18
- export function addIdLabelBlankItem<T extends DataTypes.IdType = number>(
19
- input: IdLabelDto<T>[],
20
- copy: boolean = false
21
- ) {
22
- const blankItem: IdLabelDto<T> = { id: '' as any, label: '---' };
23
- if (copy) return [blankItem, ...input];
24
-
25
- input.unshift(blankItem);
26
- return input;
18
+ export function getCurrencies(
19
+ currencyNames: string[],
20
+ func: ICultureGet
21
+ ): IdLabelDto<string>[] {
22
+ return currencyNames.map((name) => ({
23
+ id: name,
24
+ label: func(`currency${name}`) ?? name
25
+ }));
27
26
  }
28
27
 
29
28
  /**
30
- * Get product unit's label
31
- * Please define the label in culture with key 'statusNormal' for Normal status
29
+ * Get entity status's label
30
+ * Please define the label with key 'statusNormal' for Normal status
32
31
  * @param unit Unit
33
32
  * @param func Label delegate
34
33
  * @returns Label
@@ -42,8 +41,7 @@ export namespace BusinessUtils {
42
41
  }
43
42
 
44
43
  /**
45
- * Get product unit's label
46
- * Please define the label in culture with key 'unitPC' for ProductUnit.PC like that
44
+ * Get entity status collection
47
45
  * @param unit Unit
48
46
  * @param func Label delegate
49
47
  * @returns Label
@@ -1,6 +1,11 @@
1
1
  {
2
+ "accountant": "Accountant",
2
3
  "actions": "Actions",
3
4
  "add": "Add",
5
+ "audits": "Audits",
6
+ "authorizer": "Authorizer",
7
+ "applicant": "Applicant",
8
+ "approve": "Approve it",
4
9
  "back": "Back",
5
10
  "cancel": "Cancel",
6
11
  "clear": "Clear",
@@ -11,6 +16,18 @@
11
16
  "copy": "Copy",
12
17
  "creation": "Creation",
13
18
  "currency": "Currency",
19
+ "currencyAUD": "Australia Dollar $",
20
+ "currencyCAD": "Canada Dollar $",
21
+ "currencyCNY": "Renminbi(RMB) ¥",
22
+ "currencyEUR": "Euro €",
23
+ "currencyGBP": "British Pound £",
24
+ "currencyHKD": "Hong Kong Dollar $",
25
+ "currencyJPY": "Japan Yen ¥",
26
+ "currencyNZD": "New Zealand Dollar $",
27
+ "currencySGD": "Singapore Dollar $",
28
+ "currencyUSD": "U.S. Dollar $",
29
+ "data": "Data",
30
+ "dataComparison": "Data comparison",
14
31
  "delete": "Delete",
15
32
  "deleteConfirm": "Are you sure you want to permanently delete this {0}?",
16
33
  "description": "Description",
@@ -77,6 +94,13 @@
77
94
  "statusInactivated": "Inactivated",
78
95
  "submit": "Submit",
79
96
  "success": "Success",
97
+ "taxId": "Tax ID number",
98
+ "taxIdHelp": "Used for real-name authentication and invoicing",
99
+ "taxCABN": "Business number",
100
+ "taxCNUSCC": "Unified social credit code",
101
+ "taxHKBRN": "Business registration number",
102
+ "taxNZIRD": "IRD",
103
+ "taxUSEIN": "Employer identification number",
80
104
  "timeDifferenceInvalid": "The time difference between the device and the server is {0}, which exceeds the limit of {1} seconds. Please adjust the device time. If it is abnormal, please inform the administrator",
81
105
  "tokenExpiry": "Your session is about to expire. Click the Cancel button to continue",
82
106
  "yes": "Yes",
@@ -97,6 +121,9 @@
97
121
  "unitGRAM": "g",
98
122
  "unitJIN": "½Kg",
99
123
  "unitKILOGRAM": "Kg",
124
+ "update": "Update",
125
+ "user": "User",
126
+ "view": "View",
100
127
  "warning": "Warning",
101
128
  "welcome": "{0}, welcome!"
102
129
  }
@@ -1,6 +1,11 @@
1
1
  {
2
+ "accountant": "会计",
2
3
  "actions": "操作",
3
4
  "add": "添加",
5
+ "audits": "稽核历史",
6
+ "authorizer": "授权人",
7
+ "applicant": "申请人",
8
+ "approve": "批准",
4
9
  "back": "后退",
5
10
  "cancel": "取消",
6
11
  "clear": "清除",
@@ -11,6 +16,18 @@
11
16
  "copy": "复制",
12
17
  "creation": "登记时间",
13
18
  "currency": "币种",
19
+ "currencyAUD": "澳元$",
20
+ "currencyCAD": "加元$",
21
+ "currencyCNY": "人民币¥",
22
+ "currencyEUR": "欧元€",
23
+ "currencyGBP": "英镑£",
24
+ "currencyHKD": "港币$",
25
+ "currencyJPY": "日元¥",
26
+ "currencyNZD": "纽币$",
27
+ "currencySGD": "新币$",
28
+ "currencyUSD": "美元$",
29
+ "data": "数据",
30
+ "dataComparison": "数据对比",
14
31
  "delete": "删除",
15
32
  "deleteConfirm": "确定要永久删除此{0}吗?",
16
33
  "description": "描述",
@@ -77,6 +94,13 @@
77
94
  "statusInactivated": "已停用",
78
95
  "submit": "提交",
79
96
  "success": "成功",
97
+ "taxId": "税号",
98
+ "taxIdHelp": "用于实名认证和开具发票",
99
+ "taxCABN": "营业编号(BN)",
100
+ "taxCNUSCC": "统一信用代码",
101
+ "taxHKBRN": "商业登记号码(BRN)",
102
+ "taxNZIRD": "IRD",
103
+ "taxUSEIN": "雇主识别号码(EIN)",
80
104
  "timeDifferenceInvalid": "设备时间和服务器时间差为{0},超过{1}秒的限制,请调整设备时间,如果异常请告知管理员",
81
105
  "tokenExpiry": "您的会话即将过期。点击 取消 按钮继续使用",
82
106
  "yes": "是",
@@ -98,6 +122,9 @@
98
122
  "unitJIN": "斤",
99
123
  "unitKILOGRAM": "公斤",
100
124
  "unitTON": "吨",
125
+ "update": "更新",
126
+ "user": "用户",
127
+ "view": "查看",
101
128
  "warning": "警告",
102
129
  "welcome": "{0}, 欢迎光临!"
103
130
  }
@@ -1,6 +1,11 @@
1
1
  {
2
+ "accountant": "會計",
2
3
  "actions": "操作",
3
4
  "add": "添加",
5
+ "audits": "稽核歷史",
6
+ "authorizer": "授權人",
7
+ "applicant": "申請人",
8
+ "approve": "批准",
4
9
  "back": "後退",
5
10
  "cancel": "取消",
6
11
  "clear": "清除",
@@ -11,6 +16,18 @@
11
16
  "copy": "複製",
12
17
  "creation": "登記時間",
13
18
  "currency": "幣種",
19
+ "currencyAUD": "澳元$",
20
+ "currencyCAD": "加元$",
21
+ "currencyCNY": "人民幣¥",
22
+ "currencyEUR": "歐元€",
23
+ "currencyGBP": "英鎊£",
24
+ "currencyHKD": "港幣$",
25
+ "currencyJPY": "日元¥",
26
+ "currencyNZD": "紐幣$",
27
+ "currencySGD": "新幣$",
28
+ "currencyUSD": "美元$",
29
+ "data": "數據",
30
+ "dataComparison": "數據對比",
14
31
  "delete": "刪除",
15
32
  "deleteConfirm": "確定要永久刪除此{0}嗎?",
16
33
  "description": "描述",
@@ -77,6 +94,13 @@
77
94
  "statusInactivated": "已停用",
78
95
  "submit": "提交",
79
96
  "success": "成功",
97
+ "taxId": "稅號",
98
+ "taxIdHelp": "用於實名認證和開具發票",
99
+ "taxCABN": "營業編號(BN)",
100
+ "taxCNUSCC": "統一信用代碼",
101
+ "taxHKBRN": "商業登記號碼(BRN)",
102
+ "taxNZIRD": "IRD",
103
+ "taxUSEIN": "雇主識別號碼(EIN)",
80
104
  "timeDifferenceInvalid": "設備時間和服務器時間差為{0},超過{1}秒的限制,請調整設備時間,如果異常請告知管理員",
81
105
  "tokenExpiry": "您的會話即將過期。點擊 取消 按鈕繼續使用",
82
106
  "yes": "是",
@@ -97,6 +121,9 @@
97
121
  "unitGRAM": "克",
98
122
  "unitJIN": "斤",
99
123
  "unitKILOGRAM": "公斤",
124
+ "update": "更新",
125
+ "user": "用戶",
126
+ "view": "查看",
100
127
  "warning": "警告",
101
128
  "welcome": "{0}, 歡迎光臨!"
102
129
  }