build_app
This commit is contained in:
		
							parent
							
								
									d903e72f4a
								
							
						
					
					
						commit
						f780eac5bf
					
				| @ -69,6 +69,9 @@ public class BuilderService { | ||||
| 		executeDump(true); | ||||
| 
 | ||||
| 		// ADD OTHER SERVICE | ||||
| addCustomMenu( "Note","Note",  "Transcations");  | ||||
| 
 | ||||
| 
 | ||||
| addCustomMenu( "Notesappwireframe","Notesappwireframe",  "Transcations");  | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -20,6 +20,8 @@ import com.realnet.app-b.Services.NoteService ; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @RequestMapping(value = "/Note") | ||||
|  @CrossOrigin("*")  | ||||
| @RestController | ||||
| @ -34,12 +36,16 @@ public class NoteController { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 	@PostMapping("/Note") | ||||
| 		  public Note Savedata(@RequestBody Note data) { | ||||
| 		Note save = Service.Savedata(data)	; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 		System.out.println("data saved..." + save); | ||||
| 
 | ||||
|  return save; | ||||
| @ -88,4 +94,6 @@ public class NoteController { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -20,6 +20,8 @@ import com.realnet.app-b.Services.NoteService ; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @RequestMapping(value = "/token/Note") | ||||
|  @CrossOrigin("*")  | ||||
| @RestController | ||||
| @ -34,12 +36,16 @@ public class tokenFree_NoteController { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 	@PostMapping("/Note") | ||||
| 		  public Note Savedata(@RequestBody Note data) { | ||||
| 		Note save = Service.Savedata(data)	; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 		System.out.println("data saved..." + save); | ||||
| 
 | ||||
|  return save; | ||||
| @ -88,4 +94,6 @@ public class tokenFree_NoteController { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
| @ -8,6 +8,8 @@ import com.realnet.WhoColumn.Entity.Extension; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  @Entity  | ||||
|  @Data | ||||
|  public class    Note extends Extension {  | ||||
| @ -24,5 +26,7 @@ private String  title; | ||||
| 
 | ||||
| private String  content; | ||||
| 
 | ||||
| private String createdat; | ||||
| 
 | ||||
| 
 | ||||
| } | ||||
|  | ||||
| @ -12,6 +12,8 @@ import java.util.*; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   | ||||
| 
 | ||||
|  | ||||
| @ -16,6 +16,8 @@ import com.realnet.users.entity1.AppUser; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 	import org.springframework.stereotype.Service; | ||||
| 
 | ||||
| @Service | ||||
| @ -29,11 +31,15 @@ private NoteRepository Repository; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| public Note Savedata(Note data) { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 	data.setUpdatedBy(getUser().getUserId()); | ||||
| 		data.setCreatedBy(getUser().getUserId()); | ||||
| 		data.setAccountId(getUser().getAccount().getAccount_id()); | ||||
| @ -69,6 +75,8 @@ old.setTitle(data.getTitle()); | ||||
| 
 | ||||
| old.setContent(data.getContent()); | ||||
| 
 | ||||
| old.setCreatedat(data.getCreatedat()); | ||||
| 
 | ||||
| final Note test = Repository.save(old); | ||||
| 		data.setUpdatedBy(getUser().getUserId()); | ||||
|   return test;}  | ||||
| @ -76,6 +84,8 @@ final Note test = Repository.save(old); | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  public AppUser getUser() { | ||||
| 		AppUser user = userService.getLoggedInUser(); | ||||
| 		return user; | ||||
|  | ||||
| @ -1,4 +1,2 @@ | ||||
| CREATE TABLE app-d.Note(id BIGINT NOT NULL AUTO_INCREMENT, title VARCHAR(400), content VARCHAR(400),  PRIMARY KEY (id)); | ||||
| 
 | ||||
| CREATE TABLE app-d.Notesappwireframe(id BIGINT NOT NULL AUTO_INCREMENT, createdat Date, notecontent VARCHAR(400), notetitle VARCHAR(400),  PRIMARY KEY (id)); | ||||
| CREATE TABLE app-d.Note(id BIGINT NOT NULL AUTO_INCREMENT, content VARCHAR(400), createdat Date, title VARCHAR(400),  PRIMARY KEY (id)); | ||||
| 
 | ||||
|  | ||||
| @ -23,11 +23,15 @@ | ||||
|         <div *ngIf="error;else loadingSpinner">{{error}}</div> | ||||
|     </clr-dg-placeholder> | ||||
| 
 | ||||
| <clr-dg-column [clrDgField]="'title'"> <ng-container *clrDgHideableColumn="{hidden: false}"> title | ||||
| <clr-dg-column [clrDgField]="'title'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Title | ||||
| 						    </ng-container></clr-dg-column> | ||||
| 
 | ||||
| 
 | ||||
| <clr-dg-column [clrDgField]="'content'"> <ng-container *clrDgHideableColumn="{hidden: false}"> content | ||||
| <clr-dg-column [clrDgField]="'content'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Content | ||||
| 						    </ng-container></clr-dg-column> | ||||
| 
 | ||||
| 
 | ||||
| <clr-dg-column [clrDgField]="'createdat'"> <ng-container *clrDgHideableColumn="{hidden: false}"> CreatedAt | ||||
| 						    </ng-container></clr-dg-column> | ||||
| 
 | ||||
|   | ||||
| @ -44,6 +48,9 @@ | ||||
| 
 | ||||
| <clr-dg-cell>{{user.content }}</clr-dg-cell> | ||||
| 
 | ||||
| 
 | ||||
| <clr-dg-cell>{{user.createdat }}</clr-dg-cell> | ||||
| 
 | ||||
|   | ||||
|   <!-- who column --> | ||||
| <clr-dg-cell> | ||||
| @ -200,6 +207,8 @@ | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <!-- //		EDIT DATA......... --> | ||||
| <clr-modal [(clrModalOpen)]="modalEdit" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true"> | ||||
|   <h3 class="modal-title">Update Note | ||||
| @ -207,6 +216,8 @@ | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| </h3> | ||||
|   <div class="modal-body" *ngIf="rowSelected.id"> | ||||
|     <h2 class="heading">{{rowSelected.id}}</h2> | ||||
| @ -214,20 +225,27 @@ | ||||
|     <form > | ||||
| <div class="clr-row">  | ||||
| <div class="clr-col-sm-12">        | ||||
| <label>title</label> | ||||
| <label>Title</label> | ||||
| 	        <input class="clr-input"  type="text" [(ngModel)]="rowSelected.title" name="title" /> | ||||
| 	      </div> | ||||
| 
 | ||||
| <div class="clr-col-sm-12">        | ||||
| <label>content</label> | ||||
| <label>Content</label> | ||||
| 	        <input class="clr-input"  type="text" [(ngModel)]="rowSelected.content" name="content" /> | ||||
| 	      </div> | ||||
| 
 | ||||
| <div class="clr-col-sm-12">        | ||||
| <label>CreatedAt</label> | ||||
| 	        <input id="name" class="clr-input"  type="date" [(ngModel)]="rowSelected.createdat" name="createdat" /> | ||||
| 	      </div> | ||||
| 
 | ||||
|   </div>  | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| <!-- form code start --> | ||||
|   <div *ngIf="checkFormCode"> | ||||
|     <h4 style="font-weight: 300;display: inline;">Extension</h4> | ||||
| @ -276,6 +294,8 @@ | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   <!-- aeroplane icon --> | ||||
|             | ||||
|     <a *ngIf="userrole?.includes('ADMIN')" style="float: right;" href="javascript:void(0)" role="tooltip" aria-haspopup="true" | ||||
| @ -290,21 +310,28 @@ | ||||
|    <div class="clr-row" style="height: fit-content;"> | ||||
| 
 | ||||
| <div class="clr-col-sm-12"> | ||||
|  <label>  title</label> | ||||
|  <label>  Title</label> | ||||
|  <input class="clr-input"  type="text"  formControlName="title" />        | ||||
|  </div> | ||||
| 
 | ||||
| <div class="clr-col-sm-12"> | ||||
|  <label>  content</label> | ||||
|  <label>  Content</label> | ||||
|  <input class="clr-input"  type="text"  formControlName="content" />        | ||||
|  </div> | ||||
| 
 | ||||
| <div class="clr-col-sm-12"> | ||||
|  <label>  CreatedAt</label> | ||||
|  <input class="clr-input"  type="date"  formControlName="createdat" />        | ||||
|  </div> | ||||
| 
 | ||||
|   | ||||
|  </div>  | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|       <!-- form code start --> | ||||
| @ -341,4 +368,6 @@ | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   <!-- htmlpopup --> | ||||
|  | ||||
| @ -68,11 +68,15 @@ title : [null], | ||||
| 
 | ||||
| content : [null], | ||||
| 
 | ||||
| createdat : [null], | ||||
| 
 | ||||
| 
 | ||||
|   | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   }); // component_button200
 | ||||
|  // form code start
 | ||||
|     this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => { | ||||
| @ -99,6 +103,8 @@ content : [null], | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   } | ||||
|  ngOnDestroy(): void { | ||||
| @ -109,6 +115,8 @@ content : [null], | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  error;  | ||||
|   getData() { | ||||
|     this.mainService.getAll().subscribe((data) => { | ||||
| @ -130,6 +138,8 @@ this.product = [...this.product].reverse(); if(this.product.length==0){ | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|     this.modalEdit = true; | ||||
|   } | ||||
| @ -154,6 +164,8 @@ this.product = [...this.product].reverse(); if(this.product.length==0){ | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|     //console.log("in update");
 | ||||
|     console.log("id  " + id); | ||||
|     console.log(this.rowSelected); | ||||
| @ -171,6 +183,8 @@ setTimeout(() => { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|       }, (error) => { | ||||
|         console.log(error); | ||||
|         if (error.status >= 200 && error.status <= 299) { | ||||
| @ -193,6 +207,8 @@ onCreate() { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   this.mainService.create(this.entryForm.value).subscribe( | ||||
|     (data) => { | ||||
|       console.log(data); | ||||
| @ -205,6 +221,8 @@ setTimeout(() => { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|       }, (error) => { | ||||
|         console.log(error); | ||||
| @ -227,6 +245,8 @@ this.modalAdd = true; this.submitted = false; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|   } | ||||
|  submitted = false; | ||||
| @ -242,8 +262,12 @@ onSubmit() { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // updateaction
 | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -33,5 +33,7 @@ export class Noteservice{ | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| // updateaction
 | ||||
| } | ||||
| @ -1,3 +1,4 @@ | ||||
| 
 | ||||
| import { NotesappwireframeComponent } from './BuilderComponents/app-b/Notesappwireframe/Notesappwireframe.component'; | ||||
| 
 | ||||
| 
 | ||||
| @ -296,6 +297,8 @@ const routes: Routes = [ | ||||
| 
 | ||||
| 
 | ||||
|       // buildercomponents
 | ||||
| 
 | ||||
| 
 | ||||
| {path:'Notesappwireframe',component:NotesappwireframeComponent}, | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -1,3 +1,4 @@ | ||||
| 
 | ||||
| import { NotesappwireframeComponent } from './BuilderComponents/app-b/Notesappwireframe/Notesappwireframe.component'; | ||||
| 
 | ||||
| 
 | ||||
| @ -169,6 +170,8 @@ import { MyworkspaceComponent } from './admin/myworkspace/myworkspace.component' | ||||
| 
 | ||||
| 
 | ||||
|     // buildercomponents
 | ||||
| 
 | ||||
| 
 | ||||
| NotesappwireframeComponent, | ||||
| 
 | ||||
| 
 | ||||
|  | ||||
| @ -226,11 +226,8 @@ | ||||
|   "MENU_ACTION_LINK": "Menu Action Link", | ||||
|   "STATUS": "Status", | ||||
|   "SUB_MENU": "Sub Menu", | ||||
|   "Content": "Content", | ||||
|   "Note": "Note", | ||||
|   "CreatedAt": "CreatedAt", | ||||
|   "NoteContent": "NoteContent", | ||||
|   "title": "title", | ||||
|   "content": "content", | ||||
|   "Notesappwireframe": "Notesappwireframe", | ||||
|   "NoteTitle": "NoteTitle" | ||||
|   "Title": "Title" | ||||
| } | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user