1import{a as Ae}from"./chunk-YS4HNGFW.js";import{a as he}from"./chunk-DOSQIVJG.js";import{a as me}from"./chunk-64U4WOAX.js";import{b as le}from"./chunk-NJ3T7M4T.js";import{a as se,b as Se}from"./chunk-5AX3G6VH.js";import{a as ce}from"./chunk-U4ELYTJY.js";import{a as ge}from"./chunk-7ERKER5V.js";import{a as pe}from"./chunk-5RSBBBTU.js";import{a as ve}from"./chunk-7J7LFZ6D.js";import{a as _e}from"./chunk-RIJZ5BO6.js";import{b as ne}from"./chunk-S2RCKZQX.js";import"./chunk-RCFS3MMO.js";import"./chunk-B4LRCCVM.js";import"./chunk-OWWZGKWO.js";import"./chunk-EIBODUP5.js";import"./chunk-5PP5O7NA.js";import{b as oe,c as re}from"./chunk-XSVZLTR5.js";import{a as de}from"./chunk-XRI2HEBA.js";import"./chunk-NMGI7OHJ.js";import{e as ue}from"./chunk-JETF3YJP.js";import{m as ae}from"./chunk-ESNFGI6S.js";import{d as ie}from"./chunk-J6BIBWLV.js";import{$ as C,$a as h,$b as q,Aa as I,Ca as b,Da as v,Dc as Y,E as R,Ea as u,Ec as ee,Gb as k,Hb as B,Ic as te,K as x,L as E,Lb as U,Nb as Q,O as V,Pa as d,Qa as g,Ra as f,Sa as H,Za as S,_ as r,_a as A,bb as P,dc as j,fc as G,h as w,ha as O,hc as $,ja as _,kc as z,ma as c,mb as F,ob as N,oc as X,qa as W,tc as Z,uc as J,vc as K,wa as n,xa as a,ya as y,za as L}from"./chunk-RDOYG6DE.js";import{a as T,b as M,i as D}from"./chunk-2AVGQ2MQ.js";function Me(o,m){if(o&1&&(n(0,"option",13),d(1),a()),o&2){let e=m.$implicit;c("ngValue",e),r(),f("",e.ano," ")}}function we(o,m){if(o&1&&(n(0,"option",13),d(1),a()),o&2){let e=m.$implicit;c("ngValue",e),r(),f(" ",e==null||e.pessoa==null?null:e.pessoa.nomeCivil," ")}}function Re(o,m){if(o&1&&(n(0,"option",13),d(1),a()),o&2){let e=m.$implicit;c("ngValue",e),r(),f(" ",e.nome," ")}}function Ve(o,m){if(o&1&&(n(0,"option",13),d(1),a()),o&2){let e=m.$implicit;c("ngValue",e),r(),f("",e.nome," ")}}function Oe(o,m){if(o&1&&(n(0,"option",13),d(1),a()),o&2){let e=m.$implicit;c("ngValue",e),r(),f("",e.nome," ")}}function We(o,m){if(o&1&&(n(0,"option",13),d(1),a()),o&2){let e=m.$implicit;c("ngValue",e),r(),f(" ",e.atividadeExtraTipo.nome," ")}}function He(o,m){if(o&1&&(n(0,"tr",26),L(1),n(2,"td"),d(3),a(),n(4,"td"),d(5),a(),n(6,"td"),d(7),a(),n(8,"td"),d(9),a(),n(10,"td"),d(11),F(12,"date"),a(),I(),a()),o&2){let e=m.$implicit,i=u();r(3),g(e.atividadeExtraTipo.nome),r(2),g(i.tiposAtividades.get(e.tipo)),r(2),g(e.cargaHoraria),r(2),g(e.quantidade),r(2),g(N(12,5,e.dataLimiteEntrega,"dd/MM/yyyy"))}}function Pe(o,m){o&1&&(n(0,"th",21),d(1,"Status"),a())}function Fe(o,m){o&1&&(L(0),n(1,"th",21),d(2,"Carga Hor\xE1ria Semestre"),a(),n(3,"th",21),d(4,"Total Carga Hor\xE1ria"),a(),I())}function Ne(o,m){o&1&&(L(0),n(1,"th",21),d(2,"Quantidade Semestre"),a(),n(3,"th",21),d(4,"Total quantidade"),a(),I())}function ke(o,m){o&1&&(n(0,"th",21),d(1,"CH. Cumprida"),a())}function Be(o,m){if(o&1&&(n(0,"span",30),d(1),a()),o&2){let e=u().$implicit;r(),g(e.matricula.situacaoMatricula)}}function Ue(o,m){if(o&1&&(n(0,"td"),d(1),a()),o&2){let e=u().$implicit,i=u();W(i.classeAtividade(e)),r(),f(" ",i.classeAtividade(e)=="text-success"?"ATIVIDADE CUMPRIDA":"ATIVIDADE N\xC3O CUMPRIDA"," ")}}function Qe(o,m){if(o&1){let e=b();L(0),n(1,"td")(2,"input",31),h("ngModelChange",function(t){x(e);let s=u().$implicit;return A(s.cargaHoraria,t)||(s.cargaHoraria=t),E(t)}),v("blur",function(){x(e);let t=u(),s=t.$implicit,l=t.index,p=u();return E(p.salvarLancamentoAtividadeAluno(s,l))}),a()(),n(3,"td"),d(4),a(),I()}if(o&2){let e=u().$implicit,i=u();r(2),S("ngModel",e.cargaHoraria),c("imask",i.imaskInteiro)("unmask","typed")("disabled",i.bloquearLancamentoAtividadesPorDataLimite(e)),r(2),g(e.totalCh)}}function qe(o,m){if(o&1){let e=b();L(0),n(1,"td")(2,"input",31),h("ngModelChange",function(t){x(e);let s=u().$implicit;return A(s.quantidade,t)||(s.quantidade=t),E(t)}),v("blur",function(){x(e);let t=u(),s=t.$implicit,l=t.index,p=u();return E(p.salvarLancamentoAtividadeAluno(s,l))}),a()(),n(3,"td"),d(4),a(),I()}if(o&2){let e=u().$implicit,i=u();r(2),S("ngModel",e.quantidade),c("imask",i.imaskInteiro)("unmask","typed")("disabled",i.bloquearLancamentoAtividadesPorDataLimite(e)),r(2),g(e.totalQtd)}}function je(o,m){if(o&1){let e=b();n(0,"td")(1,"div",32)(2,"input",33),h("ngModelChange",function(t){x(e);let s=u().$implicit;return A(s.cargaHorariaCumprida,t)||(s.cargaHorariaCumprida=t),E(t)}),v("change",function(){x(e);let t=u(),s=t.$implicit,l=t.index,p=u();return E(p.salvarLancamentoAtividadeAluno(s,l))}),a()()()}if(o&2){let e=u().$implicit,i=u();r(2),S("ngModel",e.cargaHorariaCumprida),c("disabled",i.bloquearLancamentoAtividadesPorDataLimite(e))}}function Ge(o,m){if(o&1&&(n(0,"tr",26),L(1),n(2,"td"),d(3),a(),n(4,"td",27),d(5),_(6,Be,2,1,"span",28),a(),_(7,Ue,2,3,"td",29)(8,Qe,5,5,"ng-container",25)(9,qe,5,5,"ng-container",25)(10,je,3,2,"td",25),I(),a()),o&2){let e=m.$implicit,i=u();r(3),g(e.matricula.ordem?e.matricula.ordem:""),r(2),H("",e.matricula.codigo," - ",e.matricula.pessoa.nomeSocial," "),r(),c("ngIf",e&&e.matricula.situacaoMatricula!="CURSANDO"),r(),c("ngIf",i.atividadeSelecionada),r(),c("ngIf",(i.atividadeSelecionada==null?null:i.atividadeSelecionada.tipo)==="CARGA_HORARIA"||(i.atividadeSelecionada==null?null:i.atividadeSelecionada.tipo)==="CARGA_HORARIA_QUANTIDADE"),r(),c("ngIf",(i.atividadeSelecionada==null?null:i.atividadeSelecionada.tipo)==="CARGA_HORARIA_QUANTIDADE"||(i.atividadeSelecionada==null?null:i.atividadeSelecionada.tipo)==="QUANTIDADE"),r(),c("ngIf",(i.atividadeSelecionada==null?null:i.atividadeSelecionada.tipo)==="CARGA_HORARIA_CUMPRIDA")}}var Ce=(()=>{class o extends me{exercicioService;docenteService;matriculaService;atividadeExtraAlunoService;atividadeExtraService;alerta;util;imaskInteiro={mask:Number,scale:0,signed:!1,thousandsSeparator:".",normalizeZeros:!0,radix:",",min:0,format:e=>e!=null?e+"":null};tiposAtividades=le;
1coordenador=!1;anosLetivos=[];anoLetivoSelecionado=null;docentes=[];docenteSelecionado=null;docenteCoordenadorLogado;cursosDocente=[];cursoSelecionado=null;serieSelecionada=null;listaSeries=[];listaTurmas=[];turmaSelecionada=null;listaAlunos=[];listaAtividadesExtras=[];atividadeSelecionada=null;carregando=!1;constructor(e,i,t,s,l,p,xe,Ee){super(s,Ee),this.exercicioService=e,this.docenteService=i,this.matriculaService=t,this.atividadeExtraAlunoService=s,this.atividadeExtraService=l,this.alerta=p,this.util=xe}ngOnInit(){return D(this,null,function*(){yield this.validarPermissaoAcesso(),this.login=yield this.util.carregarSessao()})}aposValidar(){this.exercicioService.filtrar({pageSize:-1,orderBy:"id$DESC"}).subscribe(e=>{this.anosLetivos=e.data.conteudo,this.carregarCoordenadores()})}carregarCoordenadores(){this.anoLetivoSelecionado?.id&&this.docenteService.filtrar({coordenador:!0,"coordenadorCursos.curso.ano.id":this.anoLetivoSelecionado.id,orderBy:"pessoa.nomeCivil$ASC",relations:"pessoa,coordenadorCursos.curso.turnos.series.turmas,coordenadorCursos.curso.ano",pageSize:-1}).subscribe(e=>{this.docentes=e.data.conteudo})}mudancaAno(){this.docenteSelecionado=null,this.carregarCoordenadores()}carregarCursos(){this.cursosDocente=[],this.serieSelecionada=null,this.turmaSelecionada=null,this.listaAlunos=null,this.atividadeSelecionada=null,this.listaAtividadesExtras=[],this.cursosDocente=this.docenteSelecionado?.coordenadorCursos?.map(e=>e.curso),this.cursosDocente?.length==1&&(this.cursoSelecionado=this.cursosDocente[0],this.carregarSeries())}carregarSeries(){let e=this.cursoSelecionado?.turnos?.flatMap(i=>i?.series);e.sort((i,t)=>i.etapa-t.etapa),this.listaSeries=[];for(let i of e)this.listaSeries.push(i)}carregarTurmas(){this.listaTurmas=this.serieSelecionada?.turmas,this.listaTurmas.length>1&&this.listaTurmas.sort((e,i)=>e.nome.localeCompare(i.nome))}carregarAlunos(){return D(this,null,function*(){if(this.carregando=!0,this.listaAlunos=[],this.atividadeSelecionada=null,!this.turmaSelecionada?.id)return;let e={};e.pageSize=-1,e["serie.turno.curso.id"]=this.cursoSelecionado.id,e["serie.id"]=this.serieSelecionada.id,e["turma.id"]=this.turmaSelecionada.id,e.orderBy="ordem$ASC",this.atividadeSelecionada?.id||this.matriculaService.filtrar(M(T({},e),{relations:"pessoa",orderBy:"ordem$ASC"})).subscribe(i=>D(this,null,function*(){let t=i.data.conteudo;t.forEach(l=>{let p={};p.matricula=l,this.listaAlunos.push(p)});let s=(yield w(this.matriculaService.filtrar({codigo:t[0].codigo,orderBy:"id$ASC",relations:"serie.turno.curso",pageSize:1}))).data.conteudo[0];this.atividadeExtraService.filtrar({pageSize:-1,orderBy:"ordem$ASC","curso.id":s.serie.turno.curso.id,relations:"atividadeExtraTipo"}).subscribe({next:l=>{this.listaAtividadesExtras=l.data.conteudo,this.carregando=!1}})}))})}carregarAtividadesAlunos(){if(this.atividadeSelecionada?.id==null){this.carregarAlunos();return}this.carregando=!0,this.listaAlunos=[],this.matriculaService.buscarAtividadeExtraTurma(this.atividadeSelecionada.id,this.turmaSelecionada.id).subscribe({next:e=>D(this,null,function*(){for(let i of e.data){let t=i.atividade;t.totalCh=i.totalCh,t.totalQtd=i.totalQtd,this.listaAlunos.push(t)}this.listaAlunos.sort((i,t)=>(i.matricula.ordem?i.matricula.ordem:999)-(t.matricula.ordem?t.matricula.ordem:999)),this.carregando=!1})})}salvarLancamentoAtividadeAluno(e,i){let t=Object.assign(new se,e);t.matricula=new ce(e.matricula.id),this.atividadeExtraAlunoService.salvar(t).subscribe(()=>{i>-1&&this.matriculaService.buscarAtividadeExtraAluno(e.matricula.id).subscribe(s=>{let l=s.data.find(p=>p.atividade.id==e.id);e.totalCh=l.totalCh,e.totalQtd=l.totalQtd,e.matricula=e.matricula,this.listaAlunos[i]=e,this.alerta.alertaSucesso("Valor salvo com sucesso!",null,null,"top-right")})})}bloquearLancamentoAtividadesPorDataLimite(e){return!!(e.matricula.ordem==null||e.matricula.situacaoMatricula!="CURSANDO"||this.atividadeSelecionada?.dataLimiteEntrega&&new Date>this.atividadeSelecionada?.dataLimiteEntrega)}classeAtividade(e){return+e?.cargaHoraria>=+this.atividadeSelecionada?.cargaHoraria&&+e?.quantidade>=+this.atividadeSelecionada?.quantidade&&this.atividadeSelecionada.tipo!=="CARGA_HORARIA_CUMPRIDA"||e?.cargaHorariaCumprida?"text-success":"text-danger"}static \u0275fac=function(i){return new(i||o)(C(_e),C(ve),C(ge),C(Se),C(pe),C(te),C(ie),C(V))};static \u0275cmp=R({type:o,selectors:[["app-atividade-extra-lancamento"]],standalone:!0,features:[O,P],decls:84,vars:28,consts:[[1,"container-fluid"],[1,"card-panel","mt-3"],[1,"row"],[1,"col-12","col-md-6"],["page-title","ATIVIDADES EXTRAS","page-subtitle","Cadastro e altera\xE7\xE3o de notas das atividades extras.","
1icon-title","list-check"],[1,"col-6"],[1,"col-12","col-md-3"],["for","numero",1,"font-bold"],[1,"form-select",3,"ngModelChange","change","ngModel"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"col-12","col-md-9"],["for","nome",1,"font-bold"],[1,"form-select",3,"ngModelChange","change","ngModel","disabled"],[3,"ngValue"],[1,"col-12","col-md-12"],[3,"value"],[1,"form-select",3,"change","ngModelChange","disabled","ngModel"],[1,"row","mt-4"],[1,"col-md"],[1,"table-responsive"],[1,"table","table-striped","table-light"],["scope","col",1,"text-center"],["class","text-center align-middle",4,"ngFor","ngForOf"],[1,"col-12"],["scope","col","class","text-center",4,"ngIf"],[4,"ngIf"],[1,"text-center","align-middle"],[1,"text-left"],["class","badge badge-sm text-bg-dark",4,"ngIf"],[3,"class",4,"ngIf"],[1,"badge","badge-sm","text-bg-dark"],["min","1",1,"form-control",3,"ngModelChange","blur","ngModel","imask","unmask","disabled"],[1,"form-group"],["type","checkbox",3,"ngModelChange","change","ngModel","disabled"]],template:function(i,t){i&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),y(4,"app-page-header",4),a()(),y(5,"hr"),n(6,"div",2)(7,"div",5)(8,"div",2)(9,"div",6)(10,"label",7),d(11,"Ano"),a(),n(12,"select",8),h("ngModelChange",function(l){return A(t.anoLetivoSelecionado,l)||(t.anoLetivoSelecionado=l),l}),v("change",function(){return t.mudancaAno()}),_(13,Me,2,2,"option",9),a()(),n(14,"div",10)(15,"label",11),d(16,"Coordenador(a)"),a(),n(17,"select",12),h("ngModelChange",function(l){return A(t.docenteSelecionado,l)||(t.docenteSelecionado=l),l}),v("change",function(){return t.carregarCursos()}),n(18,"option",13),d(19,"Selecione..."),a(),_(20,we,2,2,"option",9),a()()(),n(21,"div",2)(22,"div",14)(23,"label",11),d(24,"Curso"),a(),n(25,"select",12),h("ngModelChange",function(l){return A(t.cursoSelecionado,l)||(t.cursoSelecionado=l),l}),v("change",function(){return t.carregarSeries()}),y(26,"option",15),_(27,Re,2,2,"option",9),a()(),n(28,"div",3)(29,"label",11),d(30,"Serie"),a(),n(31,"select",12),h("ngModelChange",function(l){return A(t.serieSelecionada,l)||(t.serieSelecionada=l),l}),v("change",function(){return t.carregarTurmas()}),y(32,"option",15),_(33,Ve,2,2,"option",9),a()(),n(34,"div",3)(35,"label",11),d(36,"Turma"),a(),n(37,"select",16),v("change",function(){return t.carregarAlunos()}),h("ngModelChange",function(l){return A(t.turmaSelecionada,l)||(t.turmaSelecionada=l),l}),y(38,"option",15),_(39,Oe,2,2,"option",9),a()()(),n(40,"div",2)(41,"div",14)(42,"label",11),d(43,"Atividade Extra"),a(),n(44,"select",12),h("ngModelChange",function(l){return A(t.atividadeSelecionada,l)||(t.atividadeSelecionada=l),l}),v("change",function(){return t.carregarAtividadesAlunos()}),y(45,"option",15),_(46,We,2,2,"option",9),a()()()(),n(47,"div",5)(48,"div",17)(49,"div",18)(50,"div",19)(51,"table",20)(52,"thead")(53,"tr")(54,"th",21),d(55,"Nome"),a(),n(56,"th",21),d(57,"Tipo"),a(),n(58,"th",21),d(59,"Carga Hor\xE1ria"),a(),n(60,"th",21),d(61,"Qtde."),a(),n(62,"th",21),d(63,"Dt. Limite"),a()()(),n(64,"tbody"),_(65,He,13,8,"tr",22),a()()()()()()(),n(66,"div",2)(67,"div",23)(68,"div",17)(69,"div",18)(70,"div",19)(71,"table",20)(72,"thead")(73,"tr")(74,"th",21),d(75,"N\xBA"),a(),n(76,"th",21),d(77,"Aluno"),a(),_(78,Pe,2,0,"th",24)(79,Fe,5,0,"ng-container",25)(80,Ne,5,0,"ng-container",25)(81,ke,2,0,"th",24),a()(),n(82,"tbody"),_(83,Ge,11,8,"tr",22),a()()()()()()()()()),i&2&&(r(12),S("ngModel",t.anoLetivoSelecionado),r(),c("ngForOf",t.anosLetivos),r(4),S("ngModel",t.docenteSelecionado),c("disabled",!(t.anoLetivoSelecionado!=null&&t.anoLetivoSelecionado.id)||t.coordenador),r(),c("ngValue",null),r(2),c("ngForOf",t.docentes),r(5),S("ngModel",t.curs
1oSelecionado),c("disabled",!t.docenteSelecionado||!!(t.serieSelecionada!=null&&t.serieSelecionada.id)),r(),c("value",null),r(),c("ngForOf",t.cursosDocente),r(4),S("ngModel",t.serieSelecionada),c("disabled",!t.cursoSelecionado||!!(t.turmaSelecionada!=null&&t.turmaSelecionada.id)),r(),c("value",null),r(),c("ngForOf",t.listaSeries),r(4),c("disabled",!t.serieSelecionada||!!(t.atividadeSelecionada!=null&&t.atividadeSelecionada.id)),S("ngModel",t.turmaSelecionada),r(),c("value",null),r(),c("ngForOf",t.listaTurmas),r(5),S("ngModel",t.atividadeSelecionada),c("disabled",!(t.turmaSelecionada!=null&&t.turmaSelecionada.id)||t.carregando),r(),c("value",null),r(),c("ngForOf",t.listaAtividadesExtras),r(19),c("ngForOf",t.listaAtividadesExtras),r(13),c("ngIf",t.atividadeSelecionada),r(),c("ngIf",(t.atividadeSelecionada==null?null:t.atividadeSelecionada.tipo)==="CARGA_HORARIA"||(t.atividadeSelecionada==null?null:t.atividadeSelecionada.tipo)==="CARGA_HORARIA_QUANTIDADE"),r(),c("ngIf",(t.atividadeSelecionada==null?null:t.atividadeSelecionada.tipo)==="CARGA_HORARIA_QUANTIDADE"||(t.atividadeSelecionada==null?null:t.atividadeSelecionada.tipo)==="QUANTIDADE"),r(),c("ngIf",(t.atividadeSelecionada==null?null:t.atividadeSelecionada.tipo)==="CARGA_HORARIA_CUMPRIDA"),r(2),c("ngForOf",t.listaAlunos))},dependencies:[Y,J,K,$,G,Z,z,X,ae,Q,k,B,U,j,ee,de,ne,re,oe]})}return o})();function $e(o,m){if(o&1&&(n(0,"option",13),d(1),a()),o&2){let e=m.$implicit;c("ngValue",e),r(),f("",e.ano," ")}}function ze(o,m){if(o&1&&(n(0,"option",13),d(1),a()),o&2){let e=m.$implicit;c("ngValue",e),r(),f(" ",e==null||e.pessoa==null?null:e.pessoa.nomeCivil," ")}}function Xe(o,m){if(o&1&&(n(0,"option",13),d(1),a()),o&2){let e=m.$implicit;c("ngValue",e),r(),f(" ",e.nome," ")}}function Ze(o,m){if(o&1&&(n(0,"option",13),d(1),a()),o&2){let e=m.$implicit;c("ngValue",e),r(),f("",e.nome," ")}}function Je(o,m){if(o&1&&(n(0,"option",13),d(1),a()),o&2){let e=m.$implicit;c("ngValue",e),r(),f("",e.nome," ")}}function Ke(o,m){if(o&1&&(n(0,"option",13),d(1),a()),o&2){let e=m.$implicit;c("ngValue",e),r(),f(" ",e.atividadeExtraTipo.nome," ")}}function Ye(o,m){if(o&1&&(n(0,"tr",26),L(1),n(2,"td"),d(3),a(),n(4,"td"),d(5),a(),n(6,"td"),d(7),a(),n(8,"td"),d(9),a(),n(10,"td"),d(11),F(12,"date"),a(),I(),a()),o&2){let e=m.$implicit,i=u();r(3),g(e.atividadeExtraTipo.nome),r(2),g(i.tiposAtividades.get(e.tipo)),r(2),g(e.cargaHoraria),r(2),g(e.quantidade),r(2),g(N(12,5,e.dataLimiteEntrega,"dd/MM/yyyy"))}}function et(o,m){o&1&&(n(0,"th",21),d(1,"Status"),a())}function tt(o,m){o&1&&(L(0),n(1,"th",21),d(2,"Carga Hor\xE1ria Semestre"),a(),n(3,"th",21),d(4,"Total Carga Hor\xE1ria"),a(),I())}function it(o,m){o&1&&(L(0),n(1,"th",21),d(2,"Quantidade Semestre"),a(),n(3,"th",21),d(4,"Total quantidade"),a(),I())}function at(o,m){o&1&&(n(0,"th",21),d(1,"CH. Cumprida"),a())}function nt(o,m){if(o&1&&(n(0,"span",30),d(1),a()),o&2){let e=u().$implicit;r(),g(e.matricula.situacaoMatricula)}}function ot(o,m){if(o&1&&(n(0,"td"),d(1),a()),o&2){let e=u().$implicit,i=u();W(i.classeAtividade(e)),r(),f(" ",i.classeAtividade(e)=="text-success"?"ATIVIDADE CUMPRIDA":"ATIVIDADE N\xC3O CUMPRIDA"," ")}}function rt(o,m){if(o&1){let e=b();L(0),n(1,"td")(2,"input",31),h("ngModelChange",function(t){x(e);let s=u().$implicit;return A(s.cargaHoraria,t)||(s.cargaHoraria=t),E(t)}),v("blur",function(){x(e);let t=u(),s=t.$implicit,l=t.index,p=u();return E(p.salvarLancamentoAtividadeAluno(s,l))}),a()(),n(3,"td"),d(4),a(),I()}if(o&2){let e=u().$implicit,i=u();r(2),S("ngModel",e.cargaHoraria),c("imask",i.imaskInteiro)("unmask","typed")("disabled",i.bloquearLancamentoAtividadesPorDataLimite(e)),r(2),g(e.totalCh)}}function dt(o,m){if(o&1){let e=b();L(0),n(1,"td")(2,"input",31),h("ngModelChange",function(t){x(e);let s=u().$implicit;return A(s.quantidade,t)||(s.quantidade=t),E(t)}),v("blur",function(){x(e);let t=u(),s=t.$implicit,l=t.index,p=u();return E(p.salvarLancamentoAtividadeAluno(s,l))}),a()(),n(3,"td"),d(4),a(),I()}if(o&2){let e=u().$implicit,i=u();r(2),S("ngModel",e.quantidade),c("imask",i.imaskInteiro)("unmask","typed")("disabled",i.bloquearLancamentoAtividadesPorDataLimite(e)),r(2),g(e.totalQtd)}}function lt(o,m){if(o&1){let e=b();n(0,"td")(1,"div",32)(2,"input",33),h("ngModelChange",function(t){x(e);let s=u().$implicit;return A(s.cargaHorariaCumprida,t)||(s.cargaHorariaCumprida=t),E(t)}),v("change",function(){x(e);let t=u(),s=t.$implicit,l=t.index,p=u();return E(p.salvarLancamentoAtividadeAluno(s,l))}),a()()()}if(o&2){let e=u().$implicit,i=u();r(2),S("ngModel",e.cargaHorariaCumprida),c("disabled",i.bloquearLancamentoAtividadesPorDataLimite(e))}}function ct(o,m){if(o&1&&(n(0,"tr",26),L(1),n(2,"td"),d(3),a(),n(4,"td",27),d(5),_(6,nt,2,1,"span",28),a(),_(7,ot,2,3,"td",29)(8,rt,5,5,"ng-container",25)(9,dt,5,5,"ng-container",25)(10,lt,3,2,"td",25),I(),a()),o&2){let e=m.$implicit,i=u();r(3),g(e.matricula.ordem?e.matricula.ordem:""),r(2),H("",e.matricula.codigo," - ",e.matricula.pessoa.nomeSocial," "),r(),c("ngIf",e&&e.matricula.situacaoMatricula!="CURSANDO"),r(),c("ngIf",i.atividadeSelecionada),r(),c("ngIf",(i.atividadeSelecionada==null?null:i.atividadeSelecionada.tipo)==="CARGA_HORARIA"||(i.atividadeSelecionada==null?null:i.atividadeSelecionada.tipo)==="CARGA_HORARIA_QUANTIDADE"),r(),c("ngIf",(i.atividadeSelecionada==null?null:i.atividadeSelecionada.tipo)==="CARGA_HORARIA_QUANTIDADE"||(i.atividadeSelecionada==null?null:i.atividadeSelecionada.tipo)==="QUANTIDADE"),r(),c("ngIf",(i.atividadeSelecionada==null?null:i.atividadeSelecionada.tipo)==="CARGA_HORARIA_CUMPRIDA")}}var fe=(()=>{class o extends me{rota;service;dadosDocente;alerta;util;imaskInteiro={mask:Number,scale:0,signed:!1,thousandsSeparator:".",normalizeZeros:!0,radix:",",min:0,format:e=>e!=null?e+"":null};tiposAtividades=le;
1coordenador=!1;anosLetivos=[];anoLetivoSelecionado=null;docentes=[];docenteSelecionado=null;docenteCoordenadorLogado;cursosDocente=[];cursoSelecionado=null;serieSelecionada=null;listaSeries=[];listaTurmas=[];turmaSelecionada=null;listaAlunos=[];listaAtividadesExtras=[];atividadeSelecionada=null;carregando=!1;constructor(e,i,t,s,l,p){super(i,p),this.rota=e,this.service=i,this.dadosDocente=t,this.alerta=s,this.util=l}ngOnInit(){return D(this,null,function*(){if(yield this.validarPermissaoAcesso(),this.login=yield this.util.carregarSessao(),this.coordenador=this.injector.get(q).url.includes("coordenador"),!this.coordenador){this.rota.navigate(["/home"]);return}this.dadosDocente.carregarDocente().subscribe({next:e=>{this.docenteCoordenadorLogado=e.data,this.service.filtrarSubUrl("ano",{pageSize:-1,orderBy:"id$DESC"}).subscribe(i=>{this.anosLetivos=i.data.conteudo,this.anoLetivoSelecionado=this.anosLetivos[0],this.carregarCoordenadores()})},error:()=>{this.alerta.alertaErro("Dados para docente n\xE3o encontrados"),this.rota.navigate(["/home"])}})})}aposValidar(){}carregarCoordenadores(){this.docentes=[],this.docentes.push(this.docenteCoordenadorLogado),this.docenteSelecionado=this.docentes[0],this.carregarCursos()}mudancaAno(){this.carregarCursos()}carregarCursos(){this.cursosDocente=[],this.serieSelecionada=null,this.turmaSelecionada=null,this.listaAlunos=null,!(!this.docenteSelecionado||!this.anoLetivoSelecionado)&&this.service.filtrarSubUrl("coordenador-curso",{"docente.id":this.docenteSelecionado.id,"curso.ano.id":this.anoLetivoSelecionado.id,"curso.ativo":!0,relations:"curso.turnos.series.turmas,curso.atividadesExtras.atividadeExtraTipo"}).subscribe(e=>{this.cursosDocente=e.data.conteudo.map(i=>i.curso)})}carregarSeries(){this.listaSeries=this.cursoSelecionado?.turnos?.flatMap(e=>e?.series),this.listaSeries.sort((e,i)=>e.etapa-i.etapa)}carregarTurmas(){this.listaTurmas=this.serieSelecionada?.turmas,this.listaTurmas.length>1&&this.listaTurmas.sort((e,i)=>e.nome.localeCompare(i.nome))}carregarAlunos(){return D(this,null,function*(){if(this.carregando=!0,this.listaAlunos=[],this.atividadeSelecionada=null,!this.turmaSelecionada?.id)return;let e={};e.pageSize=-1,e["serie.turno.curso.id"]=this.cursoSelecionado.id,e["serie.id"]=this.serieSelecionada.id,e["turma.id"]=this.turmaSelecionada.id,this.atividadeSelecionada?.id||this.service.filtrarSubUrl("matriculas",M(T({},e),{relations:"pessoa",orderBy:"ordem$ASC"})).subscribe(i=>D(this,null,function*(){let t=i.data.conteudo;t.forEach(l=>{let p={};p.matricula=l,this.listaAlunos.push(p)});let s=(yield w(this.service.filtrarSubUrl("matriculas",{codigo:t[0].codigo,orderBy:"id$ASC",relations:"serie.turno.curso",pageSize:1}))).data.conteudo[0]}))})}carregarAtividadesAlunos(){if(this.atividadeSelecionada?.id==null){this.carregarAlunos();return}this.carregando=!0,this.listaAlunos=[],this.service.buscarAtividadeExtraTurma(this.atividadeSelecionada.id,this.turmaSelecionada.id).subscribe({next:e=>D(this,null,function*(){for(let i of e.data){let t=i.atividade;t.totalCh=i.totalCh,t.totalQtd=i.totalQtd,this.listaAlunos.push(t)}this.listaAlunos.sort((i,t)=>(i.matricula.ordem?i.matricula.ordem:999)-(t.matricula.ordem?t.matricula.ordem:999)),this.carregando=!1})})}salvarLancamentoAtividadeAluno(e,i){let t=Object.assign(new se,e);t.matricula=new ce(e.matricula.id),this.service.salvar(t).subscribe(()=>{this.service.buscarAtividadeExtraAluno(e.matricula.id).subscribe(s=>{let l=s.data.find(p=>p.atividade.id==e.id);e.totalCh=l.totalCh,e.totalQtd=l.totalQtd,e.matricula=e.matricula,this.listaAlunos[i]=e,this.alerta.alertaSucesso("Valor salvo com sucesso!",null,null,"top-right")})})}bloquearLancamentoAtividadesPorDataLimite(e){return!!(e.matricula.ordem==null||e.matricula.situacaoMatricula!="CURSANDO"||this.atividadeSelecionada?.dataLimiteEntrega&&new Date>this.atividadeSelecionada?.dataLimiteEntrega)}classeAtividade(e){return+e?.cargaHoraria>=+this.atividadeSelecionada?.cargaHoraria&&+e?.quantidade>=+this.atividadeSelecionada?.quantidade&&this.atividadeSelecionada.tipo!=="CARGA_HORARIA_CUMPRIDA"||e?.cargaHorariaCumprida?"text-success":"text-danger"}static \u0275fac=function(i){return new(i||o)(C(q),C(Ae),C(he),C(te),C(ie),C(V))};static \u0275cmp=R({type:o,selectors:[["app-atividade-extra-lancamento-docente"]],standalone:!0,features:[O,P],decls:84,vars:28,consts:[[1,"container-fluid"],[1,"card-panel","mt-3"],[1,"row"],[1,"col-12","col-md-6"],["page-title","ATIVIDADES EXTRAS","page-subtitle","Cadastro e altera\xE7\xE3o de notas das atividades extras.","
1icon-title","list-check"],[1,"col-6"],[1,"col-12","col-md-3"],["for","numero",1,"font-bold"],[1,"form-select",3,"ngModelChange","change","ngModel"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"col-12","col-md-9"],["for","nome",1,"font-bold"],[1,"form-select",3,"ngModelChange","change","ngModel","disabled"],[3,"ngValue"],[1,"col-12","col-md-12"],[3,"value"],[1,"form-select",3,"change","ngModelChange","disabled","ngModel"],[1,"row","mt-4"],[1,"col-md"],[1,"table-responsive"],[1,"table","table-striped","table-light"],["scope","col",1,"text-center"],["class","text-center align-middle",4,"ngFor","ngForOf"],[1,"col-12"],["scope","col","class","text-center",4,"ngIf"],[4,"ngIf"],[1,"text-center","align-middle"],[1,"text-left"],["class","badge badge-sm text-bg-dark",4,"ngIf"],[3,"class",4,"ngIf"],[1,"badge","badge-sm","text-bg-dark"],["min","1",1,"form-control",3,"ngModelChange","blur","ngModel","imask","unmask","disabled"],[1,"form-group"],["type","checkbox",3,"ngModelChange","change","ngModel","disabled"]],template:function(i,t){i&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),y(4,"app-page-header",4),a()(),y(5,"hr"),n(6,"div",2)(7,"div",5)(8,"div",2)(9,"div",6)(10,"label",7),d(11,"Ano"),a(),n(12,"select",8),h("ngModelChange",function(l){return A(t.anoLetivoSelecionado,l)||(t.anoLetivoSelecionado=l),l}),v("change",function(){return t.mudancaAno()}),_(13,$e,2,2,"option",9),a()(),n(14,"div",10)(15,"label",11),d(16,"Coordenador(a)"),a(),n(17,"select",12),h("ngModelChange",function(l){return A(t.docenteSelecionado,l)||(t.docenteSelecionado=l),l}),v("change",function(){return t.carregarCursos()}),n(18,"option",13),d(19,"Selecione..."),a(),_(20,ze,2,2,"option",9),a()()(),n(21,"div",2)(22,"div",14)(23,"label",11),d(24,"Curso"),a(),n(25,"select",12),h("ngModelChange",function(l){return A(t.cursoSelecionado,l)||(t.cursoSelecionado=l),l}),v("change",function(){return t.carregarSeries()}),y(26,"option",15),_(27,Xe,2,2,"option",9),a()(),n(28,"div",3)(29,"label",11),d(30,"Serie"),a(),n(31,"select",12),h("ngModelChange",function(l){return A(t.serieSelecionada,l)||(t.serieSelecionada=l),l}),v("change",function(){return t.carregarTurmas()}),y(32,"option",15),_(33,Ze,2,2,"option",9),a()(),n(34,"div",3)(35,"label",11),d(36,"Turma"),a(),n(37,"select",16),v("change",function(){return t.carregarAlunos()}),h("ngModelChange",function(l){return A(t.turmaSelecionada,l)||(t.turmaSelecionada=l),l}),y(38,"option",15),_(39,Je,2,2,"option",9),a()()(),n(40,"div",2)(41,"div",14)(42,"label",11),d(43,"Atividade Extra"),a(),n(44,"select",12),h("ngModelChange",function(l){return A(t.atividadeSelecionada,l)||(t.atividadeSelecionada=l),l}),v("change",function(){return t.carregarAtividadesAlunos()}),y(45,"option",15),_(46,Ke,2,2,"option",9),a()()()(),n(47,"div",5)(48,"div",17)(49,"div",18)(50,"div",19)(51,"table",20)(52,"thead")(53,"tr")(54,"th",21),d(55,"Nome"),a(),n(56,"th",21),d(57,"Tipo"),a(),n(58,"th",21),d(59,"Carga Hor\xE1ria"),a(),n(60,"th",21),d(61,"Qtde."),a(),n(62,"th",21),d(63,"Dt. Limite"),a()()(),n(64,"tbody"),_(65,Ye,13,8,"tr",22),a()()()()()()(),n(66,"div",2)(67,"div",23)(68,"div",17)(69,"div",18)(70,"div",19)(71,"table",20)(72,"thead")(73,"tr")(74,"th",21),d(75,"N\xBA"),a(),n(76,"th",21),d(77,"Aluno"),a(),_(78,et,2,0,"th",24)(79,tt,5,0,"ng-container",25)(80,it,5,0,"ng-container",25)(81,at,2,0,"th",24),a()(),n(82,"tbody"),_(83,ct,11,8,"tr",22),a()()()()()()()()()),i&2&&(r(12),S("ngModel",t.anoLetivoSelecionado),r(),c("ngForOf",t.anosLetivos),r(4),S("ngModel",t.docenteSelecionado),c("disabled",!(t.anoLetivoSelecionado!=null&&t.anoLetivoSelecionado.id)||t.coordenador),r(),c("ngValue",null),r(2),c("ngForOf",t.docentes),r(5),S("ngModel",t.curs
1oSelecionado),c("disabled",!t.docenteSelecionado||!!(t.serieSelecionada!=null&&t.serieSelecionada.id)),r(),c("value",null),r(),c("ngForOf",t.cursosDocente),r(4),S("ngModel",t.serieSelecionada),c("disabled",!t.cursoSelecionado||!!(t.turmaSelecionada!=null&&t.turmaSelecionada.id)),r(),c("value",null),r(),c("ngForOf",t.listaSeries),r(4),c("disabled",!t.serieSelecionada||!!(t.atividadeSelecionada!=null&&t.atividadeSelecionada.id)),S("ngModel",t.turmaSelecionada),r(),c("value",null),r(),c("ngForOf",t.listaTurmas),r(5),S("ngModel",t.atividadeSelecionada),c("disabled",!(t.turmaSelecionada!=null&&t.turmaSelecionada.id)||t.carregando),r(),c("value",null),r(),c("ngForOf",t.listaAtividadesExtras),r(19),c("ngForOf",t.listaAtividadesExtras),r(13),c("ngIf",t.atividadeSelecionada),r(),c("ngIf",(t.atividadeSelecionada==null?null:t.atividadeSelecionada.tipo)==="CARGA_HORARIA"||(t.atividadeSelecionada==null?null:t.atividadeSelecionada.tipo)==="CARGA_HORARIA_QUANTIDADE"),r(),c("ngIf",(t.atividadeSelecionada==null?null:t.atividadeSelecionada.tipo)==="CARGA_HORARIA_QUANTIDADE"||(t.atividadeSelecionada==null?null:t.atividadeSelecionada.tipo)==="QUANTIDADE"),r(),c("ngIf",(t.atividadeSelecionada==null?null:t.atividadeSelecionada.tipo)==="CARGA_HORARIA_CUMPRIDA"),r(2),c("ngForOf",t.listaAlunos))},dependencies:[Y,J,K,$,G,Z,z,X,ae,Q,k,B,U,j,ee,de,ne,re,oe]})}return o})();var Zt=[{path:"",component:ue,children:[{path:"",pathMatch:"full",redirectTo:"novo"},{path:"novo",component:Ce},{path:"coordenador",component:fe}]}];export{Zt as ROTA_ATIVIDADE_EXTRA};
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.