@silexpert/core 2.0.128 → 2.0.130
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/client/index.mjs +6 -6
- package/dist/client/index.mjs.map +1 -1
- package/dist/client/product-DA6Aqe5j.mjs +2 -0
- package/dist/client/product-DA6Aqe5j.mjs.map +1 -0
- package/dist/client/server/index.mjs +1 -1
- package/dist/{index-AienIj4S.d.mts → index-BG-X8p8J.d.mts} +175 -27
- package/dist/index-BG-X8p8J.d.mts.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +6 -6
- package/dist/index.mjs.map +1 -1
- package/dist/product-BzQSAe6u.mjs +2 -0
- package/dist/product-BzQSAe6u.mjs.map +1 -0
- package/dist/server/index.d.mts +1 -1
- package/dist/server/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/client/product-BjsJSO1B.mjs +0 -2
- package/dist/client/product-BjsJSO1B.mjs.map +0 -1
- package/dist/index-AienIj4S.d.mts.map +0 -1
- package/dist/product-D3ue7JQB.mjs +0 -2
- package/dist/product-D3ue7JQB.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{C as e,J as t,Q as n,R as r,U as i,_t as a,a as o,b as s,c,l,m as u,o as d,pt as f,r as p,u as m,w as h,yt as g}from"../product-
|
|
1
|
+
import{C as e,J as t,Q as n,R as r,U as i,_t as a,a as o,b as s,c,l,m as u,o as d,pt as f,r as p,u as m,w as h,yt as g}from"../product-DA6Aqe5j.mjs";import{groupBy as _,orderBy as v,round as y,sumBy as b,uniq as x}from"lodash-es";import S from"dayjs";import C from"ejs";import w from"sanitize-html";import"dayjs/locale/fr.js";function getRoleSignature(e){if(e.positionLabel)return e.positionLabel;let t=e.roles.map(e=>e.id).includes(44)||e.roles.map(e=>e.id).includes(45),n=e.roles.map(e=>e.id).includes(19),r=e.roles.map(e=>e.id).includes(11),i=e.roles.map(e=>e.id).includes(12),a=e.roles.map(e=>e.id).includes(34),o=e.roles.map(e=>e.id).includes(20),s=e.roles.map(e=>e.id).includes(10),c=e.roles.map(e=>e.id).includes(50),l=e.roles.map(e=>e.id).includes(41),d=e.roles.map(e=>e.id).includes(51),f=e.roles.map(e=>e.id).includes(9),p=e.roles.map(e=>e.id).includes(2),m=e.roles.map(e=>e.id).includes(55),h=!!u(e.roles.map(e=>e.id),[3,15]).length;return f&&n?`Responsable commercial`:f?`Chargé${e.idCivility===2?`e`:``} de clientèle`:s&&n?`Responsable relations clients`:s?`Conseill${e.idCivility===2?`ère`:`er`} comptable`:m?`Référent${e.idCivility===2?`e`:``} technique`:c&&n?`Responsable chargé${e.idCivility===2?`e`:``} accueil clients`:c?`Chargé${e.idCivility===2?`e`:``} accueil clients`:l&&n?`Responsable chargé${e.idCivility===2?`e`:``} de la satisfaction clients`:l?`Chargé${e.idCivility===2?`e`:``} de la satisfaction clients`:d&&n?`Responsable aide comptable`:d?`Aide comptable`:a&&t?`Assistant facturation`:a&&n?`Responsable facturation`:a?`Chargé${e.idCivility===2?`e`:``} de facturation`:i&&t?`Assistant juridique`:i&&n?`Responsable juridique`:i?`Juriste`:r&&t?`Assistant paie`:r&&n?`Responsable paie`:r?`Gestionnaire de paie`:o?`Expert${e.idCivility===2?`e`:``}-comptable`:p?`Développeur web`:h&&n?`Responsable comptable`:h&&t?`Assistant comptable`:`Comptable`}function getHoraires(e){return e?.roles?.map(e=>e.id).includes(9)?`Du lundi au vendredi de 9h à 18h`:`Du lundi au jeudi de 9h à 17h<br/>Le vendredi de 9h à 12h`}function getMailSignature(e,t){let n=g({...t?{idTypeBrand:t}:{},objectWaited:`listMails.informatique`}),r=g({...t?{idTypeBrand:t}:{},objectWaited:`listMails.bonjour`});return e.roles.map(e=>e.id).includes(2)?n:e&&u(e.roles.map(e=>e.id),[3,15,51,9,55]).length?e.email:r}function getPhoneSignature(e){return e.phone&&e.phone!==`0383931414`?e.phone.replace(/\B(?=(\d{2})+(?!\d))/g,` `):null}function generateSignature(e){let{fromAddress:t=null,idTypeBrand:n=1,calendlyUrl:r=null,...i}=e,{user:o,forceRole:s=null}=i,c=a({idTypeBrand:n}),l=c.urlS3,d=c.name,f=c.companyInformation?.city,p=c.companyInformation?.postalAddress||``,m=c.commercialName,h=c.bank?.IBAN,g=c.bank?.BIC,_=c.listMails?.bonjour||``,v=c.listMails?.social||``,y=c.listMails?.gestion||``,b=c.listMails?.satisfaction||``,x=c.listMails?.resiliation||``,S=c.listMails?.support||``,w=c.listMails?.juridique||``,T=c.listMails?.facturation||``,E=c.colors?.primary||``,D=c.listPhones?.contact||``,O=c.listPhones?.juridique||``,k=c.listPhones?.social||``,A=[{email:b,forceRole:`satisfaction`},{email:x,forceRole:`resiliation`},{email:T,forceRole:`facturation`}].find(e=>e.email===t);A&&(s=A.forceRole);let j,M,N,P;return[j,M,N,P]=[`Expert-Comptable`,_,null,`Du lundi au vendredi de 9h à 18h`],o?.roles&&o.roles.some(e=>e.id===51)?(o={firstname:`L'équipe ${m}`,isAll:!0},M=y,j=``):u((o?.roles??[]).map(e=>e.id),[3,54]).length===2?(o={firstname:`L'équipe ${m}`,isAll:!0},M=_,j=``):s===`satisfaction`?(o={firstname:`Service satisfaction clients`,isAll:!0},M=b,j=``,N=D):s===`resiliation`?(o={firstname:`Service satisfaction clients`,isAll:!0},M=x,j=``,N=D):s===`social`?(o={firstname:`Service social`,isAll:!0},M=v,j=``,N=k):s===`support`?(o={firstname:`Service Support`,isAll:!0},M=S,j=null):s===`juridique`?(o={firstname:`Service juridique`,isAll:!0},M=w,j=null,N=O):s===`facturation`?(o={firstname:`Service facturation`,isAll:!0},M=T,j=null,N=D):!o||s===`generique`?(o={firstname:`L'équipe ${m}`,isAll:!0},j=``):o!==0&&(j=getRoleSignature(o),M=getMailSignature(o,n),P=getHoraires(o),N=getPhoneSignature(o)),r&&(o.calendlyUrl=r),C.render(`<% if (commercialName === 'Clementine' && isFacturation) { %>
|
|
2
2
|
<p style="font-size: 15px; font-family: Arial; margin:0; padding:0px 0 4px; color:#6E6E71; margin-bottom: 10px; font-weight: bold;">
|
|
3
3
|
<span style="color: #A0A0A0">Nos coordonnées bancaires </span>IBAN : <%= iban %> - BIC : <%= bic %>
|
|
4
4
|
</p>
|