build_app

This commit is contained in:
risadmin_prod 2025-06-25 11:04:14 +00:00
parent 9c1716c885
commit fbd15370ee
20 changed files with 3451 additions and 14 deletions

View File

@ -69,6 +69,9 @@ public class BuilderService {
executeDump(true); executeDump(true);
// ADD OTHER SERVICE // ADD OTHER SERVICE
addCustomMenu( "Testa","Testa", "Transcations");
System.out.println("dashboard and menu inserted..."); System.out.println("dashboard and menu inserted...");

View File

@ -0,0 +1,203 @@
package com.realnet.basicp1.Controllers;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import com.fasterxml.jackson.core.JsonProcessingException;
import org.springframework.web.bind.annotation.CrossOrigin;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.realnet.config.EmailService;
import com.realnet.users.entity1.AppUser;
import com.realnet.users.service1.AppUserServiceImpl;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.data.domain.*;
import com.realnet.fnd.response.EntityResponse;
import org.springframework.http.*;
import org.springframework.beans.factory.annotation.*;
import com.realnet.basicp1.Entity.Testa;
import com.realnet.basicp1.Services.TestaService ;
@RequestMapping(value = "/Testa")
@CrossOrigin("*")
@RestController
public class TestaController {
@Autowired
private TestaService Service;
@Value("${projectPath}")
private String projectPath;
@PostMapping("/Testa")
public Testa Savedata(@RequestBody Testa data) {
Testa save = Service.Savedata(data) ;
System.out.println("data saved..." + save);
return save;
}
@PutMapping("/Testa/{id}")
public Testa update(@RequestBody Testa data,@PathVariable Integer id ) {
Testa update = Service.update(data,id);
System.out.println("data update..." + update);
return update;
}
// get all with pagination
@GetMapping("/Testa/getall/page")
public Page<Testa> getall(@RequestParam(value = "page", required = false) Integer page,
@RequestParam(value = "size", required = false) Integer size) {
Pageable paging = PageRequest.of(page, size);
Page<Testa> get = Service.getAllWithPagination(paging);
return get;
}
@GetMapping("/Testa")
public List<Testa> getdetails() {
List<Testa> get = Service.getdetails();
return get;
}
// get all without authentication
@GetMapping("/token/Testa")
public List<Testa> getallwioutsec() {
List<Testa> get = Service.getdetails();
return get;
}
@GetMapping("/Testa/{id}")
public Testa getdetailsbyId(@PathVariable Integer id ) {
Testa get = Service.getdetailsbyId(id);
return get;
}
@DeleteMapping("/Testa/{id}")
public ResponseEntity<?> delete_by_id(@PathVariable Integer id ) {
Service.delete_by_id(id);
return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK);
}
}

View File

@ -0,0 +1,24 @@
package com.realnet.basicp1.Controllers;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.realnet.basicp1.Entity.Testlist_ListFilter1;
import com.realnet.basicp1.Services.Testlist_ListFilter1Service ;
@RequestMapping(value = "/Testlist_ListFilter1")
@RestController
public class Testlist_ListFilter1Controller {
@Autowired
private Testlist_ListFilter1Service Service;
@GetMapping("/Testlist_ListFilter1")
public List<Testlist_ListFilter1> getlist() {
List<Testlist_ListFilter1> get = Service.getlistbuilder();
return get;
}
@GetMapping("/Testlist_ListFilter11")
public List<Testlist_ListFilter1> getlistwithparam( ) {
List<Testlist_ListFilter1> get = Service.getlistbuilderparam( );
return get;
}
}

View File

