-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path37.dce7f47d7cab1f28484a.js
1 lines (1 loc) · 9.55 KB
/
37.dce7f47d7cab1f28484a.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[37],{jdzw:function(e,i,t){"use strict";t.r(i),t.d(i,"MasrafKategoriModule",function(){return B});var a=t("ofXK"),n=t("3Pt+"),l=t("tyNb"),s=t("1SLH"),c=t("rEr+"),r=t("jIHw"),o=t("bKFz"),b=t("7kUa"),u=t("eO1q"),g=t("dPl2"),d=t("M2/K"),f=t("fXoL"),m=t("j0Dl"),h=t("eKg/"),p=t("GusI"),v=t("dleH"),y=t("7zfz");const K=["menu"];function S(e,i){1&e&&(f.Pb(0,"h5"),f.Cc(1,"Yeni MasrafKategori"),f.Ob())}function k(e,i){1&e&&(f.Pb(0,"h5"),f.Cc(1,"MasrafKategori G\xfcncelle"),f.Ob())}function P(e,i){1&e&&(f.Pb(0,"h5"),f.Cc(1,"MasrafKategori Sil"),f.Ob())}function O(e,i){if(1&e){const e=f.Qb();f.Pb(0,"input",13),f.Wb("ngModelChange",function(i){return f.sc(e),f.Yb(2).masrafKategori.ad=i}),f.Ob()}if(2&e){const e=f.Yb(2);f.fc("ngModel",e.masrafKategori.ad)}}function M(e,i){if(1&e&&(f.Pb(0,"span"),f.Cc(1),f.Ob()),2&e){const e=f.Yb(2);f.yb(1),f.Dc(e.masrafKategori.ad)}}function I(e,i){if(1&e){const e=f.Qb();f.Pb(0,"button",14),f.Wb("click",function(){return f.sc(e),f.Yb(2).kaydet()}),f.Zb(1,"translate"),f.Ob()}if(2&e){const e=f.Yb(2);f.fc("disabled",e.genelService.islemDevam)("label",f.ac(1,2,"save"))}}function Y(e,i){if(1&e){const e=f.Qb();f.Pb(0,"button",14),f.Wb("click",function(){return f.sc(e),f.Yb(2).guncelleOnay()}),f.Zb(1,"translate"),f.Ob()}if(2&e){const e=f.Yb(2);f.fc("disabled",e.genelService.islemDevam)("label",f.ac(1,2,"save"))}}function w(e,i){if(1&e){const e=f.Qb();f.Pb(0,"button",14),f.Wb("click",function(){return f.sc(e),f.Yb(2).silOnay()}),f.Zb(1,"translate"),f.Ob()}if(2&e){const e=f.Yb(2);f.fc("disabled",e.genelService.islemDevam)("label",f.ac(1,2,"delete"))}}function z(e,i){if(1&e){const e=f.Qb();f.Pb(0,"button",15),f.Wb("click",function(){return f.sc(e),f.Yb(2).vazgec()}),f.Zb(1,"translate"),f.Ob()}if(2&e){const e=f.Yb(2);f.fc("disabled",e.genelService.islemDevam)("label",f.ac(1,2,"cancel"))}}function D(e,i){if(1&e&&(f.Pb(0,"div",2),f.Pb(1,"div",3),f.Pb(2,"div",4),f.Ac(3,S,2,0,"h5",5),f.Ac(4,k,2,0,"h5",5),f.Ac(5,P,2,0,"h5",5),f.Ob(),f.Pb(6,"div",0),f.Pb(7,"div",6),f.Pb(8,"span",7),f.Cc(9),f.Zb(10,"translate"),f.Ob(),f.Ob(),f.Pb(11,"div",8),f.Ac(12,O,1,1,"input",9),f.Ac(13,M,2,1,"span",5),f.Ob(),f.Pb(14,"div",10),f.Ac(15,I,2,4,"button",11),f.Ac(16,Y,2,4,"button",11),f.Ac(17,w,2,4,"button",11),f.Ac(18,z,2,4,"button",12),f.Ob(),f.Ob(),f.Ob(),f.Ob()),2&e){const e=f.Yb();f.yb(3),f.fc("ngIf",e.yeniKayit),f.yb(1),f.fc("ngIf",e.guncelleKayit),f.yb(1),f.fc("ngIf",e.silKayit),f.yb(4),f.Dc(f.ac(10,10,"name")),f.yb(3),f.fc("ngIf",e.yeniKayit||e.guncelleKayit),f.yb(1),f.fc("ngIf",e.silKayit),f.yb(2),f.fc("ngIf",e.yeniKayit),f.yb(1),f.fc("ngIf",e.guncelleKayit),f.yb(1),f.fc("ngIf",e.silKayit),f.yb(1),f.fc("ngIf",e.yeniKayit||e.guncelleKayit||e.silKayit)}}function A(e,i){if(1&e){const e=f.Qb();f.Pb(0,"button",22),f.Wb("click",function(){return f.sc(e),f.Yb(3).yeniMasrafKategori()}),f.Ob()}if(2&e){const e=f.Yb(3);f.fc("disabled",e.genelService.islemDevam)}}function C(e,i){if(1&e&&(f.Pb(0,"div",20),f.Ac(1,A,1,1,"button",21),f.Ob()),2&e){const e=f.Yb(2);f.yb(1),f.fc("ngIf",!e.yeniKayit&&!e.guncelleKayit&&!e.silKayit&&e.kullaniciService.kullanici.admin)}}function L(e,i){1&e&&(f.Pb(0,"tr"),f.Kb(1,"th",23),f.Pb(2,"th"),f.Cc(3),f.Zb(4,"translate"),f.Ob(),f.Ob()),2&e&&(f.yb(3),f.Dc(f.ac(4,1,"records")))}function W(e,i){if(1&e){const e=f.Qb();f.Pb(0,"tr"),f.Pb(1,"td"),f.Pb(2,"button",24),f.Wb("click",function(t){f.sc(e);const a=i.$implicit,n=i.rowIndex;return f.Yb(2).generateMenuCommands(a,n,t)}),f.Ob(),f.Kb(3,"p-menu",25,26),f.Ob(),f.Pb(5,"td"),f.Pb(6,"div",0),f.Pb(7,"div",27),f.Cc(8),f.Zb(9,"translate"),f.Ob(),f.Pb(10,"div",8),f.Cc(11),f.Ob(),f.Ob(),f.Ob(),f.Ob()}if(2&e){const e=i.$implicit,t=f.Yb(2);f.yb(2),f.fc("disabled",t.genelService.islemDevam),f.yb(1),f.fc("model",t.menuModel)("popup",!0),f.yb(5),f.Dc(f.ac(9,5,"name")),f.yb(3),f.Dc(e.ad)}}function x(e,i){if(1&e){const e=f.Qb();f.Pb(0,"div",2),f.Pb(1,"p-table",16),f.Wb("onLazyLoad",function(i){return f.sc(e),f.Yb().gridLazyEvent(i)}),f.Ac(2,C,2,1,"ng-template",17),f.Ac(3,L,5,3,"ng-template",18),f.Ac(4,W,12,7,"ng-template",19),f.Ob(),f.Ob()}if(2&e){const e=f.Yb();f.yb(1),f.fc("lazy",!0)("loading",e.tableModel.loading)("paginator",!0)("rows",10)("totalRecords",e.tableModel.count)("value",e.tableModel.data)}}const Q=[{path:"",component:(()=>{class e{constructor(e,i,t,a){this.genelService=e,this.translatePipe=i,this.kullaniciService=t,this.masrafKategoriService=a,this.tableModel=new d.a,this.masrafKategori=null,this.yeniKayit=!1,this.guncelleKayit=!1,this.silKayit=!1,this.menuModel=[]}generateMenuCommands(e,i,t){this.menuModel=[{label:this.translatePipe.transform("update"),command:()=>{this.masrafKategori=e,this.guncelle()},icon:"fas fa-edit",visible:this.kullaniciService.yetkiKontrolKullaniciAdminMi()},{label:this.translatePipe.transform("delete"),command:()=>{this.masrafKategori=e,this.sil()},icon:"fas fa-trash-alt",visible:this.kullaniciService.yetkiKontrolKullaniciAdminMi()}],this.menuList.toArray()[i%10].toggle(t)}yeniMasrafKategori(){this.genelService.messageClear(),this.masrafKategori={ad:"",kurum:{id:this.kullaniciService.seciliKullaniciKurumYetki.kurum.id,ad:this.kullaniciService.seciliKullaniciKurumYetki.kurum.ad}},this.yeniKayit=!0}kaydet(){null==this.masrafKategori.ad||this.masrafKategori.ad.length<1?this.genelService.messageWarn(this.translatePipe.transform("missingValue"),this.translatePipe.transform("nameCannotBeEmpty")):(this.masrafKategori.id=null,this.genelService.islemDevam=!0,this.masrafKategoriService.kaydet(this.masrafKategori).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.masrafKategori&&null!=this.masrafKategori.id?this.guncelleKayit=!0:this.genelService.messageWarn("",this.translatePipe.transform("selectRecordFirst"))}guncelleOnay(){this.genelService.islemDevam=!0,this.masrafKategoriService.guncelle(this.masrafKategori).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.masrafKategori&&null!=this.masrafKategori.id?(this.genelService.islemDevam=!0,this.masrafKategoriService.sil(this.masrafKategori).subscribe(()=>{this.genelService.islemDevam=!1,this.genelService.messageSuccess("",this.translatePipe.transform("deleted")),this.masrafKategori=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.masrafKategori=null}gridLazyEvent(e){this.tableModel.loading=!0,this.masrafKategoriService.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="masrafKategori",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(i){return new(i||e)(f.Jb(m.a),f.Jb(h.a),f.Jb(p.a),f.Jb(v.a))},e.\u0275cmp=f.Db({type:e,selectors:[["app-masraf-kategori"]],viewQuery:function(e,i){var t;1&e&&f.Ic(K,!0),2&e&&f.qc(t=f.Xb())&&(i.menuList=t)},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 Masraf Kategori","class","p-button-success","pButton","",3,"disabled","click",4,"ngIf"],["label","Yeni Masraf Kategori","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,i){1&e&&(f.Pb(0,"div",0),f.Ac(1,D,19,12,"div",1),f.Ac(2,x,5,6,"div",1),f.Ob()),2&e&&(f.yb(1),f.fc("ngIf",i.yeniKayit||i.guncelleKayit||i.silKayit),f.yb(1),f.fc("ngIf",!i.yeniKayit&&!i.guncelleKayit&&!i.silKayit))},directives:[a.m,n.a,b.a,n.f,n.g,r.b,c.d,y.j,s.a],pipes:[h.a],styles:[""]}),e})()}];let B=(()=>{class e{}return e.\u0275mod=f.Hb({type:e}),e.\u0275inj=f.Gb({factory:function(i){return new(i||e)},imports:[[l.e.forChild(Q),a.b,n.b,b.b,o.a,r.c,c.g,s.b,u.b,g.c]]}),e})()}}]);