diff --git a/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java b/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java index ed8c1a3..9ce18d2 100644 --- a/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java +++ b/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java @@ -69,6 +69,12 @@ public class BuilderService { executeDump(true); // ADD OTHER SERVICE +addCustomMenu( "select","Stepper_workflow", "Transcations"); + + +addCustomMenu( "Forma","Forma", "Transcations"); + + addCustomMenu( "adv ","Stepper_workflow", "Transcations"); diff --git a/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/FormaController.java b/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/FormaController.java index 7b18eed..3085b2a 100644 --- a/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/FormaController.java +++ b/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/FormaController.java @@ -24,10 +24,6 @@ import com.realnet.basicp1.Services.FormaService ; - - - - @RequestMapping(value = "/Forma") @CrossOrigin("*") @RestController @@ -46,10 +42,6 @@ public class FormaController { - - - - @PostMapping("/Forma") public Forma Savedata(@RequestBody Forma data) { Forma save = Service.Savedata(data) ; @@ -60,10 +52,6 @@ public class FormaController { - - - - System.out.println("data saved..." + save); return save; @@ -116,8 +104,4 @@ public class FormaController { - - - - } \ No newline at end of file diff --git a/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Forma_ListFilter1Controller.java b/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Forma_ListFilter1Controller.java new file mode 100644 index 0000000..4f6c9fe --- /dev/null +++ b/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Forma_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.basicp1.Entity.Forma_ListFilter1; +import com.realnet.basicp1.Services.Forma_ListFilter1Service ; +@RequestMapping(value = "/Forma_ListFilter1") +@RestController +public class Forma_ListFilter1Controller { + + @Autowired + private Forma_ListFilter1Service Service; + + @GetMapping("/Forma_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Forma_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_FormaController.java b/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_FormaController.java index fa9b76a..73ca5b8 100644 --- a/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_FormaController.java +++ b/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_FormaController.java @@ -24,10 +24,6 @@ import com.realnet.basicp1.Services.FormaService ; - - - - @RequestMapping(value = "/token/Forma") @CrossOrigin("*") @RestController @@ -46,10 +42,6 @@ public class tokenFree_FormaController { - - - - @PostMapping("/Forma") public Forma Savedata(@RequestBody Forma data) { Forma save = Service.Savedata(data) ; @@ -60,10 +52,6 @@ public class tokenFree_FormaController { - - - - System.out.println("data saved..." + save); return save; @@ -116,8 +104,4 @@ public class tokenFree_FormaController { - - - - } \ No newline at end of file diff --git a/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Forma_ListFilter1Controller.java b/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Forma_ListFilter1Controller.java new file mode 100644 index 0000000..d55b490 --- /dev/null +++ b/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Forma_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.basicp1.Entity.Forma_ListFilter1; +import com.realnet.basicp1.Services.Forma_ListFilter1Service ; +@RequestMapping(value = "/token/Forma_ListFilter1") +@RestController +public class tokenFree_Forma_ListFilter1Controller { + + @Autowired + private Forma_ListFilter1Service Service; + + @GetMapping("/Forma_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Forma_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Forma.java b/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Forma.java index dcbc5df..ffe4cad 100644 --- a/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Forma.java +++ b/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Forma.java @@ -12,10 +12,6 @@ import com.realnet.WhoColumn.Entity.Extension; - - - - @Entity @Data public class Forma extends Extension { @@ -30,20 +26,13 @@ import com.realnet.WhoColumn.Entity.Extension; private String name; - private String radio_field; +private String static; +private String dynamic; +private String dynamicname; - - -private boolean a; - - - -private String currency; - -private String qrcode_field; - -private String barcode_field; +private String auto; +private String autotypename; } diff --git a/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Forma_ListFilter1.java b/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Forma_ListFilter1.java new file mode 100644 index 0000000..f1a6696 --- /dev/null +++ b/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Forma_ListFilter1.java @@ -0,0 +1,14 @@ +package com.realnet.basicp1.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Data + public class Forma_ListFilter1 { + + private Integer id; + + + private String name; +} diff --git a/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/FormaRepository.java b/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/FormaRepository.java index 2b1567f..daf1137 100644 --- a/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/FormaRepository.java +++ b/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/FormaRepository.java @@ -16,10 +16,6 @@ import java.util.*; - - - - diff --git a/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/FormaService.java b/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/FormaService.java index 316054a..071e66b 100644 --- a/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/FormaService.java +++ b/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/FormaService.java @@ -16,11 +16,13 @@ import com.realnet.users.entity1.AppUser; +import com.realnet.basicp1.Entity.Forma; +import com.realnet.basicp1.Services.FormaService; - - +import com.realnet.basicp1.Entity.Forma; +import com.realnet.basicp1.Services.FormaService; @@ -37,13 +39,11 @@ private FormaRepository Repository; +@Autowired + private FormaService dynamicserv; - - - - - - +@Autowired + private FormaService autoserv; public Forma Savedata(Forma data) { @@ -51,11 +51,43 @@ public Forma Savedata(Forma data) { + +if (data.getDynamic() != null) { + try { + int dynamicId = Integer.valueOf(data.getDynamic()); +Forma get = dynamicserv.getdetailsbyId(dynamicId); + if (get != null) { + + data.setDynamicname(get.getName()); +} +} catch (NumberFormatException e) { + System.out.println(" dynamicId is not integer.."); + // Invalid integer string — ignore or log + } + + } + + + +if (data.getAuto() != null) { + try { + int autoId = Integer.valueOf(data.getAuto()); +Forma get = autoserv.getdetailsbyId(autoId); + if (get != null) { + data.setAutoname(get.getName()); +} +} catch (NumberFormatException e) { + System.out.println(" autoId is not integer.."); + // Invalid integer string — ignore or log + } + } + + data.setUpdatedBy(getUser().getUserId()); @@ -91,21 +123,11 @@ public Forma update(Forma data,Integer id) { Forma old = Repository.findById(id).get(); old.setName(data.getName()); -old.setRadio_field(data.getRadio_field()); +old.setStatic(data.getStatic()); - - -old.setA(data.isA()); - +old.setDynamic(data.getDynamic()); - - - -old.setCurrency(data.getCurrency()); - -old.setQrcode_field(data.getQrcode_field()); - -old.setBarcode_field(data.getBarcode_field()); +old.setAuto(data.getAuto()); final Forma test = Repository.save(old); data.setUpdatedBy(getUser().getUserId()); @@ -118,10 +140,6 @@ final Forma test = Repository.save(old); - - - - public AppUser getUser() { AppUser user = userService.getLoggedInUser(); return user; diff --git a/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Forma_ListFilter1Service.java b/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Forma_ListFilter1Service.java new file mode 100644 index 0000000..7639935 --- /dev/null +++ b/steper009-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Forma_ListFilter1Service.java @@ -0,0 +1,47 @@ +package com.realnet.basicp1.Services; +import java.util.*; +import com.realnet.basicp1.Repository.FormaRepository; +import com.realnet.basicp1.Entity.Forma; + +import com.realnet.basicp1.Entity.Forma_ListFilter1; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class Forma_ListFilter1Service { +@Autowired +private FormaRepository Repository; + + + + + public List getlistbuilder() { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Forma data : list) { +{ +Forma_ListFilter1 dummy = new Forma_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + l.add(dummy); +} +} +return l;} + + + + public List getlistbuilderparam( ) { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Forma data : list) { +{ +Forma_ListFilter1 dummy = new Forma_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + l.add(dummy); +} +} +return l;} +} \ No newline at end of file diff --git a/steper009-db-d/authsec_mysql/mysql/wf_table/wf_table.sql b/steper009-db-d/authsec_mysql/mysql/wf_table/wf_table.sql index e64e8f5..06029e3 100755 --- a/steper009-db-d/authsec_mysql/mysql/wf_table/wf_table.sql +++ b/steper009-db-d/authsec_mysql/mysql/wf_table/wf_table.sql @@ -1,2 +1,2 @@ -CREATE TABLE db.Forma(id BIGINT NOT NULL AUTO_INCREMENT, radio_field VARCHAR(400), a bit(1), b bit(1), currency VARCHAR(400), qrcode_field VARCHAR(400), barcode_field VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id)); +CREATE TABLE db.Forma(id BIGINT NOT NULL AUTO_INCREMENT, auto int, static VARCHAR(400), dynamic int, name VARCHAR(400), PRIMARY KEY (id)); diff --git a/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Forma/Forma.component.html b/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Forma/Forma.component.html index 84b77f1..4927cd4 100644 --- a/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Forma/Forma.component.html +++ b/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Forma/Forma.component.html @@ -27,28 +27,15 @@ - Radio Field - - - - - - a - - - - - - - Currency + static - QRCode Field + dynamic - BarCode Field + auto @@ -63,24 +50,13 @@ {{user. name }} -{{user. radio_field }} +{{user. static }} - - -{{user. a}} - +{{user. dynamicname }} - - -{{user. currency }} - - -{{user. qrcode_field }} - - -{{user. barcode_field }} +{{user. autoname }} @@ -242,10 +218,6 @@ - - - - -
- - - - - - - - - - -
- -
- -
-
- + + -
- - + + -
-
- - + + + + +
+ +
+ + + + + -
- - -
- + + + + + - -
- - - -
- - - -
- - -
@@ -334,10 +286,6 @@ - - - -

Extension

@@ -390,10 +338,6 @@ - - - -        
-
- - +
+ +
+ - - - - +
+ +
- -
-
- - - -
- -
-
- - -
- -
- +
+ + +
+ -
- - - -
- - -
- - - -
- - -
- - - -
- - -
- @@ -477,10 +397,6 @@ - - - - @@ -521,8 +437,4 @@ - - - - diff --git a/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Forma/Forma.component.ts b/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Forma/Forma.component.ts index 8d94857..de4281b 100644 --- a/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Forma/Forma.component.ts +++ b/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Forma/Forma.component.ts @@ -65,19 +65,11 @@ private userInfoService:UserInfoService, this.entryForm = this._fb.group({ name : [null], -radio_field : [null], +static : [null], - - -a:[false], - +dynamic : [null], - -currency : [null, { updateOn: 'blur' }], - -qrcode_field : [null], - -barcode_field : [null], +auto : [null], @@ -88,10 +80,6 @@ barcode_field : [null], - - - - }); // component_button200 // form code start this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { @@ -118,13 +106,9 @@ barcode_field : [null], +this.getalldynamic(); - - - - - - +this.getallauto(); } @@ -136,10 +120,6 @@ barcode_field : [null], - - - - error; getData() { this.mainService.getAll().subscribe((data) => { @@ -165,14 +145,6 @@ barcode_field : [null], - - - // bar code field start - setTimeout(function(){ - JsBarcode("#barcodebarcode_field", row?.barcode_field); - }, 500); - // bar code field start - this.modalEdit = true; } @@ -201,10 +173,6 @@ barcode_field : [null], - - - - //console.log("in update"); console.log("id " + id); console.log(this.rowSelected); @@ -226,10 +194,6 @@ setTimeout(() => { - - - - }, (error) => { console.log(error); if (error.status >= 200 && error.status <= 299) { @@ -256,10 +220,6 @@ onCreate() { - - - - this.mainService.create(this.entryForm.value).subscribe( (data) => { console.log(data); @@ -276,10 +236,6 @@ setTimeout(() => { - - - - }, (error) => { console.log(error); @@ -306,10 +262,6 @@ this.modalAdd = true; this.submitted = false; - - - - } submitted = false; @@ -323,34 +275,20 @@ onSubmit() { } -updateradio_field (radio_field : string): void { - this.entryForm.get('radio_field').setValue(radio_field); } - -updateradio_fieldEdit(radio_field : string): void { this.rowSelected.radio_field = radio_field } - ; +selectdynamic ; +getalldynamic() { + this.mainService.getAlldynamic().subscribe(data=>{ +this.selectdynamic = data; +console.log(data); +},(error) => { console.log(error); }); } -//currency field start - formatCurrencycurrency () { - // Format the currency with two decimal places - this.rowSelected.currency = Number(this.rowSelected.currency ).toFixed(2); - // Remove commas from the formatted currency - this.rowSelected.currency = this.rowSelected.currency?.replace(/,/g, ''); } - //currency field end - - - -//bar code field start - generateBarcodebarcode_field(value) { - const barcodeValue = value; - const barcodeElement = document.getElementById("barcodebarcode_field"); - if (barcodeElement) { if (barcodeValue) { - JsBarcode(barcodeElement, barcodeValue, { format: "CODE128" - }); } else { - // Clear the barcode if the input is empty - barcodeElement.innerHTML = ''; } } } - // bar code field end +selectauto ; + getallauto () { + this.mainService.getAllauto().subscribe(data=>{ + this.selectauto = data; console.log(data); + },(error) => { console.log(error); }); } // updateaction } @@ -361,7 +299,3 @@ updateradio_fieldEdit(radio_field : string): void { this.rowSelected.radio_fi - - - - diff --git a/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Forma/Forma.service.ts b/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Forma/Forma.service.ts index ce62d1e..25ff7d8 100644 --- a/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Forma/Forma.service.ts +++ b/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Forma/Forma.service.ts @@ -33,13 +33,10 @@ export class Formaservice{ +getAlldynamic(): Observable { +return this.apiRequest.get("Forma_ListFilter1/Forma_ListFilter1"); } - - - - - - +getAllauto(): Observable { return this.apiRequest.get("Forma_ListFilter1/Forma_ListFilter1"); } // updateaction } \ No newline at end of file diff --git a/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stepperworkflow/Stepper_workflow/Stepper_workflow.component.ts b/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stepperworkflow/Stepper_workflow/Stepper_workflow.component.ts index 7c20848..fa48784 100644 --- a/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stepperworkflow/Stepper_workflow/Stepper_workflow.component.ts +++ b/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stepperworkflow/Stepper_workflow/Stepper_workflow.component.ts @@ -20,6 +20,7 @@ + import { Component, OnInit } from '@angular/core'; @@ -250,6 +251,8 @@ export class Stepper_workflowComponent implements OnInit { console.log('id is ', id) // stepper route + this.router.navigate(["../select/", id], { relativeTo: this.route }); + this.router.navigate(["../adv_/", id], { relativeTo: this.route }); diff --git a/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stepperworkflow/select/select.component.css.map b/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stepperworkflow/select/select.component.css.map new file mode 100644 index 0000000..5015497 --- /dev/null +++ b/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stepperworkflow/select/select.component.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["select.component.scss","select.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":"select.component.css"} \ No newline at end of file diff --git a/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stepperworkflow/select/select.component.html b/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stepperworkflow/select/select.component.html new file mode 100644 index 0000000..7eb8ba4 --- /dev/null +++ b/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stepperworkflow/select/select.component.html @@ -0,0 +1,155 @@ +
+ +
+ + + + + + + +
+ +
+
+
+
+

Workflow

+
+ +
+ + + + step 0 + Application Update + Datagrid + Create/select_field
Information Of + Customer
+
+ + + Step 2 + Review And
Confirmation
+ + Finish . + +
+
+
+
+
+ +
+
+

select_field

+

Update {{FormaentryForm.name}}

+
+ +
+ + +
+ +
+ +
+ + +
+ +
+ +
+ + + +
+ +
+ + + + + +
+ + +
+ + + + +
+ + + + + + + + + +
+ +
+ +
+
+ + + +
+
+ +
+ +
+
+
+
+

Review And Confirmation

+
+ + +
+
+
select_field Summary:

Name : {{ FormaentryForm.get('name')?.value }}

+ +

static : {{ FormaentryForm.get('static')?.value }}

+ +

dynamic : {{ FormaentryForm.get('dynamic')?.value }}

+ +

auto : {{ FormaentryForm.get('auto')?.value }}

+ + +
+
+ + +
+
+
\ No newline at end of file diff --git a/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stepperworkflow/select/select.component.scss b/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stepperworkflow/select/select.component.scss new file mode 100644 index 0000000..35a9e5a --- /dev/null +++ b/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stepperworkflow/select/select.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/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stepperworkflow/select/select.component.spec.ts b/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stepperworkflow/select/select.component.spec.ts new file mode 100644 index 0000000..a102725 --- /dev/null +++ b/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stepperworkflow/select/select.component.spec.ts @@ -0,0 +1,25 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { selectComponent } from './select.component'; + +describe('selectComponent', () => { + let component: selectComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ selectComponent ] + }) + .compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(selectComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stepperworkflow/select/select.component.ts b/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stepperworkflow/select/select.component.ts new file mode 100644 index 0000000..43b7b37 --- /dev/null +++ b/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stepperworkflow/select/select.component.ts @@ -0,0 +1,330 @@ +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 { Observable } from 'rxjs'; +import { ValidationError } from 'src/app/models/fnd/ValidationError'; +import { selectservice } from './select.service'; +@Component({ + selector: 'app-editstepper', + templateUrl: './select.component.html', + styleUrls: ['./select.component.scss'] +}) +export class selectComponent implements OnInit { + updated = false; + 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 }, +}; +public FormaentryForm: FormGroup; + submitted = false; + rowSelected: any = {}; + modalcomplete = false; + + constructor( +private mainService: selectservice, + +private select_field_fb: FormBuilder, +private router: Router, + private route: ActivatedRoute, + private toastr: ToastrService, + ) { } + + ngOnInit(): void { + this.id = this.route.snapshot.params["id"]; + console.log("update with id = ", this.id); + + + this.FormaentryForm = this.select_field_fb.group({ +name : [null], + +static : [null], + +dynamic : [null], + +auto : [null], + + + }); + + + +this.getalldynamic(); + +this.getallauto(); + + + + + +this.getalldynamic(); + +this.getallauto(); + + + const stepId = this.id; // or from route/query/etc + + this.getResolvedDataFromStepper(stepId).subscribe(res => { + console.log('response get ', res); + + if (res === null) { + this.showEmptyForm(); + } else { + if (res['Forma']) { + + this.prefillselect_fieldForm(res['Forma']); + } +} + }); + + } +showEmptyForm(): void { + console.log('No config found. Showing empty form.'); + // You can choose to show one or both based on some logic + + this.FormaentryForm.reset(); + } prefillselect_fieldForm(data: any): void { + + console.log(' select_field data ', data) + this.FormaentryForm.patchValue({ + id: data.id || '', +name: data.name || '', + +static: data.static || '', + +dynamic: data.dynamic || '', + +auto: data.auto || '', + + }); + } + getResolvedDataFromStepper(id: number): Observable { + console.log('get step config'); + + return new Observable(observer => { + this.mainService.gettabledata(id).subscribe(configList => { + if (!configList || configList.length === 0) { + console.log('empty config'); + observer.next(null); + observer.complete(); + return; + } + + const results: { [key: string]: any } = {}; + let processed = 0; + + configList.forEach(config => { + const { table_name, table_id } = config; + + this.getByTableNameAndId(table_name, table_id).subscribe(data => { + + console.log('data is ', data); + results[table_name] = data; + + processed++; + if (processed === configList.length) { + observer.next(results); // emit combined data + observer.complete(); + } + + }, error => { + console.error(`Error loading data for table ${table_name}`, error); + processed++; + if (processed === configList.length) { + observer.next(results); // continue with what we have + observer.complete(); + } + }); + }); + + }, error => { + console.error("Error loading stepper config", error); + observer.error(error); + }); + }); + } + + + + getByTableNameAndId(tableName: string, id: number): Observable { + + switch (tableName) { + case 'Forma': + return this.mainService.getFormaById(id);// aur bhi cases agar naye table add ho to + default: + throw new Error(`Unknown table name: ${tableName}`); + } + } + // 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 ", + } + } + + + + onselect_fieldSave() { + console.log('Form Submitted:', this.FormaentryForm.value); + this.submitted = true; + if (this.FormaentryForm.invalid) { + + console.log('invalid form ..'); + // Log all form errors + Object.keys(this.FormaentryForm.controls).forEach(field => { + const control = this.FormaentryForm.get(field); + if (control && control.invalid) { + console.log(`Error in field: ${field}`, control.errors); + } + } + ); + return; + } + this.onselect_fieldCreate(); + } + + onselect_fieldCreate() { + + + + + + + + + this.mainService.createForma(this.FormaentryForm.value).subscribe( + (data) => { + console.log('adding data ', data); + this.customerId = data.id; + + console.log('id is ', this.customerId); + + + const tableId = data.id; + const tableName = 'Forma'; + const stepperId = this.id; + + // Save stepper config + this.mainService.saveStepperConfig(stepperId, tableId, tableName).subscribe(() => { + this.toastr.success("Stepper Config Saved"); + }); 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.FormaentryForm.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 }, + }; + } + current() { + console.log(this.timelineStyle) + this.stringJson = JSON.stringify(this.timelineStyle); + console.log("String json object :", this.stringJson); + + } + + + + + + + + +// updateaction +} + + + + + + + diff --git a/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stepperworkflow/select/select.service.ts b/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stepperworkflow/select/select.service.ts new file mode 100644 index 0000000..5292ae0 --- /dev/null +++ b/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/stepperworkflow/select/select.service.ts @@ -0,0 +1,55 @@ +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 selectservice{ + private StepperURL = "Stepper_table_config/Stepper_table_config"; + private FormaURL = "Forma/Forma" ; constructor( + private http: HttpClient, + private apiRequest: ApiRequestService, + ) { } +gettabledata(id: number): Observable { + const _http = this.StepperURL + "/stepId/" + id; + return this.apiRequest.get(_http); + } + + saveStepperConfig(stepperId: number, tableId: number, tableName: string): Observable { + const params = new HttpParams() + .set('stepperId', stepperId.toString()) + .set('tableId', tableId.toString()) + .set('tableName', tableName); + + return this.apiRequest.post(this.StepperURL, null, params); // null body, params used + } getAllForma(page?: number, size?: number): Observable { + return this.apiRequest.get(this.FormaURL); + } + getFormaById(id: number): Observable { + const _http = this.FormaURL + "/" + id; + return this.apiRequest.get(_http); + } + createForma(data: any): Observable { + return this.apiRequest.post(this.FormaURL, data); + } + updateForma(id: number, data: any): Observable { + const _http = this.FormaURL + "/" + id; + return this.apiRequest.put(_http, data); + } + deleteForma(id: number): Observable { + const _http = this.FormaURL + "/" + id; + return this.apiRequest.delete(_http); + } + + + + +getAlldynamic(): Observable { +return this.apiRequest.get("Forma_ListFilter1/Forma_ListFilter1"); } + +getAllauto(): Observable { return this.apiRequest.get("Forma_ListFilter1/Forma_ListFilter1"); } + +// updateaction +} \ No newline at end of file diff --git a/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts b/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts index 32540a7..3a57cdf 100644 --- a/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts +++ b/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts @@ -1,3 +1,5 @@ +import { selectComponent } from './BuilderComponents/stepperworkflow/select/select.component'; + import { adv_Component } from './BuilderComponents/stepperworkflow/adv_/adv_.component'; import { FormaComponent } from './BuilderComponents/basicp1/Forma/Forma.component'; @@ -258,6 +260,11 @@ const routes: Routes = [ // buildercomponents +{path:'select/:id',component:selectComponent}, + + + + {path:'adv_/:id',component:adv_Component}, diff --git a/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts b/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts index cbd57b2..d3551e3 100644 --- a/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts +++ b/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts @@ -1,3 +1,5 @@ +import { selectComponent } from './BuilderComponents/stepperworkflow/select/select.component'; + import { adv_Component } from './BuilderComponents/stepperworkflow/adv_/adv_.component'; import { FormaComponent } from './BuilderComponents/basicp1/Forma/Forma.component'; @@ -131,6 +133,11 @@ import { Stepper_workflowComponent } from './BuilderComponents/stepperworkflow/S // buildercomponents +selectComponent, + + + + adv_Component, diff --git a/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json b/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json index 8813657..35bc526 100644 --- a/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json +++ b/steper009-front-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json @@ -226,12 +226,9 @@ "MENU_ACTION_LINK": "Menu Action Link", "STATUS": "Status", "SUB_MENU": "Sub Menu", - "Radio_Field": "Radio_Field", - "a": "a", - "b": "b", + "auto": "auto", "Forma": "Forma", - "Currency": "Currency", - "QRCode_Field": "QRCode_Field", - "BarCode_Field": "BarCode_Field", + "static": "static", + "dynamic": "dynamic", "Name": "Name" } \ No newline at end of file