@silexpert/core 1.0.80 → 1.0.81
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/es/utils/commercialManagement/thirdParty.js +1 -1
- package/es/utils/commercialManagement/thirdParty.js.map +1 -1
- package/js/utils/commercialManagement/thirdParty.js +2 -2
- package/js/utils/commercialManagement/thirdParty.js.map +1 -1
- package/package.json +1 -1
- package/ts/utils/commercialManagement/thirdParty.ts +2 -2
|
@@ -2,6 +2,6 @@ import { isDefined } from 'class-validator';
|
|
|
2
2
|
import { CountryList } from '../../types/Enum/Country';
|
|
3
3
|
export function thirdPartyToReadThirdPartyEditing(payload) {
|
|
4
4
|
var _a, _b, _c, _d, _e, _f;
|
|
5
|
-
return Object.assign(Object.assign({}, payload), { country: isDefined(payload.idCountry) ? (_c = (_b = (_a = CountryList.find((c) => c.id === payload.idCountry)) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.toUpperCase()) !== null && _c !== void 0 ? _c : null : null, deliveryCountry: isDefined(payload.deliveryIdCountry) ? (_f = (_e = (_d = CountryList.find((c) => c.id === payload.deliveryIdCountry)) === null || _d === void 0 ? void 0 : _d.name) === null || _e === void 0 ? void 0 : _e.toUpperCase()) !== null && _f !== void 0 ? _f : null : null });
|
|
5
|
+
return Object.assign(Object.assign({}, payload), { country: isDefined(payload === null || payload === void 0 ? void 0 : payload.idCountry) ? (_c = (_b = (_a = CountryList.find((c) => c.id === payload.idCountry)) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.toUpperCase()) !== null && _c !== void 0 ? _c : null : null, deliveryCountry: isDefined(payload === null || payload === void 0 ? void 0 : payload.deliveryIdCountry) ? (_f = (_e = (_d = CountryList.find((c) => c.id === payload.deliveryIdCountry)) === null || _d === void 0 ? void 0 : _d.name) === null || _e === void 0 ? void 0 : _e.toUpperCase()) !== null && _f !== void 0 ? _f : null : null });
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=thirdParty.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thirdParty.js","sourceRoot":"","sources":["../../../ts/utils/commercialManagement/thirdParty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,UAAU,iCAAiC,CAAC,OAAoB;;IACpE,uCACK,OAAO,KACV,OAAO,EAAE,SAAS,CAAC,OAAO,
|
|
1
|
+
{"version":3,"file":"thirdParty.js","sourceRoot":"","sources":["../../../ts/utils/commercialManagement/thirdParty.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,UAAU,iCAAiC,CAAC,OAAoB;;IACpE,uCACK,OAAO,KACV,OAAO,EAAE,SAAS,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,CAAC,CAAC,CAAC,CAAC,MAAA,MAAA,MAAA,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,OAAO,CAAC,SAAS,CAAC,0CAAE,IAAI,0CAAE,WAAW,EAAE,mCAAI,IAAI,CAAC,CAAC,CAAC,IAAI,EAChI,eAAe,EAAE,SAAS,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,MAAA,MAAA,MAAA,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,OAAO,CAAC,iBAAiB,CAAC,0CAAE,IAAI,0CAAE,WAAW,EAAE,mCAAI,IAAI,CAAC,CAAC,CAAC,IAAI,IACxJ;AACJ,CAAC","sourcesContent":["import { isDefined } from 'class-validator';\nimport { IThirdParty, ReadThirdPartyEditing } from '../../types';\nimport { CountryList } from '../../types/Enum/Country';\n\nexport function thirdPartyToReadThirdPartyEditing(payload: IThirdParty): ReadThirdPartyEditing {\n return {\n ...payload,\n country: isDefined(payload?.idCountry) ? CountryList.find((c) => c.id === payload.idCountry)?.name?.toUpperCase() ?? null : null,\n deliveryCountry: isDefined(payload?.deliveryIdCountry) ? CountryList.find((c) => c.id === payload.deliveryIdCountry)?.name?.toUpperCase() ?? null : null,\n };\n}"]}
|
|
@@ -13,8 +13,8 @@ function thirdPartyToReadThirdPartyEditing(payload) {
|
|
|
13
13
|
var _a, _b, _c, _d, _e, _f;
|
|
14
14
|
|
|
15
15
|
return Object.assign(Object.assign({}, payload), {
|
|
16
|
-
country: (0, _classValidator.isDefined)(payload.idCountry) ? (_c = (_b = (_a = _Country.CountryList.find(c => c.id === payload.idCountry)) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.toUpperCase()) !== null && _c !== void 0 ? _c : null : null,
|
|
17
|
-
deliveryCountry: (0, _classValidator.isDefined)(payload.deliveryIdCountry) ? (_f = (_e = (_d = _Country.CountryList.find(c => c.id === payload.deliveryIdCountry)) === null || _d === void 0 ? void 0 : _d.name) === null || _e === void 0 ? void 0 : _e.toUpperCase()) !== null && _f !== void 0 ? _f : null : null
|
|
16
|
+
country: (0, _classValidator.isDefined)(payload === null || payload === void 0 ? void 0 : payload.idCountry) ? (_c = (_b = (_a = _Country.CountryList.find(c => c.id === payload.idCountry)) === null || _a === void 0 ? void 0 : _a.name) === null || _b === void 0 ? void 0 : _b.toUpperCase()) !== null && _c !== void 0 ? _c : null : null,
|
|
17
|
+
deliveryCountry: (0, _classValidator.isDefined)(payload === null || payload === void 0 ? void 0 : payload.deliveryIdCountry) ? (_f = (_e = (_d = _Country.CountryList.find(c => c.id === payload.deliveryIdCountry)) === null || _d === void 0 ? void 0 : _d.name) === null || _e === void 0 ? void 0 : _e.toUpperCase()) !== null && _f !== void 0 ? _f : null : null
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
//# sourceMappingURL=thirdParty.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thirdParty.js","mappings":";;;;;QAIgBA,iC,GAAAA,iC;;AAJhB;;AAEA;;AAEM,SAAUA,iCAAV,CAA4CC,OAA5C,EAAgE;;;EACpE,uCACKA,OADL,GACY;IACVC,OAAO,EAAE,+BAAUD,OAAO,
|
|
1
|
+
{"version":3,"file":"thirdParty.js","mappings":";;;;;QAIgBA,iC,GAAAA,iC;;AAJhB;;AAEA;;AAEM,SAAUA,iCAAV,CAA4CC,OAA5C,EAAgE;;;EACpE,uCACKA,OADL,GACY;IACVC,OAAO,EAAE,+BAAUD,OAAO,SAAP,WAAO,WAAP,GAAO,MAAP,UAAO,CAAEE,SAAnB,IAAgC,uCAAYC,IAAZ,CAAkBC,CAAD,IAAOA,CAAC,CAACC,EAAF,KAASL,OAAO,CAACE,SAAzC,OAAmD,IAAnD,IAAmDI,aAAnD,GAAmD,MAAnD,GAAmDA,GAAEC,IAArD,MAAyD,IAAzD,IAAyDC,aAAzD,GAAyD,MAAzD,GAAyDA,GAAEC,WAAF,EAAzD,MAAwE,IAAxE,IAAwEC,aAAxE,GAAwEA,EAAxE,GAA4E,IAA5G,GAAmH,IADlH;IAEVC,eAAe,EAAE,+BAAUX,OAAO,SAAP,WAAO,WAAP,GAAO,MAAP,UAAO,CAAEY,iBAAnB,IAAwC,uCAAYT,IAAZ,CAAkBC,CAAD,IAAOA,CAAC,CAACC,EAAF,KAASL,OAAO,CAACY,iBAAzC,OAA2D,IAA3D,IAA2DC,aAA3D,GAA2D,MAA3D,GAA2DA,GAAEN,IAA7D,MAAiE,IAAjE,IAAiEO,aAAjE,GAAiE,MAAjE,GAAiEA,GAAEL,WAAF,EAAjE,MAAgF,IAAhF,IAAgFM,aAAhF,GAAgFA,EAAhF,GAAoF,IAA5H,GAAmI;EAF1I,CADZ;AAKD","names":["thirdPartyToReadThirdPartyEditing","payload","country","idCountry","find","c","id","_a","name","_b","toUpperCase","_c","deliveryCountry","deliveryIdCountry","_d","_e","_f"],"sourceRoot":"","sources":["../../../ts/utils/commercialManagement/thirdParty.ts"],"sourcesContent":["import { isDefined } from 'class-validator';\nimport { IThirdParty, ReadThirdPartyEditing } from '../../types';\nimport { CountryList } from '../../types/Enum/Country';\n\nexport function thirdPartyToReadThirdPartyEditing(payload: IThirdParty): ReadThirdPartyEditing {\n return {\n ...payload,\n country: isDefined(payload?.idCountry) ? CountryList.find((c) => c.id === payload.idCountry)?.name?.toUpperCase() ?? null : null,\n deliveryCountry: isDefined(payload?.deliveryIdCountry) ? CountryList.find((c) => c.id === payload.deliveryIdCountry)?.name?.toUpperCase() ?? null : null,\n };\n}"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.81",
|
|
4
4
|
"description": "Silex Core perform HTTP Request and object binding. Silex core helps developers to retrieve and return formatted object",
|
|
5
5
|
"homepage": "https://gitlab.compta-clementine.fr/dev/silex-api",
|
|
6
6
|
"main": "js/index.js",
|
|
@@ -5,7 +5,7 @@ import { CountryList } from '../../types/Enum/Country';
|
|
|
5
5
|
export function thirdPartyToReadThirdPartyEditing(payload: IThirdParty): ReadThirdPartyEditing {
|
|
6
6
|
return {
|
|
7
7
|
...payload,
|
|
8
|
-
country: isDefined(payload
|
|
9
|
-
deliveryCountry: isDefined(payload
|
|
8
|
+
country: isDefined(payload?.idCountry) ? CountryList.find((c) => c.id === payload.idCountry)?.name?.toUpperCase() ?? null : null,
|
|
9
|
+
deliveryCountry: isDefined(payload?.deliveryIdCountry) ? CountryList.find((c) => c.id === payload.deliveryIdCountry)?.name?.toUpperCase() ?? null : null,
|
|
10
10
|
};
|
|
11
11
|
}
|