Files
kapp/5256.e3cf35699d538a3b.js
T
2026-05-21 11:19:10 -03:00

1 line
13 KiB
JavaScript

(self.webpackChunkapp=self.webpackChunkapp||[]).push([[5256],{5256:(T,p,n)=>{n.r(p),n.d(p,{CreateEventEventHostsPageModule:()=>H});var g=n(90944),C=n(24006),f=n(61380),c=n(90603),S=n(69270),h=n(15861),d=n(24889),e=n(45449),r=n(47898),E=n(21284),P=n(37763),M=n(87871),x=n(36290),I=n(99826);function A(o,v){if(1&o&&(e.\u0275\u0275elementContainerStart(0),e.\u0275\u0275elementStart(1,"div",19),e.\u0275\u0275text(2),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementContainerEnd()),2&o){const t=e.\u0275\u0275nextContext().$implicit;e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(t.department)}}function b(o,v){if(1&o){const t=e.\u0275\u0275getCurrentView();e.\u0275\u0275elementStart(0,"div",14),e.\u0275\u0275listener("click",function(){const m=e.\u0275\u0275restoreView(t).$implicit,_=e.\u0275\u0275nextContext(2);return e.\u0275\u0275resetView(_.toggleActions(m))}),e.\u0275\u0275element(1,"app-avatar",15),e.\u0275\u0275elementStart(2,"div",16)(3,"div",17),e.\u0275\u0275text(4),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(5,A,3,1,"ng-container",18),e.\u0275\u0275elementEnd()()}if(2&o){const t=v.$implicit,l=e.\u0275\u0275nextContext(2);let s;e.\u0275\u0275advance(1),e.\u0275\u0275property("firstName",t.firstName)("lastName",t.lastName)("thumbnailImage",null!==(s=null!==(s=null==t||null==t.photos||null==t.photos[0]?null:t.photos[0].faceImageThumbnail)&&void 0!==s?s:null==t?null:t.thumbnailImage)&&void 0!==s?s:null)("size","md"),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate1(" ",l.helperService.normalizeName(t.firstName,t.lastName)," "),e.\u0275\u0275advance(1),e.\u0275\u0275property("ngIf",t.department)}}function R(o,v){if(1&o&&(e.\u0275\u0275elementStart(0,"div",10)(1,"div",11),e.\u0275\u0275text(2),e.\u0275\u0275pipe(3,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(4,"div",12),e.\u0275\u0275text(5),e.\u0275\u0275pipe(6,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275template(7,b,6,6,"div",13),e.\u0275\u0275elementEnd()),2&o){const t=e.\u0275\u0275nextContext();e.\u0275\u0275advance(2),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(3,3,"PG_CREATE_HOSTS_STEP_TEXT_HOSTS")),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(6,5,"PG_CREATE_HOSTS_STEP_TEXT_TAP_ITEM_EDIT")),e.\u0275\u0275advance(2),e.\u0275\u0275property("ngForOf",t.selectedUsers)}}const y=[{path:"",component:(()=>{class o{constructor(t,l,s,m,_,N,U,z,B,k,j,D){var u=this;this.createEventService=t,this.navigationService=l,this.modalController=s,this.helperService=m,this.actionSheetController=_,this.apiService=N,this.pendingRelease=U,this.notificatorService=z,this.translateConfigService=B,this.stateService=k,this.focusService=j,this.userPhotoService=D,this.existPendings=!1,this.navigateToQRCode=()=>{this.navigationService.root(["/home"])},this.navigateToPendingLiberations=()=>{this.navigationService.forward(["/push-notifications"])},this.addUserToSelectedUsers=i=>{this.verifyForRepetition(i)||this.selectedUsers.push(i)},this.removeUserFromSelectedUsers=i=>{this.selectedUsers=this.selectedUsers.filter(a=>a.id!==i.id)},this.verifyForRepetition=i=>this.selectedUsers.find(a=>a.id===i.id),this.openAddUserModal=(0,h.Z)(function*(){const i=yield u.modalController.create({component:d.OO});i.onDidDismiss().then(u.onModalDismissCallback),yield i.present()}),this.onModalDismissCallback=i=>{i&&i.data&&this.addUserToSelectedUsers(i.data)},this.goOneStepBack=()=>{this.createEventService.setHosts(this.selectedUsers),this.canBeEdited()?this.navigationService.back(["/create-event-event-bookei"]):this.navigationService.forward(["/events"])},this.goToNextStep=()=>{if(this.selectedUsers.length)this.createEventService.setHosts(this.selectedUsers),"approve-event-review"!==this.createEventService.getAction()||this.approveEventReview?this.goToAddGuestsStep():this.goToEventResumeStep();else{const a={title:this.translateConfigService.translate("PG_CREATE_HOSTS_TOAST_ERROR_TITLE"),message:this.translateConfigService.translate("PG_CREATE_HOSTS_TOAST_MESSAGE_ERROR"),type:"error"};this.notificatorService.notify(a)}},this.goToAddGuestsStep=()=>{this.navigationService.forward(["/create-event-event-guests"])},this.goToEventResumeStep=()=>{this.createEventService.getIsNew();const a={id:this.createEventService.getId(),title:this.createEventService.getTitle(),startAt:this.createEventService.getStartDate(),endAt:this.createEventService.getEndDate(),floor:this.createEventService.getSelectedFloor(),group:this.createEventService.getSelectedGroup(),hosts:this.createEventService.getHosts(),guests:this.createEventService.getGuests(),multiCheckin:this.createEventService.getMultiCheckIn(),allowCompanion:this.createEventService.getCompanionAllowed(),needAuthorization:this.createEventService.getNeedAuthorization(),checkinStartAt:this.createEventService.getCheckInStartAt(),bookeis:this.createEventService.getBookings(),bookeisToCancel:this.existIdEvent?this.createEventService.getBookeisToCancel():[]},O={state:{event:a,isLimitedProfile:!1}};console.log("router HOSTS",a),this.navigationService.forward(["/create-event-event-resume"],O)},this.canBeEdited=()=>!this.createEventService.getGuests().find(i=>"WAITING_FOR_CHECKIN"!==i.status&&"WAITING_FOR_EVENT_APPROVE"!==i.status),this.toggleActions=function(){var i=(0,h.Z)(function*(a){yield(yield u.actionSheetController.create({header:u.translateConfigService.translate("ACTION_SHEET_HEADER"),cssClass:"",buttons:[{text:u.translateConfigService.translate("ACTION_SHEET_BTN_REMOVE"),role:"destructive",icon:"trash",handler:()=>{u.removeUserFromSelectedUsers(a)}},{text:u.translateConfigService.translate("ACTION_SHEET_BTN_BACK"),icon:"arrow-back",role:"cancel",handler:()=>{}}]})).present()});return function(a){return i.apply(this,arguments)}}(),this.existIdEvent=!this.createEventService.getIsNew(),this.approveEventReview=this.isApproveEventReview()}ngOnInit(){let t=this.createEventService.getHosts();t=t||[],this.selectedUsers=t,this.userPhotoService.enrichUsersWithPhotos(this.selectedUsers)}ionViewWillEnter(){this.focusService.applyFocusQuerySelector("create_event_hosts",3500)}ionViewDidEnter(){}ionViewDidLeave(){}isApproveEventReview(){return!!this.createEventService.getApproveEventReview()}}return o.\u0275fac=function(t){return new(t||o)(e.\u0275\u0275directiveInject(r.jc),e.\u0275\u0275directiveInject(r.f5),e.\u0275\u0275directiveInject(c.ModalController),e.\u0275\u0275directiveInject(r.W_),e.\u0275\u0275directiveInject(c.ActionSheetController),e.\u0275\u0275directiveInject(r.sM),e.\u0275\u0275directiveInject(r.xJ),e.\u0275\u0275directiveInject(r.V6),e.\u0275\u0275directiveInject(r.wK),e.\u0275\u0275directiveInject(E.b),e.\u0275\u0275directiveInject(P.i),e.\u0275\u0275directiveInject(r.IR))},o.\u0275cmp=e.\u0275\u0275defineComponent({type:o,selectors:[["app-create-event-event-hosts"]],decls:26,vars:19,consts:[["defaultHref","create-event-event-start-date-time",3,"title","showBadge","refresh","menuToggle"],[1,"centralized-content"],[1,"page-title"],["id","create_event_hosts","tabindex","1",1,"sub-title"],[1,"add-user"],[3,"click"],["class","results",4,"ngIf"],[1,"button-holder"],["type","button",1,"back",3,"click"],["type","submit",3,"click"],[1,"results"],[1,"title"],[1,"sub-title"],["class","result",3,"click",4,"ngFor","ngForOf"],[1,"result",3,"click"],[3,"firstName","lastName","thumbnailImage","size"],[1,"user-info"],[1,"full-name"],[4,"ngIf"],[1,"document"]],template:function(t,l){1&t&&(e.\u0275\u0275element(0,"app-header",0),e.\u0275\u0275pipe(1,"translate"),e.\u0275\u0275elementStart(2,"ion-content")(3,"div",1)(4,"div",2)(5,"div",3),e.\u0275\u0275text(6),e.\u0275\u0275pipe(7,"translate"),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(8,"ion-row")(9,"ion-col")(10,"div",4)(11,"button",5),e.\u0275\u0275listener("click",function(){return l.openAddUserModal()}),e.\u0275\u0275text(12),e.\u0275\u0275pipe(13,"translate"),e.\u0275\u0275elementEnd()()()(),e.\u0275\u0275elementStart(14,"ion-row")(15,"ion-col"),e.\u0275\u0275template(16,R,8,7,"div",6),e.\u0275\u0275elementEnd()(),e.\u0275\u0275elementStart(17,"ion-row")(18,"ion-col")(19,"div",7)(20,"button",8),e.\u0275\u0275listener("click",function(){return l.goOneStepBack()}),e.\u0275\u0275text(21),e.\u0275\u0275pipe(22,"translate"),e.\u0275\u0275elementEnd(),e.\u0275\u0275elementStart(23,"button",9),e.\u0275\u0275listener("click",function(){return l.goToNextStep()}),e.\u0275\u0275text(24),e.\u0275\u0275pipe(25,"translate"),e.\u0275\u0275elementEnd()()()()()()),2&t&&(e.\u0275\u0275property("title",e.\u0275\u0275pipeBind1(1,9,"PG_CREATE_HOSTS_STEP_HEADER_TITLE"))("showBadge",!0)("refresh",!1)("menuToggle",!1),e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(7,11,"PG_CREATE_HOSTS_STEP_TEXT_SUBTITLE")," "),e.\u0275\u0275advance(6),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(13,13,"PG_CREATE_HOSTS_STEP_BTN_ADD_HOST")," "),e.\u0275\u0275advance(4),e.\u0275\u0275property("ngIf",!!l.selectedUsers.length),e.\u0275\u0275advance(5),e.\u0275\u0275textInterpolate1(" ",e.\u0275\u0275pipeBind1(22,15,"BTN_BACK")," "),e.\u0275\u0275advance(3),e.\u0275\u0275textInterpolate(e.\u0275\u0275pipeBind1(25,17,"BTN_NEXT")))},dependencies:[g.NgForOf,g.NgIf,c.IonCol,c.IonContent,c.IonRow,M.A,x.G,I.X$],styles:["ion-content[_ngcontent-%COMP%]{--background: #f1f1f1}ion-toolbar[_ngcontent-%COMP%]{font-family:Nunito,sans-serif}ion-toolbar[_ngcontent-%COMP%] ion-img[_ngcontent-%COMP%]{height:25px;width:25px}ion-toolbar[_ngcontent-%COMP%] ion-title[_ngcontent-%COMP%]{letter-spacing:1px}ion-toolbar[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%] fa-icon[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center;height:24px;padding:0;width:24px;margin:0;font-size:19px;color:#656768}ion-toolbar[_ngcontent-%COMP%] ion-button.hover[_ngcontent-%COMP%]{background:#fff}.centralized-content[_ngcontent-%COMP%]{height:calc(100vh - 56px);display:flex;justify-content:flex-start;flex-direction:column}.centralized-content[_ngcontent-%COMP%] .page-title[_ngcontent-%COMP%]{margin-top:30px;margin-bottom:26px}.centralized-content[_ngcontent-%COMP%] .page-title[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:initial!important;font-weight:700;text-align:center}.centralized-content[_ngcontent-%COMP%] .page-title[_ngcontent-%COMP%] .sub-title[_ngcontent-%COMP%]{text-align:center;color:#656768;font-size:.9em;margin-top:4px}.centralized-content[_ngcontent-%COMP%] .input-holder[_ngcontent-%COMP%]{margin-top:8px;padding:0 18px}.centralized-content[_ngcontent-%COMP%] .add-user[_ngcontent-%COMP%]{display:flex;align-content:center;justify-content:center}.centralized-content[_ngcontent-%COMP%] .add-user[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding:.75em 1.5em;border-radius:50px;background-color:#0ec254;color:#fff;font-size:1em;transition:background-color .1s ease-out}.centralized-content[_ngcontent-%COMP%] .add-user[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:active{background-color:#fff;color:#0ec254;transition:background-color .1s ease-out}.centralized-content[_ngcontent-%COMP%] .add-user[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:focus{outline:none}.centralized-content[_ngcontent-%COMP%] .results[_ngcontent-%COMP%]{margin-top:1.5em;padding:0 18px}.centralized-content[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-size:initial!important;margin:0 0 6px;font-weight:700;text-align:center}.centralized-content[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .sub-title[_ngcontent-%COMP%]{margin:10px auto;font-size:.9em;background-color:#eee;padding:6px;border-radius:2px}.centralized-content[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .result[_ngcontent-%COMP%]{margin:0 0 4px;border:1px solid #eee;border-radius:4px;padding:4px 10px;background-color:#fff;display:flex;align-items:center;gap:10px}.centralized-content[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .result[_ngcontent-%COMP%] app-avatar[_ngcontent-%COMP%]{flex-shrink:0}.centralized-content[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .result[_ngcontent-%COMP%] .user-info[_ngcontent-%COMP%]{flex:1;min-width:0}.centralized-content[_ngcontent-%COMP%] .results[_ngcontent-%COMP%] .result[_ngcontent-%COMP%] .document[_ngcontent-%COMP%]{font-size:.8em;color:#aaa}.centralized-content[_ngcontent-%COMP%] .button-holder[_ngcontent-%COMP%]{padding:0 18px}.pulsate-fwd[_ngcontent-%COMP%]{animation:pulsate-fwd .5s ease-in-out infinite both;outline:none}@keyframes pulsate-fwd{0%{transform:scale(1)}50%{transform:scale(1.5)}to{transform:scale(1)}}"]}),o})()}];let H=(()=>{class o{}return o.\u0275fac=function(t){return new(t||o)},o.\u0275mod=e.\u0275\u0275defineNgModule({type:o}),o.\u0275inj=e.\u0275\u0275defineInjector({imports:[S.I,g.CommonModule,C.FormsModule,c.IonicModule,f.RouterModule.forChild(y)]}),o})()},37763:(T,p,n)=>{n.d(p,{i:()=>h});var g=n(61380),f=n(92198),c=n(45449);let h=(()=>{class d{constructor(r){this.router=r}focusInRouterNavigate(){this.router.events.pipe((0,f.h)(r=>r instanceof g.NavigationEnd)).subscribe(()=>{const r=document.querySelector("#focusHeader");r&&r?.focus()})}applyFocusQuerySelector(r,E){setTimeout(()=>{document.querySelector(`#${r}`)?.focus()},E)}}return d.\u0275fac=function(r){return new(r||d)(c.\u0275\u0275inject(g.Router))},d.\u0275prov=c.\u0275\u0275defineInjectable({token:d,factory:d.\u0275fac,providedIn:"root"}),d})()}}]);