Skip to content

Commit

Permalink
Task #1 VC template changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Pratikshakhandagale committed Sep 15, 2022
1 parent 9e9fc02 commit 9c44583
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 4 deletions.
47 changes: 44 additions & 3 deletions src/app/admin/create-entity/create-entity.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ <h3>{{usecaseSchema[activeMenuNo]?.title}}</h3>
<i class="fa fa-ellipsis-h text-grey-color"
aria-hidden="true"></i>
<div class="dropdown-content">
<a (click)="viewField('string', i, '')">View</a>
<a (click)="deleteField('string', i, '')">Delete</a>
<a (click)="viewField('string', j, '')">View</a>
<a (click)="deleteField('string', j, '')">Delete</a>
</div>
</div>
</td>
Expand Down Expand Up @@ -419,14 +419,55 @@ <h3 class="heading-5">Add Entity</h3>
</div>
</div>

<div class="modal right fade" id="prewiewProfile" tabindex="-1" role="dialog"
aria-labelledby="prewiewProfile">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header pt-4 border-0">
<h3 class="heading-5">Save Configuration</h3>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
aria-hidden="true">&times;</span></button>
</div>
<div class="container mt-4">
<div class="mb-4">
<p class="heading-4 font-700 mb-05">Enter Configuration Name</p>
<input [(ngModel)]="templateName" class="w-100 input-field p14 p-3 inputField"
placeholder="Enter Document name" type="text" />
</div>

<div class="mt-2">
<p class="heading-4 font-700 mb-05">Enter Description<span
class="text-muted">(optional)</span></p>
<textarea [(ngModel)]="configDescription"
class="w-100 desc py-2 input-field p14 pl-3 inputField"
placeholder="Enter description"></textarea>
</div>


<div class="mt-4">
<button (click)="saveConfiguration()" data-dismiss="modal" aria-label="Close"
class="btn text-capitalize float-end btn-primary btn-primary-sm p1">Save</button>
<button class="close" data-dismiss="modal" aria-label="Close"
class="btn text-capitalize float-end btn-primary btn-primary-sm p1 sb-text-primary mr-2 bg-none">Cancel</button>
</div>
</div>
</div>
</div>
</div>

<footer class="footer fixed-bottom">
<div class="container-fluid">
<div>
<button *ngIf="isActive == 'create-vc' || isActive == 'test-publish'" (click)="backStep()"
class="btn btn-sec-bg submit-button px-3 my-2 ml-2 mr-2 ">Back</button> &nbsp;
<button (click)="nextStep()" [disabled]="!usecaseSchema[activeMenuNo]?.definitions?.data?.length"
<button (click)="nextStep()" *ngIf="isActive != 'test-publish' && isActive != 'create-vc'" [disabled]="!usecaseSchema[activeMenuNo]?.definitions?.data?.length"
class="btn text-capitalize float-end btn-primary btn-primary-sm px-3 my-2">Save and
Next</button>
<button (click)="nextStep()" *ngIf="isActive == 'create-vc'"
class="btn text-capitalize float-end btn-primary btn-primary-sm px-3 my-2">Save and
Next</button>
<button *ngIf="isActive == 'test-publish'" data-toggle="modal" data-target="#prewiewProfile"
class="btn text-capitalize float-end btn-primary btn-primary-sm px-3 my-2">Save </button>
<button *ngIf="isActive == 'configurations'"
class="btn btn-sec-bg float-end submit-button px-3 my-2 ml-2 mr-2 ">Skip</button> &nbsp;
<button *ngIf="isActive == 'create-vc' || isActive == 'ownership'"
Expand Down
22 changes: 21 additions & 1 deletion src/app/admin/create-entity/create-entity.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ export class CreateEntityComponent implements OnInit {
defination: any = [];
processEntity: number = 0;
sselectedVal: any = "";
templateName: any;
configDescription: any;
constructor(
private activeRoute: ActivatedRoute,
public router: Router,
Expand All @@ -82,9 +84,21 @@ export class CreateEntityComponent implements OnInit {


if (this.params.hasOwnProperty('step')) {

this.currentTab = Number(params.step);
this.isActive = 'create-vc';
} else {
this.currentTab = 0;
this.isActive = 'createSchema'
}

switch ( this.currentTab) {
case 0: this.isActive = 'createSchema'
break;
case 1: this.isActive = 'create-vc'
break;
case 2: this.isActive = 'test-publish'
break;
}

// if (this.params.hasOwnProperty('entity')) {
Expand Down Expand Up @@ -305,7 +319,7 @@ export class CreateEntityComponent implements OnInit {
}

}
}else{
} else {
let property = sProperties.data[i];
tempFieldObj[sProperties.propertyKey]['properties'][property.key] = property.data

Expand Down Expand Up @@ -794,6 +808,8 @@ export class CreateEntityComponent implements OnInit {
}

hideJSon() {

this.getEntityPropertiesByIndex(this.activeMenuNo);
this.isShowJson = !this.isShowJson;

}
Expand Down Expand Up @@ -939,6 +955,10 @@ export class CreateEntityComponent implements OnInit {
}
}

saveConfiguration() {
alert('save');
}



}

0 comments on commit 9c44583

Please sign in to comment.