diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/login/login-routing.module.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/login/login-routing.module.ts index d0e2a2f..9f0e2e8 100644 --- a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/login/login-routing.module.ts +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/login/login-routing.module.ts @@ -8,16 +8,20 @@ import { Forgotresetpassword1Component } from './forgotresetpassword1/forgotrese import { LoginPageComponent } from './login-page/login-page.component'; import { EmailverificationComponent } from './emailverification/emailverification.component'; import { AboutWorkComponent } from './about-work/about-work.component'; +import { Visa_applicationComponent } from '../main/BuilderComponents/vpspack/Visa_application/Visa_application.component'; +import { EditstepperTfComponent } from '../main/fnd/Visa_application/VisaOrderWorkflow/editstepperTf.component'; const routes: Routes = [ { path: 'login', component: LoginPageComponent }, - {path: 'forgotpass', component:ForgotpasswordComponent}, - {path:'forgotresetpassword/:id', component:ForgotresetpasswordComponent}, - {path:'adduser/:id', component:Forgotresetpassword1Component}, - {path:'addguest/:id', component:AddguestComponent}, - + { path: 'forgotpass', component: ForgotpasswordComponent }, + { path: 'forgotresetpassword/:id', component: ForgotresetpasswordComponent }, + { path: 'adduser/:id', component: Forgotresetpassword1Component }, + { path: 'addguest/:id', component: AddguestComponent }, + { path: 'visaOrder', component: EditstepperTfComponent }, + + { path: 'email-verification', component: EmailverificationComponent }, - {path: 'about-work', component:AboutWorkComponent}, + { path: 'about-work', component: AboutWorkComponent }, ]; @NgModule({ diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/TreeNode/tree-node.component.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/TreeNode/tree-node.component.ts index 70105bd..985aa2c 100644 --- a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/TreeNode/tree-node.component.ts +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/TreeNode/tree-node.component.ts @@ -130,6 +130,11 @@ export class TreeNodeComponent implements OnInit, OnDestroy, AfterViewInit { type: 'Footer', description: 'Bottom site footer', content: 'Contact information, links, and copyright details.' + }, + { + type: 'visa application section', + description: 'Visa Application', + content: 'Visa Order.' } ]; diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/WireframesUi/common-css.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/WireframesUi/common-css.ts index 08d4ba6..29741a9 100644 --- a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/WireframesUi/common-css.ts +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/WireframesUi/common-css.ts @@ -1746,6 +1746,28 @@ body { background-color: #111; color: #fff; } +.visa-order-btn-section { + padding: 60px 20px; + text-align: center; + background-color: #f9f9f9; +} + +.visa-order-btn { + padding: 12px 28px; + font-size: 15px; + font-weight: 600; + color: #fff; + background-color: #0072f5; + border: none; + border-radius: 6px; + cursor: pointer; + transition: background-color 0.3s ease; + box-shadow: 0 4px 8px rgba(0, 114, 245, 0.2); +} + +.visa-order-btn:hover { + background-color: #005fcc; +} `; diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/WireframesUi/download-css.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/WireframesUi/download-css.ts index d38b0a5..d2c4706 100644 --- a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/WireframesUi/download-css.ts +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/SiteTreeBuilder/WireframesUi/download-css.ts @@ -1745,6 +1745,28 @@ body { background-color: #111; color: #fff; } +.visa-order-btn-section { + padding: 60px 20px; + text-align: center; + background-color: #f9f9f9; +} + +.visa-order-btn { + padding: 12px 28px; + font-size: 15px; + font-weight: 600; + color: #fff; + background-color: #0072f5; + border: none; + border-radius: 6px; + cursor: pointer; + transition: background-color 0.3s ease; + box-shadow: 0 4px 8px rgba(0, 114, 245, 0.2); +} + +.visa-order-btn:hover { + background-color: #005fcc; +} `; 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 73b8feb..6b79aa3 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,13 +385,13 @@ HTML Only. No CSS. return resolve(this.promptHashCache[hash]); } - const enhanced = await this.callLlm(enhancedPrompt); + // const enhanced = await this.callLlm(enhancedPrompt); - console.log('enhanced prmpt ',enhanced); - this.promptHashCache[hash] = enhanced; + // console.log('enhanced prmpt ',enhanced); + // this.promptHashCache[hash] = enhanced; - // resolve(baseJsonString); - resolve(this.promptHashCache[hash]); + resolve(baseJsonString); + // resolve(this.promptHashCache[hash]); } catch (err) { console.error('❌ JSON parse error:', err); resolve('{}'); @@ -594,11 +594,13 @@ HTML Only. No CSS. const html = section.FullPage?.toString() || ''; pageHtmlMap[pageName] = html; } + + console.log('name nad pages ', this.sitename ,' and ',pageHtmlMap ) this.siteTreeService.createHtmlfile(this.sitename, pageHtmlMap).subscribe( (data) => { - console.log(data); + console.log('after create file ', data); if (data || data.status >= 200 && data.status <= 299) { - this.toastr.success("file Created"); + this.toastr.success("File Created"); } // setTimeout(() => { // this.ngOnInit(); diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/Visa_application/VisaOrderWorkflow/Visa_applicationTf.service.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/Visa_application/VisaOrderWorkflow/Visa_applicationTf.service.ts new file mode 100644 index 0000000..e283c82 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/Visa_application/VisaOrderWorkflow/Visa_applicationTf.service.ts @@ -0,0 +1,90 @@ +import { Injectable } from '@angular/core'; +import { delay, Observable, of } 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 Visa_applicationTfservice { + private baseURL = "token/Visa_application/Visa_application"; 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); + } + + + getAllvisa_entry_type(): Observable { + return this.apiRequest.get("token/Visa_entry_ListFilter1/Visa_entry_ListFilter1"); + } + + getAllvisa_duration(): Observable { + return this.apiRequest.get("token/Visa_duration_ListFilter1/Visa_duration_ListFilter1"); + } + + getAllvisa_processing(): Observable { + return this.apiRequest.get("token/Visa_processing_ListFilter1/Visa_processing_ListFilter1"); + } + + + + + getAllgender(): Observable { + return this.apiRequest.get("token/Gender_ListFilter1/Gender_ListFilter1"); + } + + getAllreferrer(): Observable { + return this.apiRequest.get("token/Referrer_ListFilter1/Referrer_ListFilter1"); + } + + getAllnationality(): Observable { + return this.apiRequest.get("token/Nationality_ListFilter1/Nationality_ListFilter1"); + } + + getAllsupplier(): Observable { + return this.apiRequest.get("token/Supplier_ListFilter1/Supplier_ListFilter1"); + } + + getAllagent(): Observable { + return this.apiRequest.get("token/Agent_ListFilter1/Agent_ListFilter1"); + } + + + uploadDocument(ref: any, Forma: any, file: any): Observable { + const formData = new FormData(); + formData.append('file', file); + return this.apiRequest.postFormData(`FileUpload/Uploadeddocs/${ref}/${Forma}`, formData); + } + + uploadfilegetByIdfileupload_field(ref: any, Forma: any,): Observable { + return this.apiRequest.get(`FileUpload/Uploadeddocs/${ref}/${Forma}`); + } + + + uploadfiledeletefileupload_field(id: number): Observable { + return this.apiRequest.delete(`FileUpload/Uploadeddocs/${id}`); + } + finalizeOrder(id: string) { + // return this.http.post(`/api/customer/${id}/finalize`, {}); + return of({ success: true }).pipe(delay(1000)); + + } + // updateaction +} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/Visa_application/VisaOrderWorkflow/editstepperTf.component.css b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/Visa_application/VisaOrderWorkflow/editstepperTf.component.css new file mode 100644 index 0000000..3f95205 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/Visa_application/VisaOrderWorkflow/editstepperTf.component.css @@ -0,0 +1,52 @@ +.horizontal { + width: 25%; + padding: 5px; +} + +.horizontal1 { + width: 50%; + padding: 10px; +} + +.middle { + width: 33%; + padding: 10px; +} + +.middle1 { + width: 75%; + padding: 10px; +} + +.full { + width: 100%; + padding: 10px; +} + +input[type=text], [type=date], select { + width: 100%; + padding: 12px 20px; + margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} + +.required-field { + color: red; +} + +.center { + text-align: center; +} + +.center { + color: blue; +} + +@media (max-width: 600px) { + .horizontal, .middle, .horizontal1, .middle1 { + width: 100%; + } +}/*# sourceMappingURL=editstepper.component.css.map */ \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/Visa_application/VisaOrderWorkflow/editstepperTf.component.css.map b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/Visa_application/VisaOrderWorkflow/editstepperTf.component.css.map new file mode 100644 index 0000000..c9f68f7 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/Visa_application/VisaOrderWorkflow/editstepperTf.component.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["editstepper.component.scss","editstepper.component.css"],"names":[],"mappings":"AAAA;EACE,UAAA;EACA,YAAA;ACCF;;ADCA;EACE,UAAA;EACA,aAAA;ACEF;;ADAA;EACE,UAAA;EACA,aAAA;ACGF;;ADDA;EACE,UAAA;EACA,aAAA;ACIF;;ADDA;EACE,WAAA;EACA,aAAA;ACIF;;ADDA;EACE,WAAA;EACA,kBAAA;EACA,aAAA;EACA,qBAAA;EACA,sBAAA;EACA,kBAAA;EACA,sBAAA;ACIF;;ADFA;EACE,UAAA;ACKF;;ADHA;EACE,kBAAA;ACMF;;ADHA;EACE,WAAA;ACMF;;ADJA;EACA;IACA,WAAA;ECOE;AACF","file":"editstepper.component.css"} \ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/Visa_application/VisaOrderWorkflow/editstepperTf.component.html b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/Visa_application/VisaOrderWorkflow/editstepperTf.component.html new file mode 100644 index 0000000..ac8395b --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/Visa_application/VisaOrderWorkflow/editstepperTf.component.html @@ -0,0 +1,418 @@ + + +
+ + + + + + + +
+ +
+
+
+
+

