Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 22 additions & 8 deletions front-end/src/app/components/home/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@

<div class="text-fields">
<label> *</label>
<p-dropdown required [options]="years" [(ngModel)]="selectedYear" placeholder="Alege anul de studiu" [style]="{width:'50%'}"></p-dropdown>
<p-dropdown required [options]="years" [(ngModel)]="selectedYear" placeholder="Alege anul de studiu"
[style]="{overflow:'visible', width:'50%'}"></p-dropdown>
</div>

<p-footer>
Expand Down Expand Up @@ -172,7 +173,7 @@ <h1> Pentru numarul de semestre (1, 2,..) </h1>
<p-header><h4>Cerere Diploma</h4></p-header>
<table>
<td><i class="material-icons">error outline</i></td>
<td><h3>Introduceti datele necesare. Toate campurile sunt obligatorii!</h3><br></td>
<td><h3>Introduceti datele necesare. Campurile cu * sunt obligatorii!</h3><br></td>
</table>

<div class="text-fields">
Expand Down Expand Up @@ -221,7 +222,7 @@ <h1> Pentru numarul de semestre (1, 2,..) </h1>
<p-header><h4>Cerere Situatie Scolara</h4></p-header>
<table>
<td><i class="material-icons">error outline</i></td>
<td><h3>Introduceti datele necesare. Toate campurile sunt obligatorii!</h3><br></td>
<td><h3>Introduceti datele necesare. Campurile cu * sunt obligatorii!</h3><br></td>
</table>

<div class="text-fields">
Expand Down Expand Up @@ -264,23 +265,31 @@ <h1> Pentru numarul de semestre (1, 2,..) </h1>
<p-header><h4>Trimitere cerere</h4></p-header>
<table>
<td><i class="material-icons">error outline</i></td>
<td><h3>Introduceti datele necesare. Toate campurile sunt obligatorii!</h3><br></td>
<td><h3>Introduceti datele necesare. Campurile cu * sunt obligatorii!</h3><br></td>
</table>

<div class="text-fields">
<label> *</label>
<p-dropdown [options]="years" [(ngModel)]="selectedYear" placeholder="Alege anul de studiu" [style]="{width:'50%'}"></p-dropdown>
<input required type="number" pInputText size="40" placeholder="Anul Absolvirii" [(ngModel)]="anulAbsolvirii"/>
</div>

<div class="text-fields">
<label> *</label>
<p-inputMask [(ngModel)]="an" mask="9999-9999" slotChar="2016-2017"
placeholder="Anul Universitar"></p-inputMask>
<p-selectButton [options]="examTypes" [(ngModel)]="selectedExamType"></p-selectButton>
</div>

<div class="text-fields">
<h1> Chitanţa certificat competenţă lingvistică </h1>
<label> *</label>
<p-selectButton [options]="examTypes" [(ngModel)]="selectedExamType"></p-selectButton>
<input type="text" required pInputText size="20" placeholder="Data" [(ngModel)]="competentaLingvisticaDate"/>
<label> *</label>
<input type="number" required pInputText size="20" placeholder="Suma" [(ngModel)]="competentaLingvisticaSum"/>
</div>

<div class="text-fields">
<h1> Chitanţă repetare examen de licenţă (unde este cazul) </h1>
<input type="text" pInputText size="20" placeholder="Data" [(ngModel)]="repetareExamenDate"/>
<input type="number" pInputText size="20" placeholder="Suma" [(ngModel)]="repetareExamenSum"/>
</div>

<div class="text-fields">
Expand All @@ -293,6 +302,11 @@ <h1> Pentru numarul de semestre (1, 2,..) </h1>
<input type="text" pInputText size="40" placeholder="Coordonator stiintific" [(ngModel)]="coordonator"/>
</div>

<div class="text-fields">
<label> *</label>
<input type="text" required minlength="10" maxlength="10" pInputText size="40" placeholder="Numar Telefon" [(ngModel)]="phoneNumber"/>
</div>

