@etsoo/appscript 1.3.22 → 1.3.24
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/lib/cjs/erp/BaseApi.d.ts +4 -0
- package/lib/cjs/erp/BaseApi.js +6 -0
- package/lib/cjs/erp/PublicApi.d.ts +1 -1
- package/lib/mjs/erp/BaseApi.d.ts +4 -0
- package/lib/mjs/erp/BaseApi.js +6 -0
- package/lib/mjs/erp/PublicApi.d.ts +1 -1
- package/package.json +2 -2
- package/src/erp/BaseApi.ts +7 -0
- package/src/erp/PublicApi.ts +1 -1
package/lib/cjs/erp/BaseApi.d.ts
CHANGED
|
@@ -5,6 +5,10 @@ import { IApp } from '../app/IApp';
|
|
|
5
5
|
export declare class BaseApi<T extends IApp = IApp> {
|
|
6
6
|
protected app: T;
|
|
7
7
|
protected api: import("@etsoo/restclient").IApi<any>;
|
|
8
|
+
/**
|
|
9
|
+
* API Last error
|
|
10
|
+
*/
|
|
11
|
+
get lastError(): import("@etsoo/restclient").ApiDataError<any> | undefined;
|
|
8
12
|
/**
|
|
9
13
|
* Constructor
|
|
10
14
|
* @param app Application
|
package/lib/cjs/erp/BaseApi.js
CHANGED
|
@@ -40,7 +40,7 @@ export declare class PublicApi extends BaseApi {
|
|
|
40
40
|
* @param isJoined Add the join label like 'per Kg' for Kg
|
|
41
41
|
* @returns Label
|
|
42
42
|
*/
|
|
43
|
-
getUnitLabel(unit: ProductUnit, isJoined?: boolean | string): string;
|
|
43
|
+
getUnitLabel(unit: ProductUnit | number, isJoined?: boolean | string): string;
|
|
44
44
|
private getUnitJoin;
|
|
45
45
|
/**
|
|
46
46
|
* Get mobile base64 QRCode
|
package/lib/mjs/erp/BaseApi.d.ts
CHANGED
|
@@ -5,6 +5,10 @@ import { IApp } from '../app/IApp';
|
|
|
5
5
|
export declare class BaseApi<T extends IApp = IApp> {
|
|
6
6
|
protected app: T;
|
|
7
7
|
protected api: import("@etsoo/restclient").IApi<any>;
|
|
8
|
+
/**
|
|
9
|
+
* API Last error
|
|
10
|
+
*/
|
|
11
|
+
get lastError(): import("@etsoo/restclient").ApiDataError<any> | undefined;
|
|
8
12
|
/**
|
|
9
13
|
* Constructor
|
|
10
14
|
* @param app Application
|
package/lib/mjs/erp/BaseApi.js
CHANGED
|
@@ -40,7 +40,7 @@ export declare class PublicApi extends BaseApi {
|
|
|
40
40
|
* @param isJoined Add the join label like 'per Kg' for Kg
|
|
41
41
|
* @returns Label
|
|
42
42
|
*/
|
|
43
|
-
getUnitLabel(unit: ProductUnit, isJoined?: boolean | string): string;
|
|
43
|
+
getUnitLabel(unit: ProductUnit | number, isJoined?: boolean | string): string;
|
|
44
44
|
private getUnitJoin;
|
|
45
45
|
/**
|
|
46
46
|
* Get mobile base64 QRCode
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/appscript",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.24",
|
|
4
4
|
"description": "Applications shared TypeScript framework",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@etsoo/notificationbase": "^1.1.13",
|
|
56
56
|
"@etsoo/restclient": "^1.0.75",
|
|
57
|
-
"@etsoo/shared": "^1.1.
|
|
57
|
+
"@etsoo/shared": "^1.1.67",
|
|
58
58
|
"@types/crypto-js": "^4.1.1",
|
|
59
59
|
"crypto-js": "^4.1.1"
|
|
60
60
|
},
|
package/src/erp/BaseApi.ts
CHANGED
package/src/erp/PublicApi.ts
CHANGED
|
@@ -85,7 +85,7 @@ export class PublicApi extends BaseApi {
|
|
|
85
85
|
* @param isJoined Add the join label like 'per Kg' for Kg
|
|
86
86
|
* @returns Label
|
|
87
87
|
*/
|
|
88
|
-
getUnitLabel(unit: ProductUnit, isJoined?: boolean | string) {
|
|
88
|
+
getUnitLabel(unit: ProductUnit | number, isJoined?: boolean | string) {
|
|
89
89
|
const key = ProductUnit[unit];
|
|
90
90
|
const label = this.app.get('unit' + key) ?? key;
|
|
91
91
|
const join = this.getUnitJoin(isJoined);
|