add tvu
parent
2e235f78d8
commit
3727aab699
|
@ -1,26 +1,4 @@
|
||||||
<div class="selector" *ngIf="false">
|
|
||||||
<mat-form-field appearance="outline">
|
|
||||||
<mat-label>انتخاب مرکز / دانشگاه</mat-label>
|
|
||||||
<mat-select [formControl]="universityControl">
|
|
||||||
<mat-option value="all">تمامی مراکز</mat-option>
|
|
||||||
<mat-optgroup
|
|
||||||
*ngFor="let group of univeristygroups"
|
|
||||||
[label]="group.name"
|
|
||||||
[disabled]="group.disabled"
|
|
||||||
>
|
|
||||||
<mat-option [value]="group.value"
|
|
||||||
>تمامی مراکز {{ group.name }}</mat-option
|
|
||||||
>
|
|
||||||
<mat-option
|
|
||||||
*ngFor="let university of group.universities"
|
|
||||||
[value]="university.value"
|
|
||||||
>
|
|
||||||
{{ university.viewValue }}
|
|
||||||
</mat-option>
|
|
||||||
</mat-optgroup>
|
|
||||||
</mat-select>
|
|
||||||
</mat-form-field>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<mat-expansion-panel expanded style="width:100%">
|
<mat-expansion-panel expanded style="width:100%">
|
||||||
<mat-expansion-panel-header>
|
<mat-expansion-panel-header>
|
||||||
|
@ -32,6 +10,30 @@
|
||||||
<mat-panel-description> فیلتر ها و جستجو </mat-panel-description>
|
<mat-panel-description> فیلتر ها و جستجو </mat-panel-description>
|
||||||
</mat-expansion-panel-header>
|
</mat-expansion-panel-header>
|
||||||
|
|
||||||
|
<div class="selector" *ngIf="uid == 'tvu'">
|
||||||
|
<mat-form-field appearance="outline">
|
||||||
|
<mat-label>انتخاب مرکز / دانشگاه</mat-label>
|
||||||
|
<mat-select [formControl]="universityControl">
|
||||||
|
<mat-option value="all">تمامی مراکز</mat-option>
|
||||||
|
<mat-optgroup
|
||||||
|
*ngFor="let group of univeristygroups"
|
||||||
|
[label]="group.name"
|
||||||
|
[disabled]="group.disabled"
|
||||||
|
>
|
||||||
|
<mat-option [value]="group.value"
|
||||||
|
>تمامی مراکز {{ group.name }}</mat-option
|
||||||
|
>
|
||||||
|
<mat-option
|
||||||
|
*ngFor="let university of group.universities"
|
||||||
|
[value]="university.value"
|
||||||
|
>
|
||||||
|
{{ university.viewValue }}
|
||||||
|
</mat-option>
|
||||||
|
</mat-optgroup>
|
||||||
|
</mat-select>
|
||||||
|
</mat-form-field>
|
||||||
|
</div>
|
||||||
|
|
||||||
<mat-form-field appearance="outline">
|
<mat-form-field appearance="outline">
|
||||||
<mat-label>مقطع</mat-label>
|
<mat-label>مقطع</mat-label>
|
||||||
<mat-select [(ngModel)]="grade" (selectionChange)="subscribe()" multiple>
|
<mat-select [(ngModel)]="grade" (selectionChange)="subscribe()" multiple>
|
||||||
|
|
|
@ -32,17 +32,20 @@ export class AppComponent implements OnInit {
|
||||||
entry = ["مهر"]
|
entry = ["مهر"]
|
||||||
majors = []
|
majors = []
|
||||||
majorList = []
|
majorList = []
|
||||||
|
namespace = []
|
||||||
|
|
||||||
|
uid = ""
|
||||||
univeristygroups: UniversityGroup[] = [
|
univeristygroups: UniversityGroup[] = [
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'مرکزی',
|
name: 'مرکزی',
|
||||||
value: "markazi",
|
value: "fani.markazi",
|
||||||
universities: [
|
universities: [
|
||||||
{ value: 'athar', viewValue: 'اطهر' },
|
{ value: 'fani.markazi.arak.athar', viewValue: 'اطهر' },
|
||||||
{ value: 'amirkabir', viewValue: 'امیر کبیر' },
|
|
||||||
{ value: 'khomein', viewValue: 'دکتر حسابی خمین' },
|
{ value: 'fani.markazi.arak.amirkabir', viewValue: 'امیر کبیر' },
|
||||||
{ value: 'saveh', viewValue: 'مرکز پسران ساوه' }
|
{ value: 'fani.markazi.khomein.pkhomein', viewValue: 'دکتر حسابی خمین' },
|
||||||
|
{ value: 'fani.markazi.saveh.psaveh', viewValue: 'مرکز پسران ساوه' }
|
||||||
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -59,6 +62,7 @@ export class AppComponent implements OnInit {
|
||||||
constructor(private dialog: MatDialog, private rayconnect: Rayconnect, private snackbar: MatSnackBar) { }
|
constructor(private dialog: MatDialog, private rayconnect: Rayconnect, private snackbar: MatSnackBar) { }
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
this.uid = this.rayconnect.user.uid
|
||||||
this.fetch();
|
this.fetch();
|
||||||
|
|
||||||
Chart.defaults.global.defaultFontFamily = "Font"
|
Chart.defaults.global.defaultFontFamily = "Font"
|
||||||
|
@ -86,7 +90,7 @@ export class AppComponent implements OnInit {
|
||||||
console.log(res['data'])
|
console.log(res['data'])
|
||||||
|
|
||||||
|
|
||||||
if(this.majors.length == 0){
|
if (this.majors.length == 0) {
|
||||||
this.majorList = res['data']['majors']
|
this.majorList = res['data']['majors']
|
||||||
}
|
}
|
||||||
let cachedMajorColor = this.RandomColor(res['data']['majors'].length, 'majors');
|
let cachedMajorColor = this.RandomColor(res['data']['majors'].length, 'majors');
|
||||||
|
|
Loading…
Reference in New Issue