From 5c087d0f01888b5421753f9cdbb6baaa2108901d Mon Sep 17 00:00:00 2001 From: risadmin_prod Date: Tue, 8 Oct 2024 11:40:10 +0000 Subject: [PATCH] build_app --- .../Builders/Services/BuilderService.java | 3 ++ .../basicp1/Controllers/FormaController.java | 8 ---- .../com/realnet/basicp1/Entity/Forma.java | 8 +--- .../basicp1/Repository/FormaRepository.java | 2 - .../basicp1/Services/FormaService.java | 10 ---- .../authsec_mysql/mysql/wf_table/wf_table.sql | 2 +- .../basicp1/Forma/Forma.component.html | 8 ---- .../basicp1/Forma/Forma.service.ts | 8 ++-- .../Forma/Formaadd/Formaadd.component.html | 26 +++------- .../Forma/Formaadd/Formaadd.component.ts | 44 ++++++----------- .../Forma/Formaedit/Formaedit.component.html | 27 +++-------- .../Forma/Formaedit/Formaedit.component.ts | 48 ++++++++----------- .../app/modules/main/main-routing.module.ts | 12 +++++ .../src/app/modules/main/main.module.ts | 12 +++++ 14 files changed, 80 insertions(+), 138 deletions(-) diff --git a/pro103ab-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java b/pro103ab-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java index 2f39862..483cccd 100644 --- a/pro103ab-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java +++ b/pro103ab-back-b/authsec_springboot/backend/src/main/java/com/realnet/Builders/Services/BuilderService.java @@ -72,6 +72,9 @@ public class BuilderService { addCustomMenu( "Forma", "Transcations"); +addCustomMenu( "Forma", "Transcations"); + + addCustomMenu( "Forma", "Transcations"); diff --git a/pro103ab-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/FormaController.java b/pro103ab-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/FormaController.java index b503262..0a3b7fb 100644 --- a/pro103ab-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/FormaController.java +++ b/pro103ab-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Controllers/FormaController.java @@ -19,8 +19,6 @@ import com.realnet.basicp1.Entity.Forma; import com.realnet.basicp1.Services.FormaService ; - - @RequestMapping(value = "/Forma") @CrossOrigin("*") @RestController @@ -33,14 +31,10 @@ public class FormaController { - - @PostMapping("/Forma") public Forma Savedata(@RequestBody Forma data) { Forma save = Service.Savedata(data) ; - - System.out.println("data saved..." + save); return save; @@ -86,6 +80,4 @@ public class FormaController { - - } \ No newline at end of file diff --git a/pro103ab-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Forma.java b/pro103ab-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Forma.java index ecca117..f0d4beb 100644 --- a/pro103ab-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Forma.java +++ b/pro103ab-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Entity/Forma.java @@ -7,8 +7,6 @@ import com.realnet.WhoColumn.Extension; - - @Entity @Data public class Forma extends Extension { @@ -21,10 +19,8 @@ import com.realnet.WhoColumn.Extension; @GeneratedValue(strategy = GenerationType.IDENTITY) private Integer id; -private String name; - -private String filetrerstname; -private String filetrerstpath ; +private String imagetestname; +private String imagetestpath ; } diff --git a/pro103ab-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/FormaRepository.java b/pro103ab-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/FormaRepository.java index 7133f31..2c20700 100644 --- a/pro103ab-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/FormaRepository.java +++ b/pro103ab-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Repository/FormaRepository.java @@ -7,8 +7,6 @@ import org.springframework.stereotype.Repository; import java.util.*; - - diff --git a/pro103ab-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/FormaService.java b/pro103ab-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/FormaService.java index f140dbd..ece7441 100644 --- a/pro103ab-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/FormaService.java +++ b/pro103ab-back-b/authsec_springboot/backend/src/main/java/com/realnet/basicp1/Services/FormaService.java @@ -13,8 +13,6 @@ import org.springframework.http.HttpStatus; import com.realnet.users.entity1.AppUser; - - import org.springframework.stereotype.Service; @Service @@ -24,13 +22,9 @@ private FormaRepository Repository; @Autowired private AppUserServiceImpl userService; - - public Forma Savedata(Forma data) { - - Forma save = Repository.save(data); return save; } @@ -57,16 +51,12 @@ public Forma getdetailsbyId(Integer id) { public Forma update(Forma data,Integer id) { Forma old = Repository.findById(id).get(); -old.setName(data.getName()); - final Forma test = Repository.save(old); return test;} - - public AppUser getUser() { AppUser user = userService.getLoggedInUser(); return user; diff --git a/pro103ab-db-d/authsec_mysql/mysql/wf_table/wf_table.sql b/pro103ab-db-d/authsec_mysql/mysql/wf_table/wf_table.sql index 0c0ca15..d0f28d6 100755 --- a/pro103ab-db-d/authsec_mysql/mysql/wf_table/wf_table.sql +++ b/pro103ab-db-d/authsec_mysql/mysql/wf_table/wf_table.sql @@ -1,2 +1,2 @@ -CREATE TABLE db.Forma(id BIGINT NOT NULL AUTO_INCREMENT, filetrerst VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id)); +CREATE TABLE db.Forma(id BIGINT NOT NULL AUTO_INCREMENT, imagetest VARCHAR(400), PRIMARY KEY (id)); diff --git a/pro103ab-front-f/authsec_angular_bootsstrap/angular-bootstrap/src/app/modules/main/BuilderComponents/basicp1/Forma/Forma.component.html b/pro103ab-front-f/authsec_angular_bootsstrap/angular-bootstrap/src/app/modules/main/BuilderComponents/basicp1/Forma/Forma.component.html index d48047d..48b5e99 100644 --- a/pro103ab-front-f/authsec_angular_bootsstrap/angular-bootstrap/src/app/modules/main/BuilderComponents/basicp1/Forma/Forma.component.html +++ b/pro103ab-front-f/authsec_angular_bootsstrap/angular-bootstrap/src/app/modules/main/BuilderComponents/basicp1/Forma/Forma.component.html @@ -24,18 +24,12 @@ -Name - - Action -{{data.name}} - - @@ -75,5 +69,3 @@ - - diff --git a/pro103ab-front-f/authsec_angular_bootsstrap/angular-bootstrap/src/app/modules/main/BuilderComponents/basicp1/Forma/Forma.service.ts b/pro103ab-front-f/authsec_angular_bootsstrap/angular-bootstrap/src/app/modules/main/BuilderComponents/basicp1/Forma/Forma.service.ts index 888b904..ce5b843 100644 --- a/pro103ab-front-f/authsec_angular_bootsstrap/angular-bootstrap/src/app/modules/main/BuilderComponents/basicp1/Forma/Forma.service.ts +++ b/pro103ab-front-f/authsec_angular_bootsstrap/angular-bootstrap/src/app/modules/main/BuilderComponents/basicp1/Forma/Forma.service.ts @@ -26,20 +26,18 @@ export class FormaService { const _http = this.baseURL + "/" + id; return this.apiRequest.delete(_http); } - - - uploadfilefiletrerst(ref:any, Forma:any, file:any): Observable{ + uploadImagetest(ref:any, Forma:any, file:any): Observable{ const formData = new FormData(); formData.append('file', file); return this.apiRequest.postFormData(`FileUpload/Uploadeddocs/${ref}/${Forma}`, formData); } - uploadfilegetByIdfiletrerst(ref:any, Forma:any,): Observable { + uploadImagetestgetById(ref:any, Forma:any,): Observable { return this.apiRequest.get(`FileUpload/Uploadeddocs/${ref}/${Forma}`); } - uploadfiledeletefiletrerst(id: number): Observable { + uploadImagetestdelete(id: number): Observable { return this.apiRequest.delete(`FileUpload/Uploadeddocs/${id}`); } diff --git a/pro103ab-front-f/authsec_angular_bootsstrap/angular-bootstrap/src/app/modules/main/BuilderComponents/basicp1/Forma/Formaadd/Formaadd.component.html b/pro103ab-front-f/authsec_angular_bootsstrap/angular-bootstrap/src/app/modules/main/BuilderComponents/basicp1/Forma/Formaadd/Formaadd.component.html index 60029fa..178b00f 100644 --- a/pro103ab-front-f/authsec_angular_bootsstrap/angular-bootstrap/src/app/modules/main/BuilderComponents/basicp1/Forma/Formaadd/Formaadd.component.html +++ b/pro103ab-front-f/authsec_angular_bootsstrap/angular-bootstrap/src/app/modules/main/BuilderComponents/basicp1/Forma/Formaadd/Formaadd.component.html @@ -2,27 +2,15 @@

Forma

Add Mode - -

-
- - -
-
*This field is Required
-
-
- - +
- - -
List of filetrerst
+
List of imagetest
@@ -36,14 +24,14 @@ - + - @@ -51,7 +39,7 @@ - @@ -68,5 +56,3 @@ - - diff --git a/pro103ab-front-f/authsec_angular_bootsstrap/angular-bootstrap/src/app/modules/main/BuilderComponents/basicp1/Forma/Formaadd/Formaadd.component.ts b/pro103ab-front-f/authsec_angular_bootsstrap/angular-bootstrap/src/app/modules/main/BuilderComponents/basicp1/Forma/Formaadd/Formaadd.component.ts index 62a8f72..1065413 100644 --- a/pro103ab-front-f/authsec_angular_bootsstrap/angular-bootstrap/src/app/modules/main/BuilderComponents/basicp1/Forma/Formaadd/Formaadd.component.ts +++ b/pro103ab-front-f/authsec_angular_bootsstrap/angular-bootstrap/src/app/modules/main/BuilderComponents/basicp1/Forma/Formaadd/Formaadd.component.ts @@ -32,20 +32,14 @@ tableName = 'Forma'; ngOnInit(): void { this.entryForm = this._fb.group({ -name :[null], - - - }); - - } givendata; getData(){ @@ -62,8 +56,6 @@ name :[null], return; } - - console.log(this.entryForm.value); this.mainservice.create(this.entryForm.value).subscribe(data => { @@ -72,11 +64,9 @@ name :[null], this.toastr.success("Added Successfully"); } +for (let i = 0; i < this.selectedimagetest.length; i++){ - -for (let i = 0; i < this.selectedfiletrerst.length; i++){ - - this.mainservice.uploadfilefiletrerst(data.id,this.tableName,this.selectedfiletrerst[i]).subscribe(uploaddata =>{ + this.mainservice.uploadimagetest(data.id,this.tableName,this.selectedimagetest[i]).subscribe(uploaddata =>{ console.log(uploaddata); }) } @@ -99,24 +89,22 @@ for (let i = 0; i < this.selectedfiletrerst.length; i++){ goback(){ this.router.navigate(["../Forma"], { relativeTo: this.route }); -} - -filePreviewfiletrerst: string | ArrayBuffer | null = null; -FileDatafiletrerst: {uploadedfile_name?:any, filePreview: string | ArrayBuffer | null }[] = []; // Initialize the array -selectedfiletrerst: File[]=[]; -public onFileChangedfiletrerst(event, index) { +}filePreviewimagetest: string | ArrayBuffer | null = null; +FileDataimagetest: {uploadedfile_name?:any, filePreview: string | ArrayBuffer | null }[] = []; // Initialize the array +selectedimagetest: File[]=[]; +public onFileChangedimagetest(event, index) { const files = event.target.files; for (let i = 0; i < files.length; i++) { const file = files[i]; - this.FileDatafiletrerst[index].uploadedfile_name = files[i].name; - this.selectedfiletrerst.push(files[i]); + this.FileDataimagetest[index].uploadedfile_name = files[i].name; + this.selectedimagetest.push(files[i]); if (file.type.startsWith('image/')) { const reader = new FileReader(); reader.onload = (e) => { // Set the file preview source const filePreview = e.target?.result as string; - this.FileDatafiletrerst[index] = { - ...this.FileDatafiletrerst[index], // Preserve existing properties + this.FileDataimagetest[index] = { + ...this.FileDataimagetest[index], // Preserve existing properties filePreview: filePreview // Update only the filePreview property }; }; @@ -124,19 +112,19 @@ public onFileChangedfiletrerst(event, index) { } } } - onAddLinesfiletrerst(){ - this.FileDatafiletrerst.push({ + onAddLinesimagetest(){ + this.FileDataimagetest.push({ uploadedfile_name: "", filePreview: "", // f3: "", }); } - deleteRowfiletrerst(index,id) { - this.FileDatafiletrerst.splice(index, 1); + deleteRowimagetest(index,id) { + this.FileDataimagetest.splice(index, 1); if(id){ - this.mainservice.uploadfiledeletefiletrerst(id).subscribe(data =>{ + this.mainservice.uploadfiledelete(id).subscribe(data =>{ console.log(data); }) } @@ -145,5 +133,3 @@ public onFileChangedfiletrerst(event, index) { } - - diff --git a/pro103ab-front-f/authsec_angular_bootsstrap/angular-bootstrap/src/app/modules/main/BuilderComponents/basicp1/Forma/Formaedit/Formaedit.component.html b/pro103ab-front-f/authsec_angular_bootsstrap/angular-bootstrap/src/app/modules/main/BuilderComponents/basicp1/Forma/Formaedit/Formaedit.component.html index 849b494..e7aa378 100644 --- a/pro103ab-front-f/authsec_angular_bootsstrap/angular-bootstrap/src/app/modules/main/BuilderComponents/basicp1/Forma/Formaedit/Formaedit.component.html +++ b/pro103ab-front-f/authsec_angular_bootsstrap/angular-bootstrap/src/app/modules/main/BuilderComponents/basicp1/Forma/Formaedit/Formaedit.component.html @@ -1,25 +1,14 @@

table_name

Edit Mode - -

-
- - -
- - -
- - -
List of filetrerst
+
List of imagetest
+ {{attach.uploadedfile_name}} File Preview - +
@@ -33,21 +22,21 @@ - + - - @@ -61,9 +50,7 @@ - - -
+ {{attach.uploadedfile_name}} File Preview - +