Renamed Dataset Admin Listing To Dataset Profile Admin Listing

This commit is contained in:
Ioannis Kalyvas 2018-10-16 10:06:43 +03:00
parent 5d6ba74d61
commit 85c5a6bf2e
8 changed files with 66 additions and 80 deletions

View File

@ -21,7 +21,8 @@
<div class="panel-group">
<mat-expansion-panel *ngFor="let page of dataModel.pages; let i=index;" #panel>
<mat-expansion-panel-header>
<mat-panel-title *ngIf="form.get('pages').at(i).get('title').value && !panel.expanded">{{i + 1}}.{{form.get('pages').at(i).get('title').value}}</mat-panel-title>
<mat-panel-title *ngIf="form.get('pages').at(i).get('title').value && !panel.expanded">{{i +
1}}.{{form.get('pages').at(i).get('title').value}}</mat-panel-title>
<div class="btn-group pull-right">
<button type="button" class="btn btn-sm" style="margin-left:5px;" (click)="DeletePage(i);">
<span class="glyphicon glyphicon-erase"></span>
@ -47,7 +48,8 @@
<div>
<mat-expansion-panel *ngFor="let section of dataModel.sections; let i=index;" #panel>
<mat-expansion-panel-header>
<mat-panel-title *ngIf="form.get('sections').get(''+i).get('title').value && !panel.expanded">{{i + 1}}. {{form.get('sections').get(''+i).get('title').value}}</mat-panel-title>
<mat-panel-title *ngIf="form.get('sections').get(''+i).get('title').value && !panel.expanded">{{i + 1}}.
{{form.get('sections').get(''+i).get('title').value}}</mat-panel-title>
<div class="btn-group pull-right">
<button type="button" class="btn btn-sm" style="margin-left:5px;" (click)="DeleteSection(i);">
<span class="glyphicon glyphicon-erase"></span>
@ -72,6 +74,6 @@
</mat-step>
</mat-horizontal-stepper>
<button mat-button (click)="preview()">Preview</button>
<button mat-raised-button color="primary" type="button" (click)='onSubmit()' [disabled]="!form.valid">Save</button>
</div>

View File

@ -12,7 +12,7 @@ import { MatDialog } from '@angular/material';
import { DatasetProfilePreviewerComponent } from '../previewer/dataset-profile-previewer.component';
@Component({
selector: 'app-form-comp',
selector: 'app-form-component',
templateUrl: './form.component.html',
providers: [DatasetProfileAdmin, DatasetProfileService],
styleUrls: ['./form.component.scss']
@ -84,6 +84,7 @@ export class FormComponent implements OnInit {
updateForm(id, data) {
return this.datasetprofileAdmin.updateForm(id, data);
}
onSubmit() {
const data = this.form.value;

View File

@ -4,13 +4,13 @@ import { DatasetService } from '../services/dataset/dataset.service';
import { DynamicFormModule } from '../form/dynamic-form.module';
import { TranslateLoader, TranslateModule, TranslateService } from '@ngx-translate/core';
import { DatasetAdminRoutes } from './dataset-admin.routes';
import { DatasetAdminListingComponent } from './dataset-admin-listing.component';
import { CommonModule } from '@angular/common';
import { HttpClient, HttpClientModule } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { SharedModule } from '../shared/shared.module';
import { DatasetProfileAdminListingComponent } from './dataset-profile-admin-listing.component';
@NgModule({
imports: [
CommonModule,
@ -30,11 +30,11 @@ import { SharedModule } from '../shared/shared.module';
],
declarations: [
DatasetAdminListingComponent,
DatasetProfileAdminListingComponent,
],
exports: [
DatasetAdminListingComponent,
DatasetProfileAdminListingComponent,
RouterModule
],
providers: [

View File

@ -1,7 +1,7 @@
import { DatasetAdminListingComponent } from './dataset-admin-listing.component';
import { RouterModule, Routes } from '@angular/router';
import { AuthGuard } from '../shared/guards/auth.guard';
import { DatasetProfileAdminListingComponent } from './dataset-profile-admin-listing.component';
export const DatasetAdminRoutes: Routes = [
{ path: '', component: DatasetAdminListingComponent, canActivate: [AuthGuard] },
{ path: '', component: DatasetProfileAdminListingComponent, canActivate: [AuthGuard] },
];

View File

@ -16,12 +16,12 @@ import { DatasetProfileAdmin } from '../services/datasetProfileAdmin/datasetProf
@Component({
selector: 'app-dataset-admin-listing-component',
templateUrl: 'dataset-admin-listing.component.html',
styleUrls: ['./dataset-admin-listing.component.scss'],
selector: 'app-dataset-profile-admin-listing-component',
templateUrl: 'dataset-profile-admin-listing.component.html',
styleUrls: ['./dataset-profile-admin-listing.component.scss'],
providers: [DatasetProfileAdmin, DataManagementPlanService]
})
export class DatasetAdminListingComponent implements OnInit {
export class DatasetProfileAdminListingComponent implements OnInit {
@ViewChild(MatPaginator) _paginator: MatPaginator;
@ViewChild(MatSort) sort: MatSort;

View File

@ -21,29 +21,12 @@ export class DatasetProfileService {
this.headers = this.headers.set('Accept', 'application/json');
}
fetchAllDatasetProfiles() {
// return this.restBase.get("datasetprofiles/getAll");
}
getDatasetProfileById(datasetProfileID) {
return this.datasetProfileAdmin.getDatasetProfileById(datasetProfileID);
}
createDatasetProfile(datasetProfile) {
// return this.restBase.post("datasetprofile/create", datasetProfile);
}
updateDatasetProfile(datasetProfile) {
// return this.restBase.post("datasetprofile/update", datasetProfile);
}
delete(datasetProfile) {
// return this.restBase.post("datasetprofile/delete", datasetProfile);
}
queryAutocomplete(lookUpItem: RequestItem<AutocompleteLookupItem>): Observable<any> {
return this.httpClient.post(HostConfiguration.Server + 'search/autocomplete', lookUpItem);
}
}