build_app
This commit is contained in:
parent
b9c6a0a316
commit
3af69e630f
@ -69,6 +69,9 @@ public class BuilderService {
|
|||||||
executeDump(true);
|
executeDump(true);
|
||||||
|
|
||||||
// ADD OTHER SERVICE
|
// ADD OTHER SERVICE
|
||||||
|
addCustomMenu( "Calculator","Calculator", "Transcations");
|
||||||
|
|
||||||
|
|
||||||
addCustomMenu( "Stopwatch","Stopwatch", "Transcations");
|
addCustomMenu( "Stopwatch","Stopwatch", "Transcations");
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -22,8 +22,6 @@ import com.realnet.app-b.Services.CalculatorService ;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value = "/Calculator")
|
@RequestMapping(value = "/Calculator")
|
||||||
@CrossOrigin("*")
|
@CrossOrigin("*")
|
||||||
@RestController
|
@RestController
|
||||||
@ -40,8 +38,6 @@ public class CalculatorController {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/Calculator")
|
@PostMapping("/Calculator")
|
||||||
public Calculator Savedata(@RequestBody Calculator data) {
|
public Calculator Savedata(@RequestBody Calculator data) {
|
||||||
Calculator save = Service.Savedata(data) ;
|
Calculator save = Service.Savedata(data) ;
|
||||||
@ -50,8 +46,6 @@ public class CalculatorController {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
System.out.println("data saved..." + save);
|
System.out.println("data saved..." + save);
|
||||||
|
|
||||||
return save;
|
return save;
|
||||||
@ -102,6 +96,4 @@ public class CalculatorController {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -22,8 +22,6 @@ import com.realnet.app-b.Services.CalculatorService ;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value = "/token/Calculator")
|
@RequestMapping(value = "/token/Calculator")
|
||||||
@CrossOrigin("*")
|
@CrossOrigin("*")
|
||||||
@RestController
|
@RestController
|
||||||
@ -40,8 +38,6 @@ public class tokenFree_CalculatorController {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/Calculator")
|
@PostMapping("/Calculator")
|
||||||
public Calculator Savedata(@RequestBody Calculator data) {
|
public Calculator Savedata(@RequestBody Calculator data) {
|
||||||
Calculator save = Service.Savedata(data) ;
|
Calculator save = Service.Savedata(data) ;
|
||||||
@ -50,8 +46,6 @@ public class tokenFree_CalculatorController {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
System.out.println("data saved..." + save);
|
System.out.println("data saved..." + save);
|
||||||
|
|
||||||
return save;
|
return save;
|
||||||
@ -102,6 +96,4 @@ public class tokenFree_CalculatorController {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -10,8 +10,6 @@ import com.realnet.WhoColumn.Entity.Extension;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Data
|
@Data
|
||||||
public class Calculator extends Extension {
|
public class Calculator extends Extension {
|
||||||
@ -28,9 +26,7 @@ private int number1;
|
|||||||
|
|
||||||
private int number2;
|
private int number2;
|
||||||
|
|
||||||
private String operation;
|
private String result;
|
||||||
|
|
||||||
private int result;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,8 +17,6 @@ import java.util.*;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import com.realnet.app-b.Entity.Calculator;
|
import com.realnet.app-b.Entity.Calculator;
|
||||||
|
|
||||||
@Repository
|
@Repository
|
||||||
|
|||||||
@ -18,8 +18,6 @@ import com.realnet.users.entity1.AppUser;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@ -35,8 +33,6 @@ private CalculatorRepository Repository;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public Calculator Savedata(Calculator data) {
|
public Calculator Savedata(Calculator data) {
|
||||||
|
|
||||||
|
|
||||||
@ -44,8 +40,6 @@ public Calculator Savedata(Calculator 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());
|
||||||
@ -81,8 +75,6 @@ old.setNumber1(data.getNumber1());
|
|||||||
|
|
||||||
old.setNumber2(data.getNumber2());
|
old.setNumber2(data.getNumber2());
|
||||||
|
|
||||||
old.setOperation(data.getOperation());
|
|
||||||
|
|
||||||
old.setResult(data.getResult());
|
old.setResult(data.getResult());
|
||||||
|
|
||||||
final Calculator test = Repository.save(old);
|
final Calculator test = Repository.save(old);
|
||||||
@ -94,8 +86,6 @@ final Calculator test = Repository.save(old);
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public AppUser getUser() {
|
public AppUser getUser() {
|
||||||
AppUser user = userService.getLoggedInUser();
|
AppUser user = userService.getLoggedInUser();
|
||||||
return user;
|
return user;
|
||||||
|
|||||||
@ -1,2 +1,2 @@
|
|||||||
CREATE TABLE app-d.Stopwatch(id BIGINT NOT NULL AUTO_INCREMENT, time VARCHAR(400), PRIMARY KEY (id));
|
CREATE TABLE app-d.Calculator(id BIGINT NOT NULL AUTO_INCREMENT, result VARCHAR(400), number1 int, number2 int, PRIMARY KEY (id));
|
||||||
|
|
||||||
|
|||||||
@ -23,19 +23,15 @@
|
|||||||
<div *ngIf="error;else loadingSpinner">{{error}}</div>
|
<div *ngIf="error;else loadingSpinner">{{error}}</div>
|
||||||
</clr-dg-placeholder>
|
</clr-dg-placeholder>
|
||||||
|
|
||||||
<clr-dg-column [clrDgField]="'number1'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Number1
|
<clr-dg-column [clrDgField]="'number1'"> <ng-container *clrDgHideableColumn="{hidden: false}"> number1
|
||||||
</ng-container></clr-dg-column>
|
</ng-container></clr-dg-column>
|
||||||
|
|
||||||
|
|
||||||
<clr-dg-column [clrDgField]="'number2'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Number2
|
<clr-dg-column [clrDgField]="'number2'"> <ng-container *clrDgHideableColumn="{hidden: false}"> number2
|
||||||
</ng-container></clr-dg-column>
|
</ng-container></clr-dg-column>
|
||||||
|
|
||||||
|
|
||||||
<clr-dg-column [clrDgField]="'operation'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Operation
|
<clr-dg-column [clrDgField]="'result'"> <ng-container *clrDgHideableColumn="{hidden: false}"> result
|
||||||
</ng-container></clr-dg-column>
|
|
||||||
|
|
||||||
|
|
||||||
<clr-dg-column [clrDgField]="'result'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Result
|
|
||||||
</ng-container></clr-dg-column>
|
</ng-container></clr-dg-column>
|
||||||
|
|
||||||
|
|
||||||
@ -53,9 +49,6 @@
|
|||||||
<clr-dg-cell>{{user.number2 }}</clr-dg-cell>
|
<clr-dg-cell>{{user.number2 }}</clr-dg-cell>
|
||||||
|
|
||||||
|
|
||||||
<clr-dg-cell>{{user.operation }}</clr-dg-cell>
|
|
||||||
|
|
||||||
|
|
||||||
<clr-dg-cell>{{user.result }}</clr-dg-cell>
|
<clr-dg-cell>{{user.result }}</clr-dg-cell>
|
||||||
|
|
||||||
|
|
||||||
@ -216,8 +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 Calculator
|
<h3 class="modal-title">Update Calculator
|
||||||
@ -227,8 +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>
|
||||||
@ -236,23 +225,18 @@
|
|||||||
<form >
|
<form >
|
||||||
<div class="clr-row">
|
<div class="clr-row">
|
||||||
<div class="clr-col-sm-12">
|
<div class="clr-col-sm-12">
|
||||||
<label>Number1</label>
|
<label>number1</label>
|
||||||
<input id="name" class="clr-input" type="number" [(ngModel)]="rowSelected.number1" name="number1" />
|
<input id="name" class="clr-input" type="number" [(ngModel)]="rowSelected.number1" name="number1" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="clr-col-sm-12">
|
<div class="clr-col-sm-12">
|
||||||
<label>Number2</label>
|
<label>number2</label>
|
||||||
<input id="name" class="clr-input" type="number" [(ngModel)]="rowSelected.number2" name="number2" />
|
<input id="name" class="clr-input" type="number" [(ngModel)]="rowSelected.number2" name="number2" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="clr-col-sm-12">
|
<div class="clr-col-sm-12">
|
||||||
<label>Operation</label>
|
<label>result</label>
|
||||||
<input class="clr-input" type="text" [(ngModel)]="rowSelected.operation" name="operation" />
|
<input class="clr-input" type="text" [(ngModel)]="rowSelected.result" name="result" />
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="clr-col-sm-12">
|
|
||||||
<label>Result</label>
|
|
||||||
<input id="name" class="clr-input" type="number" [(ngModel)]="rowSelected.result" name="result" />
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -262,8 +246,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>
|
||||||
@ -314,8 +296,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- aeroplane icon -->
|
<!-- aeroplane icon -->
|
||||||
|
|
||||||
<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"
|
||||||
@ -330,7 +310,7 @@
|
|||||||
<div class="clr-row" style="height: fit-content;">
|
<div class="clr-row" style="height: fit-content;">
|
||||||
|
|
||||||
<div class="clr-col-sm-12">
|
<div class="clr-col-sm-12">
|
||||||
<label> Number1</label>
|
<label> number1</label>
|
||||||
<input class="clr-input" type="number" formControlName="number1" />
|
<input class="clr-input" type="number" formControlName="number1" />
|
||||||
<div *ngIf="submitted && entryForm.controls.number1.errors" class="error_mess">
|
<div *ngIf="submitted && entryForm.controls.number1.errors" class="error_mess">
|
||||||
<div *ngIf="submitted && entryForm.controls.number1.errors.required" class="error_mess">*This field is Required</div>
|
<div *ngIf="submitted && entryForm.controls.number1.errors.required" class="error_mess">*This field is Required</div>
|
||||||
@ -338,7 +318,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="clr-col-sm-12">
|
<div class="clr-col-sm-12">
|
||||||
<label> Number2</label>
|
<label> number2</label>
|
||||||
<input class="clr-input" type="number" formControlName="number2" />
|
<input class="clr-input" type="number" formControlName="number2" />
|
||||||
<div *ngIf="submitted && entryForm.controls.number2.errors" class="error_mess">
|
<div *ngIf="submitted && entryForm.controls.number2.errors" class="error_mess">
|
||||||
<div *ngIf="submitted && entryForm.controls.number2.errors.required" class="error_mess">*This field is Required</div>
|
<div *ngIf="submitted && entryForm.controls.number2.errors.required" class="error_mess">*This field is Required</div>
|
||||||
@ -346,16 +326,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="clr-col-sm-12">
|
<div class="clr-col-sm-12">
|
||||||
<label> Operation</label>
|
<label> result</label>
|
||||||
<input class="clr-input" type="text" formControlName="operation" />
|
<input class="clr-input" type="text" formControlName="result" />
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="clr-col-sm-12">
|
|
||||||
<label> Result</label>
|
|
||||||
<input class="clr-input" type="number" formControlName="result" />
|
|
||||||
<div *ngIf="submitted && entryForm.controls.result.errors" class="error_mess">
|
|
||||||
<div *ngIf="submitted && entryForm.controls.result.errors.required" class="error_mess">*This field is Required</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@ -368,8 +340,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>
|
||||||
@ -406,6 +376,4 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- htmlpopup -->
|
<!-- htmlpopup -->
|
||||||
|
|||||||
@ -68,11 +68,7 @@ number1 : [null,[Validators.required]],
|
|||||||
|
|
||||||
number2 : [null,[Validators.required]],
|
number2 : [null,[Validators.required]],
|
||||||
|
|
||||||
operation : [null],
|
result : [null],
|
||||||
|
|
||||||
result : [null,[Validators.required]],
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -110,8 +106,6 @@ result : [null,[Validators.required]],
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
if (this.editInterval) {
|
if (this.editInterval) {
|
||||||
@ -123,8 +117,6 @@ result : [null,[Validators.required]],
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
error;
|
error;
|
||||||
getData() {
|
getData() {
|
||||||
this.mainService.getAll().subscribe((data) => {
|
this.mainService.getAll().subscribe((data) => {
|
||||||
@ -149,8 +141,6 @@ this.product = [...this.product].reverse(); if(this.product.length==0){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.modalEdit = true;
|
this.modalEdit = true;
|
||||||
}
|
}
|
||||||
onDelete(row) {
|
onDelete(row) {
|
||||||
@ -176,8 +166,6 @@ this.product = [...this.product].reverse(); if(this.product.length==0){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//console.log("in update");
|
//console.log("in update");
|
||||||
console.log("id " + id);
|
console.log("id " + id);
|
||||||
console.log(this.rowSelected);
|
console.log(this.rowSelected);
|
||||||
@ -197,8 +185,6 @@ setTimeout(() => {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
if (error.status >= 200 && error.status <= 299) {
|
if (error.status >= 200 && error.status <= 299) {
|
||||||
@ -223,8 +209,6 @@ onCreate() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.mainService.create(this.entryForm.value).subscribe(
|
this.mainService.create(this.entryForm.value).subscribe(
|
||||||
(data) => {
|
(data) => {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
@ -240,8 +224,6 @@ setTimeout(() => {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
if (error.status >= 200 && error.status <= 299) {
|
if (error.status >= 200 && error.status <= 299) {
|
||||||
@ -266,8 +248,6 @@ this.modalAdd = true; this.submitted = false;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
submitted = false;
|
submitted = false;
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
@ -284,8 +264,6 @@ onSubmit() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// updateaction
|
// updateaction
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -293,5 +271,3 @@ onSubmit() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -35,7 +35,5 @@ export class Calculatorservice{
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// updateaction
|
// updateaction
|
||||||
}
|
}
|
||||||
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
import { StopwatchComponent } from './BuilderComponents/app-b/Stopwatch/Stopwatch.component';
|
import { StopwatchComponent } from './BuilderComponents/app-b/Stopwatch/Stopwatch.component';
|
||||||
|
|
||||||
|
|
||||||
@ -287,6 +288,8 @@ const routes: Routes = [
|
|||||||
|
|
||||||
|
|
||||||
// buildercomponents
|
// buildercomponents
|
||||||
|
|
||||||
|
|
||||||
{path:'Stopwatch',component:StopwatchComponent},
|
{path:'Stopwatch',component:StopwatchComponent},
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
import { StopwatchComponent } from './BuilderComponents/app-b/Stopwatch/Stopwatch.component';
|
import { StopwatchComponent } from './BuilderComponents/app-b/Stopwatch/Stopwatch.component';
|
||||||
|
|
||||||
|
|
||||||
@ -160,6 +161,8 @@ import { MyworkspaceComponent } from './admin/myworkspace/myworkspace.component'
|
|||||||
|
|
||||||
|
|
||||||
// buildercomponents
|
// buildercomponents
|
||||||
|
|
||||||
|
|
||||||
StopwatchComponent,
|
StopwatchComponent,
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -226,4 +226,8 @@
|
|||||||
"MENU_ACTION_LINK": "Menu Action Link",
|
"MENU_ACTION_LINK": "Menu Action Link",
|
||||||
"STATUS": "Status",
|
"STATUS": "Status",
|
||||||
"SUB_MENU": "Sub Menu",
|
"SUB_MENU": "Sub Menu",
|
||||||
|
"result": "result",
|
||||||
|
"Calculator": "Calculator",
|
||||||
|
"number1": "number1",
|
||||||
|
"number2": "number2"
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user