-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path32.52968a7c31fc0288c5d3.js
1 lines (1 loc) · 9.39 KB
/
32.52968a7c31fc0288c5d3.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[32],{Ac4m:function(e,t,i){"use strict";i.r(t),i.d(t,"DepartmanModule",function(){return F});var n=i("ofXK"),a=i("3Pt+"),l=i("tyNb"),c=i("1SLH"),s=i("rEr+"),r=i("jIHw"),b=i("M2/K"),o=i("fXoL"),d=i("j0Dl"),u=i("eKg/"),p=i("GusI"),g=i("qwFa"),m=i("7kUa"),f=i("7zfz");const h=["menu"];function v(e,t){1&e&&(o.Pb(0,"h5"),o.Cc(1,"Yeni Departman"),o.Ob())}function y(e,t){1&e&&(o.Pb(0,"h5"),o.Cc(1,"Departman G\xfcncelle"),o.Ob())}function S(e,t){1&e&&(o.Pb(0,"h5"),o.Cc(1,"Departman Sil"),o.Ob())}function K(e,t){if(1&e){const e=o.Qb();o.Pb(0,"input",13),o.Wb("ngModelChange",function(t){return o.sc(e),o.Yb(2).departman.ad=t}),o.Ob()}if(2&e){const e=o.Yb(2);o.fc("ngModel",e.departman.ad)}}function P(e,t){if(1&e&&(o.Pb(0,"span"),o.Cc(1),o.Ob()),2&e){const e=o.Yb(2);o.yb(1),o.Dc(e.departman.ad)}}function k(e,t){if(1&e){const e=o.Qb();o.Pb(0,"button",14),o.Wb("click",function(){return o.sc(e),o.Yb(2).kaydet()}),o.Zb(1,"translate"),o.Ob()}if(2&e){const e=o.Yb(2);o.fc("disabled",e.genelService.islemDevam)("label",o.ac(1,2,"save"))}}function O(e,t){if(1&e){const e=o.Qb();o.Pb(0,"button",14),o.Wb("click",function(){return o.sc(e),o.Yb(2).guncelleOnay()}),o.Zb(1,"translate"),o.Ob()}if(2&e){const e=o.Yb(2);o.fc("disabled",e.genelService.islemDevam)("label",o.ac(1,2,"save"))}}function D(e,t){if(1&e){const e=o.Qb();o.Pb(0,"button",14),o.Wb("click",function(){return o.sc(e),o.Yb(2).silOnay()}),o.Zb(1,"translate"),o.Ob()}if(2&e){const e=o.Yb(2);o.fc("disabled",e.genelService.islemDevam)("label",o.ac(1,2,"delete"))}}function I(e,t){if(1&e){const e=o.Qb();o.Pb(0,"button",15),o.Wb("click",function(){return o.sc(e),o.Yb(2).vazgec()}),o.Zb(1,"translate"),o.Ob()}if(2&e){const e=o.Yb(2);o.fc("disabled",e.genelService.islemDevam)("label",o.ac(1,2,"cancel"))}}function M(e,t){if(1&e&&(o.Pb(0,"div",2),o.Pb(1,"div",3),o.Pb(2,"div",4),o.Ac(3,v,2,0,"h5",5),o.Ac(4,y,2,0,"h5",5),o.Ac(5,S,2,0,"h5",5),o.Ob(),o.Pb(6,"div",0),o.Pb(7,"div",6),o.Pb(8,"span",7),o.Cc(9),o.Zb(10,"translate"),o.Ob(),o.Ob(),o.Pb(11,"div",8),o.Ac(12,K,1,1,"input",9),o.Ac(13,P,2,1,"span",5),o.Ob(),o.Pb(14,"div",10),o.Ac(15,k,2,4,"button",11),o.Ac(16,O,2,4,"button",11),o.Ac(17,D,2,4,"button",11),o.Ac(18,I,2,4,"button",12),o.Ob(),o.Ob(),o.Ob(),o.Ob()),2&e){const e=o.Yb();o.yb(3),o.fc("ngIf",e.yeniKayit),o.yb(1),o.fc("ngIf",e.guncelleKayit),o.yb(1),o.fc("ngIf",e.silKayit),o.yb(4),o.Dc(o.ac(10,10,"name")),o.yb(3),o.fc("ngIf",e.yeniKayit||e.guncelleKayit),o.yb(1),o.fc("ngIf",e.silKayit),o.yb(2),o.fc("ngIf",e.yeniKayit),o.yb(1),o.fc("ngIf",e.guncelleKayit),o.yb(1),o.fc("ngIf",e.silKayit),o.yb(1),o.fc("ngIf",e.yeniKayit||e.guncelleKayit||e.silKayit)}}function Y(e,t){if(1&e){const e=o.Qb();o.Pb(0,"button",22),o.Wb("click",function(){return o.sc(e),o.Yb(3).yeniDepartman()}),o.Ob()}if(2&e){const e=o.Yb(3);o.fc("disabled",e.genelService.islemDevam)}}function w(e,t){if(1&e&&(o.Pb(0,"div",20),o.Ac(1,Y,1,1,"button",21),o.Ob()),2&e){const e=o.Yb(2);o.yb(1),o.fc("ngIf",!e.yeniKayit&&!e.guncelleKayit&&!e.silKayit&&e.kullaniciService.kullanici.admin)}}function A(e,t){1&e&&(o.Pb(0,"tr"),o.Kb(1,"th",23),o.Pb(2,"th"),o.Cc(3),o.Zb(4,"translate"),o.Ob(),o.Ob()),2&e&&(o.yb(3),o.Dc(o.ac(4,1,"records")))}function z(e,t){if(1&e){const e=o.Qb();o.Pb(0,"tr"),o.Pb(1,"td"),o.Pb(2,"button",24),o.Wb("click",function(i){o.sc(e);const n=t.$implicit,a=t.rowIndex;return o.Yb(2).generateMenuCommands(n,a,i)}),o.Ob(),o.Kb(3,"p-menu",25,26),o.Ob(),o.Pb(5,"td"),o.Pb(6,"div",0),o.Pb(7,"div",27),o.Cc(8),o.Zb(9,"translate"),o.Ob(),o.Pb(10,"div",8),o.Cc(11),o.Ob(),o.Ob(),o.Ob(),o.Ob()}if(2&e){const e=t.$implicit,i=o.Yb(2);o.yb(2),o.fc("disabled",i.genelService.islemDevam),o.yb(1),o.fc("model",i.menuModel)("popup",!0),o.yb(5),o.Dc(o.ac(9,5,"name")),o.yb(3),o.Dc(e.ad)}}function C(e,t){if(1&e){const e=o.Qb();o.Pb(0,"div",2),o.Pb(1,"p-table",16),o.Wb("onLazyLoad",function(t){return o.sc(e),o.Yb().gridLazyEvent(t)}),o.Ac(2,w,2,1,"ng-template",17),o.Ac(3,A,5,3,"ng-template",18),o.Ac(4,z,12,7,"ng-template",19),o.Ob(),o.Ob()}if(2&e){const e=o.Yb();o.yb(1),o.fc("lazy",!0)("loading",e.tableModel.loading)("paginator",!0)("rows",10)("totalRecords",e.tableModel.count)("value",e.tableModel.data)}}let L=(()=>{class e{constructor(e,t,i,n){this.genelService=e,this.translatePipe=t,this.kullaniciService=i,this.departmanService=n,this.tableModel=new b.a,this.departman=null,this.yeniKayit=!1,this.guncelleKayit=!1,this.silKayit=!1,this.menuModel=[]}generateMenuCommands(e,t,i){this.menuModel=[{label:this.translatePipe.transform("update"),command:()=>{this.departman=e,this.guncelle()},icon:"fas fa-edit",visible:this.kullaniciService.yetkiKontrolKullaniciAdminMi()},{label:this.translatePipe.transform("delete"),command:()=>{this.departman=e,this.sil()},icon:"fas fa-trash-alt",visible:this.kullaniciService.yetkiKontrolKullaniciAdminMi()}],this.menuList.toArray()[t%10].toggle(i)}yeniDepartman(){this.genelService.messageClear(),this.departman={ad:"",kurum:{id:this.kullaniciService.seciliKullaniciKurumYetki.kurum.id,ad:this.kullaniciService.seciliKullaniciKurumYetki.kurum.ad}},this.yeniKayit=!0}kaydet(){null==this.departman.ad||this.departman.ad.length<1?this.genelService.messageWarn(this.translatePipe.transform("missingValue"),this.translatePipe.transform("nameCannotBeEmpty")):(this.departman.id=null,this.genelService.islemDevam=!0,this.departmanService.kaydet(this.departman).subscribe(()=>{this.genelService.messageSuccess(this.translatePipe.transform("success"),this.translatePipe.transform("saved")),this.genelService.islemDevam=!1,this.vazgec(),this.gridLazyEvent(null)},e=>{this.genelService.errorHandler(e)}))}guncelle(){null!=this.departman&&null!=this.departman.id?this.guncelleKayit=!0:this.genelService.messageWarn("",this.translatePipe.transform("selectRecordFirst"))}guncelleOnay(){this.genelService.islemDevam=!0,this.departmanService.guncelle(this.departman).subscribe(()=>{this.genelService.islemDevam=!1,this.genelService.messageSuccess("",this.translatePipe.transform("updated")),this.vazgec(),this.gridLazyEvent(null)},e=>{this.genelService.errorHandler(e)})}sil(){this.silKayit=!0}silOnay(){null!=this.departman&&null!=this.departman.id?(this.genelService.islemDevam=!0,this.departmanService.sil(this.departman).subscribe(()=>{this.genelService.islemDevam=!1,this.genelService.messageSuccess("",this.translatePipe.transform("deleted")),this.departman=null,this.vazgec(),this.gridLazyEvent(null)},e=>{this.genelService.errorHandler(e)})):this.genelService.messageWarn("",this.translatePipe.transform("selectRecordFirst"))}vazgec(){this.yeniKayit=!1,this.guncelleKayit=!1,this.silKayit=!1,this.departman=null}gridLazyEvent(e){this.tableModel.loading=!0,this.departmanService.grid({page:null!=e&&null!=e.first?e.first:0,pageSize:null!=e&&null!=e.rows?e.rows:10,sortField:null!=e&&null!=e.sortField?e.sortField:"ad",sortOrder:null!=e&&null!=e.sortField?e.sortOrder:1,filters:{pasif:!1}}).subscribe(e=>{this.tableModel=e.tableModel,this.tableModel.loading=!1},e=>{this.genelService.errorHandler(e),this.tableModel.loading=!1})}ngOnInit(){this.kullaniciService.userScreen="departman",null==this.kullaniciService.token||this.kullaniciService.token.length<1?this.genelService.navigate(["/"]):null!=this.kullaniciService.kullanici&&this.kullaniciService.kullanici.admin?(this.genelService.kullaniciMobil=this.genelService.regex_Mobilmi(),this.genelService.getLocalIp()):this.genelService.navigate(["/dashboard"])}}return e.\u0275fac=function(t){return new(t||e)(o.Jb(d.a),o.Jb(u.a),o.Jb(p.a),o.Jb(g.a))},e.\u0275cmp=o.Db({type:e,selectors:[["app-departman"]],viewQuery:function(e,t){var i;1&e&&o.Ic(h,!0),2&e&&o.qc(i=o.Xb())&&(t.menuList=i)},decls:3,vars:2,consts:[[1,"p-grid","p-align-center","vertical-container"],["class","p-col-12",4,"ngIf"],[1,"p-col-12"],[1,"p-card","grid-card"],[1,"p-text-center"],[4,"ngIf"],[1,"p-col-12","p-md-4","p-lg-4"],[2,"font-weight","bold"],[1,"p-col-12","p-md-8","p-lg-8"],["pInputText","","style","width: 100%","type","text",3,"ngModel","ngModelChange",4,"ngIf"],[1,"p-col-12","p-text-center"],["class","p-button-success","pButton","",3,"disabled","label","click",4,"ngIf"],["class","p-button-danger","pButton","",3,"disabled","label","click",4,"ngIf"],["pInputText","","type","text",2,"width","100%",3,"ngModel","ngModelChange"],["pButton","",1,"p-button-success",3,"disabled","label","click"],["pButton","",1,"p-button-danger",3,"disabled","label","click"],["dataKey","id",3,"lazy","loading","paginator","rows","totalRecords","value","onLazyLoad"],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],[1,"p-grid","p-align-center","vertical-container","p-justify-center"],["label","Yeni Departman","class","p-button-success","pButton","",3,"disabled","click",4,"ngIf"],["label","Yeni Departman","pButton","",1,"p-button-success",3,"disabled","click"],[2,"text-align","center","width","54px"],["icon","fas fa-caret-square-down","pButton","",1,"p-button-info",3,"disabled","click"],[3,"model","popup"],["menu",""],[1,"p-col-12","p-md-4","p-lg-4",2,"font-weight","bold"]],template:function(e,t){1&e&&(o.Pb(0,"div",0),o.Ac(1,M,19,12,"div",1),o.Ac(2,C,5,6,"div",1),o.Ob()),2&e&&(o.yb(1),o.fc("ngIf",t.yeniKayit||t.guncelleKayit||t.silKayit),o.yb(1),o.fc("ngIf",!t.yeniKayit&&!t.guncelleKayit&&!t.silKayit))},directives:[n.m,a.a,m.a,a.f,a.g,r.b,s.d,f.j,c.a],pipes:[u.a],styles:[""]}),e})();var W=i("bKFz"),x=i("eO1q"),Q=i("dPl2");const B=[{path:"",component:L}];let F=(()=>{class e{}return e.\u0275mod=o.Hb({type:e}),e.\u0275inj=o.Gb({factory:function(t){return new(t||e)},imports:[[l.e.forChild(B),n.b,a.b,m.b,W.a,r.c,s.g,c.b,x.b,Q.c]]}),e})()}}]);