@silexpert/core 1.1.242 → 1.1.243
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/Comment.d.ts +1 -1
- package/dist/cjs/api/resources/Comment.d.ts.map +1 -1
- package/dist/cjs/api/resources/Comment.js.map +1 -1
- package/dist/cjs/types/Enum/BalanceSheet.d.ts +3 -3
- package/dist/cjs/types/Enum/BalanceSheet.js +3 -3
- package/dist/cjs/types/Enum/BalanceSheet.js.map +1 -1
- package/dist/cjs/types/Enum/BrandClementine.d.ts +3 -0
- package/dist/cjs/types/Enum/BrandClementine.d.ts.map +1 -1
- package/dist/cjs/types/Enum/BrandClementine.js +1 -0
- package/dist/cjs/types/Enum/BrandClementine.js.map +1 -1
- package/dist/cjs/types/Enum/BrandPourcentage.d.ts +4 -0
- package/dist/cjs/types/Enum/BrandPourcentage.d.ts.map +1 -1
- package/dist/cjs/types/Enum/BrandPourcentage.js +1 -0
- package/dist/cjs/types/Enum/BrandPourcentage.js.map +1 -1
- package/dist/cjs/types/Enum/Comment.d.ts +2 -1
- package/dist/cjs/types/Enum/Comment.d.ts.map +1 -1
- package/dist/cjs/types/Enum/Comment.js +1 -0
- package/dist/cjs/types/Enum/Comment.js.map +1 -1
- package/dist/cjs/types/Enum/InternalService.d.ts +12 -0
- package/dist/cjs/types/Enum/InternalService.d.ts.map +1 -1
- package/dist/cjs/types/Enum/InternalService.js +12 -0
- package/dist/cjs/types/Enum/InternalService.js.map +1 -1
- package/dist/cjs/types/Enum/JobTitle.d.ts +5 -1
- package/dist/cjs/types/Enum/JobTitle.d.ts.map +1 -1
- package/dist/cjs/types/Enum/JobTitle.js +25 -1
- package/dist/cjs/types/Enum/JobTitle.js.map +1 -1
- package/dist/cjs/types/Enum/Role.d.ts +4 -1
- package/dist/cjs/types/Enum/Role.d.ts.map +1 -1
- package/dist/cjs/types/Enum/Role.js +7 -2
- package/dist/cjs/types/Enum/Role.js.map +1 -1
- package/dist/cjs/types/Enum/RoleDetail.d.ts +15 -2
- package/dist/cjs/types/Enum/RoleDetail.d.ts.map +1 -1
- package/dist/cjs/types/Enum/RoleDetail.js +19 -6
- package/dist/cjs/types/Enum/RoleDetail.js.map +1 -1
- package/dist/cjs/types/Enum/TaskResponseType.d.ts +1 -0
- package/dist/cjs/types/Enum/TaskResponseType.d.ts.map +1 -1
- package/dist/cjs/types/Enum/TaskResponseType.js +67 -0
- package/dist/cjs/types/Enum/TaskResponseType.js.map +1 -1
- package/dist/cjs/types/Enum/TimeCounterType.js +13 -13
- package/dist/cjs/types/Enum/TimeCounterType.js.map +1 -1
- package/dist/cjs/types/Interface/models/IComment.d.ts +3 -0
- package/dist/cjs/types/Interface/models/IComment.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IComment.js.map +1 -1
- package/dist/cjs/types/Interface/models/IExercice.d.ts +2 -0
- package/dist/cjs/types/Interface/models/IExercice.d.ts.map +1 -1
- package/dist/cjs/types/Interface/models/IExercice.js.map +1 -1
- package/dist/cjs/utils/email/templates/signature.js +1 -1
- package/dist/cjs/utils/email/templates/signature.js.map +1 -1
- package/dist/cjs/utils/email.d.ts.map +1 -1
- package/dist/cjs/utils/email.js +41 -2
- package/dist/cjs/utils/email.js.map +1 -1
- package/dist/cjs/utils/task.d.ts.map +1 -1
- package/dist/cjs/utils/task.js +12 -0
- package/dist/cjs/utils/task.js.map +1 -1
- package/dist/cjs/utils/webmail.d.ts.map +1 -1
- package/dist/cjs/utils/webmail.js +12 -0
- package/dist/cjs/utils/webmail.js.map +1 -1
- package/dist/mjs/api/resources/Comment.d.ts +1 -1
- package/dist/mjs/api/resources/Comment.d.ts.map +1 -1
- package/dist/mjs/api/resources/Comment.js.map +1 -1
- package/dist/mjs/types/Enum/BalanceSheet.d.ts +3 -3
- package/dist/mjs/types/Enum/BalanceSheet.js +3 -3
- package/dist/mjs/types/Enum/BalanceSheet.js.map +1 -1
- package/dist/mjs/types/Enum/BrandClementine.d.ts +3 -0
- package/dist/mjs/types/Enum/BrandClementine.d.ts.map +1 -1
- package/dist/mjs/types/Enum/BrandClementine.js +1 -0
- package/dist/mjs/types/Enum/BrandClementine.js.map +1 -1
- package/dist/mjs/types/Enum/BrandPourcentage.d.ts +4 -0
- package/dist/mjs/types/Enum/BrandPourcentage.d.ts.map +1 -1
- package/dist/mjs/types/Enum/BrandPourcentage.js +1 -0
- package/dist/mjs/types/Enum/BrandPourcentage.js.map +1 -1
- package/dist/mjs/types/Enum/Comment.d.ts +2 -1
- package/dist/mjs/types/Enum/Comment.d.ts.map +1 -1
- package/dist/mjs/types/Enum/Comment.js +1 -0
- package/dist/mjs/types/Enum/Comment.js.map +1 -1
- package/dist/mjs/types/Enum/InternalService.d.ts +12 -0
- package/dist/mjs/types/Enum/InternalService.d.ts.map +1 -1
- package/dist/mjs/types/Enum/InternalService.js +12 -0
- package/dist/mjs/types/Enum/InternalService.js.map +1 -1
- package/dist/mjs/types/Enum/JobTitle.d.ts +5 -1
- package/dist/mjs/types/Enum/JobTitle.d.ts.map +1 -1
- package/dist/mjs/types/Enum/JobTitle.js +25 -1
- package/dist/mjs/types/Enum/JobTitle.js.map +1 -1
- package/dist/mjs/types/Enum/Role.d.ts +4 -1
- package/dist/mjs/types/Enum/Role.d.ts.map +1 -1
- package/dist/mjs/types/Enum/Role.js +7 -2
- package/dist/mjs/types/Enum/Role.js.map +1 -1
- package/dist/mjs/types/Enum/RoleDetail.d.ts +15 -2
- package/dist/mjs/types/Enum/RoleDetail.d.ts.map +1 -1
- package/dist/mjs/types/Enum/RoleDetail.js +19 -6
- package/dist/mjs/types/Enum/RoleDetail.js.map +1 -1
- package/dist/mjs/types/Enum/TaskResponseType.d.ts +1 -0
- package/dist/mjs/types/Enum/TaskResponseType.d.ts.map +1 -1
- package/dist/mjs/types/Enum/TaskResponseType.js +67 -0
- package/dist/mjs/types/Enum/TaskResponseType.js.map +1 -1
- package/dist/mjs/types/Enum/TimeCounterType.js +13 -13
- package/dist/mjs/types/Enum/TimeCounterType.js.map +1 -1
- package/dist/mjs/types/Interface/models/IComment.d.ts +3 -0
- package/dist/mjs/types/Interface/models/IComment.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IComment.js.map +1 -1
- package/dist/mjs/types/Interface/models/IExercice.d.ts +2 -0
- package/dist/mjs/types/Interface/models/IExercice.d.ts.map +1 -1
- package/dist/mjs/types/Interface/models/IExercice.js.map +1 -1
- package/dist/mjs/utils/email/templates/signature.js +1 -1
- package/dist/mjs/utils/email/templates/signature.js.map +1 -1
- package/dist/mjs/utils/email.d.ts.map +1 -1
- package/dist/mjs/utils/email.js +44 -2
- package/dist/mjs/utils/email.js.map +1 -1
- package/dist/mjs/utils/task.d.ts.map +1 -1
- package/dist/mjs/utils/task.js +12 -0
- package/dist/mjs/utils/task.js.map +1 -1
- package/dist/mjs/utils/webmail.d.ts.map +1 -1
- package/dist/mjs/utils/webmail.js +12 -0
- package/dist/mjs/utils/webmail.js.map +1 -1
- package/package.json +1 -1
- package/ts/api/resources/Comment.ts +1 -1
- package/ts/types/Enum/BalanceSheet.ts +3 -3
- package/ts/types/Enum/BrandClementine.ts +1 -0
- package/ts/types/Enum/BrandPourcentage.ts +1 -0
- package/ts/types/Enum/Comment.ts +1 -0
- package/ts/types/Enum/InternalService.ts +12 -0
- package/ts/types/Enum/JobTitle.ts +25 -1
- package/ts/types/Enum/Role.ts +7 -2
- package/ts/types/Enum/RoleDetail.ts +19 -6
- package/ts/types/Enum/TaskResponseType.ts +67 -0
- package/ts/types/Enum/TimeCounterType.ts +13 -13
- package/ts/types/Interface/models/IComment.ts +3 -0
- package/ts/types/Interface/models/IExercice.ts +2 -0
- package/ts/utils/email/templates/signature.ts +1 -1
- package/ts/utils/email.ts +31 -2
- package/ts/utils/task.ts +8 -0
- package/ts/utils/webmail.ts +8 -0
|
@@ -12,6 +12,7 @@ import { ISociety } from './ISociety';
|
|
|
12
12
|
import { IExerciceDetail } from './IExerciceDetail';
|
|
13
13
|
import { IBalanceSheetModule } from './IBalanceSheetModule';
|
|
14
14
|
import { IRegistration } from './IRegistration';
|
|
15
|
+
import { IComment } from './IComment';
|
|
15
16
|
export interface IExercice {
|
|
16
17
|
id?: number;
|
|
17
18
|
startDate: Date | null;
|
|
@@ -58,5 +59,6 @@ export interface IExercice {
|
|
|
58
59
|
exerciceDetail?: IExerciceDetail;
|
|
59
60
|
exerciceBalanceSheetModule?: IBalanceSheetModule;
|
|
60
61
|
registrations: IRegistration[];
|
|
62
|
+
comments?: IComment[];
|
|
61
63
|
}
|
|
62
64
|
//# sourceMappingURL=IExercice.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IExercice.d.ts","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IExercice.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file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C;IAC/C,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,cAAc,CAAC,EAAE,eAAe,CAAC;IACjC,0BAA0B,CAAC,EAAE,mBAAmB,CAAC;IACjD,aAAa,EAAE,aAAa,EAAE,CAAC;IAC/B,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;CACvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IExercice.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IExercice.ts"],"names":[],"mappings":"","sourcesContent":["import { ISupervision } from './ISupervision';\nimport { IChecklist } from './IChecklist';\nimport { ICustomerVat } from './ICustomerVat';\nimport { ICustomerIsRegime } from './ICustomerIsRegime';\nimport { IBalanceSheet } from './IBalanceSheet';\nimport { IAdditionalBalance } from './IAdditionalBalance';\nimport { ISocietyApproval } from './ISocietyApproval';\nimport { IPrestation } from './IPrestation';\nimport { IExercicePrestation } from './IExercicePrestation';\nimport { IFile } from './IFile';\nimport { ISociety } from './ISociety';\nimport { IExerciceDetail } from './IExerciceDetail';\nimport { IBalanceSheetModule } from './IBalanceSheetModule';\nimport { IRegistration } from './IRegistration';\n\n// exercices\nexport interface IExercice {\n id?: number;\n startDate: Date | null;\n endDate: Date | null;\n turnover?: number | null;\n invoicePurchase?: number | null;\n invoiceSales?: number | null;\n isBack: boolean;\n close: boolean;\n allAnnote: boolean;\n current: boolean;\n deliveryDate?: Date | null;\n employeesNumber?: number | null;\n rentsNumber?: number | null;\n withApproval: boolean;\n reviewGuide: boolean;\n summaryNote: boolean;\n labKeeping: number;\n receiptJeDeclare: boolean;\n annualFolderEdition: boolean;\n turnoverDone: number;\n turnoverMax?: number;\n benefit: number | null;\n processClossingExercice: boolean;\n idFilePaymentSchedule?: number | null;\n isDefault: boolean;\n idSociety?: number | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n deletedAt?: Date | null;\n notes?: string;\n\n // Associations\n supervision?: ISupervision;\n checklists?: IChecklist[];\n exerciceCustomerTvas?: ICustomerVat[];\n exerciceCustomersIsRegimes?: ICustomerIsRegime[];\n exerciceBalanceSheet?: IBalanceSheet;\n exerciceBalanceSheets?: IBalanceSheet[];\n exerciceAdditionnalBalance?: IAdditionalBalance;\n exerciceApprovals?: ISocietyApproval;\n prestations?: IPrestation[];\n exercicesToPrestations?: IExercicePrestation[];\n file?: IFile;\n society?: ISociety;\n exerciceDetail?: IExerciceDetail;\n exerciceBalanceSheetModule?: IBalanceSheetModule;\n registrations: IRegistration[];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IExercice.js","sourceRoot":"","sources":["../../../../../ts/types/Interface/models/IExercice.ts"],"names":[],"mappings":"","sourcesContent":["import { ISupervision } from './ISupervision';\nimport { IChecklist } from './IChecklist';\nimport { ICustomerVat } from './ICustomerVat';\nimport { ICustomerIsRegime } from './ICustomerIsRegime';\nimport { IBalanceSheet } from './IBalanceSheet';\nimport { IAdditionalBalance } from './IAdditionalBalance';\nimport { ISocietyApproval } from './ISocietyApproval';\nimport { IPrestation } from './IPrestation';\nimport { IExercicePrestation } from './IExercicePrestation';\nimport { IFile } from './IFile';\nimport { ISociety } from './ISociety';\nimport { IExerciceDetail } from './IExerciceDetail';\nimport { IBalanceSheetModule } from './IBalanceSheetModule';\nimport { IRegistration } from './IRegistration';\nimport { IComment } from './IComment';\n\n// exercices\nexport interface IExercice {\n id?: number;\n startDate: Date | null;\n endDate: Date | null;\n turnover?: number | null;\n invoicePurchase?: number | null;\n invoiceSales?: number | null;\n isBack: boolean;\n close: boolean;\n allAnnote: boolean;\n current: boolean;\n deliveryDate?: Date | null;\n employeesNumber?: number | null;\n rentsNumber?: number | null;\n withApproval: boolean;\n reviewGuide: boolean;\n summaryNote: boolean;\n labKeeping: number;\n receiptJeDeclare: boolean;\n annualFolderEdition: boolean;\n turnoverDone: number;\n turnoverMax?: number;\n benefit: number | null;\n processClossingExercice: boolean;\n idFilePaymentSchedule?: number | null;\n isDefault: boolean;\n idSociety?: number | null;\n createdAt?: Date | null;\n updatedAt?: Date | null;\n deletedAt?: Date | null;\n notes?: string;\n\n // Associations\n supervision?: ISupervision;\n checklists?: IChecklist[];\n exerciceCustomerTvas?: ICustomerVat[];\n exerciceCustomersIsRegimes?: ICustomerIsRegime[];\n exerciceBalanceSheet?: IBalanceSheet;\n exerciceBalanceSheets?: IBalanceSheet[];\n exerciceAdditionnalBalance?: IAdditionalBalance;\n exerciceApprovals?: ISocietyApproval;\n prestations?: IPrestation[];\n exercicesToPrestations?: IExercicePrestation[];\n file?: IFile;\n society?: ISociety;\n exerciceDetail?: IExerciceDetail;\n exerciceBalanceSheetModule?: IBalanceSheetModule;\n registrations: IRegistration[];\n comments?: IComment[];\n}\n"]}
|
|
@@ -236,7 +236,7 @@ ${logoClementine}
|
|
|
236
236
|
<a href="https://www.smileyourpla.net/" style="display: inline-block; color:#6E6E71;" target="_blank"><img
|
|
237
237
|
src="https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_smileYourPlanet.png"
|
|
238
238
|
alt="Initiative Smile your planet" height="36"></a>
|
|
239
|
-
<% if(user.calendlyUrl) { %>
|
|
239
|
+
<% if(user.calendlyUrl && !isDataOfficer) { %>
|
|
240
240
|
<a href="<%= user.calendlyUrl %>" style="display: inline-block; color:#6E6E71;" target="_blank">
|
|
241
241
|
<img
|
|
242
242
|
src="https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_rdv_tel<%= commercialName === 'Pourcentage' ? '_pourcentage' : '' %>.png"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signature.js","sourceRoot":"","sources":["../../../../../ts/utils/email/templates/signature.ts"],"names":[],"mappings":";;;AAAA,MAAM,OAAO,GAAG;;;;;;;;;GASb,CAAC;AAEJ,MAAM,cAAc,GAAG;;;;;;;;;;;;aAYV,CAAC;AAEd,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;UAuBL,CAAC;AAEX,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoGd,CAAC;AAEW,QAAA,iBAAiB,GAAG,GAAG,OAAO;;;;;;;EAOzC,cAAc;;;IAGZ,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4FN,MAAM;;;;;;;;;SASD,CAAC","sourcesContent":["const newIban = `<% if (commercialName === 'Clementine' && isFacturation) { %>\n <p style=\"font-size: 15px; font-family: Arial; margin:0; padding:0px 0 4px; color:#6E6E71; margin-bottom: 10px; font-weight: bold;\">\n <span style=\"color: #A0A0A0\">Nos coordonnées bancaires </span>IBAN : <%= iban %> - BIC : <%= bic %>\n </p>\n <% }else if (commercialName === 'Pourcentage' && [5, 7].includes(idTypeBrand)) { %> \n <p style=\"font-size: 15px; font-family: Arial; margin:0; padding:0px 0 4px; color:#6E6E71; margin-bottom: 10px; font-weight: bold;\">\n <span style=\"color: #A0A0A0\">Attention changement de RIB </span>IBAN : <%= iban %> - BIC : <%= bic %>\n </p>\n<% } %>\n `;\n\nconst logoClementine = `<% if (commercialName === 'Clementine') { %><tr>\n<td\ncolspan=\"3\"\nclass=\"logo\"\nstyle=\"\"\nwidth=\"950\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/logo_2022.png\"\n alt=\"Logo\"\n height=\"32\"\n style=\"padding-bottom: 10px;\">\n</td>\n</tr><% } %>`;\n\nconst avatar = `<% if (!forceRole && user?.avatar?.token) { %>\n <td\n class=\"avatar\"\n style=\"text-align:center; padding: 20px 0 20px 20px; position: relative;\"\n width=\"100\">\n <% if(commercialName === 'Clementine') { %>\n <p style=\"padding: 20px;background-image: url('https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_quotes.png');background-size: 26%;background-position: 81% -3%;background-repeat: no-repeat;\">\n <img\n style=\"max-height: 90px;max-width: 90px; border-radius: 100%; margin-top: 10px\"\n alt=\"Avatar\"\n src=\"<%= hostS3 %>users/<%= user.id %>/<%= user.avatar.token %>\"\n />\n </p>\n <% } else { %>\n <p style=\"padding: 20px;\">\n <img\n style=\"max-height: 90px;max-width: 90px; border-radius: 100%; margin-top: 10px\"\n alt=\"Avatar\"\n src=\"<%= hostS3 %>users/<%= user.id %>/<%= user.avatar.token %>\"\n />\n </p>\n <% } %>\n </td>\n <% } %>`;\n\nconst footer = `<% if(commercialName === 'Clementine') { %>\n <tr>\n <td\n style=\"clear:both; padding-top: 15px; font-size:17px; line-height:14px; color:#ADADAD; text-align: justify; font-family: Arial;\"\n colspan=\"4\">\n <table style=\"width: 100%\" width=\"100%\">\n <tr>\n <td colspan=\"7\" style=\"padding-bottom: 12px\">\n <span style=\"text-align: left; text-decoration: none; color: #A0A1A6; white-space: nowrap; float: left;\">\n Une question ? Découvrez votre <a href=\"https://www.clementine.fr/aide/\" style=\"color: #FF7E3C\">centre d'aide</a>\n </span>\n <span style=\"text-align: right; text-decoration: none; color: #A0A1A6; white-space: nowrap; float: right;\">\n Jusqu’à 500€ avec notre <a href=\"https://www.clementine.fr/parrainage/?utm_source=signature&utm_medium=email&utm_campaign=signature&utm_content=cta\" style=\"color: #FF7E3C\">programme de parrainage</a>\n </span>\n </td>\n </tr>\n <tr>\n <td style=\"padding:0 10px 0 0\" width=\"120\">\n <a href=\"https://app.clementine.fr/\" target=\"_blank\" style=\"text-decoration: none; color: #6E6E71; white-space: nowrap;\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_connect2.png\"\n style=\"vertical-align: text-top;\"\n width=\"20\"\n alt=\"Connexion\"> Connexion\n </a>\n </td>\n <td style=\"padding:0 10px 0 0\" width=\"170\">\n <!-- <a href=\"mailto:<%= supportMail %>\" target=\"_blank\" style=\"text-decoration: none; color: #6E6E71; white-space: nowrap;\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_support2.png\"\n style=\"vertical-align: text-top;\"\n width=\"17\"\n alt=\"Support technique\"> Support technique\n </a>-->\n </td>\n <td style=\"text-align: right; vertical-align: middle; color: #6E6E71\" width=\"430\">\n <!--<span>Télécharger l'app</span>\n <a href=\"https://apps.apple.com/fr/app/clementine/id1119493780\" target=\"_blank\" style=\"vertical-align: middle; margin-left: 10px\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_appstore.png\"\n alt=\"App Store\"\n style=\"width: 20px\"></a>\n <a href=\"https://play.google.com/store/apps/details?id=com.clementine.myclementine&hl=fr\" target=\"_blank\" style=\"vertical-align: middle; margin-left: 10px\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_playstore.png\"\n alt=\"Play Store\"\n style=\"width: 20px\"></a>-->\n </td>\n <td style=\"padding:0 5px 0 0\" width=\"24\">\n <a href=\"https://www.youtube.com/channel/UCVnCpcLdRwuYBLvAphHsvig/\" target=\"_blank\" style=\"vertical-align: middle;\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_youtube.png\"\n alt=\"YouTube\"\n style=\"width: 20px\"></a>\n </td>\n <td style=\"padding:0 5px 0 0\" width=\"24\">\n <a href=\"https://www.linkedin.com/company/compta-cl%C3%A9mentine/\" target=\"_blank\" style=\"vertical-align: middle;\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_linkedin.png\"\n alt=\"LinkedIn\"\n style=\"width: 20px\"></a>\n </td>\n <td style=\"padding:0 5px 0 0\" width=\"24\">\n <a href=\"https://www.instagram.com/comptaclementine/\" target=\"_blank\" style=\"vertical-align: middle;\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_instagram.png\"\n alt=\"Instagram\"\n style=\"width: 20px\"></a>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n <% } else if(commercialName === 'Pourcentage') { %>\n <tr>\n <td\n style=\"clear:both; padding-top: 15px; font-size:17px; line-height:14px; color:#ADADAD; text-align: justify; font-family: Arial;\"\n colspan=\"4\">\n <table style=\"width: 100%\" width=\"100%\">\n <tr>\n <td style=\"padding:0 10px 0 0\" width=\"120\">\n <a href=\"https://app.pourcentage.fr/\" target=\"_blank\" style=\"text-decoration: none; color: #6E6E71; white-space: nowrap;\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_connect2.png\"\n style=\"vertical-align: text-top;\"\n width=\"20\"\n alt=\"Connexion\"> Connexion\n </a>\n </td>\n <td style=\"text-align: right; vertical-align: middle; color: #6E6E71\" width=\"430\">\n <!-- <span>Télécharger l'app</span>\n <a href=\"https://apps.apple.com/fr/app/pourcentage-fr/id1631156043\" target=\"_blank\" style=\"vertical-align: middle; margin-left: 10px\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_appstore.png\"\n alt=\"App Store\"\n style=\"width: 20px\"></a>\n <a href=\"https://play.google.com/store/apps/details?id=com.clementine.pourcentage\" target=\"_blank\" style=\"vertical-align: middle; margin-left: 10px\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_playstore.png\"\n alt=\"Play Store\"\n style=\"width: 20px\"></a> -->\n </td>\n </tr>\n </table>\n </td>\n </tr>\n <% } %>\n`;\n\nexport const signatureTemplate = `${newIban}<table\nborder=\"0\"\ncellpadding=\"0\"\ncellspacing=\"0\"\nwidth=\"950\"\nclass=\"signatureClementine\">\n\n${logoClementine}\n\n<tr style=\"background: #F4F8FB\">\n ${avatar}\n <td\n class=\"infos\"\n style=\" padding: 20px 0 20px 30px;font-size: 17px; font-family: Arial; color:#000\"\n width=\"390\"\n colspan=\"2\">\n <table\n border=\"0\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n width=\"390\">\n <tr>\n <td width=\"390\">\n <p style=\"font-size: 17px; margin:0px 0; padding:0\">\n <strong><span style=\"color:<%= primaryColor %>; font-weight: bold;\"><%= user?.firstname ?? '' %> <%= user?.lastname ?? '' %></span></strong>\n </p>\n\n <% if(roleSignature) { %>\n <p style=\"font-size: 17px; margin:0px 0; padding:0\">\n <span style=\"color: #6E6E71; font-weight: bold;\"><%= roleSignature %></span>\n </p>\n <% } %>\n </td>\n </tr>\n </table>\n <p style=\"margin:16px 0; color:#6E6E71; border-top: 2px solid #6E6E71; width: 100px; opacity: 0.2\"><!-- --></p>\n <p style=\"margin:0px 0; padding:0 0 4px; color:#6E6E71;\">\n Standard : <%- standardPhoneSignature %><br/>\n <% if(phoneSignature && phoneSignature !== standardPhoneSignature) { %>\n Ligne directe : <%- phoneSignature %><br/>\n <% } %>\n Nos horaires : <%= horaires %>\n </p>\n </td>\n \n <td class=\"infos\" style=\"padding: 20px 20px 20px 0px; font-size: 17px; font-family: Arial; color:#000; <%= !user.calendlyUrl ? 'vertical-align: top;' : '' %>\"\n width=\"370\">\n <% if(['Clementine', 'Pourcentage', 'Comptalib'].includes(commercialName)) { %>\n <table\n border=\"0\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n width=\"350\">\n <tr>\n <td width=\"230\">\n <!-- image Télécharger l'app mobile -->\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_download_app<%= commercialName === 'Pourcentage' ? '_pourcentage' : '' %><%= commercialName === 'Comptalib' ? '_comptalib' : '' %>.png\"\n alt=\"Télécharger l'application mobile\"\n style=\"width: 152px; float:right\">\n \n <p style=\"float:right; margin-right: 45px\">\n <span style=\"margin:0; padding:0 0 4px; color:#6E6E71;\">Disponible sur<br/></span>\n <a href=\"https://apps.apple.com/fr/app/clementine/id1119493780\" target=\"_blank\" style=\"vertical-align: middle;\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_appstore.png\"\n alt=\"App Store\"\n style=\"width: 20px\"></a>\n <a href=\"https://play.google.com/store/apps/details?id=com.clementine.myclementine&hl=fr\" target=\"_blank\" style=\"vertical-align: middle; margin-left: 10px\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_playstore.png\"\n alt=\"Play Store\"\n style=\"width: 20px\"></a>\n </p>\n </td>\n <td width=\"120\">\n <!-- QR Code -->\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_qrcode<%= commercialName === 'Pourcentage' ? '_pourcentage' : '' %><%= commercialName === 'Comptalib' ? '_comptalib' : '' %>.png\"\n style=\"width:128px\"\n alt=\"Prenez rendez-vous ici !\">\n </td>\n </tr>\n <tr>\n <td colspan=\"2\">\n <p style=\"margin:0; padding:0px 0 4px; color:#6E6E71; text-align: right\">\n <a href=\"https://www.smileyourpla.net/\" style=\"display: inline-block; color:#6E6E71;\" target=\"_blank\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_smileYourPlanet.png\"\n alt=\"Initiative Smile your planet\" height=\"36\"></a>\n <% if(user.calendlyUrl) { %>\n <a href=\"<%= user.calendlyUrl %>\" style=\"display: inline-block; color:#6E6E71;\" target=\"_blank\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_rdv_tel<%= commercialName === 'Pourcentage' ? '_pourcentage' : '' %>.png\"\n alt=\"Demande de rdv téléphonique\">\n </a>\n <% } %>\n </p>\n </td>\n </tr>\n </table>\n <% } %>\n </td>\n </tr>\n \n ${footer}\n\n <tr>\n <td\n style=\"clear:both; padding-top: 20px; font-size:14px; line-height:18px; color:#ADADAD; text-align: justify; font-family: Arial;\"\n colspan=\"4\">\n Les informations contenues dans ce courrier électronique et ses pièces jointes sont confidentielles et couvertes par le secret professionnel. Si vous n'êtes pas le(s) destinataire(s) ou avez reçu ce courrier électronique par erreur, merci de bien vouloir supprimer l'email et d'en informer l'expéditeur dès que possible. Ce courrier électronique ne peut pas être divulgué, utilisé ou copié par quelqu'un d'autre que le(s) destinataire(s).\n </td>\n</tr>\n</table>`;"]}
|
|
1
|
+
{"version":3,"file":"signature.js","sourceRoot":"","sources":["../../../../../ts/utils/email/templates/signature.ts"],"names":[],"mappings":";;;AAAA,MAAM,OAAO,GAAG;;;;;;;;;GASb,CAAC;AAEJ,MAAM,cAAc,GAAG;;;;;;;;;;;;aAYV,CAAC;AAEd,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;UAuBL,CAAC;AAEX,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoGd,CAAC;AAEW,QAAA,iBAAiB,GAAG,GAAG,OAAO;;;;;;;EAOzC,cAAc;;;IAGZ,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA4FN,MAAM;;;;;;;;;SASD,CAAC","sourcesContent":["const newIban = `<% if (commercialName === 'Clementine' && isFacturation) { %>\n <p style=\"font-size: 15px; font-family: Arial; margin:0; padding:0px 0 4px; color:#6E6E71; margin-bottom: 10px; font-weight: bold;\">\n <span style=\"color: #A0A0A0\">Nos coordonnées bancaires </span>IBAN : <%= iban %> - BIC : <%= bic %>\n </p>\n <% }else if (commercialName === 'Pourcentage' && [5, 7].includes(idTypeBrand)) { %> \n <p style=\"font-size: 15px; font-family: Arial; margin:0; padding:0px 0 4px; color:#6E6E71; margin-bottom: 10px; font-weight: bold;\">\n <span style=\"color: #A0A0A0\">Attention changement de RIB </span>IBAN : <%= iban %> - BIC : <%= bic %>\n </p>\n<% } %>\n `;\n\nconst logoClementine = `<% if (commercialName === 'Clementine') { %><tr>\n<td\ncolspan=\"3\"\nclass=\"logo\"\nstyle=\"\"\nwidth=\"950\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/logo_2022.png\"\n alt=\"Logo\"\n height=\"32\"\n style=\"padding-bottom: 10px;\">\n</td>\n</tr><% } %>`;\n\nconst avatar = `<% if (!forceRole && user?.avatar?.token) { %>\n <td\n class=\"avatar\"\n style=\"text-align:center; padding: 20px 0 20px 20px; position: relative;\"\n width=\"100\">\n <% if(commercialName === 'Clementine') { %>\n <p style=\"padding: 20px;background-image: url('https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_quotes.png');background-size: 26%;background-position: 81% -3%;background-repeat: no-repeat;\">\n <img\n style=\"max-height: 90px;max-width: 90px; border-radius: 100%; margin-top: 10px\"\n alt=\"Avatar\"\n src=\"<%= hostS3 %>users/<%= user.id %>/<%= user.avatar.token %>\"\n />\n </p>\n <% } else { %>\n <p style=\"padding: 20px;\">\n <img\n style=\"max-height: 90px;max-width: 90px; border-radius: 100%; margin-top: 10px\"\n alt=\"Avatar\"\n src=\"<%= hostS3 %>users/<%= user.id %>/<%= user.avatar.token %>\"\n />\n </p>\n <% } %>\n </td>\n <% } %>`;\n\nconst footer = `<% if(commercialName === 'Clementine') { %>\n <tr>\n <td\n style=\"clear:both; padding-top: 15px; font-size:17px; line-height:14px; color:#ADADAD; text-align: justify; font-family: Arial;\"\n colspan=\"4\">\n <table style=\"width: 100%\" width=\"100%\">\n <tr>\n <td colspan=\"7\" style=\"padding-bottom: 12px\">\n <span style=\"text-align: left; text-decoration: none; color: #A0A1A6; white-space: nowrap; float: left;\">\n Une question ? Découvrez votre <a href=\"https://www.clementine.fr/aide/\" style=\"color: #FF7E3C\">centre d'aide</a>\n </span>\n <span style=\"text-align: right; text-decoration: none; color: #A0A1A6; white-space: nowrap; float: right;\">\n Jusqu’à 500€ avec notre <a href=\"https://www.clementine.fr/parrainage/?utm_source=signature&utm_medium=email&utm_campaign=signature&utm_content=cta\" style=\"color: #FF7E3C\">programme de parrainage</a>\n </span>\n </td>\n </tr>\n <tr>\n <td style=\"padding:0 10px 0 0\" width=\"120\">\n <a href=\"https://app.clementine.fr/\" target=\"_blank\" style=\"text-decoration: none; color: #6E6E71; white-space: nowrap;\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_connect2.png\"\n style=\"vertical-align: text-top;\"\n width=\"20\"\n alt=\"Connexion\"> Connexion\n </a>\n </td>\n <td style=\"padding:0 10px 0 0\" width=\"170\">\n <!-- <a href=\"mailto:<%= supportMail %>\" target=\"_blank\" style=\"text-decoration: none; color: #6E6E71; white-space: nowrap;\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_support2.png\"\n style=\"vertical-align: text-top;\"\n width=\"17\"\n alt=\"Support technique\"> Support technique\n </a>-->\n </td>\n <td style=\"text-align: right; vertical-align: middle; color: #6E6E71\" width=\"430\">\n <!--<span>Télécharger l'app</span>\n <a href=\"https://apps.apple.com/fr/app/clementine/id1119493780\" target=\"_blank\" style=\"vertical-align: middle; margin-left: 10px\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_appstore.png\"\n alt=\"App Store\"\n style=\"width: 20px\"></a>\n <a href=\"https://play.google.com/store/apps/details?id=com.clementine.myclementine&hl=fr\" target=\"_blank\" style=\"vertical-align: middle; margin-left: 10px\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_playstore.png\"\n alt=\"Play Store\"\n style=\"width: 20px\"></a>-->\n </td>\n <td style=\"padding:0 5px 0 0\" width=\"24\">\n <a href=\"https://www.youtube.com/channel/UCVnCpcLdRwuYBLvAphHsvig/\" target=\"_blank\" style=\"vertical-align: middle;\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_youtube.png\"\n alt=\"YouTube\"\n style=\"width: 20px\"></a>\n </td>\n <td style=\"padding:0 5px 0 0\" width=\"24\">\n <a href=\"https://www.linkedin.com/company/compta-cl%C3%A9mentine/\" target=\"_blank\" style=\"vertical-align: middle;\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_linkedin.png\"\n alt=\"LinkedIn\"\n style=\"width: 20px\"></a>\n </td>\n <td style=\"padding:0 5px 0 0\" width=\"24\">\n <a href=\"https://www.instagram.com/comptaclementine/\" target=\"_blank\" style=\"vertical-align: middle;\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_instagram.png\"\n alt=\"Instagram\"\n style=\"width: 20px\"></a>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n <% } else if(commercialName === 'Pourcentage') { %>\n <tr>\n <td\n style=\"clear:both; padding-top: 15px; font-size:17px; line-height:14px; color:#ADADAD; text-align: justify; font-family: Arial;\"\n colspan=\"4\">\n <table style=\"width: 100%\" width=\"100%\">\n <tr>\n <td style=\"padding:0 10px 0 0\" width=\"120\">\n <a href=\"https://app.pourcentage.fr/\" target=\"_blank\" style=\"text-decoration: none; color: #6E6E71; white-space: nowrap;\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_connect2.png\"\n style=\"vertical-align: text-top;\"\n width=\"20\"\n alt=\"Connexion\"> Connexion\n </a>\n </td>\n <td style=\"text-align: right; vertical-align: middle; color: #6E6E71\" width=\"430\">\n <!-- <span>Télécharger l'app</span>\n <a href=\"https://apps.apple.com/fr/app/pourcentage-fr/id1631156043\" target=\"_blank\" style=\"vertical-align: middle; margin-left: 10px\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_appstore.png\"\n alt=\"App Store\"\n style=\"width: 20px\"></a>\n <a href=\"https://play.google.com/store/apps/details?id=com.clementine.pourcentage\" target=\"_blank\" style=\"vertical-align: middle; margin-left: 10px\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_playstore.png\"\n alt=\"Play Store\"\n style=\"width: 20px\"></a> -->\n </td>\n </tr>\n </table>\n </td>\n </tr>\n <% } %>\n`;\n\nexport const signatureTemplate = `${newIban}<table\nborder=\"0\"\ncellpadding=\"0\"\ncellspacing=\"0\"\nwidth=\"950\"\nclass=\"signatureClementine\">\n\n${logoClementine}\n\n<tr style=\"background: #F4F8FB\">\n ${avatar}\n <td\n class=\"infos\"\n style=\" padding: 20px 0 20px 30px;font-size: 17px; font-family: Arial; color:#000\"\n width=\"390\"\n colspan=\"2\">\n <table\n border=\"0\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n width=\"390\">\n <tr>\n <td width=\"390\">\n <p style=\"font-size: 17px; margin:0px 0; padding:0\">\n <strong><span style=\"color:<%= primaryColor %>; font-weight: bold;\"><%= user?.firstname ?? '' %> <%= user?.lastname ?? '' %></span></strong>\n </p>\n\n <% if(roleSignature) { %>\n <p style=\"font-size: 17px; margin:0px 0; padding:0\">\n <span style=\"color: #6E6E71; font-weight: bold;\"><%= roleSignature %></span>\n </p>\n <% } %>\n </td>\n </tr>\n </table>\n <p style=\"margin:16px 0; color:#6E6E71; border-top: 2px solid #6E6E71; width: 100px; opacity: 0.2\"><!-- --></p>\n <p style=\"margin:0px 0; padding:0 0 4px; color:#6E6E71;\">\n Standard : <%- standardPhoneSignature %><br/>\n <% if(phoneSignature && phoneSignature !== standardPhoneSignature) { %>\n Ligne directe : <%- phoneSignature %><br/>\n <% } %>\n Nos horaires : <%= horaires %>\n </p>\n </td>\n \n <td class=\"infos\" style=\"padding: 20px 20px 20px 0px; font-size: 17px; font-family: Arial; color:#000; <%= !user.calendlyUrl ? 'vertical-align: top;' : '' %>\"\n width=\"370\">\n <% if(['Clementine', 'Pourcentage', 'Comptalib'].includes(commercialName)) { %>\n <table\n border=\"0\"\n cellpadding=\"0\"\n cellspacing=\"0\"\n width=\"350\">\n <tr>\n <td width=\"230\">\n <!-- image Télécharger l'app mobile -->\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_download_app<%= commercialName === 'Pourcentage' ? '_pourcentage' : '' %><%= commercialName === 'Comptalib' ? '_comptalib' : '' %>.png\"\n alt=\"Télécharger l'application mobile\"\n style=\"width: 152px; float:right\">\n \n <p style=\"float:right; margin-right: 45px\">\n <span style=\"margin:0; padding:0 0 4px; color:#6E6E71;\">Disponible sur<br/></span>\n <a href=\"https://apps.apple.com/fr/app/clementine/id1119493780\" target=\"_blank\" style=\"vertical-align: middle;\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_appstore.png\"\n alt=\"App Store\"\n style=\"width: 20px\"></a>\n <a href=\"https://play.google.com/store/apps/details?id=com.clementine.myclementine&hl=fr\" target=\"_blank\" style=\"vertical-align: middle; margin-left: 10px\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_playstore.png\"\n alt=\"Play Store\"\n style=\"width: 20px\"></a>\n </p>\n </td>\n <td width=\"120\">\n <!-- QR Code -->\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_qrcode<%= commercialName === 'Pourcentage' ? '_pourcentage' : '' %><%= commercialName === 'Comptalib' ? '_comptalib' : '' %>.png\"\n style=\"width:128px\"\n alt=\"Prenez rendez-vous ici !\">\n </td>\n </tr>\n <tr>\n <td colspan=\"2\">\n <p style=\"margin:0; padding:0px 0 4px; color:#6E6E71; text-align: right\">\n <a href=\"https://www.smileyourpla.net/\" style=\"display: inline-block; color:#6E6E71;\" target=\"_blank\"><img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_smileYourPlanet.png\"\n alt=\"Initiative Smile your planet\" height=\"36\"></a>\n <% if(user.calendlyUrl && !isDataOfficer) { %>\n <a href=\"<%= user.calendlyUrl %>\" style=\"display: inline-block; color:#6E6E71;\" target=\"_blank\">\n <img\n src=\"https://clementine-website.s3.eu-west-3.amazonaws.com/signaturemail_rdv_tel<%= commercialName === 'Pourcentage' ? '_pourcentage' : '' %>.png\"\n alt=\"Demande de rdv téléphonique\">\n </a>\n <% } %>\n </p>\n </td>\n </tr>\n </table>\n <% } %>\n </td>\n </tr>\n \n ${footer}\n\n <tr>\n <td\n style=\"clear:both; padding-top: 20px; font-size:14px; line-height:18px; color:#ADADAD; text-align: justify; font-family: Arial;\"\n colspan=\"4\">\n Les informations contenues dans ce courrier électronique et ses pièces jointes sont confidentielles et couvertes par le secret professionnel. Si vous n'êtes pas le(s) destinataire(s) ou avez reçu ce courrier électronique par erreur, merci de bien vouloir supprimer l'email et d'en informer l'expéditeur dès que possible. Ce courrier électronique ne peut pas être divulgué, utilisé ou copié par quelqu'un d'autre que le(s) destinataire(s).\n </td>\n</tr>\n</table>`;"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../../ts/utils/email.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../../ts/utils/email.ts"],"names":[],"mappings":"AAyIA,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,GAAG,GAAG,MAAM,CAmJrD"}
|
package/dist/cjs/utils/email.js
CHANGED
|
@@ -30,6 +30,10 @@ function getRoleSignature(user) {
|
|
|
30
30
|
const isFacturation = user.roles.map((r) => r.id).includes(Role_1.Role.FACTURATION);
|
|
31
31
|
const isExpert = user.roles.map((r) => r.id).includes(Role_1.Role.EXPERT_ACCOUNTANT);
|
|
32
32
|
const isCS = user.roles.map((r) => r.id).includes(Role_1.Role.CUSTOMER_SUCCESS);
|
|
33
|
+
const isOnBoarder = user.roles.map((r) => r.id).includes(Role_1.Role.ON_BOARDER);
|
|
34
|
+
const isTermination = user.roles.map((r) => r.id).includes(Role_1.Role.TERMINATION);
|
|
35
|
+
const isLitige = user.roles.map((r) => r.id).includes(Role_1.Role.LITIGE);
|
|
36
|
+
const isDataOfficer = user.roles.map((r) => r.id).includes(Role_1.Role.DATA_OFFICER);
|
|
33
37
|
const isSales = user.roles.map((r) => r.id).includes(Role_1.Role.COMMERCIAL);
|
|
34
38
|
const isAdmin = user.roles.map((r) => r.id).includes(Role_1.Role.ADMIN);
|
|
35
39
|
const isFront = !!intersection([user.roles.map((r) => r.id), [Role_1.Role.FRONT_OFFICE, Role_1.Role.FRONT_OFFICE_EXPRESS]]).length;
|
|
@@ -45,6 +49,30 @@ function getRoleSignature(user) {
|
|
|
45
49
|
if (isCS) {
|
|
46
50
|
return `Conseill${user.idCivility === 2 ? 'ère' : 'er'} comptable`;
|
|
47
51
|
}
|
|
52
|
+
if (isOnBoarder && isManager) {
|
|
53
|
+
return `Responsable chargé${user.idCivility === 2 ? 'e' : ''} accueil clients`;
|
|
54
|
+
}
|
|
55
|
+
if (isOnBoarder) {
|
|
56
|
+
return `Chargé${user.idCivility === 2 ? 'e' : ''} accueil clients`;
|
|
57
|
+
}
|
|
58
|
+
if (isTermination && isManager) {
|
|
59
|
+
return `Responsable chargé${user.idCivility === 2 ? 'e' : ''} de la satisfaction clients`;
|
|
60
|
+
}
|
|
61
|
+
if (isTermination) {
|
|
62
|
+
return `Chargé${user.idCivility === 2 ? 'e' : ''} de la satisfaction clients`;
|
|
63
|
+
}
|
|
64
|
+
if (isLitige && isManager) {
|
|
65
|
+
return `Responsable chargé${user.idCivility === 2 ? 'e' : ''} de la satisfaction clients (Litige)`;
|
|
66
|
+
}
|
|
67
|
+
if (isLitige) {
|
|
68
|
+
return `Chargé${user.idCivility === 2 ? 'e' : ''} de la satisfaction clients (Litige)`;
|
|
69
|
+
}
|
|
70
|
+
if (isDataOfficer && isManager) {
|
|
71
|
+
return 'Responsable aide comptable';
|
|
72
|
+
}
|
|
73
|
+
if (isDataOfficer) {
|
|
74
|
+
return 'Aide comptable';
|
|
75
|
+
}
|
|
48
76
|
if (isFacturation && isStagiaireOrAlternant) {
|
|
49
77
|
return 'Assistant facturation';
|
|
50
78
|
}
|
|
@@ -129,7 +157,7 @@ function getMailSignature(user, idTypeBrand) {
|
|
|
129
157
|
if (user.roles.map((r) => r.id).includes(Role_1.Role.ADMIN)) {
|
|
130
158
|
return informatiqueMail;
|
|
131
159
|
}
|
|
132
|
-
if (user && !!intersection([user.roles.map((r) => r.id), [Role_1.Role.FRONT_OFFICE, Role_1.Role.FRONT_OFFICE_EXPRESS, Role_1.Role.COMMERCIAL]]).length)
|
|
160
|
+
if (user && !!intersection([user.roles.map((r) => r.id), [Role_1.Role.FRONT_OFFICE, Role_1.Role.FRONT_OFFICE_EXPRESS, Role_1.Role.DATA_OFFICER, Role_1.Role.COMMERCIAL]]).length)
|
|
133
161
|
return user.email;
|
|
134
162
|
return bonjourMail;
|
|
135
163
|
}
|
|
@@ -152,6 +180,7 @@ function generateSignature(params) {
|
|
|
152
180
|
const bic = (0, brands_1.getBrandConfig)(Object.assign(Object.assign({}, (idTypeBrand ? { idTypeBrand } : {})), { objectWaited: 'bank.BIC' }));
|
|
153
181
|
const bonjourMail = (0, brands_1.getBrandConfig)(Object.assign(Object.assign({}, (idTypeBrand ? { idTypeBrand } : {})), { objectWaited: 'listMails.bonjour' }));
|
|
154
182
|
const socialMail = (0, brands_1.getBrandConfig)(Object.assign(Object.assign({}, (idTypeBrand ? { idTypeBrand } : {})), { objectWaited: 'listMails.social' }));
|
|
183
|
+
const dataOfficerMail = (0, brands_1.getBrandConfig)(Object.assign(Object.assign({}, (idTypeBrand ? { idTypeBrand } : {})), { objectWaited: 'listMails.gestion' }));
|
|
155
184
|
const supportMail = (0, brands_1.getBrandConfig)(Object.assign(Object.assign({}, (idTypeBrand ? { idTypeBrand } : {})), { objectWaited: 'listMails.support' }));
|
|
156
185
|
const juridiqueMail = (0, brands_1.getBrandConfig)(Object.assign(Object.assign({}, (idTypeBrand ? { idTypeBrand } : {})), { objectWaited: 'listMails.juridique' }));
|
|
157
186
|
const facturationMail = (0, brands_1.getBrandConfig)(Object.assign(Object.assign({}, (idTypeBrand ? { idTypeBrand } : {})), { objectWaited: 'listMails.facturation' }));
|
|
@@ -164,7 +193,16 @@ function generateSignature(params) {
|
|
|
164
193
|
let phoneSignature;
|
|
165
194
|
let horaires;
|
|
166
195
|
[roleSignature, mailSignature, phoneSignature, horaires] = ['Expert-Comptable', bonjourMail, false, 'Du lundi au vendredi de 9h à 19h'];
|
|
167
|
-
if (
|
|
196
|
+
if (user.roles && user.roles.some((r) => r.id === Role_1.Role.DATA_OFFICER)) { // Signature data_officer
|
|
197
|
+
user = {
|
|
198
|
+
firstname: `L'équipe ${commercialName}`,
|
|
199
|
+
isAll: true,
|
|
200
|
+
};
|
|
201
|
+
mailSignature = dataOfficerMail;
|
|
202
|
+
roleSignature = '';
|
|
203
|
+
phoneSignature = standardPhoneSignature;
|
|
204
|
+
}
|
|
205
|
+
else if (forceRole === 'social') { // Signature social
|
|
168
206
|
user = {
|
|
169
207
|
firstname: 'Service social',
|
|
170
208
|
isAll: true,
|
|
@@ -215,6 +253,7 @@ function generateSignature(params) {
|
|
|
215
253
|
return ejs.render(signature_1.signatureTemplate, {
|
|
216
254
|
forceRole,
|
|
217
255
|
isFacturation: user.roles ? user.roles.some((r) => r.id === Role_1.Role.FACTURATION) : false,
|
|
256
|
+
isDataOfficer: user.roles ? user.roles.some((r) => r.id === Role_1.Role.DATA_OFFICER) : true,
|
|
218
257
|
brandName,
|
|
219
258
|
idTypeBrand,
|
|
220
259
|
commercialName,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email.js","sourceRoot":"","sources":["../../../ts/utils/email.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kCAAkC;AAClC,qDAAqD;AACrD,yDAAsD;AACtD,6CAA0C;AAE1C,qCAAuD;AACvD,2DAAgE;AAEhE,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;AAE3B,SAAS,YAAY,CAAI,GAAe,IAAI,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;AAExH,SAAS,gBAAgB,CAAC,IAAQ;IAChC,IAAI,IAAI,CAAC,aAAa;QAAE,OAAO,IAAI,CAAC,aAAa,CAAC;IAElD,MAAM,sBAAsB,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,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ityType } from '../types/Enum/EntityType';\nimport { Role } from '../types/Enum/Role';\nimport { IUser } from '../types/Interface/models/IUser';\nimport { getBrandConfig, isItThisEnv } from './brands';\nimport { signatureTemplate } from './email/templates/signature';\n\nconst ejs = require('ejs');\n\nfunction intersection<T>(arr: [T[], T[]]) { return arr.reduce((a: T[], b: T[]) => a.filter((c) => b.includes(c)), []); }\n\nfunction getRoleSignature(user:any) {\n if (user.positionLabel) return user.positionLabel;\n\n const isStagiaireOrAlternant = user.roles.map((r: any) => r.id).includes(Role.INTERN) || user.roles.map((r: any) => r.id).includes(Role.ALTERNATE);\n const isManager = user.roles.map((r: any) => r.id).includes(Role.MANAGER);\n\n const isSocial = user.roles.map((r: any) => r.id).includes(Role.SOCIAL);\n const isJuridic = user.roles.map((r: any) => r.id).includes(Role.JURIDIC);\n const isFacturation = user.roles.map((r: any) => r.id).includes(Role.FACTURATION);\n const isExpert = user.roles.map((r: any) => r.id).includes(Role.EXPERT_ACCOUNTANT);\n const isCS = user.roles.map((r: any) => r.id).includes(Role.CUSTOMER_SUCCESS);\n const isSales = user.roles.map((r: any) => r.id).includes(Role.COMMERCIAL);\n const isAdmin = user.roles.map((r: any) => r.id).includes(Role.ADMIN);\n const isFront = !!intersection([user.roles.map((r: any) => r.id), [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS]]).length;\n\n if (isSales && isManager) { return 'Responsable commercial'; }\n if (isSales) { return `Chargé${user.idCivility === 2 ? 'e' : ''} de clientèle`; }\n\n if (isCS && isManager) { return 'Responsable relations clients'; }\n if (isCS) { return `Conseill${user.idCivility === 2 ? 'ère' : 'er'} comptable`; }\n\n if (isFacturation && isStagiaireOrAlternant) { return 'Assistant facturation'; }\n if (isFacturation && isManager) { return 'Responsable facturation'; }\n if (isFacturation) { return `Chargé${user.idCivility === 2 ? 'e' : ''} de facturation`; }\n\n if (isJuridic && isStagiaireOrAlternant) { return 'Assistant juridique'; }\n if (isJuridic && isManager) { return 'Responsable juridique'; }\n if (isJuridic) { return 'Juriste'; }\n\n if (isSocial && isStagiaireOrAlternant) { return 'Assistant paie'; }\n if (isSocial && isManager) { return 'Responsable paie'; }\n if (isSocial) { return 'Gestionnaire de paie'; }\n\n if (isExpert) { return `Expert${user.idCivility === 2 ? 'e' : ''}-comptable`; }\n\n if (isAdmin) { return 'Développeur web'; }\n\n if (isFront && isManager) return 'Responsable comptable';\n if (isFront && isStagiaireOrAlternant) return 'Assistant comptable';\n if (isFront) return `Comptable dédié${user.idCivility === 2 ? 'e' : ''}`;\n return `Comptable dédié${user.idCivility === 2 ? 'e' : ''}`;\n}\n\nfunction getHoraires(user:IUser) { // On affiche les horaires uniquement pour les front, et pas pour les TVA\n\n if (user?.entity && isItThisEnv('Pourcentage') && [EntityType.COMPTALIB, EntityType.AMEX, EntityType.CABINET_RONCHIERI_LANDRA].includes(user.entity)) {\n return 'Du lundi au vendredi de 9h à 18h';\n }\n \n return 'Du lundi au vendredi de 9h à 19h';\n\n // if (!intersection([user.roles.map((r: any) => r.id), [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS, Role.COMMERCIAL]]).length) return 'Du lundi au vendredi de 9h à 19h';\n\n // if (!user.workingSchedules.length) return 'Du lundi au vendredi de 9h à 19h';\n\n // let reducedSchedules = user.workingSchedules.reduce((acc: any, e:any, index: number) => {\n // const name = `${dayjs(e.morningStart, 'HH:mm:ss').format('HH:mm')}-${dayjs(e.afternoonEnd || e.morningEnd, 'HH:mm:ss').format('HH:mm')}`;\n // if (!acc[name]) acc[name] = [index];\n // else acc[name].push(index);\n // return acc;\n // }, {});\n\n // reducedSchedules = orderByLodash(reducedSchedules, (elem) => elem.length, ['desc']);\n\n // let resultHoraire = '';\n // let startH;\n // let startM;\n // let endH;\n // let endM;\n // let firstDayOfWeek;\n // let lastDayOfWeek;\n\n // reducedSchedules.forEach((schedule: any, index: number) => {\n // startH = dayjs(user.workingSchedules[schedule[0]].morningStart ? user.workingSchedules[schedule[0]].morningStart : user.workingSchedules[schedule[0]].afternoonStart, 'HH:mm:ss').get('hour');\n // startM = dayjs(user.workingSchedules[schedule[0]].morningStart ? user.workingSchedules[schedule[0]].morningStart : user.workingSchedules[schedule[0]].afternoonStart, 'HH:mm:ss').get('minute');\n // endH = dayjs(user.workingSchedules[schedule[0]].afternoonEnd || user.workingSchedules[schedule[0]].morningEnd, 'HH:mm:ss').get('hour');\n // endM = dayjs(user.workingSchedules[schedule[0]].afternoonEnd || user.workingSchedules[schedule[0]].morningEnd, 'HH:mm:ss').get('minute');\n // firstDayOfWeek = dayjs().locale('fr').day(user.workingSchedules[schedule[0]].idDay).format('dddd');\n // if (!index) {\n // // pour le premier index, on affiche l'amplitude horaire la plus commune, du XX au XX de Xh à Xh\n // lastDayOfWeek = dayjs().locale('fr').day(user.workingSchedules[user.workingSchedules.length - 1].idDay).format('dddd');\n // resultHoraire += `Du ${firstDayOfWeek} au ${lastDayOfWeek} de ${startH}h${startM > 0 ? startM : ''} à ${endH}h${endM > 0 ? endM : ''}`;\n // } else { // Fonctionnel si uniquement un jour par semaine avec des horaires différents\n // resultHoraire += `<br/>Le ${firstDayOfWeek} de ${startH}h${startM > 0 ? startM : ''} à ${endH}h${endM > 0 ? endM : ''}`;\n // }\n // });\n // return resultHoraire;\n}\n\nfunction getMailSignature(user:any, idTypeBrand:number) {\n const informatiqueMail = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'listMails.informatique',\n }) as unknown as string;\n const bonjourMail = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'listMails.bonjour',\n }) as unknown as string;\n\n if (user.roles.map((r: any) => r.id).includes(Role.ADMIN)) { return informatiqueMail; }\n if (user && !!intersection([user.roles.map((r: any) => r.id), [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS, Role.COMMERCIAL]]).length) return user.email;\n return bonjourMail;\n}\n\nfunction getPhoneSignature(user:any) {\n if (user.phone !== '0383931414') { return user.phone.replace(/\\B(?=(\\d{2})+(?!\\d))/g, ' '); }\n return false;\n}\n\nexport function generateSignature(params: any): string {\n const {\n forceRole = null, idTypeBrand = 1, ...otherParams\n } = params;\n let {\n user,\n } = otherParams;\n \n const hostS3 = getBrandConfig({\n idTypeBrand,\n objectWaited: 'urlS3',\n });\n\n const brandName = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'name',\n }) as unknown as string;\n const commercialName = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'commercialName',\n }) as unknown as string;\n const iban = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'bank.IBAN',\n }) as unknown as string;\n const bic = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'bank.BIC',\n }) as unknown as string;\n const bonjourMail = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'listMails.bonjour',\n }) as unknown as string;\n const socialMail = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'listMails.social',\n }) as unknown as string;\n const supportMail = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'listMails.support',\n }) as unknown as string;\n const juridiqueMail = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'listMails.juridique',\n }) as unknown as string;\n const facturationMail = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'listMails.facturation',\n }) as unknown as string;\n const primaryColor = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'colors.primary',\n }) as unknown as string;\n const standardPhoneSignature = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'listPhones.contact',\n }) as unknown as string;\n const juridiquePhoneSignature = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'listPhones.juridique',\n }) as unknown as string;\n const socialPhoneSignature = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'listPhones.social',\n }) as unknown as string;\n\n let roleSignature: string | null;\n let mailSignature: string | null;\n let phoneSignature: string | boolean;\n let horaires: string | null;\n [roleSignature, mailSignature, phoneSignature, horaires] = ['Expert-Comptable', bonjourMail, false, 'Du lundi au vendredi de 9h à 19h'];\n\n if (forceRole === 'social') { // Signature social\n user = {\n firstname: 'Service social',\n isAll: true,\n };\n mailSignature = socialMail;\n roleSignature = '';\n phoneSignature = socialPhoneSignature;\n } else if (forceRole === 'support') { // Signature support\n user = {\n firstname: 'Service Support',\n isAll: true,\n };\n mailSignature = supportMail;\n roleSignature = null;\n } else if (forceRole === 'juridique') { // Signature juridique\n user = {\n firstname: 'Service juridique',\n isAll: true,\n };\n mailSignature = juridiqueMail;\n roleSignature = null;\n phoneSignature = juridiquePhoneSignature;\n } else if (forceRole === 'facturation') { // Signature facturation\n user = {\n firstname: 'Service facturation',\n isAll: true,\n };\n mailSignature = facturationMail;\n roleSignature = null;\n phoneSignature = standardPhoneSignature;\n } else if (!user) { // Signature Clementine\n user = {\n firstname: `L'équipe ${commercialName}`,\n isAll: true,\n };\n roleSignature = '';\n } else if (user !== 0) { // Signature par défaut\n roleSignature = getRoleSignature(user);\n mailSignature = getMailSignature(user, idTypeBrand);\n horaires = getHoraires(user);\n phoneSignature = getPhoneSignature(user);\n }\n\n return ejs.render(signatureTemplate, {\n forceRole,\n isFacturation: user.roles ? user.roles.some((r: any) => r.id === Role.FACTURATION) : false,\n brandName,\n idTypeBrand,\n commercialName,\n iban,\n bic,\n hostS3,\n user,\n roleSignature,\n mailSignature,\n phoneSignature,\n standardPhoneSignature: standardPhoneSignature.replace(/\\s+/gm, ' '),\n horaires,\n primaryColor,\n supportMail,\n });\n}"]}
|
|
1
|
+
{"version":3,"file":"email.js","sourceRoot":"","sources":["../../../ts/utils/email.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kCAAkC;AAClC,qDAA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I,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,WAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,IAAI;QAC1F,SAAS;QACT,WAAW;QACX,cAAc;QACd,IAAI;QACJ,GAAG;QACH,MAAM;QACN,IAAI;QACJ,aAAa;QACb,aAAa;QACb,cAAc;QACd,sBAAsB,EAAE,sBAAsB,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC;QACzE,QAAQ;QACR,YAAY;QACZ,WAAW;KACZ,CAAC,CAAC;AACL,CAAC;AAnJD,8CAmJC","sourcesContent":["// import * as dayjs from 'dayjs';\n// import { orderBy as orderByLodash } from 'lodash';\nimport { EntityType } from '../types/Enum/EntityType';\nimport { Role } from '../types/Enum/Role';\nimport { IUser } from '../types/Interface/models/IUser';\nimport { getBrandConfig, isItThisEnv } from './brands';\nimport { signatureTemplate } from './email/templates/signature';\n\nconst ejs = require('ejs');\n\nfunction intersection<T>(arr: [T[], T[]]) { return arr.reduce((a: T[], b: T[]) => a.filter((c) => b.includes(c)), []); }\n\nfunction getRoleSignature(user:any) {\n if (user.positionLabel) return user.positionLabel;\n\n const isStagiaireOrAlternant = user.roles.map((r: any) => r.id).includes(Role.INTERN) || user.roles.map((r: any) => r.id).includes(Role.ALTERNATE);\n const isManager = user.roles.map((r: any) => r.id).includes(Role.MANAGER);\n\n const isSocial = user.roles.map((r: any) => r.id).includes(Role.SOCIAL);\n const isJuridic = user.roles.map((r: any) => r.id).includes(Role.JURIDIC);\n const isFacturation = user.roles.map((r: any) => r.id).includes(Role.FACTURATION);\n const isExpert = user.roles.map((r: any) => r.id).includes(Role.EXPERT_ACCOUNTANT);\n const isCS = user.roles.map((r: any) => r.id).includes(Role.CUSTOMER_SUCCESS);\n const isOnBoarder = user.roles.map((r: any) => r.id).includes(Role.ON_BOARDER);\n const isTermination = user.roles.map((r: any) => r.id).includes(Role.TERMINATION);\n const isLitige = user.roles.map((r: any) => r.id).includes(Role.LITIGE);\n const isDataOfficer = user.roles.map((r: any) => r.id).includes(Role.DATA_OFFICER);\n const isSales = user.roles.map((r: any) => r.id).includes(Role.COMMERCIAL);\n const isAdmin = user.roles.map((r: any) => r.id).includes(Role.ADMIN);\n const isFront = !!intersection([user.roles.map((r: any) => r.id), [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS]]).length;\n\n if (isSales && isManager) { return 'Responsable commercial'; }\n if (isSales) { return `Chargé${user.idCivility === 2 ? 'e' : ''} de clientèle`; }\n\n if (isCS && isManager) { return 'Responsable relations clients'; }\n if (isCS) { return `Conseill${user.idCivility === 2 ? 'ère' : 'er'} comptable`; }\n\n if (isOnBoarder && isManager) { return `Responsable chargé${user.idCivility === 2 ? 'e' : ''} accueil clients`; }\n if (isOnBoarder) { return `Chargé${user.idCivility === 2 ? 'e' : ''} accueil clients`; }\n\n if (isTermination && isManager) { return `Responsable chargé${user.idCivility === 2 ? 'e' : ''} de la satisfaction clients`; }\n if (isTermination) { return `Chargé${user.idCivility === 2 ? 'e' : ''} de la satisfaction clients`; }\n\n if (isLitige && isManager) { return `Responsable chargé${user.idCivility === 2 ? 'e' : ''} de la satisfaction clients (Litige)`; }\n if (isLitige) { return `Chargé${user.idCivility === 2 ? 'e' : ''} de la satisfaction clients (Litige)`; }\n\n if (isDataOfficer && isManager) { return 'Responsable aide comptable'; }\n if (isDataOfficer) { return 'Aide comptable'; }\n\n if (isFacturation && isStagiaireOrAlternant) { return 'Assistant facturation'; }\n if (isFacturation && isManager) { return 'Responsable facturation'; }\n if (isFacturation) { return `Chargé${user.idCivility === 2 ? 'e' : ''} de facturation`; }\n\n if (isJuridic && isStagiaireOrAlternant) { return 'Assistant juridique'; }\n if (isJuridic && isManager) { return 'Responsable juridique'; }\n if (isJuridic) { return 'Juriste'; }\n\n if (isSocial && isStagiaireOrAlternant) { return 'Assistant paie'; }\n if (isSocial && isManager) { return 'Responsable paie'; }\n if (isSocial) { return 'Gestionnaire de paie'; }\n\n if (isExpert) { return `Expert${user.idCivility === 2 ? 'e' : ''}-comptable`; }\n\n if (isAdmin) { return 'Développeur web'; }\n\n if (isFront && isManager) return 'Responsable comptable';\n if (isFront && isStagiaireOrAlternant) return 'Assistant comptable';\n if (isFront) return `Comptable dédié${user.idCivility === 2 ? 'e' : ''}`;\n return `Comptable dédié${user.idCivility === 2 ? 'e' : ''}`;\n}\n\nfunction getHoraires(user:IUser) { // On affiche les horaires uniquement pour les front, et pas pour les TVA\n\n if (user?.entity && isItThisEnv('Pourcentage') && [EntityType.COMPTALIB, EntityType.AMEX, EntityType.CABINET_RONCHIERI_LANDRA].includes(user.entity)) {\n return 'Du lundi au vendredi de 9h à 18h';\n }\n \n return 'Du lundi au vendredi de 9h à 19h';\n\n // if (!intersection([user.roles.map((r: any) => r.id), [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS, Role.COMMERCIAL]]).length) return 'Du lundi au vendredi de 9h à 19h';\n\n // if (!user.workingSchedules.length) return 'Du lundi au vendredi de 9h à 19h';\n\n // let reducedSchedules = user.workingSchedules.reduce((acc: any, e:any, index: number) => {\n // const name = `${dayjs(e.morningStart, 'HH:mm:ss').format('HH:mm')}-${dayjs(e.afternoonEnd || e.morningEnd, 'HH:mm:ss').format('HH:mm')}`;\n // if (!acc[name]) acc[name] = [index];\n // else acc[name].push(index);\n // return acc;\n // }, {});\n\n // reducedSchedules = orderByLodash(reducedSchedules, (elem) => elem.length, ['desc']);\n\n // let resultHoraire = '';\n // let startH;\n // let startM;\n // let endH;\n // let endM;\n // let firstDayOfWeek;\n // let lastDayOfWeek;\n\n // reducedSchedules.forEach((schedule: any, index: number) => {\n // startH = dayjs(user.workingSchedules[schedule[0]].morningStart ? user.workingSchedules[schedule[0]].morningStart : user.workingSchedules[schedule[0]].afternoonStart, 'HH:mm:ss').get('hour');\n // startM = dayjs(user.workingSchedules[schedule[0]].morningStart ? user.workingSchedules[schedule[0]].morningStart : user.workingSchedules[schedule[0]].afternoonStart, 'HH:mm:ss').get('minute');\n // endH = dayjs(user.workingSchedules[schedule[0]].afternoonEnd || user.workingSchedules[schedule[0]].morningEnd, 'HH:mm:ss').get('hour');\n // endM = dayjs(user.workingSchedules[schedule[0]].afternoonEnd || user.workingSchedules[schedule[0]].morningEnd, 'HH:mm:ss').get('minute');\n // firstDayOfWeek = dayjs().locale('fr').day(user.workingSchedules[schedule[0]].idDay).format('dddd');\n // if (!index) {\n // // pour le premier index, on affiche l'amplitude horaire la plus commune, du XX au XX de Xh à Xh\n // lastDayOfWeek = dayjs().locale('fr').day(user.workingSchedules[user.workingSchedules.length - 1].idDay).format('dddd');\n // resultHoraire += `Du ${firstDayOfWeek} au ${lastDayOfWeek} de ${startH}h${startM > 0 ? startM : ''} à ${endH}h${endM > 0 ? endM : ''}`;\n // } else { // Fonctionnel si uniquement un jour par semaine avec des horaires différents\n // resultHoraire += `<br/>Le ${firstDayOfWeek} de ${startH}h${startM > 0 ? startM : ''} à ${endH}h${endM > 0 ? endM : ''}`;\n // }\n // });\n // return resultHoraire;\n}\n\nfunction getMailSignature(user:any, idTypeBrand:number) {\n const informatiqueMail = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'listMails.informatique',\n }) as unknown as string;\n const bonjourMail = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'listMails.bonjour',\n }) as unknown as string;\n\n if (user.roles.map((r: any) => r.id).includes(Role.ADMIN)) { return informatiqueMail; }\n if (user && !!intersection([user.roles.map((r: any) => r.id), [Role.FRONT_OFFICE, Role.FRONT_OFFICE_EXPRESS, Role.DATA_OFFICER, Role.COMMERCIAL]]).length) return user.email;\n return bonjourMail;\n}\n\nfunction getPhoneSignature(user:any) {\n if (user.phone !== '0383931414') { return user.phone.replace(/\\B(?=(\\d{2})+(?!\\d))/g, ' '); }\n return false;\n}\n\nexport function generateSignature(params: any): string {\n const {\n forceRole = null, idTypeBrand = 1, ...otherParams\n } = params;\n let {\n user,\n } = otherParams;\n \n const hostS3 = getBrandConfig({\n idTypeBrand,\n objectWaited: 'urlS3',\n });\n\n const brandName = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'name',\n }) as unknown as string;\n const commercialName = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'commercialName',\n }) as unknown as string;\n const iban = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'bank.IBAN',\n }) as unknown as string;\n const bic = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'bank.BIC',\n }) as unknown as string;\n const bonjourMail = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'listMails.bonjour',\n }) as unknown as string;\n const socialMail = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'listMails.social',\n }) as unknown as string;\n const dataOfficerMail = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'listMails.gestion',\n }) as unknown as string;\n const supportMail = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'listMails.support',\n }) as unknown as string;\n const juridiqueMail = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'listMails.juridique',\n }) as unknown as string;\n const facturationMail = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'listMails.facturation',\n }) as unknown as string;\n const primaryColor = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'colors.primary',\n }) as unknown as string;\n const standardPhoneSignature = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'listPhones.contact',\n }) as unknown as string;\n const juridiquePhoneSignature = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'listPhones.juridique',\n }) as unknown as string;\n const socialPhoneSignature = getBrandConfig({\n ...(idTypeBrand ? { idTypeBrand } : {}),\n objectWaited: 'listPhones.social',\n }) as unknown as string;\n\n let roleSignature: string | null;\n let mailSignature: string | null;\n let phoneSignature: string | boolean;\n let horaires: string | null;\n [roleSignature, mailSignature, phoneSignature, horaires] = ['Expert-Comptable', bonjourMail, false, 'Du lundi au vendredi de 9h à 19h'];\n\n if (user.roles && user.roles.some((r: any) => r.id === Role.DATA_OFFICER)) { // Signature data_officer\n user = {\n firstname: `L'équipe ${commercialName}`,\n isAll: true,\n };\n mailSignature = dataOfficerMail;\n roleSignature = '';\n phoneSignature = standardPhoneSignature;\n } else if (forceRole === 'social') { // Signature social\n user = {\n firstname: 'Service social',\n isAll: true,\n };\n mailSignature = socialMail;\n roleSignature = '';\n phoneSignature = socialPhoneSignature;\n } else if (forceRole === 'support') { // Signature support\n user = {\n firstname: 'Service Support',\n isAll: true,\n };\n mailSignature = supportMail;\n roleSignature = null;\n } else if (forceRole === 'juridique') { // Signature juridique\n user = {\n firstname: 'Service juridique',\n isAll: true,\n };\n mailSignature = juridiqueMail;\n roleSignature = null;\n phoneSignature = juridiquePhoneSignature;\n } else if (forceRole === 'facturation') { // Signature facturation\n user = {\n firstname: 'Service facturation',\n isAll: true,\n };\n mailSignature = facturationMail;\n roleSignature = null;\n phoneSignature = standardPhoneSignature;\n } else if (!user) { // Signature Clementine\n user = {\n firstname: `L'équipe ${commercialName}`,\n isAll: true,\n };\n roleSignature = '';\n } else if (user !== 0) { // Signature par défaut\n roleSignature = getRoleSignature(user);\n mailSignature = getMailSignature(user, idTypeBrand);\n horaires = getHoraires(user);\n phoneSignature = getPhoneSignature(user);\n }\n\n return ejs.render(signatureTemplate, {\n forceRole,\n isFacturation: user.roles ? user.roles.some((r: any) => r.id === Role.FACTURATION) : false,\n isDataOfficer: user.roles ? user.roles.some((r: any) => r.id === Role.DATA_OFFICER) : true,\n brandName,\n idTypeBrand,\n commercialName,\n iban,\n bic,\n hostS3,\n user,\n roleSignature,\n mailSignature,\n phoneSignature,\n standardPhoneSignature: standardPhoneSignature.replace(/\\s+/gm, ' '),\n horaires,\n primaryColor,\n supportMail,\n });\n}"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../../../ts/utils/task.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,oBAAoB,cAAe,MAAM,EAAE,KAAG,
|
|
1
|
+
{"version":3,"file":"task.d.ts","sourceRoot":"","sources":["../../../ts/utils/task.ts"],"names":[],"mappings":"AAGA,QAAA,MAAM,oBAAoB,cAAe,MAAM,EAAE,KAAG,MAwBnD,CAAC;AAgBF,QAAA,MAAM,2BAA2B,aAAc,OAAO,cAAc,MAAM,KAAG,MAAM,GAAG,SAGrF,CAAC;AAEF,QAAA,MAAM,6BAA6B,WAAY,MAAM,KAAG,OAAgF,CAAC;AAEzI,OAAO,EACL,oBAAoB,EAAE,2BAA2B,EAAE,6BAA6B,GACjF,CAAC"}
|
package/dist/cjs/utils/task.js
CHANGED
|
@@ -20,9 +20,21 @@ const getIdRoleUsedForTask = (listRoles) => {
|
|
|
20
20
|
else if (listRoles.includes(Role_1.Role.CUSTOMER_SUCCESS)) {
|
|
21
21
|
idRole = Role_1.Role.CUSTOMER_SUCCESS;
|
|
22
22
|
}
|
|
23
|
+
else if (listRoles.includes(Role_1.Role.ON_BOARDER)) {
|
|
24
|
+
idRole = Role_1.Role.ON_BOARDER;
|
|
25
|
+
}
|
|
26
|
+
else if (listRoles.includes(Role_1.Role.TERMINATION)) {
|
|
27
|
+
idRole = Role_1.Role.TERMINATION;
|
|
28
|
+
}
|
|
29
|
+
else if (listRoles.includes(Role_1.Role.LITIGE)) {
|
|
30
|
+
idRole = Role_1.Role.LITIGE;
|
|
31
|
+
}
|
|
23
32
|
else if (listRoles.includes(Role_1.Role.FRONT_OFFICE)) {
|
|
24
33
|
idRole = Role_1.Role.FRONT_OFFICE;
|
|
25
34
|
}
|
|
35
|
+
else if (listRoles.includes(Role_1.Role.DATA_OFFICER)) {
|
|
36
|
+
idRole = Role_1.Role.DATA_OFFICER;
|
|
37
|
+
}
|
|
26
38
|
return idRole;
|
|
27
39
|
};
|
|
28
40
|
exports.getIdRoleUsedForTask = getIdRoleUsedForTask;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task.js","sourceRoot":"","sources":["../../../ts/utils/task.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAC1C,qEAAwF;AAExF,MAAM,oBAAoB,GAAG,CAAC,SAAmB,EAAU,EAAE;IAC3D,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,IAAI,SAAS,CAAC,QAAQ,CAAC,WAAI,CAAC,UAAU,CAAC,EAAE;QACvC,MAAM,GAAG,WAAI,CAAC,UAAU,CAAC;KAC1B;SAAM,IAAI,SAAS,CAAC,QAAQ,CAAC,WAAI,CAAC,OAAO,CAAC,EAAE;QAC3C,MAAM,GAAG,WAAI,CAAC,OAAO,CAAC;KACvB;SAAM,IAAI,SAAS,CAAC,QAAQ,CAAC,WAAI,CAAC,MAAM,CAAC,EAAE;QAC1C,MAAM,GAAG,WAAI,CAAC,MAAM,CAAC;KACtB;SAAM,IAAI,SAAS,CAAC,QAAQ,CAAC,WAAI,CAAC,WAAW,CAAC,EAAE;QAC/C,MAAM,GAAG,WAAI,CAAC,WAAW,CAAC;KAC3B;SAAM,IAAI,SAAS,CAAC,QAAQ,CAAC,WAAI,CAAC,gBAAgB,CAAC,EAAE;QACpD,MAAM,GAAG,WAAI,CAAC,gBAAgB,CAAC;KAChC;SAAM,IAAI,SAAS,CAAC,QAAQ,CAAC,WAAI,CAAC,YAAY,CAAC,EAAE;QAChD,MAAM,GAAG,WAAI,CAAC,YAAY,CAAC;KAC5B;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAwBA,oDAAoB;AAtBtB,yEAAyE;AACzE,oBAAoB;AACpB,+CAA+C;AAC/C,6BAA6B;AAC7B,8HAA8H;AAC9H,6BAA6B;AAC7B,4DAA4D;AAC5D,6BAA6B;AAC7B,wDAAwD;AACxD,6BAA6B;AAC7B,MAAM;AACN,mBAAmB;AACnB,KAAK;AAEL,MAAM,2BAA2B,GAAG,CAAC,QAAiB,EAAE,UAAkB,EAAsB,EAAE;;IAChG,MAAM,YAAY,GAAG,QAAQ,KAAK,IAAI,CAAC,CAAC,CAAC,mCAAgB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,mCAAgB,CAAC,MAAM,CAAC,KAAK,CAAC;IACvG,OAAO,MAAA,YAAY,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,KAAK,UAAU,CAAC,0CAAE,IAAI,CAAC;AAC3E,CAAC,CAAC;AAKsB,kEAA2B;AAHnD,MAAM,6BAA6B,GAAG,CAAC,MAAc,EAAW,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,uCAAoB,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC;AAGpF,sEAA6B","sourcesContent":["import { Role } from '../types/Enum/Role';\nimport { TaskResponseType, RoleAvailableForTask } from '../types/Enum/TaskResponseType';\n\nconst getIdRoleUsedForTask = (listRoles: number[]): number => {\n let idRole = 0;\n if (listRoles.includes(Role.COMMERCIAL)) {\n idRole = Role.COMMERCIAL;\n } else if (listRoles.includes(Role.JURIDIC)) {\n idRole = Role.JURIDIC;\n } else if (listRoles.includes(Role.SOCIAL)) {\n idRole = Role.SOCIAL;\n } else if (listRoles.includes(Role.FACTURATION)) {\n idRole = Role.FACTURATION;\n } else if (listRoles.includes(Role.CUSTOMER_SUCCESS)) {\n idRole = Role.CUSTOMER_SUCCESS;\n } else if (listRoles.includes(Role.FRONT_OFFICE)) {\n idRole = Role.FRONT_OFFICE;\n }\n return idRole;\n};\n\n// const getIdRoleUsedForManagerTask = (listRoles: number[]): number => {\n// let idRole = 0;\n// if (listRoles.includes(Role.COMMERCIAL)) {\n// idRole = Role.MANAGER;\n// } else if (listRoles.includes(Role.JURIDIC) || listRoles.includes(Role.SOCIAL) || listRoles.includes(Role.FACTURATION)) {\n// idRole = Role.MANAGER;\n// } else if (listRoles.includes(Role.CUSTOMER_SUCCESS)) {\n// idRole = Role.MANAGER;\n// } else if (listRoles.includes(Role.FRONT_OFFICE)) {\n// idRole = Role.MANAGER;\n// }\n// return idRole;\n// };\n\nconst getIdRoleUsedForAttribution = (isIntern: boolean, idTaskType: number): number | undefined => {\n const taskTypeList = isIntern === true ? TaskResponseType.INTERN.types : TaskResponseType.EXTERN.types;\n return taskTypeList.find((taskType) => taskType.id === idTaskType)?.role;\n};\n\nconst getIdRoleUsedForGetTaskOfUser = (idRole: number): boolean => !!Object.values(RoleAvailableForTask).find((role) => role === idRole);\n\nexport {\n getIdRoleUsedForTask, getIdRoleUsedForAttribution, getIdRoleUsedForGetTaskOfUser,\n};"]}
|
|
1
|
+
{"version":3,"file":"task.js","sourceRoot":"","sources":["../../../ts/utils/task.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAC1C,qEAAwF;AAExF,MAAM,oBAAoB,GAAG,CAAC,SAAmB,EAAU,EAAE;IAC3D,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,IAAI,SAAS,CAAC,QAAQ,CAAC,WAAI,CAAC,UAAU,CAAC,EAAE;QACvC,MAAM,GAAG,WAAI,CAAC,UAAU,CAAC;KAC1B;SAAM,IAAI,SAAS,CAAC,QAAQ,CAAC,WAAI,CAAC,OAAO,CAAC,EAAE;QAC3C,MAAM,GAAG,WAAI,CAAC,OAAO,CAAC;KACvB;SAAM,IAAI,SAAS,CAAC,QAAQ,CAAC,WAAI,CAAC,MAAM,CAAC,EAAE;QAC1C,MAAM,GAAG,WAAI,CAAC,MAAM,CAAC;KACtB;SAAM,IAAI,SAAS,CAAC,QAAQ,CAAC,WAAI,CAAC,WAAW,CAAC,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vG,OAAO,MAAA,YAAY,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,KAAK,UAAU,CAAC,0CAAE,IAAI,CAAC;AAC3E,CAAC,CAAC;AAKsB,kEAA2B;AAHnD,MAAM,6BAA6B,GAAG,CAAC,MAAc,EAAW,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,uCAAoB,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC;AAGpF,sEAA6B","sourcesContent":["import { Role } from '../types/Enum/Role';\nimport { TaskResponseType, RoleAvailableForTask } from '../types/Enum/TaskResponseType';\n\nconst getIdRoleUsedForTask = (listRoles: number[]): number => {\n let idRole = 0;\n if (listRoles.includes(Role.COMMERCIAL)) {\n idRole = Role.COMMERCIAL;\n } else if (listRoles.includes(Role.JURIDIC)) {\n idRole = Role.JURIDIC;\n } else if (listRoles.includes(Role.SOCIAL)) {\n idRole = Role.SOCIAL;\n } else if (listRoles.includes(Role.FACTURATION)) {\n idRole = Role.FACTURATION;\n } else if (listRoles.includes(Role.CUSTOMER_SUCCESS)) {\n idRole = Role.CUSTOMER_SUCCESS;\n } else if (listRoles.includes(Role.ON_BOARDER)) {\n idRole = Role.ON_BOARDER;\n } else if (listRoles.includes(Role.TERMINATION)) {\n idRole = Role.TERMINATION;\n } else if (listRoles.includes(Role.LITIGE)) {\n idRole = Role.LITIGE;\n } else if (listRoles.includes(Role.FRONT_OFFICE)) {\n idRole = Role.FRONT_OFFICE;\n } else if (listRoles.includes(Role.DATA_OFFICER)) {\n idRole = Role.DATA_OFFICER;\n }\n return idRole;\n};\n\n// const getIdRoleUsedForManagerTask = (listRoles: number[]): number => {\n// let idRole = 0;\n// if (listRoles.includes(Role.COMMERCIAL)) {\n// idRole = Role.MANAGER;\n// } else if (listRoles.includes(Role.JURIDIC) || listRoles.includes(Role.SOCIAL) || listRoles.includes(Role.FACTURATION)) {\n// idRole = Role.MANAGER;\n// } else if (listRoles.includes(Role.CUSTOMER_SUCCESS)) {\n// idRole = Role.MANAGER;\n// } else if (listRoles.includes(Role.FRONT_OFFICE)) {\n// idRole = Role.MANAGER;\n// }\n// return idRole;\n// };\n\nconst getIdRoleUsedForAttribution = (isIntern: boolean, idTaskType: number): number | undefined => {\n const taskTypeList = isIntern === true ? TaskResponseType.INTERN.types : TaskResponseType.EXTERN.types;\n return taskTypeList.find((taskType) => taskType.id === idTaskType)?.role;\n};\n\nconst getIdRoleUsedForGetTaskOfUser = (idRole: number): boolean => !!Object.values(RoleAvailableForTask).find((role) => role === idRole);\n\nexport {\n getIdRoleUsedForTask, getIdRoleUsedForAttribution, getIdRoleUsedForGetTaskOfUser,\n};"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webmail.d.ts","sourceRoot":"","sources":["../../../ts/utils/webmail.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,qBAAqB,cAAe,MAAM,EAAE,KAAG,
|
|
1
|
+
{"version":3,"file":"webmail.d.ts","sourceRoot":"","sources":["../../../ts/utils/webmail.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,qBAAqB,cAAe,MAAM,EAAE,KAAG,MA4BpD,CAAC;AAEF,OAAO,EACL,qBAAqB,GACtB,CAAC"}
|
|
@@ -13,6 +13,9 @@ const getIdRoleUsedForEmail = (listRoles) => {
|
|
|
13
13
|
else if (listRoles.includes(Role_1.Role.FRONT_OFFICE_EXPRESS)) {
|
|
14
14
|
idRole = Role_1.Role.FRONT_OFFICE_EXPRESS;
|
|
15
15
|
}
|
|
16
|
+
else if (listRoles.includes(Role_1.Role.DATA_OFFICER)) {
|
|
17
|
+
idRole = Role_1.Role.DATA_OFFICER;
|
|
18
|
+
}
|
|
16
19
|
else if (listRoles.includes(Role_1.Role.COMMERCIAL)) {
|
|
17
20
|
idRole = Role_1.Role.COMMERCIAL;
|
|
18
21
|
}
|
|
@@ -28,6 +31,15 @@ const getIdRoleUsedForEmail = (listRoles) => {
|
|
|
28
31
|
else if (listRoles.includes(Role_1.Role.SOCIAL)) {
|
|
29
32
|
idRole = Role_1.Role.SOCIAL;
|
|
30
33
|
}
|
|
34
|
+
else if (listRoles.includes(Role_1.Role.ON_BOARDER)) {
|
|
35
|
+
idRole = Role_1.Role.ON_BOARDER;
|
|
36
|
+
}
|
|
37
|
+
else if (listRoles.includes(Role_1.Role.TERMINATION)) {
|
|
38
|
+
idRole = Role_1.Role.TERMINATION;
|
|
39
|
+
}
|
|
40
|
+
else if (listRoles.includes(Role_1.Role.LITIGE)) {
|
|
41
|
+
idRole = Role_1.Role.LITIGE;
|
|
42
|
+
}
|
|
31
43
|
return idRole;
|
|
32
44
|
};
|
|
33
45
|
exports.getIdRoleUsedForEmail = getIdRoleUsedForEmail;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webmail.js","sourceRoot":"","sources":["../../../ts/utils/webmail.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAE1C,MAAM,qBAAqB,GAAG,CAAC,SAAmB,EAAU,EAAE;IAC5D,IAAI,MAAM,GAAG,WAAI,CAAC,gBAAgB,CAAC;IACnC,IAAI,SAAS,CAAC,QAAQ,CAAC,WAAI,CAAC,WAAW,CAAC,EAAE;QACxC,MAAM,GAAG,WAAI,CAAC,WAAW,CAAC;KAC3B;SAAM,IAAI,SAAS,CAAC,QAAQ,CAAC,WAAI,CAAC,YAAY,CAAC,EAAE;QAChD,MAAM,GAAG,WAAI,CAAC,YAAY,CAAC;KAC5B;SAAM,IAAI,SAAS,CAAC,QAAQ,CAAC,WAAI,CAAC,oBAAoB,CAAC,EAAE;QACxD,MAAM,GAAG,WAAI,CAAC,oBAAoB,CAAC;KACpC;SAAM,IAAI,SAAS,CAAC,QAAQ,CAAC,WAAI,CAAC,UAAU,CAAC,EAAE;QAC9C,MAAM,GAAG,WAAI,CAAC,UAAU,CAAC;KAC1B;SAAM,IAAI,SAAS,CAAC,QAAQ,CAAC,WAAI,CAAC,iBAAiB,CAAC,EAAE;QACrD,MAAM,GAAG,WAAI,CAAC,iBAAiB,CAAC;KACjC;SAAM,IAAI,SAAS,CAAC,QAAQ,CAAC,WAAI,CAAC,iBAAiB,CAAC,EAAE;QACrD,MAAM,GAAG,WAAI,CAAC,iBAAiB,CAAC;KACjC;SAAM,IAAI,SAAS,CAAC,QAAQ,CAAC,WAAI,CAAC,OAAO,CAAC,EAAE;QAC3C,MAAM,GAAG,WAAI,CAAC,OAAO,CAAC;KACvB;SAAM,IAAI,SAAS,CAAC,QAAQ,CAAC,WAAI,CAAC,MAAM,CAAC,EAAE;QAC1C,MAAM,GAAG,WAAI,CAAC,MAAM,CAAC;KACtB;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAGA,sDAAqB","sourcesContent":["import { Role } from '../types/Enum/Role';\n\nconst getIdRoleUsedForEmail = (listRoles: number[]): number => {\n let idRole = Role.CUSTOMER_SUCCESS;\n if (listRoles.includes(Role.FACTURATION)) {\n idRole = Role.FACTURATION;\n } else if (listRoles.includes(Role.FRONT_OFFICE)) {\n idRole = Role.FRONT_OFFICE;\n } else if (listRoles.includes(Role.FRONT_OFFICE_EXPRESS)) {\n idRole = Role.FRONT_OFFICE_EXPRESS;\n } else if (listRoles.includes(Role.COMMERCIAL)) {\n idRole = Role.COMMERCIAL;\n } else if (listRoles.includes(Role.EXPERT_ACCOUNTANT)) {\n idRole = Role.EXPERT_ACCOUNTANT;\n } else if (listRoles.includes(Role.JURIDICAL_SUPPORT)) {\n idRole = Role.JURIDICAL_SUPPORT;\n } else if (listRoles.includes(Role.JURIDIC)) {\n idRole = Role.JURIDIC;\n } else if (listRoles.includes(Role.SOCIAL)) {\n idRole = Role.SOCIAL;\n }\n return idRole;\n};\n\nexport {\n getIdRoleUsedForEmail,\n};"]}
|
|
1
|
+
{"version":3,"file":"webmail.js","sourceRoot":"","sources":["../../../ts/utils/webmail.ts"],"names":[],"mappings":";;;AAAA,6C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C,EAAE;QAC9C,MAAM,GAAG,WAAI,CAAC,UAAU,CAAC;KAC1B;SAAM,IAAI,SAAS,CAAC,QAAQ,CAAC,WAAI,CAAC,WAAW,CAAC,EAAE;QAC/C,MAAM,GAAG,WAAI,CAAC,WAAW,CAAC;KAC3B;SAAM,IAAI,SAAS,CAAC,QAAQ,CAAC,WAAI,CAAC,MAAM,CAAC,EAAE;QAC1C,MAAM,GAAG,WAAI,CAAC,MAAM,CAAC;KACtB;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAGA,sDAAqB","sourcesContent":["import { Role } from '../types/Enum/Role';\n\nconst getIdRoleUsedForEmail = (listRoles: number[]): number => {\n let idRole = Role.CUSTOMER_SUCCESS;\n if (listRoles.includes(Role.FACTURATION)) {\n idRole = Role.FACTURATION;\n } else if (listRoles.includes(Role.FRONT_OFFICE)) {\n idRole = Role.FRONT_OFFICE;\n } else if (listRoles.includes(Role.FRONT_OFFICE_EXPRESS)) {\n idRole = Role.FRONT_OFFICE_EXPRESS;\n } else if (listRoles.includes(Role.DATA_OFFICER)) {\n idRole = Role.DATA_OFFICER;\n } else if (listRoles.includes(Role.COMMERCIAL)) {\n idRole = Role.COMMERCIAL;\n } else if (listRoles.includes(Role.EXPERT_ACCOUNTANT)) {\n idRole = Role.EXPERT_ACCOUNTANT;\n } else if (listRoles.includes(Role.JURIDICAL_SUPPORT)) {\n idRole = Role.JURIDICAL_SUPPORT;\n } else if (listRoles.includes(Role.JURIDIC)) {\n idRole = Role.JURIDIC;\n } else if (listRoles.includes(Role.SOCIAL)) {\n idRole = Role.SOCIAL;\n } else if (listRoles.includes(Role.ON_BOARDER)) {\n idRole = Role.ON_BOARDER;\n } else if (listRoles.includes(Role.TERMINATION)) {\n idRole = Role.TERMINATION;\n } else if (listRoles.includes(Role.LITIGE)) {\n idRole = Role.LITIGE;\n }\n return idRole;\n};\n\nexport {\n getIdRoleUsedForEmail,\n};"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Resource } from '../Resource';
|
|
2
2
|
import { IComment } from '../../types';
|
|
3
3
|
export declare class Comment extends Resource {
|
|
4
|
-
getAll(params: IComment): Promise<Comment[]>;
|
|
4
|
+
getAll(params: Partial<IComment>): Promise<Comment[]>;
|
|
5
5
|
create(payload: IComment): Promise<Comment>;
|
|
6
6
|
}
|
|
7
7
|
//# sourceMappingURL=Comment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Comment.d.ts","sourceRoot":"","sources":["../../../../ts/api/resources/Comment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EACL,QAAQ,EACT,MAAM,aAAa,CAAC;AAErB,qBAAa,OAAQ,SAAQ,QAAQ;IACnC,MAAM,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"Comment.d.ts","sourceRoot":"","sources":["../../../../ts/api/resources/Comment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EACL,QAAQ,EACT,MAAM,aAAa,CAAC;AAErB,qBAAa,OAAQ,SAAQ,QAAQ;IACnC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAIrD,MAAM,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,CAAC,OAAO,CAAC;CAG5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Comment.js","sourceRoot":"","sources":["../../../../ts/api/resources/Comment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAKvC,MAAM,OAAO,OAAQ,SAAQ,QAAQ;IACnC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"Comment.js","sourceRoot":"","sources":["../../../../ts/api/resources/Comment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAKvC,MAAM,OAAO,OAAQ,SAAQ,QAAQ;IACnC,MAAM,CAAC,MAAyB;QAC9B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,CAAC,OAAiB;QACtB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;IAChD,CAAC;CACF","sourcesContent":["import { Resource } from '../Resource';\nimport {\n IComment,\n} from '../../types';\n\nexport class Comment extends Resource {\n getAll(params: Partial<IComment>): Promise<Comment[]> {\n return this.axios.$get('/comments', { params });\n }\n \n create(payload: IComment): Promise<Comment> {\n return this.axios.$post('/comments', payload);\n }\n}\n"]}
|
|
@@ -36,7 +36,7 @@ export declare const BalanceSheetDetails: readonly [{
|
|
|
36
36
|
readonly text: "À faire";
|
|
37
37
|
readonly color: "grey";
|
|
38
38
|
readonly textColor: "grey--text";
|
|
39
|
-
readonly forRoles: readonly [readonly ["front_office"], readonly ["expert"], readonly ["customer_success"], readonly ["facturation"]];
|
|
39
|
+
readonly forRoles: readonly [readonly ["front_office"], readonly ["expert"], readonly ["customer_success"], readonly ["on_boarder"], readonly ["termination"], readonly ["litige"], readonly ["facturation"]];
|
|
40
40
|
}, {
|
|
41
41
|
readonly text: "En cours de prod.";
|
|
42
42
|
readonly value: BalanceSheetState.IN_PRODUCING;
|
|
@@ -124,14 +124,14 @@ export declare const BalanceSheetDetails: readonly [{
|
|
|
124
124
|
readonly text: "N/A";
|
|
125
125
|
readonly color: "grey";
|
|
126
126
|
readonly textColor: "grey--text";
|
|
127
|
-
readonly forRoles: readonly [readonly ["customer_success", "manager"], readonly ["facturation", "manager"]];
|
|
127
|
+
readonly forRoles: readonly [readonly ["customer_success", "manager"], readonly ["on_boarder", "manager"], readonly ["termination", "manager"], readonly ["litige", "manager"], readonly ["facturation", "manager"]];
|
|
128
128
|
}, {
|
|
129
129
|
readonly text: "Impayé";
|
|
130
130
|
readonly value: BalanceSheetState.UNPAID;
|
|
131
131
|
readonly color: "error darken-2";
|
|
132
132
|
readonly textColor: "error--text text--darken-2";
|
|
133
133
|
readonly key: "unpaid";
|
|
134
|
-
readonly forRoles: readonly [readonly ["front_office", "manager"], readonly ["front_office_express", "manager"], readonly ["customer_success"], readonly ["facturation"]];
|
|
134
|
+
readonly forRoles: readonly [readonly ["front_office", "manager"], readonly ["front_office_express", "manager"], readonly ["customer_success"], readonly ["on_boarder"], readonly ["termination"], readonly ["litige"], readonly ["facturation"]];
|
|
135
135
|
}, {
|
|
136
136
|
readonly text: "Facturation en cours";
|
|
137
137
|
readonly value: BalanceSheetState.INVOICING_IN_PROGRESS;
|
|
@@ -38,7 +38,7 @@ export const BalanceSheetDetails = [
|
|
|
38
38
|
text: 'À faire',
|
|
39
39
|
color: 'grey',
|
|
40
40
|
textColor: 'grey--text',
|
|
41
|
-
forRoles: [['front_office'], ['expert'], ['customer_success'], ['facturation']],
|
|
41
|
+
forRoles: [['front_office'], ['expert'], ['customer_success'], ['on_boarder'], ['termination'], ['litige'], ['facturation']],
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
text: 'En cours de prod.',
|
|
@@ -140,7 +140,7 @@ export const BalanceSheetDetails = [
|
|
|
140
140
|
text: 'N/A',
|
|
141
141
|
color: 'grey',
|
|
142
142
|
textColor: 'grey--text',
|
|
143
|
-
forRoles: [['customer_success', 'manager'], ['facturation', 'manager']],
|
|
143
|
+
forRoles: [['customer_success', 'manager'], ['on_boarder', 'manager'], ['termination', 'manager'], ['litige', 'manager'], ['facturation', 'manager']],
|
|
144
144
|
},
|
|
145
145
|
{
|
|
146
146
|
text: 'Impayé',
|
|
@@ -148,7 +148,7 @@ export const BalanceSheetDetails = [
|
|
|
148
148
|
color: 'error darken-2',
|
|
149
149
|
textColor: 'error--text text--darken-2',
|
|
150
150
|
key: 'unpaid',
|
|
151
|
-
forRoles: [['front_office', 'manager'], ['front_office_express', 'manager'], ['customer_success'], ['facturation']],
|
|
151
|
+
forRoles: [['front_office', 'manager'], ['front_office_express', 'manager'], ['customer_success'], ['on_boarder'], ['termination'], ['litige'], ['facturation']],
|
|
152
152
|
},
|
|
153
153
|
{
|
|
154
154
|
text: 'Facturation en cours',
|