@win2win/shared 1.0.9 → 1.0.11
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/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/index.js +1 -0
- package/dist/interfaces/liquidaciones/index.d.ts +2 -1
- package/dist/interfaces/liquidaciones/index.js +2 -1
- package/dist/interfaces/liquidaciones/item-liquidable.d.ts +63 -0
- package/dist/interfaces/liquidaciones/item-liquidable.js +2 -0
- package/dist/interfaces/liquidaciones/regla.d.ts +28 -0
- package/dist/interfaces/liquidaciones/regla.js +24 -0
- package/dist/interfaces/shared/id.d.ts +1 -0
- package/dist/interfaces/shared/id.js +2 -0
- package/dist/interfaces/shared/index.d.ts +1 -0
- package/dist/interfaces/shared/index.js +17 -0
- package/package.json +1 -1
package/dist/interfaces/index.js
CHANGED
|
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./comision"), exports);
|
|
18
|
-
__exportStar(require("./
|
|
18
|
+
__exportStar(require("./item-liquidable"), exports);
|
|
19
|
+
__exportStar(require("./regla"), exports);
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Id } from "../shared";
|
|
2
|
+
import { TipoComision } from "./comision";
|
|
3
|
+
export interface ItemLiquidable {
|
|
4
|
+
ID_CAPTACION: Id;
|
|
5
|
+
TIPO: string;
|
|
6
|
+
ESTADO: string;
|
|
7
|
+
pedido: Pedido;
|
|
8
|
+
gerente: UsuarioLite;
|
|
9
|
+
jefe_delefacion: UsuarioLite;
|
|
10
|
+
situacion: {
|
|
11
|
+
ID_SITUACION: number;
|
|
12
|
+
NOMBRE: string;
|
|
13
|
+
};
|
|
14
|
+
captador: UsuarioLite;
|
|
15
|
+
delegacion: {
|
|
16
|
+
ID_DELEGACION: Id;
|
|
17
|
+
COD_DEL_MVX: string;
|
|
18
|
+
NOMBRE: string;
|
|
19
|
+
};
|
|
20
|
+
gerencia: {
|
|
21
|
+
ID_GERENCIA: Id;
|
|
22
|
+
NOMBRE: string;
|
|
23
|
+
};
|
|
24
|
+
comision: Comision;
|
|
25
|
+
comision_calculada: ComisionCalculada;
|
|
26
|
+
}
|
|
27
|
+
interface UsuarioLite {
|
|
28
|
+
ID_USUARIO: Id;
|
|
29
|
+
CONTACTO: {
|
|
30
|
+
NOMBRE: string;
|
|
31
|
+
APELLIDO: null;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
interface Comision {
|
|
35
|
+
ID_COMISION_DET: Id;
|
|
36
|
+
TIPO: TipoComision;
|
|
37
|
+
ORGANIZADOR: number;
|
|
38
|
+
GERENTE: number;
|
|
39
|
+
SUPERVISOR: number;
|
|
40
|
+
PROMOTOR: number;
|
|
41
|
+
OVER1: number;
|
|
42
|
+
OVER2: number;
|
|
43
|
+
OVER3: number;
|
|
44
|
+
OVER4: number;
|
|
45
|
+
OVER5: number;
|
|
46
|
+
BOLSA: number;
|
|
47
|
+
}
|
|
48
|
+
type ComisionCalculada = Omit<Comision, 'ID_COMISION_DET' | 'TIPO' | 'BOLSA'>;
|
|
49
|
+
export interface Pedido {
|
|
50
|
+
ID_PEDIDO: Id;
|
|
51
|
+
IMP_TOTAL_PED: number;
|
|
52
|
+
IMP_NETO_PED: number;
|
|
53
|
+
FECHA_CREADO: Date;
|
|
54
|
+
R_PRODUCTOS_PEDIDO: {
|
|
55
|
+
ID_PRODUCTO_PEDIDO: number;
|
|
56
|
+
CODIGO_PIPE: string;
|
|
57
|
+
R_PRODUCTO: {
|
|
58
|
+
ID_PRODUCTO: number;
|
|
59
|
+
NOMBRE: string;
|
|
60
|
+
};
|
|
61
|
+
}[];
|
|
62
|
+
}
|
|
63
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export declare const RULE_OPERATORS: readonly ["==", "!=", "<", ">", "IN"];
|
|
2
|
+
export declare const LOGIC_OPERATORS: readonly ["AND", "OR"];
|
|
3
|
+
export type RuleOperator = typeof RULE_OPERATORS[number];
|
|
4
|
+
export type LogicOperator = typeof LOGIC_OPERATORS[number];
|
|
5
|
+
export declare const SOURCES: readonly ["IMPORTACION", "TABLA", "CONTENEDOR"];
|
|
6
|
+
export type LiquidacionRuleSourceType = typeof SOURCES[number];
|
|
7
|
+
export interface LiquidacionRule {
|
|
8
|
+
id: string;
|
|
9
|
+
sourceType: LiquidacionRuleSourceType;
|
|
10
|
+
sourceCode: LiquidacionRuleTable | IdImportacion;
|
|
11
|
+
field: string;
|
|
12
|
+
operator: RuleOperator | LogicOperator;
|
|
13
|
+
value: any;
|
|
14
|
+
parentId?: string | null;
|
|
15
|
+
}
|
|
16
|
+
export declare const TABLES_FIELDS: {
|
|
17
|
+
readonly PRODUCTOS: readonly ["TIPO", "NOMBRE", "DESCRIPCION", "ID_GAMA", "ESTADO", "TAGS", "ID_PRODUCTO", "PROPS", "COD_ART_MVX"];
|
|
18
|
+
readonly CAPTACION: readonly ["ESTADO", "TIPO", "CAPTADO", "ID_CAPTACION", "FECHA_CAPTADO"];
|
|
19
|
+
};
|
|
20
|
+
export declare const TABLES: readonly [{
|
|
21
|
+
readonly label: "PRODUCTOS";
|
|
22
|
+
readonly value: "PRODUCTOS";
|
|
23
|
+
}, {
|
|
24
|
+
readonly label: "CAPTACIONES";
|
|
25
|
+
readonly value: "CAPTACION";
|
|
26
|
+
}];
|
|
27
|
+
export type LiquidacionRuleTable = typeof TABLES[number]['value'];
|
|
28
|
+
export type IdImportacion = number;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TABLES = exports.TABLES_FIELDS = exports.SOURCES = exports.LOGIC_OPERATORS = exports.RULE_OPERATORS = void 0;
|
|
4
|
+
exports.RULE_OPERATORS = ['==', '!=', '<', '>', 'IN'];
|
|
5
|
+
exports.LOGIC_OPERATORS = ['AND', 'OR'];
|
|
6
|
+
exports.SOURCES = [
|
|
7
|
+
'IMPORTACION',
|
|
8
|
+
'TABLA',
|
|
9
|
+
'CONTENEDOR'
|
|
10
|
+
];
|
|
11
|
+
exports.TABLES_FIELDS = {
|
|
12
|
+
'PRODUCTOS': ['TIPO', 'NOMBRE', 'DESCRIPCION', 'ID_GAMA', 'ESTADO', 'TAGS', 'ID_PRODUCTO', 'PROPS', 'COD_ART_MVX'],
|
|
13
|
+
'CAPTACION': ['ESTADO', 'TIPO', 'CAPTADO', 'ID_CAPTACION', 'FECHA_CAPTADO']
|
|
14
|
+
};
|
|
15
|
+
exports.TABLES = [
|
|
16
|
+
{
|
|
17
|
+
label: 'PRODUCTOS',
|
|
18
|
+
value: 'PRODUCTOS'
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
label: 'CAPTACIONES',
|
|
22
|
+
value: 'CAPTACION'
|
|
23
|
+
}
|
|
24
|
+
];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type Id = number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './id';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./id"), exports);
|