Skip to content

Commit

Permalink
Task #1 Create Schema and VC template
Browse files Browse the repository at this point in the history
  • Loading branch information
Pratikshakhandagale committed Sep 15, 2022
1 parent 03eadc0 commit 0e6ad3d
Show file tree
Hide file tree
Showing 13 changed files with 957 additions and 370 deletions.
1 change: 0 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
"./node_modules/grapesjs-component-code-editor/dist/grapesjs-component-code-editor.min.css",
"./node_modules/grapesjs-preset-newsletter/dist/grapesjs-preset-newsletter.css"


],
"scripts": [
"./node_modules/bootstrap/dist/js/bootstrap.min.js",
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,14 @@
"bootstrap": "^4.5.0",
"core-js": "^2.4.1",
"country-state-city": "^3.0.1",
"grapesjs": "^0.19.5",
"grapesjs-component-code-editor": "^1.0.20",
"grapesjs-preset-webpage": "0.1.11",
"grapesjs": "^0.18.4",
"grapesjs-component-code-editor": "^1.0.19",
"grapesjs-preset-newsletter": "^0.2.21",
"grapesjs-preset-webpage": "^0.1.11",
"iso-639-1": "^2.1.11",
"jexl": "^2.3.0",
"json-refs": "^3.0.4",
"jsoneditor": "^9.9.0",
"jsoneditor": "^9.7.4",
"keycloak-angular": "^8.1.0",
"keycloak-js": "^11.0.3",
"libphonenumber-js": "^1.6.8",
Expand All @@ -76,6 +77,7 @@
"ngx-toastr": "^13.2.1",
"ngx-webcam": "^0.3.2",
"path": "^0.12.7",
"prismjs": "^1.27.0",
"random-words": "^1.1.0",
"redux": "4.0.1",
"rxjs": "^6.5.4",
Expand Down
30 changes: 23 additions & 7 deletions src/app/admin/add-template/add-template.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,38 @@ export class AddTemplateComponent implements OnInit {
certificateContent: any;
oldTemplateName;
sampleData: any;
params: any;
entityName: any;
usecase: any;
constructor(public schemaService: SchemaService,
public toastMsg: ToastMessageService,
public router: Router,
private route: ActivatedRoute,
private formlyJsonschema: FormlyJsonschema,
public generalService: GeneralService,
public http: HttpClient) { }
public http: HttpClient,
private activeRoute: ActivatedRoute,
public router: Router) { }

ngOnInit(): void {

this.getDocument();

this.generalService.getData('/Issuer').subscribe((res) => {
console.log(res);
this.issuerOsid = res[0].osid;
});
// this.generalService.getData('/Issuer').subscribe((res) => {
// console.log(res);
// this.issuerOsid = res[0].osid;
// });

this.activeRoute.params.subscribe(params => {
this.params = params;
console.log({params});

if (this.params.hasOwnProperty('entity')) {
this.entityName = params.entity;
this.usecase = params.usecase.toLowerCase();


}
});

}

Expand Down Expand Up @@ -110,7 +126,7 @@ export class AddTemplateComponent implements OnInit {

editTemplate() {
localStorage.setItem('sampleData', JSON.stringify(this.sampleData));
this.router.navigate(['/edit-template'], { state: { item: this.sampleData } });
this.router.navigate(['/edit-template/' + this.usecase + '/' +this.entityName], { state: { item: this.sampleData } });
}


Expand Down
301 changes: 171 additions & 130 deletions src/app/admin/create-entity/create-entity.component.html

Large diffs are not rendered by default.

Loading

0 comments on commit 0e6ad3d

Please sign in to comment.