\n
\n\n\n
\n
\n
\n \n \n HATA!!!!! TALEP KAYDI BULUNAMADI. \n \n \n
\n
\n\n\n\n\n
","import { Component, OnInit } from '@angular/core';\nimport { FormBuilder } from '@angular/forms';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { Profil } from 'src/app/models/profil.model';\nimport { ProfilService } from 'src/app/services/profil.service';\nimport { ValidationService } from 'src/app/services/validation.service';\nimport { YetkiService } from 'src/app/services/yetki.service';\nimport { finalize } from 'rxjs';\nimport jwtDecode from 'jwt-decode';\nimport { Kullanici } from 'src/app/models/kullanici.model';\nimport { GirisService } from 'src/app/services/giris.service';\n\ndeclare var bootstrap: any;\n@Component({\n selector: 'profil-islem',\n templateUrl: './profil-islem.component.html',\n styleUrls: ['./profil-islem.component.css']\n})\nexport class ProfilIslemComponent implements OnInit {\n\n constructor(private profilService: ProfilService,private route: ActivatedRoute, private formBuilder: FormBuilder,private rooting: Router, private validationService: ValidationService,public yetkiService:YetkiService, private girisService: GirisService, private router: Router) { }\n profil: Profil[]=[];\n detayForm = this.formBuilder.group(new Profil());\n smsDogrulaForm=this.formBuilder.group({ dogrulamaKod:[''] });\n yukleniyor = false;\n kaydediliyor = false;\n hatalar: any = {};\n durumlar: any[] = [];\n kullanici: Kullanici = new Kullanici();\n yeni = true;\n smsGelenKod:string='';\n dogrulaniyor=false;\n smsGonderimDurum=false;\n\n\n ngOnInit(): void { \n this.sure=300;\n this.kullanici =this.girisService.girisBilgi(); \n this.route.params.subscribe(params => {\n if (params['id'] != 'yeni') {\n this.getById(params['id']);\n }\n }); \n }\n \n getById(id: number) {\n this.yukleniyor = true;\n this.yeni = false;\n this.profilService.getById(id).subscribe(res => {\n if(res==null){\n this.router.navigateByUrl('/');\n }\n this.detayForm.patchValue({ \n ...res \n }); \n this.profil[0]=res; \n this.yukleniyor = false;\n },err=>{\n this.router.navigateByUrl('/');\n });\n }\n\n sure=300;\n smsSendModal() { \n this.smsGonderimDurum=true;\n // this.sure=0;\n setInterval(()=>{\n this.sure--; \n if(this.sure==0){\n bootstrap.Modal.getInstance(document.getElementById('sms_modal')).hide();\n clearInterval(this.sure);\n } \n },1000);\n var kulid: number = +this.girisService.girisBilgi().kullanici_id;\n this.profilService.smsSend().pipe(finalize(() => {\n })).subscribe({\n next: res => {\n if (res?.message && res?.message != \"\" ) {this.yetkiService.success(res?.message,1)}; \n document.getElementById('openSmsModalButton')?.click();\n // var myModal = new bootstrap.Modal(document.getElementById('sms_modal'))\n // myModal.show();\n },\n error: err => {\n this.smsGonderimDurum=false;\n \n if (err.error.Errors == undefined || err.error.Errors == null ||err.error.Errors?.length==0){\n if (err.error?.message && err.error?.message != \"\" ) {this.yetkiService.error(err.error?.message,1)};\n if (err.error?.Message && err.error?.Message != \"\" ) {this.yetkiService.error(err.error?.Message,1)};\n }\n }\n });\n\n }\n\n reloadProfilComponent() {\n this.router.routeReuseStrategy.shouldReuseRoute = () => false;\n this.router.onSameUrlNavigation = 'reload';\n this.router.navigate(['/profil/'+this.girisService.girisBilgi().kullanici_id]);\n}\n \n smsKodDogrula() { \n \n this.dogrulaniyor=true;\n this.smsGelenKod=this.smsDogrulaForm.controls['dogrulamaKod'].value;\n this.profilService.smsCheck(this.smsGelenKod).pipe(finalize(() => {\n })).subscribe({\n next: res => {\n if (res?.message && res?.message != \"\" ) { \n this.yetkiService.success(res?.message,1)};\n \n bootstrap.Modal.getInstance(document.getElementById('sms_modal')).hide();\n this.reloadProfilComponent();\n this.dogrulaniyor=false;\n },\n error: err => {\n this.dogrulaniyor=false;\n this.smsGonderimDurum=false;\n if (err.error.Errors == undefined ||err.error.Errors == null ||err.error.Errors?.length==0){\n if (err.error?.message && err.error?.message != \"\" ) {this.yetkiService.error(err.error?.message,1)};\n if (err.error?.Message && err.error?.Message != \"\" ) {this.yetkiService.error(err.error?.Message,1)};\n }\n }\n });\n}\n\n kaydetGuncelle() {\n this.kaydediliyor = true;\n this.hatalar = {};\n this.profilService.addUpdate(this.detayForm.value).pipe(finalize(() => {\n this.kaydediliyor = false;\n })).subscribe({\n next: res => {\n if (res?.message && res?.message != \"\" ) {this.yetkiService.success(res?.message,1)};\n // this.rooting.navigateByUrl('/profil')\n this.reloadProfilComponent();\n },\n error: err => {\n this.hatalar = this.validationService.hatalar(err.error.Errors);\n if (err.error.Errors == undefined ||err.error.Errors == null ||err.error.Errors?.length==0){\n if (err.error?.message && err.error?.message != \"\" ) {this.yetkiService.error(err.error?.message,1)};\n if (err.error?.Message && err.error?.Message != \"\" ) {this.yetkiService.error(err.error?.Message,1)};\n \n }\n }\n });\n \n }\n\n}\n","
\n
\n
\n\n\n
Open Modal \n\n
\n \n ","import { Component, OnInit } from '@angular/core';\nimport jwtDecode from 'jwt-decode';\nimport { Kullanici } from 'src/app/models/kullanici.model';\nimport { Profil } from 'src/app/models/profil.model';\nimport { GirisService } from 'src/app/services/giris.service';\nimport { ProfilService } from 'src/app/services/profil.service';\n\n@Component({\n selector: 'profil',\n templateUrl: './profil.component.html',\n styleUrls: ['./profil.component.css']\n})\nexport class ProfilComponent implements OnInit {\n\n constructor(private profilService: ProfilService,private girisService: GirisService) { this.girisService=girisService; }\n\n kullanici: Kullanici = new Kullanici();\n yukleniyor = false;\n ngOnInit(): void {\n this.kullanici=this.girisService.girisBilgi();\n this.kullaniciGetir();\n }\n\n profilgelen:Profil=new Profil();\n \n kullaniciGetir() {\n this.yukleniyor=true;\n var tckimliknoint: number = +this.kullanici.tckimlikno;\n this.profilService.getByTCKimlikNo(tckimliknoint).subscribe(res => {\n this.profilgelen=res;\n this.yukleniyor=false;\n });\n }\n\n}\n","
\n
\n
\n
\n
\n \n
\n\n
\n
Ad Soyad : \n
\n {{kullanici?.adisoyadi}} \n
\n\n
\n
\n
Doğum Tarihi : *\n \n
\n {{profilgelen?.dogumTarihi |\n date:'dd.MM.yyyy'}} \n Girilmedi \n
\n\n
\n
\n
\n Telefon\n \n *\n \n \n\n
\n {{ profilgelen?.telefon }} \n Doğrulandı \n\n
\n
\n Girilmedi \n Doğrulanmadı \n \n
\n
\n
Öğrenci E-posta \n
\n {{ profilgelen?.ogrenciEPosta }} \n Bulunamadı. \n
\n
\n
\n
Kişisel E-Posta *\n \n
\n {{ profilgelen?.ePosta }} \n Girilmedi \n
\n
\n
\n
\n \n
\n \n \n
\n
\n Bilgileriniz tamamlanmadan ve telefon numaranız doğrulanmadan\n talepte bulunulamazsınız ! Bilgilerimi Güncelle butonuna tıklayarak bilgilerinizi\n tamamlayınız. \n \n
\n
\n
\n
\n \n
\n
","import { Component, OnInit } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { AnasayfaBilgi } from 'src/app/models/anasayfaBilgi.model';\nimport { Kullanici } from 'src/app/models/kullanici.model';\nimport { AnasayfaBilgiService } from 'src/app/services/anasayfa-bilgi.service';\nimport { GirisService } from 'src/app/services/giris.service';\nimport { KullaniciTalepService } from 'src/app/services/kullanici-talep.service';\nimport { YetkiService } from 'src/app/services/yetki.service';\n\n\n@Component({\n selector: 'yonetim-anasayfa',\n templateUrl: './yonetim-anasayfa.component.html',\n styleUrls: ['./yonetim-anasayfa.component.css']\n})\nexport class YonetimAnasayfaComponent implements OnInit {\n\n constructor(private anasayfaBilgiService: AnasayfaBilgiService, private girisService: GirisService, private kullaniciTalepService:KullaniciTalepService,private _yetkiService: YetkiService, private router: Router) { this.yetkiService = _yetkiService;}\n anasayfaBilgi: AnasayfaBilgi = new AnasayfaBilgi();\n oran:number=0;\n talepSay:number=0;\n yetkiService: YetkiService;\n kullanici: Kullanici = new Kullanici();\n ngOnInit(): void {\n this.getAnasayfaBilgi();\n }\n\n getAnasayfaBilgi(){\n this.anasayfaBilgiService.getAnasayfaBilgi().subscribe(res => {\n this.anasayfaBilgi = res.data;\n this.oran=this.anasayfaBilgi.profilTamamlanmaOrani;\n this.kullanici=this.girisService.girisBilgi();\n });\n }\n\n talepSayisiKontrol() {\n this.kullaniciTalepService.nebisAktifTalepList().subscribe(res => {\n this.talepSay = res.data.length;\n if (this.talepSay > 2) {\n this._yetkiService.error(\"Hata ! Süreci devam eden en fazla 3 talep gönderebilirsiniz.\", 1);\n }\n else {\n this.router.navigateByUrl('/talep-list/yeni')\n }\n });\n }\n}\n","
\n
\n
\n\n
\n \n
\n \n
\n \n
\n \n
\n \n \n \n \n
\n \n
\n \n
\n \n \n
\n \n \n \n \n \n \n {{anasayfaBilgi?.bekleyen}} \n \n \n
\n \n
\n \n \n \n
\n \n \n
\n \n
\n \n \n
\n \n \n \n \n \n \n {{anasayfaBilgi?.kapatilmis}} \n \n
\n \n
\n
\n
\n \n
\n \n \n
\n \n \n \n \n \n \n {{anasayfaBilgi?.toplam}} \n \n
\n \n
\n \n
\n \n
\n \n
\n \n \n \n \n
\n \n \n
\n \n
\n \n
\n \n \n \n \n
\n \n
\n \n
\n \n \n \n \n \n \n \n \n
\n
Profil ve iletişim bilgileriniz tamamlanmadan talepte bulunamazsınız ! Profil Bilgilerim kısmından bilgilerinizi tamamlayınız ( Öğrenci e-postanızı da Profil Bilgilerim kısmından öğrenebilirsiniz. ). \n
\n
\n Tamamlama Oranı ( % {{anasayfaBilgi?.profilTamamlanmaOrani}})\n \n \n
\n\n \n \n
\n \n
\n\n
\n \n
\n \n \n \n \n \n \n \n \n
\n Süreci devam eden en fazla 3 ayrı talepte bulunabilirsiniz. \n \n
\n\n \n \n
\n \n
\n \n
\n \n
\n \n \n \n \n \n \n \n \n
\n\n \n \n
\n \n
\n \n \n \n
\n \n
\n \n
\n \n \n \n \n
\n \n
\n \n \n
\n \n
\n \n \n \n \n
\n \n
\n \n
\n \n \n \n \n \n \n \n \n
\n \n \n
\n \n
\n
\n \n
\n \n \n \n \n \n \n \n \n
\n \n \n
\n \n
\n\n
\n \n
\n \n \n \n \n \n \n \n \n
\n
Talebini Yaz \n
\n Talebini Yaz \n Profil bilgileriniz tamamlanmadan talepte bulunamazsınız. \n \n \n
\n \n \n
\n \n
\n\n
\n \n
\n \n \n \n \n \n \n
\n \n \n
\n \n
\n \n
\n \n
\n \n
\n \n
\n\n
\n
\n\n\n\n\n\n\n\n\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'yonetim',\n templateUrl: './yonetim.component.html',\n styleUrls: ['./yonetim.component.css']\n})\nexport class YonetimComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit(): void {\n }\n\n}\n","
\n \n \n
\n \n \n \n
\n \n
","import { HttpClient } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { AnasayfaBilgi } from '../models/anasayfaBilgi.model';\nimport { Response } from '../models/response.model';\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AnasayfaBilgiService {\n apiUrl = '/api/home'\n constructor(private http: HttpClient) { }\n \n getAnasayfaBilgi(): Observable
> {\n return this.http.get>(this.apiUrl + '/anasayfaBilgi');\n }\n}\n","import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { Observable } from 'rxjs';\nimport { Response } from '../models/response.model';\nimport { Token } from '../models/token.model';\nimport { Kullanici } from '../models/kullanici.model';\nimport jwtDecode from 'jwt-decode';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class GirisService {\n\n kullanici: Kullanici = new Kullanici();\n constructor(private http: HttpClient) { }\n\n apiUrl = '/api/auth'\n\n giris(tckimlikno: number, sifre: string): Observable> {\n return this.http.post>(this.apiUrl + '/login', {\n tckimlikno,\n sifre\n });\n }\n\n girisEdevletLogin(girisdurum: string): Observable> {\n return this.http.post>(this.apiUrl + '/loginedevlet?girisdurum=' + girisdurum, {});\n }\n\n\n refreshToken(userUid: string): Observable> {\n return this.http.post>(this.apiUrl + '/refreshtoken?useruid=' + userUid, {});\n }\n\n\n cikis(): Observable {\n return this.http.get('/api/kullanici/cikis');\n }\n\n \n\n girisBilgi():Kullanici{\n //const auth = document.cookie.split('=')[1];\n // const auth = localStorage.getItem('auth');\n if (this.cookieByName()) {\n this.kullanici = jwtDecode(this?.cookieByName()) as Kullanici;\n //console.log(this.kullanici); \n }\n return this.kullanici;\n }\n\n \n cookieByName():any{\n var cookie=Object.fromEntries(document.cookie.split('; ').map(v=>v.split(/=(.*)/s).map(decodeURIComponent)))\n if (cookie?.authTds) {\n return cookie?.authTds;\n }\n }\n\n\n}\n","import { HttpClient, HttpHeaders, HttpRequest } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { Birim } from '../models/birim.model';\nimport { Kategori } from '../models/kategori.model';\nimport { KullaniciTalep } from '../models/kullaniciTalep.model';\nimport { NebisTalepBilgiler } from '../models/nebisTalep.model';\nimport { Response } from '../models/response.model';\n\n\n@Injectable({\n providedIn: 'root'\n})\nexport class KullaniciTalepService {\n apiUrl = '/api/talep'\n constructor(private http: HttpClient) {\n }\n\n\n // getAll(query: string = '', page: number = 1, rowCount: number = 10): Observable> {\n // return this.http.get>(this.apiUrl + '/getList', {\n // params: {\n // 'aramastr': query,\n // 'sayfasayisi': page,\n // 'sayfadakisatirsayisi': rowCount\n // }\n // });\n // }\n\n\n getAll(query: string = '', page: number = 1, rowCount: number = 10): Observable> {\n return this.http.get>(this.apiUrl + '/nebisTalepList', {\n params: {\n 'aramastr': query,\n 'sayfasayisi': page,\n 'sayfadakisatirsayisi': rowCount\n }\n });\n \n }\n\n getBirimList(): Observable> {\n return this.http.get>(this.apiUrl + '/birimList');\n }\n\n getKategoriList(): Observable> {\n return this.http.get>(this.apiUrl + '/kategoriList');\n }\n\n\n\n getById(id: number): Observable> {\n return this.http.get>(this.apiUrl + '/getbyid?id=' + id);\n }\n\n\n nebisAktifTalepList(): Observable> {\n return this.http.get>(this.apiUrl + '/nebisAktifTalepList');\n }\n\n\n getNebisById(id: number): Observable> {\n return this.http.get>(this.apiUrl + '/getnebisbyid?TalepID=' + id);\n }\n\n // delete(id:number):Observable>{\n // return this.http.post>(this.apiUrl+\"/delete?id=\"+id,{})\n // }\n\n delete(kullaniciTalep: NebisTalepBilgiler): Observable> {\n return this.http.post>(this.apiUrl + '/delete', kullaniciTalep)\n }\n\n\n dosyaYukle(formData: FormData): Observable> {\n return this.http.post>(this.apiUrl + \"/fileAdd\", formData)\n }\n\n\n dosyaSil(dosyaUrl: string): Observable> {\n return this.http.post>(this.apiUrl + \"/fileDelete/?dosyaUrl=\"+dosyaUrl,{})\n }\n\n dosyaIndirNebis(talepID: number, hareketID: number):Observable {\n return this.http.get(this.apiUrl + \"/fileDownload/?TalepID=\"+talepID+\"&HareketID=\"+hareketID )\n }\n\n //------- dosyaBilgi(dosyaUrl: string):Observable> {\n // return this.http.get>(this.apiUrl + \"/dosyaBil/?dataFile=\"+dosyaUrl)\n //------ }\n\n dosyaBilgi(dosyaUrl: string):Observable> {\n return this.http.get>(this.apiUrl + \"/dosyaBil/?dataFile=\"+dosyaUrl)\n }\n\n addUpdate(kullaniciTalep: KullaniciTalep): Observable> {\n // let headers = new HttpHeaders();\n // headers = headers.append(\"Content-Type\", \"application/json\");\n // headers = headers.append(\"Content-Type\", \"multipart/form-data\");\n\n if (kullaniciTalep.id > 0) {\n return this.http.post>(this.apiUrl + \"/update\", kullaniciTalep)\n }\n else {\n return this.http.post>(this.apiUrl + \"/add\", kullaniciTalep)\n }\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { Observable } from 'rxjs/internal/Observable'\nimport { Response } from '../models/response.model';\nimport { Profil } from '../models/profil.model';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ProfilService {\n\n apiUrl = '/api/kullanici'\n \n constructor(private http: HttpClient) { }\n\n getByTCKimlikNo(tckimlikno: number): Observable {\n return this.http.get(this.apiUrl + '/getbyTCKimlikNo?tckimlikno=' + tckimlikno);\n }\n\n getById(id: number): Observable {\n return this.http.get(this.apiUrl + '/getById?id=' + id);\n }\n \n addUpdate(kullanici: Profil): Observable> {\n return this.http.post>(\"api/kullanici/update\",kullanici) \n }\n\n smsSend(): Observable> {\n return this.http.get>(this.apiUrl + '/smsSend');\n }\n\n smsCheck(dogrulamaKod: string): Observable> {\n return this.http.post>(this.apiUrl + '/smsCheck?smsGelenKod='+dogrulamaKod,{});\n }\n\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ValidationService {\n\n constructor() { }\n\n hatalar(errors: []): any {\n let obj: any = {};\n if (errors) {\n for (let i = 0; i < errors.length; i++) {\n const err = errors[i] as any;\n if (obj[err.PropertyName]) {\n obj[err.PropertyName].push(err.ErrorMessage);\n } else {\n obj[err.PropertyName] = [err.ErrorMessage];\n }\n }\n }\n return obj;\n }\n}\n","import { Injectable } from '@angular/core';\nimport jwtDecode from 'jwt-decode';\nimport { ToastrService } from 'ngx-toastr';\nimport { Observable } from 'rxjs';\nimport { Kullanici } from '../models/kullanici.model';\nimport { Profil } from '../models/profil.model';\nimport { Token } from '../models/token.model';\nimport { GirisService } from './giris.service';\nimport { ProfilService } from './profil.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class YetkiService {\n \n telDogrulama: boolean = false;\n mernisDogrulama:boolean= false;\n constructor(private toastr:ToastrService,private profilService:ProfilService, public girisService:GirisService ) { }\n\n yetkiVar(yetkiler: string | string[]): boolean {\n if (typeof (yetkiler) == 'string') {\n yetkiler = [yetkiler];\n }\n\n // const token = JSON.parse(localStorage.getItem('auth')!) as Token;\n //const auth = document.cookie.split('=')[1];\n\n const token = JSON.parse(this?.girisService.cookieByName()) as Token;\n const roller = (jwtDecode(token.token) as Kullanici).Rol;\n for (const yetki of yetkiler) {\n if (!roller.includes(yetki)) {\n return false;\n }\n }\n return true;\n }\n\n bilgiGirmeDurum():Promise{\n var idint: number = +this.girisService.girisBilgi().kullanici_id;\n\n return this.profilService.getById(idint).toPromise().then(res => {\n this.telDogrulama=res?.telDogrulama!;\n this.mernisDogrulama=res?.mernisDogrulama!;\n return this.telDogrulama&& this.mernisDogrulama; \n\n });\n // if(this.telDogrulama==true && this.mernisDogrulama==true)\n // return false; \n \n }\n\n success(mesaj : string,beklemezamani : number) {\n this.toastr.success(mesaj);\n }\n \n error(mesaj : string,beklemezamani : number) {\n this.toastr.error(mesaj);\n }\n}\n","// This file can be replaced during build by using the `fileReplacements` array.\n// `ng build` replaces `environment.ts` with `environment.prod.ts`.\n// The list of file replacements can be found in `angular.json`.\n\nexport const environment = {\n production: false\n};\n\n/*\n * For easier debugging in development mode, you can import the following file\n * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.\n *\n * This import should be commented out in production mode because it will have a negative impact\n * on performance if an error is thrown.\n */\n// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.\n","import { enableProdMode } from '@angular/core';\nimport { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n\nimport { AppModule } from './app/app.module';\nimport { environment } from './environments/environment';\n\nif (environment.production) {\n enableProdMode();\n}\n\nplatformBrowserDynamic().bootstrapModule(AppModule)\n .catch(err => console.error(err));\n"],"names":[],"sourceRoot":"webpack:///"}