@arquimedes.co/eureka-forms 1.5.8-test → 1.5.9-test
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/FormComponents/Step/@Construction/CBRLocativasStep/CBRLocativasStep.js +29 -28
- package/dist/FormComponents/Step/CBRStepMapper.js +76 -57
- package/dist/FormComponents/Step/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js +1 -1
- package/package.json +1 -1
- package/dist/FormComponents/Step/CBRStepValuesTemp/CBR_INMUEBLE.json +0 -13151
- package/dist/FormComponents/Step/CBRStepValuesTemp/CBR_LOCATIVAS.json +0 -71
- package/dist/FormComponents/Step/CBRStepValuesTemp/CBR_PROYECTO.json +0 -74
- package/dist/FormComponents/Step/CBRStepValuesTemp/CBR_TIPO_DOC.json +0 -50
- package/dist/FormComponents/Step/CBRStepValuesTemp/CBR_TIPO_ESPACIO.json +0 -320
- package/dist/FormComponents/Step/CBRStepValuesTemp/CBR_TIPO_SOLICITANTE.json +0 -42
|
@@ -47,8 +47,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
47
47
|
};
|
|
48
48
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
49
49
|
import SmartSelectStep from '../../SmartSelectStep/SmartSelectStep';
|
|
50
|
-
import LocativasData from '../../CBRStepValuesTemp/CBR_LOCATIVAS.json';
|
|
51
50
|
import CBRFormStepTypes from '../../../../constants/CBRFormStepTypes';
|
|
51
|
+
import axios from 'axios';
|
|
52
52
|
function CBRLocativasStep(props) {
|
|
53
53
|
return (_jsx(SmartSelectStep, __assign({}, props, { step: props.step, icon: _jsx(Leak, { fill: "#757575", style: {
|
|
54
54
|
display: 'flex',
|
|
@@ -98,36 +98,37 @@ var getLocativasOptions = function (step, dependencyStore) { return __awaiter(vo
|
|
|
98
98
|
var idProyecto, response, father_1, locativasList;
|
|
99
99
|
var _a;
|
|
100
100
|
return __generator(this, function (_b) {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
father_1 = dependencyStore[step.dependencies[1]];
|
|
108
|
-
if (father_1 !== undefined && father_1.id === undefined) {
|
|
109
|
-
return [2 /*return*/, null];
|
|
110
|
-
}
|
|
111
|
-
locativasList = response.lstLocativas.TipoLocativas.filter(function (locativa) {
|
|
112
|
-
if (father_1 === null || father_1 === void 0 ? void 0 : father_1.id) {
|
|
113
|
-
return (locativa.Id.startsWith(father_1.id) &&
|
|
114
|
-
locativa.Id !== father_1.id);
|
|
101
|
+
switch (_b.label) {
|
|
102
|
+
case 0:
|
|
103
|
+
if (!step.dependencies) return [3 /*break*/, 2];
|
|
104
|
+
idProyecto = (_a = dependencyStore[step.dependencies[0]]) === null || _a === void 0 ? void 0 : _a.id;
|
|
105
|
+
if (!idProyecto) {
|
|
106
|
+
return [2 /*return*/, null]; //null para indicar que falta la depedency
|
|
115
107
|
}
|
|
116
|
-
|
|
117
|
-
|
|
108
|
+
return [4 /*yield*/, axios.get('https://integrations.eureka-test.click/sinco/cbr/ConsultaLocativas?idOrganization=arquimedes')];
|
|
109
|
+
case 1:
|
|
110
|
+
response = (_b.sent()).data;
|
|
111
|
+
father_1 = dependencyStore[step.dependencies[1]];
|
|
112
|
+
if (father_1 !== undefined && father_1.id === undefined) {
|
|
113
|
+
return [2 /*return*/, null];
|
|
118
114
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
115
|
+
locativasList = response.lstLocativas.TipoLocativas.filter(function (locativa) {
|
|
116
|
+
if (father_1 === null || father_1 === void 0 ? void 0 : father_1.id) {
|
|
117
|
+
return (locativa.Id.startsWith(father_1.id) &&
|
|
118
|
+
locativa.Id !== father_1.id);
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
return locativa.Id.length === 2;
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
return [2 /*return*/, locativasList.map(function (option) {
|
|
125
|
+
return {
|
|
126
|
+
label: option.Descripcion,
|
|
127
|
+
id: option.Id,
|
|
128
|
+
};
|
|
129
|
+
})];
|
|
130
|
+
case 2: return [2 /*return*/, null];
|
|
129
131
|
}
|
|
130
|
-
return [2 /*return*/];
|
|
131
132
|
});
|
|
132
133
|
}); };
|
|
133
134
|
var calcInvaidDependencies = function (step, dependencyStore) {
|
|
@@ -52,93 +52,112 @@ import TextInputStep from './TextInputStep/TextInputStep';
|
|
|
52
52
|
import SmartSelectStep from './SmartSelectStep/SmartSelectStep';
|
|
53
53
|
import TextAreaStep from './TextAreaStep/TextAreaStep';
|
|
54
54
|
import CBRIncidentsStep from './@Construction/CBRIncidentsStep/CBRIncidentsStep';
|
|
55
|
-
import TipoDocData from './CBRStepValuesTemp/CBR_TIPO_DOC.json';
|
|
56
|
-
import ProyectoData from './CBRStepValuesTemp/CBR_PROYECTO.json';
|
|
57
|
-
import TipoSolicitanteData from './CBRStepValuesTemp/CBR_TIPO_SOLICITANTE.json';
|
|
58
|
-
import TipoEspacioData from './CBRStepValuesTemp/CBR_TIPO_ESPACIO.json';
|
|
59
|
-
import InmuebleData from './CBRStepValuesTemp/CBR_INMUEBLE.json';
|
|
60
55
|
import CBRLocativasStep from './@Construction/CBRLocativasStep/CBRLocativasStep';
|
|
56
|
+
import axios from 'axios';
|
|
57
|
+
var baseUrl = 'https://integrations.eureka-test.click/sinco/cbr/';
|
|
61
58
|
function CBRStepMapper(props) {
|
|
62
59
|
var _this = this;
|
|
63
60
|
var getTipoDocOptions = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
64
61
|
var response;
|
|
65
62
|
return __generator(this, function (_a) {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
63
|
+
switch (_a.label) {
|
|
64
|
+
case 0: return [4 /*yield*/, axios.get(baseUrl + 'ConsultaTiposDoc?idOrganization=arquimedes')];
|
|
65
|
+
case 1:
|
|
66
|
+
response = (_a.sent()).data;
|
|
67
|
+
return [2 /*return*/, response.map(function (option) {
|
|
68
|
+
return { label: option.Descripcion, id: option.Id };
|
|
69
|
+
})];
|
|
70
|
+
}
|
|
70
71
|
});
|
|
71
72
|
}); };
|
|
72
73
|
var getProyectoOptions = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
73
74
|
var response;
|
|
74
75
|
return __generator(this, function (_a) {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
76
|
+
switch (_a.label) {
|
|
77
|
+
case 0: return [4 /*yield*/, axios.get(baseUrl + 'Consultaproyectos?idOrganization=arquimedes')];
|
|
78
|
+
case 1:
|
|
79
|
+
response = (_a.sent()).data;
|
|
80
|
+
return [2 /*return*/, response.map(function (option) {
|
|
81
|
+
return {
|
|
82
|
+
label: option.NombreProyecto,
|
|
83
|
+
id: option.IdProyecto,
|
|
84
|
+
idMacroProyecto: option.IdMacroproyecto,
|
|
85
|
+
};
|
|
86
|
+
})];
|
|
87
|
+
}
|
|
83
88
|
});
|
|
84
89
|
}); };
|
|
85
90
|
var getTipoSolicitanteOptions = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
86
91
|
var response;
|
|
87
92
|
return __generator(this, function (_a) {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
switch (_a.label) {
|
|
94
|
+
case 0: return [4 /*yield*/, axios.get(baseUrl + 'ConsultaTipoSolicitante?idOrganization=arquimedes')];
|
|
95
|
+
case 1:
|
|
96
|
+
response = (_a.sent()).data;
|
|
97
|
+
return [2 /*return*/, response.map(function (option) {
|
|
98
|
+
return {
|
|
99
|
+
label: option.Descripcion,
|
|
100
|
+
id: option.Id,
|
|
101
|
+
};
|
|
102
|
+
})];
|
|
103
|
+
}
|
|
95
104
|
});
|
|
96
105
|
}); };
|
|
97
106
|
var getTipoEspaciosOptions = function (step, dependencyStore) { return __awaiter(_this, void 0, void 0, function () {
|
|
98
107
|
var idProyecto, response;
|
|
99
108
|
var _a;
|
|
100
109
|
return __generator(this, function (_b) {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
110
|
+
switch (_b.label) {
|
|
111
|
+
case 0:
|
|
112
|
+
if (!step.dependencies) return [3 /*break*/, 2];
|
|
113
|
+
idProyecto = (_a = dependencyStore[step.dependencies[0]]) === null || _a === void 0 ? void 0 : _a.id;
|
|
114
|
+
if (!idProyecto) {
|
|
115
|
+
return [2 /*return*/, null]; //null para indicar que falta la depedency
|
|
116
|
+
}
|
|
117
|
+
return [4 /*yield*/, axios.get(baseUrl +
|
|
118
|
+
'ConsultaTipoEspacios?idProyecto=' +
|
|
119
|
+
idProyecto +
|
|
120
|
+
'&idOrganization=arquimedes')];
|
|
121
|
+
case 1:
|
|
122
|
+
response = (_b.sent()).data;
|
|
123
|
+
return [2 /*return*/, response.map(function (option) {
|
|
124
|
+
return {
|
|
125
|
+
label: option.Descripcion,
|
|
126
|
+
id: option.Id,
|
|
127
|
+
};
|
|
128
|
+
})];
|
|
129
|
+
case 2: return [2 /*return*/, null];
|
|
116
130
|
}
|
|
117
|
-
return [2 /*return*/];
|
|
118
131
|
});
|
|
119
132
|
}); };
|
|
120
133
|
var getInmueblesOptions = function (step, dependencyStore) { return __awaiter(_this, void 0, void 0, function () {
|
|
121
134
|
var idProyecto, idMacroProyecto, response;
|
|
122
135
|
var _a, _b;
|
|
123
136
|
return __generator(this, function (_c) {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
switch (_c.label) {
|
|
138
|
+
case 0:
|
|
139
|
+
if (!step.dependencies) return [3 /*break*/, 2];
|
|
140
|
+
idProyecto = (_a = dependencyStore[step.dependencies[0]]) === null || _a === void 0 ? void 0 : _a.id;
|
|
141
|
+
idMacroProyecto = (_b = dependencyStore[step.dependencies[0]]) === null || _b === void 0 ? void 0 : _b.idMacroProyecto;
|
|
142
|
+
if (!idProyecto) {
|
|
143
|
+
return [2 /*return*/, null]; //null para indicar que falta la depedency
|
|
144
|
+
}
|
|
145
|
+
return [4 /*yield*/, axios.get(baseUrl +
|
|
146
|
+
'ConsultaInmuebles?idMacro=' +
|
|
147
|
+
idMacroProyecto +
|
|
148
|
+
'&idProyecto=' +
|
|
149
|
+
idProyecto +
|
|
150
|
+
'&idOrganization=arquimedes')];
|
|
151
|
+
case 1:
|
|
152
|
+
response = (_c.sent()).data;
|
|
153
|
+
return [2 /*return*/, response.map(function (option) {
|
|
154
|
+
return {
|
|
155
|
+
label: option.Descripcion,
|
|
156
|
+
id: option.Id,
|
|
157
|
+
};
|
|
158
|
+
})];
|
|
159
|
+
case 2: return [2 /*return*/, null];
|
|
140
160
|
}
|
|
141
|
-
return [2 /*return*/];
|
|
142
161
|
});
|
|
143
162
|
}); };
|
|
144
163
|
switch (props.step.type) {
|
package/dist/FormComponents/Step/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js
CHANGED
|
@@ -146,7 +146,7 @@ function SmartSelect(_a) {
|
|
|
146
146
|
if (options === null) {
|
|
147
147
|
handleMissingDep();
|
|
148
148
|
}
|
|
149
|
-
} }, { children: _jsx(RoundedSmartSelect, { value: value, onBlur: onBlur, disabled: options === null, loading: options === undefined, options: options !== null && options !== void 0 ? options : [],
|
|
149
|
+
}, "data-testid": step.id }, { children: _jsx(RoundedSmartSelect, { value: value, onBlur: onBlur, disabled: options === null, loading: options === undefined, options: options !== null && options !== void 0 ? options : [], inputRef: inputRef, cantEdit: !editable || postview, fullWidth: true, backgroundColor: "transparent", innerBackgroundColor: (_d = formStyle.stepBackgroundColor) !== null && _d !== void 0 ? _d : 'white', label: step.label, required: step.required, height: '31px', searchable: step.searchable, icon: step.showIcon ? icon : undefined, iconComponent: step.showIcon ? iconComponent : undefined, helperTextColor: formStyle.descriptionTextColor, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, errorColor: formStyle.errorColor, color: formStyle.textColor, containerMargin: "0px", handleUpdate: function (value) {
|
|
150
150
|
var _a;
|
|
151
151
|
if (dependencyStore[step.id] !== undefined) {
|
|
152
152
|
setDependencyStore(__assign(__assign({}, dependencyStore), (_a = {}, _a[step.id] = value, _a)));
|
package/package.json
CHANGED