+
+
+
+
+
+
+
+
+
*This field is
+ Required
-
-
-
-
-
*This field is Required
+
+
+
+
+
+
*This field is
+ Required
-
*Required Only Number
-
+
*Required Only Number
-
-
-
-
-
*This field is Required
-
-
-
-
-
-
-
*This field is Required
-
-
-
-
-
-
-
*This field is Required
-
-
-
-
-
-
-
-
*This field is Required
-
-
+
-
-
+
+
+
+
+
*This field is
+ Required
+
+
+
+
+
+
+
*This
+ field is Required
+
-
-
-
-
-
-
Are You Sure Want to delete?
-
{{rowSelected.menuItemId}}
-
+
+
+
+
+
*This
+ field is Required
+
+
-
-
+
+
+
+
+
-
- Update Menu Maintenance
-
-
{{rowSelected.menuItemId}}
-
-
-
-
-
-
-
- Import File
-
-
-
+
+
Are You Sure Want to delete?
+ {{rowSelected.menuItemId}}
-
\ No newline at end of file
+
+
+
+
+
+ Update Menu Maintenance
+
+
{{rowSelected.menuItemId}}
+
+
+
+
+
+
+
+ Import File
+
+
+
+
+
\ No newline at end of file
diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/admin/menumaintance/menumaintance.component.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/admin/menumaintance/menumaintance.component.ts
index 777b5ed..2231d83 100644
--- a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/admin/menumaintance/menumaintance.component.ts
+++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/admin/menumaintance/menumaintance.component.ts
@@ -1,7 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { ToastrService } from 'ngx-toastr';
-import {MenumaintanceService} from '../../../../services/admin/menumaintance.service';
+import { MenumaintanceService } from '../../../../services/admin/menumaintance.service';
import { Rn_Main_Menu } from '../../../../models/builder/Rn_Main_Menu';
import { ActivatedRoute, Router } from '@angular/router';
import { MenuGroupService } from 'src/app/services/admin/menu-group.service';
@@ -17,25 +17,25 @@ import { TranslateService } from '@ngx-translate/core';
export class MenumaintanceComponent implements OnInit {
loading = false;
selected: any[] = [];
- rowSelected :any= {};
- modaldelete=false;
- modalAdd= false;
- modaledit=false;
+ rowSelected: any = {};
+ modaldelete = false;
+ modalAdd = false;
+ modaledit = false;
givendata;
menus: Rn_Main_Menu[];
- mainid=0;
+ mainid = 0;
public entryForm: FormGroup;
mcreate;
mdelete;
medit;
showdata;
error;
- submitted=false;
- constructor(private menuservice:MenumaintanceService,
- private toastr:ToastrService,
+ submitted = false;
+ constructor(private menuservice: MenumaintanceService,
+ private toastr: ToastrService,
private excel: ExcelService,
private _fb: FormBuilder,
- private route:ActivatedRoute,
+ private route: ActivatedRoute,
private menuGroupService: MenuGroupService,
private csvService: CsvService,
private translate: TranslateService,
@@ -44,12 +44,12 @@ export class MenumaintanceComponent implements OnInit {
ngOnInit(): void {
this.showdata = this.menuGroupService.getdata();
console.log(this.showdata);
- this.mcreate=this.showdata.mcreate;
- console.log(this.mcreate);
- this.mdelete=this.showdata.mdelete
- console.log(this.mdelete);
- this.medit=this.showdata.medit
- console.log(this.medit);
+ this.mcreate = this.showdata.mcreate;
+ console.log(this.mcreate);
+ this.mdelete = this.showdata.mdelete
+ console.log(this.mdelete);
+ this.medit = this.showdata.medit
+ console.log(this.medit);
// this.menuservice.getAll().subscribe((data) => {
// console.log(data);
@@ -57,124 +57,123 @@ export class MenumaintanceComponent implements OnInit {
// });
this.entryForm = this._fb.group({
- // menuItemId:[null],
- menuId:[null],
- menuItemDesc:['',[Validators.required]] ,
- itemSeq:['',[Validators.required, Validators.pattern(/^-?(0|[1-9]\d*)?$/)]] ,
- moduleName:['',[Validators.required]] ,
- status:['',[Validators.required]] ,
- main_menu_action_name:['',[Validators.required]],
- main_menu_icon_name:['',[Validators.required]]
- });
- this.getdata();
+ // menuItemId:[null],
+ menuId: [null],
+ menuItemDesc: ['', [Validators.required]],
+ itemSeq: ['', [Validators.required, Validators.pattern(/^-?(0|[1-9]\d*)?$/)]],
+ moduleName: ['', [Validators.required]],
+ status: ['', [Validators.required]],
+ main_menu_action_name: ['', [Validators.required]],
+ main_menu_icon_name: ['', [Validators.required]]
+ });
+ this.getdata();
}
-
+
switchLanguage(language: string) {
this.translate.use(language);
}
- getdata(){
+ getdata() {
this.menuservice.getByCurrentUserMenuGroupId1().subscribe(resp => {
this.menus = resp;
console.log('menus: ', this.menus);
- if(this.menus.length==0){
- this.error="No data Available";
+ if (this.menus.length == 0) {
+ this.error = "No data Available";
console.log(this.error)
}
- },(error) => {
- console.log(error);
- if(error){
- this.error="Server Error";
- }
- })
+ }, (error) => {
+ console.log(error);
+ if (error) {
+ this.error = "Server Error";
+ }
+ })
}
- onSubmit(){
- this.submitted=true;
+ onSubmit() {
+ this.submitted = true;
if (this.entryForm.invalid) {
return;
}
-this.menuservice.create1(this.entryForm.value).subscribe((data)=>{
- console.log(data);
- if (data) {
- this.toastr.success('Added successfully');
+ this.menuservice.create1(this.entryForm.value).subscribe((data) => {
+ console.log(data);
+ if (data) {
+ this.toastr.success('Added successfully');
+ }
+ this.ngOnInit();
+ },
+ (error) => {
+ console.log('Error in adding data...', +error);
+ if (error) {
+ this.toastr.error('Not added Data Getting Some Error');
}
- this.ngOnInit();
-},
-(error) => {
-console.log('Error in adding data...',+error);
-if(error){
- this.toastr.error('Not added Data Getting Some Error');
-}
-this.getdata();
-});
-this.modalAdd=false;
+ this.getdata();
+ });
+ this.modalAdd = false;
}
goToAdd() {
- this.modalAdd=true;
- }
- submenu(id:any){
- this.router.navigate(["../submenu/" +id], { relativeTo: this.route })
- }
- data:{};
- shrink(id:any,row){
- this.rowSelected = row;
- console.log(this.rowSelected);
-if(this.rowSelected.subMenus!=0){
- this.rowSelected.subMenus=[]
-}console.log(this.rowSelected);
-this.menuservice.sink(id,this.rowSelected).subscribe((data)=>{
- console.log(data);
-})
- }
- goToEdit(row) {
- this.rowSelected = row;
- console.log(row)
- this.modaledit=true;
- //this.router.navigate(["../edit/" + id], { relativeTo: this.route });
- }
- onDelete(row) {
- this.rowSelected = row;
- this.modaldelete=true;
- }
+ this.modalAdd = true;
+ }
+ submenu(id: any) {
+ this.router.navigate(["../submenu/" + id], { relativeTo: this.route })
+ }
+ data: {};
+ shrink(id: any, row) {
+ this.rowSelected = row;
+ console.log(this.rowSelected);
+ if (this.rowSelected.subMenus != 0) {
+ this.rowSelected.subMenus = []
+ } console.log(this.rowSelected);
+ this.menuservice.sink(id, this.rowSelected).subscribe((data) => {
+ console.log(data);
+ })
+ }
+ goToEdit(row) {
+ this.rowSelected = row;
+ console.log(row)
+ this.modaledit = true;
+ //this.router.navigate(["../edit/" + id], { relativeTo: this.route });
+ }
+ onDelete(row) {
+ this.rowSelected = row;
+ this.modaldelete = true;
+ }
- delete(id)
- {
- this.modaldelete = false;
- console.log("in delete "+id);
- this.menuservice.delete1(id).subscribe((data)=>{
- console.log(data);
- this.toastr.success('Deleted successfully');
- this.ngOnInit();
- },
+ delete(id) {
+ this.modaldelete = false;
+ console.log("in delete " + id);
+ this.menuservice.delete1(id).subscribe((data) => {
+ console.log(data);
+ this.toastr.success('Deleted successfully');
+ this.ngOnInit();
+ },
(error) => {
- console.log('Error in adding data...',+error);
- if(error){
+ console.log('Error in adding data...', +error);
+ if (error) {
this.toastr.error('Not Deleted Data Getting Some Error');
}
});
- }
- onUpdate(id){
- this.modaledit=false;
-this.menuservice.update1(id,this.rowSelected).subscribe((data)=>{
- console.log(data);
- if (data) {
- this.toastr.success('Updated successfully');
- }
-},
-(error) => {
- console.log('Error in adding data...',+error);
- if(error){
- this.toastr.error('Not updated Data Getting Some Error');
}
-});
- }
+ onUpdate(id) {
+ this.modaledit = false;
+ this.menuservice.update1(id, this.rowSelected).subscribe((data) => {
+ console.log(data);
+ if (data) {
+ this.toastr.success('Updated successfully');
+ }
+ },
+ (error) => {
+ console.log('Error in adding data...', +error);
+ if (error) {
+ this.toastr.error('Not updated Data Getting Some Error');
+ }
+ });
+ }
- onExport() {
- this.excel.exportAsExcelFile(this.givendata, 'menumaintanance_',
- moment().format('YYYYMMDD_HHmmss'))
- }
+ onExport() {
+ this.excel.exportAsExcelFile(this.givendata, 'menumaintanance_',
+ moment().format('YYYYMMDD_HHmmss'))
+ }
- // csv
+ // csv
modalCsv = false;
selectedFiles: File;
diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/admin/submenu/submenu.component.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/admin/submenu/submenu.component.ts
index ae45378..1b38e28 100644
--- a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/admin/submenu/submenu.component.ts
+++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/admin/submenu/submenu.component.ts
@@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
-import {MenumaintanceService} from '../../../../services/admin/menumaintance.service';
+import { MenumaintanceService } from '../../../../services/admin/menumaintance.service';
import { Rn_Main_Menu } from '../../../../models/builder/Rn_Main_Menu';
import { ActivatedRoute, Router } from '@angular/router';
import { AbstractControl, FormBuilder, FormGroup, Validators } from '@angular/forms';
@@ -18,121 +18,120 @@ function numberValidator(control: AbstractControl): { [key: string]: any } | nul
})
export class SubmenuComponent implements OnInit {
loading = false;
- modalAdd= false;
- modaledit=false;
- modaldelete=false;
+ modalAdd = false;
+ modaledit = false;
+ modaldelete = false;
selected: any[] = [];
- rowSelected :any= {};
+ rowSelected: any = {};
givendata;
menus: Rn_Main_Menu[];
sub;
id;
mainid;
- submitted=false;
+ submitted = false;
public entryForm: FormGroup;
- constructor(private menuservice:MenumaintanceService,
- private toastr:ToastrService,
+ constructor(private menuservice: MenumaintanceService,
+ private toastr: ToastrService,
private _fb: FormBuilder,
- private route:ActivatedRoute,
+ private route: ActivatedRoute,
private router: Router,) { }
ngOnInit(): void {
this.id = this.route.snapshot.params["id"];
console.log("project mainmenu with id = ", this.id);
this.getById(this.id);
-this.mainid=this.id
+ this.mainid = this.id
this.entryForm = this._fb.group({
- // menuItemId:[null],
- menuId:[this.mainid],
- menuItemDesc:['',[Validators.required]] ,
+ // menuItemId:[null],
+ menuId: [this.mainid],
+ menuItemDesc: ['', [Validators.required]],
// itemSeq:['',[Validators.required]] ,
- // itemSeq: ['', [Validators.required, numberValidator]],
+ // itemSeq: ['', [Validators.required, numberValidator]],
itemSeq: ['', [Validators.required, Validators.pattern('^[0-9]*$')]],
- moduleName:['',[Validators.required]] ,
- status:['',[Validators.required]] ,
- main_menu_action_name:['',[Validators.required]]
- });
+ moduleName: ['', [Validators.required]],
+ status: ['', [Validators.required]],
+ main_menu_action_name: ['', [Validators.required]]
+ });
- // this.getdata();
+ // this.getdata();
}
- getById(id:any){
- this.menuservice.getbyid(id).subscribe((data)=>{
- this.sub=data;
+ getById(id: any) {
+ this.menuservice.getbyid(id).subscribe((data) => {
+ this.sub = data;
console.log(this.sub)
})
}
- getdata(){
+ getdata() {
this.menuservice.getByCurrentUserMenuGroupId1().subscribe(resp => {
this.menus = resp;
- console.log('menus: ', this.menus);
- })
+ console.log('menus: ', this.menus);
+ })
}
goToAdd() {
- this.modalAdd=true;
+ this.modalAdd = true;
+ }
+ onSubmit() {
+ this.submitted = true;
+ if (this.entryForm.invalid) {
+ return;
}
- onSubmit(){
- this.submitted=true;
- if (this.entryForm.invalid) {
- return;
+ this.menuservice.create1(this.entryForm.value).subscribe((data) => {
+ console.log(data);
+ if (data) {
+ this.toastr.success('Added successfully');
}
- this.menuservice.create1(this.entryForm.value).subscribe((data)=>{
- console.log(data);
- if (data) {
- this.toastr.success('Added successfully');
- }
- },
+ },
(error) => {
- console.log('Error in adding data...',+error);
- if(error){
- this.toastr.error('Not added Data Getting Some Error');
- }
+ console.log('Error in adding data...', +error);
+ if (error) {
+ this.toastr.error('Not added Data Getting Some Error');
+ }
});
- this.modalAdd=false;
- }
+ this.modalAdd = false;
+ }
- goToEdit(row) {
- this.rowSelected = row;
- console.log(row)
- this.modaledit=true;
- //this.router.navigate(["../edit/" + id], { relativeTo: this.route });
- }
- onDelete(row) {
- this.rowSelected = row;
- this.modaldelete=true;
- }
-
- delete(id)
- {
- this.modaldelete = false;
- console.log("in delete "+id);
- this.menuservice.delete1(id).subscribe((data)=>{
- console.log(data);
- if (data) {
- this.toastr.success('Deleted successfully');
- }
- },
- (error) => {
- console.log('Error in adding data...',+error);
- if(error){
- this.toastr.error('Not Deleted Data Getting Some Error');
- }
- });
+ goToEdit(row) {
+ this.rowSelected = row;
+ console.log(row)
+ this.modaledit = true;
+ //this.router.navigate(["../edit/" + id], { relativeTo: this.route });
+ }
+ onDelete(row) {
+ this.rowSelected = row;
+ this.modaldelete = true;
+ }
+ delete(id) {
+ this.modaldelete = false;
+ console.log("in delete " + id);
+ this.menuservice.delete1(id).subscribe((data) => {
+ console.log(data);
+ if (data) {
+ this.toastr.success('Deleted successfully');
+ }
+ },
+ (error) => {
+ console.log('Error in adding data...', +error);
+ if (error) {
+ this.toastr.error('Not Deleted Data Getting Some Error');
}
- onUpdate(id){
- this.modaledit=false;
- this.menuservice.update1(id,this.rowSelected).subscribe((data)=>{
+ });
+
+ }
+ onUpdate(id) {
+ this.modaledit = false;
+ this.menuservice.update1(id, this.rowSelected).subscribe((data) => {
console.log(data);
if (data) {
this.toastr.success('Updated successfully');
- }
- },
- (error) => {
- console.log('Error in adding data...',+error);
- if(error){
- this.toastr.error('Not updated Data Getting Some Error');
}
- });
+ },
+ (error) => {
+ console.log('Error in adding data...', +error);
+ if (error) {
+ this.toastr.error('Not updated Data Getting Some Error');
}
+ });
+ }
}
diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.component.html b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.component.html
index f1ae359..e290068 100644
--- a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.component.html
+++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.component.html
@@ -42,9 +42,7 @@
-
- Technolgy Stack
-
+
Type Render
@@ -88,12 +86,9 @@
{{user.uitype }}
-
{{user.techstack }}
{{user.typerender }}
-
-
@@ -358,10 +353,7 @@
-
diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.component.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.component.ts
index f49ca07..a500159 100644
--- a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.component.ts
+++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.component.ts
@@ -10,6 +10,7 @@ import { UserInfoService } from 'src/app/services/user-info.service';
import { SiteTreeservice } from '../SiteBuilderGrid/SiteTree.service';
import { COMMON_CSS } from '../WireframesUi/common-css';
import { Download_Css } from '../WireframesUi/download-css';
+import { ActivatedRoute } from '@angular/router';
// import { Download_Css } from '../WireframesUi/download-css';
declare var JsBarcode: any;
@Component({
@@ -52,6 +53,7 @@ export class Design_lbraryComponent implements OnInit {
newLine: any;
additionalFieldsFromBackend: any[] = [];
formcode = 'Design_lbrary_formCode'
+ headerId;
tableName = 'Design_lbrary'; checkFormCode; selected: any[] = []; constructor(
private extensionService: ExtensionService,
private userInfoService: UserInfoService,
@@ -60,10 +62,13 @@ export class Design_lbraryComponent implements OnInit {
private toastr: ToastrService,
private _fb: FormBuilder,
private siteTreeService: SiteTreeservice,
+ private route: ActivatedRoute,
) { }
// component button
ngOnInit(): void {
+ this.headerId = this.route.snapshot.params["id"];
+ console.log("headerId : = ", this.headerId);
if (this.cardmodeldata !== '') {
this.cardmodal = JSON.parse(this.cardmodeldata);
this.dashboardArray = this.cardmodal.dashboard.slice();
@@ -85,11 +90,9 @@ export class Design_lbraryComponent implements OnInit {
uitype: [null],
javacode: [null],
typerender: [null],
- techstack: [null],
+ // techstack: [null],
html: [null],
-
-
-
+ hedaer_id: [this.headerId],
}); // component_button200
// form code start
@@ -111,39 +114,16 @@ export class Design_lbraryComponent implements OnInit {
});
}
});
- console.log(this.entryForm.value);
+ console.log('form code ', this.entryForm.value);
// form code end
-
-
-
-
-
-
-
-
-
-
-
-
-
}
-
-
-
-
-
-
-
-
-
-
-
-
error;
getData() {
- this.mainService.getAll().subscribe((data) => {
- console.log(data);
- this.product = data;
+ this.mainService.getAll(this.headerId).subscribe((data) => {
+ console.log('get all ', data);
+ // this.product = data;
+ this.product = Array.isArray(data) ? data : [];
+
if (this.product.length == 0) {
this.error = "No Data Available"
}
@@ -156,19 +136,6 @@ export class Design_lbraryComponent implements OnInit {
}
onEdit(row) {
this.rowSelected = row;
-
-
-
-
-
-
-
-
-
-
-
-
-
this.modalEdit = true;
}
onDelete(row) {
@@ -187,18 +154,6 @@ export class Design_lbraryComponent implements OnInit {
}
onUpdate(id) {
this.modalEdit = false;
-
-
-
-
-
-
-
-
-
-
-
-
//console.log("in update");
console.log("id " + id);
console.log(this.rowSelected);
@@ -213,17 +168,6 @@ export class Design_lbraryComponent implements OnInit {
this.ngOnInit();
}, 500);
-
-
-
-
-
-
-
-
-
-
-
}, (error) => {
console.log(error);
if (error.status >= 200 && error.status <= 299) {
@@ -242,18 +186,6 @@ export class Design_lbraryComponent implements OnInit {
}
onCreate() {
this.modalAdd = false;
-
-
-
-
-
-
-
-
-
-
-
-
this.mainService.create(this.entryForm.value).subscribe(
(data) => {
console.log(data);
@@ -264,17 +196,6 @@ export class Design_lbraryComponent implements OnInit {
this.ngOnInit();
}, 500);
-
-
-
-
-
-
-
-
-
-
-
}, (error) => {
console.log(error);
if (error.status >= 200 && error.status <= 299) {
@@ -294,17 +215,6 @@ export class Design_lbraryComponent implements OnInit {
goToAdd(row) {
this.modalAdd = true; this.submitted = false;
-
-
-
-
-
-
-
-
-
-
-
}
submitted = false;
onSubmit() {
@@ -312,11 +222,11 @@ export class Design_lbraryComponent implements OnInit {
this.submitted = true;
if (this.entryForm.invalid) {
return;
- } this.onCreate();
+ }
+ this.onCreate();
}
-
rsModaldescription = false;
goToReplaceStringdescription(row) {
this.rowSelected = row; this.rsModaldescription = true;
diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.service.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.service.ts
index 96cc0bf..1d632c4 100644
--- a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.service.ts
+++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.service.ts
@@ -2,17 +2,17 @@ import { Injectable } from '@angular/core';
import { Observable } from "rxjs";
import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http";
import { ApiRequestService } from "src/app/services/api/api-request.service";
-import { environment } from 'src/environments/environment';
+import { environment } from 'src/environments/environment';
@Injectable({
providedIn: 'root'
})
-export class Design_lbraryservice{
- private baseURL = "Design_lbrary/Design_lbrary" ; constructor(
+export class Design_lbraryservice {
+ private baseURL = "Design_lbrary/Design_lbrary"; constructor(
private http: HttpClient,
private apiRequest: ApiRequestService,
) { }
- getAll(page?: number, size?: number): Observable
{
- return this.apiRequest.get(this.baseURL);
+ getAll(id: number, page?: number, size?: number): Observable {
+ return this.apiRequest.get(this.baseURL + "/line/" + id);
}
getById(id: number): Observable {
const _http = this.baseURL + "/" + id;
@@ -29,17 +29,17 @@ export class Design_lbraryservice{
const _http = this.baseURL + "/" + id;
return this.apiRequest.delete(_http);
}
-
-
-
-
-
-
-
-
-
-
-
-
-// updateaction
+
+
+
+
+
+
+
+
+
+
+
+
+ // updateaction
}
\ No newline at end of file
diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Dlf_header/Dlf_header.component.html b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Dlf_header/Dlf_header.component.html
new file mode 100644
index 0000000..5c08780
--- /dev/null
+++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Dlf_header/Dlf_header.component.html
@@ -0,0 +1,447 @@
+
+ - DlfHeader
+
+
+
+
+
DlfHeader
+
+
+
+
+
+
+
+
+
+
+ Loading ...
+
+ {{error}}
+
+
+ Name
+
+
+
+ Description
+
+
+
+
+ Technolgy Stack
+
+
+ type
+
+
+ Active
+
+
+
+
+ Line
+
+
+
+
+
+ Action
+
+
+
+
+
+ {{user. name }}
+
+
+
+
+
+ {{user.techstack }}
+
+
+
+ {{user. type }}
+ {{user. active }}
+
+
+
+
+
+
+
+
+ Who Column
+ Account ID: {{user.accountId}}
+ Created At: {{user.createdAt| date}}
+ Created By: {{user.createdBy}}
+ Updated At: {{user.updatedAt | date}}
+ Updated By: {{user.updatedBy}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Users per page
+ {{pagination.firstItem + 1}} - {{pagination.lastItem + 1}}
+ of {{pagination.totalItems}} users
+
+
+
+
+
+
+
+
+
+ Data could be found. Loading..
+ Loading ...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{beforeText(item.fieldtext)}}
+ {{ app[transform(item.fieldtext) ] }}
+ {{afterText(item.fieldtext)}}
+
+
+
+ {{beforeText(item.fieldtext)}}
+ {{ app[transform(item.fieldtext) ] | date}}
+ {{afterText(item.fieldtext)}}
+
+
+ {{beforeText(item.fieldtext)}}
+ {{ app[transform(item.fieldtext) ]}}
+ {{afterText(item.fieldtext)}}
+
+
+
+
+
+
+
+
+
+
+
+
+
![File Preview]()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Update DlfHeader
+
+
+
+
+
+
{{rowSelected.id}}
+
+
+
+
+
+
+
Are You Sure Want to delete?
+ {{rowSelected.id}}
+
+
+
+
+
+ Add DlfHeader
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Form Extension
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Dlf_header/Dlf_header.component.scss b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Dlf_header/Dlf_header.component.scss
new file mode 100644
index 0000000..c47b921
--- /dev/null
+++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Dlf_header/Dlf_header.component.scss
@@ -0,0 +1,78 @@
+//@import "../../../../assets/scss/var";
+.s-info-bar {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ button {
+ outline: none;
+ }
+}
+.delete,.heading{
+ text-align: center;
+ color: red;
+}
+.entry-pg {
+ width: 750px;
+}
+
+.button1::after {
+ content: none;
+}
+.button1:hover::after {
+ content: "ADD ROWS";
+}
+
+.section {
+ background-color: #dddddd;
+ height: 40px;
+}
+
+.section p {
+ //color: white;
+ padding: 10px;
+ font-size: 18px;
+}
+
+.clr-input {
+ color: #212529;
+ border: 1px solid #ced4da;
+ border-radius: 0.25rem;
+ padding: 0.75rem 0.75rem;
+ margin-top: 3px;
+ width: 100%;
+ margin-bottom: 10px;
+}
+
+.clr-file {
+ color: #212529;
+ border: 1px solid #ced4da;
+ border-radius: 0.25rem;
+ //padding: 0.6rem 0.75rem;
+ margin-top: 3px;
+ width: 100%;
+ margin-bottom: 10px;
+}
+
+.center {
+ text-align: center;
+}
+select{
+ width: 100%;
+ margin-top: 3px;
+ padding: 5px 5px;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+}
+input[type=text],[type=date],[type=number],textarea {
+ width: 100%;
+ padding: 15px 15px;
+ background-color:rgb(255, 255, 255);
+ // margin: 8px 0;
+ display: inline-block;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ box-sizing: border-box;
+}
+.error_mess {
+ color: red;
+}
diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Dlf_header/Dlf_header.component.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Dlf_header/Dlf_header.component.ts
new file mode 100644
index 0000000..eb505a5
--- /dev/null
+++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Dlf_header/Dlf_header.component.ts
@@ -0,0 +1,232 @@
+import { Component, OnInit } from '@angular/core';
+import { ToastrService } from 'ngx-toastr';
+import { AlertService } from 'src/app/services/alert.service';
+import { Dlf_headerservice } from './Dlf_header.service';
+import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms';
+import { ExtensionService } from 'src/app/services/fnd/extension.service';
+import { DashboardContentModel2 } from 'src/app/models/builder/dashboard';
+import { Dlf_headercardvariable } from './Dlf_header_cardvariable';
+import { UserInfoService } from 'src/app/services/user-info.service';
+import { ActivatedRoute, Router } from '@angular/router';
+declare var JsBarcode: any;
+@Component({
+ selector: 'app-Dlf_header',
+ templateUrl: './Dlf_header.component.html',
+ styleUrls: ['./Dlf_header.component.scss']
+})
+export class Dlf_headerComponent implements OnInit {
+ cardButton = Dlf_headercardvariable.cardButton;
+ cardmodeldata = Dlf_headercardvariable.cardmodeldata;
+ public dashboardArray: DashboardContentModel2[];
+ isCardview = Dlf_headercardvariable.cardButton;
+ cardmodal; changeView() {
+ this.isCardview = !this.isCardview;
+ }
+ beforeText(fieldtext: string): string { // Extract the text before the first '<'
+ const index = fieldtext.indexOf('<');
+ return index !== -1 ? fieldtext.substring(0, index) : fieldtext;
+ }
+ afterText(fieldtext: string): string { // Extract the text after the last '>'
+ const index = fieldtext.lastIndexOf('>');
+ return index !== -1 ? fieldtext.substring(index + 1) : '';
+ }
+ transform(fieldtext: string): string {
+ const match = fieldtext.match(/<([^>]*)>/);
+ return match ? match[1] : ''; // Extract the text between '<' and '>'
+ }
+ userrole;
+ rowSelected: any = {};
+ modaldelete = false;
+ modalEdit = false;
+ modalAdd = false;
+ public entryForm: FormGroup;
+ loading = false;
+ product;
+ modalOpenedforNewLine = false;
+ newLine: any;
+ additionalFieldsFromBackend: any[] = [];
+ formcode = 'Dlf_header_formCode'
+ tableName = 'Dlf_header'; checkFormCode; selected: any[] = []; constructor(
+ private extensionService: ExtensionService,
+ private userInfoService: UserInfoService,
+ private mainService: Dlf_headerservice,
+ private alertService: AlertService,
+ private toastr: ToastrService,
+ private _fb: FormBuilder,
+ private router: Router,
+ private route: ActivatedRoute,
+ ) { }
+ // component button
+ ngOnInit(): void {
+ if (this.cardmodeldata !== '') {
+ this.cardmodal = JSON.parse(this.cardmodeldata);
+ this.dashboardArray = this.cardmodal.dashboard.slice();
+ console.log(this.dashboardArray)
+ }
+ this.userrole = this.userInfoService.getRoles();
+ this.getData();
+ this.entryForm = this._fb.group({
+ name: [null],
+
+ description: [null],
+
+ active: [false],
+
+ type: [null],
+
+ }); // component_button200
+ // form code start
+ this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => {
+ console.log(data);
+ const jsonArray = data.map((str) => JSON.parse(str));
+ this.additionalFieldsFromBackend = jsonArray;
+ this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Dlf_header_formCode");
+ console.log(this.checkFormCode);
+ console.log(this.additionalFieldsFromBackend);
+ if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) {
+ this.additionalFieldsFromBackend.forEach(field => {
+ if (field.formCode === this.formcode) {
+ if (!this.entryForm.contains(field.extValue)) {
+ // Add the control only if it doesn't exist in the form
+ this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue));
+ }
+ }
+ });
+ }
+ });
+ console.log(this.entryForm.value);
+ // form code end
+
+ }
+
+ error;
+ getData() {
+ this.mainService.getAll().subscribe((data) => {
+ console.log(data);
+ this.product = data;
+ if (this.product.length == 0) {
+ this.error = "No Data Available"
+ }
+ }, (error) => {
+ console.log(error);
+ if (error) {
+ this.error = "Server Error";
+ }
+ });
+ }
+ onEdit(row) {
+ this.rowSelected = row;
+
+ this.modalEdit = true;
+ }
+ onDelete(row) {
+ this.rowSelected = row;
+ this.modaldelete = true;
+ }
+ delete(id) {
+ this.modaldelete = false;
+ console.log("in delete " + id);
+ this.mainService.delete(id).subscribe(
+ (data) => {
+ console.log(data);
+ this.ngOnInit();
+ if (data) { this.toastr.success('Deleted successfully'); }
+ });
+ }
+ onUpdate(id) {
+ this.modalEdit = false;
+
+ //console.log("in update");
+ console.log("id " + id);
+ console.log(this.rowSelected);
+ //console.log("out update");
+ this.mainService.update(id, this.rowSelected).subscribe(
+ (data) => {
+ console.log(data);
+ if (data || data.status >= 200 && data.status <= 299) {
+ this.toastr.success("Update Successfully");
+ }
+ setTimeout(() => {
+ this.ngOnInit();
+ }, 500);
+
+ }, (error) => {
+ console.log(error);
+ if (error.status >= 200 && error.status <= 299) {
+ // this.toastr.success("update Succesfully");
+ }
+ if (error.status >= 400 && error.status <= 499) {
+ this.toastr.error("Not Updated");
+ }
+ if (error.status >= 500 && error.status <= 599) {
+ this.toastr.error("Not Updated");
+ }
+ });
+ setTimeout(() => {
+ this.ngOnInit();
+ }, 500);
+ }
+ onCreate() {
+ this.modalAdd = false;
+
+ this.mainService.create(this.entryForm.value).subscribe(
+ (data) => {
+ console.log(data);
+ if (data || data.status >= 200 && data.status <= 299) {
+ this.toastr.success("Added Successfully");
+ }
+ setTimeout(() => {
+ this.ngOnInit();
+ }, 500);
+
+ }, (error) => {
+ console.log(error);
+ if (error.status >= 200 && error.status <= 299) {
+ // this.toastr.success("Added Succesfully");
+ }
+ if (error.status >= 400 && error.status <= 499) {
+ this.toastr.error("Not Added");
+ }
+ if (error.status >= 500 && error.status <= 599) {
+ this.toastr.error("Not Added");
+ }
+ });
+ setTimeout(() => {
+ this.ngOnInit();
+ }, 500);
+ }
+ goToAdd(row) {
+ this.modalAdd = true; this.submitted = false;
+
+ }
+ submitted = false;
+ onSubmit() {
+ console.log(this.entryForm.value);
+ this.submitted = true;
+ if (this.entryForm.invalid) {
+ return;
+ } this.onCreate();
+
+ }
+
+
+ rsModaldescription = false;
+ goToReplaceStringdescription(row) {
+ this.rowSelected = row; this.rsModaldescription = true;
+ }
+
+
+
+ // updateaction
+
+ goToDlfLine(id: any) {
+ this.router.navigate(["../Design_lbrary/" + id], { relativeTo: this.route })
+ }
+}
+
+
+
+
+
+
+
diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Dlf_header/Dlf_header.service.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Dlf_header/Dlf_header.service.ts
new file mode 100644
index 0000000..e311c37
--- /dev/null
+++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Dlf_header/Dlf_header.service.ts
@@ -0,0 +1,41 @@
+import { Injectable } from '@angular/core';
+import { Observable } from "rxjs";
+import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http";
+import { ApiRequestService } from "src/app/services/api/api-request.service";
+import { environment } from 'src/environments/environment';
+@Injectable({
+ providedIn: 'root'
+})
+export class Dlf_headerservice{
+ private baseURL = "Dlf_header/Dlf_header" ; constructor(
+ private http: HttpClient,
+ private apiRequest: ApiRequestService,
+ ) { }
+ getAll(page?: number, size?: number): Observable {
+ return this.apiRequest.get(this.baseURL);
+ }
+ getById(id: number): Observable {
+ const _http = this.baseURL + "/" + id;
+ return this.apiRequest.get(_http);
+ }
+ create(data: any): Observable {
+ return this.apiRequest.post(this.baseURL, data);
+ }
+ update(id: number, data: any): Observable {
+ const _http = this.baseURL + "/" + id;
+ return this.apiRequest.put(_http, data);
+ }
+ delete(id: number): Observable {
+ const _http = this.baseURL + "/" + id;
+ return this.apiRequest.delete(_http);
+ }
+
+
+
+
+
+
+
+
+// updateaction
+}
\ No newline at end of file
diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Dlf_header/Dlf_header_cardvariable.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Dlf_header/Dlf_header_cardvariable.ts
new file mode 100644
index 0000000..b630100
--- /dev/null
+++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/Dlf_header/Dlf_header_cardvariable.ts
@@ -0,0 +1,4 @@
+export const Dlf_headercardvariable = {
+ "cardButton": false,
+ "cardmodeldata": ``
+}
\ No newline at end of file
diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/SiteBuilderGrid/SiteTree.service.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/SiteBuilderGrid/SiteTree.service.ts
index 2488a81..39c8f21 100644
--- a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/SiteBuilderGrid/SiteTree.service.ts
+++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/SiteBuilderGrid/SiteTree.service.ts
@@ -47,6 +47,11 @@ export class SiteTreeservice {
return this.apiRequest.get(_http);
}
+ getDesignLibraryByheader(headerId: number, operationType: string, fieldtype: string): Observable {
+ const _http = "Design_lbrary/Design_lbrary/line/unique?headerId=" + headerId + "&operationType=" + operationType + "&fieldType=" + fieldtype;
+ return this.apiRequest.get(_http);
+ }
+
callLlm(data: any): Observable {
return this.http.post(`${this.nodeURL}/chatMemory`, data);
}
@@ -60,7 +65,7 @@ export class SiteTreeservice {
return this.apiRequest.get(`api/html/generate/html/id/` + id);
}
- deployProj(data: any, projId: number): Observable {
+ deployProj(projId: number, data: any): Observable {
return this.apiRequest.post(`sureops/deploy?projId=` + projId, data);
}
diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/WireframesUi/wireframe-renderer.component.html b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/WireframesUi/wireframe-renderer.component.html
index 515478c..9baf659 100644
--- a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/WireframesUi/wireframe-renderer.component.html
+++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/WireframesUi/wireframe-renderer.component.html
@@ -121,7 +121,6 @@
diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/WireframesUi/wireframe-renderer.component.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/WireframesUi/wireframe-renderer.component.ts
index 26408b3..73b8feb 100644
--- a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/WireframesUi/wireframe-renderer.component.ts
+++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/WireframesUi/wireframe-renderer.component.ts
@@ -385,10 +385,13 @@ HTML Only. No CSS.
return resolve(this.promptHashCache[hash]);
}
- // const enhanced = await this.callLlm(enhancedPrompt);
- // this.promptHashCache[hash] = enhanced;
+ const enhanced = await this.callLlm(enhancedPrompt);
- resolve(baseJsonString);
+ console.log('enhanced prmpt ',enhanced);
+ this.promptHashCache[hash] = enhanced;
+
+ // resolve(baseJsonString);
+ resolve(this.promptHashCache[hash]);
} catch (err) {
console.error('❌ JSON parse error:', err);
resolve('{}');
@@ -562,7 +565,7 @@ HTML Only. No CSS.
pageHtmlMap[pageName] = html;
}
- this.siteTreeService.deployProj(pageHtmlMap, projId).subscribe(
+ this.siteTreeService.deployProj(projId,pageHtmlMap).subscribe(
(data) => {
console.log(data);
if (data || data.status >= 200 && data.status <= 299) {
diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/tree-visualizer.component.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/tree-visualizer.component.ts
index 001ad71..3230659 100644
--- a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/tree-visualizer.component.ts
+++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/tree-visualizer.component.ts
@@ -91,6 +91,35 @@ export class TreeVisualizerComponent {
"Feature Section": "Choose a template to replace with uploaded data"
}
}`;
+
+
+ suffix1: string = `
+ 🔁 You are a JSON structure generator for website page hierarchies.
+ You will return only a JSON object in a strictly hierarchical tree structure. Do not include any explanation, text, or markdown formatting like \`\`\`json — just return pure JSON only.
+ Each page should be a key. For subpages like "Login", "Projects", or "New Project", nest them under a "Children" key of their parent page.
+ Each page must include specific sections as keys (like "Navbar", "Header Section", "Feature Section" etc.) with either an empty object {} or a short description as the value.
+ Do not return any explanation, text, or markdown formatting — only return the raw JSON object exactly in this format.
+
+ ❌ Do not include:
+ - Any explanation before or after the JSON
+ - Any markdown formatting like \`\`\` or json
+ - Any text like "Here is..." or "Please note..."
+
+ ✅ Output must look like this:
+
+ {
+ "Home": {
+ "Navbar": {},
+ "Header Section": "Intro...",
+ "Children": {
+ "Login": {
+ "Navbar": {},
+ "Header Section": "Login form...",
+ "Footer": {}
+ }
+ }
+ }
+ }`;
treeData: any = null;
rawInputText: string = `make a website , where we can login , sign up.
inside that there is a menu of icard where we can add a icard detail iacardname, description
@@ -194,102 +223,73 @@ after click this icard inside we upload excel of student data, icard template, a
generateJson() {
console.log('genearte json start ')
- const suffix1 = `
- 🔁 You are a JSON structure generator for website page hierarchies.
- You will return only a JSON object in a strictly hierarchical tree structure. Do not include any explanation, text, or markdown formatting like \`\`\`json — just return pure JSON only.
- Each page should be a key. For subpages like "Login", "Projects", or "New Project", nest them under a "Children" key of their parent page.
- Each page must include specific sections as keys (like "Navbar", "Header Section", "Feature Section" etc.) with either an empty object {} or a short description as the value.
- Do not return any explanation, text, or markdown formatting — only return the raw JSON object exactly in this format.
-
- ❌ Do not include:
- - Any explanation before or after the JSON
- - Any markdown formatting like \`\`\` or json
- - Any text like "Here is..." or "Please note..."
-
- ✅ Output must look like this:
-
- {
- "Home": {
- "Navbar": {},
- "Header Section": "Intro...",
- "Children": {
- "Login": {
- "Navbar": {},
- "Header Section": "Login form...",
- "Footer": {}
- }
- }
- }
- }`;
-
-
const suffix = ` You are a JSON structure generator for website page hierarchies.
-You are a JSON structure generator for website UI and sitemap hierarchy.
+ You are a JSON structure generator for website UI and sitemap hierarchy.
-Generate a strictly hierarchical JSON tree that represents the entire page flow of a website. The root of the tree must always be the "Home" page. All other pages (like Login, Sign Up, Projects, Dashboard, etc.) must be nested as subpages using a "Children" key under their logical parent based on the described user flow — not all pages should be flat or at root level.
+ Generate a strictly hierarchical JSON tree that represents the entire page flow of a website. The root of the tree must always be the "Home" page. All other pages (like Login, Sign Up, Projects, Dashboard, etc.) must be nested as subpages using a "Children" key under their logical parent based on the described user flow — not all pages should be flat or at root level.
-Each page must include meaningful UI sections as keys — like "Navbar", "Header Section", "Feature Section", "Form Section", "Footer", etc.
-Each section must include a short and clear description of its purpose or content — to assist in frontend UI development.
+ Each page must include meaningful UI sections as keys — like "Navbar", "Header Section", "Feature Section", "Form Section", "Footer", etc.
+ Each section must include a short and clear description of its purpose or content — to assist in frontend UI development.
-Analyze the flow implied in the prompt:
-- Pages that are accessed after some action (e.g., "after login", "inside a project", "upon click") must be nested as children.
-- Reuse common sections like "Navbar" or "Footer" wherever needed.
-- Pages like “Privacy Policy” or “Terms and Conditions” can remain at root or in Footer reference if needed.
+ Analyze the flow implied in the prompt:
+ - Pages that are accessed after some action (e.g., "after login", "inside a project", "upon click") must be nested as children.
+ - Reuse common sections like "Navbar" or "Footer" wherever needed.
+ - Pages like “Privacy Policy” or “Terms and Conditions” can remain at root or in Footer reference if needed.
-✅ The following standard pages must always be included with detailed section-level breakdown:
+ ✅ The following standard pages must always be included with detailed section-level breakdown:
-- **Home**: General overview of the website, with call-to-action, features, testimonials, and a footer.
-- **About**: Brief company history, mission/vision, and team member highlights.
-- **Services**: List of services offered, with description, icons, or pricing cards.
-- **Contact**: Contact form (name, email, message), business info, phone, map.
-- **FAQ**: Accordion or expandable list of common questions and answers.
-- **Blog**: List of articles or posts, with title, thumbnail, and excerpt.
-- **Login**: Form section with input fields for email/username and password, login button, forgot password link.
-- **Sign Up**: Form section with full name, email, password, confirm password, sign-up button.
-- **Privacy Policy**: Legal text describing how user data is handled.
-- **Terms and Conditions**: Legal text outlining site usage policies.
+ - **Home**: General overview of the website, with call-to-action, features, testimonials, and a footer.
+ - **About**: Brief company history, mission/vision, and team member highlights.
+ - **Services**: List of services offered, with description, icons, or pricing cards.
+ - **Contact**: Contact form (name, email, message), business info, phone, map.
+ - **FAQ**: Accordion or expandable list of common questions and answers.
+ - **Blog**: List of articles or posts, with title, thumbnail, and excerpt.
+ - **Login**: Form section with input fields for email/username and password, login button, forgot password link.
+ - **Sign Up**: Form section with full name, email, password, confirm password, sign-up button.
+ - **Privacy Policy**: Legal text describing how user data is handled.
+ - **Terms and Conditions**: Legal text outlining site usage policies.
-❌ Do not include:
-- Any explanation before or after the JSON
-- Any markdown formatting like \`\`\` or json
-- Any natural language response
-- Return only pure JSON — no explanation, no headings, no markdown formatting.
-
+ ❌ Do not include:
+ - Any explanation before or after the JSON
+ - Any markdown formatting like \`\`\` or json
+ - Any natural language response
+ - Return only pure JSON — no explanation, no headings, no markdown formatting.
+
-✅ Output JSON example structure should look like this:
+ ✅ Output JSON example structure should look like this:
-{
- "Home": {
- "Navbar": "Top navigation with logo, links to all main pages, and call-to-action button",
- "Header Section": "Headline with subheading and call-to-action button",
- "Feature Section": "Three features highlighted with icons and descriptions",
- "Testimonial Section": "Customer reviews in carousel layout",
- "Footer": "Footer with navigation links, social icons, and legal page links",
- "Children": {
- "About": {
- "Header Section": "Intro about company mission and values",
- "Team Section": "Photos and bios of core team members"
- },
- "Services": {
- "Header Section": "List of core services offered",
- "Pricing Section": "Cards with service pricing and features"
- },
- "Contact": {
- "Header Section": "Contact form with name, email, and message fields",
- "Map Section": "Google Maps iframe showing location"
- },
- ...
+ {
+ "Home": {
+ "Navbar": "Top navigation with logo, links to all main pages, and call-to-action button",
+ "Header Section": "Headline with subheading and call-to-action button",
+ "Feature Section": "Three features highlighted with icons and descriptions",
+ "Testimonial Section": "Customer reviews in carousel layout",
+ "Footer": "Footer with navigation links, social icons, and legal page links",
+ "Children": {
+ "About": {
+ "Header Section": "Intro about company mission and values",
+ "Team Section": "Photos and bios of core team members"
+ },
+ "Services": {
+ "Header Section": "List of core services offered",
+ "Pricing Section": "Cards with service pricing and features"
+ },
+ "Contact": {
+ "Header Section": "Contact form with name, email, and message fields",
+ "Map Section": "Google Maps iframe showing location"
+ },
+ ...
+ }
+ },
+ "Privacy Policy": {
+ "Content Section": "Full legal description of data usage and user rights"
+ },
+ "Terms and Conditions": {
+ "Content Section": "Rules and legal terms for using the site or service"
}
- },
- "Privacy Policy": {
- "Content Section": "Full legal description of data usage and user rights"
- },
- "Terms and Conditions": {
- "Content Section": "Rules and legal terms for using the site or service"
- }
-}`;
+ }`;
const payload = {
@@ -302,29 +302,117 @@ Analyze the flow implied in the prompt:
this.siteTreeService.callLlm(payload).subscribe({
next: (res) => {
- console.log('response ', res)
+ console.log('llm response ', res)
if (res && res.responseContent) {
- this.inputJson = res.responseContent;
- console.log('input json ', this.inputJson)
-
-
+ // this.inputJson = res.responseContent;
+ // console.log('input json ', this.inputJson)
// 🔁 Now call update API
- const updatePayload = {
- prompt: this.rawInputText + ' ',
- model: this.inputJson // model format expected by backend
- };
+ // const updatePayload = {
+ // prompt: this.rawInputText + ' ',
+ // model: this.inputJson // model format expected by backend
+ // console.log('payload : ', updatePayload);
- console.log('payload : ', updatePayload);
- this.siteTreeService.update(this.id, updatePayload).subscribe({
- next: (resp) => {
- console.log('✅ JSON updated on server:', resp);
- },
- error: (err) => {
- console.error('❌ Failed to update JSON on server:', err);
- alert('Update to server failed');
- }
- });
+
+ try {
+ let parsedJson = JSON.parse(res.responseContent); // Parse LLM JSON
+ const topLevelPages = Object.keys(parsedJson);
+ let pendingCalls = topLevelPages.length;
+
+ topLevelPages.forEach(pageName => {
+ this.siteTreeService.getDesignLibraryByheader(2, 'template 1', pageName).subscribe({
+ next: (designResponse) => {
+ if (designResponse && Object.keys(designResponse).length > 0) {
+ console.log(`✅ Replacing "${pageName}" with design library JSON that is : `, designResponse.htmljson);
+
+
+ // try {
+ // // Parse the stringified JSON if necessary
+ // let raw = designResponse.htmljson;
+
+ // // If it's a string, parse it
+ // const parsed = typeof raw === 'string' ? JSON.parse(`{${raw}}`) : raw;
+
+ // // Automatically extract the first key’s value (usually same as pageName)
+ // const firstKey = Object.keys(parsed)[0];
+ // const extractedValue = parsed[firstKey];
+
+ // console.log(`✅ Extracted value for "${pageName}":`, extractedValue);
+
+ // // Replace just the content, not the outer key
+ // parsedJson[pageName] = extractedValue;
+
+ // console.log(`✅ after Replaced "${pageName}" jso is : `, parsedJson);
+
+ // } catch (parseErr) {
+ // console.warn(`⚠️ Could not parse design library JSON for "${pageName}". Keeping original.`);
+ // }
+
+
+ try {
+ let raw = designResponse.htmljson;
+
+ // Parse the raw string into object if necessary
+ const parsed = typeof raw === 'string' ? JSON.parse(`{${raw}}`) : raw;
+
+ // Extract the first key’s value (actual page content)
+ const firstKey = Object.keys(parsed)[0];
+ const extractedValue = parsed[firstKey];
+
+ // Get existing Children (if any) before replacing
+ const existingPageData = parsedJson[pageName] || {};
+ const preservedChildren = existingPageData['Children'];
+
+ // Merge: use extractedValue + put Children back
+ parsedJson[pageName] = {
+ ...extractedValue,
+ ...(preservedChildren ? { Children: preservedChildren } : {})
+ };
+
+ console.log(`✅ Merged design + preserved Children for "${pageName}"`, parsedJson[pageName]);
+
+ } catch (parseErr) {
+ console.warn(`⚠️ Could not parse design library JSON for "${pageName}". Keeping original.`, parseErr);
+ }
+
+ } else {
+ console.log(`ℹ️ No design library found for "${pageName}", keeping original`);
+ }
+ checkAndUpload();
+ },
+ error: (err) => {
+ console.error(`❌ Error fetching design library for "${pageName}":`, err);
+ checkAndUpload(); // Still proceed
+ }
+ });
+ });
+
+ const checkAndUpload = () => {
+ pendingCalls--;
+ if (pendingCalls === 0) {
+ this.inputJson = JSON.stringify(parsedJson);
+ const updatePayload = {
+ prompt: this.rawInputText + ' ',
+ model: this.inputJson
+ };
+
+ console.log('✅ Final merged JSON ready:', updatePayload);
+
+ this.siteTreeService.update(this.id, updatePayload).subscribe({
+ next: (resp) => {
+ console.log('✅ JSON updated on server:', resp);
+ },
+ error: (err) => {
+ console.error('❌ Failed to update JSON on server:', err);
+ alert('Update to server failed');
+ }
+ });
+ }
+ };
+ } catch (err) {
+ console.error('❌ Failed to parse LLM JSON:', err);
+ alert('Invalid JSON received from LLM');
+ }
}
},
error: (err) => {
@@ -334,7 +422,6 @@ Analyze the flow implied in the prompt:
});
}
-
fetchTreeById(id: number) {
this.siteTreeService.getById(id).subscribe({
next: (res) => {
diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts
index c77eb70..3f536b4 100644
--- a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts
+++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts
@@ -99,6 +99,7 @@ import { TreeVisualizerComponent } from './fnd/SiteTreeBuilder/tree-visualizer.c
import { SiteTreeComponent } from './fnd/SiteTreeBuilder/SiteBuilderGrid/SiteTree.component';
import { EditstepperComponent } from './BuilderComponents/vpspack/Visa_application/VisaOrderWorkflow/editstepper.component';
import { Design_lbraryComponent } from './fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.component';
+import { Dlf_headerComponent } from './fnd/SiteTreeBuilder/Dlf_header/Dlf_header.component';
@@ -270,8 +271,11 @@ const routes: Routes = [
// buildercomponents
+ { path: 'Dlf_header', component: Dlf_headerComponent },
+
+ // { path: 'Design_lbrary', component: Design_lbraryComponent },
+ { path: 'Design_lbrary/:id', component: Design_lbraryComponent },
- {path:'Design_lbrary',component:Design_lbraryComponent},
{ path: 'sitetree', component: SiteTreeComponent, },
diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts
index b4e682d..ad9ebac 100644
--- a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts
+++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts
@@ -126,6 +126,7 @@ import { SiteTreeComponent } from './fnd/SiteTreeBuilder/SiteBuilderGrid/SiteTre
import { TreeNodeComponent } from './fnd/SiteTreeBuilder/TreeNode/tree-node.component';
import { EditstepperComponent } from './BuilderComponents/vpspack/Visa_application/VisaOrderWorkflow/editstepper.component';
import { Design_lbraryComponent } from './fnd/SiteTreeBuilder/Design_lbrary/Design_lbrary.component';
+import { Dlf_headerComponent } from './fnd/SiteTreeBuilder/Dlf_header/Dlf_header.component';
@NgModule({
@@ -146,7 +147,7 @@ import { Design_lbraryComponent } from './fnd/SiteTreeBuilder/Design_lbrary/Desi
// buildercomponents
-
+ Dlf_headerComponent,
Design_lbraryComponent,
SiteTreeComponent,
EditstepperComponent,