make it public functionality
This commit is contained in:
parent
62c4fb0547
commit
4741c31c0c
|
@ -70,7 +70,7 @@
|
|||
<mat-cell *matCellDef="let row">
|
||||
<mat-menu #actionsMenu="matMenu">
|
||||
<button mat-menu-item (click)="rowClick(row.id)"><mat-icon>mode_edit</mat-icon>{{'DATASET-LISTING.ACTIONS.EDIT' | translate}}</button>
|
||||
<button mat-menu-item (click)="makeItPublic(row.id)"><mat-icon>people_outline</mat-icon>{{'DATASET-LISTING.ACTIONS.MAKE-IT-PUBLIC' | translate}}</button>
|
||||
<button *ngIf="row.status==1" mat-menu-item (click)="makeItPublic(row.id)"><mat-icon>people_outline</mat-icon>{{'DATASET-LISTING.ACTIONS.MAKE-IT-PUBLIC' | translate}}</button>
|
||||
</mat-menu>
|
||||
<button mat-icon-button [matMenuTriggerFor]="actionsMenu">
|
||||
<mat-icon>more_vert</mat-icon>
|
||||
|
|
|
@ -85,8 +85,8 @@ export class DatasetListingComponent implements OnInit {
|
|||
return defaultCriteria;
|
||||
}
|
||||
|
||||
makeItPublic(){
|
||||
|
||||
makeItPublic(id:String){debugger;
|
||||
this.datasetService.makeDatasetPublic(id).subscribe();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -29,5 +29,9 @@ export class DatasetService {
|
|||
getPaged(dataTableRequest: DataTableRequest<DatasetCriteria>): Observable<DataTableData<DatasetListingModel>> {
|
||||
return this.http.post<DataTableData<DatasetListingModel>>(this.actionUrl + 'getPaged', dataTableRequest, { headers: this.headers });
|
||||
}
|
||||
|
||||
makeDatasetPublic(id: String){
|
||||
return this.http.get(this.actionUrl + 'makepublic/' + id, { headers: this.headers })
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue