1import{a as Nt}from"./chunk-QXV73B2H.js";import{a as Rt}from"./chunk-MFQU3Z56.js";import{a as Ht}from"./chunk-2N7KYBBA.js";import"./chunk-LGMI7DGT.js";import{a as We}from"./chunk-S7B3FCYO.js";import{a as Ie}from"./chunk-VZIYYSGS.js";import"./chunk-FMRURRVX.js";import{a as ae}from"./chunk-WS2OPWCN.js";import{a as qe}from"./chunk-ICW2FQGF.js";import"./chunk-OZNF7FET.js";import{a as Vt}from"./chunk-NY7RH5FN.js";import{a as me}from"./chunk-7JJDWH2J.js";import{a as it}from"./chunk-YKNMHQER.js";import{a as Bt}from"./chunk-U32DGW75.js";import"./chunk-ZNDGZGEM.js";import{a as Ke}from"./chunk-NP3UNJFE.js";import{a as jt}from"./chunk-O5VZ5OTX.js";import{a as $t}from"./chunk-QGUIEUNP.js";import{a as $,b as j}from"./chunk-NE2ZO65S.js";import{$ as te,Aa as pe,Jb as I,L as It,Lb as ke,M as wt,Mb as ze,N as z,Oa as Pt,P as oe,Pb as V,Rb as N,S as K,Sb as Me,T as Z,Ta as _e,V as Tt,X as de,Y as De,Z as ee,ca as ie,d as B,e as O,g as F,ka as ne,la as q,ma as re,na as Ot,oa as Lt,pa as Ft,qa as At,za as Ee}from"./chunk-RCBA66QG.js";import{$a as w,$b as xe,$c as Ue,Cb as k,Dc as kt,Eb as v,Fa as Le,Gb as g,H as ct,Hb as ft,I as le,Ib as bt,Ka as ge,Kb as vt,Kc as Ce,La as pt,Lb as xt,Lc as Y,Mb as St,Na as mt,Oa as r,Qa as A,Rb as Ct,Sb as ue,Sc as J,Ta as ht,Tc as Re,Ub as c,Uc as He,Vb as m,Wa as tt,Wb as x,Wd as Ge,Xa as _,Xb as yt,Xc as X,Y as ce,Yc as Mt,Za as gt,Zd as ye,_b as ve,ab as $e,ac as Se,bb as fe,cb as ut,cc as T,db as _t,dc as Ve,eb as L,ga as Pe,gc as Dt,hc as W,ic as P,jc as Ne,ka as dt,kb as be,kc as Et,la as H,ma as Be,mb as f,mc as d,nb as b,nc as p,oa as Q,oc as Fe,pb as je,qb as U,rb as G,sa as C,sb as u,ta as y,tb as o,ub as l,vb as D,w as E}from"./chunk-MECLTUZI.js";var Ut=(()=>{let a=class a{constructor(e){this.http=e,this.httpLoading$=new E(!1),this.filter$=new E({}),this.data$=new E([]),this.actions=new E(!1),this.errorMessage$=new E(null),this.actions.subscribe(n=>{n&&this.getListe()})}isLoadingObs(){return this.httpLoading$.asObservable()}isErrorMessageObs(){return this.errorMessage$.asObservable()}getListe(){this.data$.next([]),this.httpLoading$.next(!0),le([this.filter$]).pipe(ce(1)).subscribe(([e])=>{this.http.post(`${F.settings.apiUrl}/v1/SynchronisationDgt/Maj`,{codesDpd:e.codesDpd}).subscribe(n=>{this.httpLoading$.next(!1);let s=n.results;this.data$.next(s)},n=>{this.httpLoading$.next(!1),this.errorMessage$.next(n)})})}};a.\u0275fac=function(n){return new(n||a)(Q(Y))},a.\u0275prov=H({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();var li=["progressBar"];function ci(i,a){i&1&&(o(0,"p",8),c(1),d(2,"translate"),l()),i&2&&(r(),m(p(2,1,"synchronisation_dgt_maj.message_attente")))}function di(i,a){i&1&&(o(0,"p",9),c(1),d(2,"translate"),l()),i&2&&(r(),m(p(2,1,"synchronisation_dgt_maj.resulat_maj")))}function pi(i,a){i&1&&(o(0,"p",10),c(1),d(2,"translate"),l()),i&2&&(r(),x(" ",p(2,1,"synchronisation_dgt_maj.message_attente_rappel")," "))}function mi(i,a){if(i&1&&(o(0,"alert",11),c(1),d(2,"translate"),l()),i&2){let t=g();r(),x(" ",p(2,1,t.erreurMessage)," ")}}function hi(i,a){if(i&1&&(o(0,"span",16),c(1),d(2,"translate"),l()),i&2){let t=g().$implicit;r(),m(p(2,1,"backendErrors."+t.messageRetour))}}function gi(i,a){if(i&1&&(o(0,"tr")(1,"td",15),c(2),l(),o(3,"td",15),c(4),d(5,"translate"),l(),o(6,"td",15),c(7),l(),o(8,"td",15),c(9),l(),o(10,"td"),f(11,hi,3,3,"span",16),l()()),i&2){let t=a.$implicit;r(2),m(t.codeDpd),r(2),m(p(5,5,"synchronisation_dgt_maj."+t.action)),r(3),m(t.nombreSalariesCrees),r(2),m(t.nombreSalariesMaj),r(2),b(t.messageRetour?11:-1)}}function ui(i,a){if(i&1&&(o(0,"table",12)(1,"thead")(2,"tr")(3,"th",15),c(4),d(5,"translate"),l(),o(6,"th",15),c(7),d(8,"translate"),l(),o(9,"th",15),c(10),d(11,"translate"),l(),o(12,"th",15),c(13),d(14,"translate"),l(),o(15,"th"),c(16),d(17,"translate"),l()()(),o(18,"tbody"),U(19,gi,12,7,"tr",null,je),d(21,"async"),l()()),i&2){let t=g();r(4),m(p(5,5,"synchronisation_dgt_maj.entete_reference_dpd")),r(3),m(p(8,7,"synchronisation_dgt_maj.entete_action")),r(3),m(p(11,9,"synchronisation_dgt_maj.entete_nombre_salaries_crees")),r(3),m(p(14,11,"synchronisation_dgt_maj.entete_nombre_salaries_maj")),r(3),m(p(17,13,"synchronisation_dgt_maj.entete_message_information")),r(3),G(p(21,15,t.synchronisationDgtMajService.data$))}}var Ye=(()=>{let a=class a{constructor(e,n,s){this.bsModalRef=e,this.translate=n,this.synchronisationDgtMajService=s,this.erreurMessage=null,this.isLoading=!1,this.isMessageAttente=!1}ngOnDestroy(){this._isLoadingSubscription&&this._isLoadingSubscription.unsubscribe(),this._errorMessageSubscription&&this._errorMessageSubscription.unsubscribe()}ngOnInit(){this._isLoadingSubscription=this.synchronisationDgtMajService.isLoadingObs().subscribe(e=>{this.isLoading=e,this.progressBar&&(this.progressBar.mode=e?"indeterminate":"determinate",this.bsModalRef.setClass(this.isLoading?"modal-lg":"modal-xl"))},e=>{this.erreurMessage=e}),this._errorMessageSubscription=this.synchronisationDgtMajService.isErrorMessageObs().subscribe(e=>this.erreurMessage=e),this.erreurMessage=null,this.synchronisationDgtMajService.filter$.next({codesDpd:this.codesDpd}),this.synchronisationDgtMajService.getListe()}onClose(){this.isLoading?this.isMessageAttente=!0:this.bsModalRef.hide()}};a.\u0275fac=function(n){return new(n||a)(_(Ee),_(B),_(Ut))},a.\u0275cmp=w({type:a,selectors:[["synchronisation-dgt-maj"]],viewQuery:function(n,s){if(n&1&&vt(li,7),n&2){let h;
1xt(h=St())&&(s.progressBar=h.first)}},decls:22,vars:10,consts:[["progressBar",""],[1,"modal-header"],["data-cat","synchronisation-dgt-maj.synchronisation-dgt-maj-modal-titre.h4",1,"modal-title","pull-left"],["type","button","aria-label","Close","data-cat","synchronisation-dgt-maj.synchronisation-dgt-maj-message-attente.button",1,"close","pull-right",3,"click"],["aria-hidden","true","data-cat","synchronisation-dgt-maj.synchronisation-dgt-maj-message-attente.span"],[1,"modal-body"],[1,"search-form-hold"],["appearance","outlined"],["data-cat","synchronisation-dgt-maj.synchronisation-dgt-maj-message-attente.p"],["data-cat","synchronisation-dgt-maj.synchronisation-dgt-maj-resulat-maj.p"],["role","alert","data-cat","synchronisation-dgt-maj.synchronisation-dgt-maj-message-attente-rappel.p",1,"alert","alert-warning"],["type","danger"],[1,"dataTable","table","table-responsive","table-bordered","table-hover"],[1,"modal-footer"],["type","button","data-cat","synchronisation-dgt-maj.global-fermer.button",1,"btn","btn-default",3,"click"],[1,"fit","text-center"],["data-cat","synchronisation-dgt-maj.element.span"]],template:function(n,s){if(n&1){let h=k();o(0,"div",1)(1,"h4",2),c(2),d(3,"translate"),l(),o(4,"button",3),v("click",function(){return C(h),y(s.onClose())}),o(5,"span",4),c(6,"\xD7"),l()()(),o(7,"div",5)(8,"div",6),D(9,"mat-progress-bar",null,0),o(11,"mat-card",7)(12,"mat-card-content"),f(13,ci,3,3,"p",8)(14,di,3,3,"p",9),f(15,pi,3,3,"p",10),f(16,mi,3,3,"alert",11),f(17,ui,22,17,"table",12),l()()()(),o(18,"div",13)(19,"button",14),v("click",function(){return C(h),y(s.onClose())}),c(20),d(21,"translate"),l()()}n&2&&(r(2),m(p(3,6,"synchronisation_dgt_maj.modal_titre")),r(11),b(s.isLoading?13:14),r(2),b(s.isLoading&&s.isMessageAttente?15:-1),r(),b(s.erreurMessage?16:-1),r(),b(!s.erreurMessage&&!s.isLoading?17:-1),r(3),m(p(21,8,"global.Fermer")))},dependencies:[Rt,V,N,j,$,X,O],encapsulation:2});let i=a;return i})();var fi=["class","component"];function bi(i,a){if(i&1&&(o(0,"alert",9),c(1),d(2,"translate"),l()),i&2){let t=g();r(),x(" ",p(2,1,t.erreurMessage)," ")}}function vi(i,a){if(i&1){let t=k();o(0,"div",10),D(1,"div",13)(2,"br"),o(3,"div",6)(4,"div",14)(5,"input",15),d(6,"translate"),v("keyup",function(n){C(t);let s=g();return y(s.onChangeDpdNumero(n.target.value))}),l()()()()}if(i&2){let t=g();r(),u("innerHTML",t.userMessage,ge),r(4),u("placeholder",T(p(6,3,"synchronisation_dgt_liste.supprimer_dpd_saisir_no")))}}function xi(i,a){if(i&1&&(o(0,"tr")(1,"td",19),c(2),l()()),i&2){let t=a.$implicit;r(2),m(t)}}function Si(i,a){if(i&1&&(o(0,"div")(1,"alert",9),D(2,"span",16),l(),D(3,"hr"),o(4,"table",17)(5,"thead")(6,"tr")(7,"th",18),c(8),d(9,"translate"),l()()(),o(10,"tbody"),U(11,xi,3,1,"tr",null,je),l()()()),i&2){let t=g();r(2),u("innerHTML",t.userMessage,ge),r(6),m(p(9,2,"synchronisation_dgt_liste.num_commandes")),r(3),G(t.commandesEnAttentePaiement)}}function Ci(i,a){if(i&1){let t=k();o(0,"div",12)(1,"a",20),v("click",function(){C(t);let n=g();return y(n.close())}),c(2),d(3,"translate"),l(),o(4,"button",21),v("click",function(){C(t);let n=g();return y(n.delierDpd())}),c(5),d(6,"translate"),l()()}if(i&2){let t=g();r(2),m(p(3,3,"global.Annuler")),r(2),u("disabled",!t.numerosDpdPareils),r(),x(" ",p(6,5,"salaries.doublons_confirmer_enregistrement")," ")}}function yi(i,a){if(i&1){let t=k();o(0,"div",12)(1,"a",22),v("click",function(){C(t);let n=g();return y(n.close())}),c(2),d(3,"translate"),l()()}i&2&&(r(2),m(p(3,1,"global.Fermer")))}var Je=(()=>{let a=class a{constructor(e,n,s,h,S){this.bsModalRef=e,this.translateService=n,this.synchronisationDgtListeService=s,this.notif=h,this.panierService=S,this.result=new A,this.erreurMessage=""}ngOnInit(){this.erreurMessage=null,this.hasCommandesAttente=!1,this.synchronisationDgtListeService.getCommandesAttentePaiement(this.dpdEnCours.numeroEnvoi).subscribe(e=>{this.hasCommandesAttente=e?.length>0,this.commandesEnAttentePaiement=e,this.userMessage=this.hasCommandesAttente?this.translateService.instant("synchronisation_dgt_liste.supprimer_dpd_commandes_attente_paiement"):null,this.hasCommandesAttente||(this.dpdEnCours.nombreCartesCommandees>0?this.userMessage=this.translateService.instant("synchronisation_dgt_liste.supprimer_dpd_popup_commandes",{nombreSalaries:this.dpdEnCours.nombreSalariesTotal,nombreCartesCommandees:this.dpdEnCours.nombreCartesCommandees}):this.userMessage=this.translateService.instant("synchronisation_dgt_liste.supprimer_dpd_popup",{nombreSalaries:this.dpdEnCours.nombreSalariesTotal}))},e=>{this.erreurMessage=e})}confirmerEnregistrement(){this.bsModalRef.hide()}close(){this.bsModalRef.hide()}onChangeDpdNumero(e){this.numerosDpdPareils=e===this.dpdEnCours.numeroEnvoi}delierDpd(){this.synchronisationDgtListeService.delierDpd(this.dpdEnCours.numeroEnvoi).subscribe(e=>{this.notif.setNotification({type:_e.Success,title:this.translateService.instant("synchronisation_dgt_liste.supprimer_dpd_succes")}),this.bsModalRef.hide(),this.result.emit(!0),this.panierService.get()},e=>{this.erreurMessage=e})}};a.\u0275fac=function(n){return new(n||a)(_(Ee),_(B),_(qe),_(ke),_(Bt))},a.\u0275cmp=w({type:a,selectors:[["synchronisation-dgt-delier-modal",8,"component"]],outputs:{result:"result"},attrs:fi,decls:18,vars:8,consts:[[1,"modal-header"],["id","modal-basic-title","data-cat","synchronisation-dgt-delier-modal.modal-basic-title.h4",1,"modal-title"],["type","button","data-cat","synchronisation-dgt-delier-modal.element.button",1,"close",2,"outline","none",3,"click"],["aria-hidden","true","data-cat","synchronisation-dgt-delier-modal.erreurmessage.span"],["appearance","outlined"],[1,"mt-n3"],[1,"row"],[1,"col-sm-12"],[1,"card","card-default"],["type","danger"],[1,"card-body"],[1,"grey-200","p-8"],[1,"col-sm-12","col-lg-6"],[1,"row",3,"innerHTML"],[1,"col-sm-6"],["type","search","maxlength","50","autofocusucf","","data-cat","synchronisation-dgt-delier-modal..input",1,"form-control",3,"keyup","placeholder"],["data-cat","synchronisation-dgt-delier-modal.synchronisation-dgt-liste-num-commandes.span",3,"innerHTML"],[1,"dataTable","table","table-bordered","table-hover"],[1,"text-center"],[1,"fit","text-center"],["data-cat","synchronisation-dgt-delier-modal.global-annuler.a",1,"btn","btn-primary",3,"click"],["type","button","data-cat","synchronisation-dgt-delier-modal.salaries-doublons-confirmer-enregistrement.button",1,"btn","btn-primary","ml-2",3,"click","disabled"],["data-cat","synchronisation-dgt-delier-modal.global-fermer.a",1,"btn","btn-primary","text-right",3,"click"]],template:function(n,s){n&1&&(o(0,"div",0)(1,"h4",1),c(2),d(3,"translate"),l(),o(4,"button",2),v("click",function(){return s.close()}),o(5,"span",3),c(6,"\xD7"),l()()(),o(7,"mat-card",4)(8,"mat-card-content",5)(9,"div",6)(10,"div",7)(11,"div",8),f(12,bi,3,3,"alert",9),f(13,vi,7,5,"div",10),f(14,Si,13,4,"div"),l()()()(),o(15,"mat-card-footer",11),f(16,Ci,7,7,"div",12),f(17,yi,4,3,"div",12),l()()),n&2&&(r(2),m(p(3,6,"synchronisation_dgt_liste.supprimer_dpd")),r(10),b(s.erreurMessage?12:-1),r(),b(s.hasCommandesAttente?-1:13),r(),b(s.hasCommandesAttente?14:-1),r(2),b(s.hasCommandesAttente?-1:16),r(),b(s.hasCommandesAttente?17:-1))},dependencies:[V,N,j,$,ae,Me,O],encapsulation:2});let i=a;return i})();var zt=(()=>{let a=class a{constructor(e){this.http=e,this.httpLoading$=new E(!0),this.filter$=new E({}),this.sort$=new E({}),this.currentPage$=new E(0),this.totalPage$=new E(0),this.data$=new E([]),this.errorMessage$=new E(null),this.actions=new E(!1),this.actions.subscribe(n=>{n&&this.getListe()})}setLoadingStatus(e){this.httpLoading$.next(e)}isLoadingObs(){return this.httpLoading$.asObservable()}isErrorMessageObs(){return this.errorMessage$.asObservable()}getListe(){this.httpLoading$.next(!0),le([this.filter$,this.sort$,this.currentPage$]).pipe(ce(1)).subscribe(([e,n,s])=>{let h=new Ce({fromObject:{idDeclaration:e.idDeclaration,keyword:e.keyword?e.keyword:"",page:s?s.toString():"1",itemsPerPage:"10",sortKey:n.sortKey?n.sortKey:"dteimportation",sortOrder:n.sortOrder?n.sortOrder:"desc"}});this.http.get(`${F.settings.apiUrl}/v1/SynchronisationDgt/listeSalaries`,{params:h}).subscribe(S=>{this.httpLoading$.next(!1);let M=S.results,he=S.totalPages,et=S.currentPage;this.currentPage$.next(et),this.totalPage$.next(he),this.data$.next(M)},S=>{this.errorMessage$.next(S)})})}};a.\u0275fac=function(n){return new(n||a)(Q(Y))},a.\u0275prov=H({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();var Ei=()=>({delay:"300ms",scale:".9"}),ki=i=>({value:"*",params:i}),Mi=(i,a)=>a.salarieId;function Ii(i,a){i&1&&(o(0,"alert",12),c(1),d(2,"translate"),l()),i&2&&(r(),x(" ",p(2,1,"global.Aucune_donnee_disponible")," "))}function wi(i,a){if(i&1&&(o(0,"alert",13),c(1),d(2,"translate"),l()),i&2){let t=g();r(),x(" ",p(2,1,t.erreurMessage)," ")}}function Ti(i,a){i&1&&(o(0,"div",14),D(1,"lib-core-loader"),l())}function Oi(i,a){if(i&1&&(o(0,"tr")(1,"td",20)(2,"b",21),c(3),l(),c(4),l(),o(5,"td",19),c(6),l(),o(7,"td",19),c(8),l(),o(9,"td",19),c(10),l(),o(11,"td",19),c(12),l(
1)()),i&2){let t=a.$implicit,e=g(2);r(3),m(t.nom),r(),x(", ",t.prenom1," "),r(2),m(t.dteNaissanceStr),r(2),m(e.salarieService.getStatutSalarie(t)),r(2),m(t.dteFinPrestationString),r(2),m(t.numeroCarte)}}function Li(i,a){if(i&1){let t=k();o(0,"mat-card",15)(1,"mat-card-content")(2,"table",17)(3,"thead")(4,"tr")(5,"th",18),v("click",function(){C(t);let n=g();return y(n.onTriChange("nom_prenom"))}),c(6),d(7,"translate"),l(),o(8,"th",18),v("click",function(){C(t);let n=g();return y(n.onTriChange("dteNaissance"))}),c(9),d(10,"translate"),l(),o(11,"th",19),c(12),d(13,"translate"),l(),o(14,"th",18),v("click",function(){C(t);let n=g();return y(n.onTriChange("dteFinPrestation"))}),c(15),d(16,"translate"),l(),o(17,"th",18),v("click",function(){C(t);let n=g();return y(n.onTriChange("numeroCarte"))}),c(18),d(19,"translate"),l()()(),o(20,"tbody"),U(21,Oi,13,6,"tr",null,Mi),d(23,"async"),l()()()()}if(i&2){let t=g();r(5),u("className",t.triColonneActive==="nom_prenom"?t.triSensActif+" fit":"fit sorting"),r(),x(" ",p(7,9,"synchronisation_dgt_liste.entete_nom_et_prenom")," "),r(2),u("className",t.triColonneActive==="dteNaissance"?t.triSensActif+" fit text-center":"fit sorting text-center"),r(),x(" ",p(10,11,"global.Date_naissance")," "),r(3),m(p(13,13,"global.Statut")),r(2),u("className",t.triColonneActive==="nom_prenom"?t.triSensActif+" fit text-center":"fit sorting text-center"),r(),x(" ",p(16,15,"synchronisation_dgt_liste.entete_date_fin_validite")," "),r(2),u("className",t.triColonneActive==="numeroCarte"?t.triSensActif+" fit text-center":"fit sorting text-center"),r(),x(" ",p(19,17,"synchronisation_dgt_liste.entete_numero_carte")," "),r(3),G(p(23,19,t.synchronisationDgtListeSalariesService.data$))}}function Fi(i,a){if(i&1&&(o(0,"div",16)(1,"div",22),D(2,"tableau-pagination",23),l()()),i&2){let t=g();r(2),u("currentPage$",t.synchronisationDgtListeSalariesService.currentPage$)("totalPage$",t.synchronisationDgtListeSalariesService.totalPage$)("loadPage",t.synchronisationDgtListeSalariesService.actions)}}var Xe=(()=>{let a=class a{constructor(e,n,s,h,S){this.bsModalRef=e,this.synchronisationDgtListeSalariesService=n,this.translate=s,this.fb=h,this.salarieService=S,this.isLoading=!1,this.erreurMessage=null,this.triColonneActive="",this.triSensActif="sorting_asc",this.searchKeyword="",this.selectedItemsStatutDpd=[],this.itemsStatutsDpd=[],this.dropdownSettings={}}ngOnInit(){this.synchronisationDgtListeSalariesService.setLoadingStatus(!0),this._isLoadingSubscription=this.synchronisationDgtListeSalariesService.isLoadingObs().subscribe(e=>{this.isLoading=e}),this._errorMessageSubscription=this.synchronisationDgtListeSalariesService.isErrorMessageObs().subscribe(e=>this.erreurMessage=e),this.rSearchField=this.fb.group({keyword:""}),this.erreurMessage=null,this.onSearch()}close(){this.bsModalRef.hide()}ngOnDestroy(){this._isLoadingSubscription&&this._isLoadingSubscription.unsubscribe(),this._errorMessageSubscription&&this._errorMessageSubscription.unsubscribe()}onSearch(){this.erreurMessage=null,this.searchKeyword=this.rSearchField.controls.keyword.value,this.synchronisationDgtListeSalariesService.data$.next([]),this.synchronisationDgtListeSalariesService.currentPage$.next(1),this.synchronisationDgtListeSalariesService.filter$.next({idDeclaration:this.idDeclaration,keyword:this.searchKeyword}),this.synchronisationDgtListeSalariesService.getListe()}onTriChange(e){this.erreurMessage=null,this.triColonneActive===e?this.triSensActif==="sorting_asc"?this.triSensActif="sorting_desc":this.triSensActif="sorting_asc":(this.triColonneActive=e,this.triSensActif="sorting_asc"),this.synchronisationDgtListeSalariesService.currentPage$.next(1),this.synchronisationDgtListeSalariesService.sort$.next({sortKey:this.triColonneActive,sortOrder:this.triSensActif==="sorting_asc"?"asc":"desc"}),this.synchronisationDgtListeSalariesService.getListe()}getTranslation(e){return this.translate.instant(e)}};a.\u0275fac=function(n){return new(n||a)(_(Ee),_(zt),_(B),_(ne),_(Vt))},a.\u0275cmp=w({type:a,selectors:[["synchronisation-dgt-liste"]],decls:27,vars:27,consts:[[1,"modal-header"],["id","modal-basic-title","data-cat","synchronisation-dgt-liste-salaries.modal-basic-title.h4",1,"modal-title"],["type","button","data-cat","synchronisation-dgt-liste-salaries.element.button",1,"close",2,"outline","none",3,"click"],["aria-hidden","true","data-cat","synchronisation-dgt-liste-salaries.times.span"],[1,"card","card-fond-gris"],[1,"card-body"],["role","form",3,"ngSubmit","formGroup"],[1,"row"],[1,"col-12","col-sm-6","col-md-5","col-lg-5","col-xl-3"],["aria-required","true","aria-invalid","true","formControlName","keyword","autofocusucf","","data-cat","synchronisation-dgt-liste-salaries.keyword.input",1,"form-control",3,"keydown.enter","placeholder"],[1,"col-12","text-right","col-md-2","text-md-left","col-lg-2"],["data-cat","btnFiltrer.16","type","submit",1,"btn","btn-action","ml-1",3,"disabled"],["type","warning",1,"m-4"],["type","danger"],[1,"loader-container"],["appearance","outlined"],[1,"card","card-no-border"],[1,"dataTable","table","table-bordered","table-hover"],[3,"click","className"],[1,"fit","text-center"],[1,"fit","text-left"],["data-cat","synchronisation-dgt-liste-salaries.item-nom.b"],[1,"card-body","d-flex","flex-row-reverse"],[3,"currentPage$","totalPage$","loadPage"]],template:function(n,s){n&1&&(o(0,"div",0)(1,"h4",1),c(2),d(3,"translate"),l(),o(4,"button",2),v("click",function(){return s.close()}),o(5,"span",3),c(6,"\xD7"),l()()(),o(7,"div")(8,"div",4)(9,"div",5)(10,"form",6),v("ngSubmit",function(){return s.onSearch()}),o(11,"div",7)(12,"div",8)(13,"input",9),d(14,"translate"),v("keydown.enter",function(){return s.onSearch()}),l()(),o(15,"div",10)(16,"button",11),c(17),d(18,"translate"),l()()()()()(),f(19,Ii,3,3,"alert",12),d(20,"async"),f(21,wi,3,3,"alert",13),f(22,Ti,2,0,"div",14),f(23,Li,24,21,"mat-card",15),d(24,"async"),f(25,Fi,3,3,"div",16),d(26,"async"),l()),n&2&&(r(2),m(p(3,12,"global.Salaries")),r(5),u("@animate",P(25,ki,W(24,Ei))),r(3),u("formGroup",s.rSearchField),r(3),u("placeholder",T(p(14,14,"global.Mots_clefs"))),r(3),u("disabled",s.rSearchField.invalid),r(),x(" ",p(18,16,"global.Rechercher")," "),r(2),b(!s.isLoading&&p(20,18,s.synchronisationDgtListeSalariesService.data$).length==0&&!s.erreurMessage?19:-1),r(2),b(s.erreurMessage?21:-1),r(),b(s.isLoading?22:-1),r(),b(!s.isLoading&&p(24,20,s.synchronisationDgtListeSalariesService.data$).length>0?23:-1),r(2),b(!s.isLoading&&p(26,22,s.synchronisationDgtListeSalariesService.data$).length>0?25:-1))},dependencies:[q,ee,z,K,Z,re,te,ie,ae,j,$,V,N,Ie,Pt,X,O],encapsulation:2,data:{animation:me}});let i=a;return i})();var Bi=()=>({delay:"300ms",scale:".9"}),$i=i=>({value:"*",params:i}),ji=()=>({standalone:!0}),Vi=(i,a)=>({"table-primary":i,"table-default":a}),Ni=()=>["/salaries/liste"],Ri=i=>({t:"dpd",dpd:i}),Hi=(i,a)=>a.id;function Ui(i,a){i&1&&D(0,"div",13)}function Gi(i,a){if(i&1&&(o(0,"div",24)(1,"span",25),c(2),d(3,"translate"),l(),o(4,"span",26),c(5
1),l()()),i&2){let t=g();r(2),x("",p(3,2,"global.filtres")," :"),r(3),m(t.nbFiltres)}}function zi(i,a){if(i&1&&(c(0),d(1,"translate")),i&2){let t=a.item;x(" ",p(1,1,t.type)," ")}}function Ki(i,a){if(i&1&&(D(0,"input",28),o(1,"label",29),c(2),d(3,"translate"),l()),i&2){let t=g(),e=t.item,n=t.index;u("id",Ve("item-",n)),r(),u("for",Ve("item-",n)),r(),m(p(3,5,e.libelle))}}function qi(i,a){if(i&1&&(D(0,"input",30),c(1),d(2,"translate")),i&2){let t=g(),e=t.item,n=t.item$,s=t.index;u("id",Ve("item-",s))("checked",n.selected)("ngModelOptions",W(8,ji))("ngModel",n.selected),r(),x(" ",p(2,6,e.libelle)," ")}}function Wi(i,a){if(i&1&&(o(0,"div",27),f(1,Ki,4,7),f(2,qi,3,9),l()),i&2){let t=a.item;r(),b(t.type===""?1:-1),r(),b(t.type!==""?2:-1)}}function Qi(i,a){i&1&&(o(0,"alert",20),c(1),d(2,"translate"),l()),i&2&&(r(),x(" ",p(2,1,"global.Aucune_donnee_disponible")," "))}function Yi(i,a){if(i&1&&(o(0,"alert",21),c(1),d(2,"translate"),l()),i&2){let t=g();r(),x(" ",p(2,1,t.erreurMessage)," ")}}function Ji(i,a){if(i&1){let t=k();o(0,"mat-checkbox",39),v("change",function(n){C(t);let s=g(2);return y(s.setAll(n.checked))}),l()}if(i&2){let t=g(2);u("checked",t.allComplete)("color","primary")("indeterminate",t.someComplete())}}function Xi(i,a){if(i&1){let t=k();o(0,"mat-checkbox",45),Se("ngModelChange",function(n){C(t);let s=g().$index,h=g(2);return xe(h.task.subtasks[s].completed,n)||(h.task.subtasks[s].completed=n),y(n)}),v("ngModelChange",function(){C(t);let n=g(3);return y(n.updateAllComplete())}),l()}if(i&2){let t=g().$index,e=g(2);ve("ngModel",e.task.subtasks[t].completed),u("color","primary")}}function Zi(i,a){if(i&1){let t=k();o(0,"button",46),d(1,"translate"),v("click",function(){C(t);let n=g().$implicit,s=g(2);return y(s.delierDpd(n))}),D(2,"i",47),l()}i&2&&u("title",T(p(1,2,"synchronisation_dgt_liste.supprimer_dpd")))}function en(i,a){if(i&1&&(o(0,"tr",38)(1,"td",34)(2,"div",40),f(3,Xi,1,2,"mat-checkbox",41),f(4,Zi,3,4,"button",42),o(5,"button",43),d(6,"translate"),D(7,"i",44),l()()(),o(8,"td",36),c(9),l(),o(10,"td",36),c(11),l(),o(12,"td",36),c(13),l(),o(14,"td",36),c(15),l(),o(16,"td",36),c(17),l(),o(18,"td",36),c(19),l(),o(20,"td",36),c(21),l(),o(22,"td",36),c(23),l(),o(24,"td",36),c(25),l(),o(26,"td",36),c(27),l()()),i&2){let t=a.$implicit,e=a.$index,n=g(2);u("ngClass",Ne(19,Vi,n.task.subtasks[e].completed,!n.task.subtasks[e].completed)),r(3),b(n.isLectureSeule?-1:3),r(),b(n.isLectureSeule?-1:4),r(),u("title",T(p(6,17,"navigation.salaries")))("routerLink",W(22,Ni))("queryParams",P(23,Ri,t.numeroEnvoi)),r(4),m(t.numeroEnvoi),r(2),m(t.numeroVersion),r(2),m(t.dateImportation),r(2),m(t.statut),r(2),m(t.dateMaj),r(2),m(t.nombreSalariesTotal),r(2),m(t.nombreSalariesIncomplets),r(2),m(t.nombreSalariesComplets),r(2),m(t.dateDebutPrestation),r(2),m(t.dateFinPrestation)}}function tn(i,a){if(i&1){let t=k();o(0,"mat-card",22)(1,"mat-card-content")(2,"button",31),v("click",function(){C(t);let n=g();return y(n.synchroniserLesDPDs())}),D(3,"i",32),c(4),l(),o(5,"table",33)(6,"thead")(7,"tr")(8,"th",34),f(9,Ji,1,3,"mat-checkbox",35),l(),o(10,"th",36),c(11),d(12,"translate"),l(),o(13,"th",36),c(14),d(15,"translate"),l(),o(16,"th",37),v("click",function(){C(t);let n=g();return y(n.onTriChange("dteimportation"))}),c(17),d(18,"translate"),l(),o(19,"th",36),c(20),d(21,"translate"),l(),o(22,"th",36),c(23),d(24,"translate"),l(),o(25,"th",36),c(26),d(27,"translate"),l(),o(28,"th",36),c(29),d(30,"translate"),l(),o(31,"th",36),c(32),d(33,"translate"),l(),o(34,"th",36),c(35),d(36,"translate"),l(),o(37,"th",36),c(38),d(39,"translate"),l()()(),o(40,"tbody"),U(41,en,28,25,"tr",38,Hi),d(43,"async"),l()()()()}if(i&2){let t=g();r(2),u("disabled",t.isLectureSeule&&t.nombreDpdSelectionnees===0),r(2),x(" ",t.captionButtonSynch," "),r(5),b(t.isLectureSeule?-1:9),r(2),m(p(12,14,"synchronisation_dgt_liste.entete_numero")),r(3),m(p(15,16,"synchronisation_dgt_liste.entete_version")),r(2),u("className",t.triColonneActive==="dteimportation"?t.triSensActif+" fit text-center":"fit text-center sorting"),r(),x(" ",p(18,18,"synchronisation_dgt_liste.entete_date_import")," "),r(3),m(p(21,20,"global.Statut")),r(3),m(p(24,22,"synchronisation_dgt_liste.entete_date_derniere_maj")),r(3),m(p(27,24,"synchronisation_dgt_liste.entete_nombre_salaries")),r(3),m(p(30,26,"synchronisation_dgt_liste.entete_nombre_salaries_a_completer")),r(3),m(p(33,28,"synchronisation_dgt_liste.entete_nombre_salaries_complet")),r(3),m(p(36,30,"synchronisation_dgt_liste.entete_date_debut_prestation")),r(3),m(p(39,32,"synchronisation_dgt_liste.entete_date_fin_prestation")),r(3),G(p(43,34,t.synchronisationDgtListeService.data$))}}function nn(i,a){if(i&1&&(o(0,"div",23)(1,"div",48),D(2,"tableau-pagination",49),l()()),i&2){let t=g();r(2),u("currentPage$",t.synchronisationDgtListeService.currentPage$)("totalPage$",t.synchronisationDgtListeService.totalPage$)("loadPage",t.synchronisationDgtListeService.actions)}}var nt=(()=>{let a=class a{updateAllComplete(){this.allComplete=this.task.subtasks!=null&&this.task.subtasks.every(e=>e.completed),this.updateCaptionButtonSynchro()}someComplete(){return this.task.subtasks==null?!1:this.task.subtasks.filter(e=>e.completed).length>0&&!this.allComplete}setAll(e){this.allComplete=e,this.task.subtasks!=null&&(this.task.subtasks.forEach(n=>n.completed=e),this.updateCaptionButtonSynchro())}updateCaptionButtonSynchro(){this.nombreDpdSelectionnees=this.task.subtasks.filter(e=>e.completed).length,this.getTranslationCaptionButtonSynchro()}constructor(e,n,s,h,S,M){this.synchronisationDgtListeService=e,this.authService=n,this.translate=s,this.modalService=h,this.fb=S,this.route=M,this.allComplete=!1,this.data=[],this.isLoading=!1,this.erreurMessage=null,this.triColonneActive="codeDpd",this.triSensActif="sorting_asc",this.searchCodeDpd="",this.searchStatutsDpd="",this.selectedItemsStatutDpd=[],this.itemsStatutsDpd=[],this.dropdownSettings={},this.criteres=[]}ngOnInit(){this.authService.getUtilisateurActifObs().subscribe(n=>{this.isLectureSeule=n.role===I.UtilisateurLectureSeule}),this._isLoadingSubscription=this.synchronisationDgtListeService.isLoadingObs().subscribe(n=>{this.isLoading=n}),this._errorMessageSubscription=this.synchronisationDgtListeService.isErrorMessageObs().subscribe(n=>this.erreurMessage=n),this._onTranslationChangeSubscription=this.translate.onLangChange.subscribe(n=>{this.updateCaptionButtonSynchro()}),this.rSearchField=this.fb.group({codeDpd:["",this.validatorReferenceDPD],selectionGlobale:!1,criteres:[]}),this.criteres.push({type:"",id:0,selected:!1,libelle:"global.tout_selectionner"}),this.criteres.push({type:"global.Statut",id:0,selected:!1,libelle:"synchronisation_dgt_liste.dpd_transmis"}),this.criteres.push({type:"global.Statut",id:1,selected:!1,libelle:"synchronisation_dgt_liste.dpd_annule"}),this.rSearchField.get("criteres").setValue(this.criteres),this.rSearchField.get("selectionGlobale").setValue(!0),this.rSearchField.updateV
1alueAndValidity(),this.rSearchField.get("selectionGlobale").valueChanges.subscribe(n=>{this.onFiltreCheck(n)}),this.calculNombreFiltres(),this.getTranslationCaptionButtonSynchro(),this.erreurMessage=null,this._onData=this.synchronisationDgtListeService.onDataObs().subscribe(n=>{this.data=n}),this._onTask=this.synchronisationDgtListeService.onTaskObs().subscribe(n=>{this.task=n,this.updateAllComplete(),this.getTranslationCaptionButtonSynchro()});let e=this.route.snapshot.paramMap.get("numeroEnvoi");e&&this.rSearchField.controls.codeDpd.setValue(e),this.onSearch(),this.synchronisationDgtListeService.data$.subscribe(n=>{console.log(n)})}validatorReferenceDPD(e){return/[0-9]/.test(e.value)&&!/^[0-9]+-[0-9]+$/.test(e.value)?{notReferenceDPD:!0}:null}ngOnDestroy(){this._isLoadingSubscription&&this._isLoadingSubscription.unsubscribe(),this._errorMessageSubscription&&this._errorMessageSubscription.unsubscribe(),this._onData&&this._onData.unsubscribe(),this._onTask&&this._onTask.unsubscribe(),this._onTranslationChangeSubscription&&this._onTranslationChangeSubscription.unsubscribe()}onSearch(){this.erreurMessage=null,this.task.subtasks=[],this.searchCodeDpd=this.rSearchField.controls.codeDpd.value,(!this.rSearchField.controls.criteres.value||this.rSearchField.controls.criteres.value.length===0)&&(this.rSearchField.get("criteres").setValue(this.criteres),this.rSearchField.updateValueAndValidity(),this.calculNombreFiltres());let n=this.rSearchField.controls.criteres.value.filter(s=>s.type==="global.Statut");this.searchStatutsDpd=n.map(s=>s.id).join(","),this.synchronisationDgtListeService.currentPage$.next(1),this.synchronisationDgtListeService.filter$.next({codeDpd:this.searchCodeDpd,statutsDpd:this.searchStatutsDpd}),this.synchronisationDgtListeService.getListe()}onTriChange(e){this.erreurMessage=null,this.task.subtasks=[],this.triColonneActive===e?this.triSensActif==="sorting_asc"?this.triSensActif="sorting_desc":this.triSensActif="sorting_asc":(this.triColonneActive=e,this.triSensActif="sorting_asc"),this.synchronisationDgtListeService.currentPage$.next(1),this.synchronisationDgtListeService.sort$.next({sortKey:this.triColonneActive,sortOrder:this.triSensActif==="sorting_asc"?"asc":"desc"}),this.synchronisationDgtListeService.getListe()}synchroniserLesDPDs(){let s={initialState:{codesDpd:this.task.subtasks.reduce((h,S)=>(S.completed&&h.push(this.data[this.task.subtasks.findIndex(M=>M.id===S.id)].numeroEnvoi),h),[]).join(",")},keyboard:!1,ignoreBackdropClick:!0,animated:!0,class:"modal-lg"};this.bsModalRef=this.modalService.show(Ye,s),this.bsModalRef.onHidden.subscribe(()=>{this.synchronisationDgtListeService.getListe()})}getTranslation(e){return this.translate.instant(e)}getTranslationCaptionButtonSynchro(){this.nombreDpdSelectionnees===0?this.captionButtonSynch=this.translate.instant("synchronisation_dgt_liste.selectionner_dpd_a_synchroniser"):this.nombreDpdSelectionnees===1?this.captionButtonSynch=this.translate.instant("synchronisation_dgt_liste.synchroniser_dpd_selectionnee"):this.captionButtonSynch=this.translate.instant("synchronisation_dgt_liste.synchroniser_dpd_selectionnees").replace("{{nombreDpdSelectionnees}}",this.nombreDpdSelectionnees)}showSalaries(e){let s={initialState:{idDeclaration:e},animated:!0,backdrop:"static",keyboard:!1,class:"modal-xl"};this.modalService.show(Xe,s)}delierDpd(e){let s={initialState:{dpdEnCours:e},animated:!0,backdrop:"static",keyboard:!1,class:"modal-lg"};this.modalService.show(Je,s).content.result.subscribe(h=>{h&&this.onSearch()})}calculNombreFiltres(){this.nbFiltres=this.rSearchField.get("criteres").value.filter(e=>e.type!=="").length}onFiltreCheck(e){e?this.rSearchField.get("criteres").setValue(this.criteres):this.rSearchField.get("criteres").setValue([]),this.rSearchField.updateValueAndValidity()}};a.\u0275fac=function(n){return new(n||a)(_(qe),_(ze),_(B),_(pe),_(ne),_(Ge))},a.\u0275cmp=w({type:a,selectors:[["synchronisation-dgt-liste"]],decls:40,vars:43,consts:[[1,"content-heading"],["data-cat","page_titre.19"],["data-cat","synchronisation-dgt-liste.navigation-tableau-de-bord.span",1,"text-sm","d-none","d-sm-block",3,"innerHTML"],["data-cat","fil_ariane",1,"breadcrumb","ml-auto"],["data-cat","synchronisation-dgt-liste.navigation-tableau-de-bord.li",1,"breadcrumb-item"],["routerLink","/tableau-de-bord","data-cat","synchronisation-dgt-liste.tableau-de-bord.a"],["data-cat","synchronisation-dgt-liste.navigation-synchronisation-dgt-liste.li",1,"breadcrumb-item","active"],[1,"card","card-fond-gris"],["data-cat","dpd.liste.recherche.controls",1,"card-body"],["role","form",3,"ngSubmit","formGroup"],[1,"form-row"],[1,"col-12","col-md-6","col-lg-3"],["aria-required","true","aria-invalid","true","formControlName","codeDpd","autofocusucf","","data-cat","synchronisation-dgt-liste.codedp
1d.input",1,"form-control",3,"keydown.enter","placeholder"],[1,"mt-1","text-danger"],[1,"col-12","col-md-6","col-lg-2"],["bindLabel","libelle","groupBy","type","formControlName","criteres",1,"custom-ng-select",3,"change","items","placeholder","searchable","multiple","selectableGroup","closeOnSelect"],["ng-multi-label-tmp",""],["ng-optgroup-tmp",""],["ng-option-tmp",""],["data-cat","btnFiltrer.17","type","submit",1,"btn","btn-action","ml-1",3,"disabled"],["type","warning",1,"m-4"],["type","danger"],["appearance","outlined"],[1,"card","card-no-border"],[1,"ng-value"],["data-cat","synchronisation-dgt-liste.global-filtres.span",1,"ng-value-label"],["data-cat","synchronisation-dgt-liste.nbfiltres.span",1,"badge-filtre","badge-dark"],[1,"form-check"],["type","checkbox","formControlName","selectionGlobale","data-cat","synchronisation-dgt-liste.selectionglobale.input",1,"form-check-input-ng-select","mr-1",3,"id"],["data-cat","synchronisation-dgt-liste.item-libelle.label",3,"for"],["type","checkbox","data-cat","synchronisation-dgt-liste.item-index.input",1,"form-check-input-ng-select","mr-1",3,"id","checked","ngModelOptions","ngModel"],["data-cat","btnSynchroniser.2",1,"btn","btn-primary","mb-3",3,"click","disabled"],[1,"fas","fa-sync-alt","mr-2"],[1,"dataTable","table","table-responsive","table-bordered","table-hover"],[1,"fit"],[1,"mt-2",3,"checked","color","indeterminate"],[1,"fit","text-center"],[3,"click","className"],[3,"ngClass"],[1,"mt-2",3,"change","checked","color","indeterminate"],[1,"d-flex","align-items-center"],[1,"mt-2","mr-3",3,"ngModel","color"],["type","button","data-cat","synchronisation-dgt-liste.global-fiche.button",1,"btn","btn-light","text-danger","border","mr-3",3,"title"],["type","button","data-cat","synchronisation-dgt-liste.item-numeroenvoi.button",1,"btn","btn-light","text-primary","border",3,"routerLink","queryParams","title"],[1,"far","fa-eye"],[1,"mt-2","mr-3",3,"ngModelChange","ngModel","color"],["type","button","data-cat","synchronisation-dgt-liste.global-fiche.button",1,"btn","btn-light","text-danger","border","mr-3",3,"click","title"],[1,"far","fa-trash-alt"],[1,"card-body","d-flex","flex-row-reverse"],[3,"currentPage$","totalPage$","loadPage"]],template:function(n,s){n&1&&(o(0,"div",0)(1,"div")(2,"span",1),c(3),d(4,"translate"),l(),D(5,"span",2),l(),o(6,"ol",3)(7,"li",4)(8,"a",5),c(9),d(10,"translate"),l()(),o(11,"li",6),c(12),d(13,"translate"),l()()(),o(14,"div")(15,"div",7)(16,"div",8)(17,"form",9),v("ngSubmit",function(){return s.onSearch()}),o(18,"div",10)(19,"div",11)(20,"input",12),d(21,"translate"),v("keydown.enter",function(){return s.onSearch()}),l(),f(22,Ui,1,0,"div",13),l(),o(23,"div",14)(24,"ng-select",15),d(25,"translate"),v("change",function(){return s.calculNombreFiltres()}),L(26,Gi,6,4,"ng-template",16)(27,zi,2,3,"ng-template",17)(28,Wi,3,2,"ng-template",18),l()(),o(29,"div",11)(30,"button",19),c(31),d(32,"translate"),l()()()()()(),f(33,Qi,3,3,"alert",20),d(34,"async"),f(35,Yi,3,3,"alert",21),f(36,tn,44,36,"mat-card",22),d(37,"async"),f(38,nn,3,3,"div",23),d(39,"async"),l()),n&2&&(r(3),m(p(4,22,"navigation.synchronisation-dgt-liste")),r(2),u("innerHTML",s.sousTitrePage,ge),r(4),m(p(10,24,"navigation.tableau-de-bord")),r(3),m(p(13,26,"navigation.synchronisation-dgt-liste")),r(2),u("@animate",P(41,$i,W(40,Bi))),r(3),u("formGroup",s.rSearchField),r(3),u("placeholder",T(p(21,28,"synchronisation_dgt_liste.code_dpd"))),r(2),b(s.rSearchField.get("codeDpd").hasError("notReferenceDPD")?22:-1),r(2),u("placeholder",T(p(25,30,"global.selectionnez_des_filtres")))("items",s.criteres)("searchable",!1)("multiple",!0)("selectableGroup",!1)("closeOnSelect",!1),r(6),u("disabled",s.rSearchField.invalid),r(),x(" ",p(32,32,"global.Rechercher")," "),r(2),b(!s.isLoading&&p(34,34,s.synchronisationDgtListeService.data$).length==0&&!s.erreurMessage?33:-1),r(2),b(s.erreurMessage?35:-1),r(),b(p(37,36,s.synchronisationDgtListeService.data$).length>0?36:-1),r(2),b(p(39,38,s.synchronisationDgtListeService.data$).length>0?38:-1))},dependencies:[ye,q,ee,z,wt,K,Z,De,re,te,ie,ae,At,Ft,Lt,Ot,j,$,V,N,Ke,J,Ie,X,O],styles:[` 2 3.information-dpd[_ngcontent-%COMP%] { 4 border: 1px solid rgb(46, 153, 214); 5} 6.annulation-dpd[_ngcontent-%COMP%] { 7 border: 1px solid rgb(255, 195, 0); 8} 9.recapitulatif-dpd[_ngcontent-%COMP%] { 10 border: 1px solid rgb(102, 187, 106); 11}`],data:{animation:me}});let i=a;return i})();var Kt=(()=>{let a=class a{constructor(e){this.http=e,this.httpLoading$=new E(!1),this.filter$=new E({}),this.referenceDpd$=new E(null),this.entreprise$=new E({}),this.salaries$=new E([]),this.errorMessage$=new E(null),this.exportFinish$=new E(!1)}isLoadingObs(){return this.httpLoading$.asObservable()}isErrorMessageObs(){return this.errorMessage$.asObservable()}isEntrepriseObs(){return this.entreprise$.asObservable()}isSalariesObs(){return this.salaries$.asObservable()}isExportFinish(){return this.exportFinish$.asObservable()}getListe(){this.errorMessage$.next(null),this.referenceDpd$.next(null),this.entreprise$.next({}),this.salaries$.next([]),this.httpLoading$.next(!0),this.exportFinish$.next(!1),le([this.filter$]).pipe(ce(1)).subscribe(([e])=>{let n=new Ce({fromObject:{codeDpd:e.codeDpd,email:e.email}});this.http.get(`${F.settings.apiUrl}/v1/SynchronisationDgt/export`,{params:n}).subscribe(s=>{this.declarationId=s.declarationId,this.httpLoading$.next(!1),this.referenceDpd$.next(s.referenceDPD),this.entreprise$.next(s.entreprise),this.salaries$.next(s.salaries),this.exportFinish$.next(!0)},s=>{this.httpLoading$.next(!1),this.errorMessage$.next(s)})})}importer(){return this.http.post(`${F.settings.apiUrl}/v1/SynchronisationDgt/export`,{ID:this.declarationId})}annuler(){return this.http.post(`${F.settings.apiUrl}/v1/SynchronisationDgt/export/annuler`,{ID:this.declarationId})}};a.\u0275fac=function(n){return new(n||a)(Q(Y))},a.\u0275prov=H({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();var qt=()=>({delay:"300ms",scale:".9"}),Wt=i=>({value:"*",params:i}),an=(i,a,t)=>
11({"information-dpd":i,"annulation-dpd":a,"recapitulatif-dpd":t}),on=(i,a)=>a.nom+"-"+a.prenom;function sn(i,a){i&1&&(o(0,"div",19),c(1),d(2,"translate"),l()),i&2&&(r(),x(" ",p(2,1,"synchronisation_dgt_export.code_dpd_vide")," "))}function ln(i,a){i&1&&(o(0,"div",19),c(1),d(2,"translate"),l()),i&2&&(r(),x(" ",p(2,1,"synchronisation_dgt_export.code_dpd_non_numerique")," "))}function cn(i,a){i&1&&(o(0,"div",24),c(1),d(2,"translate"),l()),i&2&&(r(),x(" ",p(2,1,"synchronisation_dgt_export.email_dpd_vide")," "))}function dn(i,a){i&1&&(o(0,"div",24),c(1),d(2,"translate"),l()),i&2&&(r(),x(" ",p(2,1,"synchronisation_dgt_export.email_dpd_non_conforme")," "))}function pn(i,a){if(i&1&&(o(0,"div",29)(1,"alert",31),c(2),d(3,"translate"),l()()),i&2){let t=g();r(2),x(" ",p(3,1,t.erreurMessage)," ")}}function mn(i,a){i&1&&(o(0,"div",32)(1,"h1",52)(2,"b",53),c(3),d(4,"translate"),l()()()),i&2&&(r(3),m(p(4,1,"synchronisation_dgt_export.recapitulatif")))}function hn(i,a){i&1&&(o(0,"div",32)(1,"h1",54)(2,"b",55),c(3),d(4,"translate"),l()()()),i&2&&(r(3),m(p(4,1,"synchronisation_dgt_export.annulation")))}function gn(i,a){if(i&1&&(o(0,"div",41)(1,"b",56),c(2),d(3,"translate"),l(),o(4,"div",40)(5,"a",57),c(6),l()()()),i&2){let t=g(2);r(2),m(p(3,2,"synchronisation_dgt_export.nombre_salaries_importes")),r(4),m(t.nombreSalariesImportes)}}function un(i,a){if(i&1&&(o(0,"tr")(1,"td"),c(2),l(),o(3,"td"),c(4),l(),o(5,"td"),c(6),d(7,"date"),l()()),i&2){let t=a.$implicit;r(2),m(t.nom),r(2),m(t.prenom),r(2),m(Fe(7,3,t.dateDeNaissance,"dd/MM/yyyy"))}}function _n(i,a){if(i&1&&(o(0,"div")(1,"div",58)(2,"div",59),c(3),d(4,"translate"),l()(),o(5,"div",60)(6,"i",59),c(7),d(8,"translate"),l()(),o(9,"table",61)(10,"thead")(11,"tr")(12,"th"),c(13),d(14,"translate"),l(),o(15,"th"),c(16),d(17,"translate"),l(),o(18,"th"),c(19),d(20,"translate"),l()()(),o(21,"tbody"),U(22,un,8,6,"tr",null,on),l()()()),i&2){let t=g(2);r(3),x(" ",p(4,5,"synchronisation_dgt_export.salaries_info")," "),r(4),x(" ",p(8,7,"synchronisation_dgt_export.salaries_attention")," "),r(6),m(p(14,9,"global.Nom")),r(3),m(p(17,11,"global.Prenom")),r(3),m(p(20,13,"global.Date_naissance")),r(3),G(t.salaries)}}function fn(i,a){if(i&1){let t=k();o(0,"mat-card-footer",51)(1,"div",62)(2,"form",63),v("ngSubmit",function(){C(t);let n=g(2);return y(n.onAnnuler())}),o(3,"button",64),c(4),d(5,"translate"),l()(),o(6,"form",65),v("ngSubmit",function(){C(t);let n=g(2);return y(n.onImporter())}),o(7,"button",66),c(8),d(9,"translate"),l()()()()}if(i&2){let t=g(2);r(3),u("disabled",t.btnAnnulerDisabled),r(),x(" ",p(5,4,"synchronisation_dgt_export.annuler")," "),r(3),u("disabled",t.btnImporterDisabled),r(),x(" ",p(9,6,"synchronisation_dgt_export.importer")," ")}}function bn(i,a){if(i&1&&(o(0,"mat-card",30)(1,"mat-card-content"),f(2,mn,5,3,"div",32),f(3,hn,5,3,"div",32),o(4,"div",33)(5,"h2",34)(6,"b",35),c(7),d(8,"translate"),l()()(),o(9,"div",36)(10,"h1",37),c(11),d(12,"async"),l()(),o(13,"div",38)(14,"b",39),c(15),d(16,"translate"),l(),o(17,"div",40),c(18),l()(),o(19,"div",41)(20,"b",42),c(21),d(22,"translate"),l(),o(23,"div",40),c(24),l()(),o(25,"div",41)(26,"b",43),c(27),d(28,"translate"),l(),o(29,"div",40),c(30),l()(),o(31,"div",41)(32,"b",44),c(33),d(34,"translate"),l(),o(35,"div",40),c(36),l()(),o(37,"div",41)(38,"b",45),c(39),d(40,"translate"),l(),o(41,"div",40),c(42),l()(),o(43,"div",41)(44,"b",46),c(45),d(46,"translate"),l(),o(47,"div",40),c(48),l()(),o(49,"div",41)(50,"b",47),c(51),d(52,"translate"),l(),o(53,"div",40),c(54),l()(),o(55,"div",41)(56,"b",48),c(57),d(58,"translate"),l(),o(59,"div",40),c(60),l()(),o(61,"div",41)(62,"b",49),c(63),d(64,"translate"),l(),o(65,"div",40),c(66),l()(),o(67,"div",41)(68,"b",50),c(69),d(70,"translate"),l(),o(71,"div",40),c(72),l()(),f(73,gn,7,4,"div",41),f(74,_n,24,15,"div"),l(),f(75,fn,10,8,"mat-card-footer",51),l()),i&2){let t=g();u("ngClass",Et(54,an,!t.isImportOk&&!t.isAnnulationOk,t.isAnnulationOk,t.isImportOk))("@animate",P(59,Wt,W(58,qt))),r(2),b(t.isImportOk?2:-1),r(),b(t.isAnnulationOk?3:-1),r(4),m(p(8,30,"synchronisation_dgt_export.titre_dpd")),r(4),m(p(12,32,t.synchronisationDgtImportService.referenceDpd$)),r(4),m(p(16,34,"synchronisation_dgt_export.raison_sociale")),r(3),m(t.entreprise.raisonSociale),r(3),m(p(22,36,"synchronisation_dgt_export.adresse")),r(3),yt("",t.entreprise.adresseLigne1," ",t.entreprise.adresseLigne2),r(3),m(p(28,38,"synchronisation_dgt_export.code_postal")),r(3),m(t.entreprise.codePostal),r(3),m(p(34,40,"global.Ville")),r(3),m(t.entreprise.ville),r(3),m(p(40,42,"synchronisation_dgt_export.pays")),r(3),m(t.entreprise.pays),r(3),m(p(46,44,"synchronisation_dgt_export.telephone")),r(3),m(t.entreprise.telephone),r(3),m(p(52,46,"synchronisation_dgt_export.email")),r(3),m(t.entreprise.email),r(3),m(p(58,48,"synchronisation_dgt_export.registre_professionnel")),r(3),m(t.entreprise.registre),r(3),m(p(64,50,"synchronisation_dgt_export.immatriculation")),r(3),m(t.entreprise.immatriculation),r(3),m(p(70,52,"synchronisation_dgt_export.numero_tva")),r(3),m(t.entreprise.numeroTva),r(),b(t.isImportOk?73:-1),r(),b(!t.isImportOk&&!t.isAnnulationOk?74:-1),r(),b(!t.isImportOk&&!t.isAnnulationOk?75:-1)}}var Qt=(()=>{let a=class a extends jt{constructor(e,n,s,h,S){super(),this.synchronisationDgtImportService=e,this.notif=n,this.translate=s,this.modalService=h,this.fb=S,this.isLoading=!1,this.erreurMessage=null,this.searchCodeDpd="",this.searchEmail="",this.isImportOk=!1,this.isAnnulationOk=!1,this.btnImporterDisabled=!1,this.btnAnnulerDisabled=!1}ngOnInit(){this.synchronisationDgtImportService.entreprise$.next({}),this.synchronisationDgtImportService.salaries$.next([]),this.synchronisationDgtImportService.referenceDpd$.next(null),this.synchronisationDgtImportService.isErrorMessageObs().pipe(Pe(this.destroyed)).subscribe(e=>this.erreurMessage=e),this.synchronisationDgtImportService.isEntrepriseObs().pipe(Pe(this.destroyed)).subscribe(e=>this.entreprise=e),this.synchronisationDgtImportService.isSalariesObs().pipe(Pe(this.destroyed)).subscribe(e=>this.salaries=e),this.rSearchField=this.fb.group({codeDpd1:new de(null,{validators:[oe.required,oe.pattern(/^\s*\d+\s*$/)]}),codeDpd2:new de(null,{validators:[oe.required,oe.pattern(/^\s*\d+\s*$/)]}),email:new de(null,{validators:[oe.required,oe.email]})}),this.erreurMessage=null}canDeactivate(){if(this.salaries.length!==0&&!this.isImportOk&&!this.isAnnulationOk){let n={initialState:{textTitle:this.translate.instant("synchronisation_dgt_export.modal_titre"),textBody:this.translate.instant("synchronisation_dgt_export.modal_message")},animated:!0,class:"modal-lg"};return this.modalService.show($t,n).content.result.pipe(ct(s=>(s&&this.onAnnuler(),s)))}else return!0}onSearch(){this.isImportOk=!1,this.isAnnulationOk=!1,this.searchCodeDpd=this.rSearchField.controls.codeDpd1.value.trim()+"-"+this.rSearchField.controls.codeDpd2.value.trim(),this.searchEmail=this.rSearchField.controls.email.value.trim(),this.synchronisationDgtImportService.filter$.next({codeDpd:this.searchCodeDpd,email:this.searchEmail}),this.synchronisationDgtImportService.getListe()}onImporter(){this.btnImporterDisabled=!0,this.synchronisationDgtImportService.importer().subscribe(e=>{this.nombreSalariesImportes=e,this.rSearchField.reset(),this.isImportOk=!0,this.btnImporterDisabled=!1,this.btnAnnulerDisabled=!1,this.notif.setNotification({type:_e.Success,title:this.translate.instant("synchronisation_dgt_export.notification_import_ok")})},e=>{this.isImportOk=!1,this.erreurMessage=e,this.btnImporterDisabled=!1,this.btnAnnulerDisabled=!1})}onAnnuler(){this.btnAnnulerDisabled=!0,this.synchronisationDgtImportService.annuler().subscribe(e=>{this.isAnnulationOk=!0,this.btnImporterDisabled=!1,this.btnAnnulerDisabled=!1,this.notif.setNotification({type:_e.Success,title:this.translate.instant("synchronisation_dgt_export.notification_annulation_ok")})},e=>{this.isAnnulationOk=!1,this.erreurMessage=e,this.btnAnnulerDisabled=!1,this.btnImporterDisabled=!1})}};a.\u0275fac=function(n){return new(n||a)(_(Kt),_(ke),_(B),_(pe),_(ne))},a.\u0275cmp=w({type:a,selectors:[["synchronisation-dgt-import"]],features:[_t],decls:50,vars:31,consts:[[1,"content-heading"],["data-cat","page_titre.18"],["data-cat","synchronisation-dgt-import.navigation-tableau-de-bord.span",1,"text-sm","d-none","d-sm-block",3,"innerHTML"],["data-cat","fil_ariane",1,"breadcrumb","ml-auto"],["data-cat","synchronisation-dgt-import.navigation-tableau-de-bord.li",1,"breadcrumb-item"],["routerLink","/tableau-de-bord","data-cat","synchronisation-dgt-import.tableau-de-bord.a"],["data-cat","synchronisation-dgt-import.navigation-synchronisation-dgt-import.li",1,"breadcrumb-item","active"],[1,"card","card-fond-gris"],[1,"card-body"],[3,"formGroup"],[1,"row"],[1,"col-12","col-lg-6"],[1,"row","col-form-label"],["for","code-dpd","data-cat","synchronisation-dgt-import.synchronisation-dgt-export-code-dpd.label",1,"col-3","col-lg-3","text-right","col-form-label",2,"white-space","nowrap"],[1,"col-7","col-lg-9"],["formControlName","codeDpd1","id","code-dpd","autofocusucf","","data-cat","synchronisation-dgt-import.codedpd1.input",1,"col-5","col-lg-5","form-control"],[1,"col-2","col-lg-1","col-form-label","d-flex","justify-content-center","align-items-center"],[1,"feather","icon-minus"],["formControlName","codeDpd2","data-cat","synchronisation-dgt-import.codedpd2.input",1,"col-5","col-lg-5","form-control"],[1,"text-danger"],[1,"col-12","col-lg-4"],[1,"col-12","col-lg-12"],["for","email","data-cat","synchronisation-dgt-import.synchronisation-dgt-export-email.label",1,"offset-lg-1","col-3","col-lg-3","text-right","col-form-label"],["formControlName","email","type","email","id","email","data-cat","synchronisation-dgt-import.email.input",1,"col-7","col-lg-8","form-control"],[1,"offset-3","offset-lg-4","text-danger"],[1,"col-12","col-lg-2"],[1,"d-flex","justify-content-end"],[1,"col-form-label"],["data-cat","btnFiltrer.15","type","submit",1,"ml-auto","btn","btn-action",3,"click","disabled"],[1,"search-form-hold"],["appearance","outlined",3,"ngClass"],["type","danger"],[1,"d-flex","justify-content-center","text-center","mb-3"],[1,"d-flex","justify-content-center","text-center"],["data-cat","synchronisation-dgt-import.synchronisation-dgt-export-titre-dpd.h2"],["data-cat","synchronisation-dgt-import.synchronisation-dgt-export-titre-dpd.b"],[1,"d-flex","justify-content-center"],["data-cat","synchronisation-dgt-import.synchronisationdgtimportservice-referencedpd.h1",1,"my-2"],[1,"row","my-2","pt-3"],["data-cat","synchronisation-dgt-import.synchronisation-dgt-export-raison-sociale.b",1,"offset-1","col-5"],[1,"col-6"],[1,"row","my-2"],["data-cat","synchronisation-dgt-import.synchronisation-dgt-export-adresse.b",1,"offset-1","col-5"],["data-cat","synchronisation-dgt-import.synchronisation-dgt-export-code-postal.b",1,"offset-1","col-5"],["data-cat","synchronisation-dgt-import.global-ville.b",1,"offset-1","col-5"],["data-cat","synchronisation-dgt-import.synchronisation-dgt-export-pays.b",1,"offset-1","col-5"],["data-cat","synchronisation-dgt-import.synchronisation-dgt-export-telephone.b",1,"offset-1","col-5"],["data-cat","synchronisation-dgt-import.synchronisation-dgt-export-email.b",1,"offset-1","col-5"],["data-cat","synchronisation-dgt-import.synchronisation-dgt-export-registre-professionnel.b",1,"offset-1","col-5"],["data-cat","synchronisation-dgt-import.synchronisation-dgt-export-immatriculation.b",1,"offset-1","col-5"],["data-cat","synchronisation-dgt-import.synchronisation-dgt-export-numero-tva.b",1,"offset-1","col-5"],[1,"grey-200","p-8"],["data-cat","synchronisation-dgt-import.synchronisation-dgt-export-recapitulatif.h1"],["data-cat","synchronisation-dgt-import.synchronisation-dgt-export-recapitulatif.b"],["data-cat","synchronisation-dgt-import.synchronisation-dgt-export-annulation.h1"],["data-cat","synchronisation-dgt-import.synchronisation-dgt-export-annulation.b"],["data-cat","synchronisation-dgt-import.synchronisation-dgt-export-nombre-salaries-importes.b",1,"offset-1","col-5"],["routerLink","/salaries/liste","data-cat","synchronisation-dgt-import.salaries.liste.a",1,"text-primary"],[1,"row","pt-3"],[1,"col-12"],[1,"row","pb-1"],[1,"dataTable","table","table-bordered","table-hover"],[1,"d-flex","justify-content-end","mr-2"],[1,"mr-2",3,"ngSubmit"],["data-cat","btnAnnuler",1,"btn","btn-warning",3,"disabled"],[3,"ngSubmit"],["data-cat","btnImporter",1,"btn","btn-primary",3,"disabled"]],template:function(n,s){if(n&1&&(o(0,"div",0)(1,"div")(2,"span",1),c(3),d(4,"translate"),l(),D(5,"span",2),l(),o(6,"ol",3)(7,"li",4)(8,"a",5),c(9),d(10,"translate"),l()(),o(11,"li",6),c(12),d(13,"translate"),l()()(),o(14,"div")(15,"div",7)(16,"div",8)(17,"form",9)(18,"div",10)(19,"div",11)(20,"div",12)(21,"label",13),c(22),d(23,"translate"),l(),o(24,"div",14)(25,"div",10),D(26,"input",15),o(27,"div",16),D(28,"i",17),l(),D(29,"input",18),f(30,sn,3,3,"div",19),f(31,ln,3,3,"div",19),l()()()(),o(32,"div",20)(33,"div",10)(34,"div",21)(35,"div",12)(36,"label",22),c(37),d(38,"translate"),l(),D(39,"input",23),f(40,cn,3,3,"div",24),f(41,dn,3,3,"div",24),l()()()(),o(42,"div",25)(43,"div",26)(44,"div",27)(45,"button",28),v("click",function(){return s.onSearch()}),c(46),d(47,"translate"),l()()()()()()()()(),f(48,pn,4,3,"div",29),f(49,bn,76,61,"mat-card",30)),n&2){let h,S,M,he;r(3),m(p(4,16,"navigation.synchronisation-dgt-import")),r(2),u("innerHTML",s.sousTitrePage,ge),r(4),m(p(10,18,"navigation.tableau-de-bord")),r(3),m(p(13,20,"navigation.synchronisation-dgt-import")),r(2),u("@animate",P(29,Wt,W(28,qt))),r(3),u("formGroup",s.rSearchField),r(5),m(p(23,22,"synchronisation_dgt_export.code_dpd")),r(8),b(s.rSearchField.get("codeDpd1").dirty&&(((h=s.rSearchField.get("codeDpd1").value)==null?null:h.trim())===""||s.rSearchField.get("codeDpd1").hasError("required"))||s.rSearchField.get("codeDpd2").dirty&&(((h=s.rSearchField.get("codeDpd2").value)==null?null:h.trim())===""||s.rSearchField.get("codeDpd2").hasError("required"))?30:-1),r(),b(((S=s.rSearchField.get("codeDpd1").value)==null?null:S.trim())!==""&&s.rSearchField.get("codeDpd1").hasError("pattern")||((S=s.rSearchField.get("codeDpd2").value)==null?null:S.trim())!==""&&s.rSearchField.get("codeDpd2").hasError("pattern")?31:-1),r(6),m(p(38,24,"synchronisation_dgt_export.email")),r(3),b(s.rSearchField.get("email").dirty&&(((M=s.rSearchField.get("email").value)==null?null:M.trim())===""||s.rSearchField.get("email").hasError("required"))?40:-1),r(),b(((he=s.rSearchField.get("email").value)==null?null:he.trim())!==""&&s.rSearchField.get("email").hasError("email")?41:-1),r(4),u("disabled",s.rSearchField.invalid),r(),x(" ",p(47,26,"global.Rechercher")," "),r(2),b(s.erreurMessage?48:-1),r(),b(s.salaries.length!=0?49:-1)}},dependencies:[ye,q,ee,z,K,Z,Tt,re,te,ie,ae,j,$,V,J,N,Me,X,Mt,O],styles:[` 12 13.information-dpd[_ngcontent-%COMP%] { 14 border: 1px solid rgb(46, 153, 214); 15} 16.annulation-dpd[_ngcontent-%COMP%] { 17 border: 1px solid rgb(255, 195, 0); 18} 19.recapitulatif-dpd[_ngcontent-%COMP%] { 20 border: 1px solid rgb(102, 187, 106); 21}`],data:{animation:me}});let i=a;return i})();var vn=["*"],xn=i=>["nav-item",i];function Sn(i,a){if(i&1){let t=k();o(0,"span",7),v("click",function(n){C(t);let s=g().$implicit,h=g();return n.preventDefault(),y(h.removeTab(s))}),c(1," \u274C"),l()}}function Cn(i,a){if(i&1){let t=k();o(0,"li",3),v("keydown",function(n){let s=C(t).index,h=g();return y(h.keyNavActions(n,s))}),o(1,"a",4),v("click",function(){let n=C(t).$implicit;return y(n.active=!0)}),o(2,"span",5),c(3),l(),L(4,Sn,2,0,"span",6),l()()}if(i&2){let t=a.$implicit;ue("active",t.active)("disabled",t.disabled),u("ngClass",P(15,xn,t.customClass||"")),r(),ue("active",t.active)("disabled",t.disabled),be("aria-controls",t.id?t.id:"")("aria-selected",!!t.active)("id",t.id?t.id+"-link":""),r(),u("ngTransclude",t.headingRef),r(),m(t.heading),r(),u("ngIf",t.removable)}}var yn=(()=>{let a=class a{set ngTransclude(e){this._ngTransclude=e,e&&this.viewRef.createEmbeddedView(e)}get ngTransclude(){return this._ngTransclude}constructor(e){this.viewRef=e}};a.\u0275fac=function(n){return new(n||a)(_(gt))},a.\u0275dir=fe({type:a,selectors:[["","ngTransclude",""]],inputs:{ngTransclude:"ngTransclude"}});let i=a;return i})(),Dn=(()=>{let a=class a{constructor(){this.type="tabs",this.isKeysAllowed=!0,this.ariaLabel="Tabs"}};a.\u0275fac=function(n){return new(n||a)},a.\u0275prov=H({token:a,factory:a.\u0275fac,providedIn:"ro
21ot"});let i=a;return i})(),rt=(()=>{let a=class a{get vertical(){return this._vertical}set vertical(e){this._vertical=e,this.setClassMap()}get justified(){return this._justified}set justified(e){this._justified=e,this.setClassMap()}get type(){return this._type}set type(e){this._type=e,this.setClassMap()}get isKeysAllowed(){return this._isKeysAllowed}set isKeysAllowed(e){this._isKeysAllowed=e}constructor(e,n,s){this.renderer=n,this.elementRef=s,this.clazz=!0,this.tabs=[],this.classMap={},this.ariaLabel="Tabs",this.isDestroyed=!1,this._vertical=!1,this._justified=!1,this._type="tabs",this._isKeysAllowed=!0,this.defaultActivationScheduled=!1,Object.assign(this,e)}ngOnDestroy(){this.isDestroyed=!0}addTab(e){if(e.tabOrder!==void 0?this.insertTabByOrder(e):this.tabs.push(e),e.active){e.active=!0;return}this.defaultActivationScheduled||(this.defaultActivationScheduled=!0,Promise.resolve().then(()=>{if(this.defaultActivationScheduled=!1,!this.tabs.length||this.tabs.some(s=>!!s.active))return;let n=this.tabs.find(s=>!s.disabled);n&&(n.active=!0)}))}insertTabByOrder(e){let n=this.tabs.length;for(let s=0;s<this.tabs.length;s++){let h=this.tabs[s];if(h.tabOrder!==void 0&&e.tabOrder!==void 0&&e.tabOrder<h.tabOrder){n=s;break}if(h.tabOrder===void 0){n=s;break}}this.tabs.splice(n,0,e)}removeTab(e,n={reselect:!0,emit:!0}){let s=this.tabs.indexOf(e);if(!(s===-1||this.isDestroyed)){if(n.reselect&&e.active&&this.hasAvailableTabs(s)){let h=this.getClosestTabIndex(s);this.tabs[h].active=!0}n.emit&&e.removed.emit(e),this.tabs.splice(s,1),e.elementRef.nativeElement.parentNode&&this.renderer.removeChild(e.elementRef.nativeElement.parentNode,e.elementRef.nativeElement)}}keyNavActions(e,n){if(!this.isKeysAllowed)return;let s=Array.from(this.elementRef.nativeElement.querySelectorAll(".nav-link"));if(e.keyCode===13||e.key==="Enter"||e.keyCode===32||e.key==="Space"){e.preventDefault(),s[n%s.length].click();return}if(e.keyCode===39||e.key==="RightArrow"){let h,S=1;do h=s[(n+S)%s.length],S++;while(h.classList.contains("disabled"));h.focus();return}if(e.keyCode===37||e.key==="LeftArrow"){let h,S=1,M=n;do M-S<0?(M=s.length-1,h=s[M],S=0):h=s[M-S],S++;while(h.classList.contains("disabled"));h.focus();return}if(e.keyCode===36||e.key==="Home"){e.preventDefault();let h,S=0;do h=s[S%s.length],S++;while(h.classList.contains("disabled"));h.focus();return}if(e.keyCode===35||e.key==="End"){e.preventDefault();let h,S=1,M=n;do M-S<0?(M=s.length-1,h=s[M],S=0):h=s[M-S],S++;while(h.classList.contains("disabled"));h.focus();return}if((e.keyCode===46||e.key==="Delete")&&this.tabs[n].removable){if(this.removeTab(this.tabs[n]),s[n+1]){s[(n+1)%s.length].focus();return}s[s.length-1]&&s[0].focus()}}getClosestTabIndex(e){let n=this.tabs.length;if(!n)return-1;for(let s=1;s<=n;s+=1){let h=e-s,S=e+s;if(this.tabs[h]&&!this.tabs[h].disabled)return h;if(this.tabs[S]&&!this.tabs[S].disabled)return S}return-1}hasAvailableTabs(e){let n=this.tabs.length;if(!n)return!1;for(let s=0;s<n;s+=1)if(!this.tabs[s].disabled&&s!==e)return!0;return!1}setClassMap(){this.classMap={"nav-stacked":this.vertical,"flex-column":this.vertical,"nav-justified":this.justified,[`nav-${this.type}`]:!0}}};a.\u0275fac=function(n){return new(n||a)(_(Dn),_(tt),_(Le))},a.\u0275cmp=w({type:a,selectors:[["tabset"]],hostVars:2,hostBindings:function(n,s){n&2&&ue("tab-container",s.clazz)},inputs:{vertical:"vertical",justified:"justified",type:"type"},ngContentSelectors:vn,decls:4,vars:3,consts:[["role","tablist",1,"nav",3,"click","ngClass"],[3,"ngClass","active","disabled","keydown",4,"ngFor","ngForOf"],[1,"tab-content"],[3,"keydown","ngClass"],["href","javascript:void(0);","role","tab",1,"nav-link",3,"click"],[3,"ngTransclude"],["class","bs-remove-tab",3,"click",4,"ngIf"],[1,"bs-remove-tab",3,"click"]],template:function(n,s){n&1&&(ft(),o(0,"ul",0),v("click",function(S){return S.preventDefault()}),L(1,Cn,5,17,"li",1),l(),o(2,"div",2),bt(3),l()),n&2&&(u("ngClass",s.classMap),be("aria-label",s.ariaLabel),r(),u("ngForOf",s.tabs))},dependencies:[J,Re,yn,He],styles:["[_nghost-%COMP%] .nav-tabs[_ngcontent-%COMP%] .nav-item.disabled[_ngcontent-%COMP%] a.disabled[_ngcontent-%COMP%]{cursor:default}"]});let i=a;return i})(),at=(()=>{let a=class a{get customClass(){return this._customClass}set customClass(e){this.customClass&&this.customClass.split(" ").forEach(n=>{this.renderer.removeClass(this.elementRef.nativeElement,n)}),this._customClass=e?e.trim():"",this.customClass&&this.customClass.split(" ").forEach(n=>{this.renderer.addClass(this.elementRef.nativeElement,n)})}get active(){return this._active}set active(e){if(this._active!==e){if(this.disabled&&e||!e){this._active&&!e&&(this.deselect.emit(this),this._active=e);return}this._active=e,this.selectTab.emit(this),this.tabset.tabs.forEac
21h(n=>{n!==this&&(n.active=!1)})}}get ariaLabelledby(){return this.id?`${this.id}-link`:""}constructor(e,n,s){this.elementRef=n,this.renderer=s,this.disabled=!1,this.removable=!1,this.selectTab=new A,this.deselect=new A,this.removed=new A,this.addClass=!0,this.role="tabpanel",this._active=!1,this._customClass="",this.tabset=e}ngOnInit(){this.removable=!!this.removable,this.tabset.addTab(this)}ngOnDestroy(){this.tabset.removeTab(this,{reselect:!1,emit:!1})}};a.\u0275fac=function(n){return new(n||a)(_(rt),_(Le),_(tt))},a.\u0275dir=fe({type:a,selectors:[["tab"],["","tab",""]],hostVars:7,hostBindings:function(n,s){n&2&&(be("id",s.id)("role",s.role)("aria-labelledby",s.ariaLabelledby),ue("active",s.active)("tab-pane",s.addClass))},inputs:{heading:"heading",id:"id",disabled:"disabled",removable:"removable",tabOrder:"tabOrder",customClass:"customClass",active:"active"},outputs:{selectTab:"selectTab",deselect:"deselect",removed:"removed"},exportAs:["tab"]});let i=a;return i})(),Yt=(()=>{let a=class a{constructor(e,n){n.headingRef=e}};a.\u0275fac=function(n){return new(n||a)(_(ht),_(at))},a.\u0275dir=fe({type:a,selectors:[["","tabHeading",""]]});let i=a;return i})(),Jt=(()=>{let a=class a{static forRoot(){return{ngModule:a,providers:[]}}};a.\u0275fac=function(n){return new(n||a)},a.\u0275mod=$e({type:a}),a.\u0275inj=Be({imports:[Ue]});let i=a;return i})();var Ze=(()=>{let a=class a{constructor(e){this.http=e,this.entrepriseEtrangereActif$=new E(null)}getEntrepriseEtrangereActifObs(){return this.entrepriseEtrangereActif$.asObservable()}setEntrepriseEtrangereActifObs(e){this.entrepriseEtrangereActif$.next(e)}get(e){return this.http.get(`${F.settings.apiUrl}/v1/synchronisationDgt/entreprises-etrangeres/${e}`)}update(e){return this.http.put(`${F.settings.apiUrl}/v1/synchronisationDgt/entreprises-etrangeres/${e.id}`,e)}};a.\u0275fac=function(n){return new(n||a)(Q(Y))},a.\u0275prov=H({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();function kn(i,a){if(i&1&&(o(0,"alert",4),c(1),d(2,"translate"),l()),i&2){let t=g(2);r(),x(" ",p(2,1,t.erreurMessage)," ")}}function Mn(i,a){if(i&1){let t=k();o(0,"p",24)(1,"u")(2,"a",25),v("click",function(){C(t);let n=g(3);return y(n.onRemoveLogo())}),c(3),d(4,"translate"),l()()()}i&2&&(r(3),m(p(4,1,"synchronisation_dgt_entreprises_etrangeres_identite.logo_supprimer_logo")))}function In(i,a){if(i&1){let t=k();o(0,"div",18)(1,"div",7)(2,"div",8),c(3),d(4,"translate"),l(),o(5,"div",9)(6,"p",20),c(7),d(8,"translate"),l(),o(9,"p",21)(10,"button",22),v("click",function(){C(t);let n=g(2);return y(n.openLogo())}),D(11,"img",23),l()(),f(12,Mn,5,3,"p",24),l()()()}if(i&2){let t=g(2);r(3),x(" ",p(4,4,"synchronisation_dgt_entreprises_etrangeres_identite.logo_titre")," "),r(4),x(" ",p(8,6,"synchronisation_dgt_entreprises_etrangeres_identite.logo_changer_logo")," "),r(4),u("src",t.logo,pt),r(),b(t.logo&&t.logoInitiale!==t.logo?12:-1)}}function wn(i,a){if(i&1&&(o(0,"mat-card-footer",19)(1,"div",5)(2,"div",26)(3,"button",27),c(4),d(5,"translate"),l()()()()),i&2){let t=g(2);r(3),u("disabled",t.formGroup.invalid),r(),x(" ",p(5,2,"global.Enregistrer")," ")}}function Tn(i,a){if(i&1){let t=k();o(0,"form",3),v("ngSubmit",function(){C(t);let n=g();return y(n.enregistrerVerifier())}),o(1,"mat-card-content"),f(2,kn,3,3,"alert",4),o(3,"div",5)(4,"div",6)(5,"div",7)(6,"div",8),c(7),d(8,"translate"),l(),o(9,"div",9)(10,"div",10)(11,"label",11),c(12),d(13,"translate"),l(),o(14,"div",12),D(15,"input",13),d(16,"translate"),l()(),o(17,"div",10)(18,"label",14),c(19),d(20,"translate"),l(),o(21,"div",12),D(22,"input",15),d(23,"translate"),l()(),o(24,"div",10)(25,"label",16),c(26),d(27,"translate"),l(),o(28,"div",12),D(29,"input",17),d(30,"translate"),l()()()()(),f(31,In,13,8,"div",18),l()(),f(32,wn,6,4,"mat-card-footer",19),l()}if(i&2){let t=g();u("formGroup",t.formGroup),r(2),b(t.erreurMessage?2:-1),r(5),x(" ",p(8,14,"synchronisation_dgt_entreprises_etrangeres_identite.fiche_titre")," "),r(5),m(p(13,16,"synchronisation_dgt_entreprises_etrangeres_identite.fiche_raison_sociale")),r(3),u("placeholder",T(p(16,18,"synchronisation_dgt_entreprises_etrangeres_identite.fiche_raison_sociale"))),r(4),m(p(20,20,"synchronisation_dgt_entreprises_etrangeres_identite.fiche_immatriculation")),r(3),u("placeholder",T(p(23,22,"synchronisation_dgt_entreprises_etrangeres_identite.fiche_immatriculation"))),r(4),m(p(27,24,"synchronisation_dgt_entreprises_etrangeres_identite.fiche_numero_tva")),r(3),u("placeholder",T(p(30,26,"synchronisation_dgt_entreprises_etrangeres_identite.fiche_numero_tva"))),r(2),b(t.isDetache5AnsActif?-1:31),r(),b(t.isDetache5AnsActif?-1:32)}}var Zt=(()=>{let a=class a{constructor(e,n,s,h,S,M){this.notif=e,this.fb=n,this.modalService=s,this.translate=h,this.entreprisesEtrangeresService=S,this.authService=M,this.btnSauvegardeDisabled=!1,this.erreurMessage=null,this.logoRecadre=!1,this.logoNom=null,this.logoInitiale="/assets/images/logo-vierge.png",this.logoHasChanged=!1,this.logoDelete=!1}ngOnInit(){this.isDetache5AnsActif=this.authService.isDetache5ans,this._entrepriseEtrangereActifSubscription=this.entreprisesEtrangeresService.getEntrepriseEtrangereActifObs().subscribe(e=>{this.entrepriseEtrangere=e,this.formGroup=this.fb.group({raisonSociale:new de(this.entrepriseEtrangere?.raisonSociale||""),immatriculation:new de(this.entrepriseEtrangere?.immatriculation||""),numeroTVA:new de(this.entrepriseEtrangere?.numeroTva||"")}),this.logo=this.entrepriseEtrangere?.logo?this.entrepriseEtrangere?.logo:this.logoInitiale,this.logoNom=this.entrepriseEtrangere?.logoNom})}ngOnDestroy(){this._entrepriseEtrangereActifSubscription&&this._entrepriseEtrangereActifSubscription.unsubscribe()}enregistrerVerifier(){this.btnSauvegardeDisabled=!0,this.erreurMessage=null;let e={};e.id=this.entrepriseEtrangere.id,e.logo=this.logo===this.logoInitiale?null:this.logo,e.logoNom=this.logoNom,e.logoRecadre=this.logoRecadre,e.logoHasChanged=this.logoHasChanged,e.logoDelete=this.logoDelete,this.logoDelete&&(e.logoNom=null,e.logoRecadre=!1),this.enregistrer(e)}enregistrer(e){this.entreprisesEtrangeresService.update(e).subscribe({next:()=>{this.apresUpdate(e)},error:n=>{this.erreurMessage=n,this.btnSauvegardeDisabled=!1}})}apresUpdate(e){e.logo=e.logo===null?this.logoInitiale:this.logo,this.notif.setNotification({type:_e.Success,title:this.translate.instant("global.Modification_reussie")}),this.btnSauvegardeDisabled=!1,this.logoHasChanged=!1,this.logoRecadre=!1,this.logoDelete=!1}onRemoveLogo(){this.logo=this.logoInitiale,this.logoDelete=!0}openLogo(){let n={initialState:{entrepriseEtrangere:this.entrepriseEtrangere},animated:!0,backdrop:"static",keyboard:!1,class:"modal-lg"};this.modalService.show(Nt,n).content.result.subscribe(s=>
21{s?.imageSerialise&&(this.logo=s.imageSerialise,this.logoNom=s.nomOriginal)})}};a.\u0275fac=function(n){return new(n||a)(_(ke),_(ne),_(pe),_(B),_(Ze),_(ze))},a.\u0275cmp=w({type:a,selectors:[["entreprise-etrangere-identite"]],decls:3,vars:1,consts:[[1,"search-form-hold"],["appearance","outlined"],["novalidate","",1,"form-horizontal",3,"formGroup"],["novalidate","",1,"form-horizontal",3,"ngSubmit","formGroup"],["type","danger"],[1,"row"],[1,"col-12","col-md-6","col-lg-8"],[1,"card","card-default"],[1,"card-header"],[1,"card-body"],[1,"form-group","row"],["data-cat","entreprise-etrangere-identite.synchronisation-dgt-entreprises-etrangeres-identite-fiche-raison-sociale.label",1,"col-12","col-sm-4","text-sm-right","col-md-12","text-md-left","col-lg-4","text-lg-right","col-form-label"],[1,"col-12","col-sm-7","col-md-12","col-lg-7"],["readonly","","formControlName","raisonSociale","data-cat","entreprise-etrangere-identite.raisonsociale.input",1,"form-control",3,"placeholder"],["data-cat","entreprise-etrangere-identite.synchronisation-dgt-entreprises-etrangeres-identite-fiche-immatriculation.label",1,"col-12","col-sm-4","text-sm-right","col-md-12","text-md-left","col-lg-4","text-lg-right","col-form-label"],["readonly","","formControlName","immatriculation","data-cat","entreprise-etrangere-identite.immatriculation.input",1,"form-control",3,"placeholder"],["data-cat","entreprise-etrangere-identite.synchronisation-dgt-entreprises-etrangeres-identite-fiche-numero-tva.label",1,"col-12","col-sm-4","text-sm-right","col-md-12","text-md-left","col-lg-4","text-lg-right","col-form-label"],["readonly","","formControlName","numeroTVA","data-cat","entreprise-etrangere-identite.numerotva.input",1,"form-control",3,"placeholder"],[1,"col-12","mt-3","mt-md-0","col-md-6","col-lg-4"],[1,"grey-200","p-8"],["data-cat","entreprise-etrangere-identite.synchronisation-dgt-entreprises-etrangeres-identite-logo-changer-logo.p",1,"text-center"],["data-cat","entreprise-etrangere-identite.element.p",1,"text-center"],["type","button","data-cat","entreprise-etrangere-identite.element.button",1,"btn","btn-default",3,"click"],["data-cat","entreprise-etrangere-identite.element.img",1,"img-thumbnail","photo-fiche-salarie",3,"src"],["data-cat","entreprise-etrangere-identite.synchronisation-dgt-entreprises-etrangeres-identite-logo-supprimer-logo.p",1,"text-center"],["href","javascript:;","data-cat","entreprise-etrangere-identite.synchronisation-dgt-entreprises-etrangeres-identite-logo-supprimer-logo.a",3,"click"],[1,"col-12","text-right"],["type","submit","data-cat","entreprise-etrangere-identite.global-enregistrer.button",1,"btn","btn-primary",3,"disabled"]],template:function(n,s){n&1&&(o(0,"div",0)(1,"mat-card",1),f(2,Tn,33,28,"form",2),l()()),n&2&&(r(2),b(s.formGroup?2:-1))},dependencies:[V,q,ee,z,K,Z,re,te,ie,N,j,$,Me,O],styles:[` 22 23 h2 { 24 width: 100%; 25 text-align: center; 26 border-bottom: 1px solid #e5e5e5; 27 line-height: 0.1em; 28 margin: 10px 0 20px; 29} 30 h2 span { 31 background: #fff; 32 padding: 0 10px; 33}`]});let i=a;return i})();var On=i=>({"dropdown-multiselect--active":i});function Ln(i,a){if(i&1&&(o(0,"span"),c(1),l()),i&2){let t=g();r(),m(t._placeholder)}}function Fn(i,a){if(i&1){let t=k();o(0,"span",15)(1,"span",16)(2,"span"),c(3),l(),o(4,"a",17),v("click",function(n){let s=C(t).$implicit,h=g();return y(h.onItemClick(n,s))}),c(5,"x"),l()()()}if(i&2){let t=a.$implicit,e=a.index,n=g();r(),u("hidden",e>n._settings.itemsShowLimit-1),r(2),x("",t.text,"\xA0")}}function An(i,a){if(i&1&&(o(0,"span",18),c(1),l()),i&2){let t=g();r(),x("+",t.itemShowRemaining())}}function Pn(i,a){if(i&1){let t=k();o(0,"li",19),v("click",function(){C(t);let n=g();return y(n.toggleSelectAll())}),D(1,"input",20),o(2,"div"),c(3),l()()}if(i&2){let t=g();r(),u("checked",t.isAllItemsSelected())("disabled",t.disabled||t.isLimitSelectionReached()),r(2),m(t.isAllItemsSelected()?t._settings.unSelectAllText:t._settings.selectAllText)}}function Bn(i,a){if(i&1){let t=k();o(0,"li",21)(1,"input",22),Se("ngModelChange",function(n){C(t);let s=g();return xe(s.filter.text,n)||(s.filter.text=n),y(n)}),v("ngModelChange",function(n){C(t);let s=g();return y(s.onFilterTextChange(n))}),l()()}if(i&2){let t=g();r(),u("readOnly",t.disabled)("placeholder",t._settings.searchPlaceholderText),ve("ngModel",t.filter.text)}}function $n(i,a){if(i&1){let t=k();o(0,"li",23),v("click",function(n){let s=C(t).$implicit,h=g();return y(h.onItemClick(n,s))}),D(1,"input",24),o(2,"div"),c(3),l()()}if(i&2){let t=a.$implicit,e=g();r(),u("checked",e.isSelected(t))("disabled",e.disabled||e.isLimitSelectionReached()&&!e.isSelected(t)||t.isDisabled),be("aria-label",t.text),r(2),m(t.text)}}function jn(i,a){if(i&1&&(o(0,"li",25)(1,"h5"),c(2),l()()),i&2){let t=g();r(2),m(t._settings.noFilteredDataAvailablePlaceholderText)}}function Vn(i,a){if(i&1&&(o(0,"li",26)(1,"h5"),c(2),l()()),i&2){let t=g();
33r(2),m(t._settings.noDataAvailablePlaceholderText)}}var se=class{id;text;isDisabled;constructor(a){(typeof a=="string"||typeof a=="number")&&(this.id=this.text=a,this.isDisabled=!1),typeof a=="object"&&(this.id=a.id,this.text=a.text,this.isDisabled=a.isDisabled)}},ot=(()=>{class i{transform(t,e){return!t||!e?t:t.filter(n=>this.applyFilter(n,e))}applyFilter(t,e){return typeof t.text=="string"&&typeof e.text=="string"?!(e.text&&t.text&&t.text.toLowerCase().indexOf(e.text.toLowerCase())===-1):!(e.text&&t.text&&t.text.toString().toLowerCase().indexOf(e.text.toString().toLowerCase())===-1)}static \u0275fac=function(e){return new(e||i)};static \u0275pipe=ut({name:"multiSelectFilter",type:i,pure:!1,standalone:!1})}return i})(),Nn=(()=>{class i{_elementRef;constructor(t){this._elementRef=t}clickOutside=new A;onClick(t,e){if(!e)return;this._elementRef.nativeElement.contains(e)||this.clickOutside.emit(t)}static \u0275fac=function(e){return new(e||i)(_(Le))};static \u0275dir=fe({type:i,selectors:[["","clickOutside",""]],hostBindings:function(e,n){e&1&&v("click",function(h){return n.onClick(h,h.target)},mt)},outputs:{clickOutside:"clickOutside"},standalone:!1})}return i})(),Rn={provide:It,useExisting:dt(()=>st),multi:!0},ei=()=>{},st=(()=>{class i{listFilterPipe;cdr;_settings;_data=[];selectedItems=[];isDropdownOpen=!0;_placeholder="Select";_sourceDataType=null;_sourceDataFields=[];filter=new se(this.data);defaultSettings={singleSelection:!1,idField:"id",textField:"text",disabledField:"isDisabled",enableCheckAll:!0,selectAllText:"Select All",unSelectAllText:"UnSelect All",allowSearchFilter:!1,limitSelection:-1,clearSearchFilter:!0,maxHeight:197,itemsShowLimit:999999999999,searchPlaceholderText:"Search",noDataAvailablePlaceholderText:"No data available",noFilteredDataAvailablePlaceholderText:"No filtered data available",closeDropDownOnSelection:!1,showSelectedItemsAtTop:!1,defaultOpen:!1,allowRemoteDataSearch:!1};set placeholder(t){t?this._placeholder=t:this._placeholder="Select"}disabled=!1;set settings(t){t?this._settings=Object.assign(this.defaultSettings,t):this._settings=Object.assign(this.defaultSettings)}set data(t){if(!t)this._data=[];else{let e=t[0];this._sourceDataType=typeof e,this._sourceDataFields=this.getFields(e),this._data=t.map(n=>typeof n=="string"||typeof n=="number"?new se(n):new se({id:n[this._settings.idField],text:n[this._settings.textField],isDisabled:n[this._settings.disabledField]}))}}onFilterChange=new A;onDropDownClose=new A;onSelect=new A;onDeSelect=new A;onSelectAll=new A;onDeSelectAll=new A;onTouchedCallback=ei;onChangeCallback=ei;onFilterTextChange(t){this.onFilterChange.emit(t)}constructor(t,e){this.listFilterPipe=t,this.cdr=e}onItemClick(t,e){if(this.disabled||e.isDisabled)return!1;let n=this.isSelected(e),s=this._settings.limitSelection===-1||this._settings.limitSelection>0&&this.selectedItems.length<this._settings.limitSelection;n?this.removeSelected(e):s&&this.addSelected(e),this._settings.singleSelection&&this._settings.closeDropDownOnSelection&&this.closeDropdown()}writeValue(t){if(t!=null&&t.length>0)if(this._settings.singleSelection)try{if(t.length>=1){let e=t[0];this.selectedItems=[typeof e=="string"||typeof e=="number"?new se(e):new se({id:e[this._settings.idField],text:e[this._settings.textField],isDisabled:e[this._settings.disabledField]})]}}catch{}else{let e=t.map(n=>typeof n=="string"||typeof n=="number"?new se(n):new se({id:n[this._settings.idField],text:n[this._settings.textField],isDisabled:n[this._settings.disabledField]}));this._settings.limitSelection>0?this.selectedItems=e.splice(0,this._settings.limitSelection):this.selectedItems=e}else this.selectedItems=[];this.onChangeCallback(t),this.cdr.markForCheck()}registerOnChange(t){this.onChangeCallback=t}registerOnTouched(t){this.onTouchedCallback=t}onTouched(){this.onTouchedCallback()}trackByFn(t,e){return e.id}isSelected(t){let e=!1;return this.selectedItems.forEach(n=>{t.id===n.id&&(e=!0)}),e}isLimitSelectionReached(){return this._settings.limitSelection===this.selectedItems.length}isAllItemsSelected(){let t=this.listFilterPipe.transform(this._data,this.filter),e=t.filter(n=>n.isDisabled).length;return(!this.data||this.data.length===0)&&this._settings.allowRemoteDataSearch?!1:t.length===this.selectedItems.length+e}showButton(){return this._settings.singleSelection?!1:!(this._settings.limitSelection>0)}itemShowRemaining(){return this.selectedItems.length-this._settings.itemsShowLimit}addSelected(t){this._settings.singleSelection?(this.selectedItems=[],this.selectedItems.push(t)):this.selectedItems.push(t),this.onChangeCallback(this.emittedValue(this.selectedItems)),this.onSelect.emit(this.emittedValue(t))}
33removeSelected(t){this.selectedItems.forEach(e=>{t.id===e.id&&this.selectedItems.splice(this.selectedItems.indexOf(e),1)}),this.onChangeCallback(this.emittedValue(this.selectedItems)),this.onDeSelect.emit(this.emittedValue(t))}emittedValue(t){let e=[];if(Array.isArray(t))t.map(n=>{e.push(this.objectify(n))});else if(t)return this.objectify(t);return e}objectify(t){if(this._sourceDataType==="object"){let e={};return e[this._settings.idField]=t.id,e[this._settings.textField]=t.text,this._sourceDataFields.includes(this._settings.disabledField)&&(e[this._settings.disabledField]=t.isDisabled),e}return this._sourceDataType==="number"?Number(t.id):t.text}toggleDropdown(t){t.preventDefault(),!(this.disabled&&this._settings.singleSelection)&&(this._settings.defaultOpen=!this._settings.defaultOpen,this._settings.defaultOpen||this.onDropDownClose.emit())}closeDropdown(){this._settings.defaultOpen=!1,this._settings.clearSearchFilter&&(this.filter.text=""),this.onDropDownClose.emit()}toggleSelectAll(){if(this.disabled)return!1;this.isAllItemsSelected()?(this.selectedItems=[],this.onDeSelectAll.emit(this.emittedValue(this.selectedItems))):(this.selectedItems=this.listFilterPipe.transform(this._data,this.filter).filter(t=>!t.isDisabled).slice(),this.onSelectAll.emit(this.emittedValue(this.selectedItems))),this.onChangeCallback(this.emittedValue(this.selectedItems))}getFields(t){let e=[];
33if(typeof t!="object")return e;for(let n in t)e.push(n);return e}static \u0275fac=function(e){return new(e||i)(_(ot),_(kt))};static \u0275cmp=w({type:i,selectors:[["ng-multiselect-dropdown"]],hostBindings:function(e,n){e&1&&v("blur",function(){return n.onTouched()})},inputs:{placeholder:"placeholder",disabled:"disabled",settings:"settings",data:"data"},outputs:{onFilterChange:"onFilterChange",onDropDownClose:"onDropDownClose",onSelect:"onSelect",onDeSelect:"onDeSelect",onSelectAll:"onSelectAll",onDeSelectAll:"onDeSelectAll"},standalone:!1,features:[Dt([Rn])],decls:18,vars:23,consts:[["tabindex","0",1,"multiselect-dropdown",3,"blur","clickOutside"],["tabindex","-1",1,"dropdown-btn",3,"click"],[4,"ngIf"],["class","selected-item-container",4,"ngFor","ngForOf","ngForTrackBy"],[2,"float","right !important","padding-right","4px",3,"ngClass"],["style","padding-right: 15px;",4,"ngIf"],[1,"dropdown-multiselect__caret"],[1,"dropdown-list",3,"hidden"],[1,"item1"],["class","multiselect-item-checkbox","style","border-bottom: 1px solid #ccc;padding:10px",3,"click",4,"ngIf"],["class","filter-textbox",4,"ngIf"],[1,"item2"],["class","multiselect-item-checkbox",3,"click",4,"ngFor","ngForOf"],["class","no-filtered-data",4,"ngIf"],["class","no-data",4,"ngIf"],[1,"selected-item-container"],[1,"selected-item",3,"hidden"],[2,"padding-left","2px","color","white",3,"click"],[2,"padding-right","15px"],[1,"multiselect-item-checkbox",2,"border-bottom","1px solid #ccc","padding","10px",3,"click"],["type","checkbox","aria-label","multiselect-select-all",3,"checked","disabled"],[1,"filter-textbox"],["type","text","aria-label","multiselect-search",3,"ngModelChange","readOnly","placeholder","ngModel"],[1,"multiselect-item-checkbox",3,"click"],["type","checkbox",3,"checked","disabled"],[1,"no-filtered-data"],[1,"no-data"]],template:function(e,n){e&1&&(o(0,"div",0),v("blur",function(){return n.onTouched()})("clickOutside",function(){return n.closeDropdown()}),o(1,"div")(2,"span",1),v("click",function(h){return n.toggleDropdown(h)}),L(3,Ln,2,1,"span",2)(4,Fn,6,2,"span",3),o(5,"span",4),L(6,An,2,1,"span",5),D(7,"span",6),l()()(),o(8,"div",7)(9,"ul",8),L(10,Pn,4,3,"li",9)(11,Bn,2,3,"li",10),l(),o(12,"ul",11),L(13,$n,4,4,"li",12),d(14,"multiSelectFilter"),L(15,jn,3,1,"li",13),d(16,"multiSelectFilter"),L(17,Vn,3,1,"li",14),l()()()),e&2&&(r(),ue("disabled",n.disabled),r(2),u("ngIf",n.selectedItems.length==0),r(),u("ngForOf",n.selectedItems)("ngForTrackBy",n.trackByFn),r(),u("ngClass",P(21,On,n._settings.defaultOpen)),r(),u("ngIf",n.itemShowRemaining()>0),r(2),u("hidden",!n._settings.defaultOpen),r(2),u("ngIf",(n._data.length>0||n._settings.allowRemoteDataSearch)&&!n._settings.singleSelection&&n._settings.enableCheckAll&&n._settings.limitSelection===-1),r(),u("ngIf",(n._data.length>0||n._settings.allowRemoteDataSearch)&&n._settings.allowSearchFilter),r(),Ct("max-height",n._settings.maxHeight+"px"),r(),u("ngForOf",Fe(14,15,n._data,n.filter)),r(2),u("ngIf",n._data.length!=0&&Fe(16,18,n._data,n.filter).length==0&&!n._settings.allowRemoteDataSearch),r(2),u("ngIf",n._data.length==0&&!n._settings.allowRemoteDataSearch))},dependencies:[J,Re,He,z,K,De,Nn,ot],styles:['.multiselect-dropdown[_ngcontent-%COMP%]{position:relative;width:100%;font-size:inherit;font-family:inherit}.multiselect-dropdown[_ngcontent-%COMP%] .dropdown-btn[_ngcontent-%COMP%]{display:inline-block;border:1px solid #adadad;width:100%;padding:6px 12px;margin-bottom:0;font-weight:400;line-height:1.52857143;text-align:left;vertical-align:middle;cursor:pointer;background-image:none;border-radius:4px}.multiselect-dropdown[_ngcontent-%COMP%] .dropdown-btn[_ngcontent-%COMP%] .selected-item-container[_ngcontent-%COMP%]{display:flex;float:left}.multiselect-dropdown[_ngcontent-%COMP%] .dropdown-btn[_ngcontent-%COMP%] .selected-item-container[_ngcontent-%COMP%] .selected-item[_ngcontent-%COMP%]{border:1px solid #337ab7;margin-right:4px;background:#337ab7;padding:0 5px;color:#fff;border-radius:2px;float:left;max-width:100px}.multiselect-dropdown[_ngcontent-%COMP%] .dropdown-btn[_ngcontent-%COMP%] .selected-item-container[_ngcontent-%COMP%] .selected-item[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis}.multiselect-dropdown[_ngcontent-%COMP%] .dropdown-btn[_ngcontent-%COMP%] .selected-item-container[_ngcontent-%COMP%] .selected-item[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}.multiselect-dropdown[_ngcontent-%COMP%] .dropdown-btn[_ngcontent-%COMP%] .selected-item[_ngcontent-%COMP%]:hover{box-shadow:1px 1px #959595}.multiselect-dropdown[_ngcontent-%COMP%] .dropdown-btn[_ngcontent-%COMP%] .dropdown-multiselect__caret[_ngcontent-%COMP%]{line-height:16px;display:block;position:absolute;box-sizing:border-box;width:40px;height:38px;right:1px;top:0;padding:4px 8px;margin:0;text-decoration:none;text-align:center;cursor:pointer;transition:transform .2s ease}.multiselect-dropdown[_ngcontent-%COMP%] .dropdown-btn[_ngcontent-%COMP%] .dropdown-multiselect__caret[_ngcontent-%COMP%]:before{position:relative;right:0;top:65%;color:#999;margin-top:4px;border-style:solid;border-width:8px 8px 0 8px;border-color:#999999 transparent;content:""}.multiselect-dropdown[_ngcontent-%COMP%] .dropdown-btn[_ngcontent-%COMP%] .dropdown-multiselect--active[_ngcontent-%COMP%] .dropdown-multiselect__caret[_ngcontent-%COMP%]{transform:rotate(180deg)}.multiselect-dropdown[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{background-color:#eceeef}.dropdown-list[_ngcontent-%COMP%]{position:absolute;padding-top:6px;width:100%;z-index:9999;border:1px solid #ccc;border-radius:3px;background:#fff;margin-top:10px;box-shadow:0 1px 5px #959595}.dropdown-list[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{padding:0;list-style:none;overflow:auto;margin:0}.dropdown-list[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{padding:6px 10px;cursor:pointer;text-align:left}.dropdown-list[_ngcontent-%COMP%] .filter-textbox[_ngcontent-%COMP%]{border-bottom:1px solid #ccc;position:relative;padding:10px}.dropdown-list[_ngcontent-%COMP%] .filter-textbox[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{border:0px;width:100%;padding:0 0 0 26px}.dropdown-list[_ngcontent-%COMP%] .filter-textbox[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{outline:none}.multiselect-item-checkbox[_ngcontent-%COMP%]:hover{background-color:#e4e3e3}.multiselect-item-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.multiselect-item-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:focus + div[_ngcontent-%COMP%]:before, .multiselect-item-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:hover + div[_ngcontent-%COMP%]:before{border-color:#337ab7;background-color:#f2f2f2}.multiselect-item-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:active + div[_ngcontent-%COMP%]:before{transition-duration:0s}.multiselect-item-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%] + div[_ngcontent-%COMP%]{position:relative;padding-left:2em;vertical-align:middle;-webkit-user-select:none;user-select:none;cursor:pointer;margin:0;color:#000}.multiselect-item-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%] + div[_ngcontent-%COMP%]:before{box-sizing:content-box;content:"";color:#337ab7;position:absolute;top:50%;left:0;width:14px;
33height:14px;margin-top:-9px;border:2px solid #337ab7;text-align:center;transition:all .4s ease}.multiselect-item-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%] + div[_ngcontent-%COMP%]:after{box-sizing:content-box;content:"";background-color:#337ab7;position:absolute;top:50%;left:4px;width:10px;height:10px;margin-top:-5px;transform:scale(0);transform-origin:50%;transition:transform .2s ease-out}.multiselect-item-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:disabled + div[_ngcontent-%COMP%]:before{border-color:#ccc}.multiselect-item-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:disabled:focus + div[_ngcontent-%COMP%]:before .multiselect-item-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:disabled:hover + div[_ngcontent-%COMP%]:before{background-color:inherit}.multiselect-item-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:disabled:checked + div[_ngcontent-%COMP%]:before{background-color:#ccc}.multiselect-item-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%] + div[_ngcontent-%COMP%]:after{background-color:transparent;top:50%;left:4px;width:8px;height:3px;margin-top:-4px;border-style:solid;border-color:#fff;border-width:0 0 3px 3px;border-image:none;transform:rotate(-45deg) scale(0)}.multiselect-item-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + div[_ngcontent-%COMP%]:after{content:"";transform:rotate(-45deg) scale(1);transition:transform .2s ease-out}.multiselect-item-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + div[_ngcontent-%COMP%]:before{animation:_ngcontent-%COMP%_borderscale .2s ease-in;background:#337ab7}.multiselect-item-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + div[_ngcontent-%COMP%]:after{transform:rotate(-45deg) scale(1)}@keyframes _ngcontent-%COMP%_borderscale{50%{box-shadow:0 0 0 2px #337ab7}}'],changeDetection:0})}return i})(),ti=(()=>{class i{static forRoot(){return{ngModule:i}}static \u0275fac=function(e){return new(e||i)};static \u0275mod=$e({type:i});static \u0275inj=Be({providers:[ot],imports:[Ue,q]})}return i})();var ii=(()=>{let a=class a{constructor(e){this.http=e,this.httpLoading$=new E(!0),this.filter$=new E({}),this.sort$=new E({}),this.currentPage$=new E(0),this.totalPage$=new E(0),this.data$=new E([]),this.actions=new E(!1),this.errorMessage$=new E(null),this.task$=new E({completed:!1,subtasks:[]}),this.entrepriseEtrangereId=null,this.actions.subscribe(n=>{n&&(this.task$.next({completed:!1,subtasks:[]}),this.getListe(this.entrepriseEtrangereId))})}setLoadingStatus(e){this.httpLoading$.next(e)}isLoadingObs(){return this.httpLoading$.asObservable()}isErrorMessageObs(){return this.errorMessage$.asObservable()}onDataObs(){return this.data$.asObservable()}onTaskObs(){return this.task$.asObservable()}getListe(e){this.entrepriseEtrangereId=e,this.data$.next([]),this.httpLoading$.next(!0),le([this.filter$,this.sort$,this.currentPage$]).pipe(ce(1)).subscribe(([n,s,h])=>{let S=new Ce({fromObject:{entrepriseEtrangereId:e,codeDpd:n.codeDpd?n.codeDpd:"",statutsDpd:n.statutsDpd?n.statutsDpd:"",page:h?h.toString():"1",itemsPerPage:"10",sortKey:s.sortKey?s.sortKey:"dteimportation",sortOrder:s.sortOrder?s.sortOrder:"desc"}});this.http.get(`${F.settings.apiUrl}/v1/SynchronisationDgt/Liste`,{params:S}).subscribe(M=>{this.httpLoading$.next(!1);let he=M.results,et=M.totalPages,ai=M.currentPage;this.currentPage$.next(ai),this.totalPage$.next(et),this.data$.next(he);let lt={completed:!1,subtasks:[]};he.forEach(oi=>{lt.subtasks.push({id:oi.id,completed:!1})}),this.task$.next(lt)},M=>{this.errorMessage$.next(M)})})}getCarteCommandees(e){return this.http.get(`${F.settings.apiUrl}/v1/SynchronisationDgt/${e}/cartes-commandees`)}delierDpd(e){return this.http.put(`${F.settings.apiUrl}/v1/SynchronisationDgt/${e}`,e)}};a.\u0275fac=function(n){return new(n||a)(Q(Y))},a.\u0275prov=H({token:a,factory:a.\u0275fac,providedIn:"root"});let i=a;return i})();var Gn=()=>({delay:"300ms",scale:".9"}),zn=i=>({value:"*",params:i}),Kn=(i,a)=>({"table-primary":i,"table-default":a}),qn=(i,a)=>a.id;function Wn(i,a){i&1&&D(0,"div",6)}function Qn(i,a){i&1&&(o(0,"div",6),c(1),d(2,"translate"),l()),i&2&&(r(),x(" ",p(2,1,"synchronisation_dgt_liste.statut_dpd_manquant")," "))}function Yn(i,a){i&1&&(o(0,"alert",11),c(1),d(2,"translate"),l()),i&2&&(r(),x(" ",p(2,1,"global.Aucune_donnee_disponible")," "))}function Jn(i,a){if(i&1&&(o(0,"alert",12),c(1),d(2,"translate"),l()),i&2){let t=g();r(),x(" ",p(2,1,t.erreurMessage)," ")}}function Xn(i,a){if(i&1){let t=k();o(0,"tr",22)(1,"td",18)(2,"div",23)(3,"mat-checkbox",24),Se("ngModelChange",function(n){let s=C(t).$index,h=g(2);
33return xe(h.task.subtasks[s].completed,n)||(h.task.subtasks[s].completed=n),y(n)}),v("ngModelChange",function(){C(t);let n=g(2);return y(n.updateAllComplete())}),l(),o(4,"button",25),d(5,"translate"),v("click",function(){let n=C(t).$implicit,s=g(2);return y(s.delierDpd(n))}),D(6,"i",26),l(),o(7,"button",27),d(8,"translate"),v("click",function(){let n=C(t).$implicit,s=g(2);return y(s.showSalaries(n.id))}),D(9,"i",28),l()()(),o(10,"td",20),c(11),l(),o(12,"td",20),c(13),l(),o(14,"td",20),c(15),l(),o(16,"td",20),c(17),l(),o(18,"td",20),c(19),l(),o(20,"td",20),c(21),l(),o(22,"td",20),c(23),l(),o(24,"td",20),c(25),l(),o(26,"td",20),c(27),l(),o(28,"td",20),c(29),l()()}if(i&2){let t=a.$implicit,e=a.$index,n=g(2);u("ngClass",Ne(21,Kn,n.task.subtasks[e].completed,!n.task.subtasks[e].completed)),r(3),ve("ngModel",n.task.subtasks[e].completed),u("color","primary"),r(),u("title",T(p(5,17,"synchronisation_dgt_liste.supprimer_dpd"))),r(3),u("title",T(p(8,19,"global.Fiche"))),r(4),m(t.numeroEnvoi),r(2),m(t.numeroVersion),r(2),m(t.dateImportation),r(2),m(t.statut),r(2),m(t.dateMaj),r(2),m(t.nombreSalariesTotal),r(2),m(t.nombreSalariesIncomplets),r(2),m(t.nombreSalariesComplets),r(2),m(t.dateDebutPrestation),r(2),m(t.dateFinPrestation)}}function Zn(i,a){if(i&1){let t=k();o(0,"mat-card",13)(1,"mat-card-content")(2,"button",15),v("click",function(){C(t);let n=g();return y(n.synchroniserLesDPDs())}),D(3,"i",16),c(4),l(),o(5,"table",17)(6,"thead")(7,"tr")(8,"th",18)(9,"mat-checkbox",19),v("change",function(n){C(t);let s=g();return y(s.setAll(n.checked))}),l()(),o(10,"th",20),c(11),d(12,"translate"),l(),o(13,"th",20),c(14),d(15,"translate"),l(),o(16,"th",21),v("click",function(){C(t);let n=g();return y(n.onTriChange("dteimportation"))}),c(17),d(18,"translate"),l(),o(19,"th",20),c(20),d(21,"translate"),l(),o(22,"th",20),c(23),d(24,"translate"),l(),o(25,"th",20),c(26),d(27,"translate"),l(),o(28,"th",20),c(29),d(30,"translate"),l(),o(31,"th",20),c(32),d(33,"translate"),l(),o(34,"th",20),c(35),d(36,"translate"),l(),o(37,"th",20),c(38),d(39,"translate"),l()()(),o(40,"tbody"),U(41,Xn,30,24,"tr",22,qn),d(43,"async"),l()()()()}if(i&2){let t=g();r(2),u("disabled",t.nombreDpdSelectionnees===0),r(2),x(" ",t.captionButtonSynch," "),r(5),u("checked",t.allComplete)("color","primary")("indeterminate",t.someComplete()),r(2),m(p(12,16,"synchronisation_dgt_liste.entete_numero")),r(3),m(p(15,18,"synchronisation_dgt_liste.entete_version")),r(2),u("className",t.triColonneActive==="dteimportation"?t.triSensActif+" fit text-center":"fit text-center sorting"),r(),x(" ",p(18,20,"synchronisation_dgt_liste.entete_date_import")," "),r(3),m(p(21,22,"global.Statut")),r(3),m(p(24,24,"synchronisation_dgt_liste.entete_date_derniere_maj")),r(3),m(p(27,26,"synchronisation_dgt_liste.entete_nombre_salaries")),r(3),m(p(30,28,"synchronisation_dgt_liste.entete_nombre_salaries_a_completer")),r(3),m(p(33,30,"synchronisation_dgt_liste.entete_nombre_salaries_complet")),r(3),m(p(36,32,"synchronisation_dgt_liste.entete_date_debut_prestation")),r(3),m(p(39,34,"synchronisation_dgt_liste.entete_date_fin_prestation")),r(3),G(p(43,36,t.entrepriseEtrangereDpdsListeService.data$))}}function er(i,a){if(i&1&&(o(0,"div",14)(1,"div",29),D(2,"tableau-pagination",30),l()()),i&2){let t=g();r(2),u("currentPage$",t.entrepriseEtrangereDpdsListeService.currentPage$)("totalPage$",t.entrepriseEtrangereDpdsListeService.totalPage$)("loadPage",t.entrepriseEtrangereDpdsListeService.actions)}}var ni=(()=>{let a=class a{updateAllComplete(){this.allComplete=this.task.subtasks!=null&&this.task.subtasks.every(e=>e.completed),this.updateCaptionButtonSynchro()}someComplete(){return this.task.subtasks==null?!1:this.task.subtasks.filter(e=>e.completed).length>0&&!this.allComplete}setAll(e){this.allComplete=e,this.task.subtasks!=null&&(this.task.subtasks.forEach(n=>n.completed=e),this.updateCaptionButtonSynchro())}updateCaptionButtonSynchro(){this.nombreDpdSelectionnees=this.task.subtasks.filter(e=>e.completed).length,this.getTranslationCaptionButtonSynchro()}constructor(e,n,s,h){this.entrepriseEtrangereDpdsListeService=e,this.translate=n,this.modalService=s,this.fb=h,this.allComplete=!1,this.data=[],this.isLoading=!1,this.erreurMessage=null,this.triColonneActive="codeDpd",this.triSensActif="sorting_asc",this.searchCodeDpd="",this.searchStatutsDpd="",this.selectedItemsStatutDpd=[],this.itemsStatutsDpd=[],this.dropdownSettings={}}ngOnInit(){this.entrepriseEtrangereDpdsListeService.setLoadingStatus(!0),this._errorMessageSubscription=this.entrepriseEtrangereDpdsListeService.isErrorMessageObs().subscribe(e=>this.erreurMessage=e),this.translate.onLangChange.subscribe(e=>{this.loadFilters(),this.updateCaptionButtonSynchro()}),this.rSearchField=this.fb.group({codeDpd:["",this.validatorReferenceDPD],statutsDpd:[this.selectedItemsStatutDpd,oe.required]}),this.loadFilters(),this.getTranslationCaptionButtonSynchro(),this.erreurMessage=null,this._onData=this.entrepriseEtrangereDpdsListeService.onDataObs().subscribe(e=>{this.data=e}),this._onTask=this.entrepriseEtrangereDpdsListeService.onTaskObs().subscribe(e=>{this.task=e,this.updateAllComplete(),this.getTranslationCaptionButtonSynchro()}),this.onSearch()}validatorReferenceDPD(e){return/[0-9]/.test(e.value)&&!/^[0-9]+-[0-9]+$/.test(e.value)?{notReferenceDPD:!0}:null}ngOnDestroy(){this._isLoadingSubscription&&this._isLoadingSubscription.unsubscribe(),this._errorMessageSubscription&&this._errorMessageSubscription.unsubscribe(),this._onData&&this._onData.unsubscribe(),this._onTask&&this._onTask.unsubscribe()}onSearch(){this.task.subtasks=[],this.searchCodeDpd=this.rSearchField.controls.codeDpd.value,this.searchStatutsDpd=this.rSearchField.controls.statutsDpd.value?this.rSearchField.controls.statutsDpd.value.map(e=>e.id).join(","):null,this.entrepriseEtrangereDpdsListeService.currentPage$.next(1),this.entrepriseEtrangereDpdsListeService.filter$.next({codeDpd:this.searchCodeDpd,statutsDpd:this.searchStatutsDpd}),this.entrepriseEtrangereDpdsListeService.getListe(this.entrepriseEtrangere.id.toString())}onTriChange(e){this.task.subtasks=[],this.triColonneActive===e?this.triSensActif==="sorting_asc"?this.triSensActif="sorting_desc":this.triSensActif="sorting_asc":(this.triColonneActive=e,this.triSensActif="sorting_asc"),this.entrepriseEtrangereDpdsListeService.currentPage$.next(1),this.entrepriseEtrangereDpdsListeService.sort$.next({sortKey:this.triColonneActive,sortOrder:this.triSensActif==="sorting_asc"?"asc":"desc"}),this.entrepriseEtrangereDpdsListeService.getListe(this.entrepriseEtrangere.id.toString())}loadFilters(){this.selectedItemsStatutDpd=[],this.getTranslationStatutsDpd().forEac
33h(e=>this.selectedItemsStatutDpd.push({id:e.id,code:e.code})),this.rSearchField.controls.statutsDpd.setValue(this.selectedItemsStatutDpd)}synchroniserLesDPDs(){let s={initialState:{codesDpd:this.task.subtasks.reduce((h,S)=>(S.completed&&h.push(this.data[this.task.subtasks.findIndex(M=>M.id===S.id)].numeroEnvoi),h),[]).join(",")},keyboard:!1,ignoreBackdropClick:!0,animated:!0,class:"modal-lg"};this.bsModalRef=this.modalService.show(Ye,s),this.bsModalRef.onHidden.subscribe(()=>{this.entrepriseEtrangereDpdsListeService.getListe(this.entrepriseEtrangere.id.toString())})}getTranslation(e){return this.translate.instant(e)}getTranslationDropdownSettings(){return{singleSelection:!1,idField:"id",textField:"code",selectAllText:this.translate.instant("global.Tout_selectionner"),unSelectAllText:this.translate.instant("global.Tout_deselectionner"),itemsShowLimit:2}}getTranslationStatutsDpd(){return this.itemsStatutsDpd=[],this.itemsStatutsDpd=[{id:0,code:this.translate.instant("synchronisation_dgt_liste.dpd_transmis")},{id:1,code:this.translate.instant("synchronisation_dgt_liste.dpd_annule")}],this.itemsStatutsDpd}getTranslationCaptionButtonSynchro(){this.nombreDpdSelectionnees===0?this.captionButtonSynch=this.translate.instant("synchronisation_dgt_liste.selectionner_dpd_a_synchroniser"):this.nombreDpdSelectionnees===1?this.captionButtonSynch=this.translate.instant("synchronisation_dgt_liste.synchroniser_dpd_selectionnee"):this.captionButtonSynch=this.translate.instant("synchronisation_dgt_liste.synchroniser_dpd_selectionnees").replace("{{nombreDpdSelectionnees}}",this.nombreDpdSelectionnees)}showSalaries(e){let s={initialState:{idDeclaration:e},animated:!0,backdrop:"static",keyboard:!1,class:"modal-xl"};this.modalService.show(Xe,s)}delierDpd(e){let s={initialState:{dpdEnCours:e},animated:!0,backdrop:"static",keyboard:!1,class:"modal-lg"};this.modalService.show(Je,s).content.result.subscribe(h=>{h===!0&&this.onSearch()})}};a.\u0275fac=function(n){return new(n||a)(_(ii),_(B),_(pe),_(ne))},a.\u0275cmp=w({type:a,selectors:[["entreprise-etrangere-dpds"]],inputs:{entrepriseEtrangere:"entrepriseEtrangere"},decls:23,vars:28,consts:[[1,"card","card-fond-gris"],[1,"card-body"],["role","form",3,"ngSubmit","formGroup"],[1,"row"],[1,"col-12","mb-3","col-sm-6","col-md-5","col-lg-5","col-xl-3"],["type","search","aria-required","true","aria-invalid","true","formControlName","codeDpd","autofocusucf","","data-cat","entreprise-etrangere-dpds.codedpd.input",1,"form-control",3,"keydown.enter","placeholder"],[1,"mt-1","text-danger"],[1,"col-12","mb-3","col-sm-6","col-md-4","col-lg-4","col-xl-3"],["name","statutsDpd","formControlName","statutsDpd",3,"placeholder","data","settings"],[1,"col-12","text-right","col-md-2","text-md-left","col-lg-2"],["data-cat","btnFiltrer.14","type","submit",1,"btn","btn-primary","ml-1",3,"disabled"],["type","warning",1,"m-4"],["type","danger"],["appearance","outlined"],[1,"card","card-no-border"],["data-cat","btnSynchroniser",1,"btn","btn-primary","mb-3",3,"click","disabled"],[1,"fas","fa-sync-alt","mr-2"],[1,"dataTable","table","table-responsive","table-bordered","table-hover"],[1,"fit"],[1,"mt-2",3,"change","checked","color","indeterminate"],[1,"fit","text-center"],[3,"click","className"],[3,"ngClass"],[1,"d-flex","align-items-center"],[1,"mt-2","mr-3",3,"ngModelChange","ngModel","color"],["type","button","data-cat","entreprise-etrangere-dpds.global-fiche.button",1,"btn","btn-light","text-danger","border","mr-3",3,"click","title"],[1,"far","fa-trash-alt"],["type","button","data-cat","entreprise-etrangere-dpds.item-numeroenvoi.button",1,"btn","btn-light","text-primary","border",3,"click","title"],[1,"far","fa-eye"],[1,"card-body","d-flex","flex-row-reverse"],[3,"currentPage$","totalPage$","loadPage"]],template:function(n,s){n&1&&(o(0,"div")(1,"div",0)(2,"div",1)(3,"form",2),v("ngSubmit",function(){return s.onSearch()}),o(4,"div",3)(5,"div",4)(6,"input",5),d(7,"translate"),v("keydown.enter",function(){return s.onSearch()}),l(),f(8,Wn,1,0,"div",6),l(),o(9,"div",7),D(10,"ng-multiselect-dropdown",8),f(11,Qn,3,3,"div",6),l(),o(12,"div",9)(13,"button",10),c(14),d(15,"translate"),l()()()()()(),f(16,Yn,3,3,"alert",11),d(17,"async"),f(18,Jn,3,3,"alert",12),f(19,Zn,44,38,"mat-card",13),d(20,"async"),f(21,er,3,3,"div",14),d(22,"async"),l()),n&2&&(u("@animate",P(26,zn,W(25,Gn))),r(3),u("formGroup",s.rSearchField),r(3),u("placeholder",T(p(7,15,"synchronisation_dgt_liste.code_dpd"))),r(2),b(s.rSearchField.get("codeDpd").hasError("notReferenceDPD")?8:-1),r(2),u("placeholder",s.getTranslation("synchronisation_dgt_liste.statuts_dpd"))("data",s.itemsStatutsDpd)("settings",s.getTranslationDropdownSettings()),r(),b(s.rSearchField.get("statutsDpd").hasError("required")?11:-1),r(2),u("disabled",s.rSearchField.invalid),r(),x(" ",p(15,17,"global.Rechercher")," "),r(2),b(!s.isLoading&&p(17,19,s.entrepriseEtrangereDpdsListeService.data$).length==0&&!s.erreurMessage?16:-1),r(2),b(s.erreurMessage?18:-1),r(),b(p(20,21,s.entrepriseEtrangereDpdsListeService.data$).length>0?19:-1),r(2),b(p(22,23,s.entrepriseEtrangereDpdsListeService.data$).length>0?21:-1))},dependencies:[q,ee,z,K,Z,De,re,te,ie,ae,ti,st,j,$,V,N,Ke,J,Ie,X,O],styles:[` 34 35.information-dpd[_ngcontent-%COMP%] { 36 border: 1px solid rgb(46, 153, 214); 37} 38.annulation-dpd[_ngcontent-%COMP%] { 39 border: 1px solid rgb(255, 195, 0); 40} 41.recapitulatif-dpd[_ngcontent-%COMP%] { 42 border: 1px solid rgb(102, 187, 106); 43}`],data:{animation:me}});let i=a;return i})();function tr(i,a){if(i&1&&(o(0,"span",1)(1,"b",10),c(2),l()()),i&2){let t=g();r(2),m(t.entrepriseEtrangere.raisonSociale)}}function ir(i,a){if(i&1&&(o(0,"span",2),c(1),l()),i&2){let t=g();r(),x(" ",t.entrepriseEtrangere.immatriculation)}}function nr(i,a){i&1&&(D(0,"em",11),o(1,"span",12),c(2),d(3,"translate"),l()),i&2&&(r(2),m(p(3,1,"global.details")))}function rr(i,a){i&1&&(D(0,"em",14),o(1,"span",15),c(2,"DPDs"),l(
43))}function ar(i,a){if(i&1&&(o(0,"tab"),L(1,rr,3,0,"ng-template",8),o(2,"div",9),D(3,"entreprise-etrangere-dpds",13),l()()),i&2){let t=g();r(3),u("entrepriseEtrangere",t.entrepriseEtrangere)}}var ri=(()=>{let a=class a{constructor(e,n){this.route=e,this.entreprisesEtrangeresService=n,this.entrepriseEtrangere=null}ngOnInit(){this.entreprisesEtrangeresService.setEntrepriseEtrangereActifObs(null),this.route.params.subscribe(e=>{e&&e.entrepriseEtrangereId&&this.loadFiche(e.entrepriseEtrangereId)}),this._entrepriseEtrangereActifSubscription=this.entreprisesEtrangeresService.getEntrepriseEtrangereActifObs().subscribe(e=>{this.entrepriseEtrangere=e})}ngOnDestroy(){this._entrepriseEtrangereActifSubscription&&this._entrepriseEtrangereActifSubscription.unsubscribe()}loadFiche(e){this.entreprisesEtrangeresService.get(e).subscribe(n=>{this.entrepriseEtrangere=n,this.entreprisesEtrangeresService.setEntrepriseEtrangereActifObs(this.entrepriseEtrangere)},n=>{console.log(n)})}};a.\u0275fac=function(n){return new(n||a)(_(Ge),_(Ze))},a.\u0275cmp=w({type:a,selectors:[["entreprise-etrangere-fiche"]],decls:18,vars:10,consts:[[1,"content-heading"],["data-cat","entreprise-etrangere-fiche.entrepriseetrangere-raisonsociale.span",1,"text-sm"],["data-cat","entreprise-etrangere-fiche.entrepriseetrangere-immatriculation.span",1,"text-sm","d-none","d-sm-block"],["data-cat","fil_ariane",1,"breadcrumb","ml-auto"],["data-cat","entreprise-etrangere-fiche.navigation-tableau-de-bord.li",1,"breadcrumb-item"],["routerLink","/tableau-de-bord","data-cat","entreprise-etrangere-fiche.tableau-de-bord.a"],["data-cat","entreprise-etrangere-fiche.global-fiche.li",1,"breadcrumb-item","active"],[1,"ie-fix-flex",3,"justified"],["tabHeading",""],[1,"card","card-sans-fond","mt-16"],["data-cat","entreprise-etrangere-fiche.entrepriseetrangere-raisonsociale.b"],[1,"fa","fa-asterisk","mr-1"],["data-cat","entrepriseEtrangere.fiche.details",1,"hidden-xs"],[3,"entrepriseEtrangere"],[1,"fas","fa-people-carry","mr-1"],["data-cat","entrepriseEtrangere.fiche.dpds",1,"hidden-xs"]],template:function(n,s){n&1&&(o(0,"div",0)(1,"div"),f(2,tr,3,1,"span",1),f(3,ir,2,1,"span",2),l(),o(4,"ol",3)(5,"li",4)(6,"a",5),c(7),d(8,"translate"),l()(),o(9,"li",6),c(10),d(11,"translate"),l()()(),o(12,"tabset",7)(13,"tab"),L(14,nr,4,3,"ng-template",8),o(15,"div",9),D(16,"entreprise-etrangere-identite"),l()(),f(17,ar,4,1,"tab"),l()),n&2&&(r(2),b(s.entrepriseEtrangere?2:-1),r(),b(s.entrepriseEtrangere?3:-1),r(4),m(p(8,6,"navigation.tableau-de-bord")),r(3),m(p(11,8,"global.Fiche")),r(2),u("justified",!1),r(5),b(s.entrepriseEtrangere?17:-1))},dependencies:[ye,Jt,at,rt,Yt,Zt,ni,O],encapsulation:2});let i=a;return i})();var Mo=[{path:"",children:[{path:"",canActivate:[it],component:nt,data:{title:"Synchronisation DGT Liste",roles:[I.Administrateur,I.AdministrateurAdjoint,I.Utilisateur,I.UtilisateurLimite,I.UtilisateurLectureSeule]}},{path:"synchronisation-dgt-import",canActivate:[We],canDeactivate:[i=>i.canDeactivate()],component:Qt,data:{title:"Synchronisation DGT Import",roles:[I.Administrateur,I.AdministrateurAdjoint,I.Utilisateur,I.UtilisateurLimite]}},{path:"entreprises-etrangeres",canActivate:[We],component:Ht,data:{title:"Entreprise Etrang\xE8re Liste",roles:[I.Administrateur,I.AdministrateurAdjoint,I.Utilisateur,I.UtilisateurLimite]}},{path:":numeroEnvoi",canActivate:[it],component:nt,data:{title:"Synchronisation DGT Liste",roles:[I.Administrateur,I.AdministrateurAdjoint,I.Utilisateur,I.UtilisateurLimite,I.UtilisateurLectureSeule]}},{path:"entreprises-etrangeres/fiche/:entrepriseEtrangereId",canActivate:[We],component:ri,data:{title:"Entreprise Etrang\xE8re Liste",roles:[I.Administrateur,I.AdministrateurAdjoint,I.Utilisateur,I.UtilisateurLimite]}}]}];export{Mo as SYNCHRONISATION_DGT_ROUTES};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.