Customer Information

+
+ +
+ + + + Step 0 + Application Update + Datagrid + Create/Add Customer Information
Information Of + Customer
+
+ + + Step 1 + Document Upload + Upload Your
+ Document.
+ +
+ + + + Step 2 + Review And
Confirmation
+ + Finish . + +
+
+
+
+
+
+ + +
+
+

Customer Information Form

+

Update {{entryForm.name}}

+
+ +
+ + + +
+ +
+ +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ + + +
+ + +
+ + + + + +
+ + +
+ + + + + +
+ + +
+ + + +
+ + +
+ +
+ + +
+ +
+ + +
+
+ *This field + is Required
+
+
+ +
+ + +
+ +
+ + +
+ +
+ + +
+
* Email must be a + valid + email address +
+
+
+ +
+ + +
+
+ * Please + Follow your pattern,+91 Enter 10 digit Mobile Number. +
+
+
+ +
+ + +
+ +
+ + +
+ + + +
+ + +
+ + + +
+ + +
+ + +
+ + +
+ + + + +
+ + +
+ + + + + +
+ + +
+ + + + + +
+ + +
+ +
+ + +
+ + +
+ +
+ +
+ +
+
+ + + + + +
+
+
+ +
+ +
+
+ + +
+
+

File Upload

+
+ + +
+ + + +
List of Uploaded file
+ +
+ + + + + + + + + + + + + + + + + + + + + + + +
No FileFile NamePreviewCancel
+ {{attach.uploadedfile_name}} File Preview + + + +
+
+ +
+
+ + + + + +
+
+ +
+
+
+ + + +
+
+

