ecotransac-shared-js 1.1.54 → 1.1.56
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/index.js +3 -9
- package/dist/index.mjs +3 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -115,12 +115,6 @@ var getNetPrice = (mandate) => {
|
|
|
115
115
|
businessAssetsPrice = 0
|
|
116
116
|
} = mandate;
|
|
117
117
|
if (isForProfessionalUse) {
|
|
118
|
-
if (isCommercialWallsSale && !netOwnerPrice)
|
|
119
|
-
throw new Error("Missing netOwnerPrice");
|
|
120
|
-
if (isBusinessAssetsTransfer && !businessAssetsPrice)
|
|
121
|
-
throw new Error("Missing businessAssetsPrice");
|
|
122
|
-
if (isLeaseRightsTransfer && !leaseRightsPrice)
|
|
123
|
-
throw new Error("Missing leaseRightsPrice");
|
|
124
118
|
return (0, import_currency.default)(0).add(isCommercialWallsSale ? netOwnerPrice : 0).add(isBusinessAssetsTransfer ? businessAssetsPrice : 0).add(isLeaseRightsTransfer ? leaseRightsPrice : 0).value;
|
|
125
119
|
}
|
|
126
120
|
return netOwnerPrice;
|
|
@@ -585,21 +579,21 @@ var featuresFormFields = [
|
|
|
585
579
|
fieldType: "radio-boolean",
|
|
586
580
|
label: "Vente de murs commerciaux",
|
|
587
581
|
condition: only("isForProfessionalUse"),
|
|
588
|
-
requiredFor: []
|
|
582
|
+
requiredFor: ["MANDATE_CREATION", "DIFFUSION"]
|
|
589
583
|
},
|
|
590
584
|
{
|
|
591
585
|
name: "isBusinessAssetsTransfer",
|
|
592
586
|
fieldType: "radio-boolean",
|
|
593
587
|
label: "Cession de fonds de commerce",
|
|
594
588
|
condition: and(only("isForProfessionalUse"), not("isCommercialWallsSale")),
|
|
595
|
-
requiredFor: []
|
|
589
|
+
requiredFor: ["MANDATE_CREATION", "DIFFUSION"]
|
|
596
590
|
},
|
|
597
591
|
{
|
|
598
592
|
name: "isLeaseRightsTransfer",
|
|
599
593
|
fieldType: "radio-boolean",
|
|
600
594
|
label: "Cession de droit au bail",
|
|
601
595
|
condition: and(only("isForProfessionalUse"), not("isCommercialWallsSale")),
|
|
602
|
-
requiredFor: []
|
|
596
|
+
requiredFor: ["MANDATE_CREATION", "DIFFUSION"]
|
|
603
597
|
},
|
|
604
598
|
{
|
|
605
599
|
name: "brandName",
|
package/dist/index.mjs
CHANGED
|
@@ -29,12 +29,6 @@ var getNetPrice = (mandate) => {
|
|
|
29
29
|
businessAssetsPrice = 0
|
|
30
30
|
} = mandate;
|
|
31
31
|
if (isForProfessionalUse) {
|
|
32
|
-
if (isCommercialWallsSale && !netOwnerPrice)
|
|
33
|
-
throw new Error("Missing netOwnerPrice");
|
|
34
|
-
if (isBusinessAssetsTransfer && !businessAssetsPrice)
|
|
35
|
-
throw new Error("Missing businessAssetsPrice");
|
|
36
|
-
if (isLeaseRightsTransfer && !leaseRightsPrice)
|
|
37
|
-
throw new Error("Missing leaseRightsPrice");
|
|
38
32
|
return currency(0).add(isCommercialWallsSale ? netOwnerPrice : 0).add(isBusinessAssetsTransfer ? businessAssetsPrice : 0).add(isLeaseRightsTransfer ? leaseRightsPrice : 0).value;
|
|
39
33
|
}
|
|
40
34
|
return netOwnerPrice;
|
|
@@ -499,21 +493,21 @@ var featuresFormFields = [
|
|
|
499
493
|
fieldType: "radio-boolean",
|
|
500
494
|
label: "Vente de murs commerciaux",
|
|
501
495
|
condition: only("isForProfessionalUse"),
|
|
502
|
-
requiredFor: []
|
|
496
|
+
requiredFor: ["MANDATE_CREATION", "DIFFUSION"]
|
|
503
497
|
},
|
|
504
498
|
{
|
|
505
499
|
name: "isBusinessAssetsTransfer",
|
|
506
500
|
fieldType: "radio-boolean",
|
|
507
501
|
label: "Cession de fonds de commerce",
|
|
508
502
|
condition: and(only("isForProfessionalUse"), not("isCommercialWallsSale")),
|
|
509
|
-
requiredFor: []
|
|
503
|
+
requiredFor: ["MANDATE_CREATION", "DIFFUSION"]
|
|
510
504
|
},
|
|
511
505
|
{
|
|
512
506
|
name: "isLeaseRightsTransfer",
|
|
513
507
|
fieldType: "radio-boolean",
|
|
514
508
|
label: "Cession de droit au bail",
|
|
515
509
|
condition: and(only("isForProfessionalUse"), not("isCommercialWallsSale")),
|
|
516
|
-
requiredFor: []
|
|
510
|
+
requiredFor: ["MANDATE_CREATION", "DIFFUSION"]
|
|
517
511
|
},
|
|
518
512
|
{
|
|
519
513
|
name: "brandName",
|