build_app

This commit is contained in:
risadmin_prod 2025-06-16 06:38:26 +00:00
parent 6bfc214f56
commit b11d476a9b
16 changed files with 22 additions and 271 deletions

View File

@ -72,6 +72,12 @@ public class BuilderService {
addCustomMenu( "steper01","Stepper_workflow", "Transcations"); addCustomMenu( "steper01","Stepper_workflow", "Transcations");
addCustomMenu( "Forma","Forma", "Transcations");
addCustomMenu( "steper01","Stepper_workflow", "Transcations");
addCustomMenu( "Forma","Forma", "Transcations"); addCustomMenu( "Forma","Forma", "Transcations");

View File

@ -22,10 +22,6 @@ import com.realnet.basicp1.Services.FormaService ;
@RequestMapping(value = "/Forma") @RequestMapping(value = "/Forma")
@CrossOrigin("*") @CrossOrigin("*")
@RestController @RestController
@ -42,10 +38,6 @@ public class FormaController {
@PostMapping("/Forma") @PostMapping("/Forma")
public Forma Savedata(@RequestBody Forma data) { public Forma Savedata(@RequestBody Forma data) {
Forma save = Service.Savedata(data) ; Forma save = Service.Savedata(data) ;
@ -54,10 +46,6 @@ public class FormaController {
System.out.println("data saved..." + save); System.out.println("data saved..." + save);
return save; return save;
@ -108,8 +96,4 @@ public class FormaController {
} }

View File

@ -22,10 +22,6 @@ import com.realnet.basicp1.Services.FormaService ;
@RequestMapping(value = "/token/Forma") @RequestMapping(value = "/token/Forma")
@CrossOrigin("*") @CrossOrigin("*")
@RestController @RestController
@ -42,10 +38,6 @@ public class tokenFree_FormaController {
@PostMapping("/Forma") @PostMapping("/Forma")
public Forma Savedata(@RequestBody Forma data) { public Forma Savedata(@RequestBody Forma data) {
Forma save = Service.Savedata(data) ; Forma save = Service.Savedata(data) ;
@ -54,10 +46,6 @@ public class tokenFree_FormaController {
System.out.println("data saved..." + save); System.out.println("data saved..." + save);
return save; return save;
@ -108,8 +96,4 @@ public class tokenFree_FormaController {
} }

View File

@ -10,10 +10,6 @@ import com.realnet.WhoColumn.Entity.Extension;
@Entity @Entity
@Data @Data
public class Forma extends Extension { public class Forma extends Extension {
@ -32,9 +28,5 @@ private String url_field;
private double decimal_field; private double decimal_field;
private int percentage_field;
private String recaptcha;
} }

View File

@ -17,10 +17,6 @@ import java.util.*;
import com.realnet.basicp1.Entity.Forma; import com.realnet.basicp1.Entity.Forma;
@Repository @Repository

View File

@ -18,10 +18,6 @@ import com.realnet.users.entity1.AppUser;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@Service @Service
@ -37,10 +33,6 @@ private FormaRepository Repository;
public Forma Savedata(Forma data) { public Forma Savedata(Forma data) {
@ -48,10 +40,6 @@ public Forma Savedata(Forma data) {
data.setUpdatedBy(getUser().getUserId()); data.setUpdatedBy(getUser().getUserId());
data.setCreatedBy(getUser().getUserId()); data.setCreatedBy(getUser().getUserId());
data.setAccountId(getUser().getAccount().getAccount_id()); data.setAccountId(getUser().getAccount().getAccount_id());
@ -89,10 +77,6 @@ old.setUrl_field(data.getUrl_field());
old.setDecimal_field(data.getDecimal_field()); old.setDecimal_field(data.getDecimal_field());
old.setPercentage_field(data.getPercentage_field());
old.setRecaptcha(data.getRecaptcha());
final Forma test = Repository.save(old); final Forma test = Repository.save(old);
data.setUpdatedBy(getUser().getUserId()); data.setUpdatedBy(getUser().getUserId());
return test;} return test;}
@ -102,10 +86,6 @@ final Forma test = Repository.save(old);
public AppUser getUser() { public AppUser getUser() {
AppUser user = userService.getLoggedInUser(); AppUser user = userService.getLoggedInUser();
return user; return user;

View File

@ -1,2 +1,2 @@
CREATE TABLE db.Forma(id BIGINT NOT NULL AUTO_INCREMENT, recaptcha VARCHAR(400), percentage_field int, url_field VARCHAR(400), decimal_field double, name VARCHAR(400), PRIMARY KEY (id)); CREATE TABLE db.Forma(id BIGINT NOT NULL AUTO_INCREMENT, url_field VARCHAR(400), decimal_field double, name VARCHAR(400), PRIMARY KEY (id));

View File

@ -35,14 +35,6 @@
</ng-container></clr-dg-column> </ng-container></clr-dg-column>
<clr-dg-column [clrDgField]="' percentage_field'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Percentage Field
</ng-container></clr-dg-column>
<clr-dg-column [clrDgField]="' recaptcha'"> <ng-container *clrDgHideableColumn="{hidden: false}"> recaptcha
</ng-container></clr-dg-column>
<!-- who column --> <!-- who column -->
<clr-dg-column> <ng-container *clrDgHideableColumn="{hidden: false}"> <clr-dg-column> <ng-container *clrDgHideableColumn="{hidden: false}">
<clr-icon shape="bars"></clr-icon> Action <clr-icon shape="bars"></clr-icon> Action
@ -60,12 +52,6 @@
<clr-dg-cell>{{user. decimal_field }}</clr-dg-cell> <clr-dg-cell>{{user. decimal_field }}</clr-dg-cell>
<clr-dg-cell>{{user. percentage_field }}</clr-dg-cell>
<clr-dg-cell>{{user. recaptcha }}</clr-dg-cell>
<!-- who column --> <!-- who column -->
<clr-dg-cell> <clr-dg-cell>
<clr-signpost> <clr-signpost>
@ -223,10 +209,6 @@
<!-- // EDIT DATA......... --> <!-- // EDIT DATA......... -->
<clr-modal [(clrModalOpen)]="modalEdit" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true"> <clr-modal [(clrModalOpen)]="modalEdit" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
<h3 class="modal-title">Update Forma <h3 class="modal-title">Update Forma
@ -236,10 +218,6 @@
</h3> </h3>
<div class="modal-body" *ngIf="rowSelected.id"> <div class="modal-body" *ngIf="rowSelected.id">
<h2 class="heading">{{rowSelected.id}}</h2> <h2 class="heading">{{rowSelected.id}}</h2>
@ -260,20 +238,6 @@
<label> Decimal Field</label> <label> Decimal Field</label>
<input class="clr-input" type="number" step ="0.01" [(ngModel)]="rowSelected.decimal_field" name="decimal_field" /> </div> <input class="clr-input" type="number" step ="0.01" [(ngModel)]="rowSelected.decimal_field" name="decimal_field" /> </div>
<div class="clr-col-sm-12">
<label>Percentage Field</label>
<input id="name" class="clr-input" type="number" [(ngModel)]="rowSelected.percentage_field" name="percentage_field" />
</div>
<div class="clr-col-sm-12">
<label> recaptcha</label> <div><b>{{ recaptchaCode }}</b> &nbsp; <button class="btn btn-icon btn-primary btn-sm" (click)="generaterecaptcha()">
<clr-icon shape="refresh"></clr-icon> </button></div>
<input type="text" name="recaptcha" [(ngModel)]="rowSelected.recaptcha" (ngModelChange)="checkrecaptchaEdit()" class="clr-input">
<div *ngIf=" recaptchaMismatch" class="error_mess">
<div class="error_mess"> recaptcha not valid.</div>
</div>
</div>
</div> </div>
@ -281,10 +245,6 @@
<!-- form code start --> <!-- form code start -->
<div *ngIf="checkFormCode"> <div *ngIf="checkFormCode">
<h4 style="font-weight: 300;display: inline;">Extension</h4> <h4 style="font-weight: 300;display: inline;">Extension</h4>
@ -335,10 +295,6 @@
<!-- aeroplane icon --> <!-- aeroplane icon -->
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
<a *ngIf="userrole?.includes('ADMIN')" style="float: right;" href="javascript:void(0)" role="tooltip" aria-haspopup="true" <a *ngIf="userrole?.includes('ADMIN')" style="float: right;" href="javascript:void(0)" role="tooltip" aria-haspopup="true"
@ -373,23 +329,6 @@
</div> </div>
<div class="clr-col-sm-12">
<label> Percentage Field</label>
<input class="clr-input" type="number" formControlName="percentage_field" />
<div *ngIf="submitted && entryForm.controls.percentage_field.errors" class="error_mess">
<div *ngIf="submitted && entryForm.controls.percentage_field.errors.required" class="error_mess">*This field is Required</div>
</div>
</div>
<div class="clr-col-sm-12">
<label> recaptcha</label><div><b>{{ recaptchaCode }}</b> &nbsp; <button class="btn btn-icon btn-primary btn-sm" (click)="generaterecaptcha()"><clr-icon shape="refresh"></clr-icon></button></div>
<input type="text" formControlName="recaptcha" class="clr-input">
<div *ngIf="submitted && entryForm.controls.recaptcha?.errors.required" class="error_mess">*This field is Required</div>
<div *ngIf="submitted && entryForm.get('recaptcha')?.errors && entryForm.get('recaptcha')?.dirty" class="error_mess">
<div *ngIf="submitted && entryForm.controls['recaptcha']?.hasError('recaptchaMismatch')" class="error_mess"> recaptcha not valid.</div>
</div>
</div>
</div> </div>
@ -400,10 +339,6 @@
<!-- form code start --> <!-- form code start -->
<div *ngIf="checkFormCode"> <div *ngIf="checkFormCode">
<h4 style="font-weight: 300;display: inline;">Extension</h4> <h4 style="font-weight: 300;display: inline;">Extension</h4>
@ -440,8 +375,4 @@
<!-- htmlpopup --> <!-- htmlpopup -->

View File

@ -69,14 +69,6 @@ url_field : [null],
decimal_field : [null,[Validators.required]], decimal_field : [null,[Validators.required]],
percentage_field : [null,[Validators.required]],
recaptcha : ['', [Validators.required,this.checkrecaptcha.bind(this)]],
@ -113,10 +105,6 @@ recaptcha : ['', [Validators.required,this.checkrecaptcha.bind(this)]],
this.generaterecaptcha()
} }
@ -124,10 +112,6 @@ this.generaterecaptcha()
error; error;
getData() { getData() {
this.mainService.getAll().subscribe((data) => { this.mainService.getAll().subscribe((data) => {
@ -152,10 +136,6 @@ this.generaterecaptcha()
this.modalEdit = true; this.modalEdit = true;
} }
onDelete(row) { onDelete(row) {
@ -181,10 +161,6 @@ this.generaterecaptcha()
//console.log("in update"); //console.log("in update");
console.log("id " + id); console.log("id " + id);
console.log(this.rowSelected); console.log(this.rowSelected);
@ -204,10 +180,6 @@ setTimeout(() => {
}, (error) => { }, (error) => {
console.log(error); console.log(error);
if (error.status >= 200 && error.status <= 299) { if (error.status >= 200 && error.status <= 299) {
@ -232,10 +204,6 @@ onCreate() {
this.mainService.create(this.entryForm.value).subscribe( this.mainService.create(this.entryForm.value).subscribe(
(data) => { (data) => {
console.log(data); console.log(data);
@ -251,10 +219,6 @@ setTimeout(() => {
}, (error) => { }, (error) => {
console.log(error); console.log(error);
if (error.status >= 200 && error.status <= 299) { if (error.status >= 200 && error.status <= 299) {
@ -279,10 +243,6 @@ this.modalAdd = true; this.submitted = false;
} }
submitted = false; submitted = false;
onSubmit() { onSubmit() {
@ -301,34 +261,6 @@ isValidurl_field(url: string): boolean {
recaptchaCode = '';
generaterecaptcha (): void {
const possibleCharacters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
const codeLength = 6; // Change to desired length
let recaptcha= '';
for (let i = 0; i < codeLength; i++) {
const randomIndex = Math.floor(Math.random() * possibleCharacters.length);
recaptcha += possibleCharacters.charAt(randomIndex);
}
this.recaptchaCode = recaptcha;
}
checkrecaptcha(control: AbstractControl): ValidationErrors | null {
if (control.value !== this.recaptchaCode) {
return { recaptchaMismatch: true };
}
return null;
}
recaptchaMismatch = false;
checkrecaptchaEdit(): void {
if (this.rowSelected.recaptcha !== this. recaptchaCode) {
this. recaptchaMismatch = true; } else { this.recaptchaMismatch = false; } }
// updateaction // updateaction
} }
@ -336,7 +268,3 @@ checkrecaptchaEdit(): void {

View File

@ -35,9 +35,5 @@ export class Formaservice{
// updateaction // updateaction
} }

View File

@ -20,6 +20,7 @@
import { Component, OnInit } from '@angular/core'; import { Component, OnInit } from '@angular/core';
@ -250,6 +251,8 @@ export class Stepper_workflowComponent implements OnInit {
console.log('id is ', id) console.log('id is ', id)
// stepper route // stepper route
this.router.navigate(["../steper01/", id], { relativeTo: this.route }); this.router.navigate(["../steper01/", id], { relativeTo: this.route });

View File

@ -79,23 +79,6 @@
</div> </div>
<div class="clr-col-sm-12">
<label> Percentage Field</label>
<input class="clr-input" type="number" formControlName="percentage_field" />
<div *ngIf="submitted && entryForm.controls.percentage_field.errors" class="error_mess">
<div *ngIf="submitted && entryForm.controls.percentage_field.errors.required" class="error_mess">*This field is Required</div>
</div>
</div>
<div class="clr-col-sm-12">
<label> recaptcha</label><div><b>{{ recaptchaCode }}</b> &nbsp; <button class="btn btn-icon btn-primary btn-sm" (click)="generaterecaptcha()"><clr-icon shape="refresh"></clr-icon></button></div>
<input type="text" formControlName="recaptcha" class="clr-input">
<div *ngIf="submitted && entryForm.controls.recaptcha?.errors.required" class="error_mess">*This field is Required</div>
<div *ngIf="submitted && entryForm.get('recaptcha')?.errors && entryForm.get('recaptcha')?.dirty" class="error_mess">
<div *ngIf="submitted && entryForm.controls['recaptcha']?.hasError('recaptchaMismatch')" class="error_mess"> recaptcha not valid.</div>
</div>
</div>
</div> </div>
@ -105,10 +88,6 @@
<div class="clr-row"> <div class="clr-row">
</div> </div>
@ -143,10 +122,6 @@
<p><strong>Decimal Field : </strong> {{ FormaentryForm.get('decimal_field')?.value }}</p> <p><strong>Decimal Field : </strong> {{ FormaentryForm.get('decimal_field')?.value }}</p>
<p><strong>Percentage Field : </strong> {{ FormaentryForm.get('percentage_field')?.value }}</p>
<p><strong>recaptcha : </strong> {{ FormaentryForm.get('recaptcha')?.value }}</p>
</div> </div>
</div><div class="button"> </div><div class="button">

View File

@ -74,10 +74,6 @@ url_field : [null],
decimal_field : [null,[Validators.required]], decimal_field : [null,[Validators.required]],
percentage_field : [null,[Validators.required]],
recaptcha : ['', [Validators.required,this.checkrecaptcha.bind(this)]],
}); });
@ -87,19 +83,11 @@ recaptcha : ['', [Validators.required,this.checkrecaptcha.bind(this)]],
this.generaterecaptcha()
this.generaterecaptcha()
const stepId = this.id; // or from route/query/etc const stepId = this.id; // or from route/query/etc
this.getResolvedDataFromStepper(stepId).subscribe(res => { this.getResolvedDataFromStepper(stepId).subscribe(res => {
@ -132,10 +120,6 @@ url_field: data.url_field || '',
decimal_field: data.decimal_field || '', decimal_field: data.decimal_field || '',
percentage_field: data.percentage_field || '',
recaptcha: data.recaptcha || '',
}); });
} }
getResolvedDataFromStepper(id: number): Observable<any> { getResolvedDataFromStepper(id: number): Observable<any> {
@ -240,10 +224,6 @@ recaptcha: data.recaptcha || '',
this.mainService.createForma(this.FormaentryForm.value).subscribe( this.mainService.createForma(this.FormaentryForm.value).subscribe(
(data) => { (data) => {
console.log('adding data ', data); console.log('adding data ', data);
@ -272,10 +252,6 @@ recaptcha: data.recaptcha || '',
}, (error) => { }, (error) => {
console.log(error); console.log(error);
if (error.status >= 200 && error.status <= 299) { if (error.status >= 200 && error.status <= 299) {
@ -329,10 +305,6 @@ recaptcha: data.recaptcha || '',
// updateaction // updateaction
} }
@ -340,7 +312,3 @@ recaptcha: data.recaptcha || '',

View File

@ -48,9 +48,5 @@ gettabledata(id: number): Observable<any> {
// updateaction // updateaction
} }

View File

@ -1,3 +1,5 @@
import { steper01Component } from './BuilderComponents/stepperworkflow/steper01/steper01.component'; import { steper01Component } from './BuilderComponents/stepperworkflow/steper01/steper01.component';
import { FormaComponent } from './BuilderComponents/basicp1/Forma/Forma.component'; import { FormaComponent } from './BuilderComponents/basicp1/Forma/Forma.component';
@ -258,6 +260,10 @@ const routes: Routes = [
// buildercomponents // buildercomponents
{path:'steper01/:id',component:steper01Component}, {path:'steper01/:id',component:steper01Component},

View File

@ -1,3 +1,5 @@
import { steper01Component } from './BuilderComponents/stepperworkflow/steper01/steper01.component'; import { steper01Component } from './BuilderComponents/stepperworkflow/steper01/steper01.component';
import { FormaComponent } from './BuilderComponents/basicp1/Forma/Forma.component'; import { FormaComponent } from './BuilderComponents/basicp1/Forma/Forma.component';
@ -131,6 +133,10 @@ import { Stepper_workflowComponent } from './BuilderComponents/stepperworkflow/S
// buildercomponents // buildercomponents
steper01Component, steper01Component,