<p-footer>
<div class="ui-dialog-buttonpane ui-widget-content ui-helper-clearfix">
<button md-button class="button" pButton icon="fa-check" (click)="sendInformation6()">TRIMITE</button>
Expand Down
113 changes: 95 additions & 18 deletions front-end/src/app/components/home/home.component.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { Component, OnInit } from '@angular/core';
import { SelectItem } from 'primeng/components/common/api';

import { Validators, FormControl, FormGroup, FormBuilder } from '@angular/forms';
import { TransportRequestDoc } from '../../model/TransportRequestDoc.model';
import { WithdrawalRequestDoc } from '../../model/WithdrawalRequestDoc.model';
import { InterruptionRequestDoc } from '../../model/InterruptionRequestDoc.model';
import { DiplomaRequestDoc } from '../../model/DiplomaRequestDoc.model';
import { ScolarSituationRequestDoc } from '../../model/ScolarSituationRequestDoc.model';
import { LicenseRequestDoc } from '../../model/LicenseRequestDoc.model';

@Component({
selector: 'app-home',
Expand All @@ -11,6 +15,14 @@ import { Validators, FormControl, FormGroup, FormBuilder } from '@angular/forms'

export class HomeComponent implements OnInit {

anulAbsolvirii: number;
competentaLingvisticaSum: number;
repetareExamenSum: number;

phoneNumber: string;
competentaLingvisticaDate: string;
repetareExamenDate: string;

serie: string;
an: string;
accept: boolean = false;
Expand Down Expand Up @@ -66,8 +78,7 @@ export class HomeComponent implements OnInit {

this.courses = [];
this.courses.push({label: 'Cursuri de Zi', value: 'Cursuri de Zi'});
this.courses.push({label: 'Cursuri de Noapte', value: 'Cursuri de Noapte'});
this.courses.push({label: 'Cursuri de Pranz', value: 'Cursuri de Pranz'});
this.courses.push({label: 'Fara Frecventa', value: 'Fara Frecventa'});

this.years = [];
this.years.push({label: 'INFO1', value: {id: 1, name: 'INFO1', code: 'INFO1'}});
Expand Down Expand Up @@ -169,15 +180,43 @@ export class HomeComponent implements OnInit {
return (!this.coordonator);
}

checkAnulAbsolvirii() {
return (!this.anulAbsolvirii);
}

checkCompetentaLingvisticaSum() {
return (!this.competentaLingvisticaSum);
}

checkRepetareExamenSum() {
return (!this.repetareExamenSum);
}

checkCompetentaLingvisticaDate() {
return (!this.competentaLingvisticaDate);
}

checkRepetareExamenDate() {
return (!this.repetareExamenDate);
}

checkPhoneNumber() {
return ((!this.phoneNumber) || (this.phoneNumber.length != 10));
}

/////////////////////////////// AFISAREA PUPUP-URILOR SI TRIMITEREA INFORMATIILOR ////////////////////////////////////
showDialog1() {
this.display1 = true;
}

sendInformation1() {
if(this.checkSerie() || this.checkSelectedYear())
if (this.checkSerie() || this.checkSelectedYear())
this.showDialogError();
else {
let document = new TransportRequestDoc('');
document.documentName = 'TransportRequestDocument';
document.nrSeriesId = this.serie;
document.yearOfStudy = 69; //this.selectedYear
this.showDialogSuccess();
this.display1 = false;
}
Expand All @@ -188,76 +227,114 @@ export class HomeComponent implements OnInit {
}

sendInformation2() {
if(this.checkSerie() || this.checkSelectedYear() || this.checkAn() ||
this.checkSelectedCourse() || this.checkAccept())
if (this.checkSerie() || this.checkSelectedYear() || this.checkAn() ||
this.checkSelectedCourse() || this.checkAccept())
this.showDialogError();
else {
let document = new WithdrawalRequestDoc('');
document.documentName = 'WithdrawalDocumentRequest';
document.series = this.serie;
document.studyYear = 69; // this.selectedYear
document.universityYear = 666; // this.an
document.typeOfCourses = this.selectedCourse;
this.showDialogSuccess();
this.display2 = false;
}
//serie, selectedYear, an, selectedCourse, accept
}

showDialog3() {
this.display3 = true;
}

sendInformation3() {
if(this.checkSerie() || this.checkSelectedYear() || this.checkAn() ||
if (this.checkSerie() || this.checkSelectedYear() || this.checkAn() ||
this.checkSelectedStudy() || this.checkAccept() || this.checkDinSemestrul() ||
this.checkDinAnul() || this.checkPentruXSemestre())
this.showDialogError();
else {
let document = new InterruptionRequestDoc('');
document.documentName = 'InterruptionRequestDocument';
document.currentYear = 33231; // this.an;
document.yearOfStudy = 666; // this.selectedYear
document.startingSemester = this.dinSemestrul;
document.fromUniversityYear = this.dinAnul;
document.numberOfSemesters = this.pentruXSemestre;
// send serie
// send selectedYear
// send an
// send selectedStudy??
// send dinSemestrul
// send dinAnul
// send PentruXSemestre
this.showDialogSuccess();
this.display3 = false;
}

//serie, selectedYear, an, selectedStudy, accept, dinSemestrul, dinAnul, pentruXSemestre
}

showDialog4() {
this.display4 = true;
}

sendInformation4() {
if(this.checkSelectedStudentType() || this.checkSelectedYear() || this.checkAn() ||
if (this.checkSelectedStudentType() || this.checkSelectedYear() || this.checkAn() ||
this.checkSelectedDiplomaType() || this.checkAccept() || this.checkMotiv())
this.showDialogError();
else {
let document = new DiplomaRequestDoc(this.serie);
document.documentName = 'DiplomaDocumentRequest';
document.currentYear = 33231; // this.an;
document.yearOfStudy = 666; // this.selectedYear
this.showDialogSuccess();
this.display4 = false;
}
//selectedStudentType, selectedYear, an, dimplomaType, motiv, accept
}

showDialog5() {
this.display5 = true;
}

sendInformation5() {
if(this.checkAn() || this.checkSelectedStudentType() ||this.checkSelectedStudy() ||
if (this.checkAn() || this.checkSelectedYear() || this.checkSelectedStudy() ||
this.checkAccept() || this.checkMotiv())
this.showDialogError();
else {
let document = new ScolarSituationRequestDoc(this.serie);
document.documentName = 'ScolarSituationDocument';
document.currentYear = 33231; // this.an;
document.yearOfStudy = 666; // this.selectedYear

// send selectedStudy
this.showDialogSuccess();
this.display5 = false;
}
//selectedYear, an, SelectedStudy, motiv, accept
}

showDialog6() {
this.display6 = true;
}

sendInformation6() {
if(this.checkAn() || this.checkSelectedStudentType() ||this.checkSelectedExamType() ||
this.checkTema() || this.checkCoordonator())
if (this.checkAnulAbsolvirii() || this.checkSelectedExamType() ||
this.checkCompetentaLingvisticaDate() || this.checkCompetentaLingvisticaSum() ||
this.checkRepetareExamenDate() || this.checkRepetareExamenSum() ||
this.checkTema() || this.checkCoordonator() || this.checkPhoneNumber())
this.showDialogError();
else {
let document = new LicenseRequestDoc(this.serie);
document.documentName = 'LicenseRegistrationForm';
document.graduationYear = this.anulAbsolvirii;
document.dateReceiptLinguisticCompetence = this.competentaLingvisticaDate;
document.paymentReceiptLinguisticCompetence = this.competentaLingvisticaSum;
document.dateReceiptRedoLicenseExam = this.repetareExamenDate;
document.paymentReceiptRedoLicenseExam = this.repetareExamenSum;
document.licenseTopic = this.tema;
document.coordinatorProf = this.coordonator;
document.currentDateToday = this.phoneNumber;

// send selectedExamType
this.showDialogSuccess();
this.display6 = false;
}
//selectedYear, an, Examtype, tema, coordonator
}

}