Customer Information Review And Confirmation

+
+ + +
+
+
Customer Details:
+

Name: {{ rowSelected.name }}

+

Active: {{ rowSelected.active }}

+

Visa Entry Type: {{ rowSelected.visa_entry_typename }}

+

Visa Duration: {{ rowSelected.visa_durationname }}

+

Visa Processing: {{ rowSelected.visa_processingname }}

+

Travel Start Date: {{ rowSelected.travel_start_date }}

+

Travel End Date: {{ rowSelected.travel_end_date }}

+

Passport Number: {{ rowSelected.passport_number }}

+

Passport Issue Date: {{ rowSelected.passport_issue_date }}

+

Passport Expiry Date: {{ rowSelected.passport_expiry_date }}

+

Email: {{ rowSelected.email }}

+

Phone Number: {{ rowSelected.phone_number }}

+

Birth Place: {{ rowSelected.birth_place }}

+

Date of Birth: {{ rowSelected.date_of_birth }}

+

Gender: {{ rowSelected.gendername }}

+

Profession: {{ rowSelected.profession }}

+

Visa Cost: {{ rowSelected.visa_cost }}

+

Referrer: {{ rowSelected.referrername }}

+

Nationality: {{ rowSelected.nationalityname }}

+

Supplier: {{ rowSelected.suppliername }}

