Files
doneit-web/_platforms/browser/www/8743-es5.119cb7270b2da460c36c.js
T
tiago.kayaya 24e2a8f518 save
2021-08-18 18:58:02 +01:00

1 line
16 KiB
JavaScript

!function(){function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}(self.webpackChunkgabinete_digital=self.webpackChunkgabinete_digital||[]).push([[8743],{98743:function(n,o,i){"use strict";i.r(o),i.d(o,{EventDetailModalPageModule:function(){return I}});var a=i(38583),r=i(3679),s=i(35957),c=i(39895),l=i(64762),d=i(18119),u=i(52724),g=i(94594),Z=i(55199),v=i(37716),m=i(80106),p=i(25970),f=i(20985);function h(e,t){if(1&e&&(v.TgZ(0,"div"),v.TgZ(1,"ion-list"),v.TgZ(2,"ion-item",25),v._UZ(3,"ion-icon",26),v.TgZ(4,"ion-label",27),v._uU(5),v.qZA(),v.qZA(),v.qZA(),v.qZA()),2&e){var n=v.oxw().$implicit;v.xp6(5),v.Oqu(n.Name)}}function A(e,t){if(1&e&&(v.TgZ(0,"div"),v.YNc(1,h,6,1,"div",6),v.qZA()),2&e){var n=t.index;v.xp6(1),v.Q6J("ngIf",n<1)}}function T(e,t){if(1&e){var n=v.EpF();v.TgZ(0,"div"),v.TgZ(1,"ion-button",28),v.NdJ("click",function(){return v.CHM(n),v.oxw(3).openAttendees()}),v.TgZ(2,"ion-label",22),v._uU(3,"Ver mais..."),v.qZA(),v.qZA(),v.qZA()}}function x(e,t){if(1&e&&(v.TgZ(0,"div"),v.YNc(1,A,2,1,"div",24),v.YNc(2,T,4,0,"div",6),v.qZA()),2&e){var n=v.oxw(2);v.xp6(1),v.Q6J("ngForOf",n.loadedEvent.Attendees),v.xp6(1),v.Q6J("ngIf",n.loadedEvent.Attendees.length>1)}}function q(e,t){1&e&&v._UZ(0,"ion-progress-bar",32)}function b(e,t){if(1&e){var n=v.EpF();v.TgZ(0,"ion-list"),v.YNc(1,q,1,0,"ion-progress-bar",29),v.TgZ(2,"ion-item",30),v.NdJ("click",function(){v.CHM(n);var e=v.oxw(2).$implicit;return v.oxw(3).viewDocument(e.Link)}),v._UZ(3,"ion-icon",31),v.TgZ(4,"ion-label"),v.TgZ(5,"p"),v._uU(6),v.qZA(),v.TgZ(7,"p"),v._uU(8),v.qZA(),v.qZA(),v.qZA(),v.qZA()}if(2&e){var o=v.oxw(2).$implicit,i=v.oxw(3);v.xp6(1),v.Q6J("ngIf",i.showLoader),v.xp6(5),v.Oqu(o.Description),v.xp6(2),v.Oqu(o.CreateDate)}}function C(e,t){if(1&e&&(v.TgZ(0,"div"),v.YNc(1,b,9,3,"ion-list",6),v.qZA()),2&e){var n=v.oxw(4);v.xp6(1),v.Q6J("ngIf",n.loadedEvent.HasAttachments)}}function _(e,t){if(1&e&&(v.TgZ(0,"div"),v.YNc(1,C,2,1,"div",6),v.qZA()),2&e){var n=t.index;v.xp6(1),v.Q6J("ngIf",n<2)}}function k(e,t){if(1&e){var n=v.EpF();v.TgZ(0,"div"),v.TgZ(1,"ion-button",28),v.NdJ("click",function(){return v.CHM(n),v.oxw(3).openAttachments()}),v.TgZ(2,"ion-label",22),v._uU(3,"Ver mais..."),v.qZA(),v.qZA(),v.qZA()}}function w(e,t){if(1&e&&(v.TgZ(0,"div"),v.YNc(1,_,2,1,"div",24),v.YNc(2,k,4,0,"div",6),v.qZA()),2&e){var n=v.oxw(2);v.xp6(1),v.Q6J("ngForOf",n.loadedEventAttachments),v.xp6(1),v.Q6J("ngIf",n.loadedEventAttachments.length>1)}}function E(e,t){1&e&&(v.TgZ(0,"ion-list"),v.TgZ(1,"ion-item",33),v._UZ(2,"ion-icon",31),v.TgZ(3,"ion-label"),v.TgZ(4,"p"),v._UZ(5,"ion-skeleton-text",34),v.qZA(),v.TgZ(6,"p"),v._UZ(7,"ion-skeleton-text",34),v.qZA(),v.qZA(),v.qZA(),v.qZA())}function M(e,t){1&e&&(v.TgZ(0,"ion-list"),v.TgZ(1,"ion-item",33),v.TgZ(2,"ion-label"),v._uU(3," Sem anexos "),v.qZA(),v.qZA(),v.qZA())}function U(e,t){if(1&e){var n=v.EpF();v.TgZ(0,"div"),v.TgZ(1,"ion-item-group"),v.TgZ(2,"ion-item-sliding"),v.TgZ(3,"ion-item"),v.TgZ(4,"ion-label",9),v._uU(5,"Descri\xe7\xe3o"),v.qZA(),v.TgZ(6,"ion-input",10),v.NdJ("ngModelChange",function(e){return v.CHM(n),v.oxw().loadedEvent.Body.Text=e}),v.qZA(),v.qZA(),v.TgZ(7,"ion-item"),v.TgZ(8,"ion-label",9),v._uU(9,"Localiza\xe7\xe3o"),v.qZA(),v.TgZ(10,"ion-input",10),v.NdJ("ngModelChange",function(e){return v.CHM(n),v.oxw().loadedEvent.Location=e}),v.qZA(),v.qZA(),v.TgZ(11,"ion-item"),v.TgZ(12,"ion-label",9),v._uU(13,"Calend\xe1rio"),v.qZA(),v.TgZ(14,"ion-select",11),v.NdJ("ngModelChange",function(e){return v.CHM(n),v.oxw().loadedEvent.CalendarName=e}),v.TgZ(15,"ion-select-option",12),v._uU(16,"Pessoal"),v.qZA(),v.TgZ(17,"ion-select-option",13),v._uU(18,"Oficial"),v.qZA(),v.qZA(),v.qZA(),v.TgZ(19,"ion-item"),v.TgZ(20,"ion-label",9),v._uU(21,"Tipo do evento"),v.qZA(),v.TgZ(22,"ion-select",11),v.NdJ("ngModelChange",function(e){return v.CHM(n),v.oxw().loadedEvent.EventType=e}),v.TgZ(23,"ion-select-option",14),v._uU(24,"Reuni\xe3o"),v.qZA(),v.TgZ(25,"ion-select-option",15),v._uU(26,"Viagem"),v.qZA(),v.TgZ(27,"ion-select-option",16),v._uU(28,"Confer\xeancia"),v.qZA(),v.TgZ(29,"ion-select-option",17),v._uU(30,"Encontro"),v.qZA(),v.qZA(),v.qZA(),v.TgZ(31,"ion-item"),v.TgZ(32,"ion-label",9),v._uU(33,"Data In\xedcio"),v.qZA(),v.TgZ(34,"ion-datetime",18),v.NdJ("ngModelChange",function(e){return v.CHM(n),v.oxw().loadedEvent.StartDate=e}),v.qZA(),v.qZA(),v.TgZ(35,"ion-item"),v.TgZ(36,"ion-label",9),v._uU(37,"Data Fim"),v.qZA(),v.TgZ(38,"ion-datetime",19),v.NdJ("ngModelChange",function(e){return v.CHM(n),v.oxw().loadedEvent.EndDate=e}),v.qZA(),v.qZA(),v.TgZ(39,"div",20),v.TgZ(40,"ion-item"),v.TgZ(41,"ion-buttons",21),v.NdJ("click",function(){return v.CHM(n),v.oxw().openAttendees()}),v.TgZ(42,"ion-label",22),v._uU(43,"Editar"),v.qZA(),v.qZA(),v.TgZ(44,"ion-label",23),v._uU(45,"Participantes"),v.qZA(),v.qZA(),v.YNc(46,x,3,2,"div",6),v.qZA(),v.TgZ(47,"div",20),v.TgZ(48,"ion-item"),v.TgZ(49,"ion-buttons",21),v.NdJ("click",function(){return v.CHM(n),v.oxw().showAlert()}),v.TgZ(50,"ion-label",22),v._uU(51,"Editar"),v.qZA(),v.qZA(),v.TgZ(52,"ion-label",23),v._uU(53,"Anexos"),v.qZA(),v.qZA(),v.YNc(54,w,3,2,"div",6),v.YNc(55,E,8,0,"ion-list",6),v.YNc(56,M,4,0,"ion-list",6),v.qZA(),v.qZA(),v.qZA(),v.qZA()}if(2&e){var o=v.oxw();v.xp6(6),v.Q6J("ngModel",o.loadedEvent.Body.Text),v.xp6(4),v.Q6J("ngModel",o.loadedEvent.Location),v.xp6(4),v.s9C("placeholder",o.loadedEvent.CalendarName),v.Q6J("ngModel",o.loadedEvent.CalendarName),v.xp6(8),v.s9C("placeholder",o.loadedEvent.EventType),v.Q6J("ngModel",o.loadedEvent.EventType),v.xp6(12),v.s9C("value",o.loadedEvent.StartDate),v.Q6J("ngModel",o.loadedEvent.StartDate),v.xp6(4),v.s9C("value",o.loadedEvent.EndDate),v.Q6J("ngModel",o.loadedEvent.EndDate),v.xp6(8),v.Q6J("ngIf",o.loadedEvent.Attendees),v.xp6(8),v.Q6J("ngIf",o.loadedEventAttachments),v.xp6(1),v.Q6J("ngIf",!o.loadedEventAttachments),v.xp6(1),v.Q6J("ngIf",!o.loadedEvent.HasAttachments)}}function y(e,t){1&e&&(v.TgZ(0,"div"),v.TgZ(1,"div",35),v._UZ(2,"ion-skeleton-text",36),v._UZ(3,"ion-skeleton-text",34),v._UZ(4,"ion-skeleton-text",37),v._UZ(5,"ion-skeleton-text",38),v._UZ(6,"ion-skeleton-text",36),v.qZA(),v.TgZ(7,"ion-list"),v.TgZ(8,"ion-list-header"),v.TgZ(9,"ion-label"),v._UZ(10,"ion-skeleton-text",39),v.qZA(),v.qZA(),v.TgZ(11,"ion-item"),v.TgZ(12,"ion-avatar",0),v._UZ(13,"ion-skeleton-text",34),v.qZA(),v.TgZ(14,"ion-label"),v.TgZ(15,"h3"),v._UZ(16,"ion-skeleton-text",40),v.qZA(),v.TgZ(17,"p"),v._UZ(18,"ion-skeleton-text",41),v.qZA(),v.TgZ(19,"p"),v._UZ(20,"ion-skeleton-text",36),v.qZA(),v.qZA(),v.qZA(),v.TgZ(21,"ion-item"),v.TgZ(22,"ion-thumbnail",0),v._UZ(23,"ion-skeleton-text",34),v.qZA(),v.TgZ(24,"ion-label"),v.TgZ(25,"h3"),v._UZ(26,"ion-skeleton-text",40),v.qZA(),v.TgZ(27,"p"),v._UZ(28,"ion-skeleton-text",41),v.qZA(),v.TgZ(29,"p"),v._UZ(30,"ion-skeleton-text",36),v.qZA(),v.qZA(),v.qZA(),v.TgZ(31,"ion-item"),v._UZ(32,"ion-skeleton-text",42),v.TgZ(33,"ion-label"),v.TgZ(34,"h3"),v._UZ(35,"ion-skeleton-text",40),v.qZA(),v.TgZ(36,"p"),v._UZ(37,"ion-skeleton-text",41),v.qZA(),v.TgZ(38,"p"),v._UZ(39,"ion-skeleton-text",36),v.qZA(),v.qZA(),v.qZA(),v.qZA(),v.qZA())}var J,N,O=[{path:"",component:(J=function(){function n(t,o,i,a,r,s,c,l,g){e(this,n),this.formBuilder=t,this.alertController=o,this.router=i,this.activatedRoute=a,this.eventsService=r,this.modalCtrl=s,this.alertService=c,this.attachamentsService=l,this.route=g,this.isSubmitted=!1,this.loadedEvent=new d.j,this.loadedEvent.Body=new u.n}var o,i,a;return o=n,(i=[{key:"ngOnInit",value:function(){this.loadEvent(),this.loadAttachments(),this.ionicForm=this.formBuilder.group({subject:["",[r.kI.required]]})}},{key:"errorControl",get:function(){return this.ionicForm.controls}},{key:"loadEvent",value:function(){var e,t=this;this.activatedRoute.paramMap.subscribe(function(n){n.has("eventId")&&(t.pageId=n.get("eventId"),e=n.get("eventId"),console.log(e),n.has("caller")&&(t.backURL="/home/"+n.get("caller")))}),this.eventsService.getEvent(e).subscribe(function(e){t.loadedEvent=e})}},{key:"openAttendees",value:function(){return(0,l.mG)(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.modalCtrl.create({component:Z.V,componentProps:{eventAttendees:this.loadedEvent.Attendees},cssClass:"attendee",backdropDismiss:!1});case 2:return t=e.sent,e.next=5,t.present();case 5:t.onDidDismiss().then(function(e){null!=e.data&&(n.loadedEvent.Attendees=e.data)});case 6:case"end":return e.stop()}},e,this)}))}},{key:"getEventAttendees",value:function(){return this.loadedEvent.Attendees}},{key:"setEventAttendees",value:function(e){this.loadedEvent.Attendees=e}},{key:"deleteConfirm",value:function(){return(0,l.mG)(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,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:function(){}},{text:"Sim",handler:function(){n.Delete()}}]});case 2:return t=e.sent,e.next=5,t.present();case 5:case"end":return e.stop()}},e,this)}))}},{key:"Delete",value:function(){var e=this;this.eventsService.deleteEvent(this.loadedEvent.EventId,0).subscribe(function(){return(0,l.mG)(e,void 0,void 0,regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.alertController.create({cssClass:"my-custom-class",header:"Evento removido",buttons:["OK"]});case 2:t=e.sent,setTimeout(function(){t.dismiss()},1500),this.router.navigate(["/home/events"]);case 4:case"end":return e.stop()}},e,this)}))})}},{key:"Save",value:function(){var e=this;this.ionicForm.valid&&this.eventsService.putEvent(this.loadedEvent,2,3,"md").subscribe(function(){return(0,l.mG)(e,void 0,void 0,regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.alertController.create({cssClass:"my-custom-class",header:"Evento actualizado",buttons:["OK"]});case 2:t=e.sent,setTimeout(function(){t.dismiss()},1500);case 4:case"end":return e.stop()}},e,this)}))})}},{key:"showAlert",value:function(){this.alertService.presentAlert("Funcionalidade em desenvolvimento")}},{key:"loadAttachments",value:function(){this.attachamentsService.getAttachmentsById(this.pageId).subscribe(function(e){console.log(e)},function(e){console.log(e)})}},{key:"viewDocument",value:function(e){return(0,l.mG)(this,void 0,void 0,regeneratorRuntime.mark(function t(){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:e.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");case 1:case"end":return t.stop()}},t)}))}},{key:"back",value:function(){}},{key:"doRefresh",value:function(e){e.target.complete(),setTimeout(function(){e.target.complete()},2e3)}},{key:"navigateTo",value:function(e){this.route.navigate(["/home/events",e])}},{key:"openAttachments",value:function(){return(0,l.mG)(this,void 0,void 0,regeneratorRuntime.mark(function e(){var t,n=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.modalCtrl.create({component:g.j,componentProps:{eventId:this.pageId,attachments:this.loadedEventAttachments},cssClass:"attachments",backdropDismiss:!1});case 2:return t=e.sent,e.next=5,t.present();case 5:t.onDidDismiss().then(function(e){null!=e.data&&(n.loadedEvent.Attendees=e.data)});case 6:case"end":return e.stop()}},e,this)}))}}])&&t(o.prototype,i),a&&t(o,a),n}(),J.\u0275fac=function(e){return new(e||J)(v.Y36(r.qu),v.Y36(s.Br),v.Y36(c.F0),v.Y36(c.gz),v.Y36(m.n),v.Y36(s.IN),v.Y36(p.c),v.Y36(f.o),v.Y36(c.F0))},J.\u0275cmp=v.Xpm({type:J,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&&(v.TgZ(0,"ion-header"),v.TgZ(1,"ion-toolbar"),v.TgZ(2,"ion-buttons",0),v._UZ(3,"ion-back-button",1),v.qZA(),v.TgZ(4,"ion-title"),v._uU(5,"Visualizar Evento"),v.qZA(),v.TgZ(6,"ion-buttons",2),v.TgZ(7,"button",3),v.NdJ("click",function(){return t.deleteConfirm()}),v._UZ(8,"ion-icon",4),v.qZA(),v.qZA(),v.qZA(),v.qZA(),v.TgZ(9,"ion-content",5),v.YNc(10,U,57,14,"div",6),v.YNc(11,y,40,0,"div",6),v.qZA(),v.TgZ(12,"ion-footer"),v.TgZ(13,"ion-toolbar"),v.TgZ(14,"div",7),v.TgZ(15,"ion-button",8),v.NdJ("click",function(){return t.Save()}),v._uU(16,"Gravar"),v.qZA(),v.qZA(),v.qZA(),v.qZA()),2&e&&(v.xp6(3),v.s9C("defaultHref",t.backURL),v.xp6(7),v.Q6J("ngIf",t.loadedEvent),v.xp6(1),v.Q6J("ngIf",!t.loadedEvent))},directives:[s.Gu,s.sr,s.Sm,s.oU,s.cs,s.wd,s.gu,s.W2,a.O5,s.fr,s.YG,s.Ub,s.td,s.Ie,s.Q$,s.pK,s.j9,r.JJ,r.On,s.t9,s.QI,s.n0,s.x4,a.sg,s.q_,s.X7,s.CK,s.yh,s.BJ,s.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}"]}),J)}],Y=function(){var t=function t(){e(this,t)};return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=v.oAB({type:t}),t.\u0275inj=v.cJS({imports:[[c.Bz.forChild(O)],c.Bz]}),t}(),I=((N=function t(){e(this,t)}).\u0275fac=function(e){return new(e||N)},N.\u0275mod=v.oAB({type:N}),N.\u0275inj=v.cJS({imports:[[a.ez,r.u5,s.Pc,Y]]}),N)}}])}();