@silexpert/core 1.2.36 → 1.2.38
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/types/Enum/KilometricAllowanceScale.d.ts.map +1 -1
- package/dist/cjs/types/Enum/KilometricAllowanceScale.js +124 -5
- package/dist/cjs/types/Enum/KilometricAllowanceScale.js.map +1 -1
- package/dist/cjs/types/Enum/MailAuto.d.ts +2 -1
- package/dist/cjs/types/Enum/MailAuto.d.ts.map +1 -1
- package/dist/cjs/types/Enum/MailAuto.js +4 -15
- package/dist/cjs/types/Enum/MailAuto.js.map +1 -1
- package/dist/cjs/types/Enum/PrestationType.d.ts +2 -1
- package/dist/cjs/types/Enum/PrestationType.d.ts.map +1 -1
- package/dist/cjs/types/Enum/PrestationType.js +57 -26
- package/dist/cjs/types/Enum/PrestationType.js.map +1 -1
- package/dist/cjs/types/Interface/api/society/State.d.ts +1 -0
- package/dist/cjs/types/Interface/api/society/State.d.ts.map +1 -1
- package/dist/cjs/types/Interface/api/society/State.js.map +1 -1
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/cjs/types/index.d.ts.map +1 -1
- package/dist/cjs/types/index.js +1 -0
- package/dist/cjs/types/index.js.map +1 -1
- package/dist/cjs/utils/commercialManagement/internationalization/choices.js +2 -2
- package/dist/cjs/utils/commercialManagement/internationalization/choices.js.map +1 -1
- package/dist/cjs/utils/commercialManagement/templates/common.js +6 -6
- package/dist/cjs/utils/commercialManagement/templates/common.js.map +1 -1
- package/dist/cjs/utils/email.d.ts.map +1 -1
- package/dist/cjs/utils/email.js +1 -1
- package/dist/cjs/utils/email.js.map +1 -1
- package/dist/mjs/types/Enum/KilometricAllowanceScale.d.ts.map +1 -1
- package/dist/mjs/types/Enum/KilometricAllowanceScale.js +124 -5
- package/dist/mjs/types/Enum/KilometricAllowanceScale.js.map +1 -1
- package/dist/mjs/types/Enum/MailAuto.d.ts +2 -1
- package/dist/mjs/types/Enum/MailAuto.d.ts.map +1 -1
- package/dist/mjs/types/Enum/MailAuto.js +4 -15
- package/dist/mjs/types/Enum/MailAuto.js.map +1 -1
- package/dist/mjs/types/Enum/PrestationType.d.ts +2 -1
- package/dist/mjs/types/Enum/PrestationType.d.ts.map +1 -1
- package/dist/mjs/types/Enum/PrestationType.js +57 -26
- package/dist/mjs/types/Enum/PrestationType.js.map +1 -1
- package/dist/mjs/types/Interface/api/society/State.d.ts +1 -0
- package/dist/mjs/types/Interface/api/society/State.d.ts.map +1 -1
- package/dist/mjs/types/Interface/api/society/State.js.map +1 -1
- package/dist/mjs/types/index.d.ts +1 -0
- package/dist/mjs/types/index.d.ts.map +1 -1
- package/dist/mjs/types/index.js +1 -0
- package/dist/mjs/types/index.js.map +1 -1
- package/dist/mjs/utils/commercialManagement/internationalization/choices.js +2 -2
- package/dist/mjs/utils/commercialManagement/internationalization/choices.js.map +1 -1
- package/dist/mjs/utils/commercialManagement/templates/common.js +6 -6
- package/dist/mjs/utils/commercialManagement/templates/common.js.map +1 -1
- package/dist/mjs/utils/email.d.ts.map +1 -1
- package/dist/mjs/utils/email.js +1 -1
- package/dist/mjs/utils/email.js.map +1 -1
- package/package.json +1 -1
- package/ts/types/Enum/KilometricAllowanceScale.ts +130 -12
- package/ts/types/Enum/MailAuto.ts +4 -15
- package/ts/types/Enum/PrestationType.ts +60 -29
- package/ts/types/Interface/api/society/State.ts +3 -2
- package/ts/types/index.ts +3 -4
- package/ts/utils/commercialManagement/internationalization/choices.ts +2 -2
- package/ts/utils/commercialManagement/templates/common.ts +6 -6
- package/ts/utils/email.ts +10 -10
|
@@ -143,7 +143,7 @@ export const internationalizationChoices: InternationalizationChoicesType = {
|
|
|
143
143
|
},
|
|
144
144
|
deposit: {
|
|
145
145
|
headers: {
|
|
146
|
-
title: '
|
|
146
|
+
title: 'Facture d\'acompte',
|
|
147
147
|
expirationDate: 'Date d\'expiration',
|
|
148
148
|
termsOfPayment: 'Date limite de règlement',
|
|
149
149
|
},
|
|
@@ -157,7 +157,7 @@ export const internationalizationChoices: InternationalizationChoicesType = {
|
|
|
157
157
|
},
|
|
158
158
|
remainder: {
|
|
159
159
|
headers: {
|
|
160
|
-
title: '
|
|
160
|
+
title: 'Facture de solde',
|
|
161
161
|
dueDate: 'Date d\'échéance',
|
|
162
162
|
termsOfPayment: 'Date limite de règlement',
|
|
163
163
|
},
|
|
@@ -271,15 +271,15 @@ export class CommercialDocumentCommonHTML {
|
|
|
271
271
|
<% } %>
|
|
272
272
|
|
|
273
273
|
<% if (settings && !settings.areColumnsSeparationHidden) { %>
|
|
274
|
-
.pdf-content td { border-left: <%= settings && settings.columnSeparationThickness ? settings.columnSeparationThickness + 'px' : '2px' %> <%= settings && settings.
|
|
274
|
+
.pdf-content td { border-left: <%= settings && settings.columnSeparationThickness ? settings.columnSeparationThickness + 'px' : '2px' %> <%= settings && settings.columnSeparationType ? settings.columnSeparationType : 'solid' %> <%= settings && settings.columnSeparationColor ? settings.columnSeparationColor : '#EAEAEA' %> !important; border-right: <%= settings && settings.columnSeparationThickness ? settings.columnSeparationThickness + 'px' : '2px' %> <%= settings && settings.columnSeparationType ? settings.columnSeparationType : 'solid' %> <%= settings && settings.columnSeparationColor ? settings.columnSeparationColor : '#EAEAEA' %> !important; }
|
|
275
275
|
<% } %>
|
|
276
276
|
|
|
277
277
|
<% if (settings && !settings.areExternalBordersHidden) { %>
|
|
278
|
-
.pdf-content table.commercial-table-preview { border: <%= settings && settings.
|
|
279
|
-
.pdf-content table.commercial-table-preview tr:last-child td { border-bottom: <%= settings && settings.
|
|
280
|
-
.pdf-content table.commercial-table-preview thead td { border-top: <%= settings && settings.
|
|
281
|
-
.pdf-content table.commercial-table-preview td:first-child { border-left: <%= settings && settings.
|
|
282
|
-
.pdf-content table.commercial-table-preview td:last-child { border-right: <%= settings && settings.
|
|
278
|
+
.pdf-content table.commercial-table-preview { border: <%= settings && settings.externalBorderThickness ? settings.externalBorderThickness + 'px' : '2px' %> <%= settings && settings.externalBorderType ? settings.externalBorderType : 'solid' %> <%= settings && settings.externalBorderColor ? settings.externalBorderColor : '#EAEAEA' %> !important; }
|
|
279
|
+
.pdf-content table.commercial-table-preview tr:last-child td { border-bottom: <%= settings && settings.externalBorderThickness ? settings.externalBorderThickness + 'px' : '2px' %> <%= settings && settings.externalBorderType ? settings.externalBorderType : 'solid' %> <%= settings && settings.externalBorderColor ? settings.externalBorderColor : '#EAEAEA' %> !important; }
|
|
280
|
+
.pdf-content table.commercial-table-preview thead td { border-top: <%= settings && settings.externalBorderThickness ? settings.externalBorderThickness + 'px' : '2px' %> <%= settings && settings.externalBorderType ? settings.externalBorderType : 'solid' %> <%= settings && settings.externalBorderColor ? settings.externalBorderColor : '#EAEAEA' %> !important; }
|
|
281
|
+
.pdf-content table.commercial-table-preview td:first-child { border-left: <%= settings && settings.externalBorderThickness ? settings.externalBorderThickness + 'px' : '2px' %> <%= settings && settings.externalBorderType ? settings.externalBorderType : 'solid' %> <%= settings && settings.externalBorderColor ? settings.externalBorderColor : '#EAEAEA' %> !important; }
|
|
282
|
+
.pdf-content table.commercial-table-preview td:last-child { border-right: <%= settings && settings.externalBorderThickness ? settings.externalBorderThickness + 'px' : '2px' %> <%= settings && settings.externalBorderType ? settings.externalBorderType : 'solid' %> <%= settings && settings.externalBorderColor ? settings.externalBorderColor : '#EAEAEA' %> !important; }
|
|
283
283
|
<% } %>
|
|
284
284
|
|
|
285
285
|
<% if (settings && settings.areLinesSeparationHidden) { %>
|
package/ts/utils/email.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { intersection } from './noLodash';
|
|
|
11
11
|
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
12
12
|
const ejs = require('ejs');
|
|
13
13
|
|
|
14
|
-
function getRoleSignature(user:any) {
|
|
14
|
+
function getRoleSignature(user: any) {
|
|
15
15
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
16
16
|
if (user.positionLabel) return user.positionLabel;
|
|
17
17
|
|
|
@@ -19,7 +19,7 @@ function getRoleSignature(user:any) {
|
|
|
19
19
|
const isStagiaireOrAlternant = user.roles.map((r: any) => r.id).includes(Role.INTERN) || user.roles.map((r: any) => r.id).includes(Role.ALTERNATE);
|
|
20
20
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
21
21
|
const isManager = user.roles.map((r: any) => r.id).includes(Role.MANAGER);
|
|
22
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
22
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
23
23
|
const isSocial = user.roles.map((r: any) => r.id).includes(Role.SOCIAL);
|
|
24
24
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
25
25
|
const isJuridic = user.roles.map((r: any) => r.id).includes(Role.JURIDIC);
|
|
@@ -88,12 +88,12 @@ function getRoleSignature(user:any) {
|
|
|
88
88
|
return `Comptable dédié${user.idCivility === 2 ? 'e' : ''}`;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
export function getHoraires(user:IUser) { // On affiche les horaires uniquement pour les front, et pas pour les TVA
|
|
91
|
+
export function getHoraires(user: IUser) { // On affiche les horaires uniquement pour les front, et pas pour les TVA
|
|
92
92
|
|
|
93
93
|
if (isItThisEnv('Pourcentage') && user?.entity && [EntityType.COMPTALIB, EntityType.AMEX, EntityType.CABINET_RONCHIERI_LANDRA].includes(user.entity)) {
|
|
94
94
|
return 'Du lundi au vendredi de 9h à 18h';
|
|
95
95
|
}
|
|
96
|
-
|
|
96
|
+
|
|
97
97
|
return 'Du lundi au vendredi de 9h à 19h';
|
|
98
98
|
|
|
99
99
|
// 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';
|
|
@@ -134,7 +134,7 @@ export function getHoraires(user:IUser) { // On affiche les horaires uniquement
|
|
|
134
134
|
// return resultHoraire;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
function getMailSignature(user:any, idTypeBrand:number) {
|
|
137
|
+
function getMailSignature(user: any, idTypeBrand: number) {
|
|
138
138
|
const informatiqueMail = getBrandConfig({
|
|
139
139
|
...(idTypeBrand ? { idTypeBrand } : {}),
|
|
140
140
|
objectWaited: 'listMails.informatique',
|
|
@@ -151,7 +151,7 @@ function getMailSignature(user:any, idTypeBrand:number) {
|
|
|
151
151
|
return bonjourMail;
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
function getPhoneSignature(user:any) {
|
|
154
|
+
function getPhoneSignature(user: any) {
|
|
155
155
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
156
156
|
if (user.phone !== '0383931414') { return user.phone.replace(/\B(?=(\d{2})+(?!\d))/g, ' '); }
|
|
157
157
|
return null;
|
|
@@ -164,7 +164,7 @@ export function generateSignature(params: any): string {
|
|
|
164
164
|
let {
|
|
165
165
|
user,
|
|
166
166
|
} = otherParams;
|
|
167
|
-
|
|
167
|
+
|
|
168
168
|
const hostS3 = getBrandConfig({
|
|
169
169
|
idTypeBrand,
|
|
170
170
|
objectWaited: 'urlS3',
|
|
@@ -240,7 +240,7 @@ export function generateSignature(params: any): string {
|
|
|
240
240
|
let phoneSignature: string | null;
|
|
241
241
|
let horaires: string | null;
|
|
242
242
|
[roleSignature, mailSignature, phoneSignature, horaires] = ['Expert-Comptable', bonjourMail, null, 'Du lundi au vendredi de 9h à 19h'];
|
|
243
|
-
|
|
243
|
+
|
|
244
244
|
if (user?.roles && user.roles.some((r: any) => r.id === Role.DATA_OFFICER)) { // Signature data_officer
|
|
245
245
|
user = {
|
|
246
246
|
firstname: `L'équipe ${commercialName}`,
|
|
@@ -302,11 +302,11 @@ export function generateSignature(params: any): string {
|
|
|
302
302
|
|
|
303
303
|
// Si on a une société, alors on remplace le lien calendly de base par le lien calendly interne
|
|
304
304
|
// on n'affiche uniquement si le collaboreatur a bien des créneaux horaires
|
|
305
|
-
if (society?.id && user?.roles?.some((r: any) => [Role.FRONT_OFFICE, Role.FACTURATION, Role.JURIDIC, Role.COMMERCIAL
|
|
305
|
+
if (society?.id && user?.roles?.some((r: any) => [Role.FRONT_OFFICE, Role.FACTURATION, Role.JURIDIC, Role.COMMERCIAL].includes(r.id)) && user?.usersTimeSlots?.length) {
|
|
306
306
|
const isJuridic = user?.roles?.some((r: any) => [Role.JURIDIC].includes(r.id));
|
|
307
307
|
const isFactu = user?.roles?.some((r: any) => [Role.FACTURATION].includes(r.id));
|
|
308
308
|
const isCommercial = user?.roles?.some((r: any) => [Role.COMMERCIAL].includes(r.id));
|
|
309
|
-
let idType = TimeSlot.
|
|
309
|
+
let idType = TimeSlot.BILAN;
|
|
310
310
|
if (isJuridic) idType = TimeSlot.EDIT_SOCIETY;
|
|
311
311
|
if (isFactu) idType = TimeSlot.BILLING;
|
|
312
312
|
if (isCommercial) idType = TimeSlot.SALES;
|