Fix: zatwierdzanie testów w grupie

This commit is contained in:
Marcin Szczepański 2019-12-08 12:00:47 +01:00
parent 1edd16a29e
commit 1c2c2eabb6
3 changed files with 14 additions and 6 deletions

View File

@ -28,6 +28,9 @@
<br /><br />
<button [disabled]="selected.length === 0" class="btn btn-study-cave mr-1" (click)="addResources()"><i class="fas fa-check-circle"></i> Dodaj</button>
</div>
<div *ngIf="!(materialsToAdd.length > 0 || flashcardsToAdd.length > 0 || testsToAdd.length > 0)">
Brak elementów do dodania
</div>
</div>
</div>
</div>

View File

@ -65,10 +65,10 @@ export class SharingResourcesInGroupsComponent implements OnInit, OnDestroy {
this.testsToAdd = [];
this.flashcardsToAdd = [];
this.materialsToAdd = success.map(this.addPropertiesToDisplayInMultiselectList);
if (this.materialsToAdd.length === 0) {
/*if (this.materialsToAdd.length === 0) {
this.snackBar.open('Brak materiałów, które możesz dodać do grupy.', null,
{ duration: 3000, verticalPosition: 'top', panelClass: ['snackbar-error'] });
}
}*/
},
error => {
this.snackBar.open('Wystąpił błąd serwera. Spróbuj ponownie później.', null,
@ -86,10 +86,10 @@ export class SharingResourcesInGroupsComponent implements OnInit, OnDestroy {
this.flashcardsToAdd = [];
this.materialsToAdd = [];
this.testsToAdd = success.map(this.addPropertiesToDisplayInMultiselectList);
if (this.testsToAdd.length === 0) {
/*if (this.testsToAdd.length === 0) {
this.snackBar.open('Brak testów, które możesz dodać do grupy.', null,
{ duration: 3000, verticalPosition: 'top', panelClass: ['snackbar-error'] });
}
}*/
},
error => {
this.snackBar.open('Wystąpił błąd serwera. Spróbuj ponownie później.', null,
@ -107,10 +107,10 @@ export class SharingResourcesInGroupsComponent implements OnInit, OnDestroy {
this.materialsToAdd = [];
this.testsToAdd = [];
this.flashcardsToAdd = success.map(this.addPropertiesToDisplayInMultiselectList);
if (this.flashcardsToAdd.length === 0) {
/*if (this.flashcardsToAdd.length === 0) {
this.snackBar.open('Brak fiszek, które możesz dodać do grupy.', null,
{ duration: 3000, verticalPosition: 'top', panelClass: ['snackbar-error'] });
}
}*/
},
error => {
this.snackBar.open('Wystąpił błąd serwera. Spróbuj ponownie później.', null,

View File

@ -162,3 +162,8 @@ a:hover{
background-color: orange;
border-color: orange;
}
.ui-listbox {
display: block !important;
width: 700px !important;
}