Skip to content

Commit

Permalink
Thay đổi trạng thái nhiều môn học (lần 2)
Browse files Browse the repository at this point in the history
  • Loading branch information
duykypaul committed Apr 5, 2019
1 parent 1c9bdac commit ad77d0a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Management/src/app/subjects/list/list.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ <h4 class="card-title">Subjects List</h4>
<table class="table table-striped table-no-bordered table-hover">
<thead>
<tr>
<th class="text-center">#</th>
<th>#</th>
<th>
<div class="checkbox">
<label>
Expand Down
34 changes: 17 additions & 17 deletions Management/src/app/subjects/list/list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,8 @@ export class ListComponent implements OnInit {
| Get subjects status: string, sort_field: string, sort_type: string, keyword: string
--------------------------------------------------------------------------------*/
getItems(status: string, sort_field: string, sort_type: string, keyword: string) {
this.ngProgress.start();
// this.ngProgress.done();

this.loading = true;
// this.ngProgress.start();
// this.loading = true;
this._subjectService.getItems(status, sort_field, sort_type, keyword)
.subscribe(
data => {
Expand All @@ -61,14 +59,15 @@ export class ListComponent implements OnInit {
},
error => this.reloadPageIfError(),
() => {
this.ngProgress.done();
this.loading = false;
// this.ngProgress.done();
// this.loading = false;
});

}

getSubject() {
this.ngProgress.start();
// this.ngProgress.start();
// this.loading = true;
/*-------------------------------
| Todo: Get groups
---------------------------------*/
Expand All @@ -77,8 +76,8 @@ export class ListComponent implements OnInit {
},
error => this.reloadPageIfError(),
() => {
this.ngProgress.done();
this.loading = false;
// this.ngProgress.done();
// this.loading = false;
}
);

Expand Down Expand Up @@ -122,8 +121,8 @@ export class ListComponent implements OnInit {
}

changeStatus(id: string, status: string) {
this.ngProgress.start();
this.loading = true;
// this.ngProgress.start();
// this.loading = true;
const objSubject: any = {
status: status,
modified: {
Expand All @@ -142,8 +141,8 @@ export class ListComponent implements OnInit {
},
error => this.reloadPageIfError(),
() => {
this.ngProgress.done();
this.loading = false;
// this.ngProgress.done();
// this.loading = false;
}
);
}
Expand All @@ -167,8 +166,8 @@ export class ListComponent implements OnInit {
if (this.selectedItems.length === 0) {
showAlert('warning', 'please choosen an subject', 'click to back in list', false, 'btn btn-warn');
} else {
this.ngProgress.start();
this.loading = true;
// this.ngProgress.start();
// this.loading = true;
const objUpdate: any = {
action: state,
items: this.selectedItems,
Expand All @@ -191,9 +190,10 @@ export class ListComponent implements OnInit {
},
error => this.reloadPageIfError(),
() => {
this.ngProgress.done();
this.loading = false;
// this.ngProgress.done();
// this.loading = false;
this.selectAll = false;
this.selectedItems = [];
}
);
}
Expand Down

0 comments on commit ad77d0a

Please sign in to comment.