From 9f5f665afa4d06ef52c6f1b2ea0936cc2ea7361e Mon Sep 17 00:00:00 2001 From: risadmin_prod Date: Thu, 19 Jun 2025 05:59:04 +0000 Subject: [PATCH] build_app --- .../authsec_mysql/mysql/wf_table/wf_table.sql | 8 + .../login/login-page/login_environment.ts | 18 +- .../Manufacturer/Manufacturer.component.html | 376 ++++++ .../Manufacturer/Manufacturer.component.scss | 78 ++ .../Manufacturer/Manufacturer.component.ts | 270 +++++ .../Manufacturer/Manufacturer.service.ts | 39 + .../Manufacturer/Manufacturer_cardvariable.ts | 4 + .../Order_estimation.component.html | 1024 +++++++++++++++++ .../Order_estimation.component.scss | 78 ++ .../Order_estimation.component.ts | 582 ++++++++++ .../Order_estimation.service.ts | 65 ++ .../Order_estimation_cardvariable.ts | 4 + .../Product/Product.component.html | 405 +++++++ .../Product/Product.component.scss | 78 ++ .../Product/Product.component.ts | 294 +++++ .../orderestimate/Product/Product.service.ts | 41 + .../Product/Product_cardvariable.ts | 4 + .../orderestimate/Type/Type.component.html | 376 ++++++ .../orderestimate/Type/Type.component.scss | 78 ++ .../orderestimate/Type/Type.component.ts | 270 +++++ .../orderestimate/Type/Type.service.ts | 39 + .../orderestimate/Type/Type_cardvariable.ts | 4 + .../app/modules/main/main-routing.module.ts | 16 + .../src/app/modules/main/main.module.ts | 16 + .../src/assets/i18n/en.json | 33 +- .../Builders/Services/BuilderService.java | 12 + .../Controllers/ManufacturerController.java | 99 ++ .../Manufacturer_ListFilter1Controller.java | 24 + .../Order_estimationController.java | 171 +++ .../Controllers/ProductController.java | 107 ++ .../Product_ListFilter1Controller.java | 24 + .../Controllers/TypeController.java | 99 ++ .../Type_ListFilter1Controller.java | 24 + .../tokenFree_ManufacturerController.java | 99 ++ ...ee_Manufacturer_ListFilter1Controller.java | 24 + .../tokenFree_Order_estimationController.java | 171 +++ .../tokenFree_ProductController.java | 107 ++ ...kenFree_Product_ListFilter1Controller.java | 24 + .../Controllers/tokenFree_TypeController.java | 99 ++ .../tokenFree_Type_ListFilter1Controller.java | 24 + .../orderestimate/Entity/Manufacturer.java | 33 + .../Entity/Manufacturer_ListFilter1.java | 14 + .../Entity/Order_estimation.java | 128 +++ .../realnet/orderestimate/Entity/Product.java | 37 + .../Entity/Product_ListFilter1.java | 14 + .../realnet/orderestimate/Entity/Type.java | 33 + .../Entity/Type_ListFilter1.java | 14 + .../Repository/ManufacturerRepository.java | 30 + .../Order_estimationRepository.java | 48 + .../Repository/ProductRepository.java | 32 + .../Repository/TypeRepository.java | 30 + .../Services/ManufacturerService.java | 93 ++ .../Manufacturer_ListFilter1Service.java | 51 + .../Services/Order_estimationService.java | 284 +++++ .../Services/ProductService.java | 103 ++ .../Services/Product_ListFilter1Service.java | 57 + .../orderestimate/Services/TypeService.java | 93 ++ .../Services/Type_ListFilter1Service.java | 51 + 58 files changed, 6439 insertions(+), 14 deletions(-) create mode 100755 test0rder101-orderestimationdb-d/authsec_mysql/mysql/wf_table/wf_table.sql create mode 100644 test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Manufacturer/Manufacturer.component.html create mode 100644 test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Manufacturer/Manufacturer.component.scss create mode 100644 test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Manufacturer/Manufacturer.component.ts create mode 100644 test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Manufacturer/Manufacturer.service.ts create mode 100644 test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Manufacturer/Manufacturer_cardvariable.ts create mode 100644 test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Order_estimation/Order_estimation.component.html create mode 100644 test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Order_estimation/Order_estimation.component.scss create mode 100644 test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Order_estimation/Order_estimation.component.ts create mode 100644 test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Order_estimation/Order_estimation.service.ts create mode 100644 test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Order_estimation/Order_estimation_cardvariable.ts create mode 100644 test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Product/Product.component.html create mode 100644 test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Product/Product.component.scss create mode 100644 test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Product/Product.component.ts create mode 100644 test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Product/Product.service.ts create mode 100644 test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Product/Product_cardvariable.ts create mode 100644 test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Type/Type.component.html create mode 100644 test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Type/Type.component.scss create mode 100644 test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Type/Type.component.ts create mode 100644 test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Type/Type.service.ts create mode 100644 test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Type/Type_cardvariable.ts create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/ManufacturerController.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/Manufacturer_ListFilter1Controller.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/Order_estimationController.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/ProductController.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/Product_ListFilter1Controller.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/TypeController.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/Type_ListFilter1Controller.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_ManufacturerController.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_Manufacturer_ListFilter1Controller.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_Order_estimationController.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_ProductController.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_Product_ListFilter1Controller.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_TypeController.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_Type_ListFilter1Controller.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Manufacturer.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Manufacturer_ListFilter1.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Order_estimation.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Product.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Product_ListFilter1.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Type.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Type_ListFilter1.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Repository/ManufacturerRepository.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Repository/Order_estimationRepository.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Repository/ProductRepository.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Repository/TypeRepository.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/ManufacturerService.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/Manufacturer_ListFilter1Service.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/Order_estimationService.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/ProductService.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/Product_ListFilter1Service.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/TypeService.java create mode 100644 test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/Type_ListFilter1Service.java diff --git a/test0rder101-orderestimationdb-d/authsec_mysql/mysql/wf_table/wf_table.sql b/test0rder101-orderestimationdb-d/authsec_mysql/mysql/wf_table/wf_table.sql new file mode 100755 index 0000000..7d4ed64 --- /dev/null +++ b/test0rder101-orderestimationdb-d/authsec_mysql/mysql/wf_table/wf_table.sql @@ -0,0 +1,8 @@ +CREATE TABLE orderestimationdb.Order_estimation(id BIGINT NOT NULL AUTO_INCREMENT, dg_monitoring_-_without_fuel bit(1), apfc_panel_monitoring bit(1), customer_name VARCHAR(400), active_energy bit(1), email_address VARCHAR(400), water_management_-_water_monitoring bit(1), contact_person VARCHAR(400), product VARCHAR(400), quantity int, phone_number VARCHAR(400), compressed_air_-_lpg/n2/o2/co2 bit(1), water_management_-_stp/etp bit(1), ups_monitoring bit(1), lt_panel_monitoring bit(1), water_management_-water_quality bit(1), type int, price int, busbar_monitoring bit(1), manufacturer int, ht_panel_monitoring bit(1), compressed_air_-_gas_monitoring bit(1), customer_address VARCHAR(400), deployment_type VARCHAR(400), dg_monitoring_-_with_fuel bit(1), PRIMARY KEY (id)); + +CREATE TABLE orderestimationdb.Manufacturer(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), description VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE orderestimationdb.Type(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), description VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id)); + +CREATE TABLE orderestimationdb.Product(id BIGINT NOT NULL AUTO_INCREMENT, active VARCHAR(400), description VARCHAR(400), type_name VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id)); + diff --git a/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/login/login-page/login_environment.ts b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/login/login-page/login_environment.ts index 231b3a1..fdff417 100644 --- a/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/login/login-page/login_environment.ts +++ b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/login/login-page/login_environment.ts @@ -2,14 +2,14 @@ export const LoginEnvironment = { - "templateNo": "", - "loginHeading": "", - "loginHeading2": "", - "isSignup": "", - "loginSignup": " ", - "loginSignup2": "", - "loginForgotpass": "", - "loginImage": "", - "loginImageURL": "" + "templateNo": "Template 1", + "loginHeading": "Welcome to", + "loginHeading2": "io8.dev", + "isSignup": "true", + "loginSignup": "Use your ID to sign in OR ", + "loginSignup2": "create one now", + "loginForgotpass": "FORGOT PASSWORD?", + "loginImage": "[]", + "loginImageURL": "null" } diff --git a/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Manufacturer/Manufacturer.component.html b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Manufacturer/Manufacturer.component.html new file mode 100644 index 0000000..b0bad33 --- /dev/null +++ b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Manufacturer/Manufacturer.component.html @@ -0,0 +1,376 @@ + +
+
+
+

