@silexpert/core 1.0.154 → 1.0.155

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.
Files changed (35) hide show
  1. package/es/types/Enum/PrestationType.d.ts +5 -2626
  2. package/es/types/Enum/PrestationType.d.ts.map +1 -1
  3. package/es/types/Enum/PrestationType.js +1674 -1511
  4. package/es/types/Enum/PrestationType.js.map +1 -1
  5. package/es/types/Interface/models/IExercicePrestation.d.ts +2 -1
  6. package/es/types/Interface/models/IExercicePrestation.d.ts.map +1 -1
  7. package/es/types/Interface/models/IExercicePrestation.js.map +1 -1
  8. package/es/types/Interface/models/IPrestation.d.ts +13 -10
  9. package/es/types/Interface/models/IPrestation.d.ts.map +1 -1
  10. package/es/types/Interface/models/IPrestation.js.map +1 -1
  11. package/es/types/Interface/models/IPrestationList.d.ts +3 -2
  12. package/es/types/Interface/models/IPrestationList.d.ts.map +1 -1
  13. package/es/types/Interface/models/IPrestationList.js.map +1 -1
  14. package/es/types/Interface/models/ITerminationList.d.ts +7 -4
  15. package/es/types/Interface/models/ITerminationList.d.ts.map +1 -1
  16. package/es/types/Interface/models/ITerminationList.js.map +1 -1
  17. package/es/utils/prestation.d.ts +4 -1
  18. package/es/utils/prestation.d.ts.map +1 -1
  19. package/es/utils/prestation.js +18 -1
  20. package/es/utils/prestation.js.map +1 -1
  21. package/js/types/Enum/PrestationType.js +1837 -1674
  22. package/js/types/Enum/PrestationType.js.map +1 -1
  23. package/js/types/Interface/models/IExercicePrestation.js.map +1 -1
  24. package/js/types/Interface/models/IPrestation.js.map +1 -1
  25. package/js/types/Interface/models/IPrestationList.js.map +1 -1
  26. package/js/types/Interface/models/ITerminationList.js.map +1 -1
  27. package/js/utils/prestation.js +17 -1
  28. package/js/utils/prestation.js.map +1 -1
  29. package/package.json +1 -1
  30. package/ts/types/Enum/PrestationType.ts +1681 -1512
  31. package/ts/types/Interface/models/IExercicePrestation.ts +2 -1
  32. package/ts/types/Interface/models/IPrestation.ts +13 -10
  33. package/ts/types/Interface/models/IPrestationList.ts +3 -2
  34. package/ts/types/Interface/models/ITerminationList.ts +7 -4
  35. package/ts/utils/prestation.ts +23 -1