@ -0,0 +1,203 @@
package com.realnet.basicp1.Controllers;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import com.fasterxml.jackson.core.JsonProcessingException;
import org.springframework.web.bind.annotation.CrossOrigin;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.realnet.config.EmailService;
import com.realnet.users.entity1.AppUser;
import com.realnet.users.service1.AppUserServiceImpl;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.data.domain.*;
import com.realnet.fnd.response.EntityResponse;
import org.springframework.http.*;
import org.springframework.beans.factory.annotation.*;
import com.realnet.basicp1.Entity.Testa;
import com.realnet.basicp1.Services.TestaService ;
@RequestMapping(value = "/token/Testa")
@CrossOrigin("*")
@RestController
public class tokenFree_TestaController {
@Autowired
private TestaService Service;
@Value("${projectPath}")
private String projectPath;
@PostMapping("/Testa")
public Testa Savedata(@RequestBody Testa data) {
Testa save = Service.Savedata(data) ;
System.out.println("data saved..." + save);
return save;
}
@PutMapping("/Testa/{id}")
public Testa update(@RequestBody Testa data,@PathVariable Integer id ) {
Testa update = Service.update(data,id);
System.out.println("data update..." + update);
return update;
}
// get all with pagination
@GetMapping("/Testa/getall/page")
public Page<Testa> getall(@RequestParam(value = "page", required = false) Integer page,
@RequestParam(value = "size", required = false) Integer size) {
Pageable paging = PageRequest.of(page, size);
Page<Testa> get = Service.getAllWithPagination(paging);
return get;
}
@GetMapping("/Testa")
public List<Testa> getdetails() {
List<Testa> get = Service.getdetails();
return get;
}
// get all without authentication
@GetMapping("/token/Testa")
public List<Testa> getallwioutsec() {
List<Testa> get = Service.getdetails();
return get;
}
@GetMapping("/Testa/{id}")
public Testa getdetailsbyId(@PathVariable Integer id ) {
Testa get = Service.getdetailsbyId(id);
return get;
}
@DeleteMapping("/Testa/{id}")
public ResponseEntity<?> delete_by_id(@PathVariable Integer id ) {
Service.delete_by_id(id);
return new ResponseEntity<>(new EntityResponse("Deleted"), HttpStatus.OK);
}
}

View File

@ -0,0 +1,24 @@
package com.realnet.basicp1.Controllers;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.realnet.basicp1.Entity.Testlist_ListFilter1;
import com.realnet.basicp1.Services.Testlist_ListFilter1Service ;
@RequestMapping(value = "/token/Testlist_ListFilter1")
@RestController
public class tokenFree_Testlist_ListFilter1Controller {
@Autowired
private Testlist_ListFilter1Service Service;
@GetMapping("/Testlist_ListFilter1")
public List<Testlist_ListFilter1> getlist() {
List<Testlist_ListFilter1> get = Service.getlistbuilder();
return get;
}
@GetMapping("/Testlist_ListFilter11")
public List<Testlist_ListFilter1> getlistwithparam( ) {
List<Testlist_ListFilter1> get = Service.getlistbuilderparam( );
return get;
}
}

View File

@ -0,0 +1,108 @@
package com.realnet.basicp1.Entity;
import lombok.*;
import com.realnet.WhoColumn.Entity.Extension;
import javax.persistence.*;
import java.time.LocalDateTime;
import java.util.*;
@Entity
@Data
public class Testa extends Extension {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
private String name;
private String radiofield;
private boolean k;
private boolean l;
private String fileupload_fieldname;
private String fileupload_fieldpath ;
private String imageupload_fieldname;
private String imageupload_fieldpath ;
private String audio_fieldname;
private String audio_fieldpath ;
private String video_fieldname;
private String video_fieldpath ;
private String currency;
private String qrcode_field;
private String barcode_field;
private int numa;
private int numb;
private String calculated_field;
private String a;
private String b;
private String survey_form;
}

View File

@ -0,0 +1,14 @@
package com.realnet.basicp1.Entity;
import lombok.*;
import javax.persistence.*;
import java.time.LocalDateTime;
import java.util.*;
@Data
public class Testlist_ListFilter1 {
private Integer id;
private String name;
}

View File

@ -0,0 +1,56 @@
package com.realnet.basicp1.Repository;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;
import java.util.*;
import com.realnet.basicp1.Entity.Testa;
@Repository
public interface TestaRepository extends JpaRepository<Testa, Integer> {
@Query(value = "select * from testa where created_by=?1", nativeQuery = true)
List<Testa> findAll(Long creayedBy);
@Query(value = "select * from testa where created_by=?1", nativeQuery = true)
Page<Testa> findAll(Pageable page, Long creayedBy);
}

View File