Manufacturer

+
+
+ + + +
+ + + + 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/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Manufacturer/Manufacturer.component.scss b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Manufacturer/Manufacturer.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Manufacturer/Manufacturer.component.scss @@ -0,0 +1,78 @@ +//@import "../../../../assets/scss/var"; +.s-info-bar { + display: flex; + flex-direction: row; + justify-content: space-between; + button { + outline: none; + } +} +.delete,.heading{ + text-align: center; + color: red; +} +.entry-pg { + width: 750px; +} + +.button1::after { + content: none; +} +.button1:hover::after { + content: "ADD ROWS"; +} + +.section { + background-color: #dddddd; + height: 40px; +} + +.section p { + //color: white; + padding: 10px; + font-size: 18px; +} + +.clr-input { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + padding: 0.75rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.clr-file { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + //padding: 0.6rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.center { + text-align: center; +} +select{ + width: 100%; + margin-top: 3px; + padding: 5px 5px; + border: 1px solid #ccc; + border-radius: 4px; +} +input[type=text],[type=date],[type=number],textarea { + width: 100%; + padding: 15px 15px; + background-color:rgb(255, 255, 255); + // margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} +.error_mess { + color: red; +} diff --git a/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Manufacturer/Manufacturer.component.ts b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Manufacturer/Manufacturer.component.ts new file mode 100644 index 0000000..a4062cf --- /dev/null +++ b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Manufacturer/Manufacturer.component.ts @@ -0,0 +1,270 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Manufacturerservice} from './Manufacturer.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 { Manufacturercardvariable } from './Manufacturer_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Manufacturer', + templateUrl: './Manufacturer.component.html', + styleUrls: ['./Manufacturer.component.scss'] +}) +export class ManufacturerComponent implements OnInit { + cardButton = Manufacturercardvariable.cardButton; + cardmodeldata = Manufacturercardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Manufacturercardvariable.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 = 'Manufacturer_formCode' +tableName = 'Manufacturer'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Manufacturerservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + ) { } +// 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 === "Manufacturer_formCode"); + console.log(this.checkFormCode); + console.log(this.additionalFieldsFromBackend); + if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { + this.additionalFieldsFromBackend.forEach(field => { + if (field.formCode === this.formcode) { + if (!this.entryForm.contains(field.extValue)) { + // Add the control only if it doesn't exist in the form + this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); + } + } + }); + } + }); + console.log(this.entryForm.value); + // form code end + + + + + + + + } + + + + + + + error; + getData() { + this.mainService.getAll().subscribe((data) => { + console.log(data); + this.product = data; + if(this.product.length==0){ + this.error="No Data Available" + } + },(error) => { + console.log(error); + if(error){ + this.error="Server Error"; + } + }); + } + onEdit(row) { + this.rowSelected = row; + + + + + + + + this.modalEdit = true; + } + onDelete(row) { + this.rowSelected = row; + this.modaldelete=true; + } + delete(id) + { + this.modaldelete = false; + console.log("in delete "+id); + this.mainService.delete(id).subscribe( + (data) => { + console.log(data); + this.ngOnInit(); + if (data) { this.toastr.success('Deleted successfully'); } + }); + } + onUpdate(id) { + this.modalEdit = false; + + + + + + + //console.log("in update"); + console.log("id " + id); + console.log(this.rowSelected); + //console.log("out update"); + this.mainService.update(id, this.rowSelected).subscribe( + (data) => { + console.log(data); + if (data || data.status >= 200 && data.status <= 299) { + this.toastr.success("Update Successfully"); + } +setTimeout(() => { + this.ngOnInit(); + }, 500); + + + + + + + }, (error) => { + console.log(error); + if (error.status >= 200 && error.status <= 299) { + // this.toastr.success("update Succesfully"); + } + if (error.status >= 400 && error.status <= 499) { + this.toastr.error("Not Updated"); + } + if (error.status >= 500 && error.status <= 599) { + this.toastr.error("Not Updated"); + } + }); + setTimeout(() => { + this.ngOnInit(); + }, 500); + } +onCreate() { + this.modalAdd=false; + + + + + + + this.mainService.create(this.entryForm.value).subscribe( + (data) => { + console.log(data); + if (data || data.status >= 200 && data.status <= 299) { + this.toastr.success("Added Successfully"); + } +setTimeout(() => { + this.ngOnInit(); + }, 500); + + + + + + + }, (error) => { + console.log(error); + if (error.status >= 200 && error.status <= 299) { + // this.toastr.success("Added Succesfully"); + } + if (error.status >= 400 && error.status <= 499) { + this.toastr.error("Not Added"); + } + if (error.status >= 500 && error.status <= 599) { + this.toastr.error("Not Added"); + } + }); + setTimeout(() => { + this.ngOnInit(); + }, 500); + } + goToAdd(row) { +this.modalAdd = true; this.submitted = false; + + + + + + + } + submitted = false; +onSubmit() { + console.log(this.entryForm.value); + this.submitted = true; + if (this.entryForm.invalid) { + return; + }this.onCreate(); + +} + + +rsModaldescription = false; +goToReplaceStringdescription(row){ +this.rowSelected = row; this.rsModaldescription =true; } + + + +// updateaction +} + + + + + diff --git a/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Manufacturer/Manufacturer.service.ts b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Manufacturer/Manufacturer.service.ts new file mode 100644 index 0000000..fbdeb30 --- /dev/null +++ b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Manufacturer/Manufacturer.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 Manufacturerservice{ + private baseURL = "Manufacturer/Manufacturer" ; 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/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Manufacturer/Manufacturer_cardvariable.ts b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Manufacturer/Manufacturer_cardvariable.ts new file mode 100644 index 0000000..d57ae46 --- /dev/null +++ b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Manufacturer/Manufacturer_cardvariable.ts @@ -0,0 +1,4 @@ +export const Manufacturercardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Order_estimation/Order_estimation.component.html b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Order_estimation/Order_estimation.component.html new file mode 100644 index 0000000..e8e3e2c --- /dev/null +++ b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Order_estimation/Order_estimation.component.html @@ -0,0 +1,1024 @@ + +
+
+
+

Order Estimation

