@silexpert/core 1.3.204-update-3 → 1.3.205-1
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/Transaction.d.ts +0 -1
- package/dist/cjs/api/resources/Transaction.d.ts.map +1 -1
- package/dist/cjs/api/resources/Transaction.js +0 -3
- package/dist/cjs/api/resources/Transaction.js.map +1 -1
- package/dist/cjs/api/resources/User.d.ts +1 -8
- package/dist/cjs/api/resources/User.d.ts.map +1 -1
- package/dist/cjs/api/resources/User.js +0 -58
- package/dist/cjs/api/resources/User.js.map +1 -1
- package/dist/cjs/api/resources/UsersHistory.d.ts +11 -0
- package/dist/cjs/api/resources/UsersHistory.d.ts.map +1 -0
- package/dist/cjs/api/resources/UsersHistory.js +26 -0
- package/dist/cjs/api/resources/UsersHistory.js.map +1 -0
- package/dist/cjs/api/resources/WorkingSchedule.d.ts +1 -2
- package/dist/cjs/api/resources/WorkingSchedule.d.ts.map +1 -1
- package/dist/cjs/api/resources/WorkingSchedule.js +0 -3
- package/dist/cjs/api/resources/WorkingSchedule.js.map +1 -1
- package/dist/cjs/api/resources.d.ts +2 -0
- package/dist/cjs/api/resources.d.ts.map +1 -1
- package/dist/cjs/api/resources.js +2 -0
- package/dist/cjs/api/resources.js.map +1 -1
- package/dist/cjs/types/Enum/BalanceSheet.js +2 -2
- package/dist/cjs/types/Enum/BalanceSheet.js.map +1 -1
- package/dist/cjs/types/Enum/EquipmentType.d.ts +0 -15
- package/dist/cjs/types/Enum/EquipmentType.d.ts.map +1 -1
- package/dist/cjs/types/Enum/EquipmentType.js +0 -15
- package/dist/cjs/types/Enum/EquipmentType.js.map +1 -1
- package/dist/cjs/types/Enum/SocietyApproval.js +6 -6
- package/dist/cjs/types/Enum/SocietyApproval.js.map +1 -1
- package/dist/cjs/types/Enum/UsersHistory.d.ts +16 -0
- package/dist/cjs/types/Enum/UsersHistory.d.ts.map +1 -0
- package/dist/cjs/types/Enum/UsersHistory.js +38 -0
- package/dist/cjs/types/Enum/UsersHistory.js.map +1 -0
- package/dist/cjs/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.d.ts +0 -13
- package/dist/cjs/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js +1 -14
- package/dist/cjs/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js.map +1 -1
- package/dist/cjs/types/Interface/api/user/CreateCoworker.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/user/CreateCoworker.js +0 -11
- package/dist/cjs/types/Interface/api/user/CreateCoworker.js.map +1 -1
- package/dist/cjs/types/Interface/api/usersHistory/Create.d.ts +8 -0
- package/dist/cjs/types/Interface/api/usersHistory/Create.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/usersHistory/Create.js +35 -0
- package/dist/cjs/types/Interface/api/usersHistory/Create.js.map +1 -0
- package/dist/cjs/types/Interface/api/usersHistory/Update.d.ts +7 -0
- package/dist/cjs/types/Interface/api/usersHistory/Update.d.ts.map +1 -0
- package/dist/cjs/types/Interface/api/usersHistory/Update.js +31 -0
- package/dist/cjs/types/Interface/api/usersHistory/Update.js.map +1 -0
- package/dist/cjs/types/Interface/api/webmail/CreateMailFromLambda.d.ts +7 -6
- package/dist/cjs/types/Interface/api/webmail/CreateMailFromLambda.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/webmail/CreateMailFromLambda.js +1 -2
- package/dist/cjs/types/Interface/api/webmail/CreateMailFromLambda.js.map +1 -1
- package/dist/cjs/types/Interface/models/IUser.d.ts +0 -1
- package/dist/cjs/types/Interface/models/IUser.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IUser.js.map +1 -1
- package/dist/cjs/types/Interface/models/IUsersHistory.d.ts +14 -0
- package/dist/cjs/types/Interface/models/IUsersHistory.d.ts.map +1 -0
- package/dist/cjs/types/Interface/models/IUsersHistory.js +3 -0
- package/dist/cjs/types/Interface/models/IUsersHistory.js.map +1 -0
- package/dist/cjs/types/index.d.ts +4 -0
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/index.js +4 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/cjs/utils/societyApproval.d.ts.map +1 -1
- package/dist/cjs/utils/societyApproval.js +19 -22
- package/dist/cjs/utils/societyApproval.js.map +1 -1
- package/dist/mjs/api/resources/Transaction.d.ts +0 -1
- package/dist/mjs/api/resources/Transaction.d.ts.map +1 -1
- package/dist/mjs/api/resources/Transaction.js +0 -3
- package/dist/mjs/api/resources/Transaction.js.map +1 -1
- package/dist/mjs/api/resources/User.d.ts +1 -8
- package/dist/mjs/api/resources/User.d.ts.map +1 -1
- package/dist/mjs/api/resources/User.js +0 -58
- package/dist/mjs/api/resources/User.js.map +1 -1
- package/dist/mjs/api/resources/UsersHistory.d.ts +11 -0
- package/dist/mjs/api/resources/UsersHistory.d.ts.map +1 -0
- package/dist/mjs/api/resources/UsersHistory.js +28 -0
- package/dist/mjs/api/resources/UsersHistory.js.map +1 -0
- package/dist/mjs/api/resources/WorkingSchedule.d.ts +1 -2
- package/dist/mjs/api/resources/WorkingSchedule.d.ts.map +1 -1
- package/dist/mjs/api/resources/WorkingSchedule.js +0 -3
- package/dist/mjs/api/resources/WorkingSchedule.js.map +1 -1
- package/dist/mjs/api/resources.d.ts +2 -0
- package/dist/mjs/api/resources.d.ts.map +1 -1
- package/dist/mjs/api/resources.js +2 -0
- package/dist/mjs/api/resources.js.map +1 -1
- package/dist/mjs/types/Enum/BalanceSheet.js +2 -2
- package/dist/mjs/types/Enum/BalanceSheet.js.map +1 -1
- package/dist/mjs/types/Enum/EquipmentType.d.ts +0 -15
- package/dist/mjs/types/Enum/EquipmentType.d.ts.map +1 -1
- package/dist/mjs/types/Enum/EquipmentType.js +0 -15
- package/dist/mjs/types/Enum/EquipmentType.js.map +1 -1
- package/dist/mjs/types/Enum/SocietyApproval.js +6 -6
- package/dist/mjs/types/Enum/SocietyApproval.js.map +1 -1
- package/dist/mjs/types/Enum/UsersHistory.d.ts +16 -0
- package/dist/mjs/types/Enum/UsersHistory.d.ts.map +1 -0
- package/dist/mjs/types/Enum/UsersHistory.js +35 -0
- package/dist/mjs/types/Enum/UsersHistory.js.map +1 -0
- package/dist/mjs/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.d.ts +0 -13
- package/dist/mjs/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js +2 -16
- package/dist/mjs/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.js.map +1 -1
- package/dist/mjs/types/Interface/api/user/CreateCoworker.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/user/CreateCoworker.js +0 -11
- package/dist/mjs/types/Interface/api/user/CreateCoworker.js.map +1 -1
- package/dist/mjs/types/Interface/api/usersHistory/Create.d.ts +8 -0
- package/dist/mjs/types/Interface/api/usersHistory/Create.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/usersHistory/Create.js +34 -0
- package/dist/mjs/types/Interface/api/usersHistory/Create.js.map +1 -0
- package/dist/mjs/types/Interface/api/usersHistory/Update.d.ts +7 -0
- package/dist/mjs/types/Interface/api/usersHistory/Update.d.ts.map +1 -0
- package/dist/mjs/types/Interface/api/usersHistory/Update.js +29 -0
- package/dist/mjs/types/Interface/api/usersHistory/Update.js.map +1 -0
- package/dist/mjs/types/Interface/api/webmail/CreateMailFromLambda.d.ts +7 -6
- package/dist/mjs/types/Interface/api/webmail/CreateMailFromLambda.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/webmail/CreateMailFromLambda.js +7 -8
- package/dist/mjs/types/Interface/api/webmail/CreateMailFromLambda.js.map +1 -1
- package/dist/mjs/types/Interface/models/IUser.d.ts +0 -1
- package/dist/mjs/types/Interface/models/IUser.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IUser.js.map +1 -1
- package/dist/mjs/types/Interface/models/IUsersHistory.d.ts +14 -0
- package/dist/mjs/types/Interface/models/IUsersHistory.d.ts.map +1 -0
- package/dist/mjs/types/Interface/models/IUsersHistory.js +2 -0
- package/dist/mjs/types/Interface/models/IUsersHistory.js.map +1 -0
- package/dist/mjs/types/index.d.ts +4 -0
- package/dist/mjs/types/index.d.ts.map +1 -1
- package/dist/mjs/types/index.js +4 -0
- package/dist/mjs/types/index.js.map +1 -1
- package/dist/mjs/utils/societyApproval.d.ts.map +1 -1
- package/dist/mjs/utils/societyApproval.js +3 -6
- package/dist/mjs/utils/societyApproval.js.map +1 -1
- package/package.json +12 -10
- package/ts/api/resources/Transaction.ts +0 -3
- package/ts/api/resources/User.ts +0 -65
- package/ts/api/resources/UsersHistory.ts +35 -0
- package/ts/api/resources/WorkingSchedule.ts +0 -5
- package/ts/api/resources.ts +2 -0
- package/ts/types/Enum/BalanceSheet.ts +2 -2
- package/ts/types/Enum/EquipmentType.ts +0 -15
- package/ts/types/Enum/SocietyApproval.ts +6 -6
- package/ts/types/Enum/UsersHistory.ts +38 -0
- package/ts/types/Interface/api/accountingEntry/AnnotateAccountingTransaction.ts +2 -18
- package/ts/types/Interface/api/user/CreateCoworker.ts +0 -11
- package/ts/types/Interface/api/usersHistory/Create.ts +21 -0
- package/ts/types/Interface/api/usersHistory/Update.ts +17 -0
- package/ts/types/Interface/api/webmail/CreateMailFromLambda.ts +8 -7
- package/ts/types/Interface/models/IUser.ts +0 -1
- package/ts/types/Interface/models/IUsersHistory.ts +17 -0
- package/ts/types/index.ts +5 -0
- package/ts/utils/societyApproval.ts +3 -10
- package/dist/cjs/utils/transforms/number.transform.d.ts +0 -3
- package/dist/cjs/utils/transforms/number.transform.d.ts.map +0 -1
- package/dist/cjs/utils/transforms/number.transform.js +0 -36
- package/dist/cjs/utils/transforms/number.transform.js.map +0 -1
- package/dist/mjs/utils/transforms/number.transform.d.ts +0 -3
- package/dist/mjs/utils/transforms/number.transform.d.ts.map +0 -1
- package/dist/mjs/utils/transforms/number.transform.js +0 -33
- package/dist/mjs/utils/transforms/number.transform.js.map +0 -1
- package/ts/utils/transforms/number.transform.ts +0 -38
|
@@ -62,11 +62,8 @@ export function getApprovalDocumentInfos(idLegalForm, idDocumentType) {
|
|
|
62
62
|
* @returns L'objet de données formaté pour le template
|
|
63
63
|
*/
|
|
64
64
|
export function buildApprovalTemplateData(existingApproval, style) {
|
|
65
|
-
const yearInText = convertNumberToLetter(+dayjs(
|
|
66
|
-
const dayAndMonthInText = `${convertNumberToLetter(+dayjs(
|
|
67
|
-
.locale('fr')
|
|
68
|
-
.format('MMMM')
|
|
69
|
-
.toLowerCase()}`;
|
|
65
|
+
const yearInText = convertNumberToLetter(+dayjs().format('YYYY')).toLowerCase();
|
|
66
|
+
const dayAndMonthInText = `${convertNumberToLetter(+dayjs().format('D'))} ${dayjs().locale('fr').format('MMMM').toLowerCase()}`;
|
|
70
67
|
const brand = getBrand();
|
|
71
68
|
return {
|
|
72
69
|
// Variables globales
|
|
@@ -113,7 +110,7 @@ export function buildApprovalTemplateData(existingApproval, style) {
|
|
|
113
110
|
...existingApproval?.exercice?.society,
|
|
114
111
|
cityOfGreffe: getCityOfGreffeName(existingApproval?.exercice?.society?.idCityOfGreffe).toUpperCase(),
|
|
115
112
|
siren: existingApproval?.exercice?.society?.siret
|
|
116
|
-
? siretToSiren(existingApproval.exercice.society.siret)
|
|
113
|
+
? siretToSiren(existingApproval.exercice.society.siret)
|
|
117
114
|
: null,
|
|
118
115
|
},
|
|
119
116
|
endDate: dayjs(existingApproval?.exercice?.endDate).locale('fr').format('DD MMMM YYYY').toLowerCase(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"societyApproval.js","sourceRoot":"","sources":["../../../ts/utils/societyApproval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAqB,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAGL,mCAAmC,GAEpC,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EA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A4B,EAAE,KAAK,CAAC,gBAAgB,EAAE,eAAe,EAAE,4BAA4B,CAAC;yBACjG,MAAM,CAAC,IAAI,CAAC;yBACZ,MAAM,CAAC,cAAc,CAAC;iBAC1B;gBACH,CAAC,CAAC,EAAE,CAAC;SACR;QACD,QAAQ,EAAE;YACR,GAAG,gBAAgB,EAAE,QAAQ;YAC7B,OAAO,EAAE;gBACP,GAAG,gBAAgB,EAAE,QAAQ,EAAE,OAAO;gBACtC,YAAY,EAAE,mBAAmB,CAAC,gBAAgB,EAAE,QAAQ,EAAE,OAAO,EAAE,cAAc,CAAC,CAAC,WAAW,EAAE;gBACpG,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK;oBAC/C,CAAC,CAAC,YAAY,CAAC,gBAAgB,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,uBAAuB,EAAE,UAAU,CAAC,IAAI,IAAI;oBAC7G,CAAC,CAAC,IAAI;aACT;YACD,OAAO,EAAE,KAAK,CAAC,gBAAgB,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,WAAW,EAAE;SACtG;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { LegalForm, LegalFormTypeEnum } from '../types/Enum/LegalForm';\nimport {\n SocietyApprovalDocumentType,\n SocietyApprovalDocumentConfig,\n SocietyApprovalDocumentsByLegalForm,\n SocietyApprovalDocumentTemplate,\n} from '../types/Enum/SocietyApproval';\nimport { ISocietyApproval } from '../types/Interface/models/ISocietyApproval';\nimport { QualityList } from '../types/Enum/Quality';\nimport { getBrand } from './brands';\nimport { convertNumberToLetter } from './amount';\nimport * as dayjs from 'dayjs';\nimport { CityOfGreffeDetail } from '../types/Enum/CityOfGreffe';\nimport { siretToSiren } from './siretValidation';\n\n/**\n * Récupère le nom de la forme juridique\n * @param idLegalForm - L'identifiant de la forme juridique\n * @param fallback - Valeur par défaut si non trouvée\n * @returns Le nom de la forme juridique\n */\nexport function getLegalFormName(idLegalForm: LegalFormTypeEnum, fallback: string = ''): string {\n return Object.values(LegalForm).find((lf) => lf.id === idLegalForm)?.name ?? fallback;\n}\n\n/**\n * Récupère la configuration des documents d'approbation pour une forme juridique donnée\n * @param idLegalForm - L'identifiant de la forme juridique\n * @returns La configuration des documents ou undefined si non trouvée\n */\nexport function getApprovalDocumentsByLegalForm(\n idLegalForm: LegalFormTypeEnum,\n): SocietyApprovalDocumentConfig | undefined {\n return SocietyApprovalDocumentsByLegalForm.find((config) => config.idLegalForm === idLegalForm);\n}\n\n/**\n * Récupère le nom du template pour un document spécifique et une forme juridique\n * @param idLegalForm - L'identifiant de la forme juridique\n * @param idDocumentType - Le type de document d'approbation\n * @returns Le nom du template ou undefined si non trouvé\n */\n//@deprecated use getApprovalDocumentInfos instead\nexport function getApprovalDocumentTemplateName(\n idLegalForm: LegalFormTypeEnum,\n idDocumentType: SocietyApprovalDocumentType,\n): string | undefined {\n const config = getApprovalDocumentsByLegalForm(idLegalForm);\n const document = config?.documents.find((doc) => doc.idDocumentType === idDocumentType);\n return document?.templateName;\n}\n\n/**\n * Récupère le texte de la ville du greffe\n * @param idCityOfGreffe - L'identifiant de la ville du greffe\n * @returns Le texte de la ville ou une chaîne vide\n */\nfunction getCityOfGreffeName(idCityOfGreffe: number | null | undefined): string {\n if (!idCityOfGreffe) return '';\n return CityOfGreffeDetail.find((c) => c.id === idCityOfGreffe)?.text ?? '';\n}\n\n/**\n * Récupère le nom du template pour un document spécifique et une forme juridique\n * @param idLegalForm - L'identifiant de la forme juridique\n * @param idDocumentType - Le type de document d'approbation\n * @returns Le nom du template ou undefined si non trouvé\n */\nexport function getApprovalDocumentInfos(\n idLegalForm: LegalFormTypeEnum,\n idDocumentType: SocietyApprovalDocumentType,\n): SocietyApprovalDocumentTemplate | undefined {\n const config = getApprovalDocumentsByLegalForm(idLegalForm);\n return config?.documents.find((doc) => doc.idDocumentType === idDocumentType);\n}\n\n/**\n * Construit les données formatées pour le template d'approbation\n * @param existingApproval - Les données d'approbation de la société\n * @param style - Le style HTML pour le document\n * @returns L'objet de données formaté pour le template\n */\nexport function buildApprovalTemplateData(existingApproval: ISocietyApproval, style: string): Record<string, any> {\n const yearInText = convertNumberToLetter(\n +dayjs(existingApproval?.generatingDatas?.approvalDate || null).format('YYYY'),\n ).toLowerCase();\n const dayAndMonthInText = `${convertNumberToLetter(+dayjs(existingApproval?.generatingDatas?.approvalDate || null).format('D'))} ${dayjs(\n existingApproval?.generatingDatas?.approvalDate || null,\n )\n .locale('fr')\n .format('MMMM')\n .toLowerCase()}`;\n const brand = getBrand();\n return {\n // Variables globales\n style,\n yearInText,\n dayAndMonthInText,\n date: dayjs().locale('fr').format('DD MMMM YYYY'),\n companyInformation: {\n rcs: brand?.companyInformation?.rcs,\n nomRaisonSociale: brand?.companyInformation?.nomRaisonSociale,\n city: brand?.companyInformation?.city,\n postalAddress: brand?.companyInformation?.postalAddress,\n montantCapital: brand?.companyInformation?.montantCapital,\n statut: brand?.companyInformation?.statut,\n ECOrderCity: brand?.companyInformation?.ECOrderCity,\n },\n owner: {\n identity: `${existingApproval?.exercice?.society?.users?.[0]?.idCivility === 1 ? 'Monsieur' : 'Madame'} ${existingApproval?.exercice?.society?.users?.[0]?.firstname} ${existingApproval?.exercice?.society?.users?.[0]?.lastname} `,\n quality: QualityList.find(\n (ql) => ql.id === existingApproval?.exercice?.society?.users?.[0]?.businessPartners?.[0]?.idQuality,\n )?.label,\n },\n // Variables stockées en base\n ...existingApproval,\n generatingDatas: {\n ...existingApproval?.generatingDatas,\n ...(existingApproval?.generatingDatas?.approvalDate\n ? {\n approvalDate: dayjs(existingApproval?.generatingDatas?.approvalDate)\n .locale('fr')\n .format('DD MMMM YYYY')\n .toUpperCase(),\n }\n : {}),\n ...(existingApproval?.generatingDatas?.approvalDividendsPaymentDate\n ? {\n approvalDividendsPaymentDate: dayjs(existingApproval?.generatingDatas?.approvalDividendsPaymentDate)\n .locale('fr')\n .format('DD MMMM YYYY'),\n }\n : {}),\n },\n exercice: {\n ...existingApproval?.exercice,\n society: {\n ...existingApproval?.exercice?.society,\n cityOfGreffe: getCityOfGreffeName(existingApproval?.exercice?.society?.idCityOfGreffe).toUpperCase(),\n siren: existingApproval?.exercice?.society?.siret\n ? siretToSiren(existingApproval.exercice.society.siret)?.replace(/(\\d{3})(\\d{3})(\\d{3})/, '$1 $2 $3') ?? null\n : null,\n },\n endDate: dayjs(existingApproval?.exercice?.endDate).locale('fr').format('DD MMMM YYYY').toLowerCase(),\n },\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"societyApproval.js","sourceRoot":"","sources":["../../../ts/utils/societyApproval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAqB,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAGL,mCAAmC,GAEpC,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,WAA8B,EAAE,WAAmB,EAAE;IACpF,OAAO,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,WAAW,CAAC,EAAE,IAAI,IAAI,QAAQ,CAAC;AACxF,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,+BAA+B,CAC7C,WAA8B;IAE9B,OAAO,mCAAmC,CAAC,IAAI,CAAC,CAAC,M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um/LegalForm';\nimport {\n SocietyApprovalDocumentType,\n SocietyApprovalDocumentConfig,\n SocietyApprovalDocumentsByLegalForm,\n SocietyApprovalDocumentTemplate,\n} from '../types/Enum/SocietyApproval';\nimport { ISocietyApproval } from '../types/Interface/models/ISocietyApproval';\nimport { QualityList } from '../types/Enum/Quality';\nimport { getBrand } from './brands';\nimport { convertNumberToLetter } from './amount';\nimport * as dayjs from 'dayjs';\nimport { CityOfGreffeDetail } from '../types/Enum/CityOfGreffe';\nimport { siretToSiren } from './siretValidation';\n\n/**\n * Récupère le nom de la forme juridique\n * @param idLegalForm - L'identifiant de la forme juridique\n * @param fallback - Valeur par défaut si non trouvée\n * @returns Le nom de la forme juridique\n */\nexport function getLegalFormName(idLegalForm: LegalFormTypeEnum, fallback: string = ''): string {\n return Object.values(LegalForm).find((lf) => lf.id === idLegalForm)?.name ?? fallback;\n}\n\n/**\n * Récupère la configuration des documents d'approbation pour une forme juridique donnée\n * @param idLegalForm - L'identifiant de la forme juridique\n * @returns La configuration des documents ou undefined si non trouvée\n */\nexport function getApprovalDocumentsByLegalForm(\n idLegalForm: LegalFormTypeEnum,\n): SocietyApprovalDocumentConfig | undefined {\n return SocietyApprovalDocumentsByLegalForm.find((config) => config.idLegalForm === idLegalForm);\n}\n\n/**\n * Récupère le nom du template pour un document spécifique et une forme juridique\n * @param idLegalForm - L'identifiant de la forme juridique\n * @param idDocumentType - Le type de document d'approbation\n * @returns Le nom du template ou undefined si non trouvé\n */\n//@deprecated use getApprovalDocumentInfos instead\nexport function getApprovalDocumentTemplateName(\n idLegalForm: LegalFormTypeEnum,\n idDocumentType: SocietyApprovalDocumentType,\n): string | undefined {\n const config = getApprovalDocumentsByLegalForm(idLegalForm);\n const document = config?.documents.find((doc) => doc.idDocumentType === idDocumentType);\n return document?.templateName;\n}\n\n/**\n * Récupère le texte de la ville du greffe\n * @param idCityOfGreffe - L'identifiant de la ville du greffe\n * @returns Le texte de la ville ou une chaîne vide\n */\nfunction getCityOfGreffeName(idCityOfGreffe: number | null | undefined): string {\n if (!idCityOfGreffe) return '';\n return CityOfGreffeDetail.find((c) => c.id === idCityOfGreffe)?.text ?? '';\n}\n\n/**\n * Récupère le nom du template pour un document spécifique et une forme juridique\n * @param idLegalForm - L'identifiant de la forme juridique\n * @param idDocumentType - Le type de document d'approbation\n * @returns Le nom du template ou undefined si non trouvé\n */\nexport function getApprovalDocumentInfos(\n idLegalForm: LegalFormTypeEnum,\n idDocumentType: SocietyApprovalDocumentType,\n): SocietyApprovalDocumentTemplate | undefined {\n const config = getApprovalDocumentsByLegalForm(idLegalForm);\n return config?.documents.find((doc) => doc.idDocumentType === idDocumentType);\n}\n\n/**\n * Construit les données formatées pour le template d'approbation\n * @param existingApproval - Les données d'approbation de la société\n * @param style - Le style HTML pour le document\n * @returns L'objet de données formaté pour le template\n */\nexport function buildApprovalTemplateData(existingApproval: ISocietyApproval, style: string): Record<string, any> {\n const yearInText = convertNumberToLetter(+dayjs().format('YYYY')).toLowerCase();\n const dayAndMonthInText = `${convertNumberToLetter(+dayjs().format('D'))} ${dayjs().locale('fr').format('MMMM').toLowerCase()}`;\n const brand = getBrand();\n return {\n // Variables globales\n style,\n yearInText,\n dayAndMonthInText,\n date: dayjs().locale('fr').format('DD MMMM YYYY'),\n companyInformation: {\n rcs: brand?.companyInformation?.rcs,\n nomRaisonSociale: brand?.companyInformation?.nomRaisonSociale,\n city: brand?.companyInformation?.city,\n postalAddress: brand?.companyInformation?.postalAddress,\n montantCapital: brand?.companyInformation?.montantCapital,\n statut: brand?.companyInformation?.statut,\n ECOrderCity: brand?.companyInformation?.ECOrderCity,\n },\n owner: {\n identity: `${existingApproval?.exercice?.society?.users?.[0]?.idCivility === 1 ? 'Monsieur' : 'Madame'} ${existingApproval?.exercice?.society?.users?.[0]?.firstname} ${existingApproval?.exercice?.society?.users?.[0]?.lastname} `,\n quality: QualityList.find(\n (ql) => ql.id === existingApproval?.exercice?.society?.users?.[0]?.businessPartners?.[0]?.idQuality,\n )?.label,\n },\n // Variables stockées en base\n ...existingApproval,\n generatingDatas: {\n ...existingApproval?.generatingDatas,\n ...(existingApproval?.generatingDatas?.approvalDate\n ? {\n approvalDate: dayjs(existingApproval?.generatingDatas?.approvalDate)\n .locale('fr')\n .format('DD MMMM YYYY')\n .toUpperCase(),\n }\n : {}),\n ...(existingApproval?.generatingDatas?.approvalDividendsPaymentDate\n ? {\n approvalDividendsPaymentDate: dayjs(existingApproval?.generatingDatas?.approvalDividendsPaymentDate)\n .locale('fr')\n .format('DD MMMM YYYY'),\n }\n : {}),\n },\n exercice: {\n ...existingApproval?.exercice,\n society: {\n ...existingApproval?.exercice?.society,\n cityOfGreffe: getCityOfGreffeName(existingApproval?.exercice?.society?.idCityOfGreffe).toUpperCase(),\n siren: existingApproval?.exercice?.society?.siret\n ? siretToSiren(existingApproval.exercice.society.siret)\n : null,\n },\n endDate: dayjs(existingApproval?.exercice?.endDate).locale('fr').format('DD MMMM YYYY').toLowerCase(),\n },\n };\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silexpert/core",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.205-1",
|
|
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": "dist/cjs/index.js",
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"author": "Silex",
|
|
33
33
|
"license": "ISC",
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@babel/cli": "^7.28.
|
|
36
|
-
"@babel/core": "^7.
|
|
37
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
38
|
-
"@babel/preset-env": "^7.
|
|
39
|
-
"@babel/runtime": "^7.28.
|
|
35
|
+
"@babel/cli": "^7.28.3",
|
|
36
|
+
"@babel/core": "^7.28.5",
|
|
37
|
+
"@babel/plugin-transform-runtime": "^7.28.5",
|
|
38
|
+
"@babel/preset-env": "^7.28.5",
|
|
39
|
+
"@babel/runtime": "^7.28.4",
|
|
40
40
|
"@types/bluebird": "^3.5.34",
|
|
41
41
|
"@types/browser-or-node": "^1.3.0",
|
|
42
42
|
"@types/ejs": "^3.0.6",
|
|
@@ -48,13 +48,13 @@
|
|
|
48
48
|
"eslint-config-airbnb-typescript": "^18.0.0",
|
|
49
49
|
"eslint-config-prettier": "^9.1.0",
|
|
50
50
|
"husky": "^9.1.7",
|
|
51
|
-
"prettier": "^3.
|
|
51
|
+
"prettier": "^3.7.3",
|
|
52
52
|
"reflect-metadata": "^0.2.2",
|
|
53
|
-
"rimraf": "^6.1.
|
|
53
|
+
"rimraf": "^6.1.2",
|
|
54
54
|
"standard-version": "^9.3.0",
|
|
55
55
|
"ts-node": "^10.9.2",
|
|
56
56
|
"typescript": "5.9.3",
|
|
57
|
-
"typescript-eslint": "^8.
|
|
57
|
+
"typescript-eslint": "^8.48.1"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"@babel/runtime": "^7.6.3",
|
|
@@ -64,13 +64,15 @@
|
|
|
64
64
|
"types": "dist/cjs/index.d.ts",
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@types/geojson": "^7946.0.16",
|
|
67
|
+
"@types/mailparser": "^3.4.5",
|
|
67
68
|
"axios": "0.22.0",
|
|
68
69
|
"browser-or-node": "^3.0.0",
|
|
69
70
|
"class-transformer": "^0.5.1",
|
|
70
71
|
"class-validator": "^0.14.3",
|
|
71
72
|
"dayjs": "^1.11.11",
|
|
72
73
|
"ejs": "^3.1.9",
|
|
73
|
-
"libphonenumber-js": "^1.12.
|
|
74
|
+
"libphonenumber-js": "^1.12.30",
|
|
75
|
+
"mailparser": "^3.4.0",
|
|
74
76
|
"rxjs": "^7.8.2",
|
|
75
77
|
"sms-segments-calculator": "^1.2.0",
|
|
76
78
|
"stripe": "18.1.1",
|
|
@@ -77,9 +77,6 @@ export class Transaction extends Resource {
|
|
|
77
77
|
annotate(id: number, data: UpdateAccountingTransaction): Promise<ReadFormattedAccountingTransaction> {
|
|
78
78
|
return this.axios.$put(`/transactions/${id}`, data);
|
|
79
79
|
}
|
|
80
|
-
annotateAll(ids: number[], data: UpdateAccountingTransaction): Promise<ReadFormattedAccountingTransaction> {
|
|
81
|
-
return this.axios.$put('/transactions/annotate-all', { ids, data });
|
|
82
|
-
}
|
|
83
80
|
delete(idSociety: number, id: number): Promise<number> {
|
|
84
81
|
return this.axios.$delete(`/society/${idSociety}/transaction/${id}`);
|
|
85
82
|
}
|
package/ts/api/resources/User.ts
CHANGED
|
@@ -23,9 +23,6 @@ import {
|
|
|
23
23
|
BasePaginate,
|
|
24
24
|
QueryGetAllUsersPaginated,
|
|
25
25
|
QueryUpdatePassword,
|
|
26
|
-
CreateCollaboraterDetail,
|
|
27
|
-
IWorkingSchedule,
|
|
28
|
-
ICollaboraterDetail,
|
|
29
26
|
} from '../../types';
|
|
30
27
|
|
|
31
28
|
export class User extends Resource {
|
|
@@ -41,28 +38,6 @@ export class User extends Resource {
|
|
|
41
38
|
coworker(data: CreateCoworker): Promise<IUser> {
|
|
42
39
|
return this.axios.$post('user/coworker', data);
|
|
43
40
|
}
|
|
44
|
-
|
|
45
|
-
createCompletCoworker(data: CreateCoworker, file?: File): Promise<IUser> {
|
|
46
|
-
const formData = new FormData();
|
|
47
|
-
Object.entries(data).forEach(([key, value]) => {
|
|
48
|
-
if (value !== undefined && value !== null) {
|
|
49
|
-
if (Array.isArray(value)) {
|
|
50
|
-
value.forEach((v) => {
|
|
51
|
-
formData.append(`${key}[]`, `${v}`);
|
|
52
|
-
});
|
|
53
|
-
} else {
|
|
54
|
-
formData.append(key, `${value}`);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
if (file){
|
|
59
|
-
formData.append('file', file);
|
|
60
|
-
}
|
|
61
|
-
return this.axios.$post('user/coworker/complete', formData, {
|
|
62
|
-
headers: { 'Content-Type': 'multipart/form-data' },
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
|
|
66
41
|
updateCoworker(idUser: number, params: UpdateCorworker): Promise<IUser> {
|
|
67
42
|
const formData = new FormData();
|
|
68
43
|
Object.entries(params).forEach(([key, value]) => {
|
|
@@ -81,26 +56,6 @@ export class User extends Resource {
|
|
|
81
56
|
});
|
|
82
57
|
}
|
|
83
58
|
|
|
84
|
-
updateCompletCoworker(idUser: number, data: UpdateCorworker, file?: File): Promise<IUser> {
|
|
85
|
-
const formData = new FormData();
|
|
86
|
-
Object.entries(data).forEach(([key, value]) => {
|
|
87
|
-
if (value || value === false || value === 0) {
|
|
88
|
-
if (Array.isArray(value)) {
|
|
89
|
-
value.forEach((v: number | string) => {
|
|
90
|
-
formData.append(`${key}[]`, `${v}`);
|
|
91
|
-
});
|
|
92
|
-
} else if (key === 'file') formData.append('file', value);
|
|
93
|
-
else formData.append(key, `${value}`);
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
if (file){
|
|
97
|
-
formData.append('file', file);
|
|
98
|
-
}
|
|
99
|
-
return this.axios.$put(`/user/coworker/complete/${idUser}`, formData, {
|
|
100
|
-
headers: { 'Content-Type': 'multipart/form-data' },
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
|
|
104
59
|
sendNewCode(id: number): Promise<IUser> {
|
|
105
60
|
return this.axios.$put(`user/${id}/sendNewSmsCode`);
|
|
106
61
|
}
|
|
@@ -189,24 +144,4 @@ export class User extends Resource {
|
|
|
189
144
|
registerProspect(body: RegisterProspectBody): Promise<RegisterProspectResponse> {
|
|
190
145
|
return this.axios.$post('users/prospect', body);
|
|
191
146
|
}
|
|
192
|
-
|
|
193
|
-
updateCoworkerWorkingSchedules(idUser: number, workingSchedules: IWorkingSchedule[]): Promise<IWorkingSchedule[]> {
|
|
194
|
-
return this.axios.$post(`users/coworker/${idUser}/working-schedules`, workingSchedules);
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
createCoworkerWorkingSchedules(idUser: number, workingSchedules: Omit<IWorkingSchedule, 'id'>[]): Promise<IWorkingSchedule[]> {
|
|
198
|
-
return this.axios.$post(`users/coworker/${idUser}/working-schedules`, workingSchedules);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
createCollaboraterDetail(params: CreateCollaboraterDetail): Promise<ICollaboraterDetail> {
|
|
202
|
-
return this.axios.$post('collaboraters-details', params);
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
getCollaboraterDetail(idUser: number): Promise<ICollaboraterDetail> {
|
|
206
|
-
return this.axios.$get(`collaboraters-details/user/${idUser}`);
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
updateCollaboraterDetail(id: number, params: Partial<ICollaboraterDetail>): Promise<ICollaboraterDetail> {
|
|
210
|
-
return this.axios.$put(`collaboraters-details/${id}`, params);
|
|
211
|
-
}
|
|
212
147
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Resource } from '../Resource';
|
|
2
|
+
import { IUsersHistory, CreateUsersHistory, UpdateUsersHistory } from '../../types';
|
|
3
|
+
|
|
4
|
+
export class UsersHistory extends Resource {
|
|
5
|
+
createUserHistory(body: CreateUsersHistory): Promise<IUsersHistory> {
|
|
6
|
+
return this.axios.$post('usersHistory', body);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
getAllUserHistory(signal?: AbortSignal): Promise<IUsersHistory[]> {
|
|
10
|
+
return this.axios.$get('usersHistory', {
|
|
11
|
+
...signal && { signal }
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
getUserHistoryById(id: number, signal?: AbortSignal): Promise<IUsersHistory> {
|
|
16
|
+
return this.axios.$get(`usersHistory/${id}`, {
|
|
17
|
+
...signal && { signal }
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
getUserHistoryByUserID(idUser: number, signal?: AbortSignal): Promise<IUsersHistory[]> {
|
|
22
|
+
return this.axios.$get(`usersHistory/user/${idUser}`, {
|
|
23
|
+
...signal && { signal }
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
updateUserHistory(id: number, body: UpdateUsersHistory): Promise<IUsersHistory> {
|
|
28
|
+
return this.axios.$put(`usersHistory/${id}`, body);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
deleteUserHistory(id: number): Promise<boolean> {
|
|
32
|
+
return this.axios.$delete(`usersHistory/${id}`);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
}
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
ReadWorkingSchedule,
|
|
7
7
|
SpecialHours,
|
|
8
8
|
TimeSlots,
|
|
9
|
-
IWorkingSchedule
|
|
10
9
|
} from '../..';
|
|
11
10
|
|
|
12
11
|
export class WorkingSchedule extends Resource {
|
|
@@ -41,10 +40,6 @@ export class WorkingSchedule extends Resource {
|
|
|
41
40
|
return this.axios.$get('workingSchedule/all');
|
|
42
41
|
}
|
|
43
42
|
|
|
44
|
-
deleteAndCreate(idUser: number, workingSchedules: Omit<IWorkingSchedule, 'id'>[]): Promise<WorkingSchedule[]> {
|
|
45
|
-
return this.axios.$post(`workingSchedule/delete-and-create/${idUser}`, workingSchedules);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
43
|
getAvailableTimeSlots(params: QueryAvailableTimeSlot): Promise<TimeSlots[]> {
|
|
49
44
|
return this.axios.$get('workingSchedule/available-time-slots', {
|
|
50
45
|
params,
|
package/ts/api/resources.ts
CHANGED
|
@@ -190,6 +190,7 @@ import { InformationRequest } from './resources/InformationRequest';
|
|
|
190
190
|
import { AutomaticRegistration } from './resources/AutomaticRegistration';
|
|
191
191
|
import { LoginApproval } from './resources/LoginApproval';
|
|
192
192
|
import { SocietyApproval } from './resources/SocietyApproval';
|
|
193
|
+
import { UsersHistory } from './resources/UsersHistory';
|
|
193
194
|
import { Docoon } from './resources/Docoon';
|
|
194
195
|
|
|
195
196
|
export const resources = {
|
|
@@ -385,5 +386,6 @@ export const resources = {
|
|
|
385
386
|
automaticRegistration: AutomaticRegistration,
|
|
386
387
|
loginApproval: LoginApproval,
|
|
387
388
|
societyApproval: SocietyApproval,
|
|
389
|
+
usersHistory: UsersHistory,
|
|
388
390
|
docoon: Docoon,
|
|
389
391
|
};
|
|
@@ -939,10 +939,10 @@ export const BALANCE_SHEET_LIST_PASSIVE: BalanceSheetList = [
|
|
|
939
939
|
{
|
|
940
940
|
name: BalanceSheetPassiveLabel.AVANCES_ET_ACOMPTES_RECUES,
|
|
941
941
|
key: 'advancesAndDepositsReceived',
|
|
942
|
-
accounts: ['4191'],
|
|
942
|
+
accounts: ['4191'],
|
|
943
943
|
isSubcategory: true,
|
|
944
944
|
total: 0,
|
|
945
|
-
// type: 'passive',
|
|
945
|
+
// type: 'passive', Demandé par Angelo
|
|
946
946
|
accountsDescription: [],
|
|
947
947
|
},
|
|
948
948
|
{
|
|
@@ -20,76 +20,61 @@ export const EquipmentTypeDetail = [
|
|
|
20
20
|
{
|
|
21
21
|
id: EquipmentType.LAPTOP,
|
|
22
22
|
label: 'Ordinateur portable',
|
|
23
|
-
icon: 'i-lucide-laptop'
|
|
24
23
|
},
|
|
25
24
|
{
|
|
26
25
|
id: EquipmentType.PRINTER,
|
|
27
26
|
label: 'Imprimante',
|
|
28
|
-
icon: 'i-lucide-printer'
|
|
29
27
|
},
|
|
30
28
|
{
|
|
31
29
|
id: EquipmentType.PHONE,
|
|
32
30
|
label: 'Téléphone',
|
|
33
|
-
icon: 'i-lucide-smartphone'
|
|
34
31
|
},
|
|
35
32
|
{
|
|
36
33
|
id: EquipmentType.KEYBOARD,
|
|
37
34
|
label: 'Clavier',
|
|
38
|
-
icon: 'i-lucide-keyboard'
|
|
39
35
|
},
|
|
40
36
|
{
|
|
41
37
|
id: EquipmentType.MOUSE,
|
|
42
38
|
label: 'Souris',
|
|
43
|
-
icon: 'i-lucide-mouse'
|
|
44
39
|
},
|
|
45
40
|
{
|
|
46
41
|
id: EquipmentType.SCREEN,
|
|
47
42
|
label: 'Écran',
|
|
48
|
-
icon: 'i-lucide-monitor'
|
|
49
43
|
},
|
|
50
44
|
{
|
|
51
45
|
id: EquipmentType.HEADPHONE,
|
|
52
46
|
label: 'Casque',
|
|
53
|
-
icon: 'i-lucide-headphones'
|
|
54
47
|
},
|
|
55
48
|
{
|
|
56
49
|
id: EquipmentType.ADAPTER,
|
|
57
50
|
label: 'Adaptateur',
|
|
58
|
-
icon: 'i-lucide-box'
|
|
59
51
|
},
|
|
60
52
|
{
|
|
61
53
|
id: EquipmentType.WIRELESS_HEADPHONE,
|
|
62
54
|
label: 'Casque sans fil',
|
|
63
|
-
icon: 'i-lucide-headphones'
|
|
64
55
|
},
|
|
65
56
|
{
|
|
66
57
|
id: EquipmentType.POCKET,
|
|
67
58
|
label: 'Pochette',
|
|
68
|
-
icon: 'i-lucide-box'
|
|
69
59
|
},
|
|
70
60
|
{
|
|
71
61
|
id: EquipmentType.BADGE,
|
|
72
62
|
label: 'Badge',
|
|
73
|
-
icon: 'i-lucide-badge'
|
|
74
63
|
},
|
|
75
64
|
{
|
|
76
65
|
id: EquipmentType.CALCULATOR,
|
|
77
66
|
label: 'Calculatrice',
|
|
78
|
-
icon: 'i-lucide-calculator'
|
|
79
67
|
},
|
|
80
68
|
{
|
|
81
69
|
id: EquipmentType.USB_HUB,
|
|
82
70
|
label: 'Hub USB',
|
|
83
|
-
icon: 'i-lucide-box'
|
|
84
71
|
},
|
|
85
72
|
{
|
|
86
73
|
id: EquipmentType.NUMPAD,
|
|
87
74
|
label: 'Pavé numérique',
|
|
88
|
-
icon: 'i-lucide-box'
|
|
89
75
|
},
|
|
90
76
|
{
|
|
91
77
|
id: EquipmentType.EXTERN_SUPPORT,
|
|
92
78
|
label: 'Support externe',
|
|
93
|
-
icon: 'i-lucide-box'
|
|
94
79
|
},
|
|
95
80
|
] as const;
|
|
@@ -41,25 +41,25 @@ export const RegulatedConventions: RegulatedConvention[] = [
|
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
id: RegulatedConventionType.CURRENT_ACCOUNT_CREDITOR,
|
|
44
|
-
label:
|
|
44
|
+
label: 'Existence d\'un compte courant créditeur',
|
|
45
45
|
templateName: 'CONVENTION_CURRENT_ACCOUNT_CREDITOR',
|
|
46
46
|
applicableTo: [LegalFormTypeEnum.EURL, LegalFormTypeEnum.SASU],
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
49
|
id: RegulatedConventionType.CURRENT_ACCOUNT_DEBTOR,
|
|
50
|
-
label:
|
|
50
|
+
label: 'Existence d\'un compte courant débiteur',
|
|
51
51
|
templateName: 'CONVENTION_CURRENT_ACCOUNT_DEBTOR',
|
|
52
52
|
applicableTo: [LegalFormTypeEnum.EURL, LegalFormTypeEnum.SASU],
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
id: RegulatedConventionType.CURRENT_ACCOUNT_WAIVER,
|
|
56
|
-
label:
|
|
56
|
+
label: 'Convention d\'abandon de compte courant sous réserve de retour à meilleure fortune',
|
|
57
57
|
templateName: 'CONVENTION_CURRENT_ACCOUNT_WAIVER',
|
|
58
58
|
applicableTo: [LegalFormTypeEnum.EURL, LegalFormTypeEnum.SASU],
|
|
59
59
|
},
|
|
60
60
|
{
|
|
61
61
|
id: RegulatedConventionType.EMPLOYMENT_CONTRACT,
|
|
62
|
-
label:
|
|
62
|
+
label: 'Existence d\'un contrat de travail',
|
|
63
63
|
templateName: 'CONVENTION_EMPLOYMENT_CONTRACT',
|
|
64
64
|
applicableTo: [LegalFormTypeEnum.EURL, LegalFormTypeEnum.SASU],
|
|
65
65
|
},
|
|
@@ -71,13 +71,13 @@ export const RegulatedConventions: RegulatedConvention[] = [
|
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
id: RegulatedConventionType.COMMERCIAL_LEASE,
|
|
74
|
-
label:
|
|
74
|
+
label: 'Existence d\'un bail commercial',
|
|
75
75
|
templateName: 'CONVENTION_COMMERCIAL_LEASE',
|
|
76
76
|
applicableTo: [LegalFormTypeEnum.EURL, LegalFormTypeEnum.SASU],
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
79
|
id: RegulatedConventionType.RENT_SHARING,
|
|
80
|
-
label:
|
|
80
|
+
label: 'Prise en charge d\'une quote part du loyer',
|
|
81
81
|
templateName: 'CONVENTION_RENT_SHARING',
|
|
82
82
|
applicableTo: [LegalFormTypeEnum.EURL, LegalFormTypeEnum.SASU],
|
|
83
83
|
},
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export enum TypeUserHistory {
|
|
2
|
+
// Cycle de vie Compte
|
|
3
|
+
CREATE = 1,
|
|
4
|
+
UPDATE = 2,
|
|
5
|
+
DELETE = 3,
|
|
6
|
+
RESTORE = 4,
|
|
7
|
+
|
|
8
|
+
// Validation & Modifications Spécifiques
|
|
9
|
+
INFO_UPDATE = 5, // Info ok
|
|
10
|
+
ROLE_UPDATE = 6, // Role ok
|
|
11
|
+
|
|
12
|
+
// Sécurité
|
|
13
|
+
PASSWORD_UPDATE = 7,
|
|
14
|
+
|
|
15
|
+
// Gestion Matériel
|
|
16
|
+
EQUIPMENT_ASSIGN = 8,
|
|
17
|
+
EQUIPMENT_BROKEN = 9,
|
|
18
|
+
EQUIPMENT_RETURN = 10,
|
|
19
|
+
EQUIPMENT_LOST = 11,
|
|
20
|
+
|
|
21
|
+
// Communication
|
|
22
|
+
MAIL_SENT_TO_TS = 12, // Mail envoyé à TS
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const TypeUserHistoryLabels: Record<TypeUserHistory, string> = {
|
|
26
|
+
[TypeUserHistory.CREATE]: 'Création',
|
|
27
|
+
[TypeUserHistory.UPDATE]: 'Mise à jour',
|
|
28
|
+
[TypeUserHistory.DELETE]: 'Suppression',
|
|
29
|
+
[TypeUserHistory.RESTORE]: 'Restauration',
|
|
30
|
+
[TypeUserHistory.INFO_UPDATE]: 'Mise à jour Info',
|
|
31
|
+
[TypeUserHistory.ROLE_UPDATE]: 'Mise à jour Rôle',
|
|
32
|
+
[TypeUserHistory.PASSWORD_UPDATE]: 'Changement Mot de passe',
|
|
33
|
+
[TypeUserHistory.EQUIPMENT_ASSIGN]: 'Assignation Matériel',
|
|
34
|
+
[TypeUserHistory.EQUIPMENT_BROKEN]: 'Matériel Cassé',
|
|
35
|
+
[TypeUserHistory.EQUIPMENT_RETURN]: 'Retour Matériel',
|
|
36
|
+
[TypeUserHistory.EQUIPMENT_LOST]: 'Matériel Perdu',
|
|
37
|
+
[TypeUserHistory.MAIL_SENT_TO_TS]: 'Mail envoyé à TS',
|
|
38
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IsBoolean, IsNumber, IsOptional } from 'class-validator';
|
|
2
2
|
import { IAccountingTransaction, IImmobilization } from '../../..';
|
|
3
3
|
import { IThirdParty } from '../../models/IThirdParty';
|
|
4
|
-
import {
|
|
4
|
+
import { ApiPropertyOptional } from '../../../../utils';
|
|
5
5
|
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
6
6
|
|
|
7
7
|
export type FormImmobilization = IImmobilization;
|
|
@@ -58,22 +58,6 @@ export class UpdateAccountingTransaction {
|
|
|
58
58
|
idAccountant?: number;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
export class UpdateAllAccountingTransaction {
|
|
62
|
-
@ApiProperty()
|
|
63
|
-
@IsArray()
|
|
64
|
-
@IsInt({ each: true })
|
|
65
|
-
ids: number[];
|
|
66
|
-
|
|
67
|
-
@ApiProperty()
|
|
68
|
-
data: UpdateAccountingTransaction;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export interface UpdatedAccountingTransactions {
|
|
72
|
-
processed: number;
|
|
73
|
-
errors: Array<{ id: number; message: string; code: string }>;
|
|
74
|
-
updatedTransactions: ReadFormattedAccountingTransaction[];
|
|
75
|
-
}
|
|
76
|
-
|
|
77
61
|
export interface UploadedAccountingFileInfos {
|
|
78
62
|
location: string;
|
|
79
63
|
idFile: number;
|
|
@@ -11,10 +11,8 @@ import {
|
|
|
11
11
|
IsPhoneNumber,
|
|
12
12
|
IsString,
|
|
13
13
|
} from 'class-validator';
|
|
14
|
-
import { Transform } from 'class-transformer';
|
|
15
14
|
import { ApiProperty, ApiPropertyOptional } from '../../../../utils/decorators';
|
|
16
15
|
import { ToBoolean } from '../../../../utils/transforms/boolean.transform';
|
|
17
|
-
import { ToNumber } from '../../../../utils/transforms/number.transform';
|
|
18
16
|
import { EntityType } from '../../../Enum/EntityType';
|
|
19
17
|
|
|
20
18
|
export class CreateCoworker {
|
|
@@ -51,7 +49,6 @@ export class CreateCoworker {
|
|
|
51
49
|
@ApiPropertyOptional()
|
|
52
50
|
@IsOptional()
|
|
53
51
|
@IsNumber()
|
|
54
|
-
@ToNumber()
|
|
55
52
|
idCivility?: number;
|
|
56
53
|
|
|
57
54
|
@ApiProperty({ default: true })
|
|
@@ -104,25 +101,17 @@ export class CreateCoworker {
|
|
|
104
101
|
@ApiProperty()
|
|
105
102
|
@IsDefined()
|
|
106
103
|
@IsInt()
|
|
107
|
-
@ToNumber()
|
|
108
104
|
idOffice: number;
|
|
109
105
|
|
|
110
106
|
@ApiProperty()
|
|
111
107
|
@IsDefined()
|
|
112
108
|
@IsEnum(EntityType)
|
|
113
|
-
@ToNumber()
|
|
114
109
|
entity: EntityType;
|
|
115
110
|
|
|
116
111
|
@ApiPropertyOptional()
|
|
117
112
|
@IsOptional()
|
|
118
113
|
@IsArray()
|
|
119
114
|
@IsInt({ each: true })
|
|
120
|
-
@Transform(({ value }: { value: any }) => {
|
|
121
|
-
if (Array.isArray(value)) {
|
|
122
|
-
return value.map((v) => Number(v));
|
|
123
|
-
}
|
|
124
|
-
return value as number;
|
|
125
|
-
})
|
|
126
115
|
idRoles?: number[];
|
|
127
116
|
|
|
128
117
|
@ApiPropertyOptional()
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IsEnum, IsInt, IsOptional, IsString } from 'class-validator';
|
|
2
|
+
import { ApiProperty, ApiPropertyOptional } from '../../../../utils/decorators';
|
|
3
|
+
import { TypeUserHistory } from '../../../Enum/UsersHistory';
|
|
4
|
+
import { IUsersHistory } from '../../models/IUsersHistory';
|
|
5
|
+
|
|
6
|
+
export class CreateUsersHistory implements Omit<IUsersHistory, 'id' | 'createdAt' | 'updatedAt' | 'idAuthor'> {
|
|
7
|
+
@ApiProperty()
|
|
8
|
+
@IsInt()
|
|
9
|
+
idUser: number;
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@ApiPropertyOptional()
|
|
14
|
+
@IsOptional()
|
|
15
|
+
@IsString()
|
|
16
|
+
comment?: string;
|
|
17
|
+
|
|
18
|
+
@ApiProperty()
|
|
19
|
+
@IsEnum(TypeUserHistory)
|
|
20
|
+
actionType: TypeUserHistory;
|
|
21
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IsEnum, IsOptional, IsString } from 'class-validator';
|
|
2
|
+
import { ApiPropertyOptional } from '../../../../utils/decorators';
|
|
3
|
+
import { TypeUserHistory } from '../../../Enum/UsersHistory';
|
|
4
|
+
import { IUsersHistory } from '../../models/IUsersHistory';
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export class UpdateUsersHistory implements Partial<Omit<IUsersHistory, 'id' | 'idUser' | 'idAuthor'>> {
|
|
8
|
+
@ApiPropertyOptional()
|
|
9
|
+
@IsOptional()
|
|
10
|
+
@IsString()
|
|
11
|
+
comment?: string;
|
|
12
|
+
|
|
13
|
+
@ApiPropertyOptional()
|
|
14
|
+
@IsOptional()
|
|
15
|
+
@IsEnum(TypeUserHistory)
|
|
16
|
+
actionType?: TypeUserHistory;
|
|
17
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IsArray, IsDate, IsIn, IsNotEmpty, IsObject, IsOptional, IsString } from 'class-validator';
|
|
2
|
-
|
|
2
|
+
import { AddressObject, HeaderLines } from 'mailparser';
|
|
3
3
|
import { ApiProperty, ApiPropertyOptional } from '../../../../utils';
|
|
4
4
|
|
|
5
5
|
export class CreateMailFromLambda {
|
|
@@ -15,7 +15,7 @@ export class CreateMailFromLambda {
|
|
|
15
15
|
@ApiProperty()
|
|
16
16
|
@IsArray()
|
|
17
17
|
@IsNotEmpty()
|
|
18
|
-
headerLines:
|
|
18
|
+
headerLines: HeaderLines;
|
|
19
19
|
|
|
20
20
|
@ApiProperty()
|
|
21
21
|
html: string | false;
|
|
@@ -46,24 +46,25 @@ export class CreateMailFromLambda {
|
|
|
46
46
|
|
|
47
47
|
@ApiPropertyOptional()
|
|
48
48
|
@IsOptional()
|
|
49
|
-
to?:
|
|
49
|
+
to?: AddressObject | AddressObject[];
|
|
50
50
|
|
|
51
51
|
@ApiPropertyOptional()
|
|
52
52
|
@IsObject()
|
|
53
53
|
@IsOptional()
|
|
54
|
-
from?:
|
|
54
|
+
from?: AddressObject;
|
|
55
55
|
|
|
56
56
|
@ApiPropertyOptional()
|
|
57
57
|
@IsOptional()
|
|
58
|
-
cc?:
|
|
58
|
+
cc?: AddressObject | AddressObject[];
|
|
59
59
|
|
|
60
60
|
@ApiPropertyOptional()
|
|
61
61
|
@IsOptional()
|
|
62
|
-
bcc?:
|
|
62
|
+
bcc?: AddressObject | AddressObject[];
|
|
63
|
+
|
|
63
64
|
@ApiPropertyOptional()
|
|
64
65
|
@IsObject()
|
|
65
66
|
@IsOptional()
|
|
66
|
-
replyTo?:
|
|
67
|
+
replyTo?: AddressObject;
|
|
67
68
|
|
|
68
69
|
@ApiPropertyOptional()
|
|
69
70
|
@IsString()
|