build_app

This commit is contained in:
risadmin_prod 2025-02-21 04:42:50 +00:00
parent 7290e3d5d7
commit 2142c60813
13 changed files with 746 additions and 10 deletions

View File

@ -72,6 +72,9 @@ public class BuilderService {
addCustomMenu( "Wf", "Transcations");
addCustomMenu( "Wf", "Transcations");
addCustomMenu( "Wf", "Transcations");

View File

@ -21,6 +21,22 @@ import com.realnet.mypackage.Services.WfService ;
@RequestMapping(value = "/Wf")
@CrossOrigin("*")
@RestController
@ -34,6 +50,22 @@ public class WfController {
@PostMapping("/Wf")
public Wf Savedata(@RequestBody Wf data) {
@ -41,6 +73,22 @@ public class WfController {
System.out.println("data saved..." + save);
return save;
@ -87,5 +135,21 @@ public class WfController {
}

View File

@ -8,6 +8,22 @@ import com.realnet.WhoColumn.Entity.Extension;
@Entity
@Data
@ -25,5 +41,25 @@ private String text_field;
private double decimal_field;
private String phone_number;
@Column(length = 2000)
private String paragraph_field;
private String date_field;
private boolean toggle_switch;
private int percentage_field;
private String recaptchas;
private String datetime_field;
private String password_field;
@Transient
private String confirmpassword_field;
}

View File

@ -17,6 +17,22 @@ import com.realnet.users.entity1.AppUser;
import org.springframework.stereotype.Service;
@Service
@ -30,11 +46,43 @@ private WfRepository Repository;
public Wf Savedata(Wf data) {
data.setUpdatedBy(getUser().getUserId());
data.setCreatedBy(getUser().getUserId());
data.setAccountId(getUser().getAccount().getAccount_id());
@ -70,6 +118,22 @@ old.setText_field(data.getText_field());
old.setDecimal_field(data.getDecimal_field());
old.setPhone_number(data.getPhone_number());
old.setParagraph_field(data.getParagraph_field());
old.setDate_field(data.getDate_field());
old.setToggle_switch (data.isToggle_switch());
old.setPercentage_field(data.getPercentage_field());
old.setRecaptchas(data.getRecaptchas());
old.setDatetime_field(data.getDatetime_field());
old.setPassword_field(data.getPassword_field());
final Wf test = Repository.save(old);
data.setUpdatedBy(getUser().getUserId());
return test;}
@ -77,6 +141,22 @@ final Wf test = Repository.save(old);
public AppUser getUser() {
AppUser user = userService.getLoggedInUser();
return user;

View File

@ -1,2 +1,2 @@
CREATE TABLE db.Wf(id BIGINT NOT NULL AUTO_INCREMENT, text_field VARCHAR(400), decimal_field double, PRIMARY KEY (id));
CREATE TABLE db.Wf(id BIGINT NOT NULL AUTO_INCREMENT, paragraph_field VARCHAR(400), toggle_switch VARCHAR(400), text_field VARCHAR(400), recaptchas VARCHAR(400), datetime_field VARCHAR(400), percentage_field int, phone_number VARCHAR(400), date_field Date, password_field VARCHAR(400), decimal_field double, PRIMARY KEY (id));

View File

@ -2,14 +2,14 @@
export const LoginEnvironment = {
"templateNo": "<templateNo>",
"loginHeading": "<loginHeading>",
"loginHeading2": "<loginHeading2>",
"isSignup": "<isSignup>",
"loginSignup": "<loginSignup> ",
"loginSignup2": "<loginSignup2>",
"loginForgotpass": "<loginForgotpass>",
"loginImage": "<loginImage>",
"loginImageURL": "<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"
}

View File

@ -30,6 +30,38 @@
<clr-dg-column [clrDgField]="' decimal_field'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Decimal Field
</ng-container></clr-dg-column>
<clr-dg-column [clrDgField]="' phone_number'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Phone Number
</ng-container></clr-dg-column>
<clr-dg-column [clrDgField]="' paragraph_field'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Paragraph Field
</ng-container></clr-dg-column>
<clr-dg-column [clrDgField]="' date_field'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Date Field
</ng-container></clr-dg-column>
<clr-dg-column [clrDgField]="' toggle_switch'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Toggle Switch
</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]="' recaptchas'"> <ng-container *clrDgHideableColumn="{hidden: false}"> recaptchas
</ng-container></clr-dg-column>
<clr-dg-column [clrDgField]="' datetime_field'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Datetime Field
</ng-container></clr-dg-column>
<clr-dg-column [clrDgField]="'password_field'"> <ng-container *clrDgHideableColumn="{hidden: false}">Password Field
</ng-container></clr-dg-column>
<!-- who column -->
<clr-dg-column> <ng-container *clrDgHideableColumn="{hidden: false}">
@ -44,6 +76,30 @@
<clr-dg-cell>{{user. decimal_field }}</clr-dg-cell>
<clr-dg-cell>{{user. phone_number }}</clr-dg-cell>
<clr-dg-cell (click)="goToReplaceStringparagraph_field(user.paragraph_field)" style="cursor: pointer; align-items: center;"><clr-icon shape="details"></clr-icon></clr-dg-cell>
<clr-dg-cell>{{user. date_field }}</clr-dg-cell>
<clr-dg-cell>{{user. toggle_switch }}</clr-dg-cell>
<clr-dg-cell>{{user. percentage_field }}</clr-dg-cell>
<clr-dg-cell>{{user. recaptchas }}</clr-dg-cell>
<clr-dg-cell>{{user. datetime_field }}</clr-dg-cell>
<clr-dg-cell>{{user. password_field }}</clr-dg-cell>
<!-- who column -->
<clr-dg-cell>
@ -200,12 +256,48 @@
<clr-modal [(clrModalOpen)]="rsModalparagraph_field" [clrModalSize]="'xl'" [clrModalStaticBackdrop]="true">
<div class="modal-body">
<textarea class="form-control" style="width:100%; height: 400px;" readonly>{{rowSelected}}</textarea>
</div></clr-modal>
<!-- // EDIT DATA......... -->
<clr-modal [(clrModalOpen)]="modalEdit" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
<h3 class="modal-title">Update Wf
</h3>
<div class="modal-body" *ngIf="rowSelected.id">
<h2 class="heading">{{rowSelected.id}}</h2>
@ -221,11 +313,72 @@
<label> Decimal Field</label>
<input class="clr-input" type="number" step ="0.01" [(ngModel)]="rowSelected.decimal_field" name="decimal_field" /> </div>
<div class="clr-col-sm-12">
<label> Phone Number</label>
<input id="name" class="clr-input" type="Text" [(ngModel)]="rowSelected.phone_number " name="phone_number" pattern="((\\+)?([1-9]{2}))?[1-9]{1}[0-9]{9}$" />
<div *ngIf="rowSelected.phone_number && !isValidPhone_number(rowSelected.phone_number)" class="error_mess">
* Please Follow your pattern,+91 Enter 10 digit Mobile Number.
</div> </div>
<div class="clr-col-sm-12">
<label> Paragraph Field</label>
<input id="name" type="Text" class="form-control" style="border: none; outline: none; height:33px !important;" [(ngModel)]="rowSelected.paragraph_field" name=" paragraph_field " /> </div>
<div class="clr-col-sm-12">
<label>Date Field</label>
<input id="name" class="clr-input" type="date" [(ngModel)]="rowSelected.date_field" name="date_field" />
</div>
<div class="clr-col-sm-12">
<label> Toggle Switch</label>
<input type="checkbox" name="toggle_switch" clrToggle [(ngModel)]="rowSelected.toggle_switch" /> </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> recaptchas</label> <div><b>{{ recaptchasCode }}</b> &nbsp; <button class="btn btn-icon btn-primary btn-sm" (click)="generaterecaptchas()">
<clr-icon shape="refresh"></clr-icon> </button></div>
<input type="text" name="recaptchas" [(ngModel)]="rowSelected.recaptchas" (ngModelChange)="checkrecaptchasEdit()" class="clr-input">
<div *ngIf=" recaptchasMismatch" class="error_mess">
<div class="error_mess"> recaptchas not valid.</div>
</div>
</div>
<div class="clr-col-sm-12">
<label>Datetime Field</label>
<input class="clr-input" type="datetime-local" [(ngModel)]="rowSelected.datetime_field" name="datetime_field" />
</div>
<div class="clr-col-sm-12">
<label> Password Field</label><br>
<div><input [type]="newpHidepassword_field ? 'password': 'text'" class="clr-input" style="width: 93% !important;" [(ngModel)]="rowSelected.password_field" name="password_field">&nbsp;
<clr-icon [attr.shape]="newIconpassword_field" (click)="newShapeChangerpassword_field()"></clr-icon></div>
</div>
</div>
<!-- form code start -->
<div *ngIf="checkFormCode">
<h4 style="font-weight: 300;display: inline;">Extension</h4>
@ -274,6 +427,22 @@
<!-- aeroplane icon -->
&nbsp; &nbsp; &nbsp; &nbsp;
<a *ngIf="userrole.includes('ROLE_ADMIN')" style="float: right;" href="javascript:void(0)" role="tooltip" aria-haspopup="true"
@ -301,9 +470,82 @@
</div>
<div class="clr-col-sm-12">
<label> Phone Number</label>
<input class="clr-input" type="text" formControlName="phone_number" pattern="((\+)?([1-9]{2}))?[1-9]{1}[0-9]{9}$" />
<div *ngIf="submitted && entryForm.controls['phone_number'].errors" class="error_mess">
<div *ngIf="submitted && entryForm.controls['phone_number'].hasError('pattern')" class="error_mess">* Please Follow your pattern,+91 Enter 10 digit Mobile Number.
</div> </div> </div>
<div class="clr-col-sm-12">
<label>Paragraph Field</label>
<input class="form-control" type="Text" formControlName="paragraph_field" style="border: none; outline: none; height:33px !important;" />
</div>
<div class="clr-col-sm-12">
<label> Date Field</label>
<input class="clr-input" type="date" formControlName="date_field" />
</div>
<div class="clr-col-sm-12">
<label> Toggle Switch</label>
<input type="checkbox" formControlName="toggle_switch" clrToggle/> </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> recaptchas</label><div><b>{{ recaptchasCode }}</b> &nbsp; <button class="btn btn-icon btn-primary btn-sm" (click)="generaterecaptchas()"><clr-icon shape="refresh"></clr-icon></button></div>
<input type="text" formControlName="recaptchas" class="clr-input">
<div *ngIf="submitted && entryForm.controls.recaptchas.errors.required" class="error_mess">*This field is Required</div>
<div *ngIf="submitted && entryForm.get('recaptchas').errors && entryForm.get('recaptchas').dirty" class="error_mess">
<div *ngIf="submitted && entryForm.controls['recaptchas'].hasError('recaptchasMismatch')" class="error_mess"> recaptchas not valid.</div>
</div>
</div>
<div class="clr-col-sm-12">
<label> Datetime Field</label>
<input class="clr-input" type="datetime-local" formControlName="datetime_field" />
</div>
<div class="clr-col-sm-12">
<label>Password Field</label><br>
<div><input class="clr-input" style="width: 93% !important;" [type]="newaddpHidepassword_field ? 'password': 'text'" formControlName="password_field" autocomplete >&nbsp;
<clr-icon [attr.shape]="newaddIconpassword_field" (click)="newaddChangerpassword_field()"></clr-icon></div>
</div>
<div class="clr-col-sm-12">
<label>Confirm Password Field</label><br>
<input type="password" class="clr-input" formControlName="confirmpassword_field" autocomplete >
<div *ngIf="entryForm.controls.confirmpassword_field.errors" class="error_mess">
<div *ngIf="entryForm.controls.confirmpassword_field.errors.confirmedpassword_fieldValidator" class="error_mess">* Password and Confirm Password must be match.</div>
</div>
</div>
</div>
@ -343,4 +585,20 @@
<!-- htmlpopup -->

View File

@ -67,11 +67,45 @@ text_field : [null],
decimal_field : [null,[Validators.required]],
phone_number: ['+91'],
paragraph_field : [null],
date_field : [null],
toggle_switch : [false],
percentage_field : [null,[Validators.required]],
recaptchas : [null, [Validators.required,this.checkrecaptchas.bind(this)]],
datetime_field : [null],
password_field : [null],
confirmpassword_field : [null],
}, {
validator: Confirmedpassword_fieldValidator('password_field', 'confirmpassword_field')
}); // component_button200
// form code start
this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => {
@ -98,12 +132,44 @@ decimal_field : [null,[Validators.required]],
this.generaterecaptchas()
}
error;
getData() {
this.mainService.getAll().subscribe((data) => {
@ -121,6 +187,22 @@ decimal_field : [null,[Validators.required]],
}
onEdit(row) {
this.rowSelected = row;
@ -149,6 +231,22 @@ decimal_field : [null,[Validators.required]],
//console.log("in update");
console.log("id " + id);
console.log(this.rowSelected);
@ -163,6 +261,22 @@ decimal_field : [null,[Validators.required]],
}, (error) => {
console.log(error);
@ -186,12 +300,44 @@ onCreate() {
this.mainService.create(this.entryForm.value).subscribe(
(data) => {
console.log(data);
if (data || data.status >= 200 && data.status <= 299) {
this.toastr.success("Added Successfully");
}
@ -218,6 +364,22 @@ this.modalAdd = true; this.submitted = false;
}
submitted = false;
@ -233,8 +395,95 @@ onSubmit() {
isValidPhone_number(phone: string): boolean {
const phonePattern = /^(\+[1-9][0-9]{0,2})?[1-9][0-9]{9}$/;
return phonePattern.test(phone);
}
rsModalparagraph_field = false;
goToReplaceStringparagraph_field (row){
this.rowSelected = row; this.rsModalparagraph_field =true; }
recaptchasCode = '';
generaterecaptchas (): void {
const possibleCharacters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
const codeLength = 6; // Change to desired length
let recaptchas= '';
for (let i = 0; i < codeLength; i++) {
const randomIndex = Math.floor(Math.random() * possibleCharacters.length);
recaptchas += possibleCharacters.charAt(randomIndex);
}
this.recaptchasCode = recaptchas;
}
checkrecaptchas(control: AbstractControl): ValidationErrors | null {
if (control.value !== this.recaptchasCode) {
return { recaptchasMismatch: true };
}
return null;
}
recaptchasMismatch = false;
checkrecaptchasEdit(): void {
if (this.rowSelected.recaptchas !== this. recaptchasCode) {
this. recaptchasMismatch = true; } else { this.recaptchasMismatch = false; } }
newpHidepassword_field: boolean = true;
newIconpassword_field: string = "eye";
newShapeChangerpassword_field() {
this.newpHidepassword_field = !this.newpHidepassword_field;
if(this.newpHidepassword_field){
this.newIconpassword_field = 'eye' } else { this.newIconpassword_field = 'eye-hide' }
}
newaddpHidepassword_field: boolean = true;
newaddIconpassword_field: string = "eye";
newaddChangerpassword_field() { this.newaddpHidepassword_field = !this.newaddpHidepassword_field;
if(this.newaddpHidepassword_field){ this.newaddIconpassword_field = 'eye' } else {
this.newaddIconpassword_field = 'eye-hide' } }
// updateaction
}
export function Confirmedpassword_fieldValidator(controlName: string, matchingControlName: string){
return (formGroup: FormGroup) => {
const control = formGroup.controls[controlName];
const matchingControl = formGroup.controls[matchingControlName];
if (matchingControl.errors && !matchingControl.errors.confirmedpassword_fieldValidator) {
return;
}
if (control.value !== matchingControl.value) {
matchingControl.setErrors({ confirmedpassword_fieldValidator: true });
} else {
matchingControl.setErrors(null);
}
}
}

View File

@ -1,4 +1,5 @@
import { WfComponent } from './BuilderComponents/mypackage/Wf/Wf.component';
@ -244,6 +245,8 @@ children: [
// buildercomponents
{path:'Wf',component:WfComponent},

View File

@ -1,4 +1,5 @@
import { WfComponent } from './BuilderComponents/mypackage/Wf/Wf.component';
@ -146,6 +147,8 @@ import { MappingruleeditComponent } from './datamanagement/mappingrule/mappingru
// buildercomponents
WfComponent,

View File

@ -226,7 +226,15 @@
"MENU_ACTION_LINK": "Menu Action Link",
"STATUS": "Status",
"SUB_MENU": "Sub Menu",
"Paragraph_Field": "Paragraph_Field",
"Toggle_Switch": "Toggle_Switch",
"Text_Field": "Text_Field",
"recaptchas": "recaptchas",
"Datetime_Field": "Datetime_Field",
"Percentage_Field": "Percentage_Field",
"Phone_Number": "Phone_Number",
"Date_Field": "Date_Field",
"Password_Field": "Password_Field",
"Decimal_Field": "Decimal_Field",
"Wf": "Wf"
}