@bisondesk/core-sdk 1.0.588 → 1.0.590
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/lib/apis/crm.js.map +1 -1
- package/lib/apis/debtors.js.map +1 -1
- package/lib/apis/email-templates.js.map +1 -1
- package/lib/apis/insights.d.ts.map +1 -1
- package/lib/apis/insights.js.map +1 -1
- package/lib/apis/leasing-administration.js.map +1 -1
- package/lib/apis/leasing.d.ts +1 -1
- package/lib/apis/leasing.d.ts.map +1 -1
- package/lib/apis/leasing.js.map +1 -1
- package/lib/apis/offers.d.ts.map +1 -1
- package/lib/apis/offers.js.map +1 -1
- package/lib/apis/opportunities.d.ts.map +1 -1
- package/lib/apis/opportunities.js.map +1 -1
- package/lib/apis/tenants.js.map +1 -1
- package/lib/apis/users.d.ts.map +1 -1
- package/lib/apis/users.js +1 -1
- package/lib/apis/users.js.map +1 -1
- package/lib/apis/vehicle-sales.js.map +1 -1
- package/lib/apis/vehicles.js.map +1 -1
- package/lib/types/leasing-administration.js.map +1 -1
- package/lib/types/leasing.d.ts.map +1 -1
- package/lib/types/leasing.js.map +1 -1
- package/lib/types/offers.d.ts.map +1 -1
- package/lib/types/offers.js +1 -4
- package/lib/types/offers.js.map +1 -1
- package/lib/types/opportunities.d.ts +4 -0
- package/lib/types/opportunities.d.ts.map +1 -1
- package/lib/types/opportunities.js.map +1 -1
- package/lib/types/prospects.d.ts +4 -5
- package/lib/types/prospects.d.ts.map +1 -1
- package/lib/types/prospects.js.map +1 -1
- package/lib/types/quotes.d.ts.map +1 -1
- package/lib/types/quotes.js.map +1 -1
- package/lib/types/recently-viewed.js.map +1 -1
- package/lib/types/tenants.d.ts +2 -1
- package/lib/types/tenants.d.ts.map +1 -1
- package/lib/types/tenants.js +1 -0
- package/lib/types/tenants.js.map +1 -1
- package/lib/types/transports.d.ts +110 -0
- package/lib/types/transports.d.ts.map +1 -0
- package/lib/types/transports.js +44 -0
- package/lib/types/transports.js.map +1 -0
- package/lib/types/vehicles.d.ts +11 -2
- package/lib/types/vehicles.d.ts.map +1 -1
- package/lib/types/vehicles.js.map +1 -1
- package/lib/utils/debtors-dossiers.js.map +1 -1
- package/lib/utils/forms.js.map +1 -1
- package/lib/utils/integrations/vehicles.js.map +1 -1
- package/lib/utils/interests.js.map +1 -1
- package/lib/utils/leasing.d.ts +1 -1
- package/lib/utils/leasing.d.ts.map +1 -1
- package/lib/utils/leasing.js.map +1 -1
- package/lib/utils/opportunities.js.map +1 -1
- package/lib/utils/search.d.ts +1 -1
- package/lib/utils/search.d.ts.map +1 -1
- package/lib/utils/search.js.map +1 -1
- package/lib/utils/slug.js.map +1 -1
- package/lib/utils/vehicles.js.map +1 -1
- package/lib/utils/vehicles.test.js +1 -1
- package/lib/utils/vehicles.test.js.map +1 -1
- package/package.json +15 -10
- package/src/apis/crm.ts +14 -14
- package/src/apis/debtors.ts +1 -1
- package/src/apis/email-templates.ts +2 -2
- package/src/apis/insights.ts +3 -3
- package/src/apis/leasing-administration.ts +2 -2
- package/src/apis/leasing.ts +19 -19
- package/src/apis/offers.ts +9 -12
- package/src/apis/opportunities.ts +21 -24
- package/src/apis/tenants.ts +3 -3
- package/src/apis/users.ts +2 -2
- package/src/apis/vehicle-sales.ts +4 -4
- package/src/apis/vehicles.ts +12 -12
- package/src/types/activities.js +13 -0
- package/src/types/activities.js.map +1 -0
- package/src/types/comparables.js +2 -0
- package/src/types/comparables.js.map +1 -0
- package/src/types/crm.js +58 -0
- package/src/types/crm.js.map +1 -0
- package/src/types/dashboard.js +2 -0
- package/src/types/dashboard.js.map +1 -0
- package/src/types/definitions.js +2 -0
- package/src/types/definitions.js.map +1 -0
- package/src/types/fields.js +2 -0
- package/src/types/fields.js.map +1 -0
- package/src/types/insights.js +2 -0
- package/src/types/insights.js.map +1 -0
- package/src/types/interests.js +6 -0
- package/src/types/interests.js.map +1 -0
- package/src/types/internal-events.js +18 -0
- package/src/types/internal-events.js.map +1 -0
- package/src/types/internet-opportunities.js +2 -0
- package/src/types/internet-opportunities.js.map +1 -0
- package/src/types/internet-vehicles.js +2 -0
- package/src/types/internet-vehicles.js.map +1 -0
- package/src/types/leasing-administration.js +2 -0
- package/src/types/leasing-administration.js.map +1 -0
- package/src/types/leasing-administration.ts +3 -3
- package/src/types/leasing-debtors.js +2 -0
- package/src/types/leasing-debtors.js.map +1 -0
- package/src/types/leasing-search.js +2 -0
- package/src/types/leasing-search.js.map +1 -0
- package/src/types/leasing-settings.js +7 -0
- package/src/types/leasing-settings.js.map +1 -0
- package/src/types/leasing.js +38 -0
- package/src/types/leasing.js.map +1 -0
- package/src/types/leasing.ts +2 -2
- package/src/types/marketing.js +35 -0
- package/src/types/marketing.js.map +1 -0
- package/src/types/offers.js +56 -0
- package/src/types/offers.ts +1 -4
- package/src/types/opportunities.js +107 -0
- package/src/types/opportunities.js.map +1 -0
- package/src/types/opportunities.ts +4 -0
- package/src/types/payments.js +7 -0
- package/src/types/picklists.js +2 -0
- package/src/types/picklists.js.map +1 -0
- package/src/types/prospects.ts +4 -5
- package/src/types/quotes.js +42 -0
- package/src/types/quotes.ts +5 -5
- package/src/types/recently-viewed.js +2 -0
- package/src/types/recently-viewed.js.map +1 -0
- package/src/types/recently-viewed.ts +1 -1
- package/src/types/reservations.js +5 -0
- package/src/types/reservations.js.map +1 -0
- package/src/types/roi-ratings.js +5 -0
- package/src/types/roi-ratings.js.map +1 -0
- package/src/types/saved-filters.js +9 -0
- package/src/types/saved-filters.js.map +1 -0
- package/src/types/search.js +2 -0
- package/src/types/search.js.map +1 -0
- package/src/types/settings.js +2 -0
- package/src/types/settings.js.map +1 -0
- package/src/types/templates.js +2 -0
- package/src/types/templates.js.map +1 -0
- package/src/types/tenants.js +21 -0
- package/src/types/tenants.js.map +1 -0
- package/src/types/tenants.ts +1 -0
- package/src/types/transports.ts +149 -0
- package/src/types/user-performance.js +7 -0
- package/src/types/user-performance.js.map +1 -0
- package/src/types/utils.js +2 -0
- package/src/types/validation.js +2 -0
- package/src/types/validation.js.map +1 -0
- package/src/types/vehicle-sales.js +6 -0
- package/src/types/vehicle-sales.js.map +1 -0
- package/src/types/vehicles.js +98 -0
- package/src/types/vehicles.js.map +1 -0
- package/src/types/vehicles.ts +13 -2
- package/src/utils/debtors-dossiers.ts +1 -1
- package/src/utils/forms.ts +1 -1
- package/src/utils/integrations/vehicles.ts +1 -1
- package/src/utils/interests.ts +2 -2
- package/src/utils/leasing.js +6 -0
- package/src/utils/leasing.js.map +1 -0
- package/src/utils/leasing.ts +6 -6
- package/src/utils/opportunities.js +48 -0
- package/src/utils/opportunities.js.map +1 -0
- package/src/utils/opportunities.ts +1 -1
- package/src/utils/search.ts +16 -16
- package/src/utils/slug.ts +1 -1
- package/src/utils/vehicles.test.ts +1 -1
- package/src/utils/vehicles.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
package/src/utils/leasing.ts
CHANGED
|
@@ -2,26 +2,26 @@ import { UTCDate } from '@date-fns/utc';
|
|
|
2
2
|
import { format } from 'date-fns';
|
|
3
3
|
import { Decimal } from 'decimal.js';
|
|
4
4
|
import { last, map, sortBy, uniqBy } from 'lodash-es';
|
|
5
|
-
import {
|
|
6
|
-
CustomLeasingQuoteExtraInput,
|
|
7
|
-
LeasingItemsPaymentSplit,
|
|
8
|
-
} from '../types/leasing-settings.js';
|
|
9
5
|
import {
|
|
10
6
|
ConditionsRef,
|
|
11
7
|
LeasingContract,
|
|
12
8
|
LeasingContractClient,
|
|
13
9
|
OpportunityRef,
|
|
14
10
|
} from '../types/leasing.js';
|
|
11
|
+
import {
|
|
12
|
+
CustomLeasingQuoteExtraInput,
|
|
13
|
+
LeasingItemsPaymentSplit,
|
|
14
|
+
} from '../types/leasing-settings.js';
|
|
15
15
|
|
|
16
16
|
/* sort from oldest to most recent client */
|
|
17
17
|
export const sortContractClients = (clients: LeasingContractClient[]): LeasingContractClient[] =>
|
|
18
18
|
sortBy(
|
|
19
19
|
map(
|
|
20
20
|
uniqBy(clients, (c) => c.takeoverId),
|
|
21
|
-
(c) => ({ ...c, since: format(new UTCDate(c.since), 'yyyy-MM-dd') }) // doing a map to also fix legacy data
|
|
21
|
+
(c) => ({ ...c, since: format(new UTCDate(c.since), 'yyyy-MM-dd') }), // doing a map to also fix legacy data
|
|
22
22
|
),
|
|
23
23
|
(cli) => cli.since,
|
|
24
|
-
(cli) => (cli.takeoverId ? parseInt(cli.takeoverId.replace(/[^0-9]/g, '')) : 0)
|
|
24
|
+
(cli) => (cli.takeoverId ? parseInt(cli.takeoverId.replace(/[^0-9]/g, '')) : 0),
|
|
25
25
|
);
|
|
26
26
|
|
|
27
27
|
export const getDealRef = ({
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { OpportunityStatus, OpportunityStatusOrder } from '../types/opportunities.js';
|
|
2
|
+
const compareOpportunityStatus = (input) => {
|
|
3
|
+
const { currentStatus, referenceStatus } = input;
|
|
4
|
+
const currentStatusIdx = OpportunityStatusOrder.indexOf(currentStatus);
|
|
5
|
+
const referenceStatusIdx = OpportunityStatusOrder.indexOf(referenceStatus);
|
|
6
|
+
return {
|
|
7
|
+
currentStatusIdx,
|
|
8
|
+
referenceStatusIdx,
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export const getPreviousStatus = (currentStatus) => {
|
|
12
|
+
const currentIndex = OpportunityStatusOrder.indexOf(currentStatus);
|
|
13
|
+
if (currentIndex === 0) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
return OpportunityStatusOrder[currentIndex - 1];
|
|
17
|
+
};
|
|
18
|
+
export const getNextStatus = (status) => {
|
|
19
|
+
const statusIndex = OpportunityStatusOrder.indexOf(status);
|
|
20
|
+
if (statusIndex >= OpportunityStatusOrder.length - 1) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
return OpportunityStatusOrder[statusIndex + 1];
|
|
24
|
+
};
|
|
25
|
+
export const isSameOrAfterReferenceOpportunityStatus = (input) => {
|
|
26
|
+
const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);
|
|
27
|
+
return currentStatusIdx >= referenceStatusIdx;
|
|
28
|
+
};
|
|
29
|
+
export const isAfterReferenceOpportunityStatus = (input) => {
|
|
30
|
+
const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);
|
|
31
|
+
return currentStatusIdx > referenceStatusIdx;
|
|
32
|
+
};
|
|
33
|
+
export const isSameOrBeforeReferenceOpportunityStatus = (input) => {
|
|
34
|
+
const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);
|
|
35
|
+
return currentStatusIdx <= referenceStatusIdx;
|
|
36
|
+
};
|
|
37
|
+
export const isBeforeReferenceOpportunityStatus = (input) => {
|
|
38
|
+
const { currentStatusIdx, referenceStatusIdx } = compareOpportunityStatus(input);
|
|
39
|
+
return currentStatusIdx < referenceStatusIdx;
|
|
40
|
+
};
|
|
41
|
+
export const isOpportunityLost = (input) => input.lostAt != null;
|
|
42
|
+
export const getOpportunityReservedStatus = () => [
|
|
43
|
+
OpportunityStatus.REVIEW,
|
|
44
|
+
OpportunityStatus.PREPARATION,
|
|
45
|
+
OpportunityStatus.DELIVERY,
|
|
46
|
+
];
|
|
47
|
+
export const isOpportunityReserved = (input) => getOpportunityReservedStatus().includes(input.status);
|
|
48
|
+
//# sourceMappingURL=opportunities.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opportunities.js","sourceRoot":"","sources":["opportunities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAOnG,MAAM,wBAAwB,GAAG,CAAC,KAAmB,EAAE,EAAE;IACvD,MAAM,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,KAAK,CAAC;IAEjD,MAAM,gBAAgB,GAAG,sBAAsB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACvE,MAAM,kBAAkB,GAAG,sBAAsB,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;IAE3E,OAAO;QACL,gBAAgB;QAChB,kBAAkB;KACnB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,aAAgC,EACD,EAAE;IACjC,MAAM,YAAY,GAAG,sBAAsB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IACnE,IAAI,YAAY,KAAK,CAAC,EAAE,CAAC;QACvB,OAAO;IACT,CAAC;IACD,OAAO,sBAAsB,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC;AAClD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,MAAyB,EAAiC,EAAE;IACxF,MAAM,WAAW,GAAG,sBAAsB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3D,IAAI,WAAW,IAAI,sBAAsB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrD,OAAO;IACT,CAAC;IACD,OAAO,sBAAsB,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC;AACjD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,uCAAuC,GAAG,CAAC,KAAmB,EAAW,EAAE;IACtF,MAAM,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAEjF,OAAO,gBAAgB,IAAI,kBAAkB,CAAC;AAChD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAAG,CAAC,KAAmB,EAAW,EAAE;IAChF,MAAM,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAEjF,OAAO,gBAAgB,GAAG,kBAAkB,CAAC;AAC/C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,wCAAwC,GAAG,CAAC,KAAmB,EAAW,EAAE;IACvF,MAAM,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAEjF,OAAO,gBAAgB,IAAI,kBAAkB,CAAC;AAChD,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,kCAAkC,GAAG,CAAC,KAAmB,EAAW,EAAE;IACjF,MAAM,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,GAAG,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAEjF,OAAO,gBAAgB,GAAG,kBAAkB,CAAC;AAC/C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAkB,EAAW,EAAE,CAAC,KAAK,CAAC,MAAM,IAAI,IAAI,CAAC;AAEvF,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAwB,EAAE,CAAC;IACrE,iBAAiB,CAAC,MAAM;IACxB,iBAAiB,CAAC,WAAW;IAC7B,iBAAiB,CAAC,QAAQ;CAC3B,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAAkB,EAAW,EAAE,CACnE,4BAA4B,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -18,7 +18,7 @@ const compareOpportunityStatus = (input: CompareInput) => {
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
export const getPreviousStatus = (
|
|
21
|
-
currentStatus: OpportunityStatus
|
|
21
|
+
currentStatus: OpportunityStatus,
|
|
22
22
|
): OpportunityStatus | undefined => {
|
|
23
23
|
const currentIndex = OpportunityStatusOrder.indexOf(currentStatus);
|
|
24
24
|
if (currentIndex === 0) {
|
package/src/utils/search.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { joinWithSeparator } from '@bisondesk/commons-sdk/formatting';
|
|
2
2
|
import { BusinessEntityIds } from '../constants.js';
|
|
3
3
|
import { Contact, Organization, SearchOrganization } from '../types/crm.js';
|
|
4
|
+
import { LeasingContract } from '../types/leasing.js';
|
|
4
5
|
import { DebtorsDossier, SearchDebtorsDossier } from '../types/leasing-debtors.js';
|
|
5
6
|
import { SearchLeasingContract } from '../types/leasing-search.js';
|
|
6
|
-
import { LeasingContract } from '../types/leasing.js';
|
|
7
7
|
import { Opportunity, SearchOpportunity } from '../types/opportunities.js';
|
|
8
8
|
import { SearchVehicle, Vehicle } from '../types/vehicles.js';
|
|
9
9
|
|
|
@@ -54,8 +54,8 @@ export const mappings: {
|
|
|
54
54
|
const customer = getCustomerInformation(opp.org, opp.contact);
|
|
55
55
|
return joinWithSeparator(
|
|
56
56
|
[customer?.code, customer?.title, opp.vehicle?.external.identification.stockNumber].filter(
|
|
57
|
-
Boolean
|
|
58
|
-
)
|
|
57
|
+
Boolean,
|
|
58
|
+
),
|
|
59
59
|
);
|
|
60
60
|
},
|
|
61
61
|
getTags: (opp: Opportunity) => [opp.id],
|
|
@@ -135,12 +135,12 @@ const getMapping = (businessEntityId: BusinessEntityIds) => {
|
|
|
135
135
|
|
|
136
136
|
export const getTagsForBusinessEntity = (
|
|
137
137
|
businessEntityId: BusinessEntityIds,
|
|
138
|
-
entity: GlobalBusinessEntity
|
|
138
|
+
entity: GlobalBusinessEntity,
|
|
139
139
|
): string[] => getMapping(businessEntityId).getTags(entity);
|
|
140
140
|
|
|
141
141
|
export const getTagsForSearchBusinessEntity = (
|
|
142
142
|
businessEntityId: BusinessEntityIds,
|
|
143
|
-
entity: GlobalSearchEntity
|
|
143
|
+
entity: GlobalSearchEntity,
|
|
144
144
|
) => {
|
|
145
145
|
const tags = getMapping(businessEntityId).getTagsForSearchEntity?.(entity);
|
|
146
146
|
|
|
@@ -150,57 +150,57 @@ export const getTagsForSearchBusinessEntity = (
|
|
|
150
150
|
|
|
151
151
|
return getTagsForBusinessEntity(
|
|
152
152
|
businessEntityId,
|
|
153
|
-
getMainEntityFromSearchEntity(businessEntityId, entity)
|
|
153
|
+
getMainEntityFromSearchEntity(businessEntityId, entity),
|
|
154
154
|
);
|
|
155
155
|
};
|
|
156
156
|
|
|
157
157
|
export const getDescriptionForBusinessEntity = (
|
|
158
158
|
businessEntityId: BusinessEntityIds,
|
|
159
|
-
entity: GlobalBusinessEntity
|
|
159
|
+
entity: GlobalBusinessEntity,
|
|
160
160
|
) => joinWithSeparator(getTagsForBusinessEntity(businessEntityId, entity));
|
|
161
161
|
|
|
162
162
|
export const getDescriptionForSearchBusinessEntity = (
|
|
163
163
|
businessEntityId: BusinessEntityIds,
|
|
164
|
-
entity: GlobalSearchEntity
|
|
164
|
+
entity: GlobalSearchEntity,
|
|
165
165
|
) => {
|
|
166
166
|
return (
|
|
167
167
|
getMapping(businessEntityId).getDescription?.(entity) ??
|
|
168
168
|
getDescriptionForBusinessEntity(
|
|
169
169
|
businessEntityId,
|
|
170
|
-
getMainEntityFromSearchEntity(businessEntityId, entity)
|
|
170
|
+
getMainEntityFromSearchEntity(businessEntityId, entity),
|
|
171
171
|
)
|
|
172
172
|
);
|
|
173
173
|
};
|
|
174
174
|
|
|
175
175
|
export const getMainEntityFromSearchEntity = (
|
|
176
176
|
businessEntityId: BusinessEntityIds,
|
|
177
|
-
entity: GlobalSearchEntity
|
|
177
|
+
entity: GlobalSearchEntity,
|
|
178
178
|
) => getMapping(businessEntityId).getMainEntity(entity);
|
|
179
179
|
|
|
180
180
|
export const getTitleForBusinessEntity = (
|
|
181
181
|
businessEntityId: BusinessEntityIds,
|
|
182
|
-
entity: GlobalBusinessEntity
|
|
182
|
+
entity: GlobalBusinessEntity,
|
|
183
183
|
) => getMapping(businessEntityId).getTitle(entity);
|
|
184
184
|
|
|
185
185
|
export const getTitleForSearchBusinessEntity = (
|
|
186
186
|
businessEntityId: BusinessEntityIds,
|
|
187
|
-
searchEntity: GlobalSearchEntity
|
|
187
|
+
searchEntity: GlobalSearchEntity,
|
|
188
188
|
) =>
|
|
189
189
|
getTitleForBusinessEntity(
|
|
190
190
|
businessEntityId,
|
|
191
|
-
getMainEntityFromSearchEntity(businessEntityId, searchEntity)
|
|
191
|
+
getMainEntityFromSearchEntity(businessEntityId, searchEntity),
|
|
192
192
|
);
|
|
193
193
|
|
|
194
194
|
export const getMetaForBusinessEntity = (
|
|
195
195
|
businessEntityId: BusinessEntityIds,
|
|
196
|
-
entity: GlobalBusinessEntity
|
|
196
|
+
entity: GlobalBusinessEntity,
|
|
197
197
|
) => getMapping(businessEntityId).getMeta?.(entity);
|
|
198
198
|
|
|
199
199
|
export const getMetaForSearchBusinessEntity = (
|
|
200
200
|
businessEntityId: BusinessEntityIds,
|
|
201
|
-
searchEntity: GlobalSearchEntity
|
|
201
|
+
searchEntity: GlobalSearchEntity,
|
|
202
202
|
) =>
|
|
203
203
|
getMetaForBusinessEntity(
|
|
204
204
|
businessEntityId,
|
|
205
|
-
getMainEntityFromSearchEntity(businessEntityId, searchEntity)
|
|
205
|
+
getMainEntityFromSearchEntity(businessEntityId, searchEntity),
|
|
206
206
|
);
|
package/src/utils/slug.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { XError } from '@bisondesk/commons-sdk/errors';
|
|
1
2
|
import {
|
|
2
3
|
convertLettersToNumber,
|
|
3
4
|
convertNumberToLetters,
|
|
4
5
|
getNextRelatedStockNumber,
|
|
5
6
|
} from './vehicles.js';
|
|
6
|
-
import { XError } from '@bisondesk/commons-sdk/errors';
|
|
7
7
|
|
|
8
8
|
describe('stock number utils', () => {
|
|
9
9
|
describe('convertNumberToLetters', () => {
|
package/src/utils/vehicles.ts
CHANGED