From d2c25cb9af1b22dc7859da55c091a3666c266696 Mon Sep 17 00:00:00 2001 From: risadmin_prod Date: Thu, 9 Apr 2026 03:26:35 +0000 Subject: [PATCH] build_app --- .../Builders/Services/BuilderService.java | 27 + .../basicp1/Controllers/Adv1Controller.java | 187 +++ .../basicp1/Controllers/Adv2sController.java | 139 ++ .../basicp1/Controllers/Adv3Controller.java | 155 +++ .../basicp1/Controllers/ChildController.java | 99 ++ .../basicp1/Controllers/ContryController.java | 99 ++ .../Contry_ListFilter1Controller.java | 24 + .../Controllers/DistricController.java | 107 ++ .../Distric_ListFilter1Controller.java | 24 + .../basicp1/Controllers/StateController.java | 107 ++ .../State_ListFilter1Controller.java | 24 + .../Controllers/SupportController.java | 91 ++ .../basicp1/Controllers/Test_aController.java | 203 +++ .../Controllers/tokenFree_Adv1Controller.java | 187 +++ .../tokenFree_Adv2sController.java | 139 ++ .../Controllers/tokenFree_Adv3Controller.java | 155 +++ .../tokenFree_ChildController.java | 99 ++ .../tokenFree_ContryController.java | 99 ++ ...okenFree_Contry_ListFilter1Controller.java | 24 + .../tokenFree_DistricController.java | 107 ++ ...kenFree_Distric_ListFilter1Controller.java | 24 + .../tokenFree_StateController.java | 107 ++ ...tokenFree_State_ListFilter1Controller.java | 24 + .../tokenFree_SupportController.java | 91 ++ .../tokenFree_Test_aController.java | 203 +++ .../java/com/realnet/basicp1/Entity/Adv1.java | 104 ++ .../com/realnet/basicp1/Entity/Adv2s.java | 54 + .../java/com/realnet/basicp1/Entity/Adv3.java | 69 + .../com/realnet/basicp1/Entity/Child.java | 33 + .../com/realnet/basicp1/Entity/Contry.java | 33 + .../basicp1/Entity/Contry_ListFilter1.java | 15 + .../com/realnet/basicp1/Entity/Distric.java | 37 + .../basicp1/Entity/Distric_ListFilter1.java | 14 + .../com/realnet/basicp1/Entity/State.java | 37 + .../basicp1/Entity/State_ListFilter1.java | 14 + .../com/realnet/basicp1/Entity/Support.java | 29 + .../com/realnet/basicp1/Entity/Test_a.java | 90 ++ .../basicp1/Repository/Adv1Repository.java | 52 + .../basicp1/Repository/Adv2sRepository.java | 40 + .../basicp1/Repository/Adv3Repository.java | 44 + .../basicp1/Repository/ChildRepository.java | 30 + .../basicp1/Repository/ContryRepository.java | 30 + .../basicp1/Repository/DistricRepository.java | 32 + .../basicp1/Repository/StateRepository.java | 32 + .../basicp1/Repository/SupportRepository.java | 28 + .../basicp1/Repository/Test_aRepository.java | 56 + .../realnet/basicp1/Services/Adv1Service.java | 243 ++++ .../basicp1/Services/Adv2sService.java | 207 +++ .../realnet/basicp1/Services/Adv3Service.java | 192 +++ .../basicp1/Services/ChildService.java | 93 ++ .../basicp1/Services/ContryService.java | 93 ++ .../Services/Contry_ListFilter1Service.java | 53 + .../basicp1/Services/DistricService.java | 103 ++ .../Services/Distric_ListFilter1Service.java | 57 + .../basicp1/Services/StateService.java | 103 ++ .../Services/State_ListFilter1Service.java | 57 + .../basicp1/Services/SupportService.java | 83 ++ .../basicp1/Services/Test_aService.java | 225 ++++ .../authsec_mysql/mysql/wf_table/wf_table.sql | 18 + .../basicp1/Adv1/Adv1.component.html | 1168 +++++++++++++++++ .../basicp1/Adv1/Adv1.component.scss | 85 ++ .../basicp1/Adv1/Adv1.component.ts | 864 ++++++++++++ .../basicp1/Adv1/Adv1.service.ts | 116 ++ .../basicp1/Adv1/Adv1_cardvariable.ts | 4 + .../basicp1/Adv2s/Adv2s.component.html | 671 ++++++++++ .../basicp1/Adv2s/Adv2s.component.scss | 85 ++ .../basicp1/Adv2s/Adv2s.component.ts | 537 ++++++++ .../basicp1/Adv2s/Adv2s.service.ts | 50 + .../basicp1/Adv2s/Adv2s_cardvariable.ts | 4 + .../basicp1/Adv3/Adv3.component.html | 682 ++++++++++ .../basicp1/Adv3/Adv3.component.scss | 85 ++ .../basicp1/Adv3/Adv3.component.ts | 1164 ++++++++++++++++ .../basicp1/Adv3/Adv3.service.ts | 66 + .../basicp1/Adv3/Adv3_cardvariable.ts | 4 + .../basicp1/Child/Child.component.html | 376 ++++++ .../basicp1/Child/Child.component.scss | 85 ++ .../basicp1/Child/Child.component.ts | 275 ++++ .../basicp1/Child/Child.service.ts | 39 + .../basicp1/Child/Child_cardvariable.ts | 4 + .../basicp1/Contry/Contry.component.html | 376 ++++++ .../basicp1/Contry/Contry.component.scss | 85 ++ .../basicp1/Contry/Contry.component.ts | 275 ++++ .../basicp1/Contry/Contry.service.ts | 39 + .../basicp1/Contry/Contry_cardvariable.ts | 4 + .../basicp1/Distric/Distric.component.html | 405 ++++++ .../basicp1/Distric/Distric.component.scss | 85 ++ .../basicp1/Distric/Distric.component.ts | 299 +++++ .../basicp1/Distric/Distric.service.ts | 41 + .../basicp1/Distric/Distric_cardvariable.ts | 4 + .../basicp1/State/State.component.html | 405 ++++++ .../basicp1/State/State.component.scss | 85 ++ .../basicp1/State/State.component.ts | 299 +++++ .../basicp1/State/State.service.ts | 41 + .../basicp1/State/State_cardvariable.ts | 4 + .../basicp1/Support/Support.component.html | 349 +++++ .../basicp1/Support/Support.component.scss | 85 ++ .../basicp1/Support/Support.component.ts | 251 ++++ .../basicp1/Support/Support.service.ts | 37 + .../basicp1/Support/Support_cardvariable.ts | 4 + .../basicp1/Test_a/Test_a.component.html | 780 +++++++++++ .../basicp1/Test_a/Test_a.component.scss | 85 ++ .../basicp1/Test_a/Test_a.component.ts | 648 +++++++++ .../basicp1/Test_a/Test_a.service.ts | 65 + .../basicp1/Test_a/Test_a_cardvariable.ts | 4 + .../app/modules/main/main-routing.module.ts | 36 + .../src/app/modules/main/main.module.ts | 36 + .../src/assets/i18n/en.json | 172 +-- 107 files changed, 16181 insertions(+), 127 deletions(-) create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Adv1Controller.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Adv2sController.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Adv3Controller.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/ChildController.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/ContryController.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Contry_ListFilter1Controller.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/DistricController.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Distric_ListFilter1Controller.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/StateController.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/State_ListFilter1Controller.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/SupportController.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Test_aController.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Adv1Controller.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Adv2sController.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Adv3Controller.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_ChildController.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_ContryController.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Contry_ListFilter1Controller.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_DistricController.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Distric_ListFilter1Controller.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_StateController.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_State_ListFilter1Controller.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_SupportController.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Test_aController.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Adv1.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Adv2s.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Adv3.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Child.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Contry.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Contry_ListFilter1.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Distric.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Distric_ListFilter1.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/State.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/State_ListFilter1.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Support.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Test_a.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/Adv1Repository.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/Adv2sRepository.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/Adv3Repository.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/ChildRepository.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/ContryRepository.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/DistricRepository.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/StateRepository.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/SupportRepository.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/Test_aRepository.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Adv1Service.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Adv2sService.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Adv3Service.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/ChildService.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/ContryService.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Contry_ListFilter1Service.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/DistricService.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Distric_ListFilter1Service.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/StateService.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/State_ListFilter1Service.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/SupportService.java create mode 100644 test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Test_aService.java create mode 100755 test9april-dbb-d/authsec_mysql/mysql/wf_table/wf_table.sql create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv1/Adv1.component.html create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv1/Adv1.component.scss create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv1/Adv1.component.ts create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv1/Adv1.service.ts create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv1/Adv1_cardvariable.ts create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv2s/Adv2s.component.html create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv2s/Adv2s.component.scss create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv2s/Adv2s.component.ts create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv2s/Adv2s.service.ts create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv2s/Adv2s_cardvariable.ts create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv3/Adv3.component.html create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv3/Adv3.component.scss create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv3/Adv3.component.ts create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv3/Adv3.service.ts create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv3/Adv3_cardvariable.ts create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Child/Child.component.html create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Child/Child.component.scss create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Child/Child.component.ts create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Child/Child.service.ts create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Child/Child_cardvariable.ts create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Contry/Contry.component.html create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Contry/Contry.component.scss create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Contry/Contry.component.ts create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Contry/Contry.service.ts create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Contry/Contry_cardvariable.ts create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Distric/Distric.component.html create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Distric/Distric.component.scss create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Distric/Distric.component.ts create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Distric/Distric.service.ts create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Distric/Distric_cardvariable.ts create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/State/State.component.html create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/State/State.component.scss create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/State/State.component.ts create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/State/State.service.ts create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/State/State_cardvariable.ts create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Support/Support.component.html create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Support/Support.component.scss create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Support/Support.component.ts create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Support/Support.service.ts create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Support/Support_cardvariable.ts create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Test_a/Test_a.component.html create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Test_a/Test_a.component.scss create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Test_a/Test_a.component.ts create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Test_a/Test_a.service.ts create mode 100644 test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Test_a/Test_a_cardvariable.ts diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java index 2ae85df..b8cf3b8 100644 --- a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java @@ -80,6 +80,33 @@ public class BuilderService { // } // ADD OTHER SERVICE +addCustomMenu( "Adv3","Adv3", "Transcations"); + + +addCustomMenu( "Support","Support", "Transcations"); + + +addCustomMenu( "Adv2s","Adv2s", "Transcations"); + + +addCustomMenu( "Adv1","Adv1", "Transcations"); + + +addCustomMenu( "Child","Child", "Transcations"); + + +addCustomMenu( "State","State", "Transcations"); + + +addCustomMenu( "Contry","Contry", "Transcations"); + + +addCustomMenu( "Distric","Distric", "Transcations"); + + +addCustomMenu( "Test_a","Test_a", "Transcations"); + + System.out.println("dashboard and menu inserted..."); diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Adv1Controller.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Adv1Controller.java new file mode 100644 index 0000000..1a7fffc --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Adv1Controller.java @@ -0,0 +1,187 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.basicp1.Entity.Adv1; +import com.realnet.basicp1.Services.Adv1Service ; + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@RequestMapping(value = "/Adv1") + @CrossOrigin("*") +@RestController +public class Adv1Controller { + @Autowired + private Adv1Service Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @PostMapping("/Adv1") + public Adv1 Savedata(@RequestBody Adv1 data) { + Adv1 save = Service.Savedata(data) ; + + + + + + + + + + + + + + + + + + + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Adv1/{id}") + public Adv1 update(@RequestBody Adv1 data,@PathVariable Integer id ) { + Adv1 update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Adv1/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Adv1") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Adv1") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Adv1/{id}") + public Adv1 getdetailsbyId(@PathVariable Integer id ) { + Adv1 get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Adv1/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Adv2sController.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Adv2sController.java new file mode 100644 index 0000000..16ae395 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Adv2sController.java @@ -0,0 +1,139 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.basicp1.Entity.Adv2s; +import com.realnet.basicp1.Services.Adv2sService ; + + + + + + + + + + + + + + + + +@RequestMapping(value = "/Adv2s") + @CrossOrigin("*") +@RestController +public class Adv2sController { + @Autowired + private Adv2sService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + + + + + + + @PostMapping("/Adv2s") + public Adv2s Savedata(@RequestBody Adv2s data) { + Adv2s save = Service.Savedata(data) ; + + + + + + + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Adv2s/{id}") + public Adv2s update(@RequestBody Adv2s data,@PathVariable Integer id ) { + Adv2s update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Adv2s/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Adv2s") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Adv2s") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Adv2s/{id}") + public Adv2s getdetailsbyId(@PathVariable Integer id ) { + Adv2s get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Adv2s/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + + + + + + + + + +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Adv3Controller.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Adv3Controller.java new file mode 100644 index 0000000..3bab6cf --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Adv3Controller.java @@ -0,0 +1,155 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.basicp1.Entity.Adv3; +import com.realnet.basicp1.Services.Adv3Service ; + + + + + + + + + + + + + + + + + + + + +@RequestMapping(value = "/Adv3") + @CrossOrigin("*") +@RestController +public class Adv3Controller { + @Autowired + private Adv3Service Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + + + + + + + + + + + @PostMapping("/Adv3") + public Adv3 Savedata(@RequestBody Adv3 data) { + Adv3 save = Service.Savedata(data) ; + + + + + + + + + + + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Adv3/{id}") + public Adv3 update(@RequestBody Adv3 data,@PathVariable Integer id ) { + Adv3 update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Adv3/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Adv3") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Adv3") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Adv3/{id}") + public Adv3 getdetailsbyId(@PathVariable Integer id ) { + Adv3 get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Adv3/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + + + + + + + + + + + + + +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/ChildController.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/ChildController.java new file mode 100644 index 0000000..e298f98 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/ChildController.java @@ -0,0 +1,99 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.basicp1.Entity.Child; +import com.realnet.basicp1.Services.ChildService ; + + + + + + +@RequestMapping(value = "/Child") + @CrossOrigin("*") +@RestController +public class ChildController { + @Autowired + private ChildService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + @PostMapping("/Child") + public Child Savedata(@RequestBody Child data) { + Child save = Service.Savedata(data) ; + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Child/{id}") + public Child update(@RequestBody Child data,@PathVariable Integer id ) { + Child update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Child/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Child") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Child") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Child/{id}") + public Child getdetailsbyId(@PathVariable Integer id ) { + Child get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Child/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/ContryController.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/ContryController.java new file mode 100644 index 0000000..865bd3f --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/ContryController.java @@ -0,0 +1,99 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.basicp1.Entity.Contry; +import com.realnet.basicp1.Services.ContryService ; + + + + + + +@RequestMapping(value = "/Contry") + @CrossOrigin("*") +@RestController +public class ContryController { + @Autowired + private ContryService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + @PostMapping("/Contry") + public Contry Savedata(@RequestBody Contry data) { + Contry save = Service.Savedata(data) ; + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Contry/{id}") + public Contry update(@RequestBody Contry data,@PathVariable Integer id ) { + Contry update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Contry/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Contry") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Contry") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Contry/{id}") + public Contry getdetailsbyId(@PathVariable Integer id ) { + Contry get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Contry/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Contry_ListFilter1Controller.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Contry_ListFilter1Controller.java new file mode 100644 index 0000000..1bfc4f5 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Contry_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.Contry_ListFilter1; +import com.realnet.basicp1.Services.Contry_ListFilter1Service ; +@RequestMapping(value = "/Contry_ListFilter1") +@RestController +public class Contry_ListFilter1Controller { + + @Autowired + private Contry_ListFilter1Service Service; + + @GetMapping("/Contry_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Contry_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/DistricController.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/DistricController.java new file mode 100644 index 0000000..91a3a5f --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/DistricController.java @@ -0,0 +1,107 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.basicp1.Entity.Distric; +import com.realnet.basicp1.Services.DistricService ; + + + + + + + + +@RequestMapping(value = "/Distric") + @CrossOrigin("*") +@RestController +public class DistricController { + @Autowired + private DistricService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + @PostMapping("/Distric") + public Distric Savedata(@RequestBody Distric data) { + Distric save = Service.Savedata(data) ; + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Distric/{id}") + public Distric update(@RequestBody Distric data,@PathVariable Integer id ) { + Distric update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Distric/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Distric") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Distric") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Distric/{id}") + public Distric getdetailsbyId(@PathVariable Integer id ) { + Distric get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Distric/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Distric_ListFilter1Controller.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Distric_ListFilter1Controller.java new file mode 100644 index 0000000..9744bbe --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Distric_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.Distric_ListFilter1; +import com.realnet.basicp1.Services.Distric_ListFilter1Service ; +@RequestMapping(value = "/Distric_ListFilter1") +@RestController +public class Distric_ListFilter1Controller { + + @Autowired + private Distric_ListFilter1Service Service; + + @GetMapping("/Distric_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Distric_ListFilter11/{item}") + public List getlistwithparam( @PathVariable String item) { + List get = Service.getlistbuilderparam( item); + return get; +} +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/StateController.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/StateController.java new file mode 100644 index 0000000..ef3ca0b --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/StateController.java @@ -0,0 +1,107 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.basicp1.Entity.State; +import com.realnet.basicp1.Services.StateService ; + + + + + + + + +@RequestMapping(value = "/State") + @CrossOrigin("*") +@RestController +public class StateController { + @Autowired + private StateService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + @PostMapping("/State") + public State Savedata(@RequestBody State data) { + State save = Service.Savedata(data) ; + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/State/{id}") + public State update(@RequestBody State data,@PathVariable Integer id ) { + State update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/State/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/State") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/State") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/State/{id}") + public State getdetailsbyId(@PathVariable Integer id ) { + State get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/State/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/State_ListFilter1Controller.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/State_ListFilter1Controller.java new file mode 100644 index 0000000..a661335 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/State_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.State_ListFilter1; +import com.realnet.basicp1.Services.State_ListFilter1Service ; +@RequestMapping(value = "/State_ListFilter1") +@RestController +public class State_ListFilter1Controller { + + @Autowired + private State_ListFilter1Service Service; + + @GetMapping("/State_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/State_ListFilter11/{item}") + public List getlistwithparam( @PathVariable String item) { + List get = Service.getlistbuilderparam( item); + return get; +} +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/SupportController.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/SupportController.java new file mode 100644 index 0000000..5f75ca3 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/SupportController.java @@ -0,0 +1,91 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.basicp1.Entity.Support; +import com.realnet.basicp1.Services.SupportService ; + + + + +@RequestMapping(value = "/Support") + @CrossOrigin("*") +@RestController +public class SupportController { + @Autowired + private SupportService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + @PostMapping("/Support") + public Support Savedata(@RequestBody Support data) { + Support save = Service.Savedata(data) ; + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Support/{id}") + public Support update(@RequestBody Support data,@PathVariable Integer id ) { + Support update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Support/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Support") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Support") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Support/{id}") + public Support getdetailsbyId(@PathVariable Integer id ) { + Support get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Support/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Test_aController.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Test_aController.java new file mode 100644 index 0000000..455e6b2 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/Test_aController.java @@ -0,0 +1,203 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.basicp1.Entity.Test_a; +import com.realnet.basicp1.Services.Test_aService ; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@RequestMapping(value = "/Test_a") + @CrossOrigin("*") +@RestController +public class Test_aController { + @Autowired + private Test_aService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @PostMapping("/Test_a") + public Test_a Savedata(@RequestBody Test_a data) { + Test_a save = Service.Savedata(data) ; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Test_a/{id}") + public Test_a update(@RequestBody Test_a data,@PathVariable Integer id ) { + Test_a update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Test_a/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Test_a") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Test_a") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Test_a/{id}") + public Test_a getdetailsbyId(@PathVariable Integer id ) { + Test_a get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Test_a/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Adv1Controller.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Adv1Controller.java new file mode 100644 index 0000000..969015e --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Adv1Controller.java @@ -0,0 +1,187 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.basicp1.Entity.Adv1; +import com.realnet.basicp1.Services.Adv1Service ; + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@RequestMapping(value = "/token/Adv1") + @CrossOrigin("*") +@RestController +public class tokenFree_Adv1Controller { + @Autowired + private Adv1Service Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @PostMapping("/Adv1") + public Adv1 Savedata(@RequestBody Adv1 data) { + Adv1 save = Service.Savedata(data) ; + + + + + + + + + + + + + + + + + + + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Adv1/{id}") + public Adv1 update(@RequestBody Adv1 data,@PathVariable Integer id ) { + Adv1 update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Adv1/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Adv1") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Adv1") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Adv1/{id}") + public Adv1 getdetailsbyId(@PathVariable Integer id ) { + Adv1 get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Adv1/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Adv2sController.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Adv2sController.java new file mode 100644 index 0000000..0b775ed --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Adv2sController.java @@ -0,0 +1,139 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.basicp1.Entity.Adv2s; +import com.realnet.basicp1.Services.Adv2sService ; + + + + + + + + + + + + + + + + +@RequestMapping(value = "/token/Adv2s") + @CrossOrigin("*") +@RestController +public class tokenFree_Adv2sController { + @Autowired + private Adv2sService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + + + + + + + @PostMapping("/Adv2s") + public Adv2s Savedata(@RequestBody Adv2s data) { + Adv2s save = Service.Savedata(data) ; + + + + + + + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Adv2s/{id}") + public Adv2s update(@RequestBody Adv2s data,@PathVariable Integer id ) { + Adv2s update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Adv2s/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Adv2s") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Adv2s") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Adv2s/{id}") + public Adv2s getdetailsbyId(@PathVariable Integer id ) { + Adv2s get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Adv2s/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + + + + + + + + + +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Adv3Controller.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Adv3Controller.java new file mode 100644 index 0000000..e0a2baf --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Adv3Controller.java @@ -0,0 +1,155 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.basicp1.Entity.Adv3; +import com.realnet.basicp1.Services.Adv3Service ; + + + + + + + + + + + + + + + + + + + + +@RequestMapping(value = "/token/Adv3") + @CrossOrigin("*") +@RestController +public class tokenFree_Adv3Controller { + @Autowired + private Adv3Service Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + + + + + + + + + + + @PostMapping("/Adv3") + public Adv3 Savedata(@RequestBody Adv3 data) { + Adv3 save = Service.Savedata(data) ; + + + + + + + + + + + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Adv3/{id}") + public Adv3 update(@RequestBody Adv3 data,@PathVariable Integer id ) { + Adv3 update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Adv3/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Adv3") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Adv3") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Adv3/{id}") + public Adv3 getdetailsbyId(@PathVariable Integer id ) { + Adv3 get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Adv3/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + + + + + + + + + + + + + +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_ChildController.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_ChildController.java new file mode 100644 index 0000000..7550b7c --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_ChildController.java @@ -0,0 +1,99 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.basicp1.Entity.Child; +import com.realnet.basicp1.Services.ChildService ; + + + + + + +@RequestMapping(value = "/token/Child") + @CrossOrigin("*") +@RestController +public class tokenFree_ChildController { + @Autowired + private ChildService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + @PostMapping("/Child") + public Child Savedata(@RequestBody Child data) { + Child save = Service.Savedata(data) ; + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Child/{id}") + public Child update(@RequestBody Child data,@PathVariable Integer id ) { + Child update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Child/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Child") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Child") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Child/{id}") + public Child getdetailsbyId(@PathVariable Integer id ) { + Child get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Child/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_ContryController.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_ContryController.java new file mode 100644 index 0000000..4ec63e5 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_ContryController.java @@ -0,0 +1,99 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.basicp1.Entity.Contry; +import com.realnet.basicp1.Services.ContryService ; + + + + + + +@RequestMapping(value = "/token/Contry") + @CrossOrigin("*") +@RestController +public class tokenFree_ContryController { + @Autowired + private ContryService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + @PostMapping("/Contry") + public Contry Savedata(@RequestBody Contry data) { + Contry save = Service.Savedata(data) ; + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Contry/{id}") + public Contry update(@RequestBody Contry data,@PathVariable Integer id ) { + Contry update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Contry/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Contry") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Contry") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Contry/{id}") + public Contry getdetailsbyId(@PathVariable Integer id ) { + Contry get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Contry/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Contry_ListFilter1Controller.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Contry_ListFilter1Controller.java new file mode 100644 index 0000000..a9d080a --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Contry_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.Contry_ListFilter1; +import com.realnet.basicp1.Services.Contry_ListFilter1Service ; +@RequestMapping(value = "/token/Contry_ListFilter1") +@RestController +public class tokenFree_Contry_ListFilter1Controller { + + @Autowired + private Contry_ListFilter1Service Service; + + @GetMapping("/Contry_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Contry_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_DistricController.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_DistricController.java new file mode 100644 index 0000000..7030466 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_DistricController.java @@ -0,0 +1,107 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.basicp1.Entity.Distric; +import com.realnet.basicp1.Services.DistricService ; + + + + + + + + +@RequestMapping(value = "/token/Distric") + @CrossOrigin("*") +@RestController +public class tokenFree_DistricController { + @Autowired + private DistricService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + @PostMapping("/Distric") + public Distric Savedata(@RequestBody Distric data) { + Distric save = Service.Savedata(data) ; + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Distric/{id}") + public Distric update(@RequestBody Distric data,@PathVariable Integer id ) { + Distric update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Distric/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Distric") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Distric") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Distric/{id}") + public Distric getdetailsbyId(@PathVariable Integer id ) { + Distric get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Distric/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Distric_ListFilter1Controller.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Distric_ListFilter1Controller.java new file mode 100644 index 0000000..b07cd7a --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Distric_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.Distric_ListFilter1; +import com.realnet.basicp1.Services.Distric_ListFilter1Service ; +@RequestMapping(value = "/token/Distric_ListFilter1") +@RestController +public class tokenFree_Distric_ListFilter1Controller { + + @Autowired + private Distric_ListFilter1Service Service; + + @GetMapping("/Distric_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Distric_ListFilter11/{item}") + public List getlistwithparam( @PathVariable String item) { + List get = Service.getlistbuilderparam( item); + return get; +} +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_StateController.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_StateController.java new file mode 100644 index 0000000..6b5dd9a --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_StateController.java @@ -0,0 +1,107 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.basicp1.Entity.State; +import com.realnet.basicp1.Services.StateService ; + + + + + + + + +@RequestMapping(value = "/token/State") + @CrossOrigin("*") +@RestController +public class tokenFree_StateController { + @Autowired + private StateService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + @PostMapping("/State") + public State Savedata(@RequestBody State data) { + State save = Service.Savedata(data) ; + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/State/{id}") + public State update(@RequestBody State data,@PathVariable Integer id ) { + State update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/State/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/State") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/State") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/State/{id}") + public State getdetailsbyId(@PathVariable Integer id ) { + State get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/State/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_State_ListFilter1Controller.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_State_ListFilter1Controller.java new file mode 100644 index 0000000..02feb04 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_State_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.State_ListFilter1; +import com.realnet.basicp1.Services.State_ListFilter1Service ; +@RequestMapping(value = "/token/State_ListFilter1") +@RestController +public class tokenFree_State_ListFilter1Controller { + + @Autowired + private State_ListFilter1Service Service; + + @GetMapping("/State_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/State_ListFilter11/{item}") + public List getlistwithparam( @PathVariable String item) { + List get = Service.getlistbuilderparam( item); + return get; +} +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_SupportController.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_SupportController.java new file mode 100644 index 0000000..b2fd83e --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_SupportController.java @@ -0,0 +1,91 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.basicp1.Entity.Support; +import com.realnet.basicp1.Services.SupportService ; + + + + +@RequestMapping(value = "/token/Support") + @CrossOrigin("*") +@RestController +public class tokenFree_SupportController { + @Autowired + private SupportService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + @PostMapping("/Support") + public Support Savedata(@RequestBody Support data) { + Support save = Service.Savedata(data) ; + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Support/{id}") + public Support update(@RequestBody Support data,@PathVariable Integer id ) { + Support update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Support/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Support") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Support") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Support/{id}") + public Support getdetailsbyId(@PathVariable Integer id ) { + Support get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Support/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Test_aController.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Test_aController.java new file mode 100644 index 0000000..1ae88ed --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/tokenFree_Test_aController.java @@ -0,0 +1,203 @@ +package com.realnet.basicp1.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; +import com.fasterxml.jackson.core.JsonProcessingException; +import org.springframework.web.bind.annotation.CrossOrigin; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.realnet.config.EmailService; +import com.realnet.users.entity1.AppUser; +import com.realnet.users.service1.AppUserServiceImpl; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.data.domain.*; +import com.realnet.fnd.response.EntityResponse; +import org.springframework.http.*; +import org.springframework.beans.factory.annotation.*; +import com.realnet.basicp1.Entity.Test_a; +import com.realnet.basicp1.Services.Test_aService ; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +@RequestMapping(value = "/token/Test_a") + @CrossOrigin("*") +@RestController +public class tokenFree_Test_aController { + @Autowired + private Test_aService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @PostMapping("/Test_a") + public Test_a Savedata(@RequestBody Test_a data) { + Test_a save = Service.Savedata(data) ; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Test_a/{id}") + public Test_a update(@RequestBody Test_a data,@PathVariable Integer id ) { + Test_a update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Test_a/getall/page") + public Page getall(@RequestParam(value = "page", required = false) Integer page, + @RequestParam(value = "size", required = false) Integer size) { + Pageable paging = PageRequest.of(page, size); + Page get = Service.getAllWithPagination(paging); + + return get; + + } + @GetMapping("/Test_a") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Test_a") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Test_a/{id}") + public Test_a getdetailsbyId(@PathVariable Integer id ) { + Test_a get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Test_a/{id}") + public ResponseEntity delete_by_id(@PathVariable Integer id ) { + Service.delete_by_id(id); + return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK); + + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Adv1.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Adv1.java new file mode 100644 index 0000000..5eab8e3 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Adv1.java @@ -0,0 +1,104 @@ +package com.realnet.basicp1.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @Entity + @Data + public class Adv1 extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + + private String gender; + + + + +private Boolean java; + + + +private Boolean testing; + + + +private Boolean selenium; + + + +private String fileupload_fieldname; +private String fileupload_fieldpath ; + +private String imageupload_fieldname; +private String imageupload_fieldpath ; + +private String audio_fieldname; +private String audio_fieldpath ; + +private String video_fieldname; +private String video_fieldpath ; + +private String currency; + +private String qrcode_field; + +private String barcode_field; + + + + + + + +private String name; + + + + +private String last_name; + + + + + + + + +} diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Adv2s.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Adv2s.java new file mode 100644 index 0000000..3d5ffa7 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Adv2s.java @@ -0,0 +1,54 @@ +package com.realnet.basicp1.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + + + + + + + + + + @Entity + @Data + public class Adv2s extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +private String sta_select; + +private String stat_mulsel; + +private String dyan_sel; +private String dyan_selidentifier; + +private String dyna_mul; + +private String autoc; +private String autocidentifier; + +private String auto_mul; + + + + +} diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Adv3.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Adv3.java new file mode 100644 index 0000000..f7576b4 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Adv3.java @@ -0,0 +1,69 @@ +package com.realnet.basicp1.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + + + + + + + + + + + + + + @Entity + @Data + public class Adv3 extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +private int age_1; + +private int age2; + +private String calculated_add; + +private String calculated_sub; + +private String calculated_mul; + +private String calculated_div; + +private String contry; +private String contryidentifier; + +private String state; + + + + + +private String distric; + + + + + + +} diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Child.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Child.java new file mode 100644 index 0000000..23f003d --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Child.java @@ -0,0 +1,33 @@ +package com.realnet.basicp1.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + @Entity + @Data + public class Child extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +@Column(length = 2000) +private String description; + +private Boolean active; + + +} diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Contry.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Contry.java new file mode 100644 index 0000000..cc68b5f --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Contry.java @@ -0,0 +1,33 @@ +package com.realnet.basicp1.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + @Entity + @Data + public class Contry extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +@Column(length = 2000) +private String description; + +private Boolean active; + + +} diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Contry_ListFilter1.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Contry_ListFilter1.java new file mode 100644 index 0000000..f23dd59 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Contry_ListFilter1.java @@ -0,0 +1,15 @@ +package com.realnet.basicp1.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Data + public class Contry_ListFilter1 { + + private Integer id; + + + private String name; + private String description; +} diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Distric.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Distric.java new file mode 100644 index 0000000..ce57d03 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Distric.java @@ -0,0 +1,37 @@ +package com.realnet.basicp1.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + + @Entity + @Data + public class Distric extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String distric_name; + +@Column(length = 2000) +private String description; + +private Boolean active; + +private String state_name; + + +} diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Distric_ListFilter1.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Distric_ListFilter1.java new file mode 100644 index 0000000..9fe6c18 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Distric_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 Distric_ListFilter1 { + + private Integer id; + + + private String distric_name; +} diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/State.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/State.java new file mode 100644 index 0000000..d9bc0be --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/State.java @@ -0,0 +1,37 @@ +package com.realnet.basicp1.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + + @Entity + @Data + public class State extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String state_name; + +@Column(length = 2000) +private String description; + +private Boolean active; + +private String contry_name; + + +} diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/State_ListFilter1.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/State_ListFilter1.java new file mode 100644 index 0000000..9dfb100 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/State_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 State_ListFilter1 { + + private Integer id; + + + private String state_name; +} diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Support.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Support.java new file mode 100644 index 0000000..3b97b9c --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Support.java @@ -0,0 +1,29 @@ +package com.realnet.basicp1.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + @Entity + @Data + public class Support extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String name; + +@Column(length = 2000) +private String description; + + +} diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Test_a.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Test_a.java new file mode 100644 index 0000000..f9a43f3 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Test_a.java @@ -0,0 +1,90 @@ +package com.realnet.basicp1.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @Entity + @Data + public class Test_a extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String text_field; + +private int number_field; + + private String phone_number; + + +@Column(length = 2000) +private String paragraph_field; + +private String password_field; +@Transient +private String confirmpassword_field; + +@Column(length = 2000) +private String textarea; + +private String date_field; + +private String datetime_field; + +private String email_field; + +private Boolean toggle_switch; + +private String url_field; + + private double decimal_field; + +private int percentage_field; + +private String recaptcha; + +private String documentsequence; + + private Long user_id; + private String user_name; + + +} diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/Adv1Repository.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/Adv1Repository.java new file mode 100644 index 0000000..0b738c5 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/Adv1Repository.java @@ -0,0 +1,52 @@ +package com.realnet.basicp1.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +import com.realnet.basicp1.Entity.Adv1; + +@Repository +public interface Adv1Repository extends JpaRepository { + +@Query(value = "select * from adv1 where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from adv1 where created_by=?1", nativeQuery = true) + Page findAll( Long creayedBy,Pageable page); +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/Adv2sRepository.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/Adv2sRepository.java new file mode 100644 index 0000000..4802fb9 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/Adv2sRepository.java @@ -0,0 +1,40 @@ +package com.realnet.basicp1.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + + + + + + + + + + + + + + + +import com.realnet.basicp1.Entity.Adv2s; + +@Repository +public interface Adv2sRepository extends JpaRepository { + +@Query(value = "select * from adv2s where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from adv2s where created_by=?1", nativeQuery = true) + Page findAll( Long creayedBy,Pageable page); +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/Adv3Repository.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/Adv3Repository.java new file mode 100644 index 0000000..da7e2c7 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/Adv3Repository.java @@ -0,0 +1,44 @@ +package com.realnet.basicp1.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + + + + + + + + + + + + + + + + + + + +import com.realnet.basicp1.Entity.Adv3; + +@Repository +public interface Adv3Repository extends JpaRepository { + +@Query(value = "select * from adv3 where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from adv3 where created_by=?1", nativeQuery = true) + Page findAll( Long creayedBy,Pageable page); +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/ChildRepository.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/ChildRepository.java new file mode 100644 index 0000000..e0a7a70 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/ChildRepository.java @@ -0,0 +1,30 @@ +package com.realnet.basicp1.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + + + + + +import com.realnet.basicp1.Entity.Child; + +@Repository +public interface ChildRepository extends JpaRepository { + +@Query(value = "select * from child where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from child where created_by=?1", nativeQuery = true) + Page findAll( Long creayedBy,Pageable page); +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/ContryRepository.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/ContryRepository.java new file mode 100644 index 0000000..926b630 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/ContryRepository.java @@ -0,0 +1,30 @@ +package com.realnet.basicp1.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + + + + + +import com.realnet.basicp1.Entity.Contry; + +@Repository +public interface ContryRepository extends JpaRepository { + +@Query(value = "select * from contry where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from contry where created_by=?1", nativeQuery = true) + Page findAll( Long creayedBy,Pageable page); +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/DistricRepository.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/DistricRepository.java new file mode 100644 index 0000000..824204f --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/DistricRepository.java @@ -0,0 +1,32 @@ +package com.realnet.basicp1.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + + + + + + + +import com.realnet.basicp1.Entity.Distric; + +@Repository +public interface DistricRepository extends JpaRepository { + +@Query(value = "select * from distric where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from distric where created_by=?1", nativeQuery = true) + Page findAll( Long creayedBy,Pageable page); +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/StateRepository.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/StateRepository.java new file mode 100644 index 0000000..8383b13 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/StateRepository.java @@ -0,0 +1,32 @@ +package com.realnet.basicp1.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + + + + + + + +import com.realnet.basicp1.Entity.State; + +@Repository +public interface StateRepository extends JpaRepository { + +@Query(value = "select * from state where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from state where created_by=?1", nativeQuery = true) + Page findAll( Long creayedBy,Pageable page); +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/SupportRepository.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/SupportRepository.java new file mode 100644 index 0000000..f818f63 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/SupportRepository.java @@ -0,0 +1,28 @@ +package com.realnet.basicp1.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + + + +import com.realnet.basicp1.Entity.Support; + +@Repository +public interface SupportRepository extends JpaRepository { + +@Query(value = "select * from support where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from support where created_by=?1", nativeQuery = true) + Page findAll( Long creayedBy,Pageable page); +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/Test_aRepository.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/Test_aRepository.java new file mode 100644 index 0000000..069a013 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/Test_aRepository.java @@ -0,0 +1,56 @@ +package com.realnet.basicp1.Repository; + + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; + +import org.springframework.stereotype.Repository; +import java.util.*; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +import com.realnet.basicp1.Entity.Test_a; + +@Repository +public interface Test_aRepository extends JpaRepository { + +@Query(value = "select * from test_a where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from test_a where created_by=?1", nativeQuery = true) + Page findAll( Long creayedBy,Pageable page); +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Adv1Service.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Adv1Service.java new file mode 100644 index 0000000..13ba0a4 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Adv1Service.java @@ -0,0 +1,243 @@ +package com.realnet.basicp1.Services; +import com.realnet.basicp1.Repository.Adv1Repository; +import com.realnet.basicp1.Entity.Adv1 +;import java.util.*; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +import com.realnet.realm.Services.RealmService; +import org.springframework.data.domain.Pageable; +import org.springframework.http.*; +import com.realnet.users.service1.AppUserServiceImpl; +import com.realnet.users.entity1.AppUser; + + + + + + + + + + + + + + + + + + + + + + + + +import com.realnet.config.EmailService; + + + + + import org.springframework.stereotype.Service; + +@Service + public class Adv1Service { +@Autowired +private Adv1Repository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + + + + + + + + + + + + + + + + + + + +@Autowired + private EmailService emailServicestatic; + + + +public Adv1 Savedata(Adv1 data) { + + + + + + + + + + + + + + + + + + + + + + + + + + + +try + { + + // emailServicestatic.sendEmail( getUser().getEmail(),"Adv1", "test"); + emailServicestatic.sendEmailViaSetu(getUser().getEmail(),"test","","ganesh"); + +} catch (Exception e) { + // TODO: handle exception + System.out.println("Got error During Mail Send " + e); + } + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Adv1 save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll( getUser().getUserId(),page); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Adv1 getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Adv1 update(Adv1 data,Integer id) { + Adv1 old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setGender(data.getGender()); + + + +old.setJava(data.getJava()); + + + +old.setTesting(data.getTesting()); + + + +old.setSelenium(data.getSelenium()); + + + + + + + + + + + + + +old.setCurrency(data.getCurrency()); + +old.setQrcode_field(data.getQrcode_field()); + +old.setBarcode_field(data.getBarcode_field()); + + + + + +old.setName(data.getName()); + + + +old.setLast_name(data.getLast_name()); + + + + + + + + +final Adv1 test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Adv2sService.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Adv2sService.java new file mode 100644 index 0000000..ba49faa --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Adv2sService.java @@ -0,0 +1,207 @@ +package com.realnet.basicp1.Services; +import com.realnet.basicp1.Repository.Adv2sRepository; +import com.realnet.basicp1.Entity.Adv2s +;import java.util.*; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +import com.realnet.realm.Services.RealmService; +import org.springframework.data.domain.Pageable; +import org.springframework.http.*; +import com.realnet.users.service1.AppUserServiceImpl; +import com.realnet.users.entity1.AppUser; + + + + + + +import com.realnet.basicp1.Entity.Contry; +import com.realnet.basicp1.Services.ContryService; + + + + + +import com.realnet.basicp1.Entity.Contry; +import com.realnet.basicp1.Services.ContryService; + + + + + +import com.realnet.config.EmailService; + + + import org.springframework.stereotype.Service; + +@Service + public class Adv2sService { +@Autowired +private Adv2sRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + +@Autowired + private ContryService dyan_selserv; + + + +@Autowired + private ContryService autocserv; + + + +@Autowired + private EmailService emailServicedynamic; + +public Adv2s Savedata(Adv2s data) { + + + + + + + + +if (data.getDyan_sel() != null) { + try { + int dyan_selId = Integer.valueOf(data.getDyan_sel()); +Contry get = dyan_selserv.getdetailsbyId(dyan_selId); + if (get != null) { + + data.setDyan_selidentifier(get.getName()); +} +} catch (NumberFormatException e) { + System.out.println(" dyan_selId is not integer.."); + // Invalid integer string — ignore or log +data.setDyan_selidentifier(data.getDyan_sel()); + } + + } + + + + + + + + +if (data.getAutoc() != null) { + try { + int autocId = Integer.valueOf(data.getAutoc()); +Contry get = autocserv.getdetailsbyId(autocId); + if (get != null) { + + data.setAutocidentifier(get.getName()); +} +} catch (NumberFormatException e) { + System.out.println(" autocId is not integer.."); + // Invalid integer string — ignore or log +data.setAutocidentifier(data.getAutoc()); + + } + + } + + + + + + + + + +try + { + + // emailServicedynamic.sendEmail( "gaurav_dekatc_com","Adv2s", "testing"); + emailServicedynamic.sendEmailViaSetu( "gaurav_dekatc_com","testing","","ganesh"); + +} catch (Exception e) { + // TODO: handle exception + System.out.println("Got error During Mail Send " + e); + } + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Adv2s save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll( getUser().getUserId(),page); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Adv2s getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Adv2s update(Adv2s data,Integer id) { + Adv2s old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setSta_select(data.getSta_select()); + +old.setStat_mulsel(data.getStat_mulsel()); + +old.setDyan_sel(data.getDyan_sel()); + +old.setDyna_mul(data.getDyna_mul()); + +old.setAutoc(data.getAutoc()); + +old.setAuto_mul(data.getAuto_mul()); + + + +final Adv2s test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + + + + + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Adv3Service.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Adv3Service.java new file mode 100644 index 0000000..ee8c2f4 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Adv3Service.java @@ -0,0 +1,192 @@ +package com.realnet.basicp1.Services; +import com.realnet.basicp1.Repository.Adv3Repository; +import com.realnet.basicp1.Entity.Adv3 +;import java.util.*; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +import com.realnet.realm.Services.RealmService; +import org.springframework.data.domain.Pageable; +import org.springframework.http.*; +import com.realnet.users.service1.AppUserServiceImpl; +import com.realnet.users.entity1.AppUser; + + + + + + + + + + + + + + +import com.realnet.basicp1.Entity.Contry; +import com.realnet.basicp1.Services.ContryService; + + + + + + + + import org.springframework.stereotype.Service; + +@Service + public class Adv3Service { +@Autowired +private Adv3Repository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + + + + + + + + + +@Autowired + private ContryService contryserv; + + + + + +public Adv3 Savedata(Adv3 data) { + + + + + + + + + + + + + + + + +if (data.getContry() != null) { + try { + int contryId = Integer.valueOf(data.getContry()); +Contry get = contryserv.getdetailsbyId(contryId); + if (get != null) { + + data.setContryidentifier(get.getName()); +} +} catch (NumberFormatException e) { + System.out.println(" contryId is not integer.."); + // Invalid integer string — ignore or log +data.setContryidentifier(data.getContry()); + } + + } + + + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Adv3 save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll( getUser().getUserId(),page); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Adv3 getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Adv3 update(Adv3 data,Integer id) { + Adv3 old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setAge_1(data.getAge_1()); + +old.setAge2(data.getAge2()); + +old.setCalculated_add(data.getCalculated_add()); + +old.setCalculated_sub(data.getCalculated_sub()); + +old.setCalculated_mul(data.getCalculated_mul()); + +old.setCalculated_div(data.getCalculated_div()); + +old.setContry(data.getContry()); + +old.setState(data.getState()); + + + + +old.setDistric(data.getDistric()); + + + + +final Adv3 test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + + + + + + + + + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/ChildService.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/ChildService.java new file mode 100644 index 0000000..39aad4b --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/ChildService.java @@ -0,0 +1,93 @@ +package com.realnet.basicp1.Services; +import com.realnet.basicp1.Repository.ChildRepository; +import com.realnet.basicp1.Entity.Child +;import java.util.*; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +import com.realnet.realm.Services.RealmService; +import org.springframework.data.domain.Pageable; +import org.springframework.http.*; +import com.realnet.users.service1.AppUserServiceImpl; +import com.realnet.users.entity1.AppUser; + + + + + + + import org.springframework.stereotype.Service; + +@Service + public class ChildService { +@Autowired +private ChildRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + +public Child Savedata(Child data) { + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Child save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll( getUser().getUserId(),page); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Child getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Child update(Child data,Integer id) { + Child old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setDescription(data.getDescription()); + +old.setActive (data.getActive()); + +final Child test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/ContryService.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/ContryService.java new file mode 100644 index 0000000..c21323b --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/ContryService.java @@ -0,0 +1,93 @@ +package com.realnet.basicp1.Services; +import com.realnet.basicp1.Repository.ContryRepository; +import com.realnet.basicp1.Entity.Contry +;import java.util.*; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +import com.realnet.realm.Services.RealmService; +import org.springframework.data.domain.Pageable; +import org.springframework.http.*; +import com.realnet.users.service1.AppUserServiceImpl; +import com.realnet.users.entity1.AppUser; + + + + + + + import org.springframework.stereotype.Service; + +@Service + public class ContryService { +@Autowired +private ContryRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + +public Contry Savedata(Contry data) { + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Contry save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll( getUser().getUserId(),page); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Contry getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Contry update(Contry data,Integer id) { + Contry old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setDescription(data.getDescription()); + +old.setActive (data.getActive()); + +final Contry test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Contry_ListFilter1Service.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Contry_ListFilter1Service.java new file mode 100644 index 0000000..43cbe5e --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Contry_ListFilter1Service.java @@ -0,0 +1,53 @@ +package com.realnet.basicp1.Services; +import java.util.*; +import com.realnet.basicp1.Repository.ContryRepository; +import com.realnet.basicp1.Entity.Contry; + +import com.realnet.basicp1.Entity.Contry_ListFilter1; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class Contry_ListFilter1Service { +@Autowired +private ContryRepository Repository; + + + + + public List getlistbuilder() { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Contry data : list) { +Boolean isActive = data.getActive(); + + if (Boolean.TRUE.equals(isActive)) {{ +Contry_ListFilter1 dummy = new Contry_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + dummy.setDescription(data.getDescription()); + l.add(dummy); +}} +} +return l;} + + + + public List getlistbuilderparam( ) { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Contry data : list) { +Boolean isActive = data.getActive(); + + if (Boolean.TRUE.equals(isActive)) {{ +Contry_ListFilter1 dummy = new Contry_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + dummy.setDescription(data.getDescription()); + l.add(dummy); +}} +} +return l;} +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/DistricService.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/DistricService.java new file mode 100644 index 0000000..f969a8f --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/DistricService.java @@ -0,0 +1,103 @@ +package com.realnet.basicp1.Services; +import com.realnet.basicp1.Repository.DistricRepository; +import com.realnet.basicp1.Entity.Distric +;import java.util.*; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +import com.realnet.realm.Services.RealmService; +import org.springframework.data.domain.Pageable; +import org.springframework.http.*; +import com.realnet.users.service1.AppUserServiceImpl; +import com.realnet.users.entity1.AppUser; + + + + + + + + + import org.springframework.stereotype.Service; + +@Service + public class DistricService { +@Autowired +private DistricRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + + + +public Distric Savedata(Distric data) { + + + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Distric save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll( getUser().getUserId(),page); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Distric getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Distric update(Distric data,Integer id) { + Distric old = Repository.findById(id).get(); +old.setDistric_name(data.getDistric_name()); + +old.setDescription(data.getDescription()); + +old.setActive (data.getActive()); + +old.setState_name(data.getState_name()); + +final Distric test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Distric_ListFilter1Service.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Distric_ListFilter1Service.java new file mode 100644 index 0000000..8a8566a --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Distric_ListFilter1Service.java @@ -0,0 +1,57 @@ +package com.realnet.basicp1.Services; +import java.util.*; +import com.realnet.basicp1.Repository.DistricRepository; +import com.realnet.basicp1.Entity.Distric; + +import com.realnet.basicp1.Entity.Distric_ListFilter1; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class Distric_ListFilter1Service { +@Autowired +private DistricRepository Repository; + + + + + public List getlistbuilder() { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Distric data : list) { +Boolean isActive = data.getActive(); + + if (Boolean.TRUE.equals(isActive)) {String State_name = data.getState_name(); + System.out.println(State_name + "\n"); + + if ("item".equals(State_name)){ +Distric_ListFilter1 dummy = new Distric_ListFilter1(); + dummy.setId(data.getId()); + dummy.setDistric_name(data.getDistric_name()); + l.add(dummy); +}} +} +return l;} + + + + public List getlistbuilderparam( String item) { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Distric data : list) { +Boolean isActive = data.getActive(); + + if (Boolean.TRUE.equals(isActive)) {String State_name = data.getState_name(); + System.out.println(State_name + "\n"); + + if (item.equals(State_name)){ +Distric_ListFilter1 dummy = new Distric_ListFilter1(); + dummy.setId(data.getId()); + dummy.setDistric_name(data.getDistric_name()); + l.add(dummy); +}} +} +return l;} +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/StateService.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/StateService.java new file mode 100644 index 0000000..a0142de --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/StateService.java @@ -0,0 +1,103 @@ +package com.realnet.basicp1.Services; +import com.realnet.basicp1.Repository.StateRepository; +import com.realnet.basicp1.Entity.State +;import java.util.*; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +import com.realnet.realm.Services.RealmService; +import org.springframework.data.domain.Pageable; +import org.springframework.http.*; +import com.realnet.users.service1.AppUserServiceImpl; +import com.realnet.users.entity1.AppUser; + + + + + + + + + import org.springframework.stereotype.Service; + +@Service + public class StateService { +@Autowired +private StateRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + + + +public State Savedata(State data) { + + + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +State save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll( getUser().getUserId(),page); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public State getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public State update(State data,Integer id) { + State old = Repository.findById(id).get(); +old.setState_name(data.getState_name()); + +old.setDescription(data.getDescription()); + +old.setActive (data.getActive()); + +old.setContry_name(data.getContry_name()); + +final State test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/State_ListFilter1Service.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/State_ListFilter1Service.java new file mode 100644 index 0000000..28df7fc --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/State_ListFilter1Service.java @@ -0,0 +1,57 @@ +package com.realnet.basicp1.Services; +import java.util.*; +import com.realnet.basicp1.Repository.StateRepository; +import com.realnet.basicp1.Entity.State; + +import com.realnet.basicp1.Entity.State_ListFilter1; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class State_ListFilter1Service { +@Autowired +private StateRepository Repository; + + + + + public List getlistbuilder() { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (State data : list) { +Boolean isActive = data.getActive(); + + if (Boolean.TRUE.equals(isActive)) {String Contry_name = data.getContry_name(); + System.out.println(Contry_name + "\n"); + + if ("item".equals(Contry_name)){ +State_ListFilter1 dummy = new State_ListFilter1(); + dummy.setId(data.getId()); + dummy.setState_name(data.getState_name()); + l.add(dummy); +}} +} +return l;} + + + + public List getlistbuilderparam( String item) { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (State data : list) { +Boolean isActive = data.getActive(); + + if (Boolean.TRUE.equals(isActive)) {String Contry_name = data.getContry_name(); + System.out.println(Contry_name + "\n"); + + if (item.equals(Contry_name)){ +State_ListFilter1 dummy = new State_ListFilter1(); + dummy.setId(data.getId()); + dummy.setState_name(data.getState_name()); + l.add(dummy); +}} +} +return l;} +} \ No newline at end of file diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/SupportService.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/SupportService.java new file mode 100644 index 0000000..3f5d5c6 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/SupportService.java @@ -0,0 +1,83 @@ +package com.realnet.basicp1.Services; +import com.realnet.basicp1.Repository.SupportRepository; +import com.realnet.basicp1.Entity.Support +;import java.util.*; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +import com.realnet.realm.Services.RealmService; +import org.springframework.data.domain.Pageable; +import org.springframework.http.*; +import com.realnet.users.service1.AppUserServiceImpl; +import com.realnet.users.entity1.AppUser; + + + + + import org.springframework.stereotype.Service; + +@Service + public class SupportService { +@Autowired +private SupportRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + +public Support Savedata(Support data) { + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Support save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll( getUser().getUserId(),page); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Support getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Support update(Support data,Integer id) { + Support old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setDescription(data.getDescription()); + +final Support test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Test_aService.java b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Test_aService.java new file mode 100644 index 0000000..ea0ad34 --- /dev/null +++ b/test9april-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/Test_aService.java @@ -0,0 +1,225 @@ +package com.realnet.basicp1.Services; +import com.realnet.basicp1.Repository.Test_aRepository; +import com.realnet.basicp1.Entity.Test_a +;import java.util.*; + +import org.springframework.beans.factory.annotation.Autowired; +import com.realnet.SequenceGenerator.Service.SequenceService; +import org.springframework.data.domain.Page; +import com.realnet.realm.Entity.Realm; +import com.realnet.realm.Services.RealmService; +import org.springframework.data.domain.Pageable; +import org.springframework.http.*; +import com.realnet.users.service1.AppUserServiceImpl; +import com.realnet.users.entity1.AppUser; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + import org.springframework.stereotype.Service; + +@Service + public class Test_aService { +@Autowired +private Test_aRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + + + + + + + + + + + + + + + + + + + + + + + +@Autowired + private SequenceService documentsequencesequenceService; + + + +public Test_a Savedata(Test_a data) { + + + + + + + + + + + + + + + + + + + + + + + + + + + + +data.setDocumentsequence (documentsequencesequenceService.GenerateSequence("nn")); + +data.setUser_id(getUser().getUserId()); + data.setUser_name(getUser().getFullName()); + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Test_a save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll( getUser().getUserId(),page); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Test_a getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Test_a update(Test_a data,Integer id) { + Test_a old = Repository.findById(id).get(); +old.setText_field(data.getText_field()); + +old.setNumber_field(data.getNumber_field()); + +old.setPhone_number(data.getPhone_number()); + +old.setParagraph_field(data.getParagraph_field()); + +old.setPassword_field(data.getPassword_field()); + +old.setTextarea(data.getTextarea()); + +old.setDate_field(data.getDate_field()); + +old.setDatetime_field(data.getDatetime_field()); + +old.setEmail_field(data.getEmail_field()); + +old.setToggle_switch (data.getToggle_switch()); + +old.setUrl_field(data.getUrl_field()); + +old.setDecimal_field(data.getDecimal_field()); + +old.setPercentage_field(data.getPercentage_field()); + +old.setRecaptcha(data.getRecaptcha()); + +old.setDocumentsequence(data.getDocumentsequence()); + + + +final Test_a test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/test9april-dbb-d/authsec_mysql/mysql/wf_table/wf_table.sql b/test9april-dbb-d/authsec_mysql/mysql/wf_table/wf_table.sql new file mode 100755 index 0000000..d9daa45 --- /dev/null +++ b/test9april-dbb-d/authsec_mysql/mysql/wf_table/wf_table.sql @@ -0,0 +1,18 @@ +CREATE TABLE dbb.Test_a(id BIGINT NOT NULL AUTO_INCREMENT, toggle_switch VARCHAR(400), number_field int, text_field VARCHAR(400), datetime_field VARCHAR(400), percentage_field int, phone_number VARCHAR(400), email_field VARCHAR(400), url_field VARCHAR(400), paragraph_field VARCHAR(400), textarea VARCHAR(400), recaptcha VARCHAR(400), userid_field VARCHAR(400), password_field VARCHAR(400), date_field Date, decimal_field double, documentsequence VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE dbb.Distric(id BIGINT NOT NULL AUTO_INCREMENT, distric_name VARCHAR(400), active VARCHAR(400), description VARCHAR(400), state_name VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE dbb.Contry(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), description VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE dbb.State(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), description VARCHAR(400), state_name VARCHAR(400), contry_name VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE dbb.Child(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), description VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE dbb.Adv1(id BIGINT NOT NULL AUTO_INCREMENT, video_field VARCHAR(400), gender VARCHAR(400), testing bit(1), qrcode_field VARCHAR(400), last_name VARCHAR(400), fileupload_field VARCHAR(400), value_list_field VARCHAR(400), datagrid_field VARCHAR(400), name VARCHAR(400), java bit(1), selenium bit(1), currency VARCHAR(400), name VARCHAR(400), imageupload_field VARCHAR(400), audio_field VARCHAR(400), static VARCHAR(400), barcode_field VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE dbb.Adv2s(id BIGINT NOT NULL AUTO_INCREMENT, auto_mul VARCHAR(400), dynamic VARCHAR(400), dyan_sel int, autoc int, sta_select VARCHAR(400), stat_mulsel VARCHAR(400), dyna_mul VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE dbb.Support(id BIGINT NOT NULL AUTO_INCREMENT, description VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE dbb.Adv3(id BIGINT NOT NULL AUTO_INCREMENT, distric VARCHAR(400), age_1 int, calculated_sub VARCHAR(400), contry int, calculated_add VARCHAR(400), calculated_div VARCHAR(400), calculated_mul VARCHAR(400), state VARCHAR(400), age2 int, name VARCHAR(400), PRIMARY KEY (id)); + diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv1/Adv1.component.html b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv1/Adv1.component.html new file mode 100644 index 0000000..883a3fe --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv1/Adv1.component.html @@ -0,0 +1,1168 @@ + +
+
+
+

Adv1

+
+
+ + + +
+ + + + Loading ... + +
{{error}}
+
+ + Name + + + + gender + + + + + + java + + + + + testing + + + + + selenium + + + + + + + + + + + + + + + Currency + + + + QRCode Field + + + + BarCode Field + + + + + + + + name + + + + + last_name + + + + + + + + + + + + + Action + + + + + +{{user.name }} + + +{{user.gender }} + + + + +{{user.java}} + + + +{{user.testing}} + + + +{{user.selenium}} + + + + + + + + + + + + + +{{user.currency }} + + +{{user.qrcode_field }} + + +{{user.barcode_field }} + + + + + + +{{user. name}} + + + +{{user. last_name}} + + + + + + + + + + + + + + +
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 + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{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
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv1/Adv1.component.scss b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv1/Adv1.component.scss new file mode 100644 index 0000000..12f7fc8 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv1/Adv1.component.scss @@ -0,0 +1,85 @@ +//@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; +} +.universal-section-header { + margin: 24px 0 10px 0; + font-weight: 600; + color: #1a237e; + letter-spacing: 0.5px; + font-size: 1.25rem; +} \ No newline at end of file diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv1/Adv1.component.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv1/Adv1.component.ts new file mode 100644 index 0000000..4f6833f --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv1/Adv1.component.ts @@ -0,0 +1,864 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Adv1service} from './Adv1.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 { Adv1cardvariable } from './Adv1_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Adv1', + templateUrl: './Adv1.component.html', + styleUrls: ['./Adv1.component.scss'] +}) +export class Adv1Component implements OnInit { + cardButton = Adv1cardvariable.cardButton; + cardmodeldata = Adv1cardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Adv1cardvariable.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 = 'Adv1_formCode' +tableName = 'Adv1'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Adv1service, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + ) { } + private editInterval: any; +// 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], + +gender : [null], + + + +java:[false], + + + +testing:[false], + + + +selenium:[false], + + + + + + + + + + + +currency : [null, { updateOn: 'blur' }], + +qrcode_field : [null], + +barcode_field : [null], + + + + + +name:[null], + + + +last_name:[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 === "Adv1_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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + } + ngOnDestroy(): void { + if (this.editInterval) { + clearInterval(this.editInterval); + } + } + + + + + + + +FileDataImageupload_field: any[]; + selectedImageupload_field: any[]; + +FileDataAudio_field: any[]; + selectedAudio_field: any[]; + +FileDataVideo_field: any[]; + selectedVideo_field: any[]; + + + + + + + + + + + + + + + + + error; + getData() { + this.mainService.getAll().subscribe((data) => { + console.log(data); + this.product = data; +this.product = [...this.product].reverse(); 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.selectedfileupload_field = []; + this.mainService.uploadfilegetByIdfileupload_field(row.id,this.tableName).subscribe(uploaddata =>{ + console.log(uploaddata); + this.FileDatafileupload_field = uploaddata; + + }) + + this.selectedimageupload_field = []; + this.mainService.uploadImageupload_fieldgetById(row.id,this.tableName).subscribe(uploaddata =>{ + console.log(uploaddata); + this.FileDataimageupload_field = uploaddata; + + }) + + this.selectedaudio_field = []; + this.mainService.uploadAudio_fieldgetById(row.id,this.tableName).subscribe(uploaddata =>{ + console.log(uploaddata); + this.FileDataaudio_field = uploaddata; + + }) + + this.selectedvideo_field = []; + this.mainService.uploadVideo_fieldgetById(row.id,this.tableName).subscribe(uploaddata =>{ + console.log(uploaddata); + this.FileDatavideo_field = uploaddata; + + }) + + + + + + // bar code field start + setTimeout(function(){ + JsBarcode("#barcodebarcode_field", row?.barcode_field); + }, 500); + // bar code field start + + + + + + + + + + + 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); + + + + + + +for (let i = 0; i < this.selectedfileupload_field.length; i++){ + + this.mainService.uploadfilefileupload_field(data.id,this.tableName,this.selectedfileupload_field[i]).subscribe(uploaddata =>{ + console.log(uploaddata); + }) +} + +for (let i = 0; i < this.selectedimageupload_field.length; i++){ + + this.mainService.uploadImageupload_field(data.id,this.tableName,this.selectedimageupload_field[i]).subscribe(uploaddata =>{ + console.log(uploaddata); + }) +} + +for (let i = 0; i < this.selectedaudio_field.length; i++){ + + this.mainService.uploadAudio_field(data.id,this.tableName,this.selectedaudio_field[i]).subscribe(uploaddata =>{ + console.log(uploaddata); + }) +} + +for (let i = 0; i < this.selectedvideo_field.length; i++){ + + this.mainService.uploadVideo_field(data.id,this.tableName,this.selectedvideo_field[i]).subscribe(uploaddata =>{ + console.log(uploaddata); + }) +} + + + + + + + + + + + + + + + + }, (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); + + + + + +for (let i = 0; i < this.selectedfileupload_field.length; i++){ + + this.mainService.uploadfilefileupload_field(data.id,this.tableName,this.selectedfileupload_field[i]).subscribe(uploaddata =>{ + console.log(uploaddata); + }) +} + +for (let i = 0; i < this.selectedimageupload_field.length; i++){ + + this.mainService.uploadImageupload_field(data.id,this.tableName,this.selectedimageupload_field[i]).subscribe(uploaddata =>{ + console.log(uploaddata); + }) +} + +for (let i = 0; i < this.selectedaudio_field.length; i++){ + + this.mainService.uploadAudio_field(data.id,this.tableName,this.selectedaudio_field[i]).subscribe(uploaddata =>{ + console.log(uploaddata); + }) +} + +for (let i = 0; i < this.selectedvideo_field.length; i++){ + + this.mainService.uploadVideo_field(data.id,this.tableName,this.selectedvideo_field[i]).subscribe(uploaddata =>{ + console.log(uploaddata); + }) +} + + + + + + + + + + + + + + + + + }, (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; + + + + + +this.FileDatafileupload_field = []; +this.selectedfileupload_field =[]; + +this.FileDataImageupload_field = []; +this.selectedImageupload_field =[]; + +this.FileDataAudio_field = []; +this.selectedAudio_field =[]; + +this.FileDataVideo_field = []; +this.selectedVideo_field =[]; + + + + + + + + + + + + + + this.getdatagrid_fieldData(); + + + } + submitted = false; +onSubmit() { + console.log(this.entryForm.value); + this.submitted = true; + if (this.entryForm.invalid) { + return; + }this.onCreate(); + +} + + +updategender (gender : string): void { + this.entryForm.get('gender').setValue(gender); } + +updategenderEdit(gender : string): void { this.rowSelected.gender = gender } + ; + + + +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); + }) + } + } + +filePreviewimageupload_field: string | ArrayBuffer | null = null; +FileDataimageupload_field: {uploadedfile_name?:any, filePreview: string | ArrayBuffer | null }[] = []; // Initialize the array +selectedimageupload_field: File[]=[]; +public onFileChangedimageupload_field(event, index) { + const files = event.target.files; + for (let i = 0; i < files.length; i++) { + const file = files[i]; + this.FileDataimageupload_field[index].uploadedfile_name = files[i].name; + this.selectedimageupload_field.push(files[i]); + if (file.type.startsWith('image/')) { + const reader = new FileReader(); + reader.onload = (e) => { + // Set the file preview source + const filePreview = e.target?.result as string; + this.FileDataimageupload_field[index] = { + ...this.FileDataimageupload_field[index], // Preserve existing properties + filePreview: filePreview // Update only the filePreview property + }; + }; + reader.readAsDataURL(file); + } + } +} + onAddLinesimageupload_field(){ + this.FileDataimageupload_field.push({ + uploadedfile_name: "", + filePreview: "", + // f3: "", + }); + } + deleteRowimageupload_field(index,id) { + this.FileDataimageupload_field.splice(index, 1); + + if(id){ + this.mainService.uploadImageupload_fielddelete(id).subscribe(data =>{ + console.log(data); + }) + } + } + +filePreviewaudio_field: string | ArrayBuffer | null = null; +FileDataaudio_field: {uploadedfile_name?:any, filePreview: string | ArrayBuffer | null }[] = []; // Initialize the array +selectedaudio_field: File[]=[]; +public onFileChangedaudio_field(event, index) { + const files = event.target.files; + for (let i = 0; i < files.length; i++) { + const file = files[i]; + this.FileDataaudio_field[index].uploadedfile_name = files[i].name; + this.selectedaudio_field.push(files[i]); + if (file.type.startsWith('audio/')) { + const reader = new FileReader(); + reader.onload = (e) => { + // Set the file preview source + const filePreview = e.target?.result as string; + this.FileDataaudio_field[index] = { + ...this.FileDataaudio_field[index], // Preserve existing properties + filePreview: filePreview // Update only the filePreview property + }; + }; + reader.readAsDataURL(file); + } + } +} + onAddLinesaudio_field(){ + this.FileDataaudio_field.push({ + uploadedfile_name: "", + filePreview: "", + // f3: "", + }); + } + deleteRowaudio_field(index,id) { + this.FileDataaudio_field.splice(index, 1); + + if(id){ + this.mainService.uploadAudio_fielddelete(id).subscribe(data =>{ + console.log(data); + }) + } + } + +filePreviewvideo_field: string | ArrayBuffer | null = null; +FileDatavideo_field: {uploadedfile_name?:any, filePreview: string | ArrayBuffer | null }[] = []; // Initialize the array +selectedvideo_field: File[]=[]; +public onFileChangedvideo_field(event, index) { + const files = event.target.files; + for (let i = 0; i < files.length; i++) { + const file = files[i]; + this.FileDatavideo_field[index].uploadedfile_name = files[i].name; + this.selectedvideo_field.push(files[i]); + if (file.type.startsWith('video/')) { + const reader = new FileReader(); + reader.onload = (e) => { + // Set the file preview source + const filePreview = e.target?.result as string; + this.FileDatavideo_field[index] = { + ...this.FileDatavideo_field[index], // Preserve existing properties + filePreview: filePreview // Update only the filePreview property + }; + }; + reader.readAsDataURL(file); + } + } +} + onAddLinesvideo_field(){ + this.FileDatavideo_field.push({ + uploadedfile_name: "", + filePreview: "", + // f3: "", + }); + } + deleteRowvideo_field(index,id) { + this.FileDatavideo_field.splice(index, 1); + + if(id){ + this.mainService.uploadVideo_fielddelete(id).subscribe(data =>{ + console.log(data); + }) + } + } + +//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 + +//Value List field start +value_list_fieldMode; +searchcusttextvalue_list_field :any; + valueListModalvalue_list_field :boolean=false; + openvalueListvalue_list_field(mode){ + this.valueListModalvalue_list_field=!this.valueListModalvalue_list_field ; + this.value_list_fieldMode = mode; } + customerdatavalue_list_field ; +value_list_fielderror; +clickedvalue_list_fieldID:number; + +getcustvalue_list_fieldID(id:number){ + this.clickedvalue_list_fieldID=id; + console.log("clicked by id"+ id); + this.mainService.getById(id).subscribe((data) => { console.log(data); + if(this.value_list_fieldMode == "ADD"){ + + + + this.entryForm.get('name').setValue(data.name); + + + + this.entryForm.get('currency').setValue(data.currency); + + + + }else if(this.value_list_fieldMode == "EDIT"){ + + + + this.rowSelected.name= data. name + + + + this.rowSelected.currency= data. currency + + + + } }); this.valueListModalvalue_list_field =false; + } //value List field end + + + + + +//datagrid datagrid_field filed start +productdatagrid_field; + rowsdatagrid_field :any[]; + getHeadersdatagrid_field () { + this.rowsdatagrid_field = this.productdatagrid_field; + let headers: string[] = []; + if(this.rowsdatagrid_field ) { +this.rowsdatagrid_field.forEach((value) => { + Object.keys(value).forEach((key) => { + if(!headers.find((header) => header == key)){ + headers.push(key) + } + }) + }) +} + + return headers; + } + //datagrid datagrid_field filed end + +getdatagrid_fieldData() { + this.mainService.getdatagrid_fieldAll().subscribe((data) => { + console.log(data); this.productdatagrid_field = data; + }); +} + +// updateaction +} + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv1/Adv1.service.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv1/Adv1.service.ts new file mode 100644 index 0000000..f77839d --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv1/Adv1.service.ts @@ -0,0 +1,116 @@ +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 Adv1service{ + private baseURL = "Adv1/Adv1" ; 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); + } + + + + + + + uploadfilefileupload_field(ref:any, Adv1:any, file:any): Observable{ + const formData = new FormData(); + formData.append('file', file); + return this.apiRequest.postFormData(`FileUpload/Uploadeddocs/${ref}/${Adv1}`, formData); + } + + uploadfilegetByIdfileupload_field(ref:any, Adv1:any,): Observable { + return this.apiRequest.get(`FileUpload/Uploadeddocs/${ref}/${Adv1}`); + } + + + uploadfiledeletefileupload_field(id: number): Observable { + return this.apiRequest.delete(`FileUpload/Uploadeddocs/${id}`); + } + + uploadImageupload_field(ref:any, Adv1:any, file:any): Observable{ + const formData = new FormData(); + formData.append('file', file); + return this.apiRequest.postFormData(`FileUpload/Uploadeddocs/${ref}/${Adv1}`, formData); + } + + uploadImageupload_fieldgetById(ref:any, Adv1:any,): Observable { + return this.apiRequest.get(`FileUpload/Uploadeddocs/${ref}/${Adv1}`); + } + + + uploadImageupload_fielddelete(id: number): Observable { + return this.apiRequest.delete(`FileUpload/Uploadeddocs/${id}`); + } + + uploadAudio_field(ref:any, Adv1:any, file:any): Observable{ + const formData = new FormData(); + formData.append('file', file); + return this.apiRequest.postFormData(`FileUpload/Uploadeddocs/${ref}/${Adv1}`, formData); + } + + uploadAudio_fieldgetById(ref:any, Adv1:any,): Observable { + return this.apiRequest.get(`FileUpload/Uploadeddocs/${ref}/${Adv1}`); + } + + + uploadAudio_fielddelete(id: number): Observable { + return this.apiRequest.delete(`FileUpload/Uploadeddocs/${id}`); + } + + uploadVideo_field(ref:any, Adv1:any, file:any): Observable{ + const formData = new FormData(); + formData.append('file', file); + return this.apiRequest.postFormData(`FileUpload/Uploadeddocs/${ref}/${Adv1}`, formData); + } + + uploadVideo_fieldgetById(ref:any, Adv1:any,): Observable { + return this.apiRequest.get(`FileUpload/Uploadeddocs/${ref}/${Adv1}`); + } + + + uploadVideo_fielddelete(id: number): Observable { + return this.apiRequest.delete(`FileUpload/Uploadeddocs/${id}`); + } + + + + + + + + + + + + + +getdatagrid_fieldAll(page?: number, size?: number): Observable { + return this.apiRequest.get("Contry_ListFilter1/Contry_ListFilter1"); + + } + +// updateaction +} \ No newline at end of file diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv1/Adv1_cardvariable.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv1/Adv1_cardvariable.ts new file mode 100644 index 0000000..8b2bd5c --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv1/Adv1_cardvariable.ts @@ -0,0 +1,4 @@ +export const Adv1cardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv2s/Adv2s.component.html b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv2s/Adv2s.component.html new file mode 100644 index 0000000..8e0d5ce --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv2s/Adv2s.component.html @@ -0,0 +1,671 @@ + +
+
+
+

Adv2s

+
+
+ + + +
+ + + + Loading ... + +
{{error}}
+
+ + Name + + + + sta select + + + + stat mulsel + + + + dyan sel + + + + dyna mul + + + + autoc + + + + auto mul + + + + + + + + Action + + + + + +{{user.name }} + + +{{user.sta_select }} + + +{{user.stat_mulsel }} + + +{{user.dyan_selidentifier}} + + +{{user. dyna_mul }} + + +{{user.autocidentifier}} + + +{{user. auto_mul }} + + + + + + + + + +
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 + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{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
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv2s/Adv2s.component.scss b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv2s/Adv2s.component.scss new file mode 100644 index 0000000..12f7fc8 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv2s/Adv2s.component.scss @@ -0,0 +1,85 @@ +//@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; +} +.universal-section-header { + margin: 24px 0 10px 0; + font-weight: 600; + color: #1a237e; + letter-spacing: 0.5px; + font-size: 1.25rem; +} \ No newline at end of file diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv2s/Adv2s.component.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv2s/Adv2s.component.ts new file mode 100644 index 0000000..37526d3 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv2s/Adv2s.component.ts @@ -0,0 +1,537 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Adv2sservice} from './Adv2s.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 { Adv2scardvariable } from './Adv2s_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Adv2s', + templateUrl: './Adv2s.component.html', + styleUrls: ['./Adv2s.component.scss'] +}) +export class Adv2sComponent implements OnInit { + cardButton = Adv2scardvariable.cardButton; + cardmodeldata = Adv2scardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Adv2scardvariable.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 = 'Adv2s_formCode' +tableName = 'Adv2s'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Adv2sservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + ) { } + private editInterval: any; +// 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], + +sta_select : [null], + +stat_mulsel : [null], + +dyan_sel : [null], + +dyna_mul : [null], + +autoc : [null], + +auto_mul : [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 === "Adv2s_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 + + + + + + +this.getalldyan_sel(); + + + + if (this.dyan_seldefault) { + // Listen for product changes to auto-fill description + + + + this.entryForm.get('dyan_sel')?.valueChanges.subscribe(name => { + if (name && this.selectdyan_sel) { + + const found = this.selectdyan_sel.find(p => p.name === name); + + + + console.log('found is ', found); + + // Auto-fill price when product is selected + if (found && found.default_field) { + this.entryForm.patchValue({ default_field: found.default_field_link }); + } else { + this.entryForm.patchValue({ default_field: null }); + } + + } + }); +} + +this.getalldyna_mul(); + +this.getallautoc(); + +this.getallauto_mul(); + + + + + } + ngOnDestroy(): void { + if (this.editInterval) { + clearInterval(this.editInterval); + } + } + + + + + + + + + + + + + + + + error; + getData() { + this.mainService.getAll().subscribe((data) => { + console.log(data); + this.product = data; +this.product = [...this.product].reverse(); 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.nodeEditPropertiesstat_mulsel.editselectedAttributesstat_mulsel = JSON.parse(this.rowSelected.stat_mulsel ); + + + +this.nodeEditPropertiesdyna_mul.editselectedAttributesdyna_mul = JSON.parse(this.rowSelected.dyna_mul ); + + + +this.nodeEditPropertiesauto_mul.editselectedAttributesauto_mul = JSON.parse(this.rowSelected.auto_mul ); + + + + + 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; + + + + +this.rowSelected.stat_mulsel = JSON.stringify(this.nodeEditPropertiesstat_mulsel.editselectedAttributesstat_mulsel ); + + + +this.rowSelected.dyna_mul = JSON.stringify(this.nodeEditPropertiesdyna_mul.editselectedAttributesdyna_mul ); + + + +this.rowSelected.auto_mul = JSON.stringify(this.nodeEditPropertiesauto_mul.editselectedAttributesauto_mul ); + + + + //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.entryForm.value.stat_mulsel = JSON.stringify(this.nodeEditPropertiesstat_mulsel.addselectedAttributesstat_mulsel ); + + + +this.entryForm.value.dyna_mul = JSON.stringify(this.nodeEditPropertiesdyna_mul.addselectedAttributesdyna_mul ); + + + +this.entryForm.value.auto_mul = JSON.stringify(this.nodeEditPropertiesauto_mul.addselectedAttributesauto_mul ); + + + + 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; + + + + + + + +this.nodeEditPropertiesdyna_mul.addselectedAttributesdyna_mul = "" + + + +this.nodeEditPropertiesauto_mul.addselectedAttributesauto_mul = "" + + + + + } + submitted = false; +onSubmit() { + console.log(this.entryForm.value); + this.submitted = true; + if (this.entryForm.invalid) { + return; + }this.onCreate(); + +} + + + + +nodeEditPropertiesstat_mulsel = { addselectedAttributesstat_mulsel :"", editselectedAttributesstat_mulsel :"" } + selectstat_mulsel =[ + + + 'x', + + + + 'y', + + + + 'z', + + + ]; + +dyan_seldefault=false +selectdyan_sel ; +getalldyan_sel() { + this.mainService.getAlldyan_sel().subscribe(data=>{ +this.selectdyan_sel = data; +console.log(data); +},(error) => { console.log(error); }); } + + + + // ================== ORDER SUMMARY LOGIC START ================== + /** + * Order Summary Array and Methods for Add to Order functionality + */ + dyan_selSummary: any[] = []; + dyan_seltotal; +isdyan_selorder =false; + /** + * Add selected product to order summary + */ + adddyan_selOrder() { + const formValue = this.entryForm.value; + if (!formValue.dyan_sel ) { + this.toastr.error('Please select dyan sel'); + return; + } + // Get description from master (selectdyan_sel) + + + + + if (this.selectdyan_sel && Array.isArray(this.selectdyan_sel)) { + + + const found = this.selectdyan_sel.find(p => p.name === formValue.dyan_sel); + + + + + } + const line = this.dyan_selSummary.length + 1; + const orderItem = { + line: line, + + // unitPrice: Number(formValue.price), + // quantity: Number(formValue.quantity), + // total: Number(formValue.price) * Number(formValue.quantity) + }; + this.dyan_selSummary.push(orderItem); + + this.dyan_seltotal = ''; + } + + /** + * Remove item from order summary by index + */ + removedyan_selOrder(index: number) { + this.dyan_selSummary.splice(index, 1); + // Recalculate line numbers + this.dyan_selSummary.forEach((item, i) => { + item.line = i + 1; + }); + } + + /** + * Calculate subtotal of all order items + */ + getdyan_selSubtotal(): number { + return this.dyan_selSummary.reduce((sum, item) => sum + item.total, 0); + } + + /** + * Calculate GST (18%) + */ + getdyan_selGST(): number { + return this.getdyan_selSubtotal() * 0.18; + } + + /** + * Calculate grand total (subtotal + GST) + */ + getdyan_selGrandTotal(): number { + return this.getdyan_selSubtotal() + this.getdyan_selGST(); + + } + // ================== ORDER SUMMARY LOGIC END ================== + + +selectdyna_mul; + getalldyna_mul () { + this.mainService.getAlldyna_mul().subscribe(data=>{ + this.selectdyna_mul = data; + console.log(data); + },(error) => { console.log(error); }); } + nodeEditPropertiesdyna_mul = { addselectedAttributesdyna_mul:"", editselectedAttributesdyna_mul :"" } + +selectautoc ; + getallautoc () { + this.mainService.getAllautoc().subscribe(data=>{ + this.selectautoc = data; console.log(data); + },(error) => { console.log(error); }); } + +selectauto_mul; + getallauto_mul () { + this.mainService.getAllauto_mul().subscribe(data=>{ + this.selectauto_mul = data; + console.log(data); + },(error) => { console.log(error); }); } + nodeEditPropertiesauto_mul = { addselectedAttributesauto_mul:"", editselectedAttributesauto_mul :"" } + + + +// updateaction +} + + + + + + + + + + + + + + + diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv2s/Adv2s.service.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv2s/Adv2s.service.ts new file mode 100644 index 0000000..2f1502d --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv2s/Adv2s.service.ts @@ -0,0 +1,50 @@ +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 Adv2sservice{ + private baseURL = "Adv2s/Adv2s" ; 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); + } + + + + + + +getAlldyan_sel(): Observable { +return this.apiRequest.get("Contry_ListFilter1/Contry_ListFilter1"); } + +getAlldyna_mul(): Observable { return this.apiRequest.get("Contry_ListFilter1/Contry_ListFilter1"); } + +getAllautoc(): Observable { return this.apiRequest.get("Contry_ListFilter1/Contry_ListFilter1"); } + +getAllauto_mul(): Observable { return this.apiRequest.get("Contry_ListFilter1/Contry_ListFilter1"); } + + + +// updateaction +} \ No newline at end of file diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv2s/Adv2s_cardvariable.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv2s/Adv2s_cardvariable.ts new file mode 100644 index 0000000..d0a4a72 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv2s/Adv2s_cardvariable.ts @@ -0,0 +1,4 @@ +export const Adv2scardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv3/Adv3.component.html b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv3/Adv3.component.html new file mode 100644 index 0000000..22467d4 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv3/Adv3.component.html @@ -0,0 +1,682 @@ + +
+
+
+

Adv3

+
+
+ + + +
+ + + + Loading ... + +
{{error}}
+
+ + Name + + + + age 1 + + + + age2 + + + + + + + + + + + + contry + + + + state + + + + distric + + + + + + Action + + + + + +{{user.name }} + + +{{user.age_1 }} + + +{{user.age2 }} + + + + + + + + + + +{{user.contryidentifier}} + + +{{user.state }} + + +{{user.distric }} + + + + + + + +
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 + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{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
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv3/Adv3.component.scss b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv3/Adv3.component.scss new file mode 100644 index 0000000..12f7fc8 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv3/Adv3.component.scss @@ -0,0 +1,85 @@ +//@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; +} +.universal-section-header { + margin: 24px 0 10px 0; + font-weight: 600; + color: #1a237e; + letter-spacing: 0.5px; + font-size: 1.25rem; +} \ No newline at end of file diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv3/Adv3.component.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv3/Adv3.component.ts new file mode 100644 index 0000000..089a1d8 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv3/Adv3.component.ts @@ -0,0 +1,1164 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Adv3service} from './Adv3.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 { Adv3cardvariable } from './Adv3_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Adv3', + templateUrl: './Adv3.component.html', + styleUrls: ['./Adv3.component.scss'] +}) +export class Adv3Component implements OnInit { + cardButton = Adv3cardvariable.cardButton; + cardmodeldata = Adv3cardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Adv3cardvariable.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 = 'Adv3_formCode' +tableName = 'Adv3'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Adv3service, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + ) { } + private editInterval: any; +// 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], + +age_1 : [null,[Validators.required]], + +age2 : [null,[Validators.required]], + + + + + + + + + +contry : [null], + +state : [null], + + +distric : [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 === "Adv3_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 + + + + + + + // Subscribe to value changes for auto calculation + this.entryForm.valueChanges.subscribe(() => { + this.onInputChangecalculated_add('add'); + }); + +// Start polling for edit changes + this.editInterval = setInterval(() => { + if (this.modalEdit) { + this.onInputChangecalculated_add('edit'); + } + }, 200); + + // Subscribe to value changes for auto calculation + this.entryForm.valueChanges.subscribe(() => { + this.onInputChangecalculated_sub('add'); + }); + +// Start polling for edit changes + this.editInterval = setInterval(() => { + if (this.modalEdit) { + this.onInputChangecalculated_sub('edit'); + } + }, 200); + + // Subscribe to value changes for auto calculation + this.entryForm.valueChanges.subscribe(() => { + this.onInputChangecalculated_mul('add'); + }); + +// Start polling for edit changes + this.editInterval = setInterval(() => { + if (this.modalEdit) { + this.onInputChangecalculated_mul('edit'); + } + }, 200); + + // Subscribe to value changes for auto calculation + this.entryForm.valueChanges.subscribe(() => { + this.onInputChangecalculated_div('add'); + }); + +// Start polling for edit changes + this.editInterval = setInterval(() => { + if (this.modalEdit) { + this.onInputChangecalculated_div('edit'); + } + }, 200); + +this.getallcontry(); + + + + if (this.contrydefault) { + // Listen for product changes to auto-fill description + + + + this.entryForm.get('contry')?.valueChanges.subscribe(name => { + if (name && this.selectcontry) { + + const found = this.selectcontry.find(p => p.name === name); + + + + console.log('found is ', found); + + // Auto-fill price when product is selected + if (found && found.default_field) { + this.entryForm.patchValue({ default_field: found.default_field_link }); + } else { + this.entryForm.patchValue({ default_field: null }); + } + + } + }); +} + + + // Listen for country changes + + + this.entryForm.get('contry')?.valueChanges.subscribe((item) => { + + + if (item) { + this.dependet2state(item); + } else { + this.statedependentData = []; + this.entryForm.get('state')?.setValue(null); // clear state + } + }); + + + + // Listen for country changes + + + this.entryForm.get('state')?.valueChanges.subscribe((item) => { + + + if (item) { + this.dependet2distric(item); + } else { + this.districdependentData = []; + this.entryForm.get('distric')?.setValue(null); // clear state + } + }); + + + + } + ngOnDestroy(): void { + if (this.editInterval) { + clearInterval(this.editInterval); + } + } + + + + + + + + + + + + + + + + + + + + error; + getData() { + this.mainService.getAll().subscribe((data) => { + console.log(data); + this.product = data; +this.product = [...this.product].reverse(); 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; + + + + + + + + + + + + + + + + +// Dependemt Dropdown field start +this.dependet2state(row.dependentDD); + // Dependemt Dropdown field end + +// Dependemt Dropdown field start +this.dependet2distric(row.dependentDD); + // Dependemt Dropdown field end + + + 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; + + + + + + +//calculated field start + +this.onInputChangecalculated_add ('edit'); + //calculated field end + +//calculated field start + +this.onInputChangecalculated_sub ('edit'); + //calculated field end + +//calculated field start + +this.onInputChangecalculated_mul ('edit'); + //calculated field end + +//calculated field start + +this.onInputChangecalculated_div ('edit'); + //calculated field end + + + + + + + + //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(); + +} + + + + + + + + // calculated field code start + + + + calculated_addage_1; + + + + calculated_addage2; + + + + calculated_addtotal; + calculated_addcalculateOperators: 'Addition' | 'Subtraction' | 'Multiplication' | 'Division' | 'Concatination' = "Addition" + onInputChangecalculated_add(mode: 'add' | 'edit') { + + + const lastObj = 0 + const lastObjstring = '' + if (mode === 'add') { + + + this.calculated_addage_1 = this.entryForm.value.age_1 || ''; + + + + this.calculated_addage2 = this.entryForm.value.age2 || ''; + + + + } else { + + + this.calculated_addage_1 = this.rowSelected.age_1; + + + + this.calculated_addage2 = this.rowSelected.age2; + + + } + + + const age_1Value = parseFloat(this.calculated_addage_1) || 0; + + + + const age2Value = parseFloat(this.calculated_addage2) || 0; + + + switch (this.calculated_addcalculateOperators) { + case 'Addition': + this.calculated_addtotal = ( + + + age_1Value + + + + + age2Value + + + + lastObj).toString(); + break; + case 'Subtraction': + this.calculated_addtotal = ( + + + age_1Value - + + + + age2Value - + + + lastObj).toString(); + break; + case 'Multiplication': + this.calculated_addtotal = ( + + + age_1Value * + + + + age2Value * + + + 1).toString(); + + break; + case 'Division': + + this.calculated_addtotal = ( + + + age_1Value / + + + + age2Value / + + + 1).toString(); + + break; + case 'Concatination': + this.calculated_addtotal = ` + + + ${this.calculated_addage_1 || ''} + + + + ${this.calculated_addage2 || ''} + + + ${lastObjstring || ''}`; + + break; + default: + this.calculated_addtotal = ''; + } + } + + + + // calculated field code start + + + + calculated_subage_1; + + + + calculated_subage2; + + + + calculated_subtotal; + calculated_subcalculateOperators: 'Addition' | 'Subtraction' | 'Multiplication' | 'Division' | 'Concatination' = "Subtraction" + onInputChangecalculated_sub(mode: 'add' | 'edit') { + + + const lastObj = 0 + const lastObjstring = '' + if (mode === 'add') { + + + this.calculated_subage_1 = this.entryForm.value.age_1 || ''; + + + + this.calculated_subage2 = this.entryForm.value.age2 || ''; + + + + } else { + + + this.calculated_subage_1 = this.rowSelected.age_1; + + + + this.calculated_subage2 = this.rowSelected.age2; + + + } + + + const age_1Value = parseFloat(this.calculated_subage_1) || 0; + + + + const age2Value = parseFloat(this.calculated_subage2) || 0; + + + switch (this.calculated_subcalculateOperators) { + case 'Addition': + this.calculated_subtotal = ( + + + age_1Value + + + + + age2Value + + + + lastObj).toString(); + break; + case 'Subtraction': + this.calculated_subtotal = ( + + + age_1Value - + + + + age2Value - + + + lastObj).toString(); + break; + case 'Multiplication': + this.calculated_subtotal = ( + + + age_1Value * + + + + age2Value * + + + 1).toString(); + + break; + case 'Division': + + this.calculated_subtotal = ( + + + age_1Value / + + + + age2Value / + + + 1).toString(); + + break; + case 'Concatination': + this.calculated_subtotal = ` + + + ${this.calculated_subage_1 || ''} + + + + ${this.calculated_subage2 || ''} + + + ${lastObjstring || ''}`; + + break; + default: + this.calculated_subtotal = ''; + } + } + + + + // calculated field code start + + + + calculated_mulage_1; + + + + calculated_mulage2; + + + + calculated_multotal; + calculated_mulcalculateOperators: 'Addition' | 'Subtraction' | 'Multiplication' | 'Division' | 'Concatination' = "Multiplication" + onInputChangecalculated_mul(mode: 'add' | 'edit') { + + + const lastObj = 0 + const lastObjstring = '' + if (mode === 'add') { + + + this.calculated_mulage_1 = this.entryForm.value.age_1 || ''; + + + + this.calculated_mulage2 = this.entryForm.value.age2 || ''; + + + + } else { + + + this.calculated_mulage_1 = this.rowSelected.age_1; + + + + this.calculated_mulage2 = this.rowSelected.age2; + + + } + + + const age_1Value = parseFloat(this.calculated_mulage_1) || 0; + + + + const age2Value = parseFloat(this.calculated_mulage2) || 0; + + + switch (this.calculated_mulcalculateOperators) { + case 'Addition': + this.calculated_multotal = ( + + + age_1Value + + + + + age2Value + + + + lastObj).toString(); + break; + case 'Subtraction': + this.calculated_multotal = ( + + + age_1Value - + + + + age2Value - + + + lastObj).toString(); + break; + case 'Multiplication': + this.calculated_multotal = ( + + + age_1Value * + + + + age2Value * + + + 1).toString(); + + break; + case 'Division': + + this.calculated_multotal = ( + + + age_1Value / + + + + age2Value / + + + 1).toString(); + + break; + case 'Concatination': + this.calculated_multotal = ` + + + ${this.calculated_mulage_1 || ''} + + + + ${this.calculated_mulage2 || ''} + + + ${lastObjstring || ''}`; + + break; + default: + this.calculated_multotal = ''; + } + } + + + + // calculated field code start + + + + calculated_divage2; + + + + calculated_divage_1; + + + + calculated_divtotal; + calculated_divcalculateOperators: 'Addition' | 'Subtraction' | 'Multiplication' | 'Division' | 'Concatination' = "Division" + onInputChangecalculated_div(mode: 'add' | 'edit') { + + + const lastObj = 0 + const lastObjstring = '' + if (mode === 'add') { + + + this.calculated_divage2 = this.entryForm.value.age2 || ''; + + + + this.calculated_divage_1 = this.entryForm.value.age_1 || ''; + + + + } else { + + + this.calculated_divage2 = this.rowSelected.age2; + + + + this.calculated_divage_1 = this.rowSelected.age_1; + + + } + + + const age2Value = parseFloat(this.calculated_divage2) || 0; + + + + const age_1Value = parseFloat(this.calculated_divage_1) || 0; + + + switch (this.calculated_divcalculateOperators) { + case 'Addition': + this.calculated_divtotal = ( + + + age2Value + + + + + age_1Value + + + + lastObj).toString(); + break; + case 'Subtraction': + this.calculated_divtotal = ( + + + age2Value - + + + + age_1Value - + + + lastObj).toString(); + break; + case 'Multiplication': + this.calculated_divtotal = ( + + + age2Value * + + + + age_1Value * + + + 1).toString(); + + break; + case 'Division': + + this.calculated_divtotal = ( + + + age2Value / + + + + age_1Value / + + + 1).toString(); + + break; + case 'Concatination': + this.calculated_divtotal = ` + + + ${this.calculated_divage2 || ''} + + + + ${this.calculated_divage_1 || ''} + + + ${lastObjstring || ''}`; + + break; + default: + this.calculated_divtotal = ''; + } + } + + +contrydefault=false +selectcontry ; +getallcontry() { + this.mainService.getAllcontry().subscribe(data=>{ +this.selectcontry = data; +console.log(data); +},(error) => { console.log(error); }); } + + + + // ================== ORDER SUMMARY LOGIC START ================== + /** + * Order Summary Array and Methods for Add to Order functionality + */ + contrySummary: any[] = []; + contrytotal; +iscontryorder =false; + /** + * Add selected product to order summary + */ + addcontryOrder() { + const formValue = this.entryForm.value; + if (!formValue.contry ) { + this.toastr.error('Please select contry'); + return; + } + // Get description from master (selectcontry) + + + + + if (this.selectcontry && Array.isArray(this.selectcontry)) { + + + const found = this.selectcontry.find(p => p.name === formValue.contry); + + + + + } + const line = this.contrySummary.length + 1; + const orderItem = { + line: line, + + // unitPrice: Number(formValue.price), + // quantity: Number(formValue.quantity), + // total: Number(formValue.price) * Number(formValue.quantity) + }; + this.contrySummary.push(orderItem); + + this.contrytotal = ''; + } + + /** + * Remove item from order summary by index + */ + removecontryOrder(index: number) { + this.contrySummary.splice(index, 1); + // Recalculate line numbers + this.contrySummary.forEach((item, i) => { + item.line = i + 1; + }); + } + + /** + * Calculate subtotal of all order items + */ + getcontrySubtotal(): number { + return this.contrySummary.reduce((sum, item) => sum + item.total, 0); + } + + /** + * Calculate GST (18%) + */ + getcontryGST(): number { + return this.getcontrySubtotal() * 0.18; + } + + /** + * Calculate grand total (subtotal + GST) + */ + getcontryGrandTotal(): number { + return this.getcontrySubtotal() + this.getcontryGST(); + + } + // ================== ORDER SUMMARY LOGIC END ================== + + +// Dependemt Dropdown field start + + + statedependentData: any; +dependet2state (item){ + this.mainService.getstateDependent(item).subscribe( (data) => { + console.log(data); + this.statedependentData = data; + },(error) => { console.log(error); }); + } + + + // DependemtDropdown field end + +// Dependemt Dropdown field start + + + districdependentData: any; +dependet2distric (item){ + this.mainService.getdistricDependent(item).subscribe( (data) => { + console.log(data); + this.districdependentData = data; + },(error) => { console.log(error); }); + } + + + // DependemtDropdown field end + +// updateaction +} + + + + + + + + + + + + + + + + + + + diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv3/Adv3.service.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv3/Adv3.service.ts new file mode 100644 index 0000000..bf46b2f --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv3/Adv3.service.ts @@ -0,0 +1,66 @@ +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 Adv3service{ + private baseURL = "Adv3/Adv3" ; 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); + } + + + + + + + + + + + + + + +getAllcontry(): Observable { +return this.apiRequest.get("Contry_ListFilter1/Contry_ListFilter1"); } + + + + getstateDependent(field: string): Observable { + return this.apiRequest.get("State_ListFilter1/State_ListFilter11/" + field); + } + + + + + + getdistricDependent(field: string): Observable { + return this.apiRequest.get("Distric_ListFilter1/Distric_ListFilter11/" + field); + } + + + +// updateaction +} \ No newline at end of file diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv3/Adv3_cardvariable.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv3/Adv3_cardvariable.ts new file mode 100644 index 0000000..8ed38af --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Adv3/Adv3_cardvariable.ts @@ -0,0 +1,4 @@ +export const Adv3cardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Child/Child.component.html b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Child/Child.component.html new file mode 100644 index 0000000..4c5ee67 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Child/Child.component.html @@ -0,0 +1,376 @@ + +
+
+
+

Child

+
+
+ + + +
+ + + + Loading ... + +
{{error}}
+
+ + Name + + + + Description + + + + Active + + + + + + Action + + + + + +{{user.name }} + + + + + + +{{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 + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{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
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Child/Child.component.scss b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Child/Child.component.scss new file mode 100644 index 0000000..12f7fc8 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Child/Child.component.scss @@ -0,0 +1,85 @@ +//@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; +} +.universal-section-header { + margin: 24px 0 10px 0; + font-weight: 600; + color: #1a237e; + letter-spacing: 0.5px; + font-size: 1.25rem; +} \ No newline at end of file diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Child/Child.component.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Child/Child.component.ts new file mode 100644 index 0000000..d71e222 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Child/Child.component.ts @@ -0,0 +1,275 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Childservice} from './Child.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 { Childcardvariable } from './Child_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Child', + templateUrl: './Child.component.html', + styleUrls: ['./Child.component.scss'] +}) +export class ChildComponent implements OnInit { + cardButton = Childcardvariable.cardButton; + cardmodeldata = Childcardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Childcardvariable.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 = 'Child_formCode' +tableName = 'Child'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Childservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + ) { } + private editInterval: any; +// 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 : [true], + + + + + + + + + }); // 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 === "Child_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 + + + + + + + + } + ngOnDestroy(): void { + if (this.editInterval) { + clearInterval(this.editInterval); + } + } + + + + + + error; + getData() { + this.mainService.getAll().subscribe((data) => { + console.log(data); + this.product = data; +this.product = [...this.product].reverse(); 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 +} + + + + + diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Child/Child.service.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Child/Child.service.ts new file mode 100644 index 0000000..51d5bff --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Child/Child.service.ts @@ -0,0 +1,39 @@ +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 Childservice{ + private baseURL = "Child/Child" ; 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/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Child/Child_cardvariable.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Child/Child_cardvariable.ts new file mode 100644 index 0000000..587aaf8 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Child/Child_cardvariable.ts @@ -0,0 +1,4 @@ +export const Childcardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Contry/Contry.component.html b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Contry/Contry.component.html new file mode 100644 index 0000000..1b5673a --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Contry/Contry.component.html @@ -0,0 +1,376 @@ + +
+
+
+

Contry

+
+
+ + + +
+ + + + Loading ... + +
{{error}}
+
+ + Name + + + + Description + + + + Active + + + + + + Action + + + + + +{{user.name }} + + + + + + +{{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 + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{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
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Contry/Contry.component.scss b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Contry/Contry.component.scss new file mode 100644 index 0000000..12f7fc8 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Contry/Contry.component.scss @@ -0,0 +1,85 @@ +//@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; +} +.universal-section-header { + margin: 24px 0 10px 0; + font-weight: 600; + color: #1a237e; + letter-spacing: 0.5px; + font-size: 1.25rem; +} \ No newline at end of file diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Contry/Contry.component.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Contry/Contry.component.ts new file mode 100644 index 0000000..58099a7 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Contry/Contry.component.ts @@ -0,0 +1,275 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Contryservice} from './Contry.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 { Contrycardvariable } from './Contry_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Contry', + templateUrl: './Contry.component.html', + styleUrls: ['./Contry.component.scss'] +}) +export class ContryComponent implements OnInit { + cardButton = Contrycardvariable.cardButton; + cardmodeldata = Contrycardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Contrycardvariable.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 = 'Contry_formCode' +tableName = 'Contry'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Contryservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + ) { } + private editInterval: any; +// 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 : [true], + + + + + + + + + }); // 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 === "Contry_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 + + + + + + + + } + ngOnDestroy(): void { + if (this.editInterval) { + clearInterval(this.editInterval); + } + } + + + + + + error; + getData() { + this.mainService.getAll().subscribe((data) => { + console.log(data); + this.product = data; +this.product = [...this.product].reverse(); 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 +} + + + + + diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Contry/Contry.service.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Contry/Contry.service.ts new file mode 100644 index 0000000..b5de253 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Contry/Contry.service.ts @@ -0,0 +1,39 @@ +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 Contryservice{ + private baseURL = "Contry/Contry" ; 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/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Contry/Contry_cardvariable.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Contry/Contry_cardvariable.ts new file mode 100644 index 0000000..3399def --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Contry/Contry_cardvariable.ts @@ -0,0 +1,4 @@ +export const Contrycardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Distric/Distric.component.html b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Distric/Distric.component.html new file mode 100644 index 0000000..ccd7150 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Distric/Distric.component.html @@ -0,0 +1,405 @@ + +
+
+
+

Distric

+
+
+ + + +
+ + + + Loading ... + +
{{error}}
+
+ + distric Name + + + + Description + + + + Active + + + + state name + + + + + + Action + + + + + +{{user.distric_name }} + + + + + + +{{user.active }} + + +{{user.state_name }} + + + + + + + +
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 + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{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
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Distric/Distric.component.scss b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Distric/Distric.component.scss new file mode 100644 index 0000000..12f7fc8 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Distric/Distric.component.scss @@ -0,0 +1,85 @@ +//@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; +} +.universal-section-header { + margin: 24px 0 10px 0; + font-weight: 600; + color: #1a237e; + letter-spacing: 0.5px; + font-size: 1.25rem; +} \ No newline at end of file diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Distric/Distric.component.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Distric/Distric.component.ts new file mode 100644 index 0000000..a1f90dd --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Distric/Distric.component.ts @@ -0,0 +1,299 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Districservice} from './Distric.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 { Districcardvariable } from './Distric_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Distric', + templateUrl: './Distric.component.html', + styleUrls: ['./Distric.component.scss'] +}) +export class DistricComponent implements OnInit { + cardButton = Districcardvariable.cardButton; + cardmodeldata = Districcardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Districcardvariable.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 = 'Distric_formCode' +tableName = 'Distric'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Districservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + ) { } + private editInterval: any; +// 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({ +distric_name : [null], + +description : [null], + +active : [true], + +state_name : [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 === "Distric_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 + + + + + + + + + + } + ngOnDestroy(): void { + if (this.editInterval) { + clearInterval(this.editInterval); + } + } + + + + + + + + error; + getData() { + this.mainService.getAll().subscribe((data) => { + console.log(data); + this.product = data; +this.product = [...this.product].reverse(); 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 +} + + + + + + + diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Distric/Distric.service.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Distric/Distric.service.ts new file mode 100644 index 0000000..564353d --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Distric/Distric.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 Districservice{ + private baseURL = "Distric/Distric" ; 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/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Distric/Distric_cardvariable.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Distric/Distric_cardvariable.ts new file mode 100644 index 0000000..df77458 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Distric/Distric_cardvariable.ts @@ -0,0 +1,4 @@ +export const Districcardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/State/State.component.html b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/State/State.component.html new file mode 100644 index 0000000..530d782 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/State/State.component.html @@ -0,0 +1,405 @@ + +
+
+
+

State

+
+
+ + + +
+ + + + Loading ... + +
{{error}}
+
+ + state Name + + + + Description + + + + Active + + + + contry name + + + + + + Action + + + + + +{{user.state_name }} + + + + + + +{{user.active }} + + +{{user.contry_name }} + + + + + + + +
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 + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{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
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/State/State.component.scss b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/State/State.component.scss new file mode 100644 index 0000000..12f7fc8 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/State/State.component.scss @@ -0,0 +1,85 @@ +//@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; +} +.universal-section-header { + margin: 24px 0 10px 0; + font-weight: 600; + color: #1a237e; + letter-spacing: 0.5px; + font-size: 1.25rem; +} \ No newline at end of file diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/State/State.component.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/State/State.component.ts new file mode 100644 index 0000000..c9ae1eb --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/State/State.component.ts @@ -0,0 +1,299 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Stateservice} from './State.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 { Statecardvariable } from './State_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +declare var JsBarcode: any; +@Component({ + selector: 'app-State', + templateUrl: './State.component.html', + styleUrls: ['./State.component.scss'] +}) +export class StateComponent implements OnInit { + cardButton = Statecardvariable.cardButton; + cardmodeldata = Statecardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Statecardvariable.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 = 'State_formCode' +tableName = 'State'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Stateservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + ) { } + private editInterval: any; +// 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({ +state_name : [null], + +description : [null], + +active : [true], + +contry_name : [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 === "State_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 + + + + + + + + + + } + ngOnDestroy(): void { + if (this.editInterval) { + clearInterval(this.editInterval); + } + } + + + + + + + + error; + getData() { + this.mainService.getAll().subscribe((data) => { + console.log(data); + this.product = data; +this.product = [...this.product].reverse(); 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 +} + + + + + + + diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/State/State.service.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/State/State.service.ts new file mode 100644 index 0000000..b072891 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/State/State.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 Stateservice{ + private baseURL = "State/State" ; 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/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/State/State_cardvariable.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/State/State_cardvariable.ts new file mode 100644 index 0000000..fce7bf8 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/State/State_cardvariable.ts @@ -0,0 +1,4 @@ +export const Statecardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Support/Support.component.html b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Support/Support.component.html new file mode 100644 index 0000000..3995fc0 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Support/Support.component.html @@ -0,0 +1,349 @@ + +
+
+
+

Support

+
+
+ + + +
+ + + + Loading ... + +
{{error}}
+
+ + Name + + + + Description + + + + + + Action + + + + + +{{user.name }} + + + + + + + + + + + +
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 + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{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
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Support/Support.component.scss b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Support/Support.component.scss new file mode 100644 index 0000000..12f7fc8 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Support/Support.component.scss @@ -0,0 +1,85 @@ +//@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; +} +.universal-section-header { + margin: 24px 0 10px 0; + font-weight: 600; + color: #1a237e; + letter-spacing: 0.5px; + font-size: 1.25rem; +} \ No newline at end of file diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Support/Support.component.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Support/Support.component.ts new file mode 100644 index 0000000..9af1ee4 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Support/Support.component.ts @@ -0,0 +1,251 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Supportservice} from './Support.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 { Supportcardvariable } from './Support_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Support', + templateUrl: './Support.component.html', + styleUrls: ['./Support.component.scss'] +}) +export class SupportComponent implements OnInit { + cardButton = Supportcardvariable.cardButton; + cardmodeldata = Supportcardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Supportcardvariable.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 = 'Support_formCode' +tableName = 'Support'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Supportservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + ) { } + private editInterval: any; +// 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], + + + + + + + }); // 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 === "Support_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 + + + + + + } + ngOnDestroy(): void { + if (this.editInterval) { + clearInterval(this.editInterval); + } + } + + + + error; + getData() { + this.mainService.getAll().subscribe((data) => { + console.log(data); + this.product = data; +this.product = [...this.product].reverse(); 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 +} + + + diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Support/Support.service.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Support/Support.service.ts new file mode 100644 index 0000000..d3f45f1 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Support/Support.service.ts @@ -0,0 +1,37 @@ +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 Supportservice{ + private baseURL = "Support/Support" ; 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/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Support/Support_cardvariable.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Support/Support_cardvariable.ts new file mode 100644 index 0000000..544e78a --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Support/Support_cardvariable.ts @@ -0,0 +1,4 @@ +export const Supportcardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Test_a/Test_a.component.html b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Test_a/Test_a.component.html new file mode 100644 index 0000000..ec1e4d2 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Test_a/Test_a.component.html @@ -0,0 +1,780 @@ + +
+
+
+

Test A

+
+
+ + + +
+ + + + Loading ... + +
{{error}}
+
+ + Text Field + + + + Number Field + + + + Phone Number + + + + Paragraph Field + + + + Password Field + + + + Textarea + + + + Date Field + + + + Datetime Field + + + + Email Field + + + + Toggle Switch + + + + Url Field + + + + Decimal Field + + + + Percentage Field + + + + recaptcha + + + + documentsequence + + + + + + + + Action + + + + + +{{user.text_field }} + + +{{user.number_field }} + + +{{user.phone_number }} + + + + + +{{user.password_field }} + + + + + + +{{user.date_field }} + + +{{user.datetime_field }} + + +{{user.email_field }} + + +{{user.toggle_switch }} + + +{{user.url_field}} + + +{{user.decimal_field }} + + +{{user.percentage_field }} + + +{{user.recaptcha }} + + +{{user.documentsequence }} + + + + + + + + + +
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 + + +
+ + + +
+
+
+
+
+
+ +
+
+ {{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
+
+
+
+
+
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Test_a/Test_a.component.scss b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Test_a/Test_a.component.scss new file mode 100644 index 0000000..12f7fc8 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Test_a/Test_a.component.scss @@ -0,0 +1,85 @@ +//@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; +} +.universal-section-header { + margin: 24px 0 10px 0; + font-weight: 600; + color: #1a237e; + letter-spacing: 0.5px; + font-size: 1.25rem; +} \ No newline at end of file diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Test_a/Test_a.component.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Test_a/Test_a.component.ts new file mode 100644 index 0000000..fe3dc8f --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Test_a/Test_a.component.ts @@ -0,0 +1,648 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Test_aservice} from './Test_a.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 { Test_acardvariable } from './Test_a_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Test_a', + templateUrl: './Test_a.component.html', + styleUrls: ['./Test_a.component.scss'] +}) +export class Test_aComponent implements OnInit { + cardButton = Test_acardvariable.cardButton; + cardmodeldata = Test_acardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Test_acardvariable.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 = 'Test_a_formCode' +tableName = 'Test_a'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Test_aservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + ) { } + private editInterval: any; +// 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({ +text_field : [null], + +number_field : [null,[Validators.required]], + +phone_number: ['+91'], + +paragraph_field : [null], + +password_field : [null], +confirmpassword_field : [null], + +textarea : [null], + +date_field : [null], + +datetime_field : [null], + +email_field : [null], + +toggle_switch : [true], + +url_field : [null], + +decimal_field : [null,[Validators.required]], + +percentage_field : [null,[Validators.required]], + +recaptcha : ['', [Validators.required,this.checkrecaptcha.bind(this)]], + +documentsequence : [null], + + + + + + + + + + + + + }, { + validator: Confirmedpassword_fieldValidator('password_field', 'confirmpassword_field') + + + + + + + + + + + + + + + + + + + + + + + + }); // 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 === "Test_a_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 + + + + + + + + + + + + + + + + + + + + + + + + + + +this.generaterecaptcha() + + + + + + + } + ngOnDestroy(): void { + if (this.editInterval) { + clearInterval(this.editInterval); + } + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + error; + getData() { + this.mainService.getAll().subscribe((data) => { + console.log(data); + this.product = data; +this.product = [...this.product].reverse(); 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(); + +} + + + + +isValidPhone_number(phone: string): boolean { + const phonePattern = /^(\+[1-9][0-9]{0,2})?[1-9][0-9]{9}$/; + return phonePattern.test(phone); +} + +rsModalparagraph_field = false; + goToReplaceStringparagraph_field (row){ + this.rowSelected = row; this.rsModalparagraph_field =true; } + +newpHidepassword_field: boolean = true; + newIconpassword_field: string = "eye"; +newShapeChangerpassword_field() { +this.newpHidepassword_field = !this.newpHidepassword_field; + if(this.newpHidepassword_field){ +this.newIconpassword_field = 'eye' } else { this.newIconpassword_field = 'eye-hide' } +} + + newaddpHidepassword_field: boolean = true; + newaddIconpassword_field: string = "eye"; +newaddChangerpassword_field() { this.newaddpHidepassword_field = !this.newaddpHidepassword_field; + if(this.newaddpHidepassword_field){ this.newaddIconpassword_field = 'eye' } else { + this.newaddIconpassword_field = 'eye-hide' } } + +rsModaltextarea = false; +goToReplaceStringtextarea(row){ +this.rowSelected = row; this.rsModaltextarea =true; } + + + + + +isValidemail_field(email: string): boolean { + const emailPattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/; + return emailPattern.test(email); } + + + +isValidurl_field(url: string): boolean { + return /^(https?|ftp):\/\/[^\s/$.?#].[^\s]*$/.test(url); } + goTourl_fieldUrl(val){ window.open(val) } + + + + + +recaptchaCode = ''; +generaterecaptcha (): void { + const possibleCharacters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + const codeLength = 6; // Change to desired length + + let recaptcha= ''; + for (let i = 0; i < codeLength; i++) { + const randomIndex = Math.floor(Math.random() * possibleCharacters.length); + recaptcha += possibleCharacters.charAt(randomIndex); + } + this.recaptchaCode = recaptcha; +} + +checkrecaptcha(control: AbstractControl): ValidationErrors | null { + if (control.value !== this.recaptchaCode) { + return { recaptchaMismatch: true }; + } + return null; +} + +recaptchaMismatch = false; + +checkrecaptchaEdit(): void { + if (this.rowSelected.recaptcha !== this. recaptchaCode) { + this. recaptchaMismatch = true; } else { this.recaptchaMismatch = false; } } + + + + + +// updateaction +} + + + + + + + +export function Confirmedpassword_fieldValidator(controlName: string, matchingControlName: string){ + return (formGroup: FormGroup) => { + const control = formGroup.controls[controlName]; + const matchingControl = formGroup.controls[matchingControlName]; + if (matchingControl.errors && !matchingControl.errors.confirmedpassword_fieldValidator) { + return; + } + if (control.value !== matchingControl.value) { + matchingControl.setErrors({ confirmedpassword_fieldValidator: true }); + } else { + matchingControl.setErrors(null); + } + } +} + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Test_a/Test_a.service.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Test_a/Test_a.service.ts new file mode 100644 index 0000000..101352c --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Test_a/Test_a.service.ts @@ -0,0 +1,65 @@ +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 Test_aservice{ + private baseURL = "Test_a/Test_a" ; 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/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Test_a/Test_a_cardvariable.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Test_a/Test_a_cardvariable.ts new file mode 100644 index 0000000..4768602 --- /dev/null +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/basicp1/Test_a/Test_a_cardvariable.ts @@ -0,0 +1,4 @@ +export const Test_acardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts index 15a32b7..0fe0651 100644 --- a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts @@ -1,3 +1,12 @@ +import { Adv3Component } from './BuilderComponents/basicp1/Adv3/Adv3.component'; +import { SupportComponent } from './BuilderComponents/basicp1/Support/Support.component'; +import { Adv2sComponent } from './BuilderComponents/basicp1/Adv2s/Adv2s.component'; +import { Adv1Component } from './BuilderComponents/basicp1/Adv1/Adv1.component'; +import { ChildComponent } from './BuilderComponents/basicp1/Child/Child.component'; +import { StateComponent } from './BuilderComponents/basicp1/State/State.component'; +import { ContryComponent } from './BuilderComponents/basicp1/Contry/Contry.component'; +import { DistricComponent } from './BuilderComponents/basicp1/Distric/Distric.component'; +import { Test_aComponent } from './BuilderComponents/basicp1/Test_a/Test_a.component'; import { SequencegenaratorComponent } from './fnd/sequencegenarator/sequencegenarator.component'; import { Component, NgModule } from '@angular/core'; @@ -276,6 +285,33 @@ const routes: Routes = [ // buildercomponents +{path:'Adv3',component:Adv3Component}, + + +{path:'Support',component:SupportComponent}, + + +{path:'Adv2s',component:Adv2sComponent}, + + +{path:'Adv1',component:Adv1Component}, + + +{path:'Child',component:ChildComponent}, + + +{path:'State',component:StateComponent}, + + +{path:'Contry',component:ContryComponent}, + + +{path:'Distric',component:DistricComponent}, + + +{path:'Test_a',component:Test_aComponent}, + + { path: 'tokenregistery', component: Token_registeryComponent }, diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts index 714ccd6..e84c5c2 100644 --- a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts @@ -1,3 +1,12 @@ +import { Adv3Component } from './BuilderComponents/basicp1/Adv3/Adv3.component'; +import { SupportComponent } from './BuilderComponents/basicp1/Support/Support.component'; +import { Adv2sComponent } from './BuilderComponents/basicp1/Adv2s/Adv2s.component'; +import { Adv1Component } from './BuilderComponents/basicp1/Adv1/Adv1.component'; +import { ChildComponent } from './BuilderComponents/basicp1/Child/Child.component'; +import { StateComponent } from './BuilderComponents/basicp1/State/State.component'; +import { ContryComponent } from './BuilderComponents/basicp1/Contry/Contry.component'; +import { DistricComponent } from './BuilderComponents/basicp1/Distric/Distric.component'; +import { Test_aComponent } from './BuilderComponents/basicp1/Test_a/Test_a.component'; import { CommonModule } from '@angular/common'; @@ -140,6 +149,33 @@ import { DynamicFormViewerComponent } from './superadmin/dynamicform/dynamic-for // buildercomponents +Adv3Component, + + +SupportComponent, + + +Adv2sComponent, + + +Adv1Component, + + +ChildComponent, + + +StateComponent, + + +ContryComponent, + + +DistricComponent, + + +Test_aComponent, + + diff --git a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json index 0b299c4..d7f6662 100644 --- a/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json +++ b/test9april-front-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json @@ -226,150 +226,68 @@ "MENU_ACTION_LINK": "Menu Action Link", "STATUS": "Status", "SUB_MENU": "Sub Menu", - "video_Field2": "video_Field2", "video_Field": "video_Field", - "numadd": "numadd", + "distric": "distric", "Support": "Support", - "about": "about", - "Button_Field2": "Button_Field2", - "autotest": "autotest", - "Childform": "Childform", - "Test2": "Test2", - "Chtes2": "Chtes2", - "documentsequenc": "documentsequenc", - "state_name": "state_name", - "Currency": "Currency", - "token_name": "token_name", - "state": "state", - "Adv5": "Adv5", - "Adv4": "Adv4", - "Adv3": "Adv3", - "addition": "addition", - "automulti": "automulti", - "calculated_Field": "calculated_Field", - "counrymulti": "counrymulti", - "Paragraph_Field2": "Paragraph_Field2", - "Number_Field": "Number_Field", - "Basicp1": "Basicp1", - "Sum": "Sum", - "ButtonUpdate": "ButtonUpdate", - "datagrid_Field": "datagrid_Field", - "Email_Field": "Email_Field", - "audio_Field2": "audio_Field2", - "QRCode_Field2": "QRCode_Field2", - "dylist": "dylist", - "Basicp3": "Basicp3", - "Basicp2": "Basicp2", - "stmlit": "stmlit", - "1ega": "1ega", - "Country": "Country", - "BarCode_Field2": "BarCode_Field2", - "Imageupload_Field": "Imageupload_Field", - "dy2": "dy2", - "name2": "name2", - "idfemale": "idfemale", - "dy1": "dy1", - "Url_Field2": "Url_Field2", - "t1": "t1", - "age2": "age2", - "t2": "t2", - "age1": "age1", - "Sum2": "Sum2", - "t4": "t4", - "Decimal_Field2": "Decimal_Field2", - "Description": "Description", - "gender": "gender", - "select_Field": "select_Field", - "QRCode_Field": "QRCode_Field", - "Datetime_Field": "Datetime_Field", - "sum": "sum", - "test1": "test1", - "Test11": "Test11", - "Checkout_Field": "Checkout_Field", - "Ad6": "Ad6", - "picupload": "picupload", - "Textarea_Field": "Textarea_Field", - "Textarea": "Textarea", - "Ad8": "Ad8", - "Ad7": "Ad7", - "Ad9": "Ad9", - "num1": "num1", - "multiplication": "multiplication", - "Date_Field": "Date_Field", - "num3": "num3", - "num2": "num2", - "Token_registery": "Token_registery", - "dymulti": "dymulti", - "Toggle_Switch": "Toggle_Switch", - "last_name": "last_name", - "atoc": "atoc", - "Percentage_Field2": "Percentage_Field2", - "Test22": "Test22", - "Date_Field2": "Date_Field2", - "default_Prce": "default_Prce", - "token": "token", - "test2": "test2", - "test3": "test3", - "dymlti1": "dymlti1", - "Fileupload_Field2": "Fileupload_Field2", - "audio_Field": "audio_Field", - "mobile_number": "mobile_number", - "Decimal_Field": "Decimal_Field", - "country": "country", - "ismale": "ismale", - "Currency2": "Currency2", + "Test_a": "Test_a", + "dyna_mul": "dyna_mul", "Name": "Name", - "atc2": "atc2", - "data_grid_Field": "data_grid_Field", + "distric_Name": "distric_Name", + "java": "java", + "state_name": "state_name", + "dyan_sel": "dyan_sel", + "Currency": "Currency", + "Adv2s": "Adv2s", + "autoc": "autoc", + "state": "state", + "Child": "Child", "BarCode_Field": "BarCode_Field", - "Imageupload_Field2": "Imageupload_Field2", - "recaptcha2": "recaptcha2", - "Buttonupdate2": "Buttonupdate2", - "test": "test", - "atdy1": "atdy1", - "Phone_Number2": "Phone_Number2", - "atdy2": "atdy2", - "Sttest": "Sttest", + "Adv3": "Adv3", + "Number_Field": "Number_Field", + "testing": "testing", "Percentage_Field": "Percentage_Field", - "Textarea2": "Textarea2", + "calculated_mul": "calculated_mul", + "Email_Field": "Email_Field", + "datagrid_Field": "datagrid_Field", "Url_Field": "Url_Field", "Active": "Active", - "dymlt2": "dymlt2", "Paragraph_Field": "Paragraph_Field", "State": "State", - "district": "district", "name": "name", "UserId_Field": "UserId_Field", - "Email_Field2": "Email_Field2", + "contry_name": "contry_name", + "sta_select": "sta_select", + "Imageupload_Field": "Imageupload_Field", "Static": "Static", - "District": "District", - "about_yourself": "about_yourself", - "datagrid_Field2": "datagrid_Field2", - "Toggle_Switch2": "Toggle_Switch2", - "Dv2": "Dv2", + "Contry": "Contry", + "age2": "age2", "Dynamic": "Dynamic", - "description": "description", - "number1": "number1", + "Description": "Description", + "gender": "gender", + "contry": "contry", + "state_Name": "state_Name", + "QRCode_Field": "QRCode_Field", + "Text_Field": "Text_Field", + "Datetime_Field": "Datetime_Field", + "calculated_add": "calculated_add", "Phone_Number": "Phone_Number", "Fileupload_Field": "Fileupload_Field", - "number2": "number2", "Value_List_Field": "Value_List_Field", - "Value_List_Field2": "Value_List_Field2", - "district_name": "district_name", - "OneToOne": "OneToOne", + "Textarea": "Textarea", + "selenium": "selenium", + "calculated_sub": "calculated_sub", "recaptcha": "recaptcha", - "stmmlt2": "stmmlt2", - "country_name": "country_name", - "Dependent_Dropdown_Field": "Dependent_Dropdown_Field", + "Distric": "Distric", + "Date_Field": "Date_Field", "Adv1": "Adv1", - "OneToManyExtension": "OneToManyExtension", - "Datetime_Field2": "Datetime_Field2", - "country_list": "country_list", - "Textarea_Field2": "Textarea_Field2", - "Defatest": "Defatest", - "Approved_Field": "Approved_Field", - "select_Field2": "select_Field2", + "Toggle_Switch": "Toggle_Switch", + "last_name": "last_name", + "stat_mulsel": "stat_mulsel", + "auto_mul": "auto_mul", + "age_1": "age_1", + "calculated_div": "calculated_div", + "audio_Field": "audio_Field", "Password_Field": "Password_Field", - "age": "age", - "Button_Field": "Button_Field" + "Decimal_Field": "Decimal_Field", + "documentsequence": "documentsequence" } \ No newline at end of file