desk-kit 2.0.8 → 2.0.9
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/components/header/index.js +93 -13
- package/dist/config/const.js +331 -2
- package/dist/config/http.js +37 -6
- package/package.json +1 -1
|
@@ -42,6 +42,12 @@ var _UserContext = require("../../context/UserContext");
|
|
|
42
42
|
var _Notifications = _interopRequireDefault(require("./Notifications"));
|
|
43
43
|
var _Menu2 = _interopRequireDefault(require("@mui/icons-material/Menu"));
|
|
44
44
|
var _nextIntl = require("next-intl");
|
|
45
|
+
var _Warehouse = _interopRequireDefault(require("@mui/icons-material/Warehouse"));
|
|
46
|
+
var _Route = _interopRequireDefault(require("@mui/icons-material/Route"));
|
|
47
|
+
var _Storefront = _interopRequireDefault(require("@mui/icons-material/Storefront"));
|
|
48
|
+
var _CurrencyExchange = _interopRequireDefault(require("@mui/icons-material/CurrencyExchange"));
|
|
49
|
+
var _LocalShipping = _interopRequireDefault(require("@mui/icons-material/LocalShipping"));
|
|
50
|
+
var _Diversity = _interopRequireDefault(require("@mui/icons-material/Diversity3"));
|
|
45
51
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
46
52
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
47
53
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
@@ -59,7 +65,7 @@ var app_list = [{
|
|
|
59
65
|
color: "white"
|
|
60
66
|
}
|
|
61
67
|
}),
|
|
62
|
-
color: "#
|
|
68
|
+
color: "#63BF4A",
|
|
63
69
|
subdomain: "clientes"
|
|
64
70
|
}, {
|
|
65
71
|
value: "suppliers",
|
|
@@ -69,7 +75,7 @@ var app_list = [{
|
|
|
69
75
|
color: "white"
|
|
70
76
|
}
|
|
71
77
|
}),
|
|
72
|
-
color: "#
|
|
78
|
+
color: "#C72F37",
|
|
73
79
|
subdomain: "proveedores"
|
|
74
80
|
}, {
|
|
75
81
|
value: "employees",
|
|
@@ -79,7 +85,7 @@ var app_list = [{
|
|
|
79
85
|
color: "white"
|
|
80
86
|
}
|
|
81
87
|
}),
|
|
82
|
-
color: "#
|
|
88
|
+
color: "#EAAD1C",
|
|
83
89
|
subdomain: "empleados"
|
|
84
90
|
}, {
|
|
85
91
|
value: "catalog",
|
|
@@ -89,22 +95,92 @@ var app_list = [{
|
|
|
89
95
|
color: "white"
|
|
90
96
|
}
|
|
91
97
|
}),
|
|
92
|
-
color: "#
|
|
98
|
+
color: "#E04B2B",
|
|
93
99
|
subdomain: "catalogo"
|
|
94
100
|
}, {
|
|
95
101
|
value: "billing",
|
|
96
102
|
name: "billing",
|
|
97
|
-
color: "#
|
|
103
|
+
color: "#523395",
|
|
98
104
|
icon: /*#__PURE__*/_react["default"].createElement(_ReceiptLongTwoTone["default"], {
|
|
99
105
|
sx: {
|
|
100
106
|
color: "white"
|
|
101
107
|
}
|
|
102
108
|
}),
|
|
103
109
|
subdomain: "facturacion"
|
|
110
|
+
}, {
|
|
111
|
+
value: "storage",
|
|
112
|
+
name: "storage",
|
|
113
|
+
color: "#63BF4A",
|
|
114
|
+
icon: /*#__PURE__*/_react["default"].createElement(_Warehouse["default"], {
|
|
115
|
+
sx: {
|
|
116
|
+
color: "white"
|
|
117
|
+
}
|
|
118
|
+
}),
|
|
119
|
+
subdomain: "almacen"
|
|
120
|
+
}, {
|
|
121
|
+
value: "routes",
|
|
122
|
+
name: "routes",
|
|
123
|
+
color: "#C72F37",
|
|
124
|
+
icon: /*#__PURE__*/_react["default"].createElement(_Route["default"], {
|
|
125
|
+
sx: {
|
|
126
|
+
color: "white"
|
|
127
|
+
}
|
|
128
|
+
}),
|
|
129
|
+
subdomain: "rutas"
|
|
130
|
+
}, {
|
|
131
|
+
value: "sales",
|
|
132
|
+
name: "sales",
|
|
133
|
+
color: "#EAAD1C",
|
|
134
|
+
icon: /*#__PURE__*/_react["default"].createElement(_Storefront["default"], {
|
|
135
|
+
sx: {
|
|
136
|
+
color: "white"
|
|
137
|
+
}
|
|
138
|
+
}),
|
|
139
|
+
subdomain: "ventas"
|
|
140
|
+
}, {
|
|
141
|
+
value: "accounting",
|
|
142
|
+
name: "accounting",
|
|
143
|
+
color: "#E04B2B",
|
|
144
|
+
icon: /*#__PURE__*/_react["default"].createElement(_CurrencyExchange["default"], {
|
|
145
|
+
sx: {
|
|
146
|
+
color: "white"
|
|
147
|
+
}
|
|
148
|
+
}),
|
|
149
|
+
subdomain: "contabilidad"
|
|
150
|
+
}, {
|
|
151
|
+
value: "vehicles",
|
|
152
|
+
name: "vehicles",
|
|
153
|
+
color: "#523395",
|
|
154
|
+
icon: /*#__PURE__*/_react["default"].createElement(_LocalShipping["default"], {
|
|
155
|
+
sx: {
|
|
156
|
+
color: "white"
|
|
157
|
+
}
|
|
158
|
+
}),
|
|
159
|
+
subdomain: "vehiculos"
|
|
160
|
+
}, {
|
|
161
|
+
value: "projects",
|
|
162
|
+
name: "projects",
|
|
163
|
+
color: "#2EEFEF",
|
|
164
|
+
icon: /*#__PURE__*/_react["default"].createElement(_LocalShipping["default"], {
|
|
165
|
+
sx: {
|
|
166
|
+
color: "white"
|
|
167
|
+
}
|
|
168
|
+
}),
|
|
169
|
+
subdomain: "Proyectos"
|
|
170
|
+
}, {
|
|
171
|
+
value: "resources",
|
|
172
|
+
name: "resources",
|
|
173
|
+
color: "#63BF4A",
|
|
174
|
+
icon: /*#__PURE__*/_react["default"].createElement(_Diversity["default"], {
|
|
175
|
+
sx: {
|
|
176
|
+
color: "white"
|
|
177
|
+
}
|
|
178
|
+
}),
|
|
179
|
+
subdomain: "recursoshumanos"
|
|
104
180
|
}, {
|
|
105
181
|
value: "settings",
|
|
106
182
|
name: "settings",
|
|
107
|
-
color: "#
|
|
183
|
+
color: "#111117",
|
|
108
184
|
icon: /*#__PURE__*/_react["default"].createElement(_Settings["default"], {
|
|
109
185
|
sx: {
|
|
110
186
|
color: "white"
|
|
@@ -113,6 +189,7 @@ var app_list = [{
|
|
|
113
189
|
subdomain: "ajustes"
|
|
114
190
|
}];
|
|
115
191
|
var Header = function Header(props) {
|
|
192
|
+
var _router$query;
|
|
116
193
|
var t = (0, _nextIntl.useTranslations)("apps");
|
|
117
194
|
var _useUser = (0, _UserContext.useUser)(),
|
|
118
195
|
user = _useUser.user,
|
|
@@ -153,11 +230,11 @@ var Header = function Header(props) {
|
|
|
153
230
|
// })
|
|
154
231
|
};
|
|
155
232
|
var _getUrl = function _getUrl(subDomain) {
|
|
156
|
-
if (router.query.businessId) return "http://".concat(subDomain, ".").concat(process.env.NEXT_PUBLIC_DOMAIN, "/board/").concat(router.query.businessId);
|
|
233
|
+
if (router.query.businessId) return "http://".concat(subDomain, ".").concat(process.env.NEXT_PUBLIC_DOMAIN, "/board/").concat(router.query.businessId);else return "http://".concat(subDomain, ".").concat(process.env.NEXT_PUBLIC_DOMAIN, "/");
|
|
157
234
|
};
|
|
158
235
|
var handleClose = function handleClose(key) {
|
|
159
236
|
setAnchorEl(null);
|
|
160
|
-
if (key === "settings") window.location.href = "cuenta.".concat(process.env.NEXT_PUBLIC_DOMAIN);
|
|
237
|
+
if (key === "settings") window.location.href = "http://cuenta.".concat(process.env.NEXT_PUBLIC_DOMAIN);
|
|
161
238
|
if (key === "logout") _signOut();
|
|
162
239
|
};
|
|
163
240
|
var _href = function _href(item) {
|
|
@@ -228,7 +305,7 @@ var Header = function Header(props) {
|
|
|
228
305
|
}, /*#__PURE__*/_react["default"].createElement("a", {
|
|
229
306
|
href: "https://help.deskmanager.app/",
|
|
230
307
|
target: "_new"
|
|
231
|
-
}, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], null, /*#__PURE__*/_react["default"].createElement(_InfoTwoTone["default"], null)))), /*#__PURE__*/_react["default"].createElement(_Notifications["default"], null), /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
|
|
308
|
+
}, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], null, /*#__PURE__*/_react["default"].createElement(_InfoTwoTone["default"], null)))), router !== null && router !== void 0 && (_router$query = router.query) !== null && _router$query !== void 0 && _router$query.businessId ? /*#__PURE__*/_react["default"].createElement(_Notifications["default"], null) : null, /*#__PURE__*/_react["default"].createElement(_Tooltip["default"], {
|
|
232
309
|
title: "Aplicaciones"
|
|
233
310
|
}, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
234
311
|
"aria-controls": openApp ? "apps-menu" : undefined,
|
|
@@ -254,10 +331,13 @@ var Header = function Header(props) {
|
|
|
254
331
|
justifyContent: "space-around",
|
|
255
332
|
alignItems: "flex-start",
|
|
256
333
|
flexWrap: 'wrap',
|
|
257
|
-
maxWidth:
|
|
334
|
+
maxWidth: 350
|
|
258
335
|
}
|
|
259
|
-
}, app_list.
|
|
260
|
-
|
|
336
|
+
}, app_list.filter(function (item) {
|
|
337
|
+
var _router$query2;
|
|
338
|
+
if (!(router !== null && router !== void 0 && (_router$query2 = router.query) !== null && _router$query2 !== void 0 && _router$query2.businessId)) return true;else return iCan('active', item.value);
|
|
339
|
+
}).map(function (item) {
|
|
340
|
+
return /*#__PURE__*/_react["default"].createElement("a", {
|
|
261
341
|
key: item.value,
|
|
262
342
|
target: "_blank",
|
|
263
343
|
className: "app_item",
|
|
@@ -270,7 +350,7 @@ var Header = function Header(props) {
|
|
|
270
350
|
}, item.icon), /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
|
|
271
351
|
mt: 1,
|
|
272
352
|
variant: "body2"
|
|
273
|
-
}, t(item.name)))
|
|
353
|
+
}, t(item.name)));
|
|
274
354
|
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
275
355
|
className: "button_account"
|
|
276
356
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
package/dist/config/const.js
CHANGED
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.validEmail = exports.valiationSessionUser = exports.unitList = exports.typeList = exports.typeBudgetList = exports.templateList = exports.stringToHash = exports.stringToColor = exports.statusSourceList = exports.statusBudgetList = exports.singleName = exports.satUSO = exports.routerType = exports.removeElementById = exports.relationshipSat = exports.regimenList = exports.regimenAduaneroList = exports.periodicityList = exports.paymentMethodSat = exports.paymentFormList = exports.onlyUnique = exports.monthsList = exports.isMobileServer = exports.invoiceType = exports.invoiceColor = exports.insertAtPosition = exports.hashToNeonColor = exports.hashToColor = exports.getNameInitials = exports.getFullUrl = exports.getCFDITAXEXLIST = exports.getCFDITAXES = exports.getCFDISUBTOTAL = exports.getBackgroundColor = exports.exportMoneySat = exports.exportListSat = exports.entidades = exports.defaultTaxes = exports.currencyNumber = exports.currency = exports.countrySatList = exports.colorPercentaje = exports.bytesToSize = exports._getValue = exports.SATremolque = exports.SATViaEntradaSalida = exports.SATTipoFigura = exports.SATPartesTrans = exports.SATEntradaSalidaMerc = exports.PoloList = exports.PaisSat = exports.EntidadSat = exports.ConfigVehicularList = exports.AWSBUCKET = exports.API_LOCAL = exports.API = exports.ALL_PERMISSONS = void 0;
|
|
6
|
+
exports.validEmail = exports.valiationSessionUser = exports.unitList = exports.typeList = exports.typeBudgetList = exports.templateList = exports.stringToHash = exports.stringToColor = exports.statusSourceList = exports.statusBudgetList = exports.singleName = exports.satUSO = exports.routerType = exports.removeElementById = exports.relationshipSat = exports.regimenList = exports.regimenAduaneroList = exports.periodicityList = exports.paymentMethodSat = exports.paymentFormList = exports.onlyUnique = exports.monthsList = exports.lista_tipo_regimen = exports.lista_tipo_contrato = exports.lista_riesgo = exports.lista_periodicidad = exports.lista_jornada = exports.isMobileServer = exports.invoiceType = exports.invoiceColor = exports.insertAtPosition = exports.hashToNeonColor = exports.hashToColor = exports.getNameInitials = exports.getName = exports.getFullUrl = exports.getDayNameById = exports.getCFDITAXEXLIST = exports.getCFDITAXES = exports.getCFDISUBTOTAL = exports.getBackgroundColor = exports.exportMoneySat = exports.exportListSat = exports.entidadesmodal = exports.entidades = exports.defaultTaxes = exports.daysOfflist = exports.daysOfWeek = exports.currencyNumber = exports.currency = exports.countrySatList = exports.colorPercentaje = exports.bytesToSize = exports._getValue = exports.SATremolque = exports.SATViaEntradaSalida = exports.SATTipoFigura = exports.SATPartesTrans = exports.SATEntradaSalidaMerc = exports.PoloList = exports.PaisSat = exports.EntidadSat = exports.ConfigVehicularList = exports.AWSBUCKET = exports.API_LOCAL = exports.API = exports.ALL_PERMISSONS = void 0;
|
|
7
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
7
9
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
8
10
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9
11
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -28,6 +30,11 @@ var colorPercentaje = exports.colorPercentaje = function colorPercentaje(value)
|
|
|
28
30
|
return "#EAAD1C";
|
|
29
31
|
} else return "#C72F37";
|
|
30
32
|
};
|
|
33
|
+
var getName = exports.getName = function getName(stringName) {
|
|
34
|
+
return "".concat(stringName).split(" ").map(function (i) {
|
|
35
|
+
return i.charAt(0);
|
|
36
|
+
}).slice(0, 2).join("");
|
|
37
|
+
};
|
|
31
38
|
var ALL_PERMISSONS = exports.ALL_PERMISSONS = ['ACTIVE_BILLING', 'ACTIVE_CATALOG', 'ACTIVE_CLIENTS', 'ACTIVE_EMPLOYEES', 'ACTIVE_SUPPLIERS', 'DELETE_BILLING', 'DELETE_CATALOG', 'DELETE_CLIENTS', 'DELETE_EMPLOYEES', 'DELETE_SUPPLIERS', 'FULL_ACCESS_BILLING', 'FULL_ACCESS_CATALOG', 'FULL_ACCESS_CLIENTS', 'FULL_ACCESS_EMPLOYEES', 'FULL_ACCESS_SUPPLIERS', 'WRITE_BILLING', 'WRITE_CATALOG', 'WRITE_CLIENTS', 'WRITE_EMPLOYEES', 'WRITE_SUPPLIERS', 'UPDATE_BILLING', 'UPDATE_CATALOG', 'UPDATE_CLIENTS', 'UPDATE_EMPLOYEES', 'UPDATE_SUPPLIERS'];
|
|
32
39
|
var statusSourceList = exports.statusSourceList = [{
|
|
33
40
|
value: "supplier",
|
|
@@ -2639,4 +2646,326 @@ var stringToColor = exports.stringToColor = function stringToColor(str) {
|
|
|
2639
2646
|
color += ("00" + value.toString(16)).substr(-2);
|
|
2640
2647
|
}
|
|
2641
2648
|
return color;
|
|
2642
|
-
};
|
|
2649
|
+
};
|
|
2650
|
+
var lista_tipo_contrato = exports.lista_tipo_contrato = [{
|
|
2651
|
+
value: "01",
|
|
2652
|
+
name: "Contrato de trabajo por tiempo indeterminado"
|
|
2653
|
+
}, {
|
|
2654
|
+
value: "02",
|
|
2655
|
+
name: "Contrato de trabajo para obra determinada"
|
|
2656
|
+
}, {
|
|
2657
|
+
value: "03",
|
|
2658
|
+
name: "Contrato de trabajo por tiempo determinado"
|
|
2659
|
+
}, {
|
|
2660
|
+
value: "04",
|
|
2661
|
+
name: "Contrato de trabajo por temporada"
|
|
2662
|
+
}, {
|
|
2663
|
+
value: "05",
|
|
2664
|
+
name: "Contrato de trabajo sujeto a prueba"
|
|
2665
|
+
}, {
|
|
2666
|
+
value: "06",
|
|
2667
|
+
name: "Contrato de trabajo con capacitación inicial"
|
|
2668
|
+
}, {
|
|
2669
|
+
value: "07",
|
|
2670
|
+
name: "Modalidad de contratación por pago de hora laborada"
|
|
2671
|
+
}, {
|
|
2672
|
+
value: "08",
|
|
2673
|
+
name: "Modalidad de trabajo por comisión laboral"
|
|
2674
|
+
}, {
|
|
2675
|
+
value: "09",
|
|
2676
|
+
name: "Modalidades de contratación donde no existe relación de trabajo"
|
|
2677
|
+
}, {
|
|
2678
|
+
value: "10",
|
|
2679
|
+
name: "Jubilación, pensión, retiro."
|
|
2680
|
+
}, {
|
|
2681
|
+
value: "99",
|
|
2682
|
+
name: "Otro contrato"
|
|
2683
|
+
}];
|
|
2684
|
+
var lista_tipo_regimen = exports.lista_tipo_regimen = [{
|
|
2685
|
+
value: "02",
|
|
2686
|
+
name: "Sueldos (Incluye ingresos señalados en la fracción I del artículo 94 de LISR)"
|
|
2687
|
+
}, {
|
|
2688
|
+
value: "03",
|
|
2689
|
+
name: "Jubilados"
|
|
2690
|
+
}, {
|
|
2691
|
+
value: "04",
|
|
2692
|
+
name: "Pensionados"
|
|
2693
|
+
}, {
|
|
2694
|
+
value: "05",
|
|
2695
|
+
name: "Asimilados Miembros Sociedades Cooperativas Produccion"
|
|
2696
|
+
}, {
|
|
2697
|
+
value: "06",
|
|
2698
|
+
name: "Asimilados Integrantes Sociedades Asociaciones Civiles"
|
|
2699
|
+
}, {
|
|
2700
|
+
value: "07",
|
|
2701
|
+
name: "Asimilados Miembros consejos"
|
|
2702
|
+
}, {
|
|
2703
|
+
value: "08",
|
|
2704
|
+
name: "Asimilados comisionistas"
|
|
2705
|
+
}, {
|
|
2706
|
+
value: "09",
|
|
2707
|
+
name: "Asimilados Honorarios"
|
|
2708
|
+
}, {
|
|
2709
|
+
value: "10",
|
|
2710
|
+
name: "Asimilados acciones"
|
|
2711
|
+
}, {
|
|
2712
|
+
value: "11",
|
|
2713
|
+
name: "Asimilados otros"
|
|
2714
|
+
}, {
|
|
2715
|
+
value: "12",
|
|
2716
|
+
name: "Jubilados o Pensionados"
|
|
2717
|
+
}, {
|
|
2718
|
+
value: "13",
|
|
2719
|
+
name: "Indemnización o Separación"
|
|
2720
|
+
}, {
|
|
2721
|
+
value: "99",
|
|
2722
|
+
name: "Otro Regimen"
|
|
2723
|
+
}];
|
|
2724
|
+
var lista_periodicidad = exports.lista_periodicidad = [{
|
|
2725
|
+
value: "01",
|
|
2726
|
+
name: "Diario"
|
|
2727
|
+
}, {
|
|
2728
|
+
value: "02",
|
|
2729
|
+
name: "Semanal"
|
|
2730
|
+
}, {
|
|
2731
|
+
value: "03",
|
|
2732
|
+
name: "Catorcenal"
|
|
2733
|
+
}, {
|
|
2734
|
+
value: "04",
|
|
2735
|
+
name: "Quincenal"
|
|
2736
|
+
}, {
|
|
2737
|
+
value: "05",
|
|
2738
|
+
name: "Mensual"
|
|
2739
|
+
}, {
|
|
2740
|
+
value: "06",
|
|
2741
|
+
name: "Bimestral"
|
|
2742
|
+
}, {
|
|
2743
|
+
value: "07",
|
|
2744
|
+
name: "Unidad obra"
|
|
2745
|
+
}, {
|
|
2746
|
+
value: "08",
|
|
2747
|
+
name: "Comisión"
|
|
2748
|
+
}, {
|
|
2749
|
+
value: "09",
|
|
2750
|
+
name: "Precio alzado"
|
|
2751
|
+
}, {
|
|
2752
|
+
value: "10",
|
|
2753
|
+
name: "Decenal"
|
|
2754
|
+
}, {
|
|
2755
|
+
value: "99",
|
|
2756
|
+
name: "Otra Periodicidad"
|
|
2757
|
+
}];
|
|
2758
|
+
var lista_riesgo = exports.lista_riesgo = [{
|
|
2759
|
+
value: "1",
|
|
2760
|
+
name: "Clase I"
|
|
2761
|
+
}, {
|
|
2762
|
+
value: "2",
|
|
2763
|
+
name: "Clase II"
|
|
2764
|
+
}, {
|
|
2765
|
+
value: "3",
|
|
2766
|
+
name: "Clase III"
|
|
2767
|
+
}, {
|
|
2768
|
+
value: "4",
|
|
2769
|
+
name: "Clase IV"
|
|
2770
|
+
}, {
|
|
2771
|
+
value: "5",
|
|
2772
|
+
name: "Clase V"
|
|
2773
|
+
}, {
|
|
2774
|
+
value: "99",
|
|
2775
|
+
name: "No aplica"
|
|
2776
|
+
}];
|
|
2777
|
+
var daysOfWeek = exports.daysOfWeek = [{
|
|
2778
|
+
name: 'Lunes',
|
|
2779
|
+
value: '0'
|
|
2780
|
+
}, {
|
|
2781
|
+
name: 'Martes',
|
|
2782
|
+
value: '1'
|
|
2783
|
+
}, {
|
|
2784
|
+
name: 'Miercoles',
|
|
2785
|
+
value: '2'
|
|
2786
|
+
}, {
|
|
2787
|
+
name: 'Jueves',
|
|
2788
|
+
value: '3'
|
|
2789
|
+
}, {
|
|
2790
|
+
name: 'Viernes',
|
|
2791
|
+
value: '4'
|
|
2792
|
+
}, {
|
|
2793
|
+
name: 'Sabado',
|
|
2794
|
+
value: '5'
|
|
2795
|
+
}, {
|
|
2796
|
+
name: 'Domingo',
|
|
2797
|
+
value: '6'
|
|
2798
|
+
}];
|
|
2799
|
+
var getDayNameById = exports.getDayNameById = function getDayNameById(id) {
|
|
2800
|
+
// Convertir id a string en caso de que sea un número
|
|
2801
|
+
var idString = id.toString();
|
|
2802
|
+
|
|
2803
|
+
// Buscar el objeto cuyo valor coincida con el idString
|
|
2804
|
+
var day = daysOfWeek.find(function (day) {
|
|
2805
|
+
return day.value === idString;
|
|
2806
|
+
});
|
|
2807
|
+
|
|
2808
|
+
// Retornar el nombre del día si se encontró, de lo contrario un mensaje de error
|
|
2809
|
+
return day ? day.name : 'ID de día inválido';
|
|
2810
|
+
};
|
|
2811
|
+
var daysOfflist = exports.daysOfflist = [{
|
|
2812
|
+
day: 0,
|
|
2813
|
+
checkInTime: (0, _moment["default"])('08:00:00', 'hh:mm:ss'),
|
|
2814
|
+
checkOutTime: (0, _moment["default"])('16:00:00', 'hh:mm:ss'),
|
|
2815
|
+
isDayOff: false
|
|
2816
|
+
}, {
|
|
2817
|
+
day: 1,
|
|
2818
|
+
checkInTime: (0, _moment["default"])('08:00:00', 'hh:mm:ss'),
|
|
2819
|
+
checkOutTime: (0, _moment["default"])('16:00:00', 'hh:mm:ss'),
|
|
2820
|
+
isDayOff: false
|
|
2821
|
+
}, {
|
|
2822
|
+
day: 2,
|
|
2823
|
+
checkInTime: (0, _moment["default"])('08:00:00', 'hh:mm:ss'),
|
|
2824
|
+
checkOutTime: (0, _moment["default"])('16:00:00', 'hh:mm:ss'),
|
|
2825
|
+
isDayOff: false
|
|
2826
|
+
}, {
|
|
2827
|
+
day: 3,
|
|
2828
|
+
checkInTime: (0, _moment["default"])('08:00:00', 'hh:mm:ss'),
|
|
2829
|
+
checkOutTime: (0, _moment["default"])('16:00:00', 'hh:mm:ss'),
|
|
2830
|
+
isDayOff: false
|
|
2831
|
+
}, {
|
|
2832
|
+
day: 4,
|
|
2833
|
+
checkInTime: (0, _moment["default"])('08:00:00', 'hh:mm:ss'),
|
|
2834
|
+
checkOutTime: (0, _moment["default"])('16:00:00', 'hh:mm:ss'),
|
|
2835
|
+
isDayOff: false
|
|
2836
|
+
}, {
|
|
2837
|
+
day: 5,
|
|
2838
|
+
checkInTime: (0, _moment["default"])('08:00:00', 'hh:mm:ss'),
|
|
2839
|
+
checkOutTime: (0, _moment["default"])('16:00:00', 'hh:mm:ss'),
|
|
2840
|
+
isDayOff: false
|
|
2841
|
+
}, {
|
|
2842
|
+
day: 6,
|
|
2843
|
+
checkInTime: (0, _moment["default"])('08:00:00', 'hh:mm:ss'),
|
|
2844
|
+
checkOutTime: (0, _moment["default"])('16:00:00', 'hh:mm:ss'),
|
|
2845
|
+
isDayOff: false
|
|
2846
|
+
}];
|
|
2847
|
+
var lista_jornada = exports.lista_jornada = [{
|
|
2848
|
+
value: "01",
|
|
2849
|
+
name: "Diurna"
|
|
2850
|
+
}, {
|
|
2851
|
+
value: "02",
|
|
2852
|
+
name: "Nocturna"
|
|
2853
|
+
}, {
|
|
2854
|
+
value: "03",
|
|
2855
|
+
name: "Mixta"
|
|
2856
|
+
}, {
|
|
2857
|
+
value: "04",
|
|
2858
|
+
name: "Por hora"
|
|
2859
|
+
}, {
|
|
2860
|
+
value: "05",
|
|
2861
|
+
name: "Reducida"
|
|
2862
|
+
}, {
|
|
2863
|
+
value: "06",
|
|
2864
|
+
name: "Continuada"
|
|
2865
|
+
}, {
|
|
2866
|
+
value: "07",
|
|
2867
|
+
name: "Partida"
|
|
2868
|
+
}, {
|
|
2869
|
+
value: "08",
|
|
2870
|
+
name: "Por turnos"
|
|
2871
|
+
}, {
|
|
2872
|
+
value: "99",
|
|
2873
|
+
name: "Otra Jornada"
|
|
2874
|
+
}];
|
|
2875
|
+
var entidadesmodal = exports.entidadesmodal = [{
|
|
2876
|
+
value: "AGUASCALIENTES",
|
|
2877
|
+
name: "AGUASCALIENTES"
|
|
2878
|
+
}, {
|
|
2879
|
+
value: "BAJA CALIFORNIA",
|
|
2880
|
+
name: "BAJA CALIFORNIA"
|
|
2881
|
+
}, {
|
|
2882
|
+
value: "BAJA CALIFORNIA SUR",
|
|
2883
|
+
name: "BAJA CALIFORNIA SUR"
|
|
2884
|
+
}, {
|
|
2885
|
+
value: "CHIHUAHUA",
|
|
2886
|
+
name: "CHIHUAHUA"
|
|
2887
|
+
}, {
|
|
2888
|
+
value: "CHIAPAS",
|
|
2889
|
+
name: "CHIAPAS"
|
|
2890
|
+
}, {
|
|
2891
|
+
value: "CAMPECHE",
|
|
2892
|
+
name: "CAMPECHE"
|
|
2893
|
+
}, {
|
|
2894
|
+
value: "CIUDAD DE MEXICO",
|
|
2895
|
+
name: "Ciudad de México"
|
|
2896
|
+
}, {
|
|
2897
|
+
value: "COAHUILA",
|
|
2898
|
+
name: "COAHUILA"
|
|
2899
|
+
}, {
|
|
2900
|
+
value: "COLIMA",
|
|
2901
|
+
name: "COLIMA"
|
|
2902
|
+
}, {
|
|
2903
|
+
value: "DURANGO",
|
|
2904
|
+
name: "DURANGO"
|
|
2905
|
+
}, {
|
|
2906
|
+
value: "GUERRERO",
|
|
2907
|
+
name: "GUERRERO"
|
|
2908
|
+
}, {
|
|
2909
|
+
value: "GUANAJUATO",
|
|
2910
|
+
name: "GUANAJUATO"
|
|
2911
|
+
}, {
|
|
2912
|
+
value: "HIDALGO",
|
|
2913
|
+
name: "HIDALGO"
|
|
2914
|
+
}, {
|
|
2915
|
+
value: "JALISCO",
|
|
2916
|
+
name: "JALISCO"
|
|
2917
|
+
}, {
|
|
2918
|
+
value: "MICHOACAN",
|
|
2919
|
+
name: "Michoacán"
|
|
2920
|
+
}, {
|
|
2921
|
+
value: "ESTADO DE MEXICO",
|
|
2922
|
+
name: "Estado de México"
|
|
2923
|
+
}, {
|
|
2924
|
+
value: "MORELOS",
|
|
2925
|
+
name: "MORELOS"
|
|
2926
|
+
}, {
|
|
2927
|
+
value: "NAYARIT",
|
|
2928
|
+
name: "NAYARIT"
|
|
2929
|
+
}, {
|
|
2930
|
+
value: "NUEVO LEON",
|
|
2931
|
+
name: "Nuevo León"
|
|
2932
|
+
}, {
|
|
2933
|
+
value: "OAXACA",
|
|
2934
|
+
name: "OAXACA"
|
|
2935
|
+
}, {
|
|
2936
|
+
value: "PUEBLA",
|
|
2937
|
+
name: "PUEBLA"
|
|
2938
|
+
}, {
|
|
2939
|
+
value: "QUINTANA ROO",
|
|
2940
|
+
name: "QUINTANA ROO"
|
|
2941
|
+
}, {
|
|
2942
|
+
value: "Querétaro",
|
|
2943
|
+
name: "QUERETARO"
|
|
2944
|
+
}, {
|
|
2945
|
+
value: "SINALOA",
|
|
2946
|
+
name: "SINALOA"
|
|
2947
|
+
}, {
|
|
2948
|
+
value: "San Luis Potosí",
|
|
2949
|
+
name: "SAN LUIS POTOSI"
|
|
2950
|
+
}, {
|
|
2951
|
+
value: "SONORA",
|
|
2952
|
+
name: "SONORA"
|
|
2953
|
+
}, {
|
|
2954
|
+
value: "TABASCO",
|
|
2955
|
+
name: "TABASCO"
|
|
2956
|
+
}, {
|
|
2957
|
+
value: "TLAXCALA",
|
|
2958
|
+
name: "TLAXCALA"
|
|
2959
|
+
}, {
|
|
2960
|
+
value: "TAMAULIPAS",
|
|
2961
|
+
name: "TAMAULIPAS"
|
|
2962
|
+
}, {
|
|
2963
|
+
value: "VERACRUZ",
|
|
2964
|
+
name: "VERACRUZ"
|
|
2965
|
+
}, {
|
|
2966
|
+
value: "YUCATÁN",
|
|
2967
|
+
name: "YUCATAN"
|
|
2968
|
+
}, {
|
|
2969
|
+
value: "ZACATECAS",
|
|
2970
|
+
name: "ZACATECAS"
|
|
2971
|
+
}];
|
package/dist/config/http.js
CHANGED
|
@@ -4,7 +4,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.cancelRequest = exports.api = exports.HTTP = void 0;
|
|
7
|
+
exports.cancelRequest = exports.api = exports.HTTP_UPLOAD = exports.HTTP = void 0;
|
|
8
8
|
var _axios = _interopRequireDefault(require("axios"));
|
|
9
9
|
var _const = require("./const");
|
|
10
10
|
var _nookies = require("nookies");
|
|
@@ -37,6 +37,37 @@ api.interceptors.request.use(/*#__PURE__*/function () {
|
|
|
37
37
|
return _ref.apply(this, arguments);
|
|
38
38
|
};
|
|
39
39
|
}());
|
|
40
|
+
var HTTP_UPLOAD = exports.HTTP_UPLOAD = function HTTP_UPLOAD() {
|
|
41
|
+
var method = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "POST";
|
|
42
|
+
var url = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "";
|
|
43
|
+
var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
44
|
+
var accessToken = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
45
|
+
return new Promise(function (resolve, reject) {
|
|
46
|
+
var formData = new FormData();
|
|
47
|
+
Object.keys(data).forEach(function (item) {
|
|
48
|
+
formData.append(item, data[item]);
|
|
49
|
+
});
|
|
50
|
+
api({
|
|
51
|
+
method: "POST",
|
|
52
|
+
url: "".concat(process.browser ? _const.API : _const.API_LOCAL).concat(url),
|
|
53
|
+
data: formData,
|
|
54
|
+
headers: {
|
|
55
|
+
Authorization: accessToken
|
|
56
|
+
}
|
|
57
|
+
}).then(function (_ref2) {
|
|
58
|
+
var data = _ref2.data;
|
|
59
|
+
return resolve(data);
|
|
60
|
+
})["catch"](function (err) {
|
|
61
|
+
var _err$response, _err$response2;
|
|
62
|
+
if (process.browser && ((_err$response = err.response) === null || _err$response === void 0 || (_err$response = _err$response.data) === null || _err$response === void 0 ? void 0 : _err$response.status) === 403) return window.location.href = "/account/login";
|
|
63
|
+
return reject((err === null || err === void 0 || (_err$response2 = err.response) === null || _err$response2 === void 0 ? void 0 : _err$response2.data) || {
|
|
64
|
+
error: true,
|
|
65
|
+
message: "No tenemos comunicación con el servidor por favor intenta más tarde.",
|
|
66
|
+
status: 401
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
};
|
|
40
71
|
var cancelRequest = exports.cancelRequest = function cancelRequest() {};
|
|
41
72
|
var HTTP = exports.HTTP = function HTTP() {
|
|
42
73
|
var method = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "POST";
|
|
@@ -49,13 +80,13 @@ var HTTP = exports.HTTP = function HTTP() {
|
|
|
49
80
|
url: "".concat(process.browser ? _const.API : _const.API_LOCAL).concat(url)
|
|
50
81
|
}, method === "POST" ? "data" : "params", _objectSpread({}, data)), "headers", {
|
|
51
82
|
Authorization: accessToken
|
|
52
|
-
})).then(function (
|
|
53
|
-
var data =
|
|
83
|
+
})).then(function (_ref3) {
|
|
84
|
+
var data = _ref3.data;
|
|
54
85
|
return resolve(data);
|
|
55
86
|
})["catch"](function (err) {
|
|
56
|
-
var _err$
|
|
57
|
-
if (process.browser && ((_err$
|
|
58
|
-
return reject((err === null || err === void 0 || (_err$
|
|
87
|
+
var _err$response3, _err$response4;
|
|
88
|
+
if (process.browser && ((_err$response3 = err.response) === null || _err$response3 === void 0 || (_err$response3 = _err$response3.data) === null || _err$response3 === void 0 ? void 0 : _err$response3.status) === 403) return window.location.href = "/acceder";
|
|
89
|
+
return reject((err === null || err === void 0 || (_err$response4 = err.response) === null || _err$response4 === void 0 ? void 0 : _err$response4.data) || {
|
|
59
90
|
error: true,
|
|
60
91
|
message: "No tenemos comunicación con el servidor por favor intenta más tarde.",
|
|
61
92
|
status: 401
|