@ -0,0 +1,242 @@
package com.realnet.basicp1.Services;
import com.realnet.basicp1.Repository.TestaRepository;
import com.realnet.basicp1.Entity.Testa
;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 TestaService {
@Autowired
private TestaRepository Repository;
@Autowired
private AppUserServiceImpl userService;
@Autowired
private RealmService realmService;
public Testa Savedata(Testa data) {
data.setUpdatedBy(getUser().getUserId());
data.setCreatedBy(getUser().getUserId());
data.setAccountId(getUser().getAccount().getAccount_id());
Testa save = Repository.save(data);
return save;
}
// get all with pagination
public Page<Testa> getAllWithPagination(Pageable page) {
return Repository.findAll(page, getUser().getUserId());
}
public List<Testa> getdetails() {
List<Realm> realm = realmService.findByUserId(getUser().getUserId());
List<Testa> all = Repository.findAll(getUser().getUserId());
return all ; }
public Testa getdetailsbyId(Integer id) {
return Repository.findById(id).get();
}
public void delete_by_id(Integer id) {
Repository.deleteById(id);
}
public Testa update(Testa data,Integer id) {
Testa old = Repository.findById(id).get();
old.setName(data.getName());
old.setRadiofield(data.getRadiofield());
old.setK(data.isK());
old.setL(data.isL());
old.setCurrency(data.getCurrency());
old.setQrcode_field(data.getQrcode_field());
old.setBarcode_field(data.getBarcode_field());
old.setNuma(data.getNuma());
old.setNumb(data.getNumb());
old.setCalculated_field(data.getCalculated_field());
old.setA(data.getA());
old.setB(data.getB());
old.setSurvey_form(data.getSurvey_form());
final Testa test = Repository.save(old);
data.setUpdatedBy(getUser().getUserId());
return test;}
public AppUser getUser() {
AppUser user = userService.getLoggedInUser();
return user;
}}

View File

@ -0,0 +1,47 @@
package com.realnet.basicp1.Services;
import java.util.*;
import com.realnet.basicp1.Repository.TestlistRepository;
import com.realnet.basicp1.Entity.Testlist;
import com.realnet.basicp1.Entity.Testlist_ListFilter1;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class Testlist_ListFilter1Service {
@Autowired
private TestlistRepository Repository;
public List<Testlist_ListFilter1> getlistbuilder() {
List<Testlist> list= Repository.findAll();
ArrayList<Testlist_ListFilter1> l = new ArrayList<>();
for (Testlist data : list) {
{
Testlist_ListFilter1 dummy = new Testlist_ListFilter1();
dummy.setId(data.getId());
dummy.setName(data.getName());
l.add(dummy);
}
}
return l;}
public List<Testlist_ListFilter1> getlistbuilderparam( ) {
List<Testlist> list= Repository.findAll();
ArrayList<Testlist_ListFilter1> l = new ArrayList<>();
for (Testlist data : list) {
{
Testlist_ListFilter1 dummy = new Testlist_ListFilter1();
dummy.setId(data.getId());
dummy.setName(data.getName());
l.add(dummy);
}
}
return l;}
}

View File

@ -0,0 +1,2 @@
CREATE TABLE db.Testa(id BIGINT NOT NULL AUTO_INCREMENT, video_field VARCHAR(400), calculated_field VARCHAR(400), a VARCHAR(400), b VARCHAR(400), qrcode_field VARCHAR(400), k bit(1), fileupload_field VARCHAR(400), value_list_field VARCHAR(400), l bit(1), name VARCHAR(400), radiofield VARCHAR(400), survey_form VARCHAR(400), currency VARCHAR(400), numb int, imageupload_field VARCHAR(400), audio_field VARCHAR(400), barcode_field VARCHAR(400), numa int, PRIMARY KEY (id));

View File

@ -2,14 +2,14 @@
export const LoginEnvironment = { export const LoginEnvironment = {
"templateNo": "<templateNo>", "templateNo": "Template 1",
"loginHeading": "<loginHeading>", "loginHeading": "Welcome to",
"loginHeading2": "<loginHeading2>", "loginHeading2": "io8.dev",
"isSignup": "<isSignup>", "isSignup": "true",
"loginSignup": "<loginSignup> ", "loginSignup": "Use your ID to sign in OR ",
"loginSignup2": "<loginSignup2>", "loginSignup2": "create one now",
"loginForgotpass": "<loginForgotpass>", "loginForgotpass": "FORGOT PASSWORD?",
"loginImage": "<loginImage>", "loginImage": "[]",
"loginImageURL": "<loginImageURL>" "loginImageURL": "null"
} }

View File

@ -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;
}

View File