@@ -4,6 +4,7 @@ import { IExercice } from '../..';
4
4
  export interface IExercicePrestation {
5
5
  id?: number;
6
6
  priceHt: number | null;
7
+ customerPriceHt: number | null;
7
8
  totalPrestation: number | null;
8
9
  monthNumber: number | null;
9
10
  amountSocial: number | null;
@@ -14,7 +15,7 @@ export interface IExercicePrestation {
14
15
  updatedAt?: Date | null;
15
16
  idExercice: number | null;
16
17
  idPrestation: number | null;
17
- prestation: IPrestation;
18
+ prestation?: IPrestation;
18
19
  balanceSheet?: IBalanceSheet;
19
20
  exercice?: IExercice;
20
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"IExercicePrestation.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IExercicePrestation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,MAAM,WAAW,mBAAmB;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAG5B,UAAU,EAAE,WAAW,CAAC;IACxB,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
1
+ {"version":3,"file":"IExercicePrestation.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IExercicePrestation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,MAAM,WAAW,mBAAmB;IAClC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,OAAO,CAAC;IAChB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAG5B,UAAU,CAAC,EAAE,WAAW,CAAC;IACzB,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"IExercicePrestation.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IExercicePrestation.ts"],"names":[],"mappings":"","sourcesContent":["import { IPrestation } from './IPrestation';\nimport { IBalanceSheet } from './IBalanceSheet';\nimport { IExercice } from '../..';\n\n// exercicesPrestations\nexport interface IExercicePrestation {\n id?: number;\n priceHt: number | null;\n totalPrestation: number | null;\n monthNumber: number | null;\n amountSocial: number | null;\n monthOffers: number | null;\n isInCA: boolean;\n idBalanceSheet: number | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n idExercice: number | null;\n idPrestation: number | null;\n\n // Associations\n prestation: IPrestation;\n balanceSheet?: IBalanceSheet;\n exercice?: IExercice;\n}\n"]}
1
+ {"version":3,"file":"IExercicePrestation.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IExercicePrestation.ts"],"names":[],"mappings":"","sourcesContent":["import { IPrestation } from './IPrestation';\nimport { IBalanceSheet } from './IBalanceSheet';\nimport { IExercice } from '../..';\n\n// exercicesPrestations\nexport interface IExercicePrestation {\n id?: number;\n priceHt: number | null;\n customerPriceHt: number | null;\n totalPrestation: number | null;\n monthNumber: number | null;\n amountSocial: number | null;\n monthOffers: number | null;\n isInCA: boolean;\n idBalanceSheet: number | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n idExercice: number | null;\n idPrestation: number | null;\n\n // Associations\n prestation?: IPrestation;\n balanceSheet?: IBalanceSheet;\n exercice?: IExercice;\n}\n"]}
@@ -5,6 +5,7 @@ import { IPrestationComplementary } from './IPrestationComplementary';
5
5
  import { ISociety } from './ISociety';
6
6
  import { IExercicePrestation } from './IExercicePrestation';
7
7
  import { ICustomerSignature } from './ICustomerSignature';
8
+ import { ITerminationList } from './ITerminationList';
8
9
  export interface IPrestation {
9
10
  id?: number;
10
11
  numPrestation: string | null;
@@ -24,6 +25,7 @@ export interface IPrestation {
24
25
  dateValidPrestation: Date | null;
25
26
  goToOnboarding: Date | null;
26
27
  goToClient: Date | null;
28
+ scoring: number | null;
27
29
  state: boolean;
28
30
  commentPdf: string | null;
29
31
  token: string | null;
@@ -42,15 +44,16 @@ export interface IPrestation {
42
44
  createdAt?: Date | null;
43
45
  updatedAt?: Date | null;
44
46
  deletedAt?: Date | null;
45
- exercices: IExercice[];
46
- prestationsPayments: IPayment[];
47
- prestationsList: IPrestationList;
48
- prestationsComplementary: IPrestationComplementary;
49
- prestationJuridique: IPrestation;
50
- prestationSocial: IPrestation;
51
- prestationCreation: IPrestation;
52
- societiesPrestations: ISociety;
53
- prestationsDetailsBeforeExercice: IExercicePrestation[];
54
- customersSignatures: ICustomerSignature[];
47
+ exercices?: IExercice[];
48
+ prestationsPayments?: IPayment[];
49
+ prestationsList?: IPrestationList;
50
+ prestationsComplementary?: IPrestationComplementary;
51
+ prestationJuridique?: IPrestation;
52
+ prestationSocial?: IPrestation;
53
+ prestationCreation?: IPrestation;
54
+ societiesPrestations?: ISociety;
55
+ prestationsDetailsBeforeExercice?: IExercicePrestation[];
56
+ customersSignatures?: ICustomerSignature[];
57
+ terminationsList?: ITerminationList;
55
58
  }
56
59
  //# sourceMappingURL=IPrestation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IPrestation.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IPrestation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,MAAM,WAAW,WAAW;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,kBAAkB,E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AI,CAAC;IAGxB,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC;IACxB,mBAAmB,CAAC,EAAE,QAAQ,EAAE,CAAC;IACjC,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,wBAAwB,CAAC,EAAE,wBAAwB,CAAC;IACpD,mBAAmB,CAAC,EAAE,WAAW,CAAC;IAClC,gBAAgB,CAAC,EAAE,WAAW,CAAC;IAC/B,kBAAkB,CAAC,EAAE,WAAW,CAAC;IACjC,oBAAoB,CAAC,EAAE,QAAQ,CAAC;IAChC,gCAAgC,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACzD,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAC3C,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;CACrC"}
@@ -1 +1 @@
1
- {"version":3,"file":"IPrestation.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IPrestation.ts"],"names":[],"mappings":"","sourcesContent":["import { IExercice } from './IExercice';\nimport { IPayment } from './IPayment';\nimport { IPrestationList } from './IPrestationList';\nimport { IPrestationComplementary } from './IPrestationComplementary';\nimport { ISociety } from './ISociety';\nimport { IExercicePrestation } from './IExercicePrestation';\nimport { ICustomerSignature } from './ICustomerSignature';\n\n// prestations\nexport interface IPrestation {\n id?: number;\n numPrestation: string | null;\n statePrevi: number | null;\n archive: boolean;\n withStatuteDrafted: boolean | null;\n withCaptainContrat: boolean | null;\n withStatutesApportNature: boolean | null;\n withStatutesAutorisationTutelle: boolean | null;\n withStatutesFileAccre: boolean | null;\n paid: boolean | null;\n signed: boolean | null;\n toAdministratif: number | null;\n goToAdministratif: Date | null;\n administratifStatus: number;\n toConstitution: number;\n dateValidPrestation: Date | null;\n goToOnboarding: Date | null;\n goToClient: Date | null;\n state: boolean;\n commentPdf: string | null;\n token: string | null;\n size: number | null;\n inProgress: number | null;\n idSociety: number;\n idPrestationList: number;\n idPrestationComplementary: number | null;\n gestionJuridique: boolean;\n idPrestationSocial: number | null;\n idPrestationJuridique: number | null;\n idPrestationCreation: number | null;\n totalAmount?: number;\n discountAmount?: number;\n debitType?: string;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n deletedAt?: Date | null;\n\n // Associations\n exercices: IExercice[];\n prestationsPayments: IPayment[];\n prestationsList: IPrestationList;\n prestationsComplementary: IPrestationComplementary;\n prestationJuridique: IPrestation;\n prestationSocial: IPrestation;\n prestationCreation: IPrestation;\n societiesPrestations: ISociety;\n prestationsDetailsBeforeExercice: IExercicePrestation[];\n customersSignatures: ICustomerSignature[];\n}\n"]}
1
+ {"version":3,"file":"IPrestation.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IPrestation.ts"],"names":[],"mappings":"","sourcesContent":["import { IExercice } from './IExercice';\nimport { IPayment } from './IPayment';\nimport { IPrestationList } from './IPrestationList';\nimport { IPrestationComplementary } from './IPrestationComplementary';\nimport { ISociety } from './ISociety';\nimport { IExercicePrestation } from './IExercicePrestation';\nimport { ICustomerSignature } from './ICustomerSignature';\nimport { ITerminationList } from './ITerminationList';\n\n// prestations\nexport interface IPrestation {\n id?: number;\n numPrestation: string | null;\n statePrevi: number | null;\n archive: boolean;\n withStatuteDrafted: boolean | null;\n withCaptainContrat: boolean | null;\n withStatutesApportNature: boolean | null;\n withStatutesAutorisationTutelle: boolean | null;\n withStatutesFileAccre: boolean | null;\n paid: boolean | null;\n signed: boolean | null;\n toAdministratif: number | null;\n goToAdministratif: Date | null;\n administratifStatus: number;\n toConstitution: number;\n dateValidPrestation: Date | null;\n goToOnboarding: Date | null;\n goToClient: Date | null;\n scoring: number | null;\n state: boolean;\n commentPdf: string | null;\n token: string | null;\n size: number | null;\n inProgress: number | null;\n idSociety: number;\n idPrestationList: number;\n idPrestationComplementary: number | null;\n gestionJuridique: boolean;\n idPrestationSocial: number | null;\n idPrestationJuridique: number | null;\n idPrestationCreation: number | null;\n totalAmount?: number;\n discountAmount?: number;\n debitType?: string;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n deletedAt?: Date | null;\n\n // Associations\n exercices?: IExercice[];\n prestationsPayments?: IPayment[];\n prestationsList?: IPrestationList;\n prestationsComplementary?: IPrestationComplementary;\n prestationJuridique?: IPrestation;\n prestationSocial?: IPrestation;\n prestationCreation?: IPrestation;\n societiesPrestations?: ISociety;\n prestationsDetailsBeforeExercice?: IExercicePrestation[];\n customersSignatures?: ICustomerSignature[];\n terminationsList?: ITerminationList;\n}\n"]}
@@ -13,8 +13,9 @@ export interface IPrestationList {
13
13
  isComplementary: boolean;
14
14
  signaturePosition: string | null;
15
15
  signaturePage: number | null;
16
- textDefault: string | null;
17
- color: string | null;
16
+ textDefault?: string;
17
+ color?: string;
18
+ point?: number;
18
19
  createdAt?: Date | null;
19
20
  updatedAt?: Date | null;
20
21
  }
@@ -1 +1 @@
1
- {"version":3,"file":"IPrestationList.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IPrestationList.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,eAAe;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,eAAe,EAAE,OAAO,CAAC;IACzB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACzB"}
1
+ {"version":3,"file":"IPrestationList.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IPrestationList.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,eAAe;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,OAAO,CAAC;IAChB,eAAe,EAAE,OAAO,CAAC;IACzB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"IPrestationList.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IPrestationList.ts"],"names":[],"mappings":"","sourcesContent":["// prestationsList\nexport interface IPrestationList {\n id?: number;\n name: string;\n isComptable: boolean;\n isJuridique: boolean;\n isSocial: boolean;\n isAttestation: boolean;\n inAverageCart: boolean;\n isBack: boolean;\n price: number | null;\n isCatalog: boolean;\n hidden: boolean;\n isComplementary: boolean;\n signaturePosition: string | null;\n signaturePage: number | null;\n textDefault: string | null;\n color: string | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n}\n"]}
1
+ {"version":3,"file":"IPrestationList.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/IPrestationList.ts"],"names":[],"mappings":"","sourcesContent":["// prestationsList\nexport interface IPrestationList {\n id?: number;\n name: string;\n isComptable: boolean;\n isJuridique: boolean;\n isSocial: boolean;\n isAttestation: boolean;\n inAverageCart: boolean;\n isBack: boolean;\n price: number | null;\n isCatalog: boolean;\n hidden: boolean;\n isComplementary: boolean;\n signaturePosition: string | null;\n signaturePage: number | null;\n textDefault?: string;\n color?: string;\n point?: number;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n}\n"]}
@@ -2,6 +2,7 @@ import { IReasonTermination } from './IReasonTermination';
2
2
  import { ISociety } from './ISociety';
3
3
  import { IExercice } from './IExercice';
4
4
  import { IUser } from './IUser';
5
+ import { IPrestation } from './IPrestation';
5
6
  export interface ITerminationList {
6
7
  id?: number;
7
8
  comment: string | null;
@@ -13,12 +14,14 @@ export interface ITerminationList {
13
14
  refund: boolean;
14
15
  idReasonTermination: number | null;
15
16
  idSociety: number | null;
17
+ idPrestation: number | null;
16
18
  idCollaborateur: number | null;
17
19
  createdAt?: Date | null;
18
20
  updatedAt?: Date | null;
19
- reasonTermination: IReasonTermination;
20
- societiesTerminations: ISociety;
21
- exercice: IExercice;
22
- user: IUser;
21
+ reasonTermination?: IReasonTermination;
22
+ societiesTerminations?: ISociety;
23
+ exercice?: IExercice;
24
+ user?: IUser;
25
+ prestation?: IPrestation;
23
26
  }
24
27
  //# sourceMappingURL=ITerminationList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ITerminationList.d.ts","sourceRoot":"","sources":["../../../../ts/types/Interface/models/ITerminationList.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAGhC,MAAM,WAAW,g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,CAAC;IAC1C,aAAa,EAAE,IAAI,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,eAAe,EAAE,IAAI,GAAG,IAAI,CAAC;IAC7B,MAAM,EAAE,OAAO,CAAC;IAChB,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IAGxB,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;IACvC,qBAAqB,CAAC,EAAE,QAAQ,CAAC;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,UAAU,CAAC,EAAE,WAAW,CAAC;CAC1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"ITerminationList.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/ITerminationList.ts"],"names":[],"mappings":"","sourcesContent":["import { IReasonTermination } from './IReasonTermination';\nimport { ISociety } from './ISociety';\nimport { IExercice } from './IExercice';\nimport { IUser } from './IUser';\n\n// terminitionsList\nexport interface ITerminationList {\n id?: number;\n comment: string | null;\n recalledCustomer: Date | null;\n recalledCustomerBySupervisor: Date | null;\n effectiveDate: Date | null;\n idExercice: number | null;\n endContractDate: Date | null;\n refund: boolean;\n idReasonTermination: number | null;\n idSociety: number | null;\n idCollaborateur: number | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n\n // Associations\n reasonTermination: IReasonTermination;\n societiesTerminations: ISociety;\n exercice: IExercice;\n user: IUser;\n}\n"]}
1
+ {"version":3,"file":"ITerminationList.js","sourceRoot":"","sources":["../../../../ts/types/Interface/models/ITerminationList.ts"],"names":[],"mappings":"","sourcesContent":["import { IReasonTermination } from './IReasonTermination';\nimport { ISociety } from './ISociety';\nimport { IExercice } from './IExercice';\nimport { IUser } from './IUser';\nimport { IPrestation } from './IPrestation';\n\n// terminitionsList\nexport interface ITerminationList {\n id?: number;\n comment: string | null;\n recalledCustomer: Date | null;\n recalledCustomerBySupervisor: Date | null;\n effectiveDate: Date | null;\n idExercice: number | null;\n endContractDate: Date | null;\n refund: boolean;\n idReasonTermination: number | null;\n idSociety: number | null;\n idPrestation: number | null;\n idCollaborateur: number | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n\n // Associations\n reasonTermination?: IReasonTermination;\n societiesTerminations?: ISociety;\n exercice?: IExercice;\n user?: IUser;\n prestation?: IPrestation;\n}\n"]}
@@ -1,3 +1,5 @@
1
+ import { IPrestation } from '../types';
2
+ import { PrestationType } from '../types/Enum/PrestationType';
1
3
  declare const isOtherAccountingMissions: (idPrestationList: number) => boolean;
2
4
  declare const isOtherJuridicalMissions: (isJuridique: boolean, isCatalog: boolean, idPrestationList: number) => boolean;
3
5
  declare const isOtherSocialMission: (idPrestationList: number) => boolean;
@@ -7,5 +9,6 @@ declare const isOnlySocial: (idPrestationList: number[]) => boolean;
7
9
  declare const isOnlyJuridic: (idPrestationList: number[]) => boolean;
8
10
  declare const isCreation: (idPrestationList: number[]) => boolean;
9
11
  declare const isExpress: (idPrestationList: number) => boolean;
10
- export { isOtherAccountingMissions, isOtherJuridicalMissions, isAdditionalPresta, isOtherSocialMission, isOnlyPrevi, isOnlySocial, isOnlyJuridic, isCreation, isExpress, };
12
+ declare const calculateScoringOfPrestation: (idPrestationType: PrestationType, prestations: IPrestation[]) => number;
13
+ export { isOtherAccountingMissions, isOtherJuridicalMissions, isAdditionalPresta, isOtherSocialMission, isOnlyPrevi, isOnlySocial, isOnlyJuridic, isCreation, isExpress, calculateScoringOfPrestation, };
11
14
  //# sourceMappingURL=prestation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prestation.d.ts","sourceRoot":"","sources":["../../ts/utils/prestation.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,yBAAyB,qBAAsB,MAAM,KAAG,OAOC,CAAC;AAEhE,QAAA,MAAM,wBAAwB,gBAAgB,OAAO,aAAY,OAAO,oBAAoB,MAAM,KAAG,OAA4F,CAAC;AAElM,QAAA,MAAM,oBAAoB,qBAAsB,MAAM,KAAG,OAA8E,CAAC;AAExI,QAAA,MAAM,kBAAkB,WAAW,OAAO,aAAY,OAAO,KAAG,OAA+B,CAAC;AAEhG,QAAA,MAAM,WAAW,qBAAsB,MAAM,EAAE,KAAE,OAAmK,CAAC;AAErN,QAAA,MAAM,YAAY,qBAAsB,MAAM,EAAE,KAAE,OAA+H,CAAC;AAElL,QAAA,MAAM,aAAa,qBAAsB,MAAM,EAAE,KAAE,OAA+G,CAAC;AAEnK,QAAA,MAAM,UAAU,qBAAsB,MAAM,EAAE,KAAE,OAAqE,CAAC;AAEtH,QAAA,MAAM,SAAS,qBAAsB,MAAM,KAAE,OAI5C,CAAC;AAEF,OAAO,EACL,yBAAyB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,GAC/J,CAAC"}
1
+ {"version":3,"file":"prestation.d.ts","sourceRoot":"","sources":["../../ts/utils/prestation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAoB,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEhF,QAAA,MAAM,yBAAyB,qBAAsB,MAAM,KAAG,OAOC,CAAC;AAEhE,QAAA,MAAM,wBAAwB,gBAAgB,OAAO,aAAY,OAAO,oBAAoB,MAAM,KAAG,OAA4F,CAAC;AAElM,QAAA,MAAM,oBAAoB,qBAAsB,MAAM,KAAG,OAA8E,CAAC;AAExI,QAAA,MAAM,kBAAkB,WAAW,OAAO,aAAY,OAAO,KAAG,OAA+B,CAAC;AAEhG,QAAA,MAAM,WAAW,qBAAsB,MAAM,EAAE,KAAE,OAAmK,CAAC;AAErN,QAAA,MAAM,YAAY,qBAAsB,MAAM,EAAE,KAAE,OAA+H,CAAC;AAElL,QAAA,MAAM,aAAa,qBAAsB,MAAM,EAAE,KAAE,OAA+G,CAAC;AAEnK,QAAA,MAAM,UAAU,qBAAsB,MAAM,EAAE,KAAE,OAAqE,CAAC;AAEtH,QAAA,MAAM,SAAS,qBAAsB,MAAM,KAAE,OAI5C,CAAC;AAEF,QAAA,MAAM,4BAA4B,qBAAsB,cAAc,eAAe,WAAW,EAAE,KAAG,MAmBpG,CAAC;AAEF,OAAO,EACL,yBAAyB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,4BAA4B,GAC7L,CAAC"}
@@ -20,5 +20,22 @@ const isExpress = (idPrestationList) => {
20
20
  const prestaList = prestationDetailValues.find((pr) => pr.id === idPrestationList);
21
21
  return !!prestaList.isBack;
22
22
  };
23
- export { isOtherAccountingMissions, isOtherJuridicalMissions, isAdditionalPresta, isOtherSocialMission, isOnlyPrevi, isOnlySocial, isOnlyJuridic, isCreation, isExpress, };
23
+ const calculateScoringOfPrestation = (idPrestationType, prestations) => {
24
+ // Get the list of prestations that are half price
25
+ const prestationHalfPriceList = Object.values(PrestationDetail).filter((p) => p.isComptable && !p.isCatalog);
26
+ const prestationHalfPriceIds = prestationHalfPriceList.map((t) => t.id);
27
+ // Get the number of points for the prestation
28
+ const prestaDetails = Object.values(PrestationDetail).find((prestaDetail) => prestaDetail.id === idPrestationType);
29
+ const numberPoint = (prestaDetails === null || prestaDetails === void 0 ? void 0 : prestaDetails.point) || 0;
30
+ // Find the prestation with the same idPrestationList and they need to be paid and signed
31
+ const samePrestation = prestations.filter((prestation) => (prestation.idPrestationList === idPrestationType) && (prestation.paid === true && prestation.signed === true && prestation.terminationsList === null));
32
+ // If there is no prestation with the same idPrestationList, return 100% of points
33
+ if (samePrestation.length === 0)
34
+ return numberPoint;
35
+ // If the prestation is in the list of half price prestation, return 50% of points
36
+ if (prestationHalfPriceIds.includes(idPrestationType))
37
+ return numberPoint * 0.5;
38
+ return 0;
39
+ };
40
+ export { isOtherAccountingMissions, isOtherJuridicalMissions, isAdditionalPresta, isOtherSocialMission, isOnlyPrevi, isOnlySocial, isOnlyJuridic, isCreation, isExpress, calculateScoringOfPrestation, };
24
41
  //# sourceMappingURL=prestation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"prestation.js","sourceRoot":"","sources":["../../ts/utils/prestation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEhF,MAAM,yBAAyB,GAAG,CAAC,gBAAwB,EAAW,EAAE,CAAC;IACvE,cAAc,CAAC,YAAY;IAC3B,cAAc,CAAC,mBAAmB;IAClC,cAAc,CAAC,wCAAwC;IACvD,cAAc,CAAC,uBAAuB;IACtC,cAAc,CAAC,GAAG;IAClB,cAAc,CAAC,aAAa;IAC5B,cAAc,CAAC,kBAAkB;CAAC,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AAEhE,MAAM,wBAAwB,GAAG,CAAC,WAAmB,EAAE,SAAiB,EAAE,gBAAwB,EAAW,EAAE,CAAC,gBAAgB,KAAK,cAAc,CAAC,iBAAiB,IAAI,SAAS,IAAI,WAAW,CAAC;AAElM,MAAM,oBAAoB,GAAG,CAAC,gBAAwB,EAAW,EAAE,CAAC,gBAAgB,KAAK,cAAc,CAAC,+BAA+B,CAAC;AAExI,MAAM,kBAAkB,GAAG,CAAC,MAAc,EAAE,SAAiB,EAAW,EAAE,CAAC,CAAC,MAAM,IAAI,SAAS,CAAC;AAEhG,MAAM,WAAW,GAAG,CAAC,gBAA0B,EAAU,EAAE,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,IAAW,EAAE,EAAE,CAAC,CA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(idPrestationList: number): boolean => [\n PrestationType.PREVISIONNEL,\n PrestationType.BILAN_INTERMEDIAIRE,\n PrestationType.AVANCE_OU_ABANDON_COMPTE_COURANT_ASSOCIE,\n PrestationType.AUTRE_MISSION_COMPTABLE,\n PrestationType.TVS,\n PrestationType.ETUDE_FISCALE,\n PrestationType.BILAN_PREVISIONNEL].includes(idPrestationList);\n\nconst isOtherJuridicalMissions = (isJuridique:boolean, isCatalog:boolean, idPrestationList: number): boolean => idPrestationList !== PrestationType.GESTION_JURIDIQUE && isCatalog && isJuridique;\n\nconst isOtherSocialMission = (idPrestationList: number): boolean => idPrestationList === PrestationType.AUTRE_MISSION_SOCIALE_HORS_PAIE;\n\nconst isAdditionalPresta = (hidden:boolean, isCatalog:boolean): boolean => !hidden && isCatalog;\n\nconst isOnlyPrevi = (idPrestationList: number[]):boolean => !idPrestationList.filter((idPL:number) => ![PrestationType.PREVISIONNEL, PrestationType.BILAN_PREVISIONNEL, PrestationType.PV_AG].includes(idPL)).length;\n\nconst isOnlySocial = (idPrestationList: number[]):boolean => !idPrestationList.filter((idPL:number) => ![PrestationType.FRUCTUPAIE, PrestationType.SOCIAL].includes(idPL)).length;\n\nconst isOnlyJuridic = (idPrestationList: number[]):boolean => !idPrestationList.filter((idPL:number) => ![PrestationType.GESTION_JURIDIQUE].includes(idPL)).length;\n\nconst isCreation = (idPrestationList: number[]):boolean => idPrestationList.includes(PrestationType.CREATION_SOCIETE);\n\nconst isExpress = (idPrestationList: number):boolean => {\n const prestationDetailValues = Object.values(PrestationDetail) as any;\n const prestaList = prestationDetailValues.find((pr:any) => pr.id === idPrestationList);\n return !!prestaList.isBack;\n};\n\nexport {\n isOtherAccountingMissions, isOtherJuridicalMissions, isAdditionalPresta, isOtherSocialMission, isOnlyPrevi, isOnlySocial, isOnlyJuridic, isCreation, isExpress,\n};"]}
1
+ {"version":3,"file":"prestation.js","sourceRoot":"","sources":["../../ts/utils/prestation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,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9C,yFAAyF;IACzF,MAAM,cAAc,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,gBAAgB,KAAK,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,KAAK,IAAI,IAAI,UAAU,CAAC,MAAM,KAAK,IAAI,IAAI,UAAU,CAAC,gBAAgB,KAAK,IAAI,CAAC,CAAC,CAAC;IAElN,kFAAkF;IAClF,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,WAAW,CAAC;IAEpD,kFAAkF;IAClF,IAAI,sBAAsB,CAAC,QAAQ,CAAC,gBAAgB,CAAC;QAAE,OAAO,WAAW,GAAG,GAAG,CAAC;IAEhF,OAAO,CAAC,CAAC;AACX,CAAC,CAAC;AAEF,OAAO,EACL,yBAAyB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,4BAA4B,GAC7L,CAAC","sourcesContent":["import { IPrestation } from '../types';\nimport { PrestationDetail, PrestationType } from '../types/Enum/PrestationType';\n\nconst isOtherAccountingMissions = (idPrestationList: number): boolean => [\n PrestationType.PREVISIONNEL,\n PrestationType.BILAN_INTERMEDIAIRE,\n PrestationType.AVANCE_OU_ABANDON_COMPTE_COURANT_ASSOCIE,\n PrestationType.AUTRE_MISSION_COMPTABLE,\n PrestationType.TVS,\n PrestationType.ETUDE_FISCALE,\n PrestationType.BILAN_PREVISIONNEL].includes(idPrestationList);\n\nconst isOtherJuridicalMissions = (isJuridique:boolean, isCatalog:boolean, idPrestationList: number): boolean => idPrestationList !== PrestationType.GESTION_JURIDIQUE && isCatalog && isJuridique;\n\nconst isOtherSocialMission = (idPrestationList: number): boolean => idPrestationList === PrestationType.AUTRE_MISSION_SOCIALE_HORS_PAIE;\n\nconst isAdditionalPresta = (hidden:boolean, isCatalog:boolean): boolean => !hidden && isCatalog;\n\nconst isOnlyPrevi = (idPrestationList: number[]):boolean => !idPrestationList.filter((idPL:number) => ![PrestationType.PREVISIONNEL, PrestationType.BILAN_PREVISIONNEL, PrestationType.PV_AG].includes(idPL)).length;\n\nconst isOnlySocial = (idPrestationList: number[]):boolean => !idPrestationList.filter((idPL:number) => ![PrestationType.FRUCTUPAIE, PrestationType.SOCIAL].includes(idPL)).length;\n\nconst isOnlyJuridic = (idPrestationList: number[]):boolean => !idPrestationList.filter((idPL:number) => ![PrestationType.GESTION_JURIDIQUE].includes(idPL)).length;\n\nconst isCreation = (idPrestationList: number[]):boolean => idPrestationList.includes(PrestationType.CREATION_SOCIETE);\n\nconst isExpress = (idPrestationList: number):boolean => {\n const prestationDetailValues = Object.values(PrestationDetail) as any;\n const prestaList = prestationDetailValues.find((pr:any) => pr.id === idPrestationList);\n return !!prestaList.isBack;\n};\n\nconst calculateScoringOfPrestation = (idPrestationType: PrestationType, prestations: IPrestation[]): number => {\n // Get the list of prestations that are half price\n const prestationHalfPriceList = Object.values(PrestationDetail).filter((p) => p.isComptable && !p.isCatalog);\n const prestationHalfPriceIds = prestationHalfPriceList.map((t) => t.id);\n\n // Get the number of points for the prestation\n const prestaDetails = Object.values(PrestationDetail).find((prestaDetail) => prestaDetail.id === idPrestationType);\n const numberPoint = prestaDetails?.point || 0;\n\n // Find the prestation with the same idPrestationList and they need to be paid and signed\n const samePrestation = prestations.filter((prestation) => (prestation.idPrestationList === idPrestationType) && (prestation.paid === true && prestation.signed === true && prestation.terminationsList === null));\n\n // If there is no prestation with the same idPrestationList, return 100% of points\n if (samePrestation.length === 0) return numberPoint;\n\n // If the prestation is in the list of half price prestation, return 50% of points\n if (prestationHalfPriceIds.includes(idPrestationType)) return numberPoint * 0.5;\n\n return 0;\n};\n\nexport {\n isOtherAccountingMissions, isOtherJuridicalMissions, isAdditionalPresta, isOtherSocialMission, isOnlyPrevi, isOnlySocial, isOnlyJuridic, isCreation, isExpress, calculateScoringOfPrestation,\n};"]}