Browse Source

fix

master
drfelfel 1 year ago
parent
commit
f733add51a
2 changed files with 18 additions and 4 deletions
  1. +10
    -3
      src/routes/panel/volunteer/table/table.component.html
  2. +8
    -1
      src/routes/panel/volunteer/table/table.component.ts

+ 10
- 3
src/routes/panel/volunteer/table/table.component.html View File

@ -18,7 +18,7 @@
<div class="selector" *ngIf="this.uid == 'tvu'">
<mat-form-field appearance="outline">
<mat-label>انتخاب مرکز / دانشگاه</mat-label>
<mat-select [(ngModel)]="namespace" multiple (selectionChange)="subscribe()">
<mat-select [(ngModel)]="namespace" multiple (selectionChange)="subscribe()" [disabled]="exporting">
<mat-optgroup
*ngFor="let group of univeristygroups"
[label]="group.name"
@ -39,15 +39,16 @@
<mat-form-field appearance="outline">
<mat-label>مقطع</mat-label>
<mat-select [(ngModel)]="grade" (selectionChange)="Get($event)">
<mat-select [(ngModel)]="grade" (selectionChange)="Get($event)" [disabled]="exporting">
<mat-option value="کاردانی"> کاردانی </mat-option>
<mat-option value="کارشناسی"> کارشناسی </mat-option>
</mat-select>
</mat-form-field>
<mat-form-field appearance="outline">
<mat-form-field appearance="outline" >
<mat-label>جستجو بر اساس فیلد</mat-label>
<mat-select
[(ngModel)]="searchBy"
[disabled]="exporting"
(selectionChange)="Get($event, 'search')"
>
<mat-option value="name"> نام </mat-option>
@ -62,6 +63,7 @@
<mat-form-field appearance="outline">
<mat-label>جستجو داوطلب</mat-label>
<input
[disabled]="exporting"
matInput
[(ngModel)]="search"
type="text"
@ -78,6 +80,11 @@
نتایج یافت شده : {{ this.size }}
</p>
<div class="flex-space"></div>
<button mat-raised-button color="green" (click)="exportExcel()" [disabled]="exporting">
<mat-icon>cloud_download</mat-icon>
<span>دریافت خروجی اکسل</span>
</button>
</mat-expansion-panel>
<mat-progress-bar
*ngIf="loading == true"

+ 8
- 1
src/routes/panel/volunteer/table/table.component.ts View File

@ -45,6 +45,7 @@ export class TableComponent implements OnInit {
university: ""
}
limit: number = 10;
exporting: boolean;
constructor(private excel: Excel, private rayconnect: Rayconnect, private cdr: ChangeDetectorRef) { }
ngOnInit(): void {
@ -141,6 +142,12 @@ export class TableComponent implements OnInit {
this.data.data.unshift(data);
}
exportExcel() {
this.exporting = true
console.log(this.size)
}
Get(e, x = "no") {
console.log(e)
@ -207,7 +214,7 @@ export class TableComponent implements OnInit {
if(this.uid == 'tvu'){
if (this.uid == 'tvu') {
Query['namespace'] = this.namespace
}

Loading…
Cancel
Save