@silexpert/core 1.1.288 → 1.1.290
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/cjs/api/resources/Society.d.ts +3 -1
- package/dist/cjs/api/resources/Society.d.ts.map +1 -1
- package/dist/cjs/api/resources/Society.js +8 -0
- package/dist/cjs/api/resources/Society.js.map +1 -1
- package/dist/cjs/types/Enum/CommercialOfferType.d.ts +13 -0
- package/dist/cjs/types/Enum/CommercialOfferType.d.ts.map +1 -1
- package/dist/cjs/types/Enum/CommercialOfferType.js +10 -0
- package/dist/cjs/types/Enum/CommercialOfferType.js.map +1 -1
- package/dist/cjs/types/Enum/TaskResponseType.d.ts +2 -1
- package/dist/cjs/types/Enum/TaskResponseType.d.ts.map +1 -1
- package/dist/cjs/types/Enum/TaskResponseType.js +1 -0
- package/dist/cjs/types/Enum/TaskResponseType.js.map +1 -1
- package/dist/cjs/types/Interface/api/society/QuerySociety.d.ts +7 -0
- package/dist/cjs/types/Interface/api/society/QuerySociety.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/society/QuerySociety.js +28 -1
- package/dist/cjs/types/Interface/api/society/QuerySociety.js.map +1 -1
- package/dist/cjs/types/Interface/models/ICommercialOffer.d.ts +1 -0
- package/dist/cjs/types/Interface/models/ICommercialOffer.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/ICommercialOffer.js.map +1 -1
- package/dist/cjs/types/Interface/models/IFile.d.ts +2 -1
- package/dist/cjs/types/Interface/models/IFile.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IFile.js.map +1 -1
- package/dist/cjs/utils/commercialOffer.d.ts +1 -1
- package/dist/cjs/utils/commercialOffer.d.ts.map +1 -1
- package/dist/cjs/utils/commercialOffer.js +6 -2
- package/dist/cjs/utils/commercialOffer.js.map +1 -1
- package/dist/mjs/api/resources/Society.d.ts +3 -1
- package/dist/mjs/api/resources/Society.d.ts.map +1 -1
- package/dist/mjs/api/resources/Society.js +8 -0
- package/dist/mjs/api/resources/Society.js.map +1 -1
- package/dist/mjs/types/Enum/CommercialOfferType.d.ts +13 -0
- package/dist/mjs/types/Enum/CommercialOfferType.d.ts.map +1 -1
- package/dist/mjs/types/Enum/CommercialOfferType.js +10 -0
- package/dist/mjs/types/Enum/CommercialOfferType.js.map +1 -1
- package/dist/mjs/types/Enum/TaskResponseType.d.ts +2 -1
- package/dist/mjs/types/Enum/TaskResponseType.d.ts.map +1 -1
- package/dist/mjs/types/Enum/TaskResponseType.js +1 -0
- package/dist/mjs/types/Enum/TaskResponseType.js.map +1 -1
- package/dist/mjs/types/Interface/api/society/QuerySociety.d.ts +7 -0
- package/dist/mjs/types/Interface/api/society/QuerySociety.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/society/QuerySociety.js +32 -2
- package/dist/mjs/types/Interface/api/society/QuerySociety.js.map +1 -1
- package/dist/mjs/types/Interface/models/ICommercialOffer.d.ts +1 -0
- package/dist/mjs/types/Interface/models/ICommercialOffer.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/ICommercialOffer.js.map +1 -1
- package/dist/mjs/types/Interface/models/IFile.d.ts +2 -1
- package/dist/mjs/types/Interface/models/IFile.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IFile.js.map +1 -1
- package/dist/mjs/utils/commercialOffer.d.ts +1 -1
- package/dist/mjs/utils/commercialOffer.d.ts.map +1 -1
- package/dist/mjs/utils/commercialOffer.js +6 -2
- package/dist/mjs/utils/commercialOffer.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Society.ts +11 -1
- package/ts/types/Enum/CommercialOfferType.ts +10 -0
- package/ts/types/Enum/TaskResponseType.ts +1 -0
- package/ts/types/Interface/api/society/QuerySociety.ts +25 -2
- package/ts/types/Interface/models/ICommercialOffer.ts +1 -0
- package/ts/types/Interface/models/IFile.ts +2 -1
- package/ts/utils/commercialOffer.ts +7 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IAttachmentFile } from './IAttachmentFile';
|
|
2
2
|
import { IFolderFile } from './IFolderFile';
|
|
3
3
|
import { IFileType } from './IFileType';
|
|
4
|
-
import { ICommercialMail, IMail } from '../..';
|
|
4
|
+
import { ICommercialMail, IMail, IMailAttachment } from '../..';
|
|
5
5
|
|
|
6
6
|
// files
|
|
7
7
|
export interface IFile {
|
|
@@ -20,4 +20,5 @@ export interface IFile {
|
|
|
20
20
|
fileType?: IFileType;
|
|
21
21
|
commercialMails?: ICommercialMail[];
|
|
22
22
|
mails?: IMail[];
|
|
23
|
+
mailAttachment?: IMailAttachment | null;
|
|
23
24
|
}
|
|
@@ -28,8 +28,13 @@ const disableCommercialOffer = (idCurrentOffer: number, idOfferSelected: number[
|
|
|
28
28
|
else return false;
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
const getCommercialOfferList = (idCommercialOfferType: number, societyBrand: number, offerList: ICommercialOffer[], turnoverMax: number, idComptaType: number): ICommercialOffer[] => {
|
|
32
|
-
const commercialOfferList: ICommercialOffer[] = offerList.filter((offer) =>
|
|
31
|
+
const getCommercialOfferList = (idCommercialOfferType: number, societyBrand: number, offerList: ICommercialOffer[], turnoverMax: number, idComptaType: number, idLegalForm: number): ICommercialOffer[] => {
|
|
32
|
+
const commercialOfferList: ICommercialOffer[] = offerList.filter((offer) =>
|
|
33
|
+
offer.idCommercialOfferType === idCommercialOfferType &&
|
|
34
|
+
offer.brand.includes(societyBrand) &&
|
|
35
|
+
((offer.turnoverMax && offer.turnoverMax === turnoverMax) || true) &&
|
|
36
|
+
((offer.idComptaType && ((offer.idComptaType === ComptaType.ACCRUALS && idComptaType % 2 === 0) || (offer.idComptaType === ComptaType.CASH_BASED && !(idComptaType % 2 === 0)))) || true) &&
|
|
37
|
+
(!offer.legalForm || offer.legalForm.includes(idLegalForm)));
|
|
33
38
|
return commercialOfferList.filter(offer => dayjs().isBetween(dayjs(offer.startDate), dayjs(offer.endDate), 'day', '[]'));
|
|
34
39
|
};
|
|
35
40
|
|