@snabcentr/common-lib 2.0.3 → 2.0.4
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/manifest.json +1 -1
- package/dist/release_notes.tmp +3 -3
- package/dist/sc-common-lib.js +177 -173
- package/dist/sc-common-lib.js.map +1 -1
- package/dist/sc-common-lib.umd.cjs +1 -1
- package/dist/sc-common-lib.umd.cjs.map +1 -1
- package/dist/src/managers/classes/manager-common.d.ts +8 -4
- package/dist/src/managers/classes/manager-common.d.ts.map +1 -1
- package/dist/src/managers/interfaces/i-manager-common.d.ts +4 -0
- package/dist/src/managers/interfaces/i-manager-common.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/sc-common-lib.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var
|
|
2
|
-
var Rr = (n, r, e) => r in n ?
|
|
1
|
+
var ar = Object.defineProperty;
|
|
2
|
+
var Rr = (n, r, e) => r in n ? ar(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
3
|
var t = (n, r, e) => Rr(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
4
|
import { jwtDecode as rr } from "jwt-decode";
|
|
5
|
-
import { merge as Oe, isUndefined as Ar, isNil as A, isEmpty as Y, noop as y, mapValues as tr, isArray as Q, every as Dr, split as $r, toUpper as Tr, constant as br, isString as w, cloneDeep as Sr, toLower as _r, isFunction as Ue, map as he, forEach as
|
|
5
|
+
import { merge as Oe, isUndefined as Ar, isNil as A, isEmpty as Y, noop as y, mapValues as tr, isArray as Q, every as Dr, split as $r, toUpper as Tr, constant as br, isString as w, cloneDeep as Sr, toLower as _r, isFunction as Ue, map as he, forEach as Ir, isDate as ke, omitBy as sr, isObject as ir } from "lodash-es";
|
|
6
6
|
import { objectToCamel as qe, objectToSnake as Be } from "ts-case-convert";
|
|
7
|
-
import { isAfter as ze, parseISO as
|
|
7
|
+
import { isAfter as ze, parseISO as C, startOfToday as Le, format as U, addSeconds as kr, addBusinessDays as Lr, endOfTomorrow as dr, startOfTomorrow as xr, endOfYesterday as Nr, startOfYesterday as Or, endOfToday as Ur, endOfDay as qr, startOfDay as Gr } from "date-fns";
|
|
8
8
|
import { defineStore as te } from "pinia";
|
|
9
|
-
import { ref as f, markRaw as Fr, computed as
|
|
9
|
+
import { ref as f, markRaw as Fr, computed as a } from "vue";
|
|
10
10
|
import jr from "axios";
|
|
11
11
|
class G {
|
|
12
12
|
/**
|
|
@@ -210,7 +210,7 @@ class ye {
|
|
|
210
210
|
if (e)
|
|
211
211
|
try {
|
|
212
212
|
const s = JSON.parse(e);
|
|
213
|
-
if (!s.availableFor || ze(
|
|
213
|
+
if (!s.availableFor || ze(C(s.availableFor) || Le(), /* @__PURE__ */ new Date())) {
|
|
214
214
|
if (A(s.data) || Y(s.data))
|
|
215
215
|
throw new Error("Data is empty");
|
|
216
216
|
return s.data;
|
|
@@ -284,7 +284,7 @@ class ye {
|
|
|
284
284
|
const i = localStorage.getItem(s);
|
|
285
285
|
if (i) {
|
|
286
286
|
const o = JSON.parse(i);
|
|
287
|
-
o.availableFor && !ze(
|
|
287
|
+
o.availableFor && !ze(C(o.availableFor) || Le(), /* @__PURE__ */ new Date()) && r.push(s);
|
|
288
288
|
}
|
|
289
289
|
} catch {
|
|
290
290
|
r.push(s);
|
|
@@ -351,7 +351,7 @@ const B = te("__auth_state_private", () => {
|
|
|
351
351
|
recalculateUserPermissions: i
|
|
352
352
|
};
|
|
353
353
|
}), $e = te("__auth_state", () => {
|
|
354
|
-
const n =
|
|
354
|
+
const n = a(() => {
|
|
355
355
|
const o = B();
|
|
356
356
|
if (A(o.jwtToken) && !A(o.jwtTokenUpdater)) {
|
|
357
357
|
const c = o.jwtTokenUpdater();
|
|
@@ -375,22 +375,22 @@ const B = te("__auth_state_private", () => {
|
|
|
375
375
|
function i(o) {
|
|
376
376
|
const c = B();
|
|
377
377
|
!A(c.jwtToken) && A(c.userPermissions) && c.jwtToken.then((m) => {
|
|
378
|
-
const
|
|
379
|
-
c.userPermissions =
|
|
378
|
+
const v = G.getJwtPayload(m);
|
|
379
|
+
c.userPermissions = v.exp * 1e3 > Date.now() ? tr(v.resourceAccess, ($) => ($ == null ? void 0 : $.roles) ?? []) : void 0;
|
|
380
380
|
}).catch(y);
|
|
381
381
|
const p = Q(o) ? o.join(" && ") : o;
|
|
382
382
|
if (c.userPermissionsComputedRefs.has(p))
|
|
383
383
|
return c.userPermissionsComputedRefs.get(p);
|
|
384
|
-
const u =
|
|
385
|
-
const m = (
|
|
384
|
+
const u = a(() => {
|
|
385
|
+
const m = (v) => {
|
|
386
386
|
var _;
|
|
387
|
-
const $ = $r(
|
|
387
|
+
const $ = $r(v, ".");
|
|
388
388
|
if ($.length < 2)
|
|
389
389
|
return !1;
|
|
390
|
-
const [
|
|
391
|
-
return Q(S) && S.includes(
|
|
390
|
+
const [I, k] = $, S = (_ = B().userPermissions) == null ? void 0 : _[I];
|
|
391
|
+
return Q(S) && S.includes(k);
|
|
392
392
|
};
|
|
393
|
-
return Q(o) ? Dr(o, (
|
|
393
|
+
return Q(o) ? Dr(o, (v) => m(v)) : m(o);
|
|
394
394
|
});
|
|
395
395
|
return c.userPermissionsComputedRefs.set(p, u), u;
|
|
396
396
|
}
|
|
@@ -497,7 +497,7 @@ class nr extends oe {
|
|
|
497
497
|
this.slug = (e == null ? void 0 : e.slug) ?? "";
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
|
-
class
|
|
500
|
+
class de extends nr {
|
|
501
501
|
/**
|
|
502
502
|
* Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
|
|
503
503
|
*
|
|
@@ -512,7 +512,7 @@ class Le extends nr {
|
|
|
512
512
|
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
|
-
class ge extends
|
|
515
|
+
class ge extends de {
|
|
516
516
|
/**
|
|
517
517
|
* Инициализирует экземпляр класса {@link BaseCategory}.
|
|
518
518
|
*
|
|
@@ -540,7 +540,7 @@ class ge extends Le {
|
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
542
|
var or = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(or || {});
|
|
543
|
-
class
|
|
543
|
+
class P extends b {
|
|
544
544
|
/**
|
|
545
545
|
* Инициализирует экземпляр класса {@link Reference}.
|
|
546
546
|
*
|
|
@@ -559,7 +559,7 @@ class v extends b {
|
|
|
559
559
|
this.description = e == null ? void 0 : e.description, this.slug = e == null ? void 0 : e.slug;
|
|
560
560
|
}
|
|
561
561
|
}
|
|
562
|
-
class
|
|
562
|
+
class ae extends P {
|
|
563
563
|
/**
|
|
564
564
|
* Возвращает значение справочника коэффициента розничной цены.
|
|
565
565
|
*/
|
|
@@ -594,7 +594,7 @@ class Ge {
|
|
|
594
594
|
* Признак того, что указанный коэффициент доступен текущему пользователю только для просмотра.
|
|
595
595
|
*/
|
|
596
596
|
t(this, "readOnly");
|
|
597
|
-
this.coefficient = new
|
|
597
|
+
this.coefficient = new ae(r == null ? void 0 : r.coefficient), this.value = (r == null ? void 0 : r.value) ?? 0, this.cost = (r == null ? void 0 : r.cost) ?? 0, this.percent = (r == null ? void 0 : r.percent) ?? 0, this.readOnly = (r == null ? void 0 : r.readOnly) ?? !0;
|
|
598
598
|
}
|
|
599
599
|
}
|
|
600
600
|
class cr {
|
|
@@ -615,9 +615,9 @@ class cr {
|
|
|
615
615
|
this.lat = (r == null ? void 0 : r.lat) ?? 0, this.long = (r == null ? void 0 : r.long) ?? 0;
|
|
616
616
|
}
|
|
617
617
|
}
|
|
618
|
-
class X extends
|
|
618
|
+
class X extends P {
|
|
619
619
|
}
|
|
620
|
-
class Re extends
|
|
620
|
+
class Re extends P {
|
|
621
621
|
/**
|
|
622
622
|
* Инициализирует экземпляр класса {@link Warehouse}.
|
|
623
623
|
*
|
|
@@ -790,9 +790,9 @@ class x extends Hr {
|
|
|
790
790
|
* Список коэффициентов цен на продукт.
|
|
791
791
|
*/
|
|
792
792
|
t(this, "priceCoefficients");
|
|
793
|
-
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = (e == null ? void 0 : e.unit) ?? "", this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.quantityUnit = e == null ? void 0 : e.quantityUnit, this.currency = (e == null ? void 0 : e.currency) ?? "", this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = w(e == null ? void 0 : e.costDate) ?
|
|
793
|
+
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = (e == null ? void 0 : e.unit) ?? "", this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.quantityUnit = e == null ? void 0 : e.quantityUnit, this.currency = (e == null ? void 0 : e.currency) ?? "", this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = w(e == null ? void 0 : e.costDate) ? C(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((i = e == null ? void 0 : e.stockCount) == null ? void 0 : i.map((u) => new Mr(u))) ?? [], this.currencySignature = (e == null ? void 0 : e.currencySignature) ?? "", this.type = "product";
|
|
794
794
|
const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((u) => u.isPrimary));
|
|
795
|
-
s && (this.category = new
|
|
795
|
+
s && (this.category = new de({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((u) => new de(u))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((u) => new Br(u, D.getConfig().http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.retailCost = e == null ? void 0 : e.retailCost, this.retailCostRub = e == null ? void 0 : e.retailCostRub, this.priceCoefficients = ((p = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : p.map((u) => new Ge(u))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
796
796
|
}
|
|
797
797
|
/**
|
|
798
798
|
* Возвращает признак, что это измеряемый товар.
|
|
@@ -961,7 +961,7 @@ class Fe {
|
|
|
961
961
|
return new r(e);
|
|
962
962
|
}
|
|
963
963
|
}
|
|
964
|
-
const
|
|
964
|
+
const d = class d {
|
|
965
965
|
/**
|
|
966
966
|
* Инициализирует экземпляр класса {@link HttpRequester}.
|
|
967
967
|
*/
|
|
@@ -1027,7 +1027,7 @@ const L = class L {
|
|
|
1027
1027
|
// eslint-disable-next-line class-methods-use-this
|
|
1028
1028
|
t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = qe(r.data)), r));
|
|
1029
1029
|
const r = D.getConfig().version;
|
|
1030
|
-
this.errorResponseHandler =
|
|
1030
|
+
this.errorResponseHandler = d.defaultErrorsResponseHandler, this.httpClient = jr.create({
|
|
1031
1031
|
headers: {
|
|
1032
1032
|
"APP-VERSION": `${r.name} (${r.version}, ${U(r.date, D.getConfig().dateFormats.uiDate)})`,
|
|
1033
1033
|
Accept: "application/json",
|
|
@@ -1038,7 +1038,7 @@ const L = class L {
|
|
|
1038
1038
|
(e) => Promise.reject(e)
|
|
1039
1039
|
), this.interceptorIds.response.convertHttpErrorResponseInterceptor = this.httpClient.interceptors.response.use(
|
|
1040
1040
|
(e) => e,
|
|
1041
|
-
(e) =>
|
|
1041
|
+
(e) => d.convertHttpErrorResponse(e)
|
|
1042
1042
|
), this.interceptorIds.response.authErrorsResponseInterceptor = this.httpClient.interceptors.response.use((e) => e, this.authErrorsResponseInterceptors), this.interceptorIds.response.dataConverterResponseInterceptor = this.httpClient.interceptors.response.use(
|
|
1043
1043
|
this.dataConverterResponseInterceptor,
|
|
1044
1044
|
(e) => Promise.reject(e)
|
|
@@ -1050,7 +1050,7 @@ const L = class L {
|
|
|
1050
1050
|
* @param handler Ссылка на функцию-обработчик ошибок.
|
|
1051
1051
|
*/
|
|
1052
1052
|
static setDefaultErrorsResponseHandler(r) {
|
|
1053
|
-
|
|
1053
|
+
d.defaultErrorsResponseHandler = r;
|
|
1054
1054
|
}
|
|
1055
1055
|
/**
|
|
1056
1056
|
* Возвращает экземпляр объекта текущего класса.
|
|
@@ -1058,7 +1058,7 @@ const L = class L {
|
|
|
1058
1058
|
* @param type Тип данных, которыми оперирует метод.
|
|
1059
1059
|
*/
|
|
1060
1060
|
static getInstance(r) {
|
|
1061
|
-
return Object.prototype.hasOwnProperty.call(
|
|
1061
|
+
return Object.prototype.hasOwnProperty.call(d.instances, r.name) || (d.instances[r.name] = Fe.simpleInstanceInitializer(r)), d.instances[r.name];
|
|
1062
1062
|
}
|
|
1063
1063
|
/**
|
|
1064
1064
|
* Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
|
|
@@ -1156,15 +1156,15 @@ const L = class L {
|
|
|
1156
1156
|
* Экземпляр объекта текущего класса.
|
|
1157
1157
|
*/
|
|
1158
1158
|
// eslint-disable-next-line no-use-before-define
|
|
1159
|
-
t(
|
|
1159
|
+
t(d, "instances", {}), /**
|
|
1160
1160
|
* Базовый обработчик ошибок выполнения запросов.
|
|
1161
1161
|
*
|
|
1162
1162
|
* @param error Данные об ошибке.
|
|
1163
1163
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
1164
1164
|
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1165
1165
|
*/
|
|
1166
|
-
t(
|
|
1167
|
-
let h =
|
|
1166
|
+
t(d, "defaultErrorsResponseHandler", y);
|
|
1167
|
+
let h = d;
|
|
1168
1168
|
class Ot extends h {
|
|
1169
1169
|
/**
|
|
1170
1170
|
* Возвращает содержимое корзины указанного клиента.
|
|
@@ -1312,7 +1312,7 @@ class lr extends b {
|
|
|
1312
1312
|
* Дата и время последнего изменения.
|
|
1313
1313
|
*/
|
|
1314
1314
|
t(this, "updatedAt");
|
|
1315
|
-
this.updatedAt = w(e == null ? void 0 : e.updatedAt) ?
|
|
1315
|
+
this.updatedAt = w(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e == null ? void 0 : e.updatedAt;
|
|
1316
1316
|
}
|
|
1317
1317
|
}
|
|
1318
1318
|
class Vr extends lr {
|
|
@@ -1327,7 +1327,7 @@ class Vr extends lr {
|
|
|
1327
1327
|
* Дата и время последнего удаления.
|
|
1328
1328
|
*/
|
|
1329
1329
|
t(this, "deletedAt");
|
|
1330
|
-
this.deletedAt = w(e == null ? void 0 : e.deletedAt) ?
|
|
1330
|
+
this.deletedAt = w(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1331
1331
|
}
|
|
1332
1332
|
}
|
|
1333
1333
|
class F extends b {
|
|
@@ -1381,7 +1381,7 @@ class Kr extends b {
|
|
|
1381
1381
|
* Дата и время удаления.
|
|
1382
1382
|
*/
|
|
1383
1383
|
t(this, "deletedAt");
|
|
1384
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = w(e == null ? void 0 : e.publishedAt) ?
|
|
1384
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = w(e == null ? void 0 : e.publishedAt) ? C(e.publishedAt) : e == null ? void 0 : e.publishedAt, this.description = (e == null ? void 0 : e.description) ?? void 0, this.percent = (e == null ? void 0 : e.percent) ?? 0, this.owner = new F(e == null ? void 0 : e.owner), this.deletedAt = w(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1385
1385
|
}
|
|
1386
1386
|
}
|
|
1387
1387
|
class W extends lr {
|
|
@@ -1400,7 +1400,7 @@ class W extends lr {
|
|
|
1400
1400
|
* Дата и время создания шаблона.
|
|
1401
1401
|
*/
|
|
1402
1402
|
t(this, "createdAt");
|
|
1403
|
-
this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = w(e == null ? void 0 : e.createdAt) ?
|
|
1403
|
+
this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = w(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
|
|
1404
1404
|
}
|
|
1405
1405
|
}
|
|
1406
1406
|
class Z extends x {
|
|
@@ -1460,7 +1460,7 @@ class Qr {
|
|
|
1460
1460
|
this.phone = /^\d+$/.test(r.phone ?? "") ? `+${r.phone}` : r.phone, this.email = r.email;
|
|
1461
1461
|
}
|
|
1462
1462
|
}
|
|
1463
|
-
class N extends
|
|
1463
|
+
class N extends P {
|
|
1464
1464
|
}
|
|
1465
1465
|
class ce extends b {
|
|
1466
1466
|
/**
|
|
@@ -1471,22 +1471,26 @@ class ce extends b {
|
|
|
1471
1471
|
constructor(e) {
|
|
1472
1472
|
super(e);
|
|
1473
1473
|
/**
|
|
1474
|
-
*
|
|
1474
|
+
* @inheritDoc
|
|
1475
1475
|
*/
|
|
1476
|
-
t(this, "salesDirection"
|
|
1476
|
+
t(this, "salesDirection");
|
|
1477
1477
|
/**
|
|
1478
|
-
*
|
|
1478
|
+
* @inheritDoc
|
|
1479
1479
|
*/
|
|
1480
1480
|
t(this, "photo");
|
|
1481
1481
|
/**
|
|
1482
|
-
*
|
|
1482
|
+
* @inheritDoc
|
|
1483
1483
|
*/
|
|
1484
1484
|
t(this, "contacts");
|
|
1485
1485
|
/**
|
|
1486
|
-
*
|
|
1486
|
+
* @inheritDoc
|
|
1487
1487
|
*/
|
|
1488
1488
|
t(this, "isDefault");
|
|
1489
|
-
|
|
1489
|
+
/**
|
|
1490
|
+
* @inheritDoc
|
|
1491
|
+
*/
|
|
1492
|
+
t(this, "isRegionalDirector");
|
|
1493
|
+
this.salesDirection = e != null && e.salesDirection ? new N(e.salesDirection) : new N(), this.photo = e == null ? void 0 : e.photo, this.contacts = e != null && e.contacts ? new Qr(e.contacts) : void 0, this.isDefault = (e == null ? void 0 : e.isDefault) ?? !1, this.isRegionalDirector = (e == null ? void 0 : e.isRegionalDirector) ?? !1;
|
|
1490
1494
|
}
|
|
1491
1495
|
}
|
|
1492
1496
|
class Yr extends b {
|
|
@@ -1613,7 +1617,7 @@ class pr {
|
|
|
1613
1617
|
* Процент, который прибавляется к значению выбранного коэффициента.
|
|
1614
1618
|
*/
|
|
1615
1619
|
t(this, "increasePercent");
|
|
1616
|
-
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new
|
|
1620
|
+
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new ae(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
|
|
1617
1621
|
}
|
|
1618
1622
|
}
|
|
1619
1623
|
class Te extends pr {
|
|
@@ -1631,9 +1635,9 @@ class Te extends pr {
|
|
|
1631
1635
|
this.productCategory = new ge(e == null ? void 0 : e.productCategory);
|
|
1632
1636
|
}
|
|
1633
1637
|
}
|
|
1634
|
-
class ee extends
|
|
1638
|
+
class ee extends P {
|
|
1635
1639
|
}
|
|
1636
|
-
class le extends
|
|
1640
|
+
class le extends P {
|
|
1637
1641
|
/**
|
|
1638
1642
|
* Инициализирует экземпляр класса {@link Region}.
|
|
1639
1643
|
*
|
|
@@ -1648,7 +1652,7 @@ class le extends v {
|
|
|
1648
1652
|
e && (this.country = new ee(e.country));
|
|
1649
1653
|
}
|
|
1650
1654
|
}
|
|
1651
|
-
class Me extends
|
|
1655
|
+
class Me extends P {
|
|
1652
1656
|
/**
|
|
1653
1657
|
* Инициализирует экземпляр класса {@link CityWithRegionAndCountry}.
|
|
1654
1658
|
*
|
|
@@ -1699,7 +1703,7 @@ class ur extends b {
|
|
|
1699
1703
|
* Признак активности учетной записи пользователя.
|
|
1700
1704
|
*/
|
|
1701
1705
|
t(this, "isActive");
|
|
1702
|
-
this.phone = /^\d+$/.test((e == null ? void 0 : e.phone) ?? "") ? `+${e == null ? void 0 : e.phone}` : (e == null ? void 0 : e.phone) ?? "", this.email = (e == null ? void 0 : e.email) ?? "", this.getNews = (e == null ? void 0 : e.getNews) ?? !1, this.salesDirection = e != null && e.salesDirection ? new N(e.salesDirection) : void 0, this.createdAt = w(e == null ? void 0 : e.createdAt) ?
|
|
1706
|
+
this.phone = /^\d+$/.test((e == null ? void 0 : e.phone) ?? "") ? `+${e == null ? void 0 : e.phone}` : (e == null ? void 0 : e.phone) ?? "", this.email = (e == null ? void 0 : e.email) ?? "", this.getNews = (e == null ? void 0 : e.getNews) ?? !1, this.salesDirection = e != null && e.salesDirection ? new N(e.salesDirection) : void 0, this.createdAt = w(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = w(e == null ? void 0 : e.lastLoginAt) ? C(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
|
|
1703
1707
|
}
|
|
1704
1708
|
}
|
|
1705
1709
|
class me extends ur {
|
|
@@ -1771,7 +1775,7 @@ class se extends H {
|
|
|
1771
1775
|
* Данные шаблона прайс-листа.
|
|
1772
1776
|
*/
|
|
1773
1777
|
t(this, "priceTemplate");
|
|
1774
|
-
this.createdAt = w(e == null ? void 0 : e.createdAt) ?
|
|
1778
|
+
this.createdAt = w(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = w(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new me(e == null ? void 0 : e.client), this.priceTemplate = new W(e == null ? void 0 : e.priceTemplate);
|
|
1775
1779
|
}
|
|
1776
1780
|
}
|
|
1777
1781
|
class be extends pr {
|
|
@@ -1789,7 +1793,7 @@ class be extends pr {
|
|
|
1789
1793
|
this.product = new x(e == null ? void 0 : e.product);
|
|
1790
1794
|
}
|
|
1791
1795
|
}
|
|
1792
|
-
class hr extends
|
|
1796
|
+
class hr extends P {
|
|
1793
1797
|
}
|
|
1794
1798
|
class ie extends b {
|
|
1795
1799
|
/**
|
|
@@ -1848,7 +1852,7 @@ class O {
|
|
|
1848
1852
|
* Окончание периода.
|
|
1849
1853
|
*/
|
|
1850
1854
|
t(this, "to");
|
|
1851
|
-
this.from = w(r == null ? void 0 : r.from) ?
|
|
1855
|
+
this.from = w(r == null ? void 0 : r.from) ? C(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = w(r == null ? void 0 : r.to) ? C(r.to) : (r == null ? void 0 : r.to) ?? null;
|
|
1852
1856
|
}
|
|
1853
1857
|
}
|
|
1854
1858
|
class Ut {
|
|
@@ -1969,7 +1973,7 @@ class We {
|
|
|
1969
1973
|
* Минимальный коэффициент цены.
|
|
1970
1974
|
*/
|
|
1971
1975
|
t(this, "minCoefficient");
|
|
1972
|
-
this.role = new ne(r == null ? void 0 : r.role), this.category = new ge(r == null ? void 0 : r.category), this.minCoefficient = new
|
|
1976
|
+
this.role = new ne(r == null ? void 0 : r.role), this.category = new ge(r == null ? void 0 : r.category), this.minCoefficient = new ae(r == null ? void 0 : r.minCoefficient);
|
|
1973
1977
|
}
|
|
1974
1978
|
}
|
|
1975
1979
|
class Zr {
|
|
@@ -2088,7 +2092,7 @@ class tt {
|
|
|
2088
2092
|
* Текущая версия приложения.
|
|
2089
2093
|
*/
|
|
2090
2094
|
t(this, "version");
|
|
2091
|
-
this.date = w(r == null ? void 0 : r.date) ?
|
|
2095
|
+
this.date = w(r == null ? void 0 : r.date) ? C(r.date) : (r == null ? void 0 : r.date) ?? /* @__PURE__ */ new Date(), this.name = (r == null ? void 0 : r.name) ?? "", this.version = (r == null ? void 0 : r.version) ?? "0.0.0";
|
|
2092
2096
|
}
|
|
2093
2097
|
}
|
|
2094
2098
|
class st {
|
|
@@ -2579,7 +2583,7 @@ class Mt extends h {
|
|
|
2579
2583
|
getCategoryProductsCoefficients(r) {
|
|
2580
2584
|
return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
|
|
2581
2585
|
const { data: s } = e;
|
|
2582
|
-
return
|
|
2586
|
+
return Ir(s, (i) => i.map((o) => new Ge(o))), s;
|
|
2583
2587
|
});
|
|
2584
2588
|
}
|
|
2585
2589
|
/**
|
|
@@ -2763,7 +2767,7 @@ class Je {
|
|
|
2763
2767
|
field: this.field,
|
|
2764
2768
|
op: this.op
|
|
2765
2769
|
};
|
|
2766
|
-
return r.value =
|
|
2770
|
+
return r.value = ke(this.value) ? U(this.value, D.getConfig().dateFormats.api) : this.value, r;
|
|
2767
2771
|
}
|
|
2768
2772
|
}
|
|
2769
2773
|
class pe {
|
|
@@ -3507,16 +3511,16 @@ function Ke(n) {
|
|
|
3507
3511
|
}
|
|
3508
3512
|
}), r;
|
|
3509
3513
|
}
|
|
3510
|
-
var it = /* @__PURE__ */ ((n) => (n.LastOrder = "last_order", n.Contacts = "contacts", n.PartnerGroups = "partner_groups", n.PreferredDeliveryType = "preferred_delivery_type", n.SalesDirection = "sales_direction", n.Managers = "managers", n))(it || {}),
|
|
3511
|
-
class nt extends
|
|
3514
|
+
var it = /* @__PURE__ */ ((n) => (n.LastOrder = "last_order", n.Contacts = "contacts", n.PartnerGroups = "partner_groups", n.PreferredDeliveryType = "preferred_delivery_type", n.SalesDirection = "sales_direction", n.Managers = "managers", n))(it || {}), L = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(L || {});
|
|
3515
|
+
class nt extends P {
|
|
3512
3516
|
}
|
|
3513
|
-
class gr extends
|
|
3517
|
+
class gr extends P {
|
|
3514
3518
|
}
|
|
3515
|
-
class Vt extends
|
|
3519
|
+
class Vt extends P {
|
|
3516
3520
|
}
|
|
3517
|
-
class ot extends
|
|
3521
|
+
class ot extends P {
|
|
3518
3522
|
}
|
|
3519
|
-
class
|
|
3523
|
+
class Ce extends b {
|
|
3520
3524
|
/**
|
|
3521
3525
|
* Инициализирует экземпляр класса {@link Currency}.
|
|
3522
3526
|
*
|
|
@@ -3535,7 +3539,7 @@ class ae extends b {
|
|
|
3535
3539
|
e && (this.signature = e.signature ?? "", this.symbol = e.symbol ?? "");
|
|
3536
3540
|
}
|
|
3537
3541
|
}
|
|
3538
|
-
class j extends
|
|
3542
|
+
class j extends P {
|
|
3539
3543
|
/**
|
|
3540
3544
|
* Возвращает сгенерированную запись-описание физического лица.
|
|
3541
3545
|
*/
|
|
@@ -3543,24 +3547,24 @@ class j extends v {
|
|
|
3543
3547
|
return new j({
|
|
3544
3548
|
id: 1,
|
|
3545
3549
|
guid: "",
|
|
3546
|
-
slug:
|
|
3550
|
+
slug: L.Person,
|
|
3547
3551
|
name: ""
|
|
3548
3552
|
});
|
|
3549
3553
|
}
|
|
3550
3554
|
}
|
|
3551
|
-
class ct extends
|
|
3555
|
+
class ct extends P {
|
|
3552
3556
|
}
|
|
3553
|
-
class lt extends
|
|
3557
|
+
class lt extends P {
|
|
3554
3558
|
}
|
|
3555
|
-
class re extends
|
|
3559
|
+
class re extends P {
|
|
3556
3560
|
}
|
|
3557
|
-
class pt extends
|
|
3561
|
+
class pt extends P {
|
|
3558
3562
|
}
|
|
3559
|
-
class ut extends
|
|
3563
|
+
class ut extends P {
|
|
3560
3564
|
}
|
|
3561
|
-
class mr extends
|
|
3565
|
+
class mr extends P {
|
|
3562
3566
|
}
|
|
3563
|
-
class fr extends
|
|
3567
|
+
class fr extends P {
|
|
3564
3568
|
}
|
|
3565
3569
|
class xe extends H {
|
|
3566
3570
|
/**
|
|
@@ -3589,8 +3593,8 @@ class xe extends H {
|
|
|
3589
3593
|
/**
|
|
3590
3594
|
* Данные о валюте.
|
|
3591
3595
|
*/
|
|
3592
|
-
t(this, "currency", new
|
|
3593
|
-
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new
|
|
3596
|
+
t(this, "currency", new Ce());
|
|
3597
|
+
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new Ce(e.currency));
|
|
3594
3598
|
}
|
|
3595
3599
|
}
|
|
3596
3600
|
class Ne extends b {
|
|
@@ -3644,7 +3648,7 @@ class M extends Ne {
|
|
|
3644
3648
|
* Дата и время последнего удаления.
|
|
3645
3649
|
*/
|
|
3646
3650
|
t(this, "deletedAt");
|
|
3647
|
-
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1, this.position = e == null ? void 0 : e.position, this.notDisturb = (e == null ? void 0 : e.notDisturb) ?? !1, this.comment = e == null ? void 0 : e.comment, this.updatedAt = e == null ? void 0 : e.updatedAt, this.deletedAt = w(e == null ? void 0 : e.deletedAt) ?
|
|
3651
|
+
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1, this.position = e == null ? void 0 : e.position, this.notDisturb = (e == null ? void 0 : e.notDisturb) ?? !1, this.comment = e == null ? void 0 : e.comment, this.updatedAt = e == null ? void 0 : e.updatedAt, this.deletedAt = w(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
3648
3652
|
}
|
|
3649
3653
|
}
|
|
3650
3654
|
class yr extends b {
|
|
@@ -3705,7 +3709,7 @@ class yr extends b {
|
|
|
3705
3709
|
*/
|
|
3706
3710
|
t(this, "updater");
|
|
3707
3711
|
if (e) {
|
|
3708
|
-
if (this.opf = new j(e.opf), this.salesDirection = new N(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = w(e == null ? void 0 : e.createdAt) ?
|
|
3712
|
+
if (this.opf = new j(e.opf), this.salesDirection = new N(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = w(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e.createdAt, this.creator = e.creator ? new F(e.creator) : void 0, this.updatedAt = w(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new F(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new re(e.partnerGroup)), e.manager && (this.manager = new ce(e.manager)), e.contacts) {
|
|
3709
3713
|
const s = [];
|
|
3710
3714
|
e.contacts.forEach((i) => {
|
|
3711
3715
|
s.push(new M(i));
|
|
@@ -3773,7 +3777,7 @@ class wr extends yr {
|
|
|
3773
3777
|
e && (this.inn = e.inn ?? "", this.okpo = e.okpo ?? "", this.directorName = e.directorName ?? "", this.directorPosition = e.directorPosition ?? "", this.directorActsOn = e.directorActsOn ?? "", this.legalAddress = e.legalAddress ?? "", this.postalAddress = e.postalAddress ?? "", this.actualAddress = e.actualAddress ?? "");
|
|
3774
3778
|
}
|
|
3775
3779
|
}
|
|
3776
|
-
class
|
|
3780
|
+
class Cr extends wr {
|
|
3777
3781
|
/**
|
|
3778
3782
|
* Инициализирует экземпляр класса {@link ContragentUlR}.
|
|
3779
3783
|
*
|
|
@@ -3788,7 +3792,7 @@ class ar extends wr {
|
|
|
3788
3792
|
e && (this.kpp = e.kpp ?? "");
|
|
3789
3793
|
}
|
|
3790
3794
|
}
|
|
3791
|
-
class gt extends
|
|
3795
|
+
class gt extends Cr {
|
|
3792
3796
|
/**
|
|
3793
3797
|
* Инициализирует экземпляр класса {@link ContragentUlNr}.
|
|
3794
3798
|
*
|
|
@@ -3811,7 +3815,7 @@ class gt extends ar {
|
|
|
3811
3815
|
e && (this.registrationCountry = new ee(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
|
|
3812
3816
|
}
|
|
3813
3817
|
}
|
|
3814
|
-
class
|
|
3818
|
+
class ve {
|
|
3815
3819
|
/**
|
|
3816
3820
|
* Инициализирует и возвращает экземпляр класса с данными о контрагенте.
|
|
3817
3821
|
*
|
|
@@ -3819,11 +3823,11 @@ class Ce {
|
|
|
3819
3823
|
*/
|
|
3820
3824
|
static createInstance(r) {
|
|
3821
3825
|
switch (r.opf.slug) {
|
|
3822
|
-
case
|
|
3826
|
+
case L.Ic:
|
|
3823
3827
|
return new wr(r);
|
|
3824
|
-
case
|
|
3825
|
-
return new
|
|
3826
|
-
case
|
|
3828
|
+
case L.UlR:
|
|
3829
|
+
return new Cr(r);
|
|
3830
|
+
case L.UlNr:
|
|
3827
3831
|
return new gt(r);
|
|
3828
3832
|
default:
|
|
3829
3833
|
return new ht(r);
|
|
@@ -3873,7 +3877,7 @@ class mt extends M {
|
|
|
3873
3877
|
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new Se(s))), e.relations.clients && (this.relations.clients = e.relations.clients.map((s) => new Se(s))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((s) => new Se(s))));
|
|
3874
3878
|
}
|
|
3875
3879
|
}
|
|
3876
|
-
class
|
|
3880
|
+
class Pe extends Vr {
|
|
3877
3881
|
/**
|
|
3878
3882
|
* Инициализирует экземпляр класса {@link DeliveryAddress}.
|
|
3879
3883
|
*
|
|
@@ -3967,7 +3971,7 @@ class Qe extends me {
|
|
|
3967
3971
|
* Дополнительные данные о клиенте.
|
|
3968
3972
|
*/
|
|
3969
3973
|
t(this, "extraData");
|
|
3970
|
-
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((p) =>
|
|
3974
|
+
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((p) => ve.createInstance(p))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((p) => new re(p))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((p) => new M(p))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((p) => new Pe(p))) ?? [], this.channelPrimaryInterest = new gr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new fr(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new X(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.isExcludedFromMsCallsToClients = (e == null ? void 0 : e.isExcludedFromMsCallsToClients) ?? !1, this.preferredWarehouse = e != null && e.preferredWarehouse ? new Re(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
|
|
3971
3975
|
}
|
|
3972
3976
|
}
|
|
3973
3977
|
class Kt {
|
|
@@ -4144,7 +4148,7 @@ class Kt {
|
|
|
4144
4148
|
}), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((s = r == null ? void 0 : r.createdAt) != null && s.to) && delete r.createdAt, !((i = r == null ? void 0 : r.lastLoginDate) != null && i.from) && !((o = r == null ? void 0 : r.lastLoginDate) != null && o.to) && delete r.lastLoginDate, r;
|
|
4145
4149
|
}
|
|
4146
4150
|
}
|
|
4147
|
-
class
|
|
4151
|
+
class vr extends H {
|
|
4148
4152
|
/**
|
|
4149
4153
|
* Инициализирует экземпляр класса {@link OrderShortInfo}.
|
|
4150
4154
|
*
|
|
@@ -4164,7 +4168,7 @@ class Cr extends H {
|
|
|
4164
4168
|
* Признак того, что заказ подтвержден в 1С.
|
|
4165
4169
|
*/
|
|
4166
4170
|
t(this, "isApproved1c");
|
|
4167
|
-
this.createdAt = w(e == null ? void 0 : e.createdAt) ?
|
|
4171
|
+
this.createdAt = w(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new F(e == null ? void 0 : e.creator), this.isApproved1c = (e == null ? void 0 : e.isApproved1c) ?? !1;
|
|
4168
4172
|
}
|
|
4169
4173
|
}
|
|
4170
4174
|
class ft extends b {
|
|
@@ -4200,7 +4204,7 @@ class ft extends b {
|
|
|
4200
4204
|
* Список менеджеров.
|
|
4201
4205
|
*/
|
|
4202
4206
|
t(this, "managers");
|
|
4203
|
-
(s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new M(o))), e.lastOrder && (this.lastOrder = new
|
|
4207
|
+
(s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new M(o))), e.lastOrder && (this.lastOrder = new vr(e.lastOrder)), (i = e.partnerGroups) != null && i.length && (this.partnerGroups = e.partnerGroups.map((o) => new re(o))), e.preferredDeliveryType && (this.preferredDeliveryType = new X(e.preferredDeliveryType)), e.salesDirection && (this.salesDirection = new N(e.salesDirection)), e.managers && (this.managers = e.managers.map((o) => new ce(o)));
|
|
4204
4208
|
}
|
|
4205
4209
|
}
|
|
4206
4210
|
class yt {
|
|
@@ -4472,11 +4476,11 @@ class Xt extends De {
|
|
|
4472
4476
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_create
|
|
4473
4477
|
*/
|
|
4474
4478
|
createContragentClientData(r, e, s = {}) {
|
|
4475
|
-
var u, m,
|
|
4479
|
+
var u, m, v, $, I, k, S, _;
|
|
4476
4480
|
let i;
|
|
4477
4481
|
const o = e, c = e, p = e;
|
|
4478
4482
|
switch (e.opf.slug) {
|
|
4479
|
-
case
|
|
4483
|
+
case L.Ic:
|
|
4480
4484
|
i = {
|
|
4481
4485
|
opf: o.opf.slug,
|
|
4482
4486
|
name: o.name,
|
|
@@ -4494,12 +4498,12 @@ class Xt extends De {
|
|
|
4494
4498
|
actual_address: o.actualAddress
|
|
4495
4499
|
};
|
|
4496
4500
|
break;
|
|
4497
|
-
case
|
|
4501
|
+
case L.UlR:
|
|
4498
4502
|
i = {
|
|
4499
4503
|
opf: c.opf.slug,
|
|
4500
4504
|
name: c.name,
|
|
4501
4505
|
alternative_name: c.alternativeName,
|
|
4502
|
-
partner_group_id: (
|
|
4506
|
+
partner_group_id: (v = c.partnerGroup) == null ? void 0 : v.id,
|
|
4503
4507
|
manager_id: ($ = c.manager) == null ? void 0 : $.id,
|
|
4504
4508
|
comment: c.comment,
|
|
4505
4509
|
inn: c.inn,
|
|
@@ -4513,13 +4517,13 @@ class Xt extends De {
|
|
|
4513
4517
|
actual_address: c.actualAddress
|
|
4514
4518
|
};
|
|
4515
4519
|
break;
|
|
4516
|
-
case
|
|
4520
|
+
case L.UlNr:
|
|
4517
4521
|
i = {
|
|
4518
4522
|
opf: p.opf.slug,
|
|
4519
4523
|
name: p.name,
|
|
4520
4524
|
alternative_name: p.alternativeName,
|
|
4521
|
-
partner_group_id: (
|
|
4522
|
-
manager_id: (
|
|
4525
|
+
partner_group_id: (I = p.partnerGroup) == null ? void 0 : I.id,
|
|
4526
|
+
manager_id: (k = p.manager) == null ? void 0 : k.id,
|
|
4523
4527
|
comment: p.comment,
|
|
4524
4528
|
director_name: p.directorName,
|
|
4525
4529
|
director_position: p.directorPosition,
|
|
@@ -4546,7 +4550,7 @@ class Xt extends De {
|
|
|
4546
4550
|
return this.post(
|
|
4547
4551
|
`/internal/clients/${r}/contragents`,
|
|
4548
4552
|
i,
|
|
4549
|
-
(q) =>
|
|
4553
|
+
(q) => ve.createInstance(q.data),
|
|
4550
4554
|
s
|
|
4551
4555
|
);
|
|
4552
4556
|
}
|
|
@@ -4561,11 +4565,11 @@ class Xt extends De {
|
|
|
4561
4565
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_update
|
|
4562
4566
|
*/
|
|
4563
4567
|
updateContragentClientData(r, e, s = {}) {
|
|
4564
|
-
var u, m,
|
|
4568
|
+
var u, m, v, $, I, k, S, _;
|
|
4565
4569
|
let i;
|
|
4566
4570
|
const o = e, c = e, p = e;
|
|
4567
4571
|
switch (e.opf.slug) {
|
|
4568
|
-
case
|
|
4572
|
+
case L.Ic:
|
|
4569
4573
|
i = {
|
|
4570
4574
|
opf: o.opf.slug,
|
|
4571
4575
|
name: o.name,
|
|
@@ -4583,12 +4587,12 @@ class Xt extends De {
|
|
|
4583
4587
|
actual_address: o.actualAddress
|
|
4584
4588
|
};
|
|
4585
4589
|
break;
|
|
4586
|
-
case
|
|
4590
|
+
case L.UlR:
|
|
4587
4591
|
i = {
|
|
4588
4592
|
opf: c.opf.slug,
|
|
4589
4593
|
name: c.name,
|
|
4590
4594
|
alternative_name: c.alternativeName,
|
|
4591
|
-
partner_group_id: (
|
|
4595
|
+
partner_group_id: (v = c.partnerGroup) == null ? void 0 : v.id,
|
|
4592
4596
|
manager_id: ($ = c.manager) == null ? void 0 : $.id,
|
|
4593
4597
|
comment: c.comment,
|
|
4594
4598
|
inn: c.inn,
|
|
@@ -4602,13 +4606,13 @@ class Xt extends De {
|
|
|
4602
4606
|
actual_address: c.actualAddress
|
|
4603
4607
|
};
|
|
4604
4608
|
break;
|
|
4605
|
-
case
|
|
4609
|
+
case L.UlNr:
|
|
4606
4610
|
i = {
|
|
4607
4611
|
opf: p.opf.slug,
|
|
4608
4612
|
name: p.name,
|
|
4609
4613
|
alternative_name: p.alternativeName,
|
|
4610
|
-
partner_group_id: (
|
|
4611
|
-
manager_id: (
|
|
4614
|
+
partner_group_id: (I = p.partnerGroup) == null ? void 0 : I.id,
|
|
4615
|
+
manager_id: (k = p.manager) == null ? void 0 : k.id,
|
|
4612
4616
|
comment: p.comment,
|
|
4613
4617
|
director_name: p.directorName,
|
|
4614
4618
|
director_position: p.directorPosition,
|
|
@@ -4635,7 +4639,7 @@ class Xt extends De {
|
|
|
4635
4639
|
return this.patch(
|
|
4636
4640
|
`/internal/clients/${r}/contragents/${e.id}`,
|
|
4637
4641
|
i,
|
|
4638
|
-
(q) =>
|
|
4642
|
+
(q) => ve.createInstance(q.data),
|
|
4639
4643
|
s
|
|
4640
4644
|
);
|
|
4641
4645
|
}
|
|
@@ -4673,7 +4677,7 @@ class Xt extends De {
|
|
|
4673
4677
|
}), e.operatingHours && (i.operating_hours = {
|
|
4674
4678
|
from: e.operatingHours.from,
|
|
4675
4679
|
to: e.operatingHours.to
|
|
4676
|
-
}), this.post(`/internal/clients/${r}/delivery-addresses`, i, (p) => new
|
|
4680
|
+
}), this.post(`/internal/clients/${r}/delivery-addresses`, i, (p) => new Pe(p.data), s);
|
|
4677
4681
|
}
|
|
4678
4682
|
/**
|
|
4679
4683
|
* Обновляет данные об адресе доставки клиента.
|
|
@@ -4702,7 +4706,7 @@ class Xt extends De {
|
|
|
4702
4706
|
}), this.patch(
|
|
4703
4707
|
`/internal/clients/${r}/delivery-addresses/${e.id}`,
|
|
4704
4708
|
i,
|
|
4705
|
-
(p) => new
|
|
4709
|
+
(p) => new Pe(p.data),
|
|
4706
4710
|
s
|
|
4707
4711
|
);
|
|
4708
4712
|
}
|
|
@@ -5029,7 +5033,7 @@ const V = class V extends h {
|
|
|
5029
5033
|
*/
|
|
5030
5034
|
cacheResponse(e, s) {
|
|
5031
5035
|
V.responseDataCache.set(e, {
|
|
5032
|
-
validTo:
|
|
5036
|
+
validTo: kr(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
|
|
5033
5037
|
val: s
|
|
5034
5038
|
});
|
|
5035
5039
|
}
|
|
@@ -5046,7 +5050,7 @@ const V = class V extends h {
|
|
|
5046
5050
|
getTypedDataArrayRequester(e, s, i = !1, o = {}) {
|
|
5047
5051
|
const c = s + (Y(o) ? "" : ` >>> ${JSON.stringify(o)}`), p = i ? V.getCachedResponse(c) : void 0;
|
|
5048
5052
|
return p ? Promise.resolve(p) : this.get(s, o).then((u) => {
|
|
5049
|
-
const m = u.map((
|
|
5053
|
+
const m = u.map((v) => Fe.instanceInitializer(e, v));
|
|
5050
5054
|
return i && m && this.cacheResponse(s, m), m;
|
|
5051
5055
|
});
|
|
5052
5056
|
}
|
|
@@ -5146,13 +5150,13 @@ class rs {
|
|
|
5146
5150
|
* Возвращает диапазон дат по умолчанию.
|
|
5147
5151
|
*/
|
|
5148
5152
|
static defaultDateRanges() {
|
|
5149
|
-
const r =
|
|
5153
|
+
const r = Lr(/* @__PURE__ */ new Date(), 1);
|
|
5150
5154
|
return {
|
|
5151
5155
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
5152
5156
|
nextWorkingDay: { label: "Следующий рабочий день", from: Gr(r), to: qr(r) },
|
|
5153
|
-
today: { label: "Сегодня", from:
|
|
5157
|
+
today: { label: "Сегодня", from: Le(), to: Ur() },
|
|
5154
5158
|
yesterday: { label: "Вчера", from: Or(), to: Nr() },
|
|
5155
|
-
tomorrow: { label: "Завтра", from: xr(), to:
|
|
5159
|
+
tomorrow: { label: "Завтра", from: xr(), to: dr() }
|
|
5156
5160
|
};
|
|
5157
5161
|
}
|
|
5158
5162
|
}
|
|
@@ -5225,14 +5229,14 @@ class wt extends ue {
|
|
|
5225
5229
|
return this.cacheResponse(r, i), i;
|
|
5226
5230
|
}
|
|
5227
5231
|
}
|
|
5228
|
-
class
|
|
5232
|
+
class Pr extends vr {
|
|
5229
5233
|
/**
|
|
5230
5234
|
* Инициализирует экземпляр класса {@link OrderInfo}.
|
|
5231
5235
|
*
|
|
5232
5236
|
* @param data Данные для первоначальной инициализации.
|
|
5233
5237
|
*/
|
|
5234
5238
|
constructor(e) {
|
|
5235
|
-
var s, i, o, c, p, u, m,
|
|
5239
|
+
var s, i, o, c, p, u, m, v;
|
|
5236
5240
|
super(e);
|
|
5237
5241
|
/**
|
|
5238
5242
|
* Краткие данные о клиенте.
|
|
@@ -5280,13 +5284,13 @@ class vr extends Cr {
|
|
|
5280
5284
|
onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
|
|
5281
5285
|
}, this.delivery = {
|
|
5282
5286
|
type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
|
|
5283
|
-
date: w((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ?
|
|
5284
|
-
address: (m = e == null ? void 0 : e.delivery) != null && m.address ? new
|
|
5285
|
-
warehouse: (
|
|
5286
|
-
}, this.attachedUser = new F(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new N(e == null ? void 0 : e.salesDirection), this.pendingAt = w(e == null ? void 0 : e.pendingAt) ?
|
|
5287
|
+
date: w((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ? C(e.delivery.date) : ((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ?? /* @__PURE__ */ new Date(),
|
|
5288
|
+
address: (m = e == null ? void 0 : e.delivery) != null && m.address ? new Pe(e.delivery.address) : void 0,
|
|
5289
|
+
warehouse: (v = e == null ? void 0 : e.delivery) != null && v.warehouse ? new Re(e.delivery.warehouse) : void 0
|
|
5290
|
+
}, this.attachedUser = new F(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new N(e == null ? void 0 : e.salesDirection), this.pendingAt = w(e == null ? void 0 : e.pendingAt) ? C(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = w(e == null ? void 0 : e.processedAt) ? C(e.processedAt) : e == null ? void 0 : e.processedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1;
|
|
5287
5291
|
}
|
|
5288
5292
|
}
|
|
5289
|
-
class
|
|
5293
|
+
class Ct extends H {
|
|
5290
5294
|
/**
|
|
5291
5295
|
* Инициализирует экземпляр класса {@link OrderProduct}.
|
|
5292
5296
|
*
|
|
@@ -5369,7 +5373,7 @@ class at extends H {
|
|
|
5369
5373
|
this.product = new Z(e.product), this.quantity = e.quantity, this.currency = e.currency, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.cost = e.cost, this.costRub = e.costRub, this.marker = e.marker, this.height = e.height, this.length = e.length, this.width = e.width, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams, this.sawing = e.sawing;
|
|
5370
5374
|
}
|
|
5371
5375
|
}
|
|
5372
|
-
class
|
|
5376
|
+
class vt extends Pr {
|
|
5373
5377
|
/**
|
|
5374
5378
|
* Инициализирует экземпляр класса {@link Order}.
|
|
5375
5379
|
*
|
|
@@ -5409,7 +5413,7 @@ class Ct extends vr {
|
|
|
5409
5413
|
* Признак, что разрешена передача заказа в работу без оплаты.
|
|
5410
5414
|
*/
|
|
5411
5415
|
t(this, "isAllowProcessingWithoutPayment");
|
|
5412
|
-
this.products = (e.products ?? []).map((s) => new
|
|
5416
|
+
this.products = (e.products ?? []).map((s) => new Ct(s)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? ve.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new P(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment;
|
|
5413
5417
|
}
|
|
5414
5418
|
}
|
|
5415
5419
|
class ss extends De {
|
|
@@ -5425,7 +5429,7 @@ class ss extends De {
|
|
|
5425
5429
|
getOrders(r, e, s) {
|
|
5426
5430
|
return this.getPaginated("/internal/orders", r, e ? [e] : void 0, s, {}, (i) => {
|
|
5427
5431
|
const o = { ...i.data };
|
|
5428
|
-
return o.data = o.data.map((c) => new
|
|
5432
|
+
return o.data = o.data.map((c) => new Pr(c)), o;
|
|
5429
5433
|
});
|
|
5430
5434
|
}
|
|
5431
5435
|
/**
|
|
@@ -5443,7 +5447,7 @@ class ss extends De {
|
|
|
5443
5447
|
* @param orderId Идентификатор заказа для которого необходимо вернуть данные.
|
|
5444
5448
|
*/
|
|
5445
5449
|
getOrder(r) {
|
|
5446
|
-
return this.get(`/internal/orders/${r}`, {}, (e) => new
|
|
5450
|
+
return this.get(`/internal/orders/${r}`, {}, (e) => new vt(e.data));
|
|
5447
5451
|
}
|
|
5448
5452
|
}
|
|
5449
5453
|
class _e {
|
|
@@ -5476,7 +5480,7 @@ class _e {
|
|
|
5476
5480
|
this.client = new me(r == null ? void 0 : r.client), this.product = new x(r == null ? void 0 : r.product), this.cost = (r == null ? void 0 : r.cost) ?? 0, this.costCoefficient = (r == null ? void 0 : r.costCoefficient) ?? 0, this.source = (r == null ? void 0 : r.source) ?? je.Product;
|
|
5477
5481
|
}
|
|
5478
5482
|
}
|
|
5479
|
-
const
|
|
5483
|
+
const Ie = (n) => {
|
|
5480
5484
|
var r, e, s, i, o;
|
|
5481
5485
|
return n ? sr(
|
|
5482
5486
|
{
|
|
@@ -5508,7 +5512,7 @@ class is extends h {
|
|
|
5508
5512
|
`/internal/price/products/${r}/analyze`,
|
|
5509
5513
|
{
|
|
5510
5514
|
...Xe(e),
|
|
5511
|
-
filters:
|
|
5515
|
+
filters: Ie(s)
|
|
5512
5516
|
},
|
|
5513
5517
|
(i) => i.data.map((o) => new _e(o))
|
|
5514
5518
|
);
|
|
@@ -5527,7 +5531,7 @@ class is extends h {
|
|
|
5527
5531
|
`/internal/price/categories/${r}/analyze`,
|
|
5528
5532
|
{
|
|
5529
5533
|
...Xe(e),
|
|
5530
|
-
filters:
|
|
5534
|
+
filters: Ie(s)
|
|
5531
5535
|
},
|
|
5532
5536
|
(i) => i.data.map((o) => new _e(o))
|
|
5533
5537
|
);
|
|
@@ -5548,13 +5552,13 @@ class is extends h {
|
|
|
5548
5552
|
`/internal/price/categories/${r}/analyze/square`,
|
|
5549
5553
|
{
|
|
5550
5554
|
...e,
|
|
5551
|
-
filters:
|
|
5555
|
+
filters: Ie(s)
|
|
5552
5556
|
},
|
|
5553
5557
|
(i) => i.data.map((o) => new _e(o))
|
|
5554
5558
|
);
|
|
5555
5559
|
}
|
|
5556
5560
|
}
|
|
5557
|
-
class
|
|
5561
|
+
class Pt {
|
|
5558
5562
|
/**
|
|
5559
5563
|
* Инициализирует экземпляр класса {@link PriceHistoryItem}.
|
|
5560
5564
|
*
|
|
@@ -5601,10 +5605,10 @@ class vt {
|
|
|
5601
5605
|
* @inheritDoc
|
|
5602
5606
|
*/
|
|
5603
5607
|
t(this, "currency");
|
|
5604
|
-
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = w(r.costDate) ?
|
|
5608
|
+
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = w(r.costDate) ? C(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new oe(r.product) : void 0, this.client = r.client ? new F(r.client) : void 0, this.executor = r.executor ? new F(r.executor) : void 0, this.currency = r.currency ? new Ce(r.currency) : void 0;
|
|
5605
5609
|
}
|
|
5606
5610
|
}
|
|
5607
|
-
class
|
|
5611
|
+
class at extends oe {
|
|
5608
5612
|
/**
|
|
5609
5613
|
* Инициализирует экземпляр класса {@link ProductPriceHistory}.
|
|
5610
5614
|
*
|
|
@@ -5616,7 +5620,7 @@ class Pt extends oe {
|
|
|
5616
5620
|
* @inheritDoc
|
|
5617
5621
|
*/
|
|
5618
5622
|
t(this, "history");
|
|
5619
|
-
this.history = he(e.history, (s) => new
|
|
5623
|
+
this.history = he(e.history, (s) => new Pt(s));
|
|
5620
5624
|
}
|
|
5621
5625
|
}
|
|
5622
5626
|
class ns extends h {
|
|
@@ -5638,13 +5642,13 @@ class ns extends h {
|
|
|
5638
5642
|
const e = D.getConfig().dateFormats.api, s = sr(
|
|
5639
5643
|
Oe(r, {
|
|
5640
5644
|
costDate: {
|
|
5641
|
-
from:
|
|
5642
|
-
to:
|
|
5645
|
+
from: ke((i = r.costDate) == null ? void 0 : i.from) ? U(r.costDate.from, e) : (o = r.costDate) == null ? void 0 : o.from,
|
|
5646
|
+
to: ke((c = r.costDate) == null ? void 0 : c.to) ? U(r.costDate.to, e) : (p = r.costDate) == null ? void 0 : p.to
|
|
5643
5647
|
}
|
|
5644
5648
|
}),
|
|
5645
5649
|
(u) => A(u) || (Q(u) || ir(u)) && Y(u)
|
|
5646
5650
|
);
|
|
5647
|
-
return this.get("/internal/history", s, (u) => he(u.data, (m) => new
|
|
5651
|
+
return this.get("/internal/history", s, (u) => he(u.data, (m) => new at(m)));
|
|
5648
5652
|
}
|
|
5649
5653
|
}
|
|
5650
5654
|
class Ze {
|
|
@@ -5745,7 +5749,7 @@ class T extends ue {
|
|
|
5745
5749
|
* Возвращает {@link Promise} для получения справочника списка валют.
|
|
5746
5750
|
*/
|
|
5747
5751
|
getCurrency() {
|
|
5748
|
-
return this.getTypedDataArrayRequester(
|
|
5752
|
+
return this.getTypedDataArrayRequester(Ce, "/public/references/currency", !0);
|
|
5749
5753
|
}
|
|
5750
5754
|
/**
|
|
5751
5755
|
* Возвращает {@link Promise} для получения справочника данных
|
|
@@ -5842,7 +5846,7 @@ class T extends ue {
|
|
|
5842
5846
|
* Возвращает {@link Promise} для получения справочника коэффициентов цен.
|
|
5843
5847
|
*/
|
|
5844
5848
|
getPriceCoefficients() {
|
|
5845
|
-
return this.getTypedDataArrayRequester(
|
|
5849
|
+
return this.getTypedDataArrayRequester(ae, "/internal/references/price-coefficient", !0);
|
|
5846
5850
|
}
|
|
5847
5851
|
/**
|
|
5848
5852
|
* Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
|
|
@@ -5852,7 +5856,7 @@ class T extends ue {
|
|
|
5852
5856
|
}
|
|
5853
5857
|
}
|
|
5854
5858
|
const R = te("__references_private", () => {
|
|
5855
|
-
const n = f({}), r = f(void 0), e = f(void 0), s = f(void 0), i = f(void 0), o = f(void 0), c = f(void 0), p = f(void 0), u = f(void 0), m = f(void 0),
|
|
5859
|
+
const n = f({}), r = f(void 0), e = f(void 0), s = f(void 0), i = f(void 0), o = f(void 0), c = f(void 0), p = f(void 0), u = f(void 0), m = f(void 0), v = f(void 0), $ = f(void 0), I = f(void 0), k = f(void 0), S = f(void 0), _ = f(void 0), q = f(void 0), l = f(void 0);
|
|
5856
5860
|
return {
|
|
5857
5861
|
/**
|
|
5858
5862
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -5897,7 +5901,7 @@ const R = te("__references_private", () => {
|
|
|
5897
5901
|
/**
|
|
5898
5902
|
* Справочник групп партнеров.
|
|
5899
5903
|
*/
|
|
5900
|
-
partnerGroupReference:
|
|
5904
|
+
partnerGroupReference: v,
|
|
5901
5905
|
/**
|
|
5902
5906
|
* Справочник типов файлов продукктов/категорий.
|
|
5903
5907
|
*/
|
|
@@ -5905,11 +5909,11 @@ const R = te("__references_private", () => {
|
|
|
5905
5909
|
/**
|
|
5906
5910
|
* Справочник типов ресурсов.
|
|
5907
5911
|
*/
|
|
5908
|
-
resourceTypesReference:
|
|
5912
|
+
resourceTypesReference: I,
|
|
5909
5913
|
/**
|
|
5910
5914
|
* Справочник направлений продаж.
|
|
5911
5915
|
*/
|
|
5912
|
-
salesDirectionsReference:
|
|
5916
|
+
salesDirectionsReference: k,
|
|
5913
5917
|
/**
|
|
5914
5918
|
* Справочник источников первичного интереса.
|
|
5915
5919
|
*/
|
|
@@ -5928,87 +5932,87 @@ const R = te("__references_private", () => {
|
|
|
5928
5932
|
priceCoefficientsReference: l
|
|
5929
5933
|
};
|
|
5930
5934
|
}), cs = te("references", () => {
|
|
5931
|
-
const n =
|
|
5935
|
+
const n = a(() => {
|
|
5932
5936
|
const l = R();
|
|
5933
5937
|
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(T).getChannelPrimaryInterest().then((g) => {
|
|
5934
5938
|
l.channelPrimaryInterestReference = g;
|
|
5935
5939
|
}).catch(y)), l.channelPrimaryInterestReference;
|
|
5936
|
-
}), r =
|
|
5940
|
+
}), r = a(() => {
|
|
5937
5941
|
const l = R();
|
|
5938
5942
|
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(T).getContactPositions().then((g) => {
|
|
5939
5943
|
l.contactPositionsReference = g;
|
|
5940
5944
|
}).catch(y)), l.contactPositionsReference;
|
|
5941
|
-
}), e =
|
|
5945
|
+
}), e = a(() => {
|
|
5942
5946
|
const l = R();
|
|
5943
5947
|
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(T).getCurrency().then((g) => {
|
|
5944
5948
|
l.currencyReference = g;
|
|
5945
5949
|
}).catch(y)), l.currencyReference;
|
|
5946
|
-
}), s =
|
|
5950
|
+
}), s = a(() => {
|
|
5947
5951
|
const l = R();
|
|
5948
5952
|
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(T).getOpf().then((g) => {
|
|
5949
5953
|
l.opfReference = g;
|
|
5950
5954
|
}).catch(y)), l.opfReference;
|
|
5951
|
-
}), i =
|
|
5955
|
+
}), i = a(() => {
|
|
5952
5956
|
const l = R();
|
|
5953
5957
|
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(T).getOrderPaymentStatuses().then((g) => {
|
|
5954
5958
|
l.orderPaymentStatusReference = g;
|
|
5955
5959
|
}).catch(y)), l.orderPaymentStatusReference;
|
|
5956
|
-
}), o =
|
|
5960
|
+
}), o = a(() => {
|
|
5957
5961
|
const l = R();
|
|
5958
5962
|
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(T).getOrderStatuses().then((g) => {
|
|
5959
5963
|
l.orderStatusReference = g;
|
|
5960
5964
|
}).catch(y)), l.orderStatusReference;
|
|
5961
|
-
}), c =
|
|
5965
|
+
}), c = a(() => {
|
|
5962
5966
|
const l = R();
|
|
5963
5967
|
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(T).getPaymentTypes().then((g) => {
|
|
5964
5968
|
l.paymentTypeReference = g;
|
|
5965
5969
|
}).catch(y)), l.paymentTypeReference;
|
|
5966
|
-
}), p =
|
|
5970
|
+
}), p = a(() => {
|
|
5967
5971
|
const l = R();
|
|
5968
5972
|
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(T).getPartnerGroup().then((g) => {
|
|
5969
5973
|
l.partnerGroupReference = g;
|
|
5970
5974
|
}).catch(y)), l.partnerGroupReference;
|
|
5971
|
-
}), u =
|
|
5975
|
+
}), u = a(() => {
|
|
5972
5976
|
const l = R();
|
|
5973
5977
|
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(T).getProductFileType().then((g) => {
|
|
5974
5978
|
l.productFileTypeReference = g;
|
|
5975
5979
|
}).catch(y)), l.productFileTypeReference;
|
|
5976
|
-
}), m =
|
|
5980
|
+
}), m = a(() => {
|
|
5977
5981
|
const l = R();
|
|
5978
5982
|
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(T).getResourceTypes().then((g) => {
|
|
5979
5983
|
l.resourceTypesReference = g;
|
|
5980
5984
|
}).catch(y)), l.resourceTypesReference;
|
|
5981
|
-
}),
|
|
5985
|
+
}), v = a(() => {
|
|
5982
5986
|
const l = R();
|
|
5983
5987
|
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(T).getSalesDirections().then((g) => {
|
|
5984
5988
|
l.salesDirectionsReference = g;
|
|
5985
5989
|
}).catch(y)), l.salesDirectionsReference;
|
|
5986
|
-
}), $ =
|
|
5990
|
+
}), $ = a(() => {
|
|
5987
5991
|
const l = R();
|
|
5988
5992
|
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(T).getSourcePrimaryInterest().then((g) => {
|
|
5989
5993
|
l.sourcePrimaryInterestReference = g;
|
|
5990
5994
|
}).catch(y)), l.sourcePrimaryInterestReference;
|
|
5991
|
-
}),
|
|
5995
|
+
}), I = a(() => {
|
|
5992
5996
|
const l = R();
|
|
5993
5997
|
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(T).getDeliveryTypes().then((g) => {
|
|
5994
5998
|
l.deliveryTypeReference = g;
|
|
5995
5999
|
}).catch(y)), l.deliveryTypeReference;
|
|
5996
|
-
}),
|
|
6000
|
+
}), k = a(() => {
|
|
5997
6001
|
const l = R();
|
|
5998
6002
|
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(wt).getManagers().then((g) => {
|
|
5999
6003
|
l.managersList = g;
|
|
6000
6004
|
}).catch(y)), l.managersList;
|
|
6001
|
-
}), S =
|
|
6005
|
+
}), S = a(() => {
|
|
6002
6006
|
const l = R();
|
|
6003
6007
|
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(T).getWarehouses().then((g) => {
|
|
6004
6008
|
l.warehousesReference = g;
|
|
6005
6009
|
}).catch(y)), l.warehousesReference;
|
|
6006
|
-
}), _ =
|
|
6010
|
+
}), _ = a(() => {
|
|
6007
6011
|
const l = R();
|
|
6008
6012
|
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(T).getPropertyTypes().then((g) => {
|
|
6009
6013
|
l.propertyTypesReference = g;
|
|
6010
6014
|
}).catch(y)), l.propertyTypesReference;
|
|
6011
|
-
}), q =
|
|
6015
|
+
}), q = a(() => {
|
|
6012
6016
|
const l = R();
|
|
6013
6017
|
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(T).getPriceCoefficients().then((g) => {
|
|
6014
6018
|
l.priceCoefficientsReference = g;
|
|
@@ -6058,7 +6062,7 @@ const R = te("__references_private", () => {
|
|
|
6058
6062
|
/**
|
|
6059
6063
|
* Справочник направлений продаж.
|
|
6060
6064
|
*/
|
|
6061
|
-
salesDirectionsReference:
|
|
6065
|
+
salesDirectionsReference: v,
|
|
6062
6066
|
/**
|
|
6063
6067
|
* Справочник каналов первичного интереса.
|
|
6064
6068
|
*/
|
|
@@ -6066,11 +6070,11 @@ const R = te("__references_private", () => {
|
|
|
6066
6070
|
/**
|
|
6067
6071
|
* Справочник типов доставки.
|
|
6068
6072
|
*/
|
|
6069
|
-
deliveryTypeReference:
|
|
6073
|
+
deliveryTypeReference: I,
|
|
6070
6074
|
/**
|
|
6071
6075
|
* Список менеджеров.
|
|
6072
6076
|
*/
|
|
6073
|
-
managersList:
|
|
6077
|
+
managersList: k,
|
|
6074
6078
|
/**
|
|
6075
6079
|
* Справочник складов.
|
|
6076
6080
|
*/
|
|
@@ -6285,7 +6289,7 @@ const Tt = te("__user_state_private", () => {
|
|
|
6285
6289
|
/**
|
|
6286
6290
|
* Данные о текущем пользователе.
|
|
6287
6291
|
*/
|
|
6288
|
-
currentUser:
|
|
6292
|
+
currentUser: a(() => {
|
|
6289
6293
|
const r = Tt();
|
|
6290
6294
|
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance($t).getCurrentUser().then((e) => {
|
|
6291
6295
|
r.currentUser = e;
|
|
@@ -6356,21 +6360,21 @@ export {
|
|
|
6356
6360
|
ot as ContactPosition,
|
|
6357
6361
|
Se as ContactRelation,
|
|
6358
6362
|
yr as ContragentBase,
|
|
6359
|
-
|
|
6363
|
+
ve as ContragentFactory,
|
|
6360
6364
|
wr as ContragentIc,
|
|
6361
6365
|
ht as ContragentPerson,
|
|
6362
6366
|
gt as ContragentUlNr,
|
|
6363
|
-
|
|
6367
|
+
Cr as ContragentUlR,
|
|
6364
6368
|
je as CostSourceEnum,
|
|
6365
6369
|
ee as Country,
|
|
6366
|
-
|
|
6370
|
+
Ce as Currency,
|
|
6367
6371
|
ps as DataSuggestionProvider,
|
|
6368
6372
|
Qt as DataTablePagination,
|
|
6369
6373
|
yt as DataTablePaginationRequestParams,
|
|
6370
6374
|
Yt as DataTableSortRequestParams,
|
|
6371
6375
|
rs as DateTimeProvider,
|
|
6372
6376
|
Vr as DeletableNamedIdentity,
|
|
6373
|
-
|
|
6377
|
+
Pe as DeliveryAddress,
|
|
6374
6378
|
X as DeliveryType,
|
|
6375
6379
|
Nt as DetailedJwtPayload,
|
|
6376
6380
|
Zr as DeviceTypeResolutionConfig,
|
|
@@ -6394,12 +6398,12 @@ export {
|
|
|
6394
6398
|
Rt as MetaTagItem,
|
|
6395
6399
|
b as NamedIdentity,
|
|
6396
6400
|
j as Opf,
|
|
6397
|
-
|
|
6398
|
-
|
|
6399
|
-
|
|
6401
|
+
L as OpfEnum,
|
|
6402
|
+
vt as Order,
|
|
6403
|
+
Pr as OrderInfo,
|
|
6400
6404
|
ct as OrderPaymentStatus,
|
|
6401
|
-
|
|
6402
|
-
|
|
6405
|
+
Ct as OrderProduct,
|
|
6406
|
+
vr as OrderShortInfo,
|
|
6403
6407
|
lt as OrderStatus,
|
|
6404
6408
|
ss as OrdersDataProvider,
|
|
6405
6409
|
re as PartnerGroup,
|
|
@@ -6407,10 +6411,10 @@ export {
|
|
|
6407
6411
|
ye as PreferencesStorageProvider,
|
|
6408
6412
|
_e as PriceAnalyze,
|
|
6409
6413
|
is as PriceAnalyzeProvider,
|
|
6410
|
-
|
|
6414
|
+
ae as PriceCoefficient,
|
|
6411
6415
|
or as PriceCoefficientEnum,
|
|
6412
6416
|
ns as PriceHistoryDataProvider,
|
|
6413
|
-
|
|
6417
|
+
Pt as PriceHistoryItem,
|
|
6414
6418
|
W as PriceTemplate,
|
|
6415
6419
|
Te as PriceTemplateCategory,
|
|
6416
6420
|
se as PriceTemplateClient,
|
|
@@ -6419,13 +6423,13 @@ export {
|
|
|
6419
6423
|
Et as PriceTemplateProvider,
|
|
6420
6424
|
ne as PricingRole,
|
|
6421
6425
|
Wt as PricingRoleProvider,
|
|
6422
|
-
|
|
6426
|
+
de as PrimaryCatalogableItem,
|
|
6423
6427
|
x as Product,
|
|
6424
6428
|
Mt as ProductCategoryDataProvider,
|
|
6425
6429
|
Ht as ProductDataProvider,
|
|
6426
6430
|
ut as ProductFileType,
|
|
6427
6431
|
Ge as ProductPriceCoefficient,
|
|
6428
|
-
|
|
6432
|
+
at as ProductPriceHistory,
|
|
6429
6433
|
Jt as PropertiesProvider,
|
|
6430
6434
|
ie as Property,
|
|
6431
6435
|
hr as PropertyType,
|
|
@@ -6433,7 +6437,7 @@ export {
|
|
|
6433
6437
|
z as PropertyValue,
|
|
6434
6438
|
os as RecommendationsDataProvider,
|
|
6435
6439
|
Ze as RecommendationsList,
|
|
6436
|
-
|
|
6440
|
+
P as Reference,
|
|
6437
6441
|
T as ReferenceDataProvider,
|
|
6438
6442
|
le as Region,
|
|
6439
6443
|
mr as ResourceType,
|