@ -0,0 +1,117 @@
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 Testaservice{
private baseURL = "Testa/Testa" ; constructor(
private http: HttpClient,
private apiRequest: ApiRequestService,
) { }
getAll(page?: number, size?: number): Observable<any> {
return this.apiRequest.get(this.baseURL);
}
getById(id: number): Observable<any> {
const _http = this.baseURL + "/" + id;
return this.apiRequest.get(_http);
}
create(data: any): Observable<any> {
return this.apiRequest.post(this.baseURL, data);
}
update(id: number, data: any): Observable<any> {
const _http = this.baseURL + "/" + id;
return this.apiRequest.put(_http, data);
}
delete(id: number): Observable<any> {
const _http = this.baseURL + "/" + id;
return this.apiRequest.delete(_http);
}
uploadfilefileupload_field(ref:any, Testa:any, file:any): Observable<any>{
const formData = new FormData();
formData.append('file', file);
return this.apiRequest.postFormData(`FileUpload/Uploadeddocs/${ref}/${Testa}`, formData);
}
uploadfilegetByIdfileupload_field(ref:any, Testa:any,): Observable<any> {
return this.apiRequest.get(`FileUpload/Uploadeddocs/${ref}/${Testa}`);
}
uploadfiledeletefileupload_field(id: number): Observable<any> {
return this.apiRequest.delete(`FileUpload/Uploadeddocs/${id}`);
}
uploadImageupload_field(ref:any, Testa:any, file:any): Observable<any>{
const formData = new FormData();
formData.append('file', file);
return this.apiRequest.postFormData(`FileUpload/Uploadeddocs/${ref}/${Testa}`, formData);
}
uploadImageupload_fieldgetById(ref:any, Testa:any,): Observable<any> {
return this.apiRequest.get(`FileUpload/Uploadeddocs/${ref}/${Testa}`);
}
uploadImageupload_fielddelete(id: number): Observable<any> {
return this.apiRequest.delete(`FileUpload/Uploadeddocs/${id}`);
}
uploadAudio_field(ref:any, Testa:any, file:any): Observable<any>{
const formData = new FormData();
formData.append('file', file);
return this.apiRequest.postFormData(`FileUpload/Uploadeddocs/${ref}/${Testa}`, formData);
}
uploadAudio_fieldgetById(ref:any, Testa:any,): Observable<any> {
return this.apiRequest.get(`FileUpload/Uploadeddocs/${ref}/${Testa}`);
}
uploadAudio_fielddelete(id: number): Observable<any> {
return this.apiRequest.delete(`FileUpload/Uploadeddocs/${id}`);
}
uploadVideo_field(ref:any, Testa:any, file:any): Observable<any>{
const formData = new FormData();
formData.append('file', file);
return this.apiRequest.postFormData(`FileUpload/Uploadeddocs/${ref}/${Testa}`, formData);
}
uploadVideo_fieldgetById(ref:any, Testa:any,): Observable<any> {
return this.apiRequest.get(`FileUpload/Uploadeddocs/${ref}/${Testa}`);
}
uploadVideo_fielddelete(id: number): Observable<any> {
return this.apiRequest.delete(`FileUpload/Uploadeddocs/${id}`);
}
// updateaction
}

View File

@ -0,0 +1,4 @@
export const Testacardvariable = {
"cardButton": false,
"cardmodeldata": ``
}

View File

@ -1,3 +1,4 @@
import { TestaComponent } from './BuilderComponents/basicp1/Testa/Testa.component';
import { SequencegenaratorComponent } from './fnd/sequencegenarator/sequencegenarator.component'; import { SequencegenaratorComponent } from './fnd/sequencegenarator/sequencegenarator.component';
import { Component, NgModule } from '@angular/core'; import { Component, NgModule } from '@angular/core';
@ -256,6 +257,9 @@ const routes: Routes = [
// buildercomponents // buildercomponents
{path:'Testa',component:TestaComponent},

View File

@ -1,3 +1,4 @@
import { TestaComponent } from './BuilderComponents/basicp1/Testa/Testa.component';
import { CommonModule } from '@angular/common'; import { CommonModule } from '@angular/common';
@ -129,6 +130,9 @@ import { Stepper_workflowComponent } from './BuilderComponents/stepperworkflow/S
// buildercomponents // buildercomponents
TestaComponent,

View File

@ -226,10 +226,23 @@
"MENU_ACTION_LINK": "Menu Action Link", "MENU_ACTION_LINK": "Menu Action Link",
"STATUS": "Status", "STATUS": "Status",
"SUB_MENU": "Sub Menu", "SUB_MENU": "Sub Menu",
"Active": "Active", "Testa": "Testa",
"Description": "Description", "video_Field": "video_Field",
"calculated_Field": "calculated_Field",
"a": "a",
"b": "b",
"QRCode_Field": "QRCode_Field",
"k": "k",
"Fileupload_Field": "Fileupload_Field", "Fileupload_Field": "Fileupload_Field",
"Test22": "Test22", "Value_List_Field": "Value_List_Field",
"Test11": "Test11", "l": "l",
"Name": "Name" "Name": "Name",
"Radiofield": "Radiofield",
"Survey_Form": "Survey_Form",
"Currency": "Currency",
"Numb": "Numb",
"Imageupload_Field": "Imageupload_Field",
"audio_Field": "audio_Field",
"BarCode_Field": "BarCode_Field",
"Numa": "Numa"
} }