build_app
This commit is contained in:
		
							parent
							
								
									67fc8da912
								
							
						
					
					
						commit
						f53b2eea70
					
				| @ -78,6 +78,12 @@ addCustomMenu( "Stopwatch","Stopwatch",  "Transcations"); | ||||
| addCustomMenu( "Stopwatch","Stopwatch",  "Transcations");  | ||||
| 
 | ||||
| 
 | ||||
| addCustomMenu( "Stopwatch","Stopwatch",  "Transcations");  | ||||
| 
 | ||||
| 
 | ||||
| addCustomMenu( "Stopwatch","Stopwatch",  "Transcations");  | ||||
| 
 | ||||
| 
 | ||||
| addCustomMenu( "Stopwatch","Stopwatch",  "Transcations");  | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -18,12 +18,6 @@ import com.realnet.stopwatch.Entity.Stopwatch; | ||||
| import com.realnet.stopwatch.Services.StopwatchService ; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @RequestMapping(value = "/Stopwatch") | ||||
|  @CrossOrigin("*")  | ||||
| @RestController | ||||
| @ -36,22 +30,10 @@ public class StopwatchController { | ||||
|   | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 	@PostMapping("/Stopwatch") | ||||
| 		  public Stopwatch Savedata(@RequestBody Stopwatch data) { | ||||
| 		Stopwatch save = Service.Savedata(data)	; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 		System.out.println("data saved..." + save); | ||||
| 
 | ||||
|  return save; | ||||
| @ -98,10 +80,4 @@ public class StopwatchController { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -18,12 +18,6 @@ import com.realnet.stopwatch.Entity.Stopwatch; | ||||
| import com.realnet.stopwatch.Services.StopwatchService ; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @RequestMapping(value = "/token/Stopwatch") | ||||
|  @CrossOrigin("*")  | ||||
| @RestController | ||||
| @ -36,22 +30,10 @@ public class tokenFree_StopwatchController { | ||||
|   | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 	@PostMapping("/Stopwatch") | ||||
| 		  public Stopwatch Savedata(@RequestBody Stopwatch data) { | ||||
| 		Stopwatch save = Service.Savedata(data)	; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 		System.out.println("data saved..." + save); | ||||
| 
 | ||||
|  return save; | ||||
| @ -98,10 +80,4 @@ public class tokenFree_StopwatchController { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -6,12 +6,6 @@ import com.realnet.WhoColumn.Entity.Extension; | ||||
|  import java.util.*; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  @Entity  | ||||
|  @Data | ||||
|  public class    Stopwatch extends Extension {  | ||||
| @ -24,13 +18,7 @@ import com.realnet.WhoColumn.Entity.Extension; | ||||
|  @GeneratedValue(strategy = GenerationType.IDENTITY) | ||||
|  private Integer id; | ||||
| 
 | ||||
| private String starttime; | ||||
| 
 | ||||
| private String endtime; | ||||
| 
 | ||||
| private int duration; | ||||
| 
 | ||||
| private String  status; | ||||
| private int elapsedtime; | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
|  | ||||
| @ -13,12 +13,6 @@ import java.util.*; | ||||
| 
 | ||||
|   | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   | ||||
| 
 | ||||
| import com.realnet.stopwatch.Entity.Stopwatch; | ||||
| 
 | ||||
| @Repository | ||||
|  | ||||
| @ -14,12 +14,6 @@ import com.realnet.users.service1.AppUserServiceImpl; | ||||
| import com.realnet.users.entity1.AppUser; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 	import org.springframework.stereotype.Service; | ||||
| 
 | ||||
| @Service | ||||
| @ -31,21 +25,9 @@ private StopwatchRepository Repository; | ||||
| @Autowired | ||||
| 	private RealmService realmService; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| public Stopwatch Savedata(Stopwatch data) { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 	data.setUpdatedBy(getUser().getUserId()); | ||||
| 		data.setCreatedBy(getUser().getUserId()); | ||||
| 		data.setAccountId(getUser().getAccount().getAccount_id()); | ||||
| @ -77,25 +59,13 @@ public Stopwatch getdetailsbyId(Integer id) { | ||||
| 
 | ||||
| public Stopwatch update(Stopwatch data,Integer id) { | ||||
| 	Stopwatch old = Repository.findById(id).get(); | ||||
| old.setStarttime(data.getStarttime()); | ||||
| 
 | ||||
| old.setEndtime(data.getEndtime()); | ||||
| 
 | ||||
| old.setDuration(data.getDuration()); | ||||
| 
 | ||||
| old.setStatus(data.getStatus()); | ||||
| old.setElapsedtime(data.getElapsedtime()); | ||||
| 
 | ||||
| final Stopwatch test = Repository.save(old); | ||||
| 		data.setUpdatedBy(getUser().getUserId()); | ||||
|   return test;}  | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  public AppUser getUser() { | ||||
| 		AppUser user = userService.getLoggedInUser(); | ||||
| 		return user; | ||||
|  | ||||
| @ -1,2 +1,4 @@ | ||||
| CREATE TABLE stop_watch_app-d.Stopwatch(id BIGINT NOT NULL AUTO_INCREMENT, duration int, starttime Date, endtime Date, status VARCHAR(400),  PRIMARY KEY (id)); | ||||
| 
 | ||||
| CREATE TABLE stop_watch_app-d.Stopwatch(id BIGINT NOT NULL AUTO_INCREMENT, elapsedtime int,  PRIMARY KEY (id)); | ||||
| 
 | ||||
|  | ||||
| @ -1,10 +1,10 @@ | ||||
| <ol class="breadcrumb breadcrumb-arrow font-trirong"> | ||||
|   <li><a href="javascript://"> Stopwatch</a></li> | ||||
|   <li><a href="javascript://"> StopWatch</a></li> | ||||
| </ol> | ||||
| <div class="dg-wrapper"> | ||||
|   <div class="clr-row"> | ||||
|     <div class="clr-col-8"> | ||||
|       <h3>Stopwatch </h3> | ||||
|       <h3>StopWatch </h3> | ||||
|     </div> | ||||
|     <div class="clr-col-4" style="text-align: right;"> | ||||
|  <button *ngIf="cardButton" id="add" class="btn btn-primary btn-icon" (click)="changeView()" > | ||||
| @ -23,19 +23,7 @@ | ||||
|         <div *ngIf="error;else loadingSpinner">{{error}}</div> | ||||
|     </clr-dg-placeholder> | ||||
| 
 | ||||
| <clr-dg-column [clrDgField]="'starttime'"> <ng-container *clrDgHideableColumn="{hidden: false}"> startTime | ||||
| 						    </ng-container></clr-dg-column> | ||||
| 
 | ||||
| 
 | ||||
| <clr-dg-column [clrDgField]="'endtime'"> <ng-container *clrDgHideableColumn="{hidden: false}"> endTime | ||||
| 						    </ng-container></clr-dg-column> | ||||
| 
 | ||||
| 
 | ||||
| <clr-dg-column [clrDgField]="'duration'"> <ng-container *clrDgHideableColumn="{hidden: false}"> duration | ||||
| 						    </ng-container></clr-dg-column> | ||||
| 
 | ||||
| 
 | ||||
| <clr-dg-column [clrDgField]="'status'"> <ng-container *clrDgHideableColumn="{hidden: false}"> status | ||||
| <clr-dg-column [clrDgField]="'elapsedtime'"> <ng-container *clrDgHideableColumn="{hidden: false}"> elapsedTime | ||||
| 						    </ng-container></clr-dg-column> | ||||
| 
 | ||||
|   | ||||
| @ -47,16 +35,7 @@ | ||||
| 
 | ||||
|  <clr-dg-row *clrDgItems="let user of product" [clrDgItem]="user"> | ||||
| 
 | ||||
| <clr-dg-cell>{{user.starttime }}</clr-dg-cell> | ||||
| 
 | ||||
| 
 | ||||
| <clr-dg-cell>{{user.endtime }}</clr-dg-cell> | ||||
| 
 | ||||
| 
 | ||||
| <clr-dg-cell>{{user.duration }}</clr-dg-cell> | ||||
| 
 | ||||
| 
 | ||||
| <clr-dg-cell>{{user.status }}</clr-dg-cell> | ||||
| <clr-dg-cell>{{user.elapsedtime }}</clr-dg-cell> | ||||
| 
 | ||||
|   | ||||
|   <!-- who column --> | ||||
| @ -212,23 +191,11 @@ | ||||
| </div> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <!-- //		EDIT DATA......... --> | ||||
| <clr-modal [(clrModalOpen)]="modalEdit" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true"> | ||||
|   <h3 class="modal-title">Update Stopwatch | ||||
|   <h3 class="modal-title">Update StopWatch | ||||
|  <!--update button --> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| </h3> | ||||
|   <div class="modal-body" *ngIf="rowSelected.id"> | ||||
|     <h2 class="heading">{{rowSelected.id}}</h2> | ||||
| @ -236,34 +203,13 @@ | ||||
|     <form > | ||||
| <div class="clr-row">  | ||||
| <div class="clr-col-sm-12">        | ||||
| <label>startTime</label> | ||||
| 	        <input id="name" class="clr-input"  type="date" [(ngModel)]="rowSelected.starttime" name="starttime" /> | ||||
| 	      </div> | ||||
| 
 | ||||
| <div class="clr-col-sm-12">        | ||||
| <label>endTime</label> | ||||
| 	        <input id="name" class="clr-input"  type="date" [(ngModel)]="rowSelected.endtime" name="endtime" /> | ||||
| 	      </div> | ||||
| 
 | ||||
| <div class="clr-col-sm-12">        | ||||
| <label>duration</label> | ||||
| 	        <input id="name" class="clr-input"  type="number" [(ngModel)]="rowSelected.duration" name="duration" /> | ||||
| 	      </div> | ||||
| 
 | ||||
| <div class="clr-col-sm-12">        | ||||
| <label>status</label> | ||||
| 	        <input class="clr-input"  type="text" [(ngModel)]="rowSelected.status" name="status" /> | ||||
| <label>elapsedTime</label> | ||||
| 	        <input id="name" class="clr-input"  type="number" [(ngModel)]="rowSelected.elapsedtime" name="elapsedtime" /> | ||||
| 	      </div> | ||||
| 
 | ||||
|   </div>  | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <!-- form code start --> | ||||
|   <div *ngIf="checkFormCode"> | ||||
|     <h4 style="font-weight: 300;display: inline;">Extension</h4> | ||||
| @ -307,13 +253,7 @@ | ||||
| </clr-modal> | ||||
| <!-- ADD FORM ..... --> | ||||
| <clr-modal [(clrModalOpen)]="modalAdd" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true"> | ||||
|   <h3 class="modal-title">Add Stopwatch  | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   <h3 class="modal-title">Add StopWatch  | ||||
| 
 | ||||
| 
 | ||||
|   <!-- aeroplane icon --> | ||||
| @ -330,26 +270,11 @@ | ||||
|    <div class="clr-row" style="height: fit-content;"> | ||||
| 
 | ||||
| <div class="clr-col-sm-12"> | ||||
|  <label>  startTime</label> | ||||
|  <input class="clr-input"  type="date"  formControlName="starttime" />        | ||||
|  <label>  elapsedTime</label> | ||||
|  <input class="clr-input"  type="number"  formControlName="elapsedtime" />       | ||||
|  <div *ngIf="submitted && entryForm.controls.elapsedtime.errors" class="error_mess"> | ||||
|   <div *ngIf="submitted && entryForm.controls.elapsedtime.errors.required" class="error_mess">*This field is Required</div> | ||||
| </div>   | ||||
| 
 | ||||
| <div class="clr-col-sm-12"> | ||||
|  <label>  endTime</label> | ||||
|  <input class="clr-input"  type="date"  formControlName="endtime" />        | ||||
|  </div> | ||||
| 
 | ||||
| <div class="clr-col-sm-12"> | ||||
|  <label>  duration</label> | ||||
|  <input class="clr-input"  type="number"  formControlName="duration" />       | ||||
|  <div *ngIf="submitted && entryForm.controls.duration.errors" class="error_mess"> | ||||
|   <div *ngIf="submitted && entryForm.controls.duration.errors.required" class="error_mess">*This field is Required</div> | ||||
| </div>   | ||||
|  </div> | ||||
| 
 | ||||
| <div class="clr-col-sm-12"> | ||||
|  <label>  status</label> | ||||
|  <input class="clr-input"  type="text"  formControlName="status" />        | ||||
|  </div> | ||||
| 
 | ||||
|   | ||||
| @ -358,12 +283,6 @@ | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|       <!-- form code start --> | ||||
|       <div *ngIf="checkFormCode"> | ||||
|         <h4 style="font-weight: 300;display: inline;">Extension</h4> | ||||
| @ -396,10 +315,4 @@ | ||||
| </clr-modal> | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   <!-- htmlpopup --> | ||||
|  | ||||
| @ -64,19 +64,7 @@ private userInfoService:UserInfoService, | ||||
|     this.userrole=this.userInfoService.getRoles(); | ||||
|     this.getData(); | ||||
|     this.entryForm = this._fb.group({ | ||||
| starttime : [null], | ||||
| 
 | ||||
| endtime : [null], | ||||
| 
 | ||||
| duration : [null,[Validators.required]], | ||||
| 
 | ||||
| status : [null], | ||||
| 
 | ||||
| 
 | ||||
|   | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| elapsedtime : [null,[Validators.required]], | ||||
| 
 | ||||
| 
 | ||||
|   | ||||
| @ -106,12 +94,6 @@ status : [null], | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   } | ||||
|  ngOnDestroy(): void { | ||||
|     if (this.editInterval) { | ||||
| @ -119,12 +101,6 @@ status : [null], | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  error;  | ||||
|   getData() { | ||||
|     this.mainService.getAll().subscribe((data) => { | ||||
| @ -145,12 +121,6 @@ this.product = [...this.product].reverse(); if(this.product.length==0){ | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|     this.modalEdit = true; | ||||
|   } | ||||
|    onDelete(row) { | ||||
| @ -172,12 +142,6 @@ this.product = [...this.product].reverse(); if(this.product.length==0){ | ||||
|     this.modalEdit = false; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|     //console.log("in update");
 | ||||
|     console.log("id  " + id); | ||||
|     console.log(this.rowSelected); | ||||
| @ -193,12 +157,6 @@ setTimeout(() => { | ||||
|     }, 500); | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|       }, (error) => { | ||||
|         console.log(error); | ||||
|         if (error.status >= 200 && error.status <= 299) { | ||||
| @ -219,12 +177,6 @@ onCreate() { | ||||
|      this.modalAdd=false; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   this.mainService.create(this.entryForm.value).subscribe( | ||||
|     (data) => { | ||||
|       console.log(data); | ||||
| @ -236,12 +188,6 @@ setTimeout(() => { | ||||
|     }, 500); | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|       }, (error) => { | ||||
|         console.log(error); | ||||
|         if (error.status >= 200 && error.status <= 299) { | ||||
| @ -262,12 +208,6 @@ setTimeout(() => { | ||||
| this.modalAdd = true; this.submitted = false; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   } | ||||
|  submitted = false; | ||||
| onSubmit() { | ||||
| @ -280,18 +220,6 @@ onSubmit() { | ||||
| }  | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // updateaction
 | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -31,11 +31,5 @@ export class Stopwatchservice{ | ||||
|   } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // updateaction
 | ||||
| } | ||||
| @ -1,6 +1,8 @@ | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| import { StopwatchComponent } from './BuilderComponents/stopwatch/Stopwatch/Stopwatch.component'; | ||||
| 
 | ||||
| import { SequencegenaratorComponent } from './fnd/sequencegenarator/sequencegenarator.component'; | ||||
| @ -270,6 +272,10 @@ const routes: Routes = [ | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| {path:'Stopwatch',component:StopwatchComponent}, | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -1,6 +1,8 @@ | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| import { StopwatchComponent } from './BuilderComponents/stopwatch/Stopwatch/Stopwatch.component'; | ||||
| 
 | ||||
| 
 | ||||
| @ -143,6 +145,10 @@ import { MyworkspaceComponent } from './admin/myworkspace/myworkspace.component' | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| StopwatchComponent, | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -230,5 +230,6 @@ | ||||
|   "Stopwatch": "Stopwatch", | ||||
|   "startTime": "startTime", | ||||
|   "endTime": "endTime", | ||||
|   "status": "status" | ||||
|   "status": "status", | ||||
|   "elapsedTime": "elapsedTime" | ||||
| } | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user