Browse Source

fix

master
drfelfel 1 year ago
parent
commit
fb3ca52aeb
2 changed files with 161 additions and 139 deletions
  1. +157
    -138
      src/routes/panel/dashboard/app/app.component.html
  2. +4
    -1
      src/routes/panel/dashboard/app/app.component.ts

+ 157
- 138
src/routes/panel/dashboard/app/app.component.html View File

@ -1,19 +1,25 @@
<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>
<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 class="selector">
@ -26,144 +32,157 @@
<mat-panel-description> فیلتر ها و جستجو </mat-panel-description>
</mat-expansion-panel-header>
<mat-form-field appearance="outline">
<mat-label>مقطع</mat-label>
<mat-select [(ngModel)]="grade" (selectionChange)="subscribe()">
<mat-select [(ngModel)]="grade" (selectionChange)="subscribe()" multiple>
<mat-option value="کاردانی"> کاردانی </mat-option>
<mat-option value="کارشناسی"> کارشناسی </mat-option>
</mat-select>
</mat-form-field>
<mat-form-field appearance="outline">
<mat-label>ورودی</mat-label>
<mat-select [(ngModel)]="entry" (selectionChange)="subscribe()" multiple>
<mat-option value="مهر"> مهر </mat-option>
<mat-option value="بهمن"> بهمن </mat-option>
</mat-select>
</mat-form-field>
<mat-form-field appearance="outline">
<mat-label>شیفت</mat-label>
<mat-select [(ngModel)]="shift" (selectionChange)="subscribe()" multiple>
<mat-option value="روزانه"> روزانه </mat-option>
<mat-option value="شبانه"> شبانه </mat-option>
</mat-select>
</mat-form-field>
<div class="flex-space"></div>
</mat-expansion-panel>
<section *ngIf="data.length > 0">
<div class="stats">
<mat-card>
<mat-card-header>
<mat-card-title>
<ng-container *ngFor="let dataset of data[0].datasets">
# {{ dataset.label }}
</ng-container>
</mat-card-title>
</mat-card-header>
<mat-card-content>
<ngx-chartjs
[data]="data[0]"
[type]="data[0].type"
[options]="options"
width="500"
height="250"
></ngx-chartjs>
</mat-card-content>
</mat-card>
</div>
<div class="stats">
<mat-card>
<mat-card-header>
<mat-card-title>
<ng-container *ngFor="let dataset of data[0].datasets">
# {{ dataset.label }}
</ng-container>
</mat-card-title>
</mat-card-header>
<mat-card-content>
<ngx-chartjs
[data]="data[0]"
[type]="data[0].type"
[options]="options"
width="500"
height="250"
></ngx-chartjs>
</mat-card-content>
</mat-card>
</div>
<div class="stats">
<mat-card>
<mat-card-header>
<mat-card-title>
<ng-container *ngFor="let dataset of data[1].datasets">
# {{ dataset.label }}
</ng-container>
</mat-card-title>
</mat-card-header>
<mat-card-content>
<ngx-chartjs
[data]="data[1]"
[type]="data[1].type"
[options]="options"
width="500"
height="250"
></ngx-chartjs>
</mat-card-content>
</mat-card>
</div>
<div class="stats">
<mat-card>
<mat-card-header>
<mat-card-title>
<ng-container *ngFor="let dataset of data[1].datasets">
# {{ dataset.label }}
</ng-container>
</mat-card-title>
</mat-card-header>
<mat-card-content>
<ngx-chartjs
[data]="data[1]"
[type]="data[1].type"
[options]="options"
width="500"
height="250"
></ngx-chartjs>
</mat-card-content>
</mat-card>
</div>
<div class="stats">
<mat-card>
<mat-card-header>
<mat-card-title>
<ng-container *ngFor="let dataset of data[2].datasets">
# {{ dataset.label }}
</ng-container>
</mat-card-title>
</mat-card-header>
<mat-card-content>
<ngx-chartjs
[data]="data[2]"
[type]="data[2].type"
[options]="options"
width="500"
height="250"
></ngx-chartjs>
</mat-card-content>
</mat-card>
</div>
<div class="stats">
<mat-card>
<mat-card-header>
<mat-card-title>
<ng-container *ngFor="let dataset of data[2].datasets">
# {{ dataset.label }}
</ng-container>
</mat-card-title>
</mat-card-header>
<mat-card-content>
<ngx-chartjs
[data]="data[2]"
[type]="data[2].type"
[options]="options"
width="500"
height="250"
></ngx-chartjs>
</mat-card-content>
</mat-card>
</div>
<div class="stats">
<mat-card>
<mat-card-header>
<mat-card-title>
<ng-container *ngFor="let dataset of data[3].datasets">
# {{ dataset.label }}
</ng-container>
</mat-card-title>
</mat-card-header>
<mat-card-content>
<ngx-chartjs
[data]="data[3]"
[type]="data[3].type"
[options]="options"
width="500"
height="250"
></ngx-chartjs>
</mat-card-content>
</mat-card>
</div>
<div class="stats">
<mat-card>
<mat-card-header>
<mat-card-title>
<ng-container *ngFor="let dataset of data[3].datasets">
# {{ dataset.label }}
</ng-container>
</mat-card-title>
</mat-card-header>
<mat-card-content>
<ngx-chartjs
[data]="data[3]"
[type]="data[3].type"
[options]="options"
width="500"
height="250"
></ngx-chartjs>
</mat-card-content>
</mat-card>
</div>
<div class="stats">
<mat-card>
<mat-card-header>
<mat-card-title>
<ng-container *ngFor="let dataset of data[4].datasets">
# {{ dataset.label }}
</ng-container>
</mat-card-title>
</mat-card-header>
<mat-card-content>
<ngx-chartjs
[data]="data[4]"
[type]="data[4].type"
[options]="options"
width="500"
height="250"
></ngx-chartjs>
</mat-card-content>
</mat-card>
</div>
<div class="stats">
<mat-card>
<mat-card-header>
<mat-card-title>
<ng-container *ngFor="let dataset of data[4].datasets">
# {{ dataset.label }}
</ng-container>
</mat-card-title>
</mat-card-header>
<mat-card-content>
<ngx-chartjs
[data]="data[4]"
[type]="data[4].type"
[options]="options"
width="500"
height="250"
></ngx-chartjs>
</mat-card-content>
</mat-card>
</div>
<div class="stats">
<mat-card>
<mat-card-header>
<mat-card-title>
<ng-container *ngFor="let dataset of data[5].datasets">
# {{ dataset.label }}
</ng-container>
</mat-card-title>
</mat-card-header>
<mat-card-content>
<ngx-chartjs
[data]="data[5]"
[type]="data[5].type"
[options]="options"
width="500"
height="250"
></ngx-chartjs>
</mat-card-content>
</mat-card>
</div>
<div class="stats">
<mat-card>
<mat-card-header>
<mat-card-title>
<ng-container *ngFor="let dataset of data[5].datasets">
# {{ dataset.label }}
</ng-container>
</mat-card-title>
</mat-card-header>
<mat-card-content>
<ngx-chartjs
[data]="data[5]"
[type]="data[5].type"
[options]="options"
width="500"
height="250"
></ngx-chartjs>
</mat-card-content>
</mat-card>
</div>
</section>

+ 4
- 1
src/routes/panel/dashboard/app/app.component.ts View File

@ -27,7 +27,10 @@ interface UniversityGroup {
export class AppComponent implements OnInit {
universityControl = new FormControl();
grade = "کاردانی"
grade = ["کاردانی"]
shift = ["روزانه"]
entry = ["مهر"]
univeristygroups: UniversityGroup[] = [
{

Loading…
Cancel
Save