Renamed Dataset Admin Listing To Dataset Profile Admin Listing
This commit is contained in:
parent
5d6ba74d61
commit
85c5a6bf2e
|
@ -1,5 +1,5 @@
|
|||
<div class="container">
|
||||
<!-- <mat-card>
|
||||
<!-- <mat-card>
|
||||
<form *ngIf="form" novalidate [formGroup]="form" (ngSubmit)="onSubmit()">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12">
|
||||
|
@ -15,63 +15,65 @@
|
|||
</form>
|
||||
</mat-card> -->
|
||||
|
||||
<mat-horizontal-stepper [linear]="true" #stepper>
|
||||
<mat-step>
|
||||
<mat-horizontal-stepper [linear]="true" #stepper>
|
||||
<mat-step>
|
||||
|
||||
<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>
|
||||
<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>
|
||||
</button>
|
||||
</div>
|
||||
</mat-expansion-panel-header>
|
||||
<div id="{{'p' + i}}" *ngIf="panel.expanded">
|
||||
<div>
|
||||
<app-page-form [form]="form.get('pages').at(i)" [dataModel]="page"></app-page-form>
|
||||
</div>
|
||||
</div>
|
||||
</mat-expansion-panel>
|
||||
</div>
|
||||
<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>
|
||||
<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>
|
||||
</button>
|
||||
</div>
|
||||
</mat-expansion-panel-header>
|
||||
<div id="{{'p' + i}}" *ngIf="panel.expanded">
|
||||
<div>
|
||||
<app-page-form [form]="form.get('pages').at(i)" [dataModel]="page"></app-page-form>
|
||||
</div>
|
||||
</div>
|
||||
</mat-expansion-panel>
|
||||
</div>
|
||||
|
||||
<div style="margin-top:20px; padding-left: 15px;" class="row">
|
||||
<button mat-button (click)="addPage()" style="cursor: pointer">
|
||||
Add Page +
|
||||
</button>
|
||||
</div>
|
||||
</mat-step>
|
||||
<mat-step>
|
||||
<div style="margin-top:20px; padding-left: 15px;" class="row">
|
||||
<button mat-button (click)="addPage()" style="cursor: pointer">
|
||||
Add Page +
|
||||
</button>
|
||||
</div>
|
||||
</mat-step>
|
||||
<mat-step>
|
||||
|
||||
<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>
|
||||
<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>
|
||||
</button>
|
||||
</div>
|
||||
</mat-expansion-panel-header>
|
||||
<div id="{{'s' + i}}" *ngIf="panel.expanded">
|
||||
<div>
|
||||
<app-section-form [form]="form.get('sections').get(''+i)" [dataModel]="section" [indexPath]="'s' + i"></app-section-form>
|
||||
</div>
|
||||
</div>
|
||||
</mat-expansion-panel>
|
||||
</div>
|
||||
<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>
|
||||
<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>
|
||||
</button>
|
||||
</div>
|
||||
</mat-expansion-panel-header>
|
||||
<div id="{{'s' + i}}" *ngIf="panel.expanded">
|
||||
<div>
|
||||
<app-section-form [form]="form.get('sections').get(''+i)" [dataModel]="section" [indexPath]="'s' + i"></app-section-form>
|
||||
</div>
|
||||
</div>
|
||||
</mat-expansion-panel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div style="margin-top:20px; padding-left: 15px;" class="row">
|
||||
<button mat-button (click)="addSection()" style="cursor: pointer">
|
||||
Add Section +
|
||||
</button>
|
||||
</div>
|
||||
</mat-step>
|
||||
</mat-horizontal-stepper>
|
||||
<button mat-button (click)="preview()">Preview</button>
|
||||
<div style="margin-top:20px; padding-left: 15px;" class="row">
|
||||
<button mat-button (click)="addSection()" style="cursor: pointer">
|
||||
Add Section +
|
||||
</button>
|
||||
</div>
|
||||
</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>
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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: [
|
||||
|
|
|
@ -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] },
|
||||
];
|
||||
|
|
|
@ -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;
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue