build_app
This commit is contained in:
parent
50238ed727
commit
25022f26fa
@ -78,6 +78,18 @@ addCustomMenu( "Testlist","Testlist", "Transcations");
|
|||||||
addCustomMenu( "Child","Child", "Transcations");
|
addCustomMenu( "Child","Child", "Transcations");
|
||||||
|
|
||||||
|
|
||||||
|
addCustomMenu( "Adv3","Adv3", "Transcations");
|
||||||
|
|
||||||
|
|
||||||
|
addCustomMenu( "Stepss","Stepper_workflow", "Transcations");
|
||||||
|
|
||||||
|
|
||||||
|
addCustomMenu( "Testlist","Testlist", "Transcations");
|
||||||
|
|
||||||
|
|
||||||
|
addCustomMenu( "Child","Child", "Transcations");
|
||||||
|
|
||||||
|
|
||||||
addCustomMenu( "Adv3","Adv3", "Transcations");
|
addCustomMenu( "Adv3","Adv3", "Transcations");
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -18,11 +18,6 @@ import com.realnet.basicp1.Entity.Adv3;
|
|||||||
import com.realnet.basicp1.Services.Adv3Service ;
|
import com.realnet.basicp1.Services.Adv3Service ;
|
||||||
|
|
||||||
|
|
||||||
import com.realnet.basicp1.Entity.Child;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -43,10 +38,6 @@ public class Adv3Controller {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/Adv3")
|
@PostMapping("/Adv3")
|
||||||
public Adv3 Savedata(@RequestBody Adv3 data) {
|
public Adv3 Savedata(@RequestBody Adv3 data) {
|
||||||
Adv3 save = Service.Savedata(data) ;
|
Adv3 save = Service.Savedata(data) ;
|
||||||
@ -55,10 +46,6 @@ public class Adv3Controller {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
System.out.println("data saved..." + save);
|
System.out.println("data saved..." + save);
|
||||||
|
|
||||||
return save;
|
return save;
|
||||||
@ -107,16 +94,6 @@ public class Adv3Controller {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/Adv3/Child_insert")
|
|
||||||
public Child insertChild(@RequestBody Child data) {
|
|
||||||
Child insertaction = Service.insertChild(data);
|
|
||||||
return insertaction;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -18,11 +18,6 @@ import com.realnet.basicp1.Entity.Adv3;
|
|||||||
import com.realnet.basicp1.Services.Adv3Service ;
|
import com.realnet.basicp1.Services.Adv3Service ;
|
||||||
|
|
||||||
|
|
||||||
import com.realnet.basicp1.Entity.Child;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -43,10 +38,6 @@ public class tokenFree_Adv3Controller {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/Adv3")
|
@PostMapping("/Adv3")
|
||||||
public Adv3 Savedata(@RequestBody Adv3 data) {
|
public Adv3 Savedata(@RequestBody Adv3 data) {
|
||||||
Adv3 save = Service.Savedata(data) ;
|
Adv3 save = Service.Savedata(data) ;
|
||||||
@ -55,10 +46,6 @@ public class tokenFree_Adv3Controller {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
System.out.println("data saved..." + save);
|
System.out.println("data saved..." + save);
|
||||||
|
|
||||||
return save;
|
return save;
|
||||||
@ -107,16 +94,6 @@ public class tokenFree_Adv3Controller {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
@PostMapping("/Adv3/Child_insert")
|
|
||||||
public Child insertChild(@RequestBody Child data) {
|
|
||||||
Child insertaction = Service.insertChild(data);
|
|
||||||
return insertaction;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -10,10 +10,6 @@ import com.realnet.WhoColumn.Entity.Extension;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
import com.realnet.basicp1.Entity.Child;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Data
|
@Data
|
||||||
public class Adv3 extends Extension {
|
public class Adv3 extends Extension {
|
||||||
@ -29,8 +25,6 @@ import com.realnet.basicp1.Entity.Child;
|
|||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -43,9 +37,6 @@ private String m;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
@OneToOne( cascade=CascadeType.ALL)
|
|
||||||
private Child child;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -14,10 +14,6 @@ import java.util.*;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -14,13 +14,6 @@ import com.realnet.users.service1.AppUserServiceImpl;
|
|||||||
import com.realnet.users.entity1.AppUser;
|
import com.realnet.users.entity1.AppUser;
|
||||||
|
|
||||||
|
|
||||||
import com.realnet.basicp1.Entity.Child;
|
|
||||||
|
|
||||||
import com.realnet.basicp1.Repository.ChildRepository;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -40,10 +33,6 @@ private Adv3Repository Repository;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public Adv3 Savedata(Adv3 data) {
|
public Adv3 Savedata(Adv3 data) {
|
||||||
|
|
||||||
|
|
||||||
@ -51,10 +40,6 @@ public Adv3 Savedata(Adv3 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,8 +74,6 @@ public Adv3 update(Adv3 data,Integer id) {
|
|||||||
old.setName(data.getName());
|
old.setName(data.getName());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
old.setL(data.getL());
|
old.setL(data.getL());
|
||||||
|
|
||||||
@ -101,8 +84,6 @@ old.setM(data.getM());
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
old.setChild(data.getChild());
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
final Adv3 test = Repository.save(old);
|
final Adv3 test = Repository.save(old);
|
||||||
@ -111,25 +92,6 @@ final Adv3 test = Repository.save(old);
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Insert Action
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ChildRepository childinsertrepository;
|
|
||||||
|
|
||||||
public Child insertChild(Child data) {
|
|
||||||
|
|
||||||
data.setUpdatedBy(getUser().getUserId());
|
|
||||||
data.setCreatedBy(getUser().getUserId());
|
|
||||||
data.setAccountId(getUser().getAccount().getAccount_id());
|
|
||||||
|
|
||||||
|
|
||||||
final Child save = childinsertrepository.save(data);
|
|
||||||
return save;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
CREATE TABLE dsb.Adv3(id BIGINT NOT NULL AUTO_INCREMENT, onetoone VARCHAR(400), value_list_field VARCHAR(400), l VARCHAR(400), m VARCHAR(400), button_field VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id));
|
CREATE TABLE dsb.Adv3(id BIGINT NOT NULL AUTO_INCREMENT, value_list_field VARCHAR(400), l VARCHAR(400), m VARCHAR(400), name VARCHAR(400), PRIMARY KEY (id));
|
||||||
|
|
||||||
CREATE TABLE dsb.Child(id BIGINT NOT NULL AUTO_INCREMENT, name VARCHAR(400), PRIMARY KEY (id));
|
CREATE TABLE dsb.Child(id BIGINT NOT NULL AUTO_INCREMENT, name VARCHAR(400), PRIMARY KEY (id));
|
||||||
|
|
||||||
|
|||||||
@ -1,39 +1,31 @@
|
|||||||
<ol class="breadcrumb breadcrumb-arrow font-trirong">
|
<ol class="breadcrumb breadcrumb-arrow font-trirong">
|
||||||
<li><a href="javascript://"> Adv3</a></li>
|
<li><a href="javascript://"> Adv3</a></li>
|
||||||
</ol>
|
</ol>
|
||||||
<div class="dg-wrapper">
|
<div class="dg-wrapper">
|
||||||
<div class="clr-row">
|
<div class="clr-row">
|
||||||
<div class="clr-col-8">
|
<div class="clr-col-8">
|
||||||
<h3>Adv3 </h3>
|
<h3>Adv3 </h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="clr-col-4" style="text-align: right;">
|
<div class="clr-col-4" style="text-align: right;">
|
||||||
<button *ngIf="cardButton" id="add" class="btn btn-primary btn-icon" (click)="changeView()" >
|
<button *ngIf="cardButton" id="add" class="btn btn-primary btn-icon" (click)="changeView()" >
|
||||||
<clr-icon *ngIf="!isCardview" shape="grid-view"></clr-icon> <clr-icon *ngIf="isCardview" shape="bars"></clr-icon>
|
<clr-icon *ngIf="!isCardview" shape="grid-view"></clr-icon> <clr-icon *ngIf="isCardview" shape="bars"></clr-icon>
|
||||||
</button>
|
</button>
|
||||||
<!-- button -->
|
<!-- button -->
|
||||||
<!-- insert button -->
|
<button id="add" class="btn btn-primary" (click)="goToAdd(product)" >
|
||||||
<button id="insert" class="btn btn-primary" (click)="goToInsertButton_Field()">
|
<clr-icon shape="plus"></clr-icon>ADD
|
||||||
<clr-icon shape="plus"></clr-icon>Insert Button_Field
|
</button>
|
||||||
</button>
|
</div></div>
|
||||||
<!-- insert end -->
|
<ng-container *ngIf="!isCardview"> <!-- GET ALL --> <clr-datagrid [clrDgLoading]="loading" [(clrDgSelected)]="selected">
|
||||||
|
<clr-dg-placeholder>
|
||||||
<button id="add" class="btn btn-primary" (click)="goToAdd(product)" >
|
<ng-template #loadingSpinner>
|
||||||
<clr-icon shape="plus"></clr-icon>ADD
|
<clr-spinner>Loading ... </clr-spinner>
|
||||||
</button>
|
</ng-template>
|
||||||
</div></div>
|
<div *ngIf="error;else loadingSpinner">{{error}}</div>
|
||||||
<ng-container *ngIf="!isCardview"> <!-- GET ALL --> <clr-datagrid [clrDgLoading]="loading" [(clrDgSelected)]="selected">
|
</clr-dg-placeholder>
|
||||||
<clr-dg-placeholder>
|
|
||||||
<ng-template #loadingSpinner>
|
|
||||||
<clr-spinner>Loading ... </clr-spinner>
|
|
||||||
</ng-template>
|
|
||||||
<div *ngIf="error;else loadingSpinner">{{error}}</div>
|
|
||||||
</clr-dg-placeholder>
|
|
||||||
|
|
||||||
<clr-dg-column [clrDgField]="'name'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Name
|
<clr-dg-column [clrDgField]="'name'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Name
|
||||||
</ng-container></clr-dg-column>
|
</ng-container></clr-dg-column>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -48,30 +40,21 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<clr-dg-column [clrDgField]="'child.name'"> <ng-container *clrDgHideableColumn="{hidden: false}">name</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
|
||||||
</ng-container></clr-dg-column>
|
</ng-container></clr-dg-column>
|
||||||
<!-- end -->
|
<!-- end -->
|
||||||
|
|
||||||
<clr-dg-row *clrDgItems="let user of product" [clrDgItem]="user">
|
<clr-dg-row *clrDgItems="let user of product" [clrDgItem]="user">
|
||||||
|
|
||||||
<clr-dg-cell>{{user.name }}</clr-dg-cell>
|
<clr-dg-cell>{{user.name }}</clr-dg-cell>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<clr-dg-cell>{{user. l}}</clr-dg-cell>
|
<clr-dg-cell>{{user. l}}</clr-dg-cell>
|
||||||
|
|
||||||
@ -85,200 +68,183 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<clr-dg-cell>{{user.child.name}}</clr-dg-cell>
|
<!-- who column -->
|
||||||
|
<clr-dg-cell>
|
||||||
|
<clr-signpost>
|
||||||
|
<span style="cursor: pointer;" clrSignpostTrigger><clr-icon shape="help" class="success" style="color: rgb(0, 130, 236);"></clr-icon></span>
|
||||||
|
<clr-signpost-content [clrPosition]="'left-middle'" *clrIfOpen>
|
||||||
|
<h5 style="margin-top: 0">Who Column</h5>
|
||||||
|
<div>Account ID: <code class="clr-code">{{user.accountId}}</code></div>
|
||||||
<!-- who column -->
|
<div>Created At: <code class="clr-code">{{user.createdAt| date}}</code></div>
|
||||||
<clr-dg-cell>
|
<div>Created By: <code class="clr-code">{{user.createdBy}}</code></div>
|
||||||
<clr-signpost>
|
<div>Updated At: <code class="clr-code">{{user.updatedAt | date}}</code></div>
|
||||||
<span style="cursor: pointer;" clrSignpostTrigger><clr-icon shape="help" class="success" style="color: rgb(0, 130, 236);"></clr-icon></span>
|
<div>Updated By: <code class="clr-code">{{user.updatedBy}}</code></div>
|
||||||
<clr-signpost-content [clrPosition]="'left-middle'" *clrIfOpen>
|
</clr-signpost-content>
|
||||||
<h5 style="margin-top: 0">Who Column</h5>
|
</clr-signpost>
|
||||||
<div>Account ID: <code class="clr-code">{{user.accountId}}</code></div>
|
</clr-dg-cell>
|
||||||
<div>Created At: <code class="clr-code">{{user.createdAt| date}}</code></div>
|
|
||||||
<div>Created By: <code class="clr-code">{{user.createdBy}}</code></div>
|
|
||||||
<div>Updated At: <code class="clr-code">{{user.updatedAt | date}}</code></div>
|
|
||||||
<div>Updated By: <code class="clr-code">{{user.updatedBy}}</code></div>
|
|
||||||
</clr-signpost-content>
|
|
||||||
</clr-signpost>
|
|
||||||
</clr-dg-cell>
|
|
||||||
|
|
||||||
<!-- who colmn -->
|
<!-- who colmn -->
|
||||||
|
|
||||||
<clr-dg-action-overflow>
|
<clr-dg-action-overflow>
|
||||||
<button class="action-item" (click)="onEdit(user)">Edit</button>
|
<button class="action-item" (click)="onEdit(user)">Edit</button>
|
||||||
<button class="action-item" (click)="onDelete(user)">Delete</button>
|
<button class="action-item" (click)="onDelete(user)">Delete</button>
|
||||||
</clr-dg-action-overflow>
|
</clr-dg-action-overflow>
|
||||||
</clr-dg-row>
|
</clr-dg-row>
|
||||||
<clr-dg-footer>
|
<clr-dg-footer>
|
||||||
<clr-dg-pagination #pagination [clrDgPageSize]="10">
|
<clr-dg-pagination #pagination [clrDgPageSize]="10">
|
||||||
<clr-dg-page-size [clrPageSizeOptions]="[10,20,50,100]">Users per page</clr-dg-page-size>
|
<clr-dg-page-size [clrPageSizeOptions]="[10,20,50,100]">Users per page</clr-dg-page-size>
|
||||||
{{pagination.firstItem + 1}} - {{pagination.lastItem + 1}}
|
{{pagination.firstItem + 1}} - {{pagination.lastItem + 1}}
|
||||||
of {{pagination.totalItems}} users
|
of {{pagination.totalItems}} users
|
||||||
</clr-dg-pagination>
|
</clr-dg-pagination>
|
||||||
</clr-dg-footer>
|
</clr-dg-footer>
|
||||||
</clr-datagrid> </ng-container>
|
</clr-datagrid> </ng-container>
|
||||||
<ng-template #showInfo>
|
<ng-template #showInfo>
|
||||||
<div class="alert alert-info" role="alert">
|
<div class="alert alert-info" role="alert">
|
||||||
<div class="alert-items">
|
<div class="alert-items">
|
||||||
<div class="alert-item static">
|
<div class="alert-item static">
|
||||||
<span class="alert-text">
|
<span class="alert-text">
|
||||||
<clr-icon class="alert-icon" shape="info-circle"></clr-icon>
|
<clr-icon class="alert-icon" shape="info-circle"></clr-icon>
|
||||||
Data could be found. Loading..
|
Data could be found. Loading..
|
||||||
<clr-spinner [clrMedium]="true">Loading ...</clr-spinner>
|
<clr-spinner [clrMedium]="true">Loading ...</clr-spinner>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ng-template><ng-container *ngIf="isCardview">
|
</ng-template><ng-container *ngIf="isCardview">
|
||||||
<div *ngIf="product; else showInfo" class="clr-row clr-align-items-start clr-justify-content-start">
|
<div *ngIf="product; else showInfo" class="clr-row clr-align-items-start clr-justify-content-start">
|
||||||
<div *ngFor="let app of product| filter:search; let index = i" class="clr-col-auto" >
|
<div *ngFor="let app of product| filter:search; let index = i" class="clr-col-auto" >
|
||||||
<div class="clr-row">
|
<div class="clr-row">
|
||||||
<div class="clr-col-lg-12 clr-col-md-4 clr-col-sm-4 clr-col-12" style="width: 410px;">
|
<div class="clr-col-lg-12 clr-col-md-4 clr-col-sm-4 clr-col-12" style="width: 410px;">
|
||||||
<div class="card" style="padding: 10px; "[style.background-color]="cardmodal.cardColor !== '' ? cardmodal.cardColor : 'white'">
|
<div class="card" style="padding: 10px; "[style.background-color]="cardmodal.cardColor !== '' ? cardmodal.cardColor : 'white'">
|
||||||
<div class="card-body" style="display: grid; grid-template-columns: repeat(13, 1fr); grid-template-rows: repeat(7, 1fr); gap: 5px;">
|
<div class="card-body" style="display: grid; grid-template-columns: repeat(13, 1fr); grid-template-rows: repeat(7, 1fr); gap: 5px;">
|
||||||
<ng-container *ngFor="let item of dashboardArray">
|
<ng-container *ngFor="let item of dashboardArray">
|
||||||
<div [style.gridColumn]="item.x + 1" [style.gridRow]="item.y + 1" [style.gridColumnEnd]="item.x + item.cols + 1"
|
<div [style.gridColumn]="item.x + 1" [style.gridRow]="item.y + 1" [style.gridColumnEnd]="item.x + item.cols + 1"
|
||||||
[style.gridRowEnd]="item.y + item.rows + 1">
|
[style.gridRowEnd]="item.y + item.rows + 1">
|
||||||
<div *ngIf="item.name === 'textField'" class="title-card card-title"
|
<div *ngIf="item.name === 'textField'" class="title-card card-title"
|
||||||
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
||||||
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
||||||
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
||||||
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
||||||
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
||||||
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
||||||
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
||||||
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
||||||
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'" [style.background-color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor"
|
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'" [style.background-color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor"
|
||||||
[style.color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor">
|
[style.color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor">
|
||||||
{{beforeText(item.fieldtext)}}
|
{{beforeText(item.fieldtext)}}
|
||||||
{{ app[transform(item.fieldtext) ] }}
|
{{ app[transform(item.fieldtext) ] }}
|
||||||
{{afterText(item.fieldtext)}}
|
{{afterText(item.fieldtext)}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="item.name === 'dateField'" class="title-card card-title"
|
<div *ngIf="item.name === 'dateField'" class="title-card card-title"
|
||||||
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
||||||
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
||||||
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
||||||
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
||||||
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
||||||
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
||||||
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
||||||
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
||||||
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'" [style.background-color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor"
|
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'" [style.background-color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor"
|
||||||
[style.color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor">
|
[style.color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor">
|
||||||
{{beforeText(item.fieldtext)}}
|
{{beforeText(item.fieldtext)}}
|
||||||
{{ app[transform(item.fieldtext) ] | date}}
|
{{ app[transform(item.fieldtext) ] | date}}
|
||||||
{{afterText(item.fieldtext)}}
|
{{afterText(item.fieldtext)}}
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="item.name === 'numberField'" class="title-card card-title"
|
<div *ngIf="item.name === 'numberField'" class="title-card card-title"
|
||||||
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
||||||
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
||||||
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
||||||
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
||||||
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
||||||
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
||||||
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
||||||
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
||||||
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'" [style.background-color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor"
|
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'" [style.background-color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor"
|
||||||
[style.color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor">
|
[style.color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor">
|
||||||
{{beforeText(item.fieldtext)}}
|
{{beforeText(item.fieldtext)}}
|
||||||
{{ app[transform(item.fieldtext) ]}}
|
{{ app[transform(item.fieldtext) ]}}
|
||||||
{{afterText(item.fieldtext)}}
|
{{afterText(item.fieldtext)}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="item.name === 'Line'" class="title-card card-title"
|
<div *ngIf="item.name === 'Line'" class="title-card card-title"
|
||||||
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
||||||
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
||||||
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
||||||
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
||||||
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
||||||
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
||||||
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
||||||
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
||||||
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'">
|
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'">
|
||||||
<hr>
|
<hr>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div *ngIf="item.name === 'Icon'" class="icon-card"
|
<div *ngIf="item.name === 'Icon'" class="icon-card"
|
||||||
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
||||||
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
||||||
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
||||||
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
||||||
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
||||||
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
||||||
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
||||||
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
||||||
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'"
|
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'"
|
||||||
>
|
>
|
||||||
<clr-icon [attr.shape]="item.iconName"></clr-icon>
|
<clr-icon [attr.shape]="item.iconName"></clr-icon>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="item.name == 'Image'"
|
<div *ngIf="item.name == 'Image'"
|
||||||
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
|
||||||
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
|
||||||
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
[style.font-family]="item.fontName !== '' ? item.fontName : 'Metropolis'"
|
||||||
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
[style.font-size]="item.fontSize !== '' ? item.fontSize : '100%'"
|
||||||
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
[style.font-style]="item.italic == true ? 'Italic' : 'normal'"
|
||||||
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
[style.font-weight]="item.bold == true ? 'bold' : 'normal'" [style.text-decoration]="(item.underline && item.strikethough) ? 'underline line-through' :
|
||||||
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
(item.underline ? 'underline' : (item.strikethough ? 'line-through' : 'none'))"
|
||||||
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
[style.background-color]="item.backgroundcolor !== '' ? item.backgroundcolor : 'white'"
|
||||||
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'"
|
[style.color]="item.textcolor !== '' ? item.textcolor : 'black'"
|
||||||
[style.background-color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor"
|
[style.background-color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditionbackgroundcolor : item.backgroundcolor"
|
||||||
[style.color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor"> <img id="filePreview" [src]="item.imageURL" alt="File Preview"
|
[style.color]="item.conditionValue == app[transform(item.fieldtext) ] ? item.conditiontextcolor : item.textcolor"> <img id="filePreview" [src]="item.imageURL" alt="File Preview"
|
||||||
[style.width]="item.imagewidth !== '' ? item.imagewidth + 'px' : '100px'"
|
[style.width]="item.imagewidth !== '' ? item.imagewidth + 'px' : '100px'"
|
||||||
[style.height]="item.imagewidth !== '' ? item.imagewidth + 'px' : '100px'"></div>
|
[style.height]="item.imagewidth !== '' ? item.imagewidth + 'px' : '100px'"></div>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- // EDIT DATA......... -->
|
||||||
|
<clr-modal [(clrModalOpen)]="modalEdit" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
|
||||||
|
|
||||||
|
|
||||||
<!-- // EDIT DATA......... -->
|
|
||||||
<clr-modal [(clrModalOpen)]="modalEdit" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
|
|
||||||
<h3 class="modal-title">Update Adv3
|
<h3 class="modal-title">Update Adv3
|
||||||
<!--update button -->
|
<!--update button -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<button class="btn btn-icon btn-primary" (click)="openvalueListvalue_list_field('EDIT')">V</button>
|
<button class="btn btn-icon btn-primary" (click)="openvalueListvalue_list_field('EDIT')">V</button>
|
||||||
|
|
||||||
</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>
|
||||||
<!-- button -->
|
<!-- button -->
|
||||||
<form >
|
<form >
|
||||||
<div class="clr-row">
|
<div class="clr-row">
|
||||||
<div class="clr-col-sm-12">
|
<div class="clr-col-sm-12">
|
||||||
<label>Name</label>
|
<label>Name</label>
|
||||||
<input class="clr-input" type="text" [(ngModel)]="rowSelected.name" name="name" />
|
<input class="clr-input" type="text" [(ngModel)]="rowSelected.name" name="name" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- multiselect field start -->
|
<!-- multiselect field start -->
|
||||||
<div class="clr-col-sm-12">
|
<div class="clr-col-sm-12">
|
||||||
<label> Field Group</label>
|
<label> Field Group</label>
|
||||||
@ -311,8 +277,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@ -320,91 +284,74 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- form code start -->
|
||||||
|
<div *ngIf="checkFormCode">
|
||||||
|
<h4 style="font-weight: 300;display: inline;">Extension</h4>
|
||||||
<div class="clr-col-md-4 clr-col-sm-12"> <label>name</label>
|
<br>
|
||||||
<input class="clr-input" id="name" type="text" [(ngModel)]="rowSelected.child.name" name="name" />
|
<hr>
|
||||||
</div>
|
<div class="clr-row">
|
||||||
|
<div class="clr-col-4" *ngFor="let field of additionalFieldsFromBackend">
|
||||||
|
<ng-container *ngIf="field.formCode === formcode" [ngSwitch]="field.fieldType">
|
||||||
|
<!-- Text Input --> <label *ngSwitchCase="'text'">{{ field.fieldName }}</label>
|
||||||
|
<input *ngSwitchCase="'text'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
|
||||||
|
|
||||||
<!-- form code start -->
|
<!-- Date Input --> <label *ngSwitchCase="'date'">{{ field.fieldName }}</label>
|
||||||
<div *ngIf="checkFormCode">
|
<input *ngSwitchCase="'date'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
|
||||||
<h4 style="font-weight: 300;display: inline;">Extension</h4>
|
|
||||||
<br>
|
<!-- Textarea --> <label *ngSwitchCase="'textarea'">{{ field.fieldName }}</label>
|
||||||
<hr>
|
<textarea *ngSwitchCase="'textarea'" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" col="10" row="2"></textarea>
|
||||||
<div class="clr-row">
|
|
||||||
<div class="clr-col-4" *ngFor="let field of additionalFieldsFromBackend">
|
<!-- Checkbox --> <label *ngSwitchCase="'checkbox'">{{ field.fieldName }}</label><br>
|
||||||
<ng-container *ngIf="field.formCode === formcode" [ngSwitch]="field.fieldType">
|
<input *ngSwitchCase="'checkbox'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-checkbox" />
|
||||||
<!-- Text Input --> <label *ngSwitchCase="'text'">{{ field.fieldName }}</label>
|
</ng-container>
|
||||||
<input *ngSwitchCase="'text'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
|
</div>
|
||||||
|
</div>
|
||||||
<!-- Date Input --> <label *ngSwitchCase="'date'">{{ field.fieldName }}</label>
|
</div>
|
||||||
<input *ngSwitchCase="'date'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
|
|
||||||
|
<!-- form code end --> <div class="modal-footer">
|
||||||
<!-- Textarea --> <label *ngSwitchCase="'textarea'">{{ field.fieldName }}</label>
|
<button type="button" class="btn btn-outline" (click)="modalEdit = false">Cancel</button>
|
||||||
<textarea *ngSwitchCase="'textarea'" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" col="10" row="2"></textarea>
|
<button type="submit" class="btn btn-primary" (click)="onUpdate(rowSelected.id)">Update</button>
|
||||||
|
</div>
|
||||||
<!-- Checkbox --> <label *ngSwitchCase="'checkbox'">{{ field.fieldName }}</label><br>
|
</form>
|
||||||
<input *ngSwitchCase="'checkbox'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-checkbox" />
|
</div>
|
||||||
</ng-container>
|
</clr-modal>
|
||||||
</div>
|
<clr-modal [(clrModalOpen)]="modaldelete" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
|
||||||
</div>
|
<div class="modal-body" *ngIf="rowSelected.id">
|
||||||
</div>
|
<h1 class="delete">Are You Sure Want to delete?</h1>
|
||||||
|
<h2 class="heading">{{rowSelected.id}}</h2>
|
||||||
<!-- form code end --> <div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-outline" (click)="modalEdit = false">Cancel</button>
|
<button type="button" class="btn btn-outline" (click)="modaldelete = false">Cancel</button>
|
||||||
<button type="submit" class="btn btn-primary" (click)="onUpdate(rowSelected.id)">Update</button>
|
<button type="button" (click)="delete(rowSelected.id)" class="btn btn-primary" >Delete</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</div>
|
||||||
</div>
|
</clr-modal>
|
||||||
</clr-modal>
|
<!-- ADD FORM ..... -->
|
||||||
<clr-modal [(clrModalOpen)]="modaldelete" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
|
<clr-modal [(clrModalOpen)]="modalAdd" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
|
||||||
<div class="modal-body" *ngIf="rowSelected.id">
|
|
||||||
<h1 class="delete">Are You Sure Want to delete?</h1>
|
|
||||||
<h2 class="heading">{{rowSelected.id}}</h2>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-outline" (click)="modaldelete = false">Cancel</button>
|
|
||||||
<button type="button" (click)="delete(rowSelected.id)" class="btn btn-primary" >Delete</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</clr-modal>
|
|
||||||
<!-- ADD FORM ..... -->
|
|
||||||
<clr-modal [(clrModalOpen)]="modalAdd" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
|
|
||||||
<h3 class="modal-title">Add Adv3
|
<h3 class="modal-title">Add Adv3
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<button class="btn btn-icon btn-primary" (click)="openvalueListvalue_list_field('ADD')">V</button>
|
<button class="btn btn-icon btn-primary" (click)="openvalueListvalue_list_field('ADD')">V</button>
|
||||||
|
|
||||||
|
|
||||||
<!-- 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"
|
||||||
class="tooltip tooltip-sm tooltip-bottom-left">
|
class="tooltip tooltip-sm tooltip-bottom-left">
|
||||||
<a id="build_extension" [routerLink]="['../extension/all']" [queryParams]="{ formCode: 'Adv3_formCode' }">
|
<a id="build_extension" [routerLink]="['../extension/all']" [queryParams]="{ formCode: 'Adv3_formCode' }">
|
||||||
<clr-icon shape="airplane" size="32"></clr-icon>
|
<clr-icon shape="airplane" size="32"></clr-icon>
|
||||||
</a>
|
</a>
|
||||||
<span class="tooltip-content">Form Extension</span>
|
<span class="tooltip-content">Form Extension</span>
|
||||||
</a> </h3>
|
</a> </h3>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<form [formGroup]="entryForm" >
|
<form [formGroup]="entryForm" >
|
||||||
<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> Name</label>
|
<label> Name</label>
|
||||||
<input class="clr-input" type="text" formControlName="name" />
|
<input class="clr-input" type="text" formControlName="name" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- multiselect field start -->
|
<!-- multiselect field start -->
|
||||||
<div class="clr-col-sm-12">
|
<div class="clr-col-sm-12">
|
||||||
<label> Field Group</label>
|
<label> Field Group</label>
|
||||||
@ -431,8 +378,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -441,61 +386,42 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div style="margin-top: 30px;">
|
|
||||||
<h4 style="display: inline;">child </h4> </div> <hr>
|
|
||||||
<div class="clr-row" formArrayName="child">
|
<!-- form code start -->
|
||||||
|
<div *ngIf="checkFormCode">
|
||||||
|
<h4 style="font-weight: 300;display: inline;">Extension</h4>
|
||||||
<div class="clr-col-md-4 clr-col-sm-12">
|
<br>
|
||||||
<label> name</label>
|
<hr>
|
||||||
<input class="clr-input" type="text" formControlName="name" /> </div>
|
<div class="clr-row">
|
||||||
|
<div class="clr-col-4" *ngFor="let field of additionalFieldsFromBackend">
|
||||||
|
<ng-container *ngIf="field.formCode === formcode" [ngSwitch]="field.fieldType">
|
||||||
</div>
|
<!-- Text Input --> <label *ngSwitchCase="'text'">{{ field.fieldName }}</label>
|
||||||
|
<input *ngSwitchCase="'text'" [type]="field.fieldType" [formControlName]="field.extValue"
|
||||||
|
class="clr-input" />
|
||||||
|
<!-- Date Input --> <label *ngSwitchCase="'date'">{{ field.fieldName }}</label>
|
||||||
|
<input *ngSwitchCase="'date'" [type]="field.fieldType" [formControlName]="field.extValue"
|
||||||
|
class="clr-input" />
|
||||||
|
<!-- Textarea --> <label *ngSwitchCase="'textarea'">{{ field.fieldName }}</label>
|
||||||
<!-- form code start -->
|
<textarea *ngSwitchCase="'textarea'" [formControlName]="field.extValue" col="10" row="2"></textarea>
|
||||||
<div *ngIf="checkFormCode">
|
<!-- Checkbox --> <label *ngSwitchCase="'checkbox'">{{ field.fieldName }}</label><br>
|
||||||
<h4 style="font-weight: 300;display: inline;">Extension</h4>
|
<input *ngSwitchCase="'checkbox'" [type]="field.fieldType" [formControlName]="field.extValue"
|
||||||
<br>
|
class="clr-checkbox" />
|
||||||
<hr>
|
</ng-container>
|
||||||
<div class="clr-row">
|
</div>
|
||||||
<div class="clr-col-4" *ngFor="let field of additionalFieldsFromBackend">
|
</div>
|
||||||
<ng-container *ngIf="field.formCode === formcode" [ngSwitch]="field.fieldType">
|
</div>
|
||||||
<!-- Text Input --> <label *ngSwitchCase="'text'">{{ field.fieldName }}</label>
|
<!-- form code end --> <div class="modal-footer">
|
||||||
<input *ngSwitchCase="'text'" [type]="field.fieldType" [formControlName]="field.extValue"
|
<button type="button" class="btn btn-outline" (click)="modalAdd = false">Cancel</button>
|
||||||
class="clr-input" />
|
<button type="submit" class="btn btn-primary" (click)="onSubmit()">ADD</button>
|
||||||
<!-- Date Input --> <label *ngSwitchCase="'date'">{{ field.fieldName }}</label>
|
</div>
|
||||||
<input *ngSwitchCase="'date'" [type]="field.fieldType" [formControlName]="field.extValue"
|
</form>
|
||||||
class="clr-input" />
|
</div>
|
||||||
<!-- Textarea --> <label *ngSwitchCase="'textarea'">{{ field.fieldName }}</label>
|
|
||||||
<textarea *ngSwitchCase="'textarea'" [formControlName]="field.extValue" col="10" row="2"></textarea>
|
|
||||||
<!-- Checkbox --> <label *ngSwitchCase="'checkbox'">{{ field.fieldName }}</label><br>
|
|
||||||
<input *ngSwitchCase="'checkbox'" [type]="field.fieldType" [formControlName]="field.extValue"
|
|
||||||
class="clr-checkbox" />
|
|
||||||
</ng-container>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- form code end --> <div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-outline" (click)="modalAdd = false">Cancel</button>
|
|
||||||
<button type="submit" class="btn btn-primary" (click)="onSubmit()">ADD</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</clr-modal>
|
</clr-modal>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- value List field start-->
|
<!-- value List field start-->
|
||||||
<clr-modal [(clrModalOpen)]="valueListModalvalue_list_field" [clrModalSize]="'md'">
|
<clr-modal [(clrModalOpen)]="valueListModalvalue_list_field" [clrModalSize]="'md'">
|
||||||
<h3 class="modal-title"><b>Select From value_list_field List:</b></h3>
|
<h3 class="modal-title"><b>Select From value_list_field List:</b></h3>
|
||||||
@ -528,25 +454,4 @@
|
|||||||
</clr-dg-footer> </clr-datagrid> </div></clr-modal>
|
</clr-dg-footer> </clr-datagrid> </div></clr-modal>
|
||||||
<!-- value List field end-->
|
<!-- value List field end-->
|
||||||
|
|
||||||
<!-- htmlpopup -->
|
<!-- htmlpopup -->
|
||||||
|
|
||||||
<clr-modal [(clrModalOpen)]="modalInsertButton_Field" [clrModalSize]="'xl'" [clrModalStaticBackdrop]="true">
|
|
||||||
<h3 class="modal-title">Insert Button_Field</h3>
|
|
||||||
<div class="modal-body">
|
|
||||||
<form [formGroup]="insertFormButton_Field" (ngSubmit)="onSubmitInsertButton_Field()">
|
|
||||||
<div class="clr-row">
|
|
||||||
<div class="clr-col-md-4 clr-col-sm-12">
|
|
||||||
<label for="name">Name:</label>
|
|
||||||
<input type="text" id="name" formControlName="name" name="name" placeholder="Enter Name" class="clr-input">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<br>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button type="button" class="btn btn-outline" (click)="modalInsertButton_Field = false">Cancel</button>
|
|
||||||
<button type="submit" class="btn btn-primary" >Insert</button>
|
|
||||||
</div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</clr-modal>
|
|
||||||
|
|
||||||
|
|||||||
@ -1,75 +1,70 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { ToastrService } from 'ngx-toastr';
|
import { ToastrService } from 'ngx-toastr';
|
||||||
import { AlertService } from 'src/app/services/alert.service';
|
import { AlertService } from 'src/app/services/alert.service';
|
||||||
import { Adv3service} from './Adv3.service';
|
import { Adv3service} from './Adv3.service';
|
||||||
import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms';
|
import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms';
|
||||||
import { ExtensionService } from 'src/app/services/fnd/extension.service';
|
import { ExtensionService } from 'src/app/services/fnd/extension.service';
|
||||||
import { DashboardContentModel2 } from 'src/app/models/builder/dashboard';
|
import { DashboardContentModel2 } from 'src/app/models/builder/dashboard';
|
||||||
import { Adv3cardvariable } from './Adv3_cardvariable';
|
import { Adv3cardvariable } from './Adv3_cardvariable';
|
||||||
import { UserInfoService } from 'src/app/services/user-info.service';
|
import { UserInfoService } from 'src/app/services/user-info.service';
|
||||||
declare var JsBarcode: any;
|
declare var JsBarcode: any;
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-Adv3',
|
selector: 'app-Adv3',
|
||||||
templateUrl: './Adv3.component.html',
|
templateUrl: './Adv3.component.html',
|
||||||
styleUrls: ['./Adv3.component.scss']
|
styleUrls: ['./Adv3.component.scss']
|
||||||
})
|
})
|
||||||
export class Adv3Component implements OnInit {
|
export class Adv3Component implements OnInit {
|
||||||
cardButton = Adv3cardvariable.cardButton;
|
cardButton = Adv3cardvariable.cardButton;
|
||||||
cardmodeldata = Adv3cardvariable.cardmodeldata;
|
cardmodeldata = Adv3cardvariable.cardmodeldata;
|
||||||
public dashboardArray: DashboardContentModel2[];
|
public dashboardArray: DashboardContentModel2[];
|
||||||
isCardview = Adv3cardvariable.cardButton;
|
isCardview = Adv3cardvariable.cardButton;
|
||||||
cardmodal; changeView(){
|
cardmodal; changeView(){
|
||||||
this.isCardview = !this.isCardview;
|
this.isCardview = !this.isCardview;
|
||||||
}
|
}
|
||||||
beforeText(fieldtext: string): string { // Extract the text before the first '<'
|
beforeText(fieldtext: string): string { // Extract the text before the first '<'
|
||||||
const index = fieldtext.indexOf('<');
|
const index = fieldtext.indexOf('<');
|
||||||
return index !== -1 ? fieldtext.substring(0, index) : fieldtext;
|
return index !== -1 ? fieldtext.substring(0, index) : fieldtext;
|
||||||
}
|
}
|
||||||
afterText(fieldtext: string): string { // Extract the text after the last '>'
|
afterText(fieldtext: string): string { // Extract the text after the last '>'
|
||||||
const index = fieldtext.lastIndexOf('>');
|
const index = fieldtext.lastIndexOf('>');
|
||||||
return index !== -1 ? fieldtext.substring(index + 1) : '';
|
return index !== -1 ? fieldtext.substring(index + 1) : '';
|
||||||
}
|
}
|
||||||
transform(fieldtext: string): string {
|
transform(fieldtext: string): string {
|
||||||
const match = fieldtext.match(/<([^>]*)>/);
|
const match = fieldtext.match(/<([^>]*)>/);
|
||||||
return match ? match[1] : ''; // Extract the text between '<' and '>'
|
return match ? match[1] : ''; // Extract the text between '<' and '>'
|
||||||
}
|
}
|
||||||
userrole;
|
userrole;
|
||||||
rowSelected :any= {};
|
rowSelected :any= {};
|
||||||
modaldelete=false;
|
modaldelete=false;
|
||||||
modalEdit=false;
|
modalEdit=false;
|
||||||
modalAdd= false;
|
modalAdd= false;
|
||||||
public entryForm: FormGroup;
|
public entryForm: FormGroup;
|
||||||
loading = false;
|
loading = false;
|
||||||
product;
|
product;
|
||||||
modalOpenedforNewLine = false;
|
modalOpenedforNewLine = false;
|
||||||
newLine:any;
|
newLine:any;
|
||||||
additionalFieldsFromBackend: any[] = [];
|
additionalFieldsFromBackend: any[] = [];
|
||||||
formcode = 'Adv3_formCode'
|
formcode = 'Adv3_formCode'
|
||||||
tableName = 'Adv3'; checkFormCode; selected: any[] = []; constructor(
|
tableName = 'Adv3'; checkFormCode; selected: any[] = []; constructor(
|
||||||
private extensionService: ExtensionService,
|
private extensionService: ExtensionService,
|
||||||
private userInfoService:UserInfoService,
|
private userInfoService:UserInfoService,
|
||||||
private mainService:Adv3service,
|
private mainService:Adv3service,
|
||||||
private alertService: AlertService,
|
private alertService: AlertService,
|
||||||
private toastr: ToastrService,
|
private toastr: ToastrService,
|
||||||
private _fb: FormBuilder,
|
private _fb: FormBuilder,
|
||||||
) { }
|
) { }
|
||||||
// component button
|
// component button
|
||||||
public insertFormButton_Field: FormGroup;
|
ngOnInit(): void {
|
||||||
|
if(this.cardmodeldata !== ''){
|
||||||
|
this.cardmodal = JSON.parse(this.cardmodeldata);
|
||||||
ngOnInit(): void {
|
this.dashboardArray = this.cardmodal.dashboard.slice();
|
||||||
if(this.cardmodeldata !== ''){
|
console.log(this.dashboardArray)
|
||||||
this.cardmodal = JSON.parse(this.cardmodeldata);
|
}
|
||||||
this.dashboardArray = this.cardmodal.dashboard.slice();
|
this.userrole=this.userInfoService.getRoles();
|
||||||
console.log(this.dashboardArray)
|
this.getData();
|
||||||
}
|
this.entryForm = this._fb.group({
|
||||||
this.userrole=this.userInfoService.getRoles();
|
|
||||||
this.getData();
|
|
||||||
this.entryForm = this._fb.group({
|
|
||||||
name : [null],
|
name : [null],
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
l:[null],
|
l:[null],
|
||||||
@ -80,8 +75,6 @@ m:[null],
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
child: this.initLinesForm(),
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -91,38 +84,27 @@ child: this.initLinesForm(),
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}); // component_button200
|
}); // component_button200
|
||||||
// inser code start
|
// form code start
|
||||||
this.insertFormButton_Field = this._fb.group({
|
this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => {
|
||||||
name: '',
|
console.log(data);
|
||||||
});
|
const jsonArray = data.map((str) => JSON.parse(str));
|
||||||
|
this.additionalFieldsFromBackend = jsonArray;
|
||||||
// insert code end
|
this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Adv3_formCode");
|
||||||
|
console.log(this.checkFormCode);
|
||||||
// form code start
|
console.log(this.additionalFieldsFromBackend);
|
||||||
this.extensionService.getJsonObjectsByFormCodeList(this.formcode).subscribe(data => {
|
if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) {
|
||||||
console.log(data);
|
this.additionalFieldsFromBackend.forEach(field => {
|
||||||
const jsonArray = data.map((str) => JSON.parse(str));
|
if (field.formCode === this.formcode) {
|
||||||
this.additionalFieldsFromBackend = jsonArray;
|
if (!this.entryForm.contains(field.extValue)) {
|
||||||
this.checkFormCode = this.additionalFieldsFromBackend.some(field => field.formCode === "Adv3_formCode");
|
// Add the control only if it doesn't exist in the form
|
||||||
console.log(this.checkFormCode);
|
this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue));
|
||||||
console.log(this.additionalFieldsFromBackend);
|
}
|
||||||
if (this.additionalFieldsFromBackend && this.additionalFieldsFromBackend.length > 0) {
|
}
|
||||||
this.additionalFieldsFromBackend.forEach(field => {
|
});
|
||||||
if (field.formCode === this.formcode) {
|
}
|
||||||
if (!this.entryForm.contains(field.extValue)) {
|
});
|
||||||
// Add the control only if it doesn't exist in the form
|
console.log(this.entryForm.value);
|
||||||
this.entryForm.addControl(field.extValue, this._fb.control(field.fieldValue));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
console.log(this.entryForm.value);
|
|
||||||
// form code end
|
// form code end
|
||||||
|
|
||||||
|
|
||||||
@ -130,47 +112,30 @@ child: this.initLinesForm(),
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
initLinesForm() { return this._fb.group({
|
|
||||||
|
|
||||||
|
|
||||||
name: [null],
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}); }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
error;
|
error;
|
||||||
getData() {
|
getData() {
|
||||||
this.mainService.getAll().subscribe((data) => {
|
this.mainService.getAll().subscribe((data) => {
|
||||||
console.log(data);
|
console.log(data);
|
||||||
this.product = data;
|
this.product = data;
|
||||||
if(this.product.length==0){
|
if(this.product.length==0){
|
||||||
this.error="No Data Available"
|
this.error="No Data Available"
|
||||||
}
|
}
|
||||||
},(error) => {
|
},(error) => {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
if(error){
|
if(error){
|
||||||
this.error="Server Error";
|
this.error="Server Error";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
onEdit(row) {
|
onEdit(row) {
|
||||||
this.rowSelected = row;
|
this.rowSelected = row;
|
||||||
|
|
||||||
|
|
||||||
@ -178,156 +143,128 @@ initLinesForm() { return this._fb.group({
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
this.modalEdit = true;
|
||||||
|
}
|
||||||
|
onDelete(row) {
|
||||||
|
this.rowSelected = row;
|
||||||
this.modalEdit = true;
|
this.modaldelete=true;
|
||||||
}
|
}
|
||||||
onDelete(row) {
|
delete(id)
|
||||||
this.rowSelected = row;
|
{
|
||||||
this.modaldelete=true;
|
this.modaldelete = false;
|
||||||
}
|
console.log("in delete "+id);
|
||||||
delete(id)
|
this.mainService.delete(id).subscribe(
|
||||||
{
|
(data) => {
|
||||||
this.modaldelete = false;
|
console.log(data);
|
||||||
console.log("in delete "+id);
|
this.ngOnInit();
|
||||||
this.mainService.delete(id).subscribe(
|
if (data) { this.toastr.success('Deleted successfully'); }
|
||||||
(data) => {
|
});
|
||||||
console.log(data);
|
}
|
||||||
this.ngOnInit();
|
onUpdate(id) {
|
||||||
if (data) { this.toastr.success('Deleted successfully'); }
|
this.modalEdit = false;
|
||||||
});
|
|
||||||
}
|
|
||||||
onUpdate(id) {
|
|
||||||
this.modalEdit = false;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//console.log("in update");
|
||||||
|
console.log("id " + id);
|
||||||
|
console.log(this.rowSelected);
|
||||||
|
//console.log("out update");
|
||||||
//console.log("in update");
|
this.mainService.update(id, this.rowSelected).subscribe(
|
||||||
console.log("id " + id);
|
(data) => {
|
||||||
console.log(this.rowSelected);
|
console.log(data);
|
||||||
//console.log("out update");
|
if (data || data.status >= 200 && data.status <= 299) {
|
||||||
this.mainService.update(id, this.rowSelected).subscribe(
|
this.toastr.success("Update Successfully");
|
||||||
(data) => {
|
}
|
||||||
console.log(data);
|
setTimeout(() => {
|
||||||
if (data || data.status >= 200 && data.status <= 299) {
|
this.ngOnInit();
|
||||||
this.toastr.success("Update Successfully");
|
}, 500);
|
||||||
}
|
|
||||||
setTimeout(() => {
|
|
||||||
this.ngOnInit();
|
|
||||||
}, 500);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}, (error) => {
|
||||||
|
console.log(error);
|
||||||
|
if (error.status >= 200 && error.status <= 299) {
|
||||||
|
// this.toastr.success("update Succesfully");
|
||||||
}, (error) => {
|
}
|
||||||
console.log(error);
|
if (error.status >= 400 && error.status <= 499) {
|
||||||
if (error.status >= 200 && error.status <= 299) {
|
this.toastr.error("Not Updated");
|
||||||
// this.toastr.success("update Succesfully");
|
}
|
||||||
}
|
if (error.status >= 500 && error.status <= 599) {
|
||||||
if (error.status >= 400 && error.status <= 499) {
|
this.toastr.error("Not Updated");
|
||||||
this.toastr.error("Not Updated");
|
}
|
||||||
}
|
});
|
||||||
if (error.status >= 500 && error.status <= 599) {
|
setTimeout(() => {
|
||||||
this.toastr.error("Not Updated");
|
this.ngOnInit();
|
||||||
}
|
}, 500);
|
||||||
});
|
|
||||||
setTimeout(() => {
|
|
||||||
this.ngOnInit();
|
|
||||||
}, 500);
|
|
||||||
}
|
}
|
||||||
onCreate() {
|
onCreate() {
|
||||||
this.modalAdd=false;
|
this.modalAdd=false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
this.mainService.create(this.entryForm.value).subscribe(
|
||||||
|
(data) => {
|
||||||
|
console.log(data);
|
||||||
|
if (data || data.status >= 200 && data.status <= 299) {
|
||||||
this.mainService.create(this.entryForm.value).subscribe(
|
this.toastr.success("Added Successfully");
|
||||||
(data) => {
|
}
|
||||||
console.log(data);
|
setTimeout(() => {
|
||||||
if (data || data.status >= 200 && data.status <= 299) {
|
this.ngOnInit();
|
||||||
this.toastr.success("Added Successfully");
|
|
||||||
}
|
|
||||||
setTimeout(() => {
|
|
||||||
this.ngOnInit();
|
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}, (error) => {
|
||||||
|
console.log(error);
|
||||||
|
if (error.status >= 200 && error.status <= 299) {
|
||||||
|
// this.toastr.success("Added Succesfully");
|
||||||
}, (error) => {
|
}
|
||||||
console.log(error);
|
if (error.status >= 400 && error.status <= 499) {
|
||||||
if (error.status >= 200 && error.status <= 299) {
|
this.toastr.error("Not Added");
|
||||||
// this.toastr.success("Added Succesfully");
|
}
|
||||||
}
|
if (error.status >= 500 && error.status <= 599) {
|
||||||
if (error.status >= 400 && error.status <= 499) {
|
this.toastr.error("Not Added");
|
||||||
this.toastr.error("Not Added");
|
}
|
||||||
}
|
});
|
||||||
if (error.status >= 500 && error.status <= 599) {
|
setTimeout(() => {
|
||||||
this.toastr.error("Not Added");
|
this.ngOnInit();
|
||||||
}
|
}, 500);
|
||||||
});
|
}
|
||||||
setTimeout(() => {
|
goToAdd(row) {
|
||||||
this.ngOnInit();
|
|
||||||
}, 500);
|
|
||||||
}
|
|
||||||
goToAdd(row) {
|
|
||||||
this.modalAdd = true; this.submitted = false;
|
this.modalAdd = true; this.submitted = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
submitted = false;
|
||||||
|
onSubmit() {
|
||||||
|
console.log(this.entryForm.value);
|
||||||
}
|
this.submitted = true;
|
||||||
submitted = false;
|
if (this.entryForm.invalid) {
|
||||||
onSubmit() {
|
return;
|
||||||
console.log(this.entryForm.value);
|
}this.onCreate();
|
||||||
this.submitted = true;
|
|
||||||
if (this.entryForm.invalid) {
|
|
||||||
return;
|
|
||||||
}this.onCreate();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Value List field start
|
//Value List field start
|
||||||
valuelistMode;
|
valuelistMode;
|
||||||
searchcusttextvalue_list_field :any;
|
searchcusttextvalue_list_field :any;
|
||||||
@ -363,54 +300,9 @@ getcustvalue_list_fieldID(id:number){
|
|||||||
} //value List field end
|
} //value List field end
|
||||||
|
|
||||||
// updateaction
|
// updateaction
|
||||||
|
|
||||||
// insert button
|
|
||||||
|
|
||||||
|
|
||||||
modalInsertButton_Field = false;
|
|
||||||
goToInsertButton_Field() {
|
|
||||||
this.modalInsertButton_Field=true;
|
|
||||||
}
|
|
||||||
onSubmitInsertButton_Field() {
|
|
||||||
console.log(this.insertFormButton_Field.value);
|
|
||||||
this.submitted=true;
|
|
||||||
if (this.insertFormButton_Field.invalid) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.onInsertButton_Field();
|
|
||||||
}
|
|
||||||
onInsertButton_Field() {
|
|
||||||
this.modalInsertButton_Field=false;
|
|
||||||
this.mainService.insertButton_FieldChild(this.insertFormButton_Field.value).subscribe(data => {
|
|
||||||
console.log('After add',data)
|
|
||||||
if (data.status >=200 && data.status <=209) {
|
|
||||||
this.toastr.success('Added successfully');
|
|
||||||
}
|
|
||||||
if (data && data.id != null) {
|
|
||||||
this.toastr.success('Added successfully');
|
|
||||||
} this.ngOnInit();
|
|
||||||
},(error) => {
|
|
||||||
console.error(error);
|
|
||||||
if ( error.status >= 200 && error.status <= 299) {
|
|
||||||
this.toastr.success("Update Successfully");
|
|
||||||
}
|
|
||||||
if ( error.status >= 400 && error.status <= 499) {
|
|
||||||
this.toastr.error("Update Failed");
|
|
||||||
}
|
|
||||||
if ( error.status >= 500 && error.status <= 599) {
|
|
||||||
this.toastr.error("Server Error");
|
|
||||||
}
|
|
||||||
this.ngOnInit();
|
|
||||||
});
|
|
||||||
this.insertFormButton_Field.reset();
|
|
||||||
}
|
|
||||||
// insert buuton code end
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,38 +1,34 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Observable } from "rxjs";
|
import { Observable } from "rxjs";
|
||||||
import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http";
|
import { HttpClient, HttpHeaders, HttpParams, } from "@angular/common/http";
|
||||||
import { ApiRequestService } from "src/app/services/api/api-request.service";
|
import { ApiRequestService } from "src/app/services/api/api-request.service";
|
||||||
import { environment } from 'src/environments/environment';
|
import { environment } from 'src/environments/environment';
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class Adv3service{
|
export class Adv3service{
|
||||||
private baseURL = "Adv3/Adv3" ; constructor(
|
private baseURL = "Adv3/Adv3" ; constructor(
|
||||||
private http: HttpClient,
|
private http: HttpClient,
|
||||||
private apiRequest: ApiRequestService,
|
private apiRequest: ApiRequestService,
|
||||||
) { }
|
) { }
|
||||||
getAll(page?: number, size?: number): Observable<any> {
|
getAll(page?: number, size?: number): Observable<any> {
|
||||||
return this.apiRequest.get(this.baseURL);
|
return this.apiRequest.get(this.baseURL);
|
||||||
}
|
}
|
||||||
getById(id: number): Observable<any> {
|
getById(id: number): Observable<any> {
|
||||||
const _http = this.baseURL + "/" + id;
|
const _http = this.baseURL + "/" + id;
|
||||||
return this.apiRequest.get(_http);
|
return this.apiRequest.get(_http);
|
||||||
}
|
}
|
||||||
create(data: any): Observable<any> {
|
create(data: any): Observable<any> {
|
||||||
return this.apiRequest.post(this.baseURL, data);
|
return this.apiRequest.post(this.baseURL, data);
|
||||||
}
|
}
|
||||||
update(id: number, data: any): Observable<any> {
|
update(id: number, data: any): Observable<any> {
|
||||||
const _http = this.baseURL + "/" + id;
|
const _http = this.baseURL + "/" + id;
|
||||||
return this.apiRequest.put(_http, data);
|
return this.apiRequest.put(_http, data);
|
||||||
}
|
}
|
||||||
delete(id: number): Observable<any> {
|
delete(id: number): Observable<any> {
|
||||||
const _http = this.baseURL + "/" + id;
|
const _http = this.baseURL + "/" + id;
|
||||||
return this.apiRequest.delete(_http);
|
return this.apiRequest.delete(_http);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -40,9 +36,4 @@ export class Adv3service{
|
|||||||
|
|
||||||
|
|
||||||
// updateaction
|
// updateaction
|
||||||
// insert button code start
|
|
||||||
insertButton_FieldChild(Child: any): Observable<any> {
|
|
||||||
return this.apiRequest.post(`adv3/adv3/Child_insert`, Child);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -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(["../stepss/", id], { relativeTo: this.route });
|
this.router.navigate(["../stepss/", id], { relativeTo: this.route });
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -63,8 +63,6 @@
|
|||||||
<input class="clr-input" type="text" formControlName="name" />
|
<input class="clr-input" type="text" formControlName="name" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- multiselect field start -->
|
<!-- multiselect field start -->
|
||||||
<div class="clr-col-sm-12">
|
<div class="clr-col-sm-12">
|
||||||
<label> Field Group</label>
|
<label> Field Group</label>
|
||||||
@ -92,8 +90,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@ -102,21 +98,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div style="margin-top: 30px;">
|
|
||||||
<h4 style="display: inline;">child </h4> </div> <hr>
|
|
||||||
<div class="clr-row" formArrayName="child">
|
|
||||||
|
|
||||||
|
|
||||||
<div class="clr-col-md-4 clr-col-sm-12">
|
|
||||||
<label> name</label>
|
|
||||||
<input class="clr-input" type="text" formControlName="name" /> </div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="clr-row">
|
<div class="clr-row">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -147,8 +128,6 @@
|
|||||||
<div class="clr-col-12">
|
<div class="clr-col-12">
|
||||||
<h5>Bbb Summary:</h5><p><strong>Name : </strong> {{ Adv3entryForm.get('name')?.value | json}}</p>
|
<h5>Bbb Summary:</h5><p><strong>Name : </strong> {{ Adv3entryForm.get('name')?.value | json}}</p>
|
||||||
|
|
||||||
<p><strong>Child : </strong> {{ Adv3entryForm.get('child')?.value | json}}</p>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p><strong>l : </strong> {{ Adv3entryForm.get('l')?.value | json}}</p>
|
<p><strong>l : </strong> {{ Adv3entryForm.get('l')?.value | json}}</p>
|
||||||
@ -164,8 +143,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<p><strong>child : </strong> {{ Adv3entryForm.get('child')?.value | json}}</p>
|
|
||||||
|
|
||||||
<p><strong>Value List Field : </strong> {{ Adv3entryForm.get('value_list_field')?.value | json}}</p>
|
<p><strong>Value List Field : </strong> {{ Adv3entryForm.get('value_list_field')?.value | json}}</p>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -71,8 +71,6 @@ private router: Router,
|
|||||||
this.Adv3entryForm = this.Adv3_fb.group({
|
this.Adv3entryForm = this.Adv3_fb.group({
|
||||||
name : [null],
|
name : [null],
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
l:[null],
|
l:[null],
|
||||||
@ -83,8 +81,6 @@ m:[null],
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
child: this.initLinesForm(),
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -95,10 +91,6 @@ child: this.initLinesForm(),
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
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 => {
|
||||||
@ -127,8 +119,6 @@ showEmptyForm(): void {
|
|||||||
id: data.id || '',
|
id: data.id || '',
|
||||||
name: data.name || '',
|
name: data.name || '',
|
||||||
|
|
||||||
child: data.child || '',
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -141,8 +131,6 @@ m: data.m || '',
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
child: data.child || '',
|
|
||||||
|
|
||||||
value_list_field: data.value_list_field || '',
|
value_list_field: data.value_list_field || '',
|
||||||
|
|
||||||
});
|
});
|
||||||
@ -249,10 +237,6 @@ value_list_field: data.value_list_field || '',
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.mainService.createAdv3(this.Adv3entryForm.value).subscribe(
|
this.mainService.createAdv3(this.Adv3entryForm.value).subscribe(
|
||||||
(data) => {
|
(data) => {
|
||||||
console.log('adding data ', data);
|
console.log('adding data ', data);
|
||||||
@ -281,10 +265,6 @@ value_list_field: data.value_list_field || '',
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}, (error) => {
|
}, (error) => {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
if (error.status >= 200 && error.status <= 299) {
|
if (error.status >= 200 && error.status <= 299) {
|
||||||
@ -336,10 +316,6 @@ value_list_field: data.value_list_field || '',
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Value List field start
|
//Value List field start
|
||||||
valuelistMode;
|
valuelistMode;
|
||||||
searchcusttextvalue_list_field :any;
|
searchcusttextvalue_list_field :any;
|
||||||
@ -380,19 +356,6 @@ getcustvalue_list_fieldID(id:number){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
initLinesForm() { return this.Adv3_fb.group({
|
|
||||||
|
|
||||||
|
|
||||||
name: [null],
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}); }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// updateaction
|
// updateaction
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -400,7 +363,3 @@ initLinesForm() { return this.Adv3_fb.group({
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -48,9 +48,5 @@ gettabledata(id: number): Observable<any> {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// updateaction
|
// updateaction
|
||||||
}
|
}
|
||||||
@ -1,3 +1,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import { stepssComponent } from './BuilderComponents/stepperworkflow/stepss/stepss.component';
|
import { stepssComponent } from './BuilderComponents/stepperworkflow/stepss/stepss.component';
|
||||||
import { TestlistComponent } from './BuilderComponents/basicp1/Testlist/Testlist.component';
|
import { TestlistComponent } from './BuilderComponents/basicp1/Testlist/Testlist.component';
|
||||||
import { ChildComponent } from './BuilderComponents/basicp1/Child/Child.component';
|
import { ChildComponent } from './BuilderComponents/basicp1/Child/Child.component';
|
||||||
@ -260,6 +264,14 @@ const routes: Routes = [
|
|||||||
|
|
||||||
|
|
||||||
// buildercomponents
|
// buildercomponents
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{path:'stepss/:id',component:stepssComponent},
|
{path:'stepss/:id',component:stepssComponent},
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import { stepssComponent } from './BuilderComponents/stepperworkflow/stepss/stepss.component';
|
import { stepssComponent } from './BuilderComponents/stepperworkflow/stepss/stepss.component';
|
||||||
import { TestlistComponent } from './BuilderComponents/basicp1/Testlist/Testlist.component';
|
import { TestlistComponent } from './BuilderComponents/basicp1/Testlist/Testlist.component';
|
||||||
import { ChildComponent } from './BuilderComponents/basicp1/Child/Child.component';
|
import { ChildComponent } from './BuilderComponents/basicp1/Child/Child.component';
|
||||||
@ -133,6 +137,14 @@ import { Stepper_workflowComponent } from './BuilderComponents/stepperworkflow/S
|
|||||||
|
|
||||||
|
|
||||||
// buildercomponents
|
// buildercomponents
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
stepssComponent,
|
stepssComponent,
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -226,13 +226,11 @@
|
|||||||
"MENU_ACTION_LINK": "Menu Action Link",
|
"MENU_ACTION_LINK": "Menu Action Link",
|
||||||
"STATUS": "Status",
|
"STATUS": "Status",
|
||||||
"SUB_MENU": "Sub Menu",
|
"SUB_MENU": "Sub Menu",
|
||||||
"OneToOne": "OneToOne",
|
|
||||||
"Testlist": "Testlist",
|
"Testlist": "Testlist",
|
||||||
"Value_List_Field": "Value_List_Field",
|
"Value_List_Field": "Value_List_Field",
|
||||||
"l": "l",
|
"l": "l",
|
||||||
"m": "m",
|
"m": "m",
|
||||||
"Child": "Child",
|
"Child": "Child",
|
||||||
"Button_Field": "Button_Field",
|
|
||||||
"Adv3": "Adv3",
|
"Adv3": "Adv3",
|
||||||
"Name": "Name"
|
"Name": "Name"
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user