+
+
+ + + +
+ + + + Loading ... + +
{{error}}
+
+ + Customer Name + + + + Contact Person + + + + Email Address + + + + Phone Number + + + + Customer Address + + + + Deployment Type + + + + + + active_energy + + + + + dg_monitoring___with_fuel + + + + + dg_monitoring___without_fuel + + + + + ups_monitoring + + + + + apfc_panel_monitoring + + + + + busbar_monitoring + + + + + water_management___stp_etp + + + + + lt_panel_monitoring + + + + + ht_panel_monitoring + + + + + compressed_air___gas_monitoring + + + + + compressed_air___lpg_n2_o2_co2 + + + + + water_management___water_monitoring + + + + + water_management__water_quality + + + + + + + Manufacturer + + + + Type + + + + Product + + + + Price + + + + Quantity + + + + + + Action + + + + + +{{user.customer_name }} + + +{{user.contact_person }} + + +{{user.email_address }} + + +{{user.phone_number }} + + + + + + +{{user.deployment_type }} + + + + +{{user. active_energy}} + + + +{{user. dg_monitoring___with_fuel}} + + + +{{user. dg_monitoring___without_fuel}} + + + +{{user. ups_monitoring}} + + + +{{user. apfc_panel_monitoring}} + + + +{{user. busbar_monitoring}} + + + +{{user. lt_panel_monitoring}} + + + +{{user. ht_panel_monitoring}} + + + +{{user. water_management___stp_etp}} + + + +{{user. compressed_air___gas_monitoring}} + + + +{{user. compressed_air___lpg_n2_o2_co2}} + + + +{{user. water_management___water_monitoring}} + + + +{{user. water_management__water_quality}} + + + + + +{{user. manufacturername }} + + +{{user. typename }} + + +{{user.product }} + + +{{user.price }} + + +{{user.quantity }} + + + + + + + +
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/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Order_estimation/Order_estimation.component.scss b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Order_estimation/Order_estimation.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Order_estimation/Order_estimation.component.scss @@ -0,0 +1,78 @@ +//@import "../../../../assets/scss/var"; +.s-info-bar { + display: flex; + flex-direction: row; + justify-content: space-between; + button { + outline: none; + } +} +.delete,.heading{ + text-align: center; + color: red; +} +.entry-pg { + width: 750px; +} + +.button1::after { + content: none; +} +.button1:hover::after { + content: "ADD ROWS"; +} + +.section { + background-color: #dddddd; + height: 40px; +} + +.section p { + //color: white; + padding: 10px; + font-size: 18px; +} + +.clr-input { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + padding: 0.75rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.clr-file { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + //padding: 0.6rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.center { + text-align: center; +} +select{ + width: 100%; + margin-top: 3px; + padding: 5px 5px; + border: 1px solid #ccc; + border-radius: 4px; +} +input[type=text],[type=date],[type=number],textarea { + width: 100%; + padding: 15px 15px; + background-color:rgb(255, 255, 255); + // margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} +.error_mess { + color: red; +} diff --git a/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Order_estimation/Order_estimation.component.ts b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Order_estimation/Order_estimation.component.ts new file mode 100644 index 0000000..0c6534c --- /dev/null +++ b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Order_estimation/Order_estimation.component.ts @@ -0,0 +1,582 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Order_estimationservice} from './Order_estimation.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 { Order_estimationcardvariable } from './Order_estimation_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Order_estimation', + templateUrl: './Order_estimation.component.html', + styleUrls: ['./Order_estimation.component.scss'] +}) +export class Order_estimationComponent implements OnInit { + cardButton = Order_estimationcardvariable.cardButton; + cardmodeldata = Order_estimationcardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Order_estimationcardvariable.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 = 'Order_estimation_formCode' +tableName = 'Order_estimation'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Order_estimationservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + ) { } +// 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({ +customer_name : [null], + +contact_person : [null], + +email_address : [null], + +phone_number: ['+91'], + +customer_address : [null], + +deployment_type : [null], + + + +ht_panel_monitoring:[false], + + + +active_energy:[false], + + + +dg_monitoring___with_fuel:[false], + + + +dg_monitoring___without_fuel:[false], + + + +ups_monitoring:[false], + + + +apfc_panel_monitoring:[false], + + + +busbar_monitoring:[false], + + + +water_management__water_quality:[false], + + + +lt_panel_monitoring:[false], + + + +water_management___stp_etp:[false], + + + +compressed_air___gas_monitoring:[false], + + + +compressed_air___lpg_n2_o2_co2:[false], + + + +water_management___water_monitoring:[false], + + + +manufacturer : [null], + +type : [null], + +product : [null], + + +price : [null,[Validators.required]], + +quantity : [null,[Validators.required]], + + + + + + + + + + + + + + + + + + + + + + + + + + + }); // 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 === "Order_estimation_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.getallmanufacturer(); + +this.getalltype(); + + + // Listen for country changes + + + this.entryForm.get('type')?.valueChanges.subscribe((item) => { + + + if (item) { + this.dependet2product(item); + } else { + this.productdependentData = []; + this.entryForm.get('product')?.setValue(null); // clear state + } + }); + + + + + + + + } + + + + + + + + + + + + + + + + + + + + + + + + + error; + getData() { + this.mainService.getAll().subscribe((data) => { + console.log(data); + this.product = data; + if(this.product.length==0){ + this.error="No Data Available" + } + },(error) => { + console.log(error); + if(error){ + this.error="Server Error"; + } + }); + } + onEdit(row) { + this.rowSelected = row; + + + + + + + + + + + + + + + + + + +// Dependemt Dropdown field start +this.dependet2product(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; + + + + + + + + + + + + + + + + + + + + + + + + + //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(); + +} + + + + +isValidemail_address(email: string): boolean { + const emailPattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/; + return emailPattern.test(email); } + +isValidPhone_number(phone: string): boolean { + const phonePattern = /^(\+[1-9][0-9]{0,2})?[1-9][0-9]{9}$/; + return phonePattern.test(phone); +} + +rsModalcustomer_address = false; +goToReplaceStringcustomer_address(row){ +this.rowSelected = row; this.rsModalcustomer_address =true; } + + + + + +selectmanufacturer ; +getallmanufacturer() { + this.mainService.getAllmanufacturer().subscribe(data=>{ +this.selectmanufacturer = data; +console.log(data); +},(error) => { console.log(error); }); } + +selecttype ; +getalltype() { + this.mainService.getAlltype().subscribe(data=>{ +this.selecttype = data; +console.log(data); +},(error) => { console.log(error); }); } + +// Dependemt Dropdown field start + + + productdependentData: any; +dependet2product (item){ + this.mainService.getproductDependent(item).subscribe( (data) => { + console.log(data); + this.productdependentData = data; + },(error) => { console.log(error); }); + } + + + // DependemtDropdown field end + + + + + +// updateaction +} + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Order_estimation/Order_estimation.service.ts b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Order_estimation/Order_estimation.service.ts new file mode 100644 index 0000000..3779b4c --- /dev/null +++ b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Order_estimation/Order_estimation.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 Order_estimationservice{ + private baseURL = "Order_estimation/Order_estimation" ; 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); + } + + + + + + + + + + + + + + +getAllmanufacturer(): Observable { +return this.apiRequest.get("Manufacturer_ListFilter1/Manufacturer_ListFilter1"); } + +getAlltype(): Observable { +return this.apiRequest.get("Type_ListFilter1/Type_ListFilter1"); } + + + + getproductDependent(field: string): Observable { + return this.apiRequest.get("Product_ListFilter1/Product_ListFilter11/" + field); + } + + + + + + + +// updateaction +} \ No newline at end of file diff --git a/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Order_estimation/Order_estimation_cardvariable.ts b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Order_estimation/Order_estimation_cardvariable.ts new file mode 100644 index 0000000..00b5008 --- /dev/null +++ b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Order_estimation/Order_estimation_cardvariable.ts @@ -0,0 +1,4 @@ +export const Order_estimationcardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Product/Product.component.html b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Product/Product.component.html new file mode 100644 index 0000000..d77a4df --- /dev/null +++ b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Product/Product.component.html @@ -0,0 +1,405 @@ + +
+
+
+

Product

