robbyson-frontend-library 1.0.51 → 1.0.52
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.
|
@@ -17,7 +17,7 @@ import { BaseRepositoryModel } from "../base.repository.model";
|
|
|
17
17
|
function registerHierarchy(hierarchies) {
|
|
18
18
|
return hierarchies === null || hierarchies === void 0 ? void 0 : hierarchies.map(function (hierarchy) {
|
|
19
19
|
var _a, _b, _c;
|
|
20
|
-
|
|
20
|
+
var obj_return = {
|
|
21
21
|
i: hierarchy.i,
|
|
22
22
|
d: hierarchy.d,
|
|
23
23
|
g: hierarchy.g,
|
|
@@ -33,13 +33,16 @@ function registerHierarchy(hierarchies) {
|
|
|
33
33
|
coinsGestor: (_c = hierarchy === null || hierarchy === void 0 ? void 0 : hierarchy.m) === null || _c === void 0 ? void 0 : _c.coinsGestor,
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
+
if (hierarchy.cd !== undefined)
|
|
37
|
+
obj_return['cd'] = hierarchy.cd;
|
|
38
|
+
return obj_return;
|
|
36
39
|
});
|
|
37
40
|
}
|
|
38
41
|
var TreeModel = /** @class */ (function (_super) {
|
|
39
42
|
__extends(TreeModel, _super);
|
|
40
43
|
function TreeModel(props) {
|
|
41
44
|
var _this = this;
|
|
42
|
-
var _a, _b, _c;
|
|
45
|
+
var _a, _b, _c, _d;
|
|
43
46
|
_this = _super.call(this) || this;
|
|
44
47
|
_this._id = props === null || props === void 0 ? void 0 : props._id;
|
|
45
48
|
_this.data = (props === null || props === void 0 ? void 0 : props.data) != null ? {
|
|
@@ -47,6 +50,7 @@ var TreeModel = /** @class */ (function (_super) {
|
|
|
47
50
|
d: props === null || props === void 0 ? void 0 : props.data.d,
|
|
48
51
|
g: props === null || props === void 0 ? void 0 : props.data.g,
|
|
49
52
|
c: props === null || props === void 0 ? void 0 : props.data.c,
|
|
53
|
+
cd: props === null || props === void 0 ? void 0 : props.data.cd,
|
|
50
54
|
f: registerHierarchy(props === null || props === void 0 ? void 0 : props.data.f),
|
|
51
55
|
cpf: props === null || props === void 0 ? void 0 : props.data.cpf,
|
|
52
56
|
resultRegister: props === null || props === void 0 ? void 0 : props.data.resultadoCadastrado,
|
|
@@ -56,8 +60,10 @@ var TreeModel = /** @class */ (function (_super) {
|
|
|
56
60
|
maxCoins: (_a = props === null || props === void 0 ? void 0 : props.data.m) === null || _a === void 0 ? void 0 : _a.maxCoins,
|
|
57
61
|
qtdEarning: (_b = props === null || props === void 0 ? void 0 : props.data.m) === null || _b === void 0 ? void 0 : _b.qtdGanho,
|
|
58
62
|
coinsGestor: (_c = props === null || props === void 0 ? void 0 : props.data.m) === null || _c === void 0 ? void 0 : _c.coinsGestor
|
|
59
|
-
}
|
|
63
|
+
},
|
|
60
64
|
} : {};
|
|
65
|
+
if (((_d = props === null || props === void 0 ? void 0 : props.data) === null || _d === void 0 ? void 0 : _d.cd) !== undefined)
|
|
66
|
+
props.data['cd'] = props.data.cd;
|
|
61
67
|
_this.colors = props === null || props === void 0 ? void 0 : props.colors;
|
|
62
68
|
_this.highlightColors = props === null || props === void 0 ? void 0 : props.highlightColors;
|
|
63
69
|
_this.faixas = props === null || props === void 0 ? void 0 : props.faixas;
|
package/package.json
CHANGED
|
@@ -18,6 +18,7 @@ interface IDataTreeOldModel {
|
|
|
18
18
|
d?: string;
|
|
19
19
|
g?: string;
|
|
20
20
|
c?: number;
|
|
21
|
+
cd?: number | null;
|
|
21
22
|
f?: IDataTree[];
|
|
22
23
|
cpf?: string,
|
|
23
24
|
resultadoCadastrado?: number;
|
|
@@ -31,7 +32,7 @@ interface IDataTreeOldModel {
|
|
|
31
32
|
}
|
|
32
33
|
export interface IArrayLeaft {
|
|
33
34
|
c: number;
|
|
34
|
-
cd
|
|
35
|
+
cd?: number;
|
|
35
36
|
i: string;
|
|
36
37
|
}
|
|
37
38
|
export interface IDataTree {
|
|
@@ -39,7 +40,7 @@ export interface IDataTree {
|
|
|
39
40
|
d?: string;
|
|
40
41
|
g?: string;
|
|
41
42
|
c?: number;
|
|
42
|
-
cd?: number;
|
|
43
|
+
cd?: number | null;
|
|
43
44
|
f?: IDataTree[];
|
|
44
45
|
cpf?: string,
|
|
45
46
|
resultRegister?: number;
|
|
@@ -53,22 +54,26 @@ export interface IDataTree {
|
|
|
53
54
|
}
|
|
54
55
|
function registerHierarchy(hierarchies: IDataTreeOldModel[] | undefined | []) : IDataTree[] | [] | undefined{
|
|
55
56
|
return hierarchies?.map((hierarchy) => {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
57
|
+
const obj_return:IDataTree = {
|
|
58
|
+
i : hierarchy.i,
|
|
59
|
+
d : hierarchy.d,
|
|
60
|
+
g : hierarchy.g,
|
|
61
|
+
c : hierarchy.c,
|
|
62
|
+
f : registerHierarchy(hierarchy.f),
|
|
63
|
+
cpf : hierarchy.cpf,
|
|
64
|
+
resultRegister : hierarchy.resultadoCadastrado,
|
|
65
|
+
goalRegister : hierarchy.metaCadastrada,
|
|
66
|
+
fator : hierarchy.fator,
|
|
67
|
+
m: {
|
|
68
|
+
maxCoins : hierarchy?.m?.maxCoins,
|
|
69
|
+
qtdEarning : hierarchy?.m?.qtdGanho,
|
|
70
|
+
coinsGestor : hierarchy?.m?.coinsGestor,
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if(hierarchy.cd !== undefined)
|
|
75
|
+
obj_return['cd'] = hierarchy.cd
|
|
76
|
+
return obj_return
|
|
72
77
|
})
|
|
73
78
|
}
|
|
74
79
|
export class TreeModel extends BaseRepositoryModel {
|
|
@@ -86,6 +91,7 @@ export class TreeModel extends BaseRepositoryModel {
|
|
|
86
91
|
d : props?.data.d,
|
|
87
92
|
g : props?.data.g,
|
|
88
93
|
c : props?.data.c,
|
|
94
|
+
cd : props?.data.cd,
|
|
89
95
|
f : registerHierarchy(props?.data.f),
|
|
90
96
|
cpf : props?.data.cpf,
|
|
91
97
|
resultRegister : props?.data.resultadoCadastrado,
|
|
@@ -95,12 +101,13 @@ export class TreeModel extends BaseRepositoryModel {
|
|
|
95
101
|
maxCoins : props?.data.m?.maxCoins,
|
|
96
102
|
qtdEarning : props?.data.m?.qtdGanho,
|
|
97
103
|
coinsGestor : props?.data.m?.coinsGestor
|
|
98
|
-
}
|
|
104
|
+
},
|
|
99
105
|
} : {}
|
|
106
|
+
if(props?.data?.cd !== undefined)
|
|
107
|
+
props.data['cd'] = props.data.cd;
|
|
100
108
|
this.colors = props?.colors;
|
|
101
109
|
this.highlightColors = props?.highlightColors;
|
|
102
110
|
this.faixas = props?.faixas;
|
|
103
111
|
this.minLevel = props?.minLevel;
|
|
104
|
-
|
|
105
112
|
}
|
|
106
113
|
}
|