+

Agent: {{ rowSelected.agentname }}

+ +
+
+ + +
+
+
Uploaded Document:
+

{{ uploadedFileName }}

+
+
+ +
+ + + +
+ +
+
+
+ + + +
+
\ No newline at end of file diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/Visa_application/VisaOrderWorkflow/editstepperTf.component.scss b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/Visa_application/VisaOrderWorkflow/editstepperTf.component.scss new file mode 100644 index 0000000..35a9e5a --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/Visa_application/VisaOrderWorkflow/editstepperTf.component.scss @@ -0,0 +1,46 @@ +.horizontal{ + width: 25%; + padding: 5px; +} +.horizontal1{ + width: 50%; + padding: 10px; +} +.middle{ + width: 33%; + padding: 10px; +} +.middle1{ + width: 75%; + padding: 10px; +} + +.full{ + width: 100%; + padding: 10px; +} + +input[type=text],[type=date], select { + width: 100%; + padding: 12px 20px; + margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} +.required-field{ + color: red; +} +.center { + text-align: center; + +} +.center{ + color: blue; +} +@media (max-width: 600px){ +.horizontal,.middle,.horizontal1,.middle1 { +width: 100%; +}} + diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/Visa_application/VisaOrderWorkflow/editstepperTf.component.spec.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/Visa_application/VisaOrderWorkflow/editstepperTf.component.spec.ts new file mode 100644 index 0000000..bc0e5b6 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/Visa_application/VisaOrderWorkflow/editstepperTf.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { EditstepperTfComponent } from './editstepperTf.component'; + +describe('EditstepperComponent', () => { + let component: EditstepperTfComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ EditstepperTfComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(EditstepperTfComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/Visa_application/VisaOrderWorkflow/editstepperTf.component.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/Visa_application/VisaOrderWorkflow/editstepperTf.component.ts new file mode 100644 index 0000000..6798a6f --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/Visa_application/VisaOrderWorkflow/editstepperTf.component.ts @@ -0,0 +1,463 @@ +import { Component, OnInit } from '@angular/core'; + + +import { ToastrService } from 'ngx-toastr'; +import { ActivatedRoute, Router } from '@angular/router'; +import { College } from 'src/app/models/fnd/play'; +import { student } from 'src/app/models/fnd/Studentadd'; +import { FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { ValidationError } from 'src/app/models/fnd/ValidationError'; +import { Visa_applicationTfservice } from './Visa_applicationTf.service'; +@Component({ + selector: 'app-editstepper', + templateUrl: './editstepperTf.component.html', + styleUrls: ['./editstepperTf.component.scss'] +}) +export class EditstepperTfComponent implements OnInit { + updated = false; + // college: College; + stringJson: any; + customerId: string = ''; + selectedFile!: File; + fileName = ''; + + id: number; + errorFields: ValidationError[] = []; + appToUpdate: College = null; + trained = false; + + json: string = ""; + luisApp = + { + name: '', + created: 1, + trained: 1, + tested: 1, + updated: 1, + published: 1, + + }; + // Layout direction changing + layout = { + direction: "vertical", + block1: "clr-col-lg-3 clr-col-12 ", + block2: "clr-col-lg-9 clr-col-12 ", + }; + + timelineStyle = { + step0: { state: "current", open: true, failed: false }, + step1: { state: "not-started", open: false, failed: false }, + step2: { state: "not-started", open: false, failed: false }, + }; + + + public entryForm: FormGroup; + submitted = false; + rowSelected: any = {}; + modalcomplete = false; + + constructor(private mainService: Visa_applicationTfservice, + + private _fb: FormBuilder, + private router: Router, + private route: ActivatedRoute, + private toastr: ToastrService,) { } + + ngOnInit(): void { + // this.college = new College(); + this.id = this.route.snapshot.params["id"]; + console.log("update with id = ", this.id); + + this.entryForm = this._fb.group({ + name: [null], + + description: [null], + + active: [false], + + visa_entry_type: [null], + + visa_duration: [null], + + visa_processing: [null], + + travel_start_date: [null], + + travel_end_date: [null], + + passport_number: [null, [Validators.required]], + + passport_issue_date: [null], + + passport_expiry_date: [null], + + email: [null], + + phone_number: ['+91'], + + birth_place: [null], + + date_of_birth: [null], + + gender: [null], + + profession: [null], + + visa_cost: [null, { updateOn: 'blur' }], + + referrer: [null], + + nationality: [null], + + supplier: [null], + + agent: [null], + + }); + + + this.getallvisa_entry_type(); + + this.getallvisa_duration(); + + this.getallvisa_processing(); + + this.getallgender(); + + this.getallreferrer(); + + this.getallnationality(); + + this.getallsupplier(); + + this.getallagent(); + + } + + // Change to Horizontal Layout + changeToHorizonTal() { + this.layout = { + direction: "horizontal", + block1: "clr-col-lg-12 clr-col-12 height container", + block2: "clr-col-lg-12 clr-col-12 container", + } + } + // Change to Vertical Layout + changeToVertical() { + this.layout = { + direction: "vertical", + block1: "clr-col-lg-3 clr-col-12 ", + block2: "clr-col-lg-9 clr-col-12 ", + } + } + getById(id: number) { + // this.mainService.getBywfId(id).subscribe( + // (data) => { + // this.college = data; + // }, + // (err) => { + // console.log(err); + // } + // ); + // this.currentservice.getById(id).subscribe( + // (data) => { + // this.student = data; + + // var current = JSON.parse(data.current_json); + // this.timelineStyle = current; + // console.log("data", data); + // }, + // (err) => { + // console.log(err); + // } + // ); + + + } + + + onSave() { + console.log('Form Submitted:', this.entryForm.value); + this.submitted = true; + if (this.entryForm.invalid) { + + console.log('invalid form ..'); + // Log all form errors + Object.keys(this.entryForm.controls).forEach(field => { + const control = this.entryForm.get(field); + if (control && control.invalid) { + console.log(`Error in field: ${field}`, control.errors); + } + } + ); + + + return; + } + this.onCreate(); + } + + onCreate() { + this.mainService.create(this.entryForm.value).subscribe( + (data) => { + console.log('adding data ', data); + this.customerId = data.id; + + console.log('id is ', this.customerId); + + + 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"); + } + }); + this.rowSelected = this.entryForm.value; + + setTimeout(() => { + this.ngOnInit(); + }, 500); + } + + + onnext() { + this.router.navigate(["../../main/workflow"], { relativeTo: this.route }); + } + reset() { + this.json = ""; + this.luisApp = + { + name: '', + trained: 1, + tested: 1, + updated: 1, + published: 1, + + + created: 1, + + }; + + this.timelineStyle = { + step0: { state: "current", open: true, failed: false }, + step1: { state: "not-started", open: false, failed: false }, + step2: { state: "not-started", open: false, failed: false }, + + }; + } + current() { + console.log(this.timelineStyle) + this.stringJson = JSON.stringify(this.timelineStyle); + console.log("String json object :", this.stringJson); + + // this.mainService.update(this.id, this.college, this.stringJson).subscribe( + // (data) => { + // console.log(data); + // }, + + // ); + } + + onFileUpload(): void { + + for (let i = 0; i < this.selectedfileupload_field.length; i++) { + + this.mainService.uploadDocument(this.customerId, 'visa order', this.selectedfileupload_field[i]).subscribe(uploaddata => { + console.log(uploaddata); + + console.log('id is ', this.customerId); + + + if (uploaddata || uploaddata.status >= 200 && uploaddata.status <= 299) { + // alert('File uploaded successfully!'); + this.toastr.success("File uploaded 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"); + } + } + + ) + } + + this.selectedFile = null; + } + + + filePreviewfileupload_field: string | ArrayBuffer | null = null; + FileDatafileupload_field: { uploadedfile_name?: any, filePreview: string | ArrayBuffer | null }[] = []; // Initialize the array + selectedfileupload_field: File[] = []; + public onFileChangedfileupload_field(event, index) { + const files = event.target.files; + for (let i = 0; i < files.length; i++) { + const file = files[i]; + this.FileDatafileupload_field[index].uploadedfile_name = files[i].name; + this.selectedfileupload_field.push(files[i]); + if (file.type.startsWith('file/')) { + const reader = new FileReader(); + reader.onload = (e) => { + // Set the file preview source + const filePreview = e.target?.result as string; + this.FileDatafileupload_field[index] = { + ...this.FileDatafileupload_field[index], // Preserve existing properties + filePreview: filePreview // Update only the filePreview property + }; + }; + reader.readAsDataURL(file); + } + } + } + onAddLinesfileupload_field() { + this.FileDatafileupload_field.push({ + uploadedfile_name: "", + filePreview: "", + // f3: "", + }); + } + deleteRowfileupload_field(index, id) { + this.FileDatafileupload_field.splice(index, 1); + + if (id) { + this.mainService.uploadfiledeletefileupload_field(id).subscribe(data => { + console.log(data); + }) + } + } + + updategender(gender: string): void { + this.entryForm.get('gender').setValue(gender); + } + + updategenderEdit(gender: string): void { this.rowSelected.gender = gender } + + + + + + + + + + rsModaldescription = false; + goToReplaceStringdescription(row) { + this.rowSelected = row; this.rsModaldescription = true; + } + + + + selectvisa_entry_type; + getallvisa_entry_type() { + this.mainService.getAllvisa_entry_type().subscribe(data => { + this.selectvisa_entry_type = data; + console.log(data); + }, (error) => { console.log(error); }); + } + + selectvisa_duration; + getallvisa_duration() { + this.mainService.getAllvisa_duration().subscribe(data => { + this.selectvisa_duration = data; + console.log(data); + }, (error) => { console.log(error); }); + } + + selectvisa_processing; + getallvisa_processing() { + this.mainService.getAllvisa_processing().subscribe(data => { + this.selectvisa_processing = data; + console.log('visa processing ', data); + }, (error) => { console.log(error); }); + } + + isValidemail(email: string): boolean { + const emailPattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/; + return emailPattern.test(email); + } + + isValidPhone_number(phone: string): boolean { + const phonePattern = /^(\+[1-9][0-9]{0,2})?[1-9][0-9]{9}$/; + return phonePattern.test(phone); + } + + + + + + selectgender; + getallgender() { + this.mainService.getAllgender().subscribe(data => { + this.selectgender = data; + console.log(data); + }, (error) => { console.log(error); }); + } + + + + //currency field start + formatCurrencyvisa_cost() { + // Format the currency with two decimal places + this.rowSelected.visa_cost = Number(this.rowSelected.visa_cost).toFixed(2); + // Remove commas from the formatted currency + this.rowSelected.visa_cost = this.rowSelected.visa_cost?.replace(/,/g, ''); + } + //currency field end + + selectreferrer; + getallreferrer() { + this.mainService.getAllreferrer().subscribe(data => { + this.selectreferrer = data; + console.log(data); + }, (error) => { console.log(error); }); + } + + selectnationality; + getallnationality() { + this.mainService.getAllnationality().subscribe(data => { + this.selectnationality = data; + console.log(data); + }, (error) => { console.log(error); }); + } + + selectsupplier; + getallsupplier() { + this.mainService.getAllsupplier().subscribe(data => { + this.selectsupplier = data; + console.log(data); + }, (error) => { console.log(error); }); + } + + selectagent; + getallagent() { + this.mainService.getAllagent().subscribe(data => { + this.selectagent = data; + console.log(data); + }, (error) => { console.log(error); }); + } + +} diff --git a/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/Visa_application/VisaOrderWorkflow/play.ts b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/Visa_application/VisaOrderWorkflow/play.ts new file mode 100644 index 0000000..3c5b927 --- /dev/null +++ b/visaproject-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/fnd/Visa_application/VisaOrderWorkflow/play.ts @@ -0,0 +1,9 @@ +export class College { + public studentid: number; + public wf_instance_id:number; + public studentname: string; + public department: string; + public joiningDate: string; + public phone: number; + public emailId:string; +} 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 ad9ebac..2888c4f 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 @@ -127,6 +127,7 @@ import { TreeNodeComponent } from './fnd/SiteTreeBuilder/TreeNode/tree-node.comp 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'; +import { EditstepperTfComponent } from './fnd/Visa_application/VisaOrderWorkflow/editstepperTf.component'; @NgModule({ @@ -147,6 +148,7 @@ import { Dlf_headerComponent } from './fnd/SiteTreeBuilder/Dlf_header/Dlf_header // buildercomponents + EditstepperTfComponent, Dlf_headerComponent, Design_lbraryComponent, SiteTreeComponent,