-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path33.76b89c32376961b06f3f.js
1 lines (1 loc) · 22.2 KB
/
33.76b89c32376961b06f3f.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[33],{"8Hhv":function(e,i,t){"use strict";t.r(i),t.d(i,"DuyuruModule",function(){return oe});var n=t("ofXK"),a=t("3Pt+"),l=t("tyNb"),c=t("1SLH"),s=t("rEr+"),u=t("jIHw"),b=t("M2/K"),r=t("p5wL"),o=t("fXoL"),d=t("j0Dl"),y=t("eKg/"),f=t("GusI"),g=t("ZqkM"),h=t("mnRn"),p=t("dPl2"),m=t("7kUa"),v=t("eO1q"),P=t("dgC2"),O=t("7zfz");const k=["editor"],K=["menu"];function S(e,i){1&e&&(o.Pb(0,"h5"),o.Cc(1),o.Zb(2,"translate"),o.Ob()),2&e&&(o.yb(1),o.Dc(o.ac(2,1,"newAnnounceRecord")))}function M(e,i){1&e&&(o.Pb(0,"h5"),o.Cc(1),o.Zb(2,"translate"),o.Ob()),2&e&&(o.yb(1),o.Dc(o.ac(2,1,"updateAnnounceRecord")))}function I(e,i){1&e&&(o.Pb(0,"h5"),o.Cc(1),o.Zb(2,"translate"),o.Ob()),2&e&&(o.yb(1),o.Dc(o.ac(2,1,"deleteAnnounceRecord")))}function D(e,i){if(1&e){const e=o.Qb();o.Pb(0,"button",23),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 C(e,i){if(1&e){const e=o.Qb();o.Pb(0,"button",23),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 w(e,i){if(1&e){const e=o.Qb();o.Pb(0,"button",23),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 Y(e,i){if(1&e){const e=o.Qb();o.Pb(0,"button",24),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 A(e,i){if(1&e){const e=o.Qb();o.Pb(0,"input",25),o.Wb("ngModelChange",function(i){return o.sc(e),o.Yb(2).duyuru.oneCikanResim=i}),o.Ob()}if(2&e){const e=o.Yb(2);o.fc("ngModel",e.duyuru.oneCikanResim)}}function Z(e,i){if(1&e){const e=o.Qb();o.Pb(0,"button",26),o.Wb("click",function(){return o.sc(e),o.Yb(2).selectOneCikanResim()}),o.Ob()}}function T(e,i){if(1&e&&o.Kb(0,"img",27),2&e){const e=o.Yb(2);o.fc("src",e.duyuru.oneCikanResim,o.vc)}}function x(e,i){if(1&e){const e=o.Qb();o.Pb(0,"input",28),o.Wb("ngModelChange",function(i){return o.sc(e),o.Yb(2).duyuru.baslik=i}),o.Ob()}if(2&e){const e=o.Yb(2);o.fc("ngModel",e.duyuru.baslik)}}function z(e,i){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.duyuru.baslik)}}function R(e,i){if(1&e){const e=o.Qb();o.Pb(0,"p-calendar",29),o.Wb("ngModelChange",function(i){return o.sc(e),o.Yb(2).duyuru.baslamaTarihi=i}),o.Ob()}if(2&e){const e=o.Yb(2);o.fc("ngModel",e.duyuru.baslamaTarihi)("monthNavigator",!0)}}function W(e,i){if(1&e&&(o.Pb(0,"span"),o.Cc(1),o.Zb(2,"date"),o.Ob()),2&e){const e=o.Yb(2);o.yb(1),o.Dc(o.bc(2,1,e.duyuru.baslamaTarihi,"dd.MM.yyyy"))}}function Q(e,i){if(1&e){const e=o.Qb();o.Pb(0,"p-calendar",29),o.Wb("ngModelChange",function(i){return o.sc(e),o.Yb(2).duyuru.bitisTarihi=i}),o.Ob()}if(2&e){const e=o.Yb(2);o.fc("ngModel",e.duyuru.bitisTarihi)("monthNavigator",!0)}}function q(e,i){if(1&e&&(o.Pb(0,"span"),o.Cc(1),o.Zb(2,"date"),o.Ob()),2&e){const e=o.Yb(2);o.yb(1),o.Dc(o.bc(2,1,e.duyuru.bitisTarihi,"dd.MM.yyyy"))}}function E(e,i){if(1&e){const e=o.Qb();o.Pb(0,"p-calendar",29),o.Wb("ngModelChange",function(i){return o.sc(e),o.Yb(2).duyuru.tarih=i}),o.Ob()}if(2&e){const e=o.Yb(2);o.fc("ngModel",e.duyuru.tarih)("monthNavigator",!0)}}function B(e,i){if(1&e&&(o.Pb(0,"span"),o.Cc(1),o.Zb(2,"date"),o.Ob()),2&e){const e=o.Yb(2);o.yb(1),o.Dc(o.bc(2,1,e.duyuru.tarih,"dd.MM.yyyy"))}}const L=function(){return{width:"100%"}};function F(e,i){if(1&e){const e=o.Qb();o.Pb(0,"p-editor",30,31),o.Wb("ngModelChange",function(i){return o.sc(e),o.Yb(2).duyuru.detay=i}),o.Pb(2,"p-header"),o.Pb(3,"span",32),o.Pb(4,"select",33),o.Pb(5,"option",34),o.Cc(6),o.Zb(7,"translate"),o.Ob(),o.Pb(8,"option",35),o.Cc(9),o.Zb(10,"translate"),o.Ob(),o.Pb(11,"option",36),o.Cc(12),o.Zb(13,"translate"),o.Ob(),o.Pb(14,"option",37),o.Cc(15),o.Zb(16,"translate"),o.Ob(),o.Pb(17,"option",38),o.Cc(18),o.Zb(19,"translate"),o.Ob(),o.Pb(20,"option",39),o.Cc(21),o.Zb(22,"translate"),o.Ob(),o.Ob(),o.Pb(23,"select",40),o.Pb(24,"option",34),o.Cc(25,"Sans Serif"),o.Ob(),o.Pb(26,"option",41),o.Cc(27,"Serif"),o.Ob(),o.Pb(28,"option",42),o.Cc(29,"Monospace"),o.Ob(),o.Ob(),o.Ob(),o.Pb(30,"span",32),o.Kb(31,"button",43),o.Kb(32,"button",44),o.Kb(33,"button",45),o.Ob(),o.Pb(34,"span",32),o.Kb(35,"select",46),o.Kb(36,"select",47),o.Ob(),o.Pb(37,"span",32),o.Kb(38,"button",48),o.Kb(39,"button",49),o.Pb(40,"select",50),o.Kb(41,"option",34),o.Kb(42,"option",51),o.Kb(43,"option",52),o.Kb(44,"option",53),o.Ob(),o.Ob(),o.Pb(45,"span",32),o.Kb(46,"button",54),o.Kb(47,"button",55),o.Pb(48,"button",56),o.Wb("click",function(i){return o.sc(e),o.Yb(2).insertImageEditor(i)}),o.Ob(),o.Ob(),o.Pb(49,"span",32),o.Kb(50,"button",57),o.Ob(),o.Ob(),o.Ob()}if(2&e){const e=o.Yb(2);o.yc(o.hc(22,L)),o.fc("ngModel",e.duyuru.detay)("readonly",e.silKayit),o.yb(6),o.Dc(o.ac(7,10,"normal")),o.yb(3),o.Dc(o.ac(10,12,"pageHeader")),o.yb(3),o.Dc(o.ac(13,14,"pageSubHeader")),o.yb(3),o.Dc(o.ac(16,16,"header")),o.yb(3),o.Dc(o.ac(19,18,"entry")),o.yb(3),o.Dc(o.ac(22,20,"subEntry"))}}function H(e,i){if(1&e){const e=o.Qb();o.Pb(0,"textarea",59),o.Wb("ngModelChange",function(i){return o.sc(e),o.Yb(3).duyuru.detay=i}),o.Ob()}if(2&e){const e=o.Yb(3);o.fc("ngModel",e.duyuru.detay)("disabled",e.silKayit)("rows",4)}}function J(e,i){if(1&e&&(o.Pb(0,"p-tabPanel",20),o.Zb(1,"translate"),o.Ac(2,H,1,3,"textarea",58),o.Ob()),2&e){const e=o.Yb(2);o.fc("header",o.ac(1,2,"htmlCode")),o.yb(2),o.fc("ngIf",1===e.tabIndex)}}function j(e,i){if(1&e){const e=o.Qb();o.Pb(0,"button",23),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 N(e,i){if(1&e){const e=o.Qb();o.Pb(0,"button",23),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 $(e,i){if(1&e){const e=o.Qb();o.Pb(0,"button",23),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 U(e,i){if(1&e){const e=o.Qb();o.Pb(0,"button",24),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 X(e,i){if(1&e){const e=o.Qb();o.Pb(0,"div",2),o.Pb(1,"div",3),o.Pb(2,"div",4),o.Ac(3,S,3,3,"h5",5),o.Ac(4,M,3,3,"h5",5),o.Ac(5,I,3,3,"h5",5),o.Ob(),o.Pb(6,"div",0),o.Pb(7,"div",6),o.Ac(8,D,2,4,"button",7),o.Ac(9,C,2,4,"button",7),o.Ac(10,w,2,4,"button",7),o.Ac(11,Y,2,4,"button",8),o.Ob(),o.Pb(12,"div",2),o.Pb(13,"ul"),o.Pb(14,"li"),o.Cc(15),o.Zb(16,"translate"),o.Ob(),o.Pb(17,"li"),o.Cc(18),o.Zb(19,"translate"),o.Ob(),o.Pb(20,"li"),o.Cc(21),o.Zb(22,"translate"),o.Ob(),o.Ob(),o.Ob(),o.Pb(23,"div",2),o.Pb(24,"div",0),o.Pb(25,"div",9),o.Pb(26,"div",2),o.Pb(27,"span",10),o.Cc(28),o.Zb(29,"translate"),o.Ob(),o.Ob(),o.Pb(30,"div",2),o.Ac(31,A,1,1,"input",11),o.Ac(32,Z,1,0,"button",12),o.Ob(),o.Ob(),o.Pb(33,"div",13),o.Ac(34,T,1,1,"img",14),o.Ob(),o.Ob(),o.Ob(),o.Pb(35,"div",15),o.Pb(36,"span",10),o.Cc(37),o.Zb(38,"translate"),o.Ob(),o.Ob(),o.Pb(39,"div",16),o.Ac(40,x,1,1,"input",17),o.Ac(41,z,2,1,"span",5),o.Ob(),o.Pb(42,"div",15),o.Pb(43,"span",10),o.Cc(44),o.Zb(45,"translate"),o.Ob(),o.Ob(),o.Pb(46,"div",16),o.Ac(47,R,1,2,"p-calendar",18),o.Ac(48,W,3,4,"span",5),o.Ob(),o.Pb(49,"div",15),o.Pb(50,"span",10),o.Cc(51),o.Zb(52,"translate"),o.Ob(),o.Ob(),o.Pb(53,"div",16),o.Ac(54,Q,1,2,"p-calendar",18),o.Ac(55,q,3,4,"span",5),o.Ob(),o.Pb(56,"div",15),o.Pb(57,"span",10),o.Cc(58),o.Zb(59,"translate"),o.Ob(),o.Ob(),o.Pb(60,"div",16),o.Ac(61,E,1,2,"p-calendar",18),o.Ac(62,B,3,4,"span",5),o.Ob(),o.Pb(63,"div",2),o.Pb(64,"span",10),o.Cc(65),o.Zb(66,"translate"),o.Ob(),o.Ob(),o.Pb(67,"div",2),o.Pb(68,"p-tabView",19),o.Wb("onChange",function(i){return o.sc(e),o.Yb().tabIndex=i.index}),o.Pb(69,"p-tabPanel",20),o.Zb(70,"translate"),o.Ac(71,F,51,23,"p-editor",21),o.Ob(),o.Ac(72,J,3,4,"p-tabPanel",22),o.Ob(),o.Ob(),o.Pb(73,"div",6),o.Ac(74,j,2,4,"button",7),o.Ac(75,N,2,4,"button",7),o.Ac(76,$,2,4,"button",7),o.Ac(77,U,2,4,"button",8),o.Ob(),o.Ob(),o.Ob(),o.Ob()}if(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(3),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),o.yb(4),o.Dc(o.ac(16,34,"announceDescriptionOne")),o.yb(3),o.Dc(o.ac(19,36,"announceDescriptionTwo")),o.yb(3),o.Dc(o.ac(22,38,"announceDescriptionThree")),o.yb(7),o.Dc(o.ac(29,40,"featuredImage")),o.yb(3),o.fc("ngIf",!e.silKayit),o.yb(1),o.fc("ngIf",!e.silKayit),o.yb(2),o.fc("ngIf",e.duyuru.oneCikanResim),o.yb(3),o.Dc(o.ac(38,42,"header")),o.yb(3),o.fc("ngIf",e.yeniKayit||e.guncelleKayit),o.yb(1),o.fc("ngIf",e.silKayit),o.yb(3),o.Dc(o.ac(45,44,"startDay")),o.yb(3),o.fc("ngIf",e.yeniKayit||e.guncelleKayit),o.yb(1),o.fc("ngIf",e.silKayit),o.yb(3),o.Dc(o.ac(52,46,"endDay")),o.yb(3),o.fc("ngIf",e.yeniKayit||e.guncelleKayit),o.yb(1),o.fc("ngIf",e.silKayit),o.yb(3),o.Dc(o.ac(59,48,"date")),o.yb(3),o.fc("ngIf",e.yeniKayit||e.guncelleKayit),o.yb(1),o.fc("ngIf",e.silKayit),o.yb(3),o.Dc(o.ac(66,50,"detail")),o.yb(4),o.fc("header",o.ac(70,52,"editor")),o.yb(2),o.fc("ngIf",0===e.tabIndex),o.yb(1),o.fc("ngIf",e.kullaniciService.kullanici.admin),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 V(e,i){if(1&e){const e=o.Qb();o.Pb(0,"button",23),o.Wb("click",function(){return o.sc(e),o.Yb(3).yeniDuyuru()}),o.Zb(1,"translate"),o.Ob()}if(2&e){const e=o.Yb(3);o.fc("disabled",e.genelService.islemDevam)("label",o.ac(1,2,"newAnnounceRecord"))}}function G(e,i){if(1&e&&(o.Pb(0,"div",4),o.Ac(1,V,2,4,"button",7),o.Ob()),2&e){const e=o.Yb(2);o.yb(1),o.fc("ngIf",!e.yeniKayit&&!e.guncelleKayit&&!e.silKayit&&e.kullaniciService.yetkiKontrolKurumSeciliMi()&&(e.kullaniciService.kullanici.admin||e.kullaniciService.seciliKullaniciKurumYetki.kaydederDuyuru))}}function _(e,i){1&e&&(o.Pb(0,"tr"),o.Kb(1,"th",64),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,"announces")))}function ee(e,i){1&e&&(o.Pb(0,"div",70),o.Cc(1),o.Zb(2,"translate"),o.Ob()),2&e&&(o.yb(1),o.Dc(o.ac(2,1,"date")))}function ie(e,i){if(1&e&&(o.Pb(0,"div",16),o.Cc(1),o.Zb(2,"date"),o.Ob()),2&e){const e=o.Yb().$implicit;o.yb(1),o.Dc(o.bc(2,1,e.tarih,"dd.MM.yyyy"))}}function te(e,i){1&e&&(o.Pb(0,"div",70),o.Cc(1),o.Zb(2,"translate"),o.Ob()),2&e&&(o.yb(1),o.Dc(o.ac(2,1,"startDay")))}function ne(e,i){if(1&e&&(o.Pb(0,"div",16),o.Cc(1),o.Zb(2,"date"),o.Ob()),2&e){const e=o.Yb().$implicit;o.yb(1),o.Dc(o.bc(2,1,e.baslamaTarihi,"dd.MM.yyyy"))}}function ae(e,i){1&e&&(o.Pb(0,"div",70),o.Cc(1),o.Zb(2,"translate"),o.Ob()),2&e&&(o.yb(1),o.Dc(o.ac(2,1,"endDay")))}function le(e,i){if(1&e&&(o.Pb(0,"div",16),o.Cc(1),o.Zb(2,"date"),o.Ob()),2&e){const e=o.Yb().$implicit;o.yb(1),o.Dc(o.bc(2,1,e.bitisTarihi,"dd.MM.yyyy"))}}function ce(e,i){if(1&e){const e=o.Qb();o.Pb(0,"tr"),o.Pb(1,"td"),o.Pb(2,"button",65),o.Wb("click",function(t){o.sc(e);const n=i.$implicit,a=i.rowIndex;return o.Yb(2).generateMenuCommands(n,a,t)}),o.Ob(),o.Kb(3,"p-menu",66,67),o.Ob(),o.Pb(5,"td"),o.Pb(6,"div",0),o.Pb(7,"div",2),o.Cc(8),o.Ob(),o.Ac(9,ee,3,3,"div",68),o.Ac(10,ie,3,4,"div",69),o.Ac(11,te,3,3,"div",68),o.Ac(12,ne,3,4,"div",69),o.Ac(13,ae,3,3,"div",68),o.Ac(14,le,3,4,"div",69),o.Ob(),o.Ob(),o.Ob()}if(2&e){const e=i.$implicit,t=o.Yb(2);o.yb(2),o.fc("disabled",t.genelService.islemDevam),o.yb(1),o.fc("model",t.menuModel)("popup",!0),o.yb(5),o.Dc(e.baslik),o.yb(1),o.fc("ngIf",null!=e.tarih),o.yb(1),o.fc("ngIf",null!=e.tarih),o.yb(1),o.fc("ngIf",null!=e.baslamaTarihi),o.yb(1),o.fc("ngIf",null!=e.baslamaTarihi),o.yb(1),o.fc("ngIf",null!=e.bitisTarihi),o.yb(1),o.fc("ngIf",null!=e.bitisTarihi)}}function se(e,i){if(1&e){const e=o.Qb();o.Pb(0,"div",2),o.Pb(1,"p-table",60),o.Wb("onLazyLoad",function(i){return o.sc(e),o.Yb().gridLazyEvent(i)}),o.Ac(2,G,2,1,"ng-template",61),o.Ac(3,_,5,3,"ng-template",62),o.Ac(4,ce,15,10,"ng-template",63),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 ue=(()=>{class e{constructor(e,i,t,n,a){this.genelService=e,this.translatePipe=i,this.kullaniciService=t,this.duyuruService=n,this.imageService=a,this.tabIndex=0,this.tableModel=new b.a,this.duyuru=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.duyuru=e,this.guncelle()},icon:"fas fa-edit",visible:this.kullaniciService.seciliKullaniciKurumYetki.guncellerDuyuru||this.kullaniciService.yetkiKontrolKullaniciAdminMi()},{label:this.translatePipe.transform("delete"),command:()=>{this.duyuru=e,this.sil()},icon:"fas fa-trash-alt",visible:this.kullaniciService.seciliKullaniciKurumYetki.silerDuyuru||this.kullaniciService.yetkiKontrolKullaniciAdminMi()}],this.menuList.toArray()[i%10].toggle(t)}insertImageEditor(e){this.kullaniciService.kullaniciPremiumMu()?this.imageService.insertQuillImage(this.editor):this.genelService.messageInfo(this.translatePipe.transform("info"),this.translatePipe.transform("onlyPremiumInstutionUsersUseThisFeature"))}yeniDuyuru(){this.duyuru={kurum:{id:this.kullaniciService.seciliKullaniciKurumYetki.kurum.id},baslik:"",detay:"",duyuruHaber:!1,tarih:new Date},this.yeniKayit=!0}kaydet(){null==this.duyuru.baslik||this.duyuru.baslik.length<1?this.genelService.messageWarn(this.translatePipe.transform("missingValue"),this.translatePipe.transform("headerCannotBeEmpty")):null==this.duyuru.detay||this.duyuru.detay.length<1?this.genelService.messageWarn(this.translatePipe.transform("missingValue"),this.translatePipe.transform("contentCannotBeEmpty")):(this.duyuru.id=null,this.genelService.islemDevam=!0,this.duyuru.detay=this.duyuru.detay.replace(new RegExp("<img src=","g"),'<img loading="lazy" style="max-width: 100%" src='),this.duyuruService.kaydet(this.duyuru).subscribe(e=>{this.genelService.messageSuccess(this.translatePipe.transform("success"),this.translatePipe.transform("saved")),this.genelService.islemDevam=!1,this.vazgec()},e=>{this.genelService.errorHandler(e)}))}guncelle(){if(null==this.duyuru||null==this.duyuru.id)return void this.genelService.messageWarn("",this.translatePipe.transform("selectRecordFirst"));const e={pasif:!1};e.id=this.duyuru.id,this.duyuruService.grid({page:0,pageSize:1,sortField:null,sortOrder:null,filters:e}).subscribe(e=>{e.tableModel.count>0?(this.duyuru=e.tableModel.data[0],null!=this.duyuru.baslamaTarihi&&(this.duyuru.baslamaTarihi=new Date(this.duyuru.baslamaTarihi)),null!=this.duyuru.bitisTarihi&&(this.duyuru.bitisTarihi=new Date(this.duyuru.bitisTarihi)),null!=this.duyuru.tarih&&(this.duyuru.tarih=new Date(this.duyuru.tarih)),this.guncelleKayit=!0):this.genelService.messageError("Kay\u0131t Bulunamad\u0131","")},e=>{this.genelService.errorHandler(e)})}guncelleOnay(){this.genelService.islemDevam=!0,this.duyuru.detay=this.duyuru.detay.replace(new RegExp("<img src=","g"),'<img loading="lazy" style="max-width: 100%" src='),this.duyuruService.guncelle(this.duyuru).subscribe(e=>{this.genelService.islemDevam=!1,this.genelService.messageSuccess("",this.translatePipe.transform("updated")),this.vazgec(),this.gridLazyEvent(null)},e=>{this.genelService.errorHandler(e)})}sil(){const e={pasif:!1};e.id=this.duyuru.id,this.duyuruService.grid({page:0,pageSize:1,sortField:null,sortOrder:null,filters:e}).subscribe(e=>{e.tableModel.count>0?(this.duyuru=e.tableModel.data[0],null!=this.duyuru.baslamaTarihi&&(this.duyuru.baslamaTarihi=new Date(this.duyuru.baslamaTarihi)),null!=this.duyuru.bitisTarihi&&(this.duyuru.bitisTarihi=new Date(this.duyuru.bitisTarihi)),null!=this.duyuru.tarih&&(this.duyuru.tarih=new Date(this.duyuru.tarih)),this.silKayit=!0):this.genelService.messageError("Kay\u0131t Bulunamad\u0131","")},e=>{this.genelService.errorHandler(e)})}silOnay(){null!=this.duyuru&&null!=this.duyuru.id?(this.genelService.islemDevam=!0,this.duyuruService.sil(this.duyuru).subscribe(e=>{this.genelService.islemDevam=!1,this.genelService.messageSuccess("",this.translatePipe.transform("deleted")),this.duyuru=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.duyuru=null}gridLazyEvent(e){this.tableModel.loading=!0;const i={pasif:!1};if(null!=this.kullaniciService.seciliKullaniciKurumYetki&&null!=this.kullaniciService.seciliKullaniciKurumYetki.token)i.kurum=JSON.stringify({id:this.kullaniciService.seciliKullaniciKurumYetki.kurum.id});else if(!this.kullaniciService.kullanici.admin)return void(this.tableModel=new b.a);this.duyuruService.gridDetaysiz({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:"id",sortOrder:null!=e&&null!=e.sortField?e.sortOrder:-1,filters:i}).subscribe(e=>{this.tableModel=e.tableModel,this.tableModel.loading=!1},e=>{this.genelService.errorHandler(e),this.tableModel.loading=!1})}ngOnInit(){this.kullaniciService.userScreen=this.translatePipe.transform("announce"),null==this.kullaniciService.token||this.kullaniciService.token.length<1?this.genelService.navigate(["/"]):!this.kullaniciService.yetkiKontrolKurumSeciliMi()||this.kullaniciService.seciliKullaniciKurumYetki.gorurDuyuru?(this.genelService.kullaniciMobil=this.genelService.regex_Mobilmi(),this.genelService.getLocalIp()):this.genelService.navigate(["/dashboard"])}selectOneCikanResim(){const e=document.createElement("input");e.setAttribute("type","file"),e.setAttribute("accept","image/*"),e.onchange=()=>{const i=e.files[0];if("image/webp"===i.type){const e=new FileReader;e.onloadend=()=>{this.duyuru.oneCikanResim=e.result+""},e.readAsDataURL(i)}else this.imageService.optimizeImage(i,e=>{this.duyuru.oneCikanResim=e})},e.click()}}return e.\u0275fac=function(i){return new(i||e)(o.Jb(d.a),o.Jb(y.a),o.Jb(f.a),o.Jb(g.a),o.Jb(h.a))},e.\u0275cmp=o.Db({type:e,selectors:[["app-duyuru"]],viewQuery:function(e,i){var t;1&e&&(o.Ic(k,!0),o.Ic(K,!0)),2&e&&(o.qc(t=o.Xb())&&(i.editor=t.first),o.qc(t=o.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-text-center"],["class","p-button-success","pButton","",3,"disabled","label","click",4,"ngIf"],["class","p-button-danger","pButton","",3,"disabled","label","click",4,"ngIf"],[1,"p-col-8"],[2,"font-weight","bold"],["pInputText","","style","width: 90%","type","text",3,"ngModel","ngModelChange",4,"ngIf"],["icon","fas fa-file","pButton","",3,"click",4,"ngIf"],[1,"p-col-4","p-text-center"],["loading","lazy","style","max-width: 100%; max-height: 256px; border-radius: 5px; object-fit: scale-down",3,"src",4,"ngIf"],[1,"p-col-12","p-md-4","p-lg-4"],[1,"p-col-12","p-md-8","p-lg-8"],["pInputText","","style","width: 100%","type","text",3,"ngModel","ngModelChange",4,"ngIf"],["dateFormat","dd/mm/yy","showButtonBar","true","yearRange","2018:2022",3,"ngModel","monthNavigator","ngModelChange",4,"ngIf"],[3,"onChange"],[3,"header"],[3,"ngModel","readonly","style","ngModelChange",4,"ngIf"],[3,"header",4,"ngIf"],["pButton","",1,"p-button-success",3,"disabled","label","click"],["pButton","",1,"p-button-danger",3,"disabled","label","click"],["pInputText","","type","text",2,"width","90%",3,"ngModel","ngModelChange"],["icon","fas fa-file","pButton","",3,"click"],["loading","lazy",2,"max-width","100%","max-height","256px","border-radius","5px","object-fit","scale-down",3,"src"],["pInputText","","type","text",2,"width","100%",3,"ngModel","ngModelChange"],["dateFormat","dd/mm/yy","showButtonBar","true","yearRange","2018:2022",3,"ngModel","monthNavigator","ngModelChange"],[3,"ngModel","readonly","ngModelChange"],["editor",""],[1,"ql-formats"],[1,"ql-header"],["selected",""],["value","1"],["value","2"],["value","3"],["value","4"],["value","5"],[1,"ql-font"],["value","serif"],["value","monospace"],["aria-label","Kal\u0131n",1,"ql-bold"],["aria-label","\u0130talik",1,"ql-italic"],["aria-label","Alt\u0131 \xc7izgili",1,"ql-underline"],[1,"ql-color"],[1,"ql-background"],["aria-label","S\u0131ral\u0131 Liste","value","ordered",1,"ql-list"],["aria-label","Madde Liste","value","bullet",1,"ql-list"],[1,"ql-align"],["value","center"],["value","right"],["value","justify"],["aria-label","Ba\u011flant\u0131 Ekle",1,"ql-link"],["aria-label","Kod Alan\u0131 Ekle",1,"ql-code-block"],["aria-label","Resim Ekle","icon","far fa-image","pButton","",1,"p-button-success",3,"click"],["aria-label","Stilleri Sil",1,"ql-clean"],["autoResize","true","pInputTextarea","","style","width: 100%; background:#323232; color: yellowgreen",3,"ngModel","disabled","rows","ngModelChange",4,"ngIf"],["autoResize","true","pInputTextarea","",2,"width","100%","background","#323232","color","yellowgreen",3,"ngModel","disabled","rows","ngModelChange"],["dataKey","id",3,"lazy","loading","paginator","rows","totalRecords","value","onLazyLoad"],["pTemplate","caption"],["pTemplate","header"],["pTemplate","body"],[2,"width","54px"],["icon","fas fa-caret-square-down","pButton","",1,"p-button-info",3,"disabled","click"],[3,"model","popup"],["menu",""],["class","p-col-12 p-md-4 p-lg-4","style","font-weight: bold",4,"ngIf"],["class","p-col-12 p-md-8 p-lg-8",4,"ngIf"],[1,"p-col-12","p-md-4","p-lg-4",2,"font-weight","bold"]],template:function(e,i){1&e&&(o.Pb(0,"div",0),o.Ac(1,X,78,54,"div",1),o.Ac(2,se,5,6,"div",1),o.Ob()),2&e&&(o.yb(1),o.fc("ngIf",i.yeniKayit||i.guncelleKayit||i.silKayit),o.yb(1),o.fc("ngIf",!i.yeniKayit&&!i.guncelleKayit&&!i.silKayit))},directives:[n.m,p.b,p.a,u.b,a.a,m.a,a.f,a.g,v.a,P.a,O.g,a.h,a.k,s.d,O.j,c.a],pipes:[y.a,n.d],styles:[""],data:{animation:[r.a]}}),e})();var be=t("bKFz");const re=[{path:"",component:ue}];let oe=(()=>{class e{}return e.\u0275mod=o.Hb({type:e}),e.\u0275inj=o.Gb({factory:function(i){return new(i||e)},imports:[[l.e.forChild(re),n.b,a.b,m.b,be.a,u.c,s.g,c.b,v.b,p.c,P.b]]}),e})()}}]);