mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
1 line
14 KiB
JavaScript
1 line
14 KiB
JavaScript
(self.webpackChunkgabinete_digital=self.webpackChunkgabinete_digital||[]).push([[8743],{98743:function(e,t,n){"use strict";n.r(t),n.d(t,{EventDetailModalPageModule:function(){return N}});var o=n(38583),i=n(3679),a=n(35957),s=n(39895),d=n(64762),l=n(18119),c=n(52724),r=n(94594),g=n(55199),Z=n(37716),u=n(80106),m=n(25970),v=n(20985);function p(e,t){if(1&e&&(Z.TgZ(0,"div"),Z.TgZ(1,"ion-list"),Z.TgZ(2,"ion-item",25),Z._UZ(3,"ion-icon",26),Z.TgZ(4,"ion-label",27),Z._uU(5),Z.qZA(),Z.qZA(),Z.qZA(),Z.qZA()),2&e){const e=Z.oxw().$implicit;Z.xp6(5),Z.Oqu(e.Name)}}function h(e,t){if(1&e&&(Z.TgZ(0,"div"),Z.YNc(1,p,6,1,"div",6),Z.qZA()),2&e){const e=t.index;Z.xp6(1),Z.Q6J("ngIf",e<1)}}function A(e,t){if(1&e){const e=Z.EpF();Z.TgZ(0,"div"),Z.TgZ(1,"ion-button",28),Z.NdJ("click",function(){return Z.CHM(e),Z.oxw(3).openAttendees()}),Z.TgZ(2,"ion-label",22),Z._uU(3,"Ver mais..."),Z.qZA(),Z.qZA(),Z.qZA()}}function f(e,t){if(1&e&&(Z.TgZ(0,"div"),Z.YNc(1,h,2,1,"div",24),Z.YNc(2,A,4,0,"div",6),Z.qZA()),2&e){const e=Z.oxw(2);Z.xp6(1),Z.Q6J("ngForOf",e.loadedEvent.Attendees),Z.xp6(1),Z.Q6J("ngIf",e.loadedEvent.Attendees.length>1)}}function T(e,t){1&e&&Z._UZ(0,"ion-progress-bar",32)}function q(e,t){if(1&e){const e=Z.EpF();Z.TgZ(0,"ion-list"),Z.YNc(1,T,1,0,"ion-progress-bar",29),Z.TgZ(2,"ion-item",30),Z.NdJ("click",function(){Z.CHM(e);const t=Z.oxw(2).$implicit;return Z.oxw(3).viewDocument(t.Link)}),Z._UZ(3,"ion-icon",31),Z.TgZ(4,"ion-label"),Z.TgZ(5,"p"),Z._uU(6),Z.qZA(),Z.TgZ(7,"p"),Z._uU(8),Z.qZA(),Z.qZA(),Z.qZA(),Z.qZA()}if(2&e){const e=Z.oxw(2).$implicit,t=Z.oxw(3);Z.xp6(1),Z.Q6J("ngIf",t.showLoader),Z.xp6(5),Z.Oqu(e.Description),Z.xp6(2),Z.Oqu(e.CreateDate)}}function x(e,t){if(1&e&&(Z.TgZ(0,"div"),Z.YNc(1,q,9,3,"ion-list",6),Z.qZA()),2&e){const e=Z.oxw(4);Z.xp6(1),Z.Q6J("ngIf",e.loadedEvent.HasAttachments)}}function b(e,t){if(1&e&&(Z.TgZ(0,"div"),Z.YNc(1,x,2,1,"div",6),Z.qZA()),2&e){const e=t.index;Z.xp6(1),Z.Q6J("ngIf",e<2)}}function C(e,t){if(1&e){const e=Z.EpF();Z.TgZ(0,"div"),Z.TgZ(1,"ion-button",28),Z.NdJ("click",function(){return Z.CHM(e),Z.oxw(3).openAttachments()}),Z.TgZ(2,"ion-label",22),Z._uU(3,"Ver mais..."),Z.qZA(),Z.qZA(),Z.qZA()}}function _(e,t){if(1&e&&(Z.TgZ(0,"div"),Z.YNc(1,b,2,1,"div",24),Z.YNc(2,C,4,0,"div",6),Z.qZA()),2&e){const e=Z.oxw(2);Z.xp6(1),Z.Q6J("ngForOf",e.loadedEventAttachments),Z.xp6(1),Z.Q6J("ngIf",e.loadedEventAttachments.length>1)}}function M(e,t){1&e&&(Z.TgZ(0,"ion-list"),Z.TgZ(1,"ion-item",33),Z._UZ(2,"ion-icon",31),Z.TgZ(3,"ion-label"),Z.TgZ(4,"p"),Z._UZ(5,"ion-skeleton-text",34),Z.qZA(),Z.TgZ(6,"p"),Z._UZ(7,"ion-skeleton-text",34),Z.qZA(),Z.qZA(),Z.qZA(),Z.qZA())}function E(e,t){1&e&&(Z.TgZ(0,"ion-list"),Z.TgZ(1,"ion-item",33),Z.TgZ(2,"ion-label"),Z._uU(3," Sem anexos "),Z.qZA(),Z.qZA(),Z.qZA())}function w(e,t){if(1&e){const e=Z.EpF();Z.TgZ(0,"div"),Z.TgZ(1,"ion-item-group"),Z.TgZ(2,"ion-item-sliding"),Z.TgZ(3,"ion-item"),Z.TgZ(4,"ion-label",9),Z._uU(5,"Descri\xe7\xe3o"),Z.qZA(),Z.TgZ(6,"ion-input",10),Z.NdJ("ngModelChange",function(t){return Z.CHM(e),Z.oxw().loadedEvent.Body.Text=t}),Z.qZA(),Z.qZA(),Z.TgZ(7,"ion-item"),Z.TgZ(8,"ion-label",9),Z._uU(9,"Localiza\xe7\xe3o"),Z.qZA(),Z.TgZ(10,"ion-input",10),Z.NdJ("ngModelChange",function(t){return Z.CHM(e),Z.oxw().loadedEvent.Location=t}),Z.qZA(),Z.qZA(),Z.TgZ(11,"ion-item"),Z.TgZ(12,"ion-label",9),Z._uU(13,"Calend\xe1rio"),Z.qZA(),Z.TgZ(14,"ion-select",11),Z.NdJ("ngModelChange",function(t){return Z.CHM(e),Z.oxw().loadedEvent.CalendarName=t}),Z.TgZ(15,"ion-select-option",12),Z._uU(16,"Pessoal"),Z.qZA(),Z.TgZ(17,"ion-select-option",13),Z._uU(18,"Oficial"),Z.qZA(),Z.qZA(),Z.qZA(),Z.TgZ(19,"ion-item"),Z.TgZ(20,"ion-label",9),Z._uU(21,"Tipo do evento"),Z.qZA(),Z.TgZ(22,"ion-select",11),Z.NdJ("ngModelChange",function(t){return Z.CHM(e),Z.oxw().loadedEvent.EventType=t}),Z.TgZ(23,"ion-select-option",14),Z._uU(24,"Reuni\xe3o"),Z.qZA(),Z.TgZ(25,"ion-select-option",15),Z._uU(26,"Viagem"),Z.qZA(),Z.TgZ(27,"ion-select-option",16),Z._uU(28,"Confer\xeancia"),Z.qZA(),Z.TgZ(29,"ion-select-option",17),Z._uU(30,"Encontro"),Z.qZA(),Z.qZA(),Z.qZA(),Z.TgZ(31,"ion-item"),Z.TgZ(32,"ion-label",9),Z._uU(33,"Data In\xedcio"),Z.qZA(),Z.TgZ(34,"ion-datetime",18),Z.NdJ("ngModelChange",function(t){return Z.CHM(e),Z.oxw().loadedEvent.StartDate=t}),Z.qZA(),Z.qZA(),Z.TgZ(35,"ion-item"),Z.TgZ(36,"ion-label",9),Z._uU(37,"Data Fim"),Z.qZA(),Z.TgZ(38,"ion-datetime",19),Z.NdJ("ngModelChange",function(t){return Z.CHM(e),Z.oxw().loadedEvent.EndDate=t}),Z.qZA(),Z.qZA(),Z.TgZ(39,"div",20),Z.TgZ(40,"ion-item"),Z.TgZ(41,"ion-buttons",21),Z.NdJ("click",function(){return Z.CHM(e),Z.oxw().openAttendees()}),Z.TgZ(42,"ion-label",22),Z._uU(43,"Editar"),Z.qZA(),Z.qZA(),Z.TgZ(44,"ion-label",23),Z._uU(45,"Participantes"),Z.qZA(),Z.qZA(),Z.YNc(46,f,3,2,"div",6),Z.qZA(),Z.TgZ(47,"div",20),Z.TgZ(48,"ion-item"),Z.TgZ(49,"ion-buttons",21),Z.NdJ("click",function(){return Z.CHM(e),Z.oxw().showAlert()}),Z.TgZ(50,"ion-label",22),Z._uU(51,"Editar"),Z.qZA(),Z.qZA(),Z.TgZ(52,"ion-label",23),Z._uU(53,"Anexos"),Z.qZA(),Z.qZA(),Z.YNc(54,_,3,2,"div",6),Z.YNc(55,M,8,0,"ion-list",6),Z.YNc(56,E,4,0,"ion-list",6),Z.qZA(),Z.qZA(),Z.qZA(),Z.qZA()}if(2&e){const e=Z.oxw();Z.xp6(6),Z.Q6J("ngModel",e.loadedEvent.Body.Text),Z.xp6(4),Z.Q6J("ngModel",e.loadedEvent.Location),Z.xp6(4),Z.s9C("placeholder",e.loadedEvent.CalendarName),Z.Q6J("ngModel",e.loadedEvent.CalendarName),Z.xp6(8),Z.s9C("placeholder",e.loadedEvent.EventType),Z.Q6J("ngModel",e.loadedEvent.EventType),Z.xp6(12),Z.s9C("value",e.loadedEvent.StartDate),Z.Q6J("ngModel",e.loadedEvent.StartDate),Z.xp6(4),Z.s9C("value",e.loadedEvent.EndDate),Z.Q6J("ngModel",e.loadedEvent.EndDate),Z.xp6(8),Z.Q6J("ngIf",e.loadedEvent.Attendees),Z.xp6(8),Z.Q6J("ngIf",e.loadedEventAttachments),Z.xp6(1),Z.Q6J("ngIf",!e.loadedEventAttachments),Z.xp6(1),Z.Q6J("ngIf",!e.loadedEvent.HasAttachments)}}function U(e,t){1&e&&(Z.TgZ(0,"div"),Z.TgZ(1,"div",35),Z._UZ(2,"ion-skeleton-text",36),Z._UZ(3,"ion-skeleton-text",34),Z._UZ(4,"ion-skeleton-text",37),Z._UZ(5,"ion-skeleton-text",38),Z._UZ(6,"ion-skeleton-text",36),Z.qZA(),Z.TgZ(7,"ion-list"),Z.TgZ(8,"ion-list-header"),Z.TgZ(9,"ion-label"),Z._UZ(10,"ion-skeleton-text",39),Z.qZA(),Z.qZA(),Z.TgZ(11,"ion-item"),Z.TgZ(12,"ion-avatar",0),Z._UZ(13,"ion-skeleton-text",34),Z.qZA(),Z.TgZ(14,"ion-label"),Z.TgZ(15,"h3"),Z._UZ(16,"ion-skeleton-text",40),Z.qZA(),Z.TgZ(17,"p"),Z._UZ(18,"ion-skeleton-text",41),Z.qZA(),Z.TgZ(19,"p"),Z._UZ(20,"ion-skeleton-text",36),Z.qZA(),Z.qZA(),Z.qZA(),Z.TgZ(21,"ion-item"),Z.TgZ(22,"ion-thumbnail",0),Z._UZ(23,"ion-skeleton-text",34),Z.qZA(),Z.TgZ(24,"ion-label"),Z.TgZ(25,"h3"),Z._UZ(26,"ion-skeleton-text",40),Z.qZA(),Z.TgZ(27,"p"),Z._UZ(28,"ion-skeleton-text",41),Z.qZA(),Z.TgZ(29,"p"),Z._UZ(30,"ion-skeleton-text",36),Z.qZA(),Z.qZA(),Z.qZA(),Z.TgZ(31,"ion-item"),Z._UZ(32,"ion-skeleton-text",42),Z.TgZ(33,"ion-label"),Z.TgZ(34,"h3"),Z._UZ(35,"ion-skeleton-text",40),Z.qZA(),Z.TgZ(36,"p"),Z._UZ(37,"ion-skeleton-text",41),Z.qZA(),Z.TgZ(38,"p"),Z._UZ(39,"ion-skeleton-text",36),Z.qZA(),Z.qZA(),Z.qZA(),Z.qZA(),Z.qZA())}const k=[{path:"",component:(()=>{class e{constructor(e,t,n,o,i,a,s,d,r){this.formBuilder=e,this.alertController=t,this.router=n,this.activatedRoute=o,this.eventsService=i,this.modalCtrl=a,this.alertService=s,this.attachamentsService=d,this.route=r,this.isSubmitted=!1,this.loadedEvent=new l.j,this.loadedEvent.Body=new c.n}ngOnInit(){this.loadEvent(),this.loadAttachments(),this.ionicForm=this.formBuilder.group({subject:["",[i.kI.required]]})}get errorControl(){return this.ionicForm.controls}loadEvent(){let e;this.activatedRoute.paramMap.subscribe(t=>{t.has("eventId")&&(this.pageId=t.get("eventId"),e=t.get("eventId"),console.log(e),t.has("caller")&&(this.backURL="/home/"+t.get("caller")))}),this.eventsService.getEvent(e).subscribe(e=>{this.loadedEvent=e})}openAttendees(){return(0,d.mG)(this,void 0,void 0,function*(){const e=yield this.modalCtrl.create({component:g.V,componentProps:{eventAttendees:this.loadedEvent.Attendees},cssClass:"attendee",backdropDismiss:!1});yield e.present(),e.onDidDismiss().then(e=>{null!=e.data&&(this.loadedEvent.Attendees=e.data)})})}getEventAttendees(){return this.loadedEvent.Attendees}setEventAttendees(e){this.loadedEvent.Attendees=e}deleteConfirm(){return(0,d.mG)(this,void 0,void 0,function*(){const e=yield this.alertController.create({cssClass:"my-custom-class",header:"Apagar evento!",message:"Deseja <strong>apagar</strong> o evento da agenda "+this.loadedEvent.CalendarName+"?",buttons:[{text:"N\xe3o",role:"cancel",cssClass:"secondary",handler:()=>{}},{text:"Sim",handler:()=>{this.Delete()}}]});yield e.present()})}Delete(){this.eventsService.deleteEvent(this.loadedEvent.EventId,0).subscribe(()=>(0,d.mG)(this,void 0,void 0,function*(){const e=yield this.alertController.create({cssClass:"my-custom-class",header:"Evento removido",buttons:["OK"]});setTimeout(()=>{e.dismiss()},1500),this.router.navigate(["/home/events"])}))}Save(){this.ionicForm.valid&&this.eventsService.putEvent(this.loadedEvent,2,3,"md").subscribe(()=>(0,d.mG)(this,void 0,void 0,function*(){const e=yield this.alertController.create({cssClass:"my-custom-class",header:"Evento actualizado",buttons:["OK"]});setTimeout(()=>{e.dismiss()},1500)}))}showAlert(){this.alertService.presentAlert("Funcionalidade em desenvolvimento")}loadAttachments(){this.attachamentsService.getAttachmentsById(this.pageId).subscribe(e=>{console.log(e)},e=>{console.log(e)})}viewDocument(e){return(0,d.mG)(this,void 0,void 0,function*(){e.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1")})}back(){}doRefresh(e){e.target.complete(),setTimeout(()=>{e.target.complete()},2e3)}navigateTo(e){this.route.navigate(["/home/events",e])}openAttachments(){return(0,d.mG)(this,void 0,void 0,function*(){const e=yield this.modalCtrl.create({component:r.j,componentProps:{eventId:this.pageId,attachments:this.loadedEventAttachments},cssClass:"attachments",backdropDismiss:!1});yield e.present(),e.onDidDismiss().then(e=>{null!=e.data&&(this.loadedEvent.Attendees=e.data)})})}}return e.\u0275fac=function(t){return new(t||e)(Z.Y36(i.qu),Z.Y36(a.Br),Z.Y36(s.F0),Z.Y36(s.gz),Z.Y36(u.n),Z.Y36(a.IN),Z.Y36(m.c),Z.Y36(v.o),Z.Y36(s.F0))},e.\u0275cmp=Z.Xpm({type:e,selectors:[["app-event-detail-modal"]],decls:17,vars:3,consts:[["slot","start"],[3,"defaultHref"],["slot","end"],[1,"ion-icon-delete",3,"click"],["name","trash"],["padding",""],[4,"ngIf"],[1,"event-detail-buttons"],["shape","round",3,"click"],["position","stacked"],[1,"capitalizeText",3,"ngModel","ngModelChange"],["interface","action-sheet","Cancel-text","Cancelar",1,"custom-options",3,"placeholder","ngModel","ngModelChange"],["Pessoal","Reuni\xe3o"],["Oficial","Viagem"],["value","Reuni\xe3o"],["value","Viagem"],["value","Confer\xeancia"],["value","Encontro"],["min","2020","max","2100","displayFormat","D MMM YYYY H:mm","minuteValues","0,15,30,45","monthShortNames","Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez",3,"value","ngModel","ngModelChange"],["min","2020","max","2100","displayFormat","D MMM YYYY HH:mm","minuteValues","0,15,30,45","monthShortNames","Jan, Fev, Mar, Abr, Mai, Jun, Jul, Aug, Sep, Out, Nov, Dez",3,"value","ngModel","ngModelChange"],[1,"div-attach"],["slot","end",3,"click"],["color","secondary"],[1,"attach-label"],[4,"ngFor","ngForOf"],["lines","none",1,"attendees"],["name","person","slot","start",1,"attendees-icon"],[1,"attendees-list"],["fill","none","shape","round",1,"see-more-button",3,"click"],["type","indeterminate",4,"ngIf"],["lines","none",3,"click"],["name","attach","slot","start"],["type","indeterminate"],["lines","none"],["animated",""],[1,"ion-padding","custom-skeleton"],["animated","",2,"width","60%"],["animated","",2,"width","88%"],["animated","",2,"width","70%"],["animated","",2,"width","20%"],["animated","",2,"width","50%"],["animated","",2,"width","80%"],["animated","","slot","start",2,"width","27px","height","27px"]],template:function(e,t){1&e&&(Z.TgZ(0,"ion-header"),Z.TgZ(1,"ion-toolbar"),Z.TgZ(2,"ion-buttons",0),Z._UZ(3,"ion-back-button",1),Z.qZA(),Z.TgZ(4,"ion-title"),Z._uU(5,"Visualizar Evento"),Z.qZA(),Z.TgZ(6,"ion-buttons",2),Z.TgZ(7,"button",3),Z.NdJ("click",function(){return t.deleteConfirm()}),Z._UZ(8,"ion-icon",4),Z.qZA(),Z.qZA(),Z.qZA(),Z.qZA(),Z.TgZ(9,"ion-content",5),Z.YNc(10,w,57,14,"div",6),Z.YNc(11,U,40,0,"div",6),Z.qZA(),Z.TgZ(12,"ion-footer"),Z.TgZ(13,"ion-toolbar"),Z.TgZ(14,"div",7),Z.TgZ(15,"ion-button",8),Z.NdJ("click",function(){return t.Save()}),Z._uU(16,"Gravar"),Z.qZA(),Z.qZA(),Z.qZA(),Z.qZA()),2&e&&(Z.xp6(3),Z.s9C("defaultHref",t.backURL),Z.xp6(7),Z.Q6J("ngIf",t.loadedEvent),Z.xp6(1),Z.Q6J("ngIf",!t.loadedEvent))},directives:[a.Gu,a.sr,a.Sm,a.oU,a.cs,a.wd,a.gu,a.W2,o.O5,a.fr,a.YG,a.Ub,a.td,a.Ie,a.Q$,a.pK,a.j9,i.JJ,i.On,a.t9,a.QI,a.n0,a.x4,o.sg,a.q_,a.X7,a.CK,a.yh,a.BJ,a.Bs],styles:["ion-item-group[_ngcontent-%COMP%]{margin:15px}.div-item[_ngcontent-%COMP%]{border-bottom:1px solid #ccc;margin:10px 0 5px}.div-item[_ngcontent-%COMP%], .div-up[_ngcontent-%COMP%]{width:100%;overflow:auto}.div-up[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;padding:0;font-size:17px;width:100%}.div-icon[_ngcontent-%COMP%]{width:10%;font-size:22px;float:left;color:grey}.div-icon[_ngcontent-%COMP%] ion-icon[_ngcontent-%COMP%]{display:block;margin:0 auto}.div-content-attachment[_ngcontent-%COMP%]{width:85%;float:left;padding:0 0 0 12px}.ion-icon-attach[_ngcontent-%COMP%]{color:#666;font-size:20px}.btn-attach[_ngcontent-%COMP%]{margin:15px 0 0;--color:#333;--border-color:#333}.div-card-button[_ngcontent-%COMP%]{width:100%;overflow:auto;padding:0!important}ion-card[_ngcontent-%COMP%]{margin:2.5%!important;width:45%;float:left}.center[_ngcontent-%COMP%]{text-align:center;float:center}.event-detail-buttons[_ngcontent-%COMP%]{width:90%;margin:10px auto}.event-detail-buttons[_ngcontent-%COMP%] ion-button[_ngcontent-%COMP%]{width:90%;display:block;margin:0 auto 25px}.ion-icon-delete[_ngcontent-%COMP%]{font-size:22px;color:red;background-color:#fff;padding-right:5px}.error[_ngcontent-%COMP%]{color:red;font-size:12px;font-weight:700;padding-bottom:20px}.attendees-icon[_ngcontent-%COMP%]{font-size:14px}.see-more-button[_ngcontent-%COMP%]{text-transform:none;font-size:16px}"]}),e})()}];let J=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=Z.oAB({type:e}),e.\u0275inj=Z.cJS({imports:[[s.Bz.forChild(k)],s.Bz]}),e})(),N=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=Z.oAB({type:e}),e.\u0275inj=Z.cJS({imports:[[o.ez,i.u5,a.Pc,J]]}),e})()}}]); |