+
+
+ + + +
+ + + + Loading ... + +
{{error}}
+
+ + Name + + + + Description + + + + Active + + + + Type name + + + + + + Action + + + + + +{{user.name }} + + + + + + +{{user.active }} + + +{{user.type_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/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Product/Product.component.scss b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Product/Product.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Product/Product.component.scss @@ -0,0 +1,78 @@ +//@import "../../../../assets/scss/var"; +.s-info-bar { + display: flex; + flex-direction: row; + justify-content: space-between; + button { + outline: none; + } +} +.delete,.heading{ + text-align: center; + color: red; +} +.entry-pg { + width: 750px; +} + +.button1::after { + content: none; +} +.button1:hover::after { + content: "ADD ROWS"; +} + +.section { + background-color: #dddddd; + height: 40px; +} + +.section p { + //color: white; + padding: 10px; + font-size: 18px; +} + +.clr-input { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + padding: 0.75rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.clr-file { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + //padding: 0.6rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.center { + text-align: center; +} +select{ + width: 100%; + margin-top: 3px; + padding: 5px 5px; + border: 1px solid #ccc; + border-radius: 4px; +} +input[type=text],[type=date],[type=number],textarea { + width: 100%; + padding: 15px 15px; + background-color:rgb(255, 255, 255); + // margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} +.error_mess { + color: red; +} diff --git a/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Product/Product.component.ts b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Product/Product.component.ts new file mode 100644 index 0000000..3ca40a4 --- /dev/null +++ b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Product/Product.component.ts @@ -0,0 +1,294 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Productservice} from './Product.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 { Productcardvariable } from './Product_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Product', + templateUrl: './Product.component.html', + styleUrls: ['./Product.component.scss'] +}) +export class ProductComponent implements OnInit { + cardButton = Productcardvariable.cardButton; + cardmodeldata = Productcardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Productcardvariable.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 = 'Product_formCode' +tableName = 'Product'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Productservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + ) { } +// 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], + +type_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 === "Product_formCode"); + console.log(this.checkFormCode); + console.log(this.additionalFieldsFromBackend); + if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { + this.additionalFieldsFromBackend.forEach(field => { + if (field.formCode === this.formcode) { + if (!this.entryForm.contains(field.extValue)) { + // Add the control only if it doesn't exist in the form + this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); + } + } + }); + } + }); + console.log(this.entryForm.value); + // form code end + + + + + + + + + + } + + + + + + + + + error; + getData() { + this.mainService.getAll().subscribe((data) => { + console.log(data); + this.product = data; + if(this.product.length==0){ + this.error="No Data Available" + } + },(error) => { + console.log(error); + if(error){ + this.error="Server Error"; + } + }); + } + onEdit(row) { + this.rowSelected = row; + + + + + + + + + + this.modalEdit = true; + } + onDelete(row) { + this.rowSelected = row; + this.modaldelete=true; + } + delete(id) + { + this.modaldelete = false; + console.log("in delete "+id); + this.mainService.delete(id).subscribe( + (data) => { + console.log(data); + this.ngOnInit(); + if (data) { this.toastr.success('Deleted successfully'); } + }); + } + onUpdate(id) { + this.modalEdit = false; + + + + + + + + + //console.log("in update"); + console.log("id " + id); + console.log(this.rowSelected); + //console.log("out update"); + this.mainService.update(id, this.rowSelected).subscribe( + (data) => { + console.log(data); + if (data || data.status >= 200 && data.status <= 299) { + this.toastr.success("Update Successfully"); + } +setTimeout(() => { + this.ngOnInit(); + }, 500); + + + + + + + + + }, (error) => { + console.log(error); + if (error.status >= 200 && error.status <= 299) { + // this.toastr.success("update Succesfully"); + } + if (error.status >= 400 && error.status <= 499) { + this.toastr.error("Not Updated"); + } + if (error.status >= 500 && error.status <= 599) { + this.toastr.error("Not Updated"); + } + }); + setTimeout(() => { + this.ngOnInit(); + }, 500); + } +onCreate() { + this.modalAdd=false; + + + + + + + + + this.mainService.create(this.entryForm.value).subscribe( + (data) => { + console.log(data); + if (data || data.status >= 200 && data.status <= 299) { + this.toastr.success("Added Successfully"); + } +setTimeout(() => { + this.ngOnInit(); + }, 500); + + + + + + + + + }, (error) => { + console.log(error); + if (error.status >= 200 && error.status <= 299) { + // this.toastr.success("Added Succesfully"); + } + if (error.status >= 400 && error.status <= 499) { + this.toastr.error("Not Added"); + } + if (error.status >= 500 && error.status <= 599) { + this.toastr.error("Not Added"); + } + }); + setTimeout(() => { + this.ngOnInit(); + }, 500); + } + goToAdd(row) { +this.modalAdd = true; this.submitted = false; + + + + + + + + + } + submitted = false; +onSubmit() { + console.log(this.entryForm.value); + this.submitted = true; + if (this.entryForm.invalid) { + return; + }this.onCreate(); + +} + + +rsModaldescription = false; +goToReplaceStringdescription(row){ +this.rowSelected = row; this.rsModaldescription =true; } + + + + + +// updateaction +} + + + + + + + diff --git a/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Product/Product.service.ts b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Product/Product.service.ts new file mode 100644 index 0000000..9e151c1 --- /dev/null +++ b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Product/Product.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 Productservice{ + private baseURL = "Product/Product" ; 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/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Product/Product_cardvariable.ts b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Product/Product_cardvariable.ts new file mode 100644 index 0000000..d01e2f1 --- /dev/null +++ b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Product/Product_cardvariable.ts @@ -0,0 +1,4 @@ +export const Productcardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Type/Type.component.html b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Type/Type.component.html new file mode 100644 index 0000000..cca9a25 --- /dev/null +++ b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Type/Type.component.html @@ -0,0 +1,376 @@ + +
+
+
+

Type

+
+
+ + + +
+ + + + 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/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Type/Type.component.scss b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Type/Type.component.scss new file mode 100644 index 0000000..c47b921 --- /dev/null +++ b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Type/Type.component.scss @@ -0,0 +1,78 @@ +//@import "../../../../assets/scss/var"; +.s-info-bar { + display: flex; + flex-direction: row; + justify-content: space-between; + button { + outline: none; + } +} +.delete,.heading{ + text-align: center; + color: red; +} +.entry-pg { + width: 750px; +} + +.button1::after { + content: none; +} +.button1:hover::after { + content: "ADD ROWS"; +} + +.section { + background-color: #dddddd; + height: 40px; +} + +.section p { + //color: white; + padding: 10px; + font-size: 18px; +} + +.clr-input { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + padding: 0.75rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.clr-file { + color: #212529; + border: 1px solid #ced4da; + border-radius: 0.25rem; + //padding: 0.6rem 0.75rem; + margin-top: 3px; + width: 100%; + margin-bottom: 10px; +} + +.center { + text-align: center; +} +select{ + width: 100%; + margin-top: 3px; + padding: 5px 5px; + border: 1px solid #ccc; + border-radius: 4px; +} +input[type=text],[type=date],[type=number],textarea { + width: 100%; + padding: 15px 15px; + background-color:rgb(255, 255, 255); + // margin: 8px 0; + display: inline-block; + border: 1px solid #ccc; + border-radius: 4px; + box-sizing: border-box; +} +.error_mess { + color: red; +} diff --git a/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Type/Type.component.ts b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Type/Type.component.ts new file mode 100644 index 0000000..c7987ff --- /dev/null +++ b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Type/Type.component.ts @@ -0,0 +1,270 @@ +import { Component, OnInit } from '@angular/core'; +import { ToastrService } from 'ngx-toastr'; +import { AlertService } from 'src/app/services/alert.service'; +import { Typeservice} from './Type.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 { Typecardvariable } from './Type_cardvariable'; +import { UserInfoService } from 'src/app/services/user-info.service'; +declare var JsBarcode: any; +@Component({ + selector: 'app-Type', + templateUrl: './Type.component.html', + styleUrls: ['./Type.component.scss'] +}) +export class TypeComponent implements OnInit { + cardButton = Typecardvariable.cardButton; + cardmodeldata = Typecardvariable.cardmodeldata; + public dashboardArray: DashboardContentModel2[]; + isCardview = Typecardvariable.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 = 'Type_formCode' +tableName = 'Type'; checkFormCode; selected: any[] = []; constructor( + private extensionService: ExtensionService, +private userInfoService:UserInfoService, + private mainService:Typeservice, + private alertService: AlertService, + private toastr: ToastrService, + private _fb: FormBuilder, + ) { } +// 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 === "Type_formCode"); + console.log(this.checkFormCode); + console.log(this.additionalFieldsFromBackend); + if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) { + this.additionalFieldsFromBackend.forEach(field => { + if (field.formCode === this.formcode) { + if (!this.entryForm.contains(field.extValue)) { + // Add the control only if it doesn't exist in the form + this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue)); + } + } + }); + } + }); + console.log(this.entryForm.value); + // form code end + + + + + + + + } + + + + + + + error; + getData() { + this.mainService.getAll().subscribe((data) => { + console.log(data); + this.product = data; + if(this.product.length==0){ + this.error="No Data Available" + } + },(error) => { + console.log(error); + if(error){ + this.error="Server Error"; + } + }); + } + onEdit(row) { + this.rowSelected = row; + + + + + + + + this.modalEdit = true; + } + onDelete(row) { + this.rowSelected = row; + this.modaldelete=true; + } + delete(id) + { + this.modaldelete = false; + console.log("in delete "+id); + this.mainService.delete(id).subscribe( + (data) => { + console.log(data); + this.ngOnInit(); + if (data) { this.toastr.success('Deleted successfully'); } + }); + } + onUpdate(id) { + this.modalEdit = false; + + + + + + + //console.log("in update"); + console.log("id " + id); + console.log(this.rowSelected); + //console.log("out update"); + this.mainService.update(id, this.rowSelected).subscribe( + (data) => { + console.log(data); + if (data || data.status >= 200 && data.status <= 299) { + this.toastr.success("Update Successfully"); + } +setTimeout(() => { + this.ngOnInit(); + }, 500); + + + + + + + }, (error) => { + console.log(error); + if (error.status >= 200 && error.status <= 299) { + // this.toastr.success("update Succesfully"); + } + if (error.status >= 400 && error.status <= 499) { + this.toastr.error("Not Updated"); + } + if (error.status >= 500 && error.status <= 599) { + this.toastr.error("Not Updated"); + } + }); + setTimeout(() => { + this.ngOnInit(); + }, 500); + } +onCreate() { + this.modalAdd=false; + + + + + + + this.mainService.create(this.entryForm.value).subscribe( + (data) => { + console.log(data); + if (data || data.status >= 200 && data.status <= 299) { + this.toastr.success("Added Successfully"); + } +setTimeout(() => { + this.ngOnInit(); + }, 500); + + + + + + + }, (error) => { + console.log(error); + if (error.status >= 200 && error.status <= 299) { + // this.toastr.success("Added Succesfully"); + } + if (error.status >= 400 && error.status <= 499) { + this.toastr.error("Not Added"); + } + if (error.status >= 500 && error.status <= 599) { + this.toastr.error("Not Added"); + } + }); + setTimeout(() => { + this.ngOnInit(); + }, 500); + } + goToAdd(row) { +this.modalAdd = true; this.submitted = false; + + + + + + + } + submitted = false; +onSubmit() { + console.log(this.entryForm.value); + this.submitted = true; + if (this.entryForm.invalid) { + return; + }this.onCreate(); + +} + + +rsModaldescription = false; +goToReplaceStringdescription(row){ +this.rowSelected = row; this.rsModaldescription =true; } + + + +// updateaction +} + + + + + diff --git a/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Type/Type.service.ts b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Type/Type.service.ts new file mode 100644 index 0000000..a5ce56d --- /dev/null +++ b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Type/Type.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 Typeservice{ + private baseURL = "Type/Type" ; 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/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Type/Type_cardvariable.ts b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Type/Type_cardvariable.ts new file mode 100644 index 0000000..0d6180d --- /dev/null +++ b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/BuilderComponents/orderestimate/Type/Type_cardvariable.ts @@ -0,0 +1,4 @@ +export const Typecardvariable = { + "cardButton": false, + "cardmodeldata": `` +} \ No newline at end of file diff --git a/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts index 7377c69..db31075 100644 --- a/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts +++ b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main-routing.module.ts @@ -1,3 +1,7 @@ +import { ProductComponent } from './BuilderComponents/orderestimate/Product/Product.component'; +import { TypeComponent } from './BuilderComponents/orderestimate/Type/Type.component'; +import { ManufacturerComponent } from './BuilderComponents/orderestimate/Manufacturer/Manufacturer.component'; +import { Order_estimationComponent } from './BuilderComponents/orderestimate/Order_estimation/Order_estimation.component'; import { SequencegenaratorComponent } from './fnd/sequencegenarator/sequencegenarator.component'; import { Component, NgModule } from '@angular/core'; @@ -256,6 +260,18 @@ const routes: Routes = [ // buildercomponents +{path:'Product',component:ProductComponent}, + + +{path:'Type',component:TypeComponent}, + + +{path:'Manufacturer',component:ManufacturerComponent}, + + +{path:'Order_estimation',component:Order_estimationComponent}, + + diff --git a/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts index ecbab3d..55e8442 100644 --- a/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts +++ b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/app/modules/main/main.module.ts @@ -1,3 +1,7 @@ +import { ProductComponent } from './BuilderComponents/orderestimate/Product/Product.component'; +import { TypeComponent } from './BuilderComponents/orderestimate/Type/Type.component'; +import { ManufacturerComponent } from './BuilderComponents/orderestimate/Manufacturer/Manufacturer.component'; +import { Order_estimationComponent } from './BuilderComponents/orderestimate/Order_estimation/Order_estimation.component'; import { CommonModule } from '@angular/common'; @@ -129,6 +133,18 @@ import { Stepper_workflowComponent } from './BuilderComponents/stepperworkflow/S // buildercomponents +ProductComponent, + + +TypeComponent, + + +ManufacturerComponent, + + +Order_estimationComponent, + + diff --git a/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json index ee15955..a0e7ccd 100644 --- a/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json +++ b/test0rder101-orderestimationfront-f/authsec_angular/frontend/angular-clarity-master/src/assets/i18n/en.json @@ -226,10 +226,33 @@ "MENU_ACTION_LINK": "Menu Action Link", "STATUS": "Status", "SUB_MENU": "Sub Menu", - "Active": "Active", + "DG_Monitoring_-_without_fuel": "DG_Monitoring_-_without_fuel", "Description": "Description", - "Fileupload_Field": "Fileupload_Field", - "Test22": "Test22", - "Test11": "Test11", - "Name": "Name" + "Customer_Name": "Customer_Name", + "Water_Management_-_Water_Monitoring": "Water_Management_-_Water_Monitoring", + "Contact_Person": "Contact_Person", + "Product": "Product", + "Phone_Number": "Phone_Number", + "Compressed_Air_-_LPG/N2/O2/CO2": "Compressed_Air_-_LPG/N2/O2/CO2", + "Name": "Name", + "Water_Management_-Water_Quality": "Water_Management_-Water_Quality", + "Manufacturer": "Manufacturer", + "Ht_Panel_Monitoring": "Ht_Panel_Monitoring", + "Compressed_Air_-_GAS_Monitoring": "Compressed_Air_-_GAS_Monitoring", + "Deployment_Type": "Deployment_Type", + "APFC_Panel_Monitoring": "APFC_Panel_Monitoring", + "Active_Energy": "Active_Energy", + "Email_Address": "Email_Address", + "Quantity": "Quantity", + "Water_Management_-_STP/ETP": "Water_Management_-_STP/ETP", + "UPS_Monitoring": "UPS_Monitoring", + "Lt_Panel_Monitoring": "Lt_Panel_Monitoring", + "Type": "Type", + "Active": "Active", + "Type_name": "Type_name", + "Price": "Price", + "Busbar_Monitoring": "Busbar_Monitoring", + "Customer_Address": "Customer_Address", + "Order_estimation": "Order_estimation", + "DG_Monitoring_-_with_fuel": "DG_Monitoring_-_with_fuel" } \ No newline at end of file diff --git a/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java index f9801fb..89ffb43 100644 --- a/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java @@ -69,6 +69,18 @@ public class BuilderService { executeDump(true); // ADD OTHER SERVICE +addCustomMenu( "Product","Product", "Transcations"); + + +addCustomMenu( "Type","Type", "Transcations"); + + +addCustomMenu( "Manufacturer","Manufacturer", "Transcations"); + + +addCustomMenu( "Order_estimation","Order_estimation", "Transcations"); + + System.out.println("dashboard and menu inserted..."); diff --git a/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/ManufacturerController.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/ManufacturerController.java new file mode 100644 index 0000000..98a84e6 --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/ManufacturerController.java @@ -0,0 +1,99 @@ +package com.realnet.orderestimate.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.orderestimate.Entity.Manufacturer; +import com.realnet.orderestimate.Services.ManufacturerService ; + + + + + + +@RequestMapping(value = "/Manufacturer") + @CrossOrigin("*") +@RestController +public class ManufacturerController { + @Autowired + private ManufacturerService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + @PostMapping("/Manufacturer") + public Manufacturer Savedata(@RequestBody Manufacturer data) { + Manufacturer save = Service.Savedata(data) ; + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Manufacturer/{id}") + public Manufacturer update(@RequestBody Manufacturer data,@PathVariable Integer id ) { + Manufacturer update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Manufacturer/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("/Manufacturer") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Manufacturer") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Manufacturer/{id}") + public Manufacturer getdetailsbyId(@PathVariable Integer id ) { + Manufacturer get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Manufacturer/{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/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/Manufacturer_ListFilter1Controller.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/Manufacturer_ListFilter1Controller.java new file mode 100644 index 0000000..5c07eae --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/Manufacturer_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.orderestimate.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.orderestimate.Entity.Manufacturer_ListFilter1; +import com.realnet.orderestimate.Services.Manufacturer_ListFilter1Service ; +@RequestMapping(value = "/Manufacturer_ListFilter1") +@RestController +public class Manufacturer_ListFilter1Controller { + + @Autowired + private Manufacturer_ListFilter1Service Service; + + @GetMapping("/Manufacturer_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Manufacturer_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/Order_estimationController.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/Order_estimationController.java new file mode 100644 index 0000000..3a47fc0 --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/Order_estimationController.java @@ -0,0 +1,171 @@ +package com.realnet.orderestimate.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.orderestimate.Entity.Order_estimation; +import com.realnet.orderestimate.Services.Order_estimationService ; + + + + + + + + + + + + + + + + + + + + + + + + +@RequestMapping(value = "/Order_estimation") + @CrossOrigin("*") +@RestController +public class Order_estimationController { + @Autowired + private Order_estimationService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + + + + + + + + + + + + + + + @PostMapping("/Order_estimation") + public Order_estimation Savedata(@RequestBody Order_estimation data) { + Order_estimation save = Service.Savedata(data) ; + + + + + + + + + + + + + + + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Order_estimation/{id}") + public Order_estimation update(@RequestBody Order_estimation data,@PathVariable Integer id ) { + Order_estimation update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Order_estimation/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("/Order_estimation") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Order_estimation") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Order_estimation/{id}") + public Order_estimation getdetailsbyId(@PathVariable Integer id ) { + Order_estimation get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Order_estimation/{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/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/ProductController.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/ProductController.java new file mode 100644 index 0000000..a45a3c2 --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/ProductController.java @@ -0,0 +1,107 @@ +package com.realnet.orderestimate.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.orderestimate.Entity.Product; +import com.realnet.orderestimate.Services.ProductService ; + + + + + + + + +@RequestMapping(value = "/Product") + @CrossOrigin("*") +@RestController +public class ProductController { + @Autowired + private ProductService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + @PostMapping("/Product") + public Product Savedata(@RequestBody Product data) { + Product save = Service.Savedata(data) ; + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Product/{id}") + public Product update(@RequestBody Product data,@PathVariable Integer id ) { + Product update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Product/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("/Product") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Product") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Product/{id}") + public Product getdetailsbyId(@PathVariable Integer id ) { + Product get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Product/{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/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/Product_ListFilter1Controller.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/Product_ListFilter1Controller.java new file mode 100644 index 0000000..c2fc8ad --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/Product_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.orderestimate.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.orderestimate.Entity.Product_ListFilter1; +import com.realnet.orderestimate.Services.Product_ListFilter1Service ; +@RequestMapping(value = "/Product_ListFilter1") +@RestController +public class Product_ListFilter1Controller { + + @Autowired + private Product_ListFilter1Service Service; + + @GetMapping("/Product_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Product_ListFilter11/{item}") + public List getlistwithparam( @PathVariable String item) { + List get = Service.getlistbuilderparam( item); + return get; +} +} \ No newline at end of file diff --git a/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/TypeController.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/TypeController.java new file mode 100644 index 0000000..c2a2744 --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/TypeController.java @@ -0,0 +1,99 @@ +package com.realnet.orderestimate.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.orderestimate.Entity.Type; +import com.realnet.orderestimate.Services.TypeService ; + + + + + + +@RequestMapping(value = "/Type") + @CrossOrigin("*") +@RestController +public class TypeController { + @Autowired + private TypeService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + @PostMapping("/Type") + public Type Savedata(@RequestBody Type data) { + Type save = Service.Savedata(data) ; + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Type/{id}") + public Type update(@RequestBody Type data,@PathVariable Integer id ) { + Type update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Type/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("/Type") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Type") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Type/{id}") + public Type getdetailsbyId(@PathVariable Integer id ) { + Type get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Type/{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/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/Type_ListFilter1Controller.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/Type_ListFilter1Controller.java new file mode 100644 index 0000000..c1e7216 --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/Type_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.orderestimate.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.orderestimate.Entity.Type_ListFilter1; +import com.realnet.orderestimate.Services.Type_ListFilter1Service ; +@RequestMapping(value = "/Type_ListFilter1") +@RestController +public class Type_ListFilter1Controller { + + @Autowired + private Type_ListFilter1Service Service; + + @GetMapping("/Type_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Type_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_ManufacturerController.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_ManufacturerController.java new file mode 100644 index 0000000..11b0269 --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_ManufacturerController.java @@ -0,0 +1,99 @@ +package com.realnet.orderestimate.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.orderestimate.Entity.Manufacturer; +import com.realnet.orderestimate.Services.ManufacturerService ; + + + + + + +@RequestMapping(value = "/token/Manufacturer") + @CrossOrigin("*") +@RestController +public class tokenFree_ManufacturerController { + @Autowired + private ManufacturerService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + @PostMapping("/Manufacturer") + public Manufacturer Savedata(@RequestBody Manufacturer data) { + Manufacturer save = Service.Savedata(data) ; + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Manufacturer/{id}") + public Manufacturer update(@RequestBody Manufacturer data,@PathVariable Integer id ) { + Manufacturer update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Manufacturer/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("/Manufacturer") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Manufacturer") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Manufacturer/{id}") + public Manufacturer getdetailsbyId(@PathVariable Integer id ) { + Manufacturer get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Manufacturer/{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/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_Manufacturer_ListFilter1Controller.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_Manufacturer_ListFilter1Controller.java new file mode 100644 index 0000000..2ea21fb --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_Manufacturer_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.orderestimate.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.orderestimate.Entity.Manufacturer_ListFilter1; +import com.realnet.orderestimate.Services.Manufacturer_ListFilter1Service ; +@RequestMapping(value = "/token/Manufacturer_ListFilter1") +@RestController +public class tokenFree_Manufacturer_ListFilter1Controller { + + @Autowired + private Manufacturer_ListFilter1Service Service; + + @GetMapping("/Manufacturer_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Manufacturer_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_Order_estimationController.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_Order_estimationController.java new file mode 100644 index 0000000..01aa7e4 --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_Order_estimationController.java @@ -0,0 +1,171 @@ +package com.realnet.orderestimate.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.orderestimate.Entity.Order_estimation; +import com.realnet.orderestimate.Services.Order_estimationService ; + + + + + + + + + + + + + + + + + + + + + + + + +@RequestMapping(value = "/token/Order_estimation") + @CrossOrigin("*") +@RestController +public class tokenFree_Order_estimationController { + @Autowired + private Order_estimationService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + + + + + + + + + + + + + + + + + @PostMapping("/Order_estimation") + public Order_estimation Savedata(@RequestBody Order_estimation data) { + Order_estimation save = Service.Savedata(data) ; + + + + + + + + + + + + + + + + + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Order_estimation/{id}") + public Order_estimation update(@RequestBody Order_estimation data,@PathVariable Integer id ) { + Order_estimation update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Order_estimation/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("/Order_estimation") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Order_estimation") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Order_estimation/{id}") + public Order_estimation getdetailsbyId(@PathVariable Integer id ) { + Order_estimation get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Order_estimation/{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/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_ProductController.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_ProductController.java new file mode 100644 index 0000000..cf4ea8a --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_ProductController.java @@ -0,0 +1,107 @@ +package com.realnet.orderestimate.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.orderestimate.Entity.Product; +import com.realnet.orderestimate.Services.ProductService ; + + + + + + + + +@RequestMapping(value = "/token/Product") + @CrossOrigin("*") +@RestController +public class tokenFree_ProductController { + @Autowired + private ProductService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + + + @PostMapping("/Product") + public Product Savedata(@RequestBody Product data) { + Product save = Service.Savedata(data) ; + + + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Product/{id}") + public Product update(@RequestBody Product data,@PathVariable Integer id ) { + Product update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Product/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("/Product") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Product") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Product/{id}") + public Product getdetailsbyId(@PathVariable Integer id ) { + Product get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Product/{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/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_Product_ListFilter1Controller.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_Product_ListFilter1Controller.java new file mode 100644 index 0000000..6424f9d --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_Product_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.orderestimate.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.orderestimate.Entity.Product_ListFilter1; +import com.realnet.orderestimate.Services.Product_ListFilter1Service ; +@RequestMapping(value = "/token/Product_ListFilter1") +@RestController +public class tokenFree_Product_ListFilter1Controller { + + @Autowired + private Product_ListFilter1Service Service; + + @GetMapping("/Product_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Product_ListFilter11/{item}") + public List getlistwithparam( @PathVariable String item) { + List get = Service.getlistbuilderparam( item); + return get; +} +} \ No newline at end of file diff --git a/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_TypeController.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_TypeController.java new file mode 100644 index 0000000..7f4ec21 --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_TypeController.java @@ -0,0 +1,99 @@ +package com.realnet.orderestimate.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.orderestimate.Entity.Type; +import com.realnet.orderestimate.Services.TypeService ; + + + + + + +@RequestMapping(value = "/token/Type") + @CrossOrigin("*") +@RestController +public class tokenFree_TypeController { + @Autowired + private TypeService Service; + +@Value("${projectPath}") + private String projectPath; + + + + + + + + @PostMapping("/Type") + public Type Savedata(@RequestBody Type data) { + Type save = Service.Savedata(data) ; + + + + + + System.out.println("data saved..." + save); + + return save; + } +@PutMapping("/Type/{id}") + public Type update(@RequestBody Type data,@PathVariable Integer id ) { + Type update = Service.update(data,id); + System.out.println("data update..." + update); + return update; + } +// get all with pagination + @GetMapping("/Type/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("/Type") + public List getdetails() { + List get = Service.getdetails(); + return get; +} +// get all without authentication + + @GetMapping("/token/Type") + public List getallwioutsec() { + List get = Service.getdetails(); + return get; +} +@GetMapping("/Type/{id}") + public Type getdetailsbyId(@PathVariable Integer id ) { + Type get = Service.getdetailsbyId(id); + return get; + } +@DeleteMapping("/Type/{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/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_Type_ListFilter1Controller.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_Type_ListFilter1Controller.java new file mode 100644 index 0000000..8a2a0a0 --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Controllers/tokenFree_Type_ListFilter1Controller.java @@ -0,0 +1,24 @@ +package com.realnet.orderestimate.Controllers; +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.web.bind.annotation.*; +import com.realnet.orderestimate.Entity.Type_ListFilter1; +import com.realnet.orderestimate.Services.Type_ListFilter1Service ; +@RequestMapping(value = "/token/Type_ListFilter1") +@RestController +public class tokenFree_Type_ListFilter1Controller { + + @Autowired + private Type_ListFilter1Service Service; + + @GetMapping("/Type_ListFilter1") + public List getlist() { + List get = Service.getlistbuilder(); + return get; +} + @GetMapping("/Type_ListFilter11") + public List getlistwithparam( ) { + List get = Service.getlistbuilderparam( ); + return get; +} +} \ No newline at end of file diff --git a/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Manufacturer.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Manufacturer.java new file mode 100644 index 0000000..c155cf1 --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Manufacturer.java @@ -0,0 +1,33 @@ +package com.realnet.orderestimate.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + @Entity + @Data + public class Manufacturer 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/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Manufacturer_ListFilter1.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Manufacturer_ListFilter1.java new file mode 100644 index 0000000..6455e0d --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Manufacturer_ListFilter1.java @@ -0,0 +1,14 @@ +package com.realnet.orderestimate.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Data + public class Manufacturer_ListFilter1 { + + private Integer id; + + + private String name; +} diff --git a/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Order_estimation.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Order_estimation.java new file mode 100644 index 0000000..7c0c253 --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Order_estimation.java @@ -0,0 +1,128 @@ +package com.realnet.orderestimate.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + + + + + + + + + + + + + + + + + + @Entity + @Data + public class Order_estimation extends Extension { + /** + * + */ + private static final long serialVersionUID = 1L; + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + private Integer id; + +private String customer_name; + +private String contact_person; + +private String email_address; + + private String phone_number; + +@Column(length = 2000) +private String customer_address; + +private String deployment_type; + + + + +private boolean lt_panel_monitoring; + + + +private boolean active_energy; + + + +private boolean dg_monitoring___with_fuel; + + + +private boolean dg_monitoring___without_fuel; + + + +private boolean ups_monitoring; + + + +private boolean water_management___stp_etp; + + + +private boolean apfc_panel_monitoring; + + + +private boolean busbar_monitoring; + + + +private boolean ht_panel_monitoring; + + + +private boolean compressed_air___gas_monitoring; + + + +private boolean compressed_air___lpg_n2_o2_co2; + + + +private boolean water_management__water_quality; + + + +private boolean water_management___water_monitoring; + + + +private String manufacturer; +private String manufacturername; + +private String type; +private String typename; + +private String product; + + + + + +private int price; + +private int quantity; + + +} diff --git a/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Product.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Product.java new file mode 100644 index 0000000..c00bdcf --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Product.java @@ -0,0 +1,37 @@ +package com.realnet.orderestimate.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + + + @Entity + @Data + public class Product 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; + +private String type_name; + + +} diff --git a/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Product_ListFilter1.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Product_ListFilter1.java new file mode 100644 index 0000000..e0cb133 --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Product_ListFilter1.java @@ -0,0 +1,14 @@ +package com.realnet.orderestimate.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Data + public class Product_ListFilter1 { + + private Integer id; + + + private String name; +} diff --git a/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Type.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Type.java new file mode 100644 index 0000000..ec0721d --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Type.java @@ -0,0 +1,33 @@ +package com.realnet.orderestimate.Entity; + import lombok.*; +import com.realnet.WhoColumn.Entity.Extension; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + + + + + + @Entity + @Data + public class Type 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/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Type_ListFilter1.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Type_ListFilter1.java new file mode 100644 index 0000000..6f772de --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Entity/Type_ListFilter1.java @@ -0,0 +1,14 @@ +package com.realnet.orderestimate.Entity; + import lombok.*; + import javax.persistence.*; + import java.time.LocalDateTime; + import java.util.*; + + @Data + public class Type_ListFilter1 { + + private Integer id; + + + private String name; +} diff --git a/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Repository/ManufacturerRepository.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Repository/ManufacturerRepository.java new file mode 100644 index 0000000..2ee3bd3 --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Repository/ManufacturerRepository.java @@ -0,0 +1,30 @@ +package com.realnet.orderestimate.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.orderestimate.Entity.Manufacturer; + +@Repository +public interface ManufacturerRepository extends JpaRepository { + +@Query(value = "select * from manufacturer where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from manufacturer where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Repository/Order_estimationRepository.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Repository/Order_estimationRepository.java new file mode 100644 index 0000000..98c08a2 --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Repository/Order_estimationRepository.java @@ -0,0 +1,48 @@ +package com.realnet.orderestimate.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.orderestimate.Entity.Order_estimation; + +@Repository +public interface Order_estimationRepository extends JpaRepository { + +@Query(value = "select * from order_estimation where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from order_estimation where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Repository/ProductRepository.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Repository/ProductRepository.java new file mode 100644 index 0000000..e048bdf --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Repository/ProductRepository.java @@ -0,0 +1,32 @@ +package com.realnet.orderestimate.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.orderestimate.Entity.Product; + +@Repository +public interface ProductRepository extends JpaRepository { + +@Query(value = "select * from product where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from product where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Repository/TypeRepository.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Repository/TypeRepository.java new file mode 100644 index 0000000..cb4708d --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Repository/TypeRepository.java @@ -0,0 +1,30 @@ +package com.realnet.orderestimate.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.orderestimate.Entity.Type; + +@Repository +public interface TypeRepository extends JpaRepository { + +@Query(value = "select * from type where created_by=?1", nativeQuery = true) + List findAll(Long creayedBy); + +@Query(value = "select * from type where created_by=?1", nativeQuery = true) + Page findAll(Pageable page, Long creayedBy); +} \ No newline at end of file diff --git a/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/ManufacturerService.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/ManufacturerService.java new file mode 100644 index 0000000..54405f0 --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/ManufacturerService.java @@ -0,0 +1,93 @@ +package com.realnet.orderestimate.Services; +import com.realnet.orderestimate.Repository.ManufacturerRepository; +import com.realnet.orderestimate.Entity.Manufacturer +;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 ManufacturerService { +@Autowired +private ManufacturerRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + +public Manufacturer Savedata(Manufacturer data) { + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Manufacturer save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Manufacturer getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Manufacturer update(Manufacturer data,Integer id) { + Manufacturer old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + +final Manufacturer test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/Manufacturer_ListFilter1Service.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/Manufacturer_ListFilter1Service.java new file mode 100644 index 0000000..e0a7b3f --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/Manufacturer_ListFilter1Service.java @@ -0,0 +1,51 @@ +package com.realnet.orderestimate.Services; +import java.util.*; +import com.realnet.orderestimate.Repository.ManufacturerRepository; +import com.realnet.orderestimate.Entity.Manufacturer; + +import com.realnet.orderestimate.Entity.Manufacturer_ListFilter1; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class Manufacturer_ListFilter1Service { +@Autowired +private ManufacturerRepository Repository; + + + + + public List getlistbuilder() { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Manufacturer data : list) { +boolean isactive = data.isActive(); + + if (isactive) {{ +Manufacturer_ListFilter1 dummy = new Manufacturer_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + l.add(dummy); +}} +} +return l;} + + + + public List getlistbuilderparam( ) { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Manufacturer data : list) { +boolean isactive = data.isActive(); + + if (isactive) {{ +Manufacturer_ListFilter1 dummy = new Manufacturer_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + l.add(dummy); +}} +} +return l;} +} \ No newline at end of file diff --git a/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/Order_estimationService.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/Order_estimationService.java new file mode 100644 index 0000000..8d36117 --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/Order_estimationService.java @@ -0,0 +1,284 @@ +package com.realnet.orderestimate.Services; +import com.realnet.orderestimate.Repository.Order_estimationRepository; +import com.realnet.orderestimate.Entity.Order_estimation +;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.orderestimate.Entity.Manufacturer; +import com.realnet.orderestimate.Services.ManufacturerService; + + + +import com.realnet.orderestimate.Entity.Type; +import com.realnet.orderestimate.Services.TypeService; + + + + + + + + + + import org.springframework.stereotype.Service; + +@Service + public class Order_estimationService { +@Autowired +private Order_estimationRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + + + + + + + + + +@Autowired + private ManufacturerService manufacturerserv; + +@Autowired + private TypeService typeserv; + + + + + + + +public Order_estimation Savedata(Order_estimation data) { + + + + + + + + + + + + + + + + +if (data.getManufacturer() != null) { + try { + int manufacturerId = Integer.valueOf(data.getManufacturer()); +Manufacturer get = manufacturerserv.getdetailsbyId(manufacturerId); + if (get != null) { + + data.setManufacturername(get.getName()); +} +} catch (NumberFormatException e) { + System.out.println(" manufacturerId is not integer.."); + // Invalid integer string — ignore or log + } + + } + + + + + + +if (data.getType() != null) { + try { + int typeId = Integer.valueOf(data.getType()); +Type get = typeserv.getdetailsbyId(typeId); + if (get != null) { + + data.setTypename(get.getName()); +} +} catch (NumberFormatException e) { + System.out.println(" typeId is not integer.."); + // Invalid integer string — ignore or log + } + + } + + + + + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Order_estimation save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Order_estimation getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Order_estimation update(Order_estimation data,Integer id) { + Order_estimation old = Repository.findById(id).get(); +old.setCustomer_name(data.getCustomer_name()); + +old.setContact_person(data.getContact_person()); + +old.setEmail_address(data.getEmail_address()); + +old.setPhone_number(data.getPhone_number()); + +old.setCustomer_address(data.getCustomer_address()); + +old.setDeployment_type(data.getDeployment_type()); + + + +old.setApfc_panel_monitoring(data.isApfc_panel_monitoring()); + + + +old.setActive_energy(data.isActive_energy()); + + + +old.setDg_monitoring___with_fuel(data.isDg_monitoring___with_fuel()); + + + +old.setDg_monitoring___without_fuel(data.isDg_monitoring___without_fuel()); + + + +old.setWater_management__water_quality(data.isWater_management__water_quality()); + + + +old.setUps_monitoring(data.isUps_monitoring()); + + + +old.setBusbar_monitoring(data.isBusbar_monitoring()); + + + +old.setWater_management___stp_etp(data.isWater_management___stp_etp()); + + + +old.setLt_panel_monitoring(data.isLt_panel_monitoring()); + + + +old.setHt_panel_monitoring(data.isHt_panel_monitoring()); + + + +old.setCompressed_air___gas_monitoring(data.isCompressed_air___gas_monitoring()); + + + +old.setCompressed_air___lpg_n2_o2_co2(data.isCompressed_air___lpg_n2_o2_co2()); + + + +old.setWater_management___water_monitoring(data.isWater_management___water_monitoring()); + + + + + +old.setManufacturer(data.getManufacturer()); + +old.setType(data.getType()); + +old.setProduct(data.getProduct()); + + + + +old.setPrice(data.getPrice()); + +old.setQuantity(data.getQuantity()); + +final Order_estimation test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + + + + + + + + + + + + + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/ProductService.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/ProductService.java new file mode 100644 index 0000000..c491a8b --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/ProductService.java @@ -0,0 +1,103 @@ +package com.realnet.orderestimate.Services; +import com.realnet.orderestimate.Repository.ProductRepository; +import com.realnet.orderestimate.Entity.Product +;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 ProductService { +@Autowired +private ProductRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + + + +public Product Savedata(Product data) { + + + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Product save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Product getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Product update(Product data,Integer id) { + Product old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + +old.setType_name(data.getType_name()); + +final Product test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/Product_ListFilter1Service.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/Product_ListFilter1Service.java new file mode 100644 index 0000000..6602417 --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/Product_ListFilter1Service.java @@ -0,0 +1,57 @@ +package com.realnet.orderestimate.Services; +import java.util.*; +import com.realnet.orderestimate.Repository.ProductRepository; +import com.realnet.orderestimate.Entity.Product; + +import com.realnet.orderestimate.Entity.Product_ListFilter1; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class Product_ListFilter1Service { +@Autowired +private ProductRepository Repository; + + + + + public List getlistbuilder() { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Product data : list) { +boolean isactive = data.isActive(); + + if (isactive) {String Type_name = data.getType_name(); + System.out.println(Type_name + "\n"); + + if ("item".equals(Type_name)){ +Product_ListFilter1 dummy = new Product_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + l.add(dummy); +}} +} +return l;} + + + + public List getlistbuilderparam( String item) { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Product data : list) { +boolean isactive = data.isActive(); + + if (isactive) {String Type_name = data.getType_name(); + System.out.println(Type_name + "\n"); + + if (item.equals(Type_name)){ +Product_ListFilter1 dummy = new Product_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + l.add(dummy); +}} +} +return l;} +} \ No newline at end of file diff --git a/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/TypeService.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/TypeService.java new file mode 100644 index 0000000..656bc9c --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/TypeService.java @@ -0,0 +1,93 @@ +package com.realnet.orderestimate.Services; +import com.realnet.orderestimate.Repository.TypeRepository; +import com.realnet.orderestimate.Entity.Type +;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 TypeService { +@Autowired +private TypeRepository Repository; + @Autowired + private AppUserServiceImpl userService; +@Autowired + private RealmService realmService; + + + + + +public Type Savedata(Type data) { + + + + + + + data.setUpdatedBy(getUser().getUserId()); + data.setCreatedBy(getUser().getUserId()); + data.setAccountId(getUser().getAccount().getAccount_id()); +Type save = Repository.save(data); + return save; + } + + +// get all with pagination + public Page getAllWithPagination(Pageable page) { + return Repository.findAll(page, getUser().getUserId()); + } +public List getdetails() { + List realm = realmService.findByUserId(getUser().getUserId()); +List all = Repository.findAll(getUser().getUserId()); + + return all ; } + + +public Type getdetailsbyId(Integer id) { + return Repository.findById(id).get(); + } + + + public void delete_by_id(Integer id) { + Repository.deleteById(id); +} + + +public Type update(Type data,Integer id) { + Type old = Repository.findById(id).get(); +old.setName(data.getName()); + +old.setDescription(data.getDescription()); + +old.setActive (data.isActive()); + +final Type test = Repository.save(old); + data.setUpdatedBy(getUser().getUserId()); + return test;} + + + + + + + public AppUser getUser() { + AppUser user = userService.getLoggedInUser(); + return user; + + }} diff --git a/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/Type_ListFilter1Service.java b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/Type_ListFilter1Service.java new file mode 100644 index 0000000..fc980e8 --- /dev/null +++ b/test0rder101-testbackend-b/authsec_springboot/backend/src/main/java/com/realnet/orderestimate/Services/Type_ListFilter1Service.java @@ -0,0 +1,51 @@ +package com.realnet.orderestimate.Services; +import java.util.*; +import com.realnet.orderestimate.Repository.TypeRepository; +import com.realnet.orderestimate.Entity.Type; + +import com.realnet.orderestimate.Entity.Type_ListFilter1; +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; + import org.springframework.stereotype.Service; + +@Service + public class Type_ListFilter1Service { +@Autowired +private TypeRepository Repository; + + + + + public List getlistbuilder() { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Type data : list) { +boolean isactive = data.isActive(); + + if (isactive) {{ +Type_ListFilter1 dummy = new Type_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + l.add(dummy); +}} +} +return l;} + + + + public List getlistbuilderparam( ) { + List list= Repository.findAll(); + ArrayList l = new ArrayList<>(); + for (Type data : list) { +boolean isactive = data.isActive(); + + if (isactive) {{ +Type_ListFilter1 dummy = new Type_ListFilter1(); + dummy.setId(data.getId()); + dummy.setName(data.getName()); + l.add(dummy); +}} +} +return l;} +} \ No newline at end of file