This commit is contained in:
string 2025-04-08 20:24:14 +05:30
parent 9178e6511b
commit b898694b14
13 changed files with 3484 additions and 3396 deletions

View File

@ -7,22 +7,25 @@
<h3>Agent </h3>
</div>
<div class="clr-col-4" style="text-align: right;">
<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>
<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>
</button>
<!-- upload and download template -->
<!-- upload and download template -->
<button class="btn btn-outline" (click)="goToDataM()">
Upload
</button>
<button class="btn btn-outline" (click)="downloadCSV(tableName)" >
<clr-icon shape="export" ></clr-icon> Download
<button class="btn btn-outline" (click)="downloadCSV(tableName)">
<clr-icon shape="export"></clr-icon> Download
</button>
<!-- upload and download template end here--> <!-- button -->
<button id="add" class="btn btn-primary" (click)="goToAdd(product)" >
<button id="add" class="btn btn-primary" (click)="goToAdd(product)">
<clr-icon shape="plus"></clr-icon>ADD
</button>
</div></div>
<ng-container *ngIf="!isCardview"> <!-- GET ALL --> <clr-datagrid [clrDgLoading]="loading" [(clrDgSelected)]="selected">
</div>
</div>
<ng-container *ngIf="!isCardview"> <!-- GET ALL --> <clr-datagrid [clrDgLoading]="loading"
[(clrDgSelected)]="selected">
<clr-dg-placeholder>
<ng-template #loadingSpinner>
<clr-spinner>Loading ... </clr-spinner>
@ -30,15 +33,15 @@
<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>
<clr-dg-column [clrDgField]="' description'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Description
<clr-dg-column [clrDgField]="' description'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Description
</ng-container></clr-dg-column>
<clr-dg-column [clrDgField]="' active'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Active
<clr-dg-column [clrDgField]="' active'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Active
</ng-container></clr-dg-column>
@ -50,20 +53,22 @@
<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 (click)="goToReplaceStringdescription (user.description)" style="cursor: pointer; align-items: center;"><clr-icon shape="details"></clr-icon>
</clr-dg-cell>
<clr-dg-cell (click)="goToReplaceStringdescription (user.description)"
style="cursor: pointer; align-items: center;"><clr-icon shape="details"></clr-icon>
</clr-dg-cell>
<clr-dg-cell>{{user. active }}</clr-dg-cell>
<clr-dg-cell>{{user. active }}</clr-dg-cell>
<!-- who column -->
<clr-dg-cell>
<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>
<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>
@ -90,7 +95,7 @@
</clr-dg-pagination>
</clr-dg-footer>
</clr-datagrid> </ng-container>
<ng-template #showInfo>
<ng-template #showInfo>
<div class="alert alert-info" role="alert">
<div class="alert-items">
<div class="alert-item static">
@ -102,16 +107,18 @@
</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 *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-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-body" style="display: grid; grid-template-columns: repeat(13, 1fr); grid-template-rows: repeat(7, 1fr); gap: 5px;">
<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;">
<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"
[style.gridRowEnd]="item.y + item.rows + 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">
<div *ngIf="item.name === 'textField'" class="title-card card-title"
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
@ -121,7 +128,8 @@
[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'))"
[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">
{{beforeText(item.fieldtext)}}
{{ app[transform(item.fieldtext) ] }}
@ -137,7 +145,8 @@
[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'))"
[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">
{{beforeText(item.fieldtext)}}
{{ app[transform(item.fieldtext) ] | date}}
@ -152,7 +161,8 @@
[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'))"
[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">
{{beforeText(item.fieldtext)}}
{{ app[transform(item.fieldtext) ]}}
@ -182,8 +192,7 @@
[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'))"
[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>
</div>
@ -198,7 +207,8 @@
[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.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.height]="item.imagewidth !== '' ? item.imagewidth + 'px' : '100px'"></div>
</div>
@ -217,7 +227,8 @@
<clr-modal [(clrModalOpen)]="rsModaldescription" [clrModalSize]="'xl'" [clrModalStaticBackdrop]="true">
<div class="modal-body">
<textarea class="form-control" style="width:100%; height: 400px;" readonly>{{rowSelected}}</textarea>
</div></clr-modal>
</div>
</clr-modal>
@ -229,25 +240,27 @@
</h3>
</h3>
<div class="modal-body" *ngIf="rowSelected.id">
<h2 class="heading">{{rowSelected.id}}</h2>
<!-- button -->
<form >
<div class="clr-row">
<div class="clr-col-sm-12">
<label>Name</label>
<!-- button -->
<form>
<div class="clr-row">
<div class="clr-col-sm-12">
<label>Name</label>
<input class="clr-input" type="text" [(ngModel)]="rowSelected.name" name="name" />
</div>
<div class="clr-col-sm-12">
<label> Description</label>
<textarea cols="10" rows="2"[(ngModel)]="rowSelected.description" name="description " placeholder="Textarea"> </textarea>
<div class="clr-col-sm-12">
<label> Description</label>
<textarea cols="10" rows="2" [(ngModel)]="rowSelected.description" name="description "
placeholder="Textarea"> </textarea>
</div>
<div class="clr-col-sm-12">
<label> Active</label>
<input type="checkbox" name="active" clrToggle [(ngModel)]="rowSelected.active" /> </div>
<div class="clr-col-sm-12">
<label> Active</label>
<input type="checkbox" name="active" clrToggle [(ngModel)]="rowSelected.active" />
</div>
</div>
@ -256,7 +269,7 @@
<!-- form code start -->
<!-- form code start -->
<div *ngIf="checkFormCode">
<h4 style="font-weight: 300;display: inline;">Extension</h4>
<br>
@ -265,22 +278,27 @@
<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" />
<input *ngSwitchCase="'text'" [type]="field.fieldType" name="{{ field.extValue }}"
[(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
<!-- Date Input --> <label *ngSwitchCase="'date'">{{ field.fieldName }}</label>
<input *ngSwitchCase="'date'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
<input *ngSwitchCase="'date'" [type]="field.fieldType" name="{{ field.extValue }}"
[(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
<!-- Textarea --> <label *ngSwitchCase="'textarea'">{{ field.fieldName }}</label>
<textarea *ngSwitchCase="'textarea'" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" col="10" row="2"></textarea>
<textarea *ngSwitchCase="'textarea'" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]"
col="10" row="2"></textarea>
<!-- Checkbox --> <label *ngSwitchCase="'checkbox'">{{ field.fieldName }}</label><br>
<input *ngSwitchCase="'checkbox'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-checkbox" />
<input *ngSwitchCase="'checkbox'" [type]="field.fieldType" name="{{ field.extValue }}"
[(ngModel)]="rowSelected[field.extValue]" class="clr-checkbox" />
</ng-container>
</div>
</div>
</div>
</div>
<!-- form code end --> <div class="modal-footer">
<!-- form code end -->
<div class="modal-footer">
<button type="button" class="btn btn-outline" (click)="modalEdit = false">Cancel</button>
<button type="submit" class="btn btn-primary" (click)="onUpdate(rowSelected.id)">Update</button>
</div>
@ -293,7 +311,7 @@
<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>
<button type="button" (click)="delete(rowSelected.id)" class="btn btn-primary">Delete</button>
</div>
</div>
</clr-modal>
@ -308,30 +326,32 @@
<!-- aeroplane icon -->
&nbsp; &nbsp; &nbsp; &nbsp;
<a *ngIf="userrole.includes('ROLE_ADMIN')" style="float: right;" href="javascript:void(0)" role="tooltip" aria-haspopup="true"
class="tooltip tooltip-sm tooltip-bottom-left">
<a *ngIf="userrole.includes('ROLE_ADMIN')" style="float: right;" href="javascript:void(0)" role="tooltip"
aria-haspopup="true" class="tooltip tooltip-sm tooltip-bottom-left">
<a id="build_extension" [routerLink]="['../extension/all']" [queryParams]="{ formCode: 'Agent_formCode' }">
<clr-icon shape="airplane" size="32"></clr-icon>
</a>
<span class="tooltip-content">Form Extension</span>
</a> </h3>
</a>
</h3>
<div class="modal-body">
<form [formGroup]="entryForm" >
<form [formGroup]="entryForm">
<div class="clr-row" style="height: fit-content;">
<div class="clr-col-sm-12">
<div class="clr-col-sm-12">
<label> Name</label>
<input class="clr-input" type="text" formControlName="name" />
</div>
<div class="clr-col-sm-12">
<div class="clr-col-sm-12">
<label> Description</label>
<textarea cols="10" rows="2" formControlName="description" placeholder="Textarea"> </textarea>
</div>
<div class="clr-col-sm-12">
<div class="clr-col-sm-12">
<label> Active</label>
<input type="checkbox" formControlName="active" clrToggle/> </div>
<input type="checkbox" formControlName="active" clrToggle />
</div>
</div>
@ -366,11 +386,12 @@
</div>
</div>
</div>
<!-- form code end --> <div class="modal-footer">
<button type="button" class="btn btn-outline" (click)="modalAdd = false">Cancel</button>
<!-- 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>
</form>
</div>
</clr-modal>
@ -379,4 +400,4 @@
<!-- htmlpopup -->
<!-- htmlpopup -->

View File

@ -1,28 +1,31 @@
<ol class="breadcrumb breadcrumb-arrow font-trirong">
<li><a href="javascript://"> Cost_Sheet</a></li>
<li><a href="javascript://"> Cost Sheet</a></li>
</ol>
<div class="dg-wrapper">
<div class="clr-row">
<div class="clr-col-8">
<h3>Cost_Sheet </h3>
<h3>Cost Sheet </h3>
</div>
<div class="clr-col-4" style="text-align: right;">
<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>
<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>
</button>
<!-- upload and download template -->
<!-- upload and download template -->
<button class="btn btn-outline" (click)="goToDataM()">
Upload
</button>
<button class="btn btn-outline" (click)="downloadCSV(tableName)" >
<clr-icon shape="export" ></clr-icon> Download
<button class="btn btn-outline" (click)="downloadCSV(tableName)">
<clr-icon shape="export"></clr-icon> Download
</button>
<!-- upload and download template end here--> <!-- button -->
<button id="add" class="btn btn-primary" (click)="goToAdd(product)" >
<button id="add" class="btn btn-primary" (click)="goToAdd(product)">
<clr-icon shape="plus"></clr-icon>ADD
</button>
</div></div>
<ng-container *ngIf="!isCardview"> <!-- GET ALL --> <clr-datagrid [clrDgLoading]="loading" [(clrDgSelected)]="selected">
</div>
</div>
<ng-container *ngIf="!isCardview"> <!-- GET ALL --> <clr-datagrid [clrDgLoading]="loading"
[(clrDgSelected)]="selected">
<clr-dg-placeholder>
<ng-template #loadingSpinner>
<clr-spinner>Loading ... </clr-spinner>
@ -30,15 +33,15 @@
<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>
<clr-dg-column [clrDgField]="' description'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Description
<clr-dg-column [clrDgField]="' description'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Description
</ng-container></clr-dg-column>
<clr-dg-column [clrDgField]="' active'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Active
<clr-dg-column [clrDgField]="' active'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Active
</ng-container></clr-dg-column>
@ -52,22 +55,24 @@
<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 (click)="goToReplaceStringdescription (user.description)" style="cursor: pointer; align-items: center;"><clr-icon shape="details"></clr-icon>
</clr-dg-cell>
<clr-dg-cell (click)="goToReplaceStringdescription (user.description)"
style="cursor: pointer; align-items: center;"><clr-icon shape="details"></clr-icon>
</clr-dg-cell>
<clr-dg-cell>{{user. active }}</clr-dg-cell>
<clr-dg-cell>{{user. active }}</clr-dg-cell>
<!-- who column -->
<clr-dg-cell>
<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>
<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>
@ -94,7 +99,7 @@
</clr-dg-pagination>
</clr-dg-footer>
</clr-datagrid> </ng-container>
<ng-template #showInfo>
<ng-template #showInfo>
<div class="alert alert-info" role="alert">
<div class="alert-items">
<div class="alert-item static">
@ -106,16 +111,18 @@
</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 *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-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-body" style="display: grid; grid-template-columns: repeat(13, 1fr); grid-template-rows: repeat(7, 1fr); gap: 5px;">
<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;">
<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"
[style.gridRowEnd]="item.y + item.rows + 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">
<div *ngIf="item.name === 'textField'" class="title-card card-title"
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
@ -125,7 +132,8 @@
[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'))"
[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">
{{beforeText(item.fieldtext)}}
{{ app[transform(item.fieldtext) ] }}
@ -141,7 +149,8 @@
[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'))"
[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">
{{beforeText(item.fieldtext)}}
{{ app[transform(item.fieldtext) ] | date}}
@ -156,7 +165,8 @@
[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'))"
[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">
{{beforeText(item.fieldtext)}}
{{ app[transform(item.fieldtext) ]}}
@ -186,8 +196,7 @@
[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'))"
[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>
</div>
@ -202,7 +211,8 @@
[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.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.height]="item.imagewidth !== '' ? item.imagewidth + 'px' : '100px'"></div>
</div>
@ -221,7 +231,8 @@
<clr-modal [(clrModalOpen)]="rsModaldescription" [clrModalSize]="'xl'" [clrModalStaticBackdrop]="true">
<div class="modal-body">
<textarea class="form-control" style="width:100%; height: 400px;" readonly>{{rowSelected}}</textarea>
</div></clr-modal>
</div>
</clr-modal>
@ -229,7 +240,7 @@
<!-- // EDIT DATA......... -->
<clr-modal [(clrModalOpen)]="modalEdit" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
<h3 class="modal-title">Update Cost_sheet <!--update button -->
<h3 class="modal-title">Update Cost Sheet <!--update button -->
@ -237,25 +248,27 @@
</h3>
</h3>
<div class="modal-body" *ngIf="rowSelected.id">
<h2 class="heading">{{rowSelected.id}}</h2>
<!-- button -->
<form >
<div class="clr-row">
<div class="clr-col-sm-12">
<label>Name</label>
<!-- button -->
<form>
<div class="clr-row">
<div class="clr-col-sm-12">
<label>Name</label>
<input class="clr-input" type="text" [(ngModel)]="rowSelected.name" name="name" />
</div>
<div class="clr-col-sm-12">
<label> Description</label>
<textarea cols="10" rows="2"[(ngModel)]="rowSelected.description" name="description " placeholder="Textarea"> </textarea>
<div class="clr-col-sm-12">
<label> Description</label>
<textarea cols="10" rows="2" [(ngModel)]="rowSelected.description" name="description "
placeholder="Textarea"> </textarea>
</div>
<div class="clr-col-sm-12">
<label> Active</label>
<input type="checkbox" name="active" clrToggle [(ngModel)]="rowSelected.active" /> </div>
<div class="clr-col-sm-12">
<label> Active</label>
<input type="checkbox" name="active" clrToggle [(ngModel)]="rowSelected.active" />
</div>
@ -266,7 +279,7 @@
<h6> List of cost_sheet</h6>
<h6> List of Cost Sheet</h6>
<div class="clr-row" style="margin-top: 10px;">
<table class="table">
@ -279,21 +292,24 @@
<th>Cancel</th>
</tr>
</thead>
<tbody >
<tbody>
<tr *ngFor="let attach of FileDatacost_sheet; let i=index">
<td style="width: 70px;"><input type="text" class="clr-input" value={{i+1}} [readonly]="true"> </td>
<td><input type="file" (change)="onFileChangedcost_sheet($event, i)" accept = "application/pdf,.csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"/>
<td><input type="file" (change)="onFileChangedcost_sheet($event, i)"
accept="application/pdf,.csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" />
</td>
<td>{{attach.uploadedfile_name}}</td>
<td > <img [src]="attach.filePreview" alt="File Preview" [ngModelOptions]="{standalone: true}" name="filePreview" width="100px" height="100px"></td>
<td> <img [src]="attach.filePreview" alt="File Preview" [ngModelOptions]="{standalone: true}"
name="filePreview" width="100px" height="100px"></td>
<td>
<clr-signpost style="padding-right: 10px;">
<clr-icon shape="trash" class="is-error" aria-label="Icon Button Trigger" clrSignpostTrigger></clr-icon>
<clr-icon shape="trash" class="is-error" aria-label="Icon Button Trigger"
clrSignpostTrigger></clr-icon>
<clr-signpost-content [clrPosition]="'bottom-middle'" *clrIfOpen>
<div style="text-align: center;"><b >Are you sure?</b></div>
<div style="text-align: center;"><b>Are you sure?</b></div>
<button class="btn btn-outline" [clrSignpostTrigger]="false">cancel</button>&nbsp;
<button class="btn btn-primary" (click)="deleteRowcost_sheet(i,attach.id)" >Delete</button>
<button class="btn btn-primary" (click)="deleteRowcost_sheet(i,attach.id)">Delete</button>
</clr-signpost-content>
</clr-signpost>
@ -302,13 +318,15 @@
</tbody>
<button type="button" class="btn btn-primary button1" style="margin-left: 20px;" (click)="onAddLinescost_sheet()">
<button type="button" class="btn btn-primary button1" style="margin-left: 20px;"
(click)="onAddLinescost_sheet()">
<clr-icon shape="plus"></clr-icon>
</button>
</table> </div>
</table>
</div>
<!-- form code start -->
<!-- form code start -->
<div *ngIf="checkFormCode">
<h4 style="font-weight: 300;display: inline;">Extension</h4>
<br>
@ -317,22 +335,27 @@
<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" />
<input *ngSwitchCase="'text'" [type]="field.fieldType" name="{{ field.extValue }}"
[(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
<!-- Date Input --> <label *ngSwitchCase="'date'">{{ field.fieldName }}</label>
<input *ngSwitchCase="'date'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
<input *ngSwitchCase="'date'" [type]="field.fieldType" name="{{ field.extValue }}"
[(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
<!-- Textarea --> <label *ngSwitchCase="'textarea'">{{ field.fieldName }}</label>
<textarea *ngSwitchCase="'textarea'" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" col="10" row="2"></textarea>
<textarea *ngSwitchCase="'textarea'" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]"
col="10" row="2"></textarea>
<!-- Checkbox --> <label *ngSwitchCase="'checkbox'">{{ field.fieldName }}</label><br>
<input *ngSwitchCase="'checkbox'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-checkbox" />
<input *ngSwitchCase="'checkbox'" [type]="field.fieldType" name="{{ field.extValue }}"
[(ngModel)]="rowSelected[field.extValue]" class="clr-checkbox" />
</ng-container>
</div>
</div>
</div>
</div>
<!-- form code end --> <div class="modal-footer">
<!-- form code end -->
<div class="modal-footer">
<button type="button" class="btn btn-outline" (click)="modalEdit = false">Cancel</button>
<button type="submit" class="btn btn-primary" (click)="onUpdate(rowSelected.id)">Update</button>
</div>
@ -345,13 +368,13 @@
<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>
<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 Cost_Sheet
<h3 class="modal-title">Add Cost Sheet
@ -362,30 +385,32 @@
<!-- aeroplane icon -->
&nbsp; &nbsp; &nbsp; &nbsp;
<a *ngIf="userrole.includes('ROLE_ADMIN')" style="float: right;" href="javascript:void(0)" role="tooltip" aria-haspopup="true"
class="tooltip tooltip-sm tooltip-bottom-left">
<a *ngIf="userrole.includes('ROLE_ADMIN')" style="float: right;" href="javascript:void(0)" role="tooltip"
aria-haspopup="true" class="tooltip tooltip-sm tooltip-bottom-left">
<a id="build_extension" [routerLink]="['../extension/all']" [queryParams]="{ formCode: 'Cost_sheet_formCode' }">
<clr-icon shape="airplane" size="32"></clr-icon>
</a>
<span class="tooltip-content">Form Extension</span>
</a> </h3>
</a>
</h3>
<div class="modal-body">
<form [formGroup]="entryForm" >
<form [formGroup]="entryForm">
<div class="clr-row" style="height: fit-content;">
<div class="clr-col-sm-12">
<div class="clr-col-sm-12">
<label> Name</label>
<input class="clr-input" type="text" formControlName="name" />
</div>
<div class="clr-col-sm-12">
<div class="clr-col-sm-12">
<label> Description</label>
<textarea cols="10" rows="2" formControlName="description" placeholder="Textarea"> </textarea>
</div>
<div class="clr-col-sm-12">
<div class="clr-col-sm-12">
<label> Active</label>
<input type="checkbox" formControlName="active" clrToggle/> </div>
<input type="checkbox" formControlName="active" clrToggle />
</div>
@ -397,7 +422,7 @@
<h6> List of cost_sheet</h6>
<h6> List of Cost Sheet</h6>
<div class="clr-row" style="margin-top: 10px;">
<table class="table">
@ -410,13 +435,15 @@
<th>Cancel</th>
</tr>
</thead>
<tbody >
<tbody>
<tr *ngFor="let attach of FileDatacost_sheet; let i=index">
<td style="width: 70px;"><input type="text" class="clr-input" value={{i+1}} [readonly]="true"> </td>
<td><input type="file" (change)="onFileChangedcost_sheet($event, i)" accept = "application/pdf,.csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" /><!--accept=".pdf,.doc,.docx,.jpg,.msg"-->
<td><input type="file" (change)="onFileChangedcost_sheet($event, i)"
accept="application/pdf,.csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" /><!--accept=".pdf,.doc,.docx,.jpg,.msg"-->
</td>
<td>{{attach.uploadedfile_name}}</td>
<td > <img [src]="attach.filePreview" alt="File Preview" [ngModelOptions]="{standalone: true}" name="filePreview" width="100px" height="100px"></td>
<td> <img [src]="attach.filePreview" alt="File Preview" [ngModelOptions]="{standalone: true}"
name="filePreview" width="100px" height="100px"></td>
<td>
<a (click)="deleteRowcost_sheet(i)">
<clr-icon shape="trash" class="is-error"></clr-icon>
@ -426,11 +453,13 @@
</tbody>
<button type="button" class="btn btn-primary button1" style="margin-left: 20px;" (click)="onAddLinescost_sheet()">
<button type="button" class="btn btn-primary button1" style="margin-left: 20px;"
(click)="onAddLinescost_sheet()">
<clr-icon shape="plus"></clr-icon>
</button>
</table> </div>
</table>
</div>
@ -457,11 +486,12 @@
</div>
</div>
</div>
<!-- form code end --> <div class="modal-footer">
<button type="button" class="btn btn-outline" (click)="modalAdd = false">Cancel</button>
<!-- 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>
</form>
</div>
</clr-modal>
@ -472,4 +502,4 @@
<!-- htmlpopup -->
<!-- htmlpopup -->

View File

@ -1,28 +1,31 @@
<ol class="breadcrumb breadcrumb-arrow font-trirong">
<li><a href="javascript://"> Visa_Administration</a></li>
<li><a href="javascript://"> Visa Administration</a></li>
</ol>
<div class="dg-wrapper">
<div class="clr-row">
<div class="clr-col-8">
<h3>Visa_Administration </h3>
<h3>Visa Administration </h3>
</div>
<div class="clr-col-4" style="text-align: right;">
<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>
<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>
</button>
<!-- upload and download template -->
<!-- upload and download template -->
<button class="btn btn-outline" (click)="goToDataM()">
Upload
</button>
<button class="btn btn-outline" (click)="downloadCSV(tableName)" >
<clr-icon shape="export" ></clr-icon> Download
<button class="btn btn-outline" (click)="downloadCSV(tableName)">
<clr-icon shape="export"></clr-icon> Download
</button>
<!-- upload and download template end here--> <!-- button -->
<button id="add" class="btn btn-primary" (click)="goToAdd(product)" >
<button id="add" class="btn btn-primary" (click)="goToAdd(product)">
<clr-icon shape="plus"></clr-icon>ADD
</button>
</div></div>
<ng-container *ngIf="!isCardview"> <!-- GET ALL --> <clr-datagrid [clrDgLoading]="loading" [(clrDgSelected)]="selected">
</div>
</div>
<ng-container *ngIf="!isCardview"> <!-- GET ALL --> <clr-datagrid [clrDgLoading]="loading"
[(clrDgSelected)]="selected">
<clr-dg-placeholder>
<ng-template #loadingSpinner>
<clr-spinner>Loading ... </clr-spinner>
@ -30,27 +33,27 @@
<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>
<clr-dg-column [clrDgField]="' description'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Description
<clr-dg-column [clrDgField]="' description'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Description
</ng-container></clr-dg-column>
<clr-dg-column [clrDgField]="' active'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Active
<clr-dg-column [clrDgField]="' active'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Active
</ng-container></clr-dg-column>
<clr-dg-column [clrDgField]="' emails'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Emails
<clr-dg-column [clrDgField]="' emails'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Emails
</ng-container></clr-dg-column>
<clr-dg-column [clrDgField]="' visa_status'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Visa status
<clr-dg-column [clrDgField]="' visa_status'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Visa status
</ng-container></clr-dg-column>
<clr-dg-column [clrDgField]="' nationality'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Nationality
<clr-dg-column [clrDgField]="' nationality'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Nationality
</ng-container></clr-dg-column>
@ -62,29 +65,31 @@
<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 (click)="goToReplaceStringdescription (user.description)" style="cursor: pointer; align-items: center;"><clr-icon shape="details"></clr-icon>
</clr-dg-cell>
<clr-dg-cell (click)="goToReplaceStringdescription (user.description)"
style="cursor: pointer; align-items: center;"><clr-icon shape="details"></clr-icon>
</clr-dg-cell>
<clr-dg-cell>{{user. active }}</clr-dg-cell>
<clr-dg-cell>{{user. active }}</clr-dg-cell>
<clr-dg-cell>{{user. emails }}</clr-dg-cell>
<clr-dg-cell>{{user. emails }}</clr-dg-cell>
<clr-dg-cell>{{user. visa_statusname }}</clr-dg-cell>
<clr-dg-cell>{{user. visa_statusname }}</clr-dg-cell>
<clr-dg-cell>{{user. nationalityname }}</clr-dg-cell>
<clr-dg-cell>{{user. nationalityname }}</clr-dg-cell>
<!-- who column -->
<clr-dg-cell>
<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>
<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>
@ -111,7 +116,7 @@
</clr-dg-pagination>
</clr-dg-footer>
</clr-datagrid> </ng-container>
<ng-template #showInfo>
<ng-template #showInfo>
<div class="alert alert-info" role="alert">
<div class="alert-items">
<div class="alert-item static">
@ -123,16 +128,18 @@
</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 *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-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-body" style="display: grid; grid-template-columns: repeat(13, 1fr); grid-template-rows: repeat(7, 1fr); gap: 5px;">
<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;">
<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"
[style.gridRowEnd]="item.y + item.rows + 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">
<div *ngIf="item.name === 'textField'" class="title-card card-title"
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
@ -142,7 +149,8 @@
[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'))"
[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">
{{beforeText(item.fieldtext)}}
{{ app[transform(item.fieldtext) ] }}
@ -158,7 +166,8 @@
[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'))"
[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">
{{beforeText(item.fieldtext)}}
{{ app[transform(item.fieldtext) ] | date}}
@ -173,7 +182,8 @@
[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'))"
[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">
{{beforeText(item.fieldtext)}}
{{ app[transform(item.fieldtext) ]}}
@ -203,8 +213,7 @@
[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'))"
[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>
</div>
@ -219,7 +228,8 @@
[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.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.height]="item.imagewidth !== '' ? item.imagewidth + 'px' : '100px'"></div>
</div>
@ -238,7 +248,8 @@
<clr-modal [(clrModalOpen)]="rsModaldescription" [clrModalSize]="'xl'" [clrModalStaticBackdrop]="true">
<div class="modal-body">
<textarea class="form-control" style="width:100%; height: 400px;" readonly>{{rowSelected}}</textarea>
</div></clr-modal>
</div>
</clr-modal>
@ -250,7 +261,7 @@
<!-- // EDIT DATA......... -->
<clr-modal [(clrModalOpen)]="modalEdit" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
<h3 class="modal-title">Update Visa_administration <!--update button -->
<h3 class="modal-title">Update Visa Administration <!--update button -->
@ -262,51 +273,58 @@
</h3>
</h3>
<div class="modal-body" *ngIf="rowSelected.id">
<h2 class="heading">{{rowSelected.id}}</h2>
<!-- button -->
<form >
<div class="clr-row">
<div class="clr-col-sm-12">
<label>Name</label>
<!-- button -->
<form>
<div class="clr-row">
<div class="clr-col-sm-12">
<label>Name</label>
<input class="clr-input" type="text" [(ngModel)]="rowSelected.name" name="name" />
</div>
<div class="clr-col-sm-12">
<label> Description</label>
<textarea cols="10" rows="2"[(ngModel)]="rowSelected.description" name="description " placeholder="Textarea"> </textarea>
<div class="clr-col-sm-12">
<label> Description</label>
<textarea cols="10" rows="2" [(ngModel)]="rowSelected.description" name="description "
placeholder="Textarea"> </textarea>
</div>
<div class="clr-col-sm-12">
<label> Active</label>
<input type="checkbox" name="active" clrToggle [(ngModel)]="rowSelected.active" /> </div>
<div class="clr-col-sm-12">
<label> Active</label>
<input type="checkbox" name="active" clrToggle [(ngModel)]="rowSelected.active" />
</div>
<div class="clr-col-sm-12">
<label> Emails</label>
<input id="name" class="clr-input" type="email"
[(ngModel)]="rowSelected.emails " name="emails" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$">
<div class="clr-col-sm-12">
<label> Emails</label>
<input id="name" class="clr-input" type="email" [(ngModel)]="rowSelected.emails " name="emails"
pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$">
<div *ngIf="rowSelected.emails && !isValidemails(rowSelected.emails )" class="error_mess">
* Email must be a valid email address.
</div> </div>
</div>
</div>
<div class="clr-col-sm-12">
<label>Visa status</label>
<select name="visa_status" [(ngModel)]="rowSelected.visa_status">
<div class="clr-col-sm-12">
<label>Visa status</label>
<select name="visa_status" [(ngModel)]="rowSelected.visa_status">
<option [value]="null">Choose visa_status</option>
<option *ngFor=" let item of selectvisa_status" [value]="item.id">{{item.name }}</option> </select> </div>
<option *ngFor=" let item of selectvisa_status" [value]="item.id">{{item.name }}</option>
</select>
</div>
<div class="clr-col-sm-12">
<label>Nationality</label>
<select name="nationality" [(ngModel)]="rowSelected.nationality">
<div class="clr-col-sm-12">
<label>Nationality</label>
<select name="nationality" [(ngModel)]="rowSelected.nationality">
<option [value]="null">Choose nationality</option>
<option *ngFor=" let item of selectnationality" [value]="item.id">{{item.name }}</option> </select> </div>
<option *ngFor=" let item of selectnationality" [value]="item.id">{{item.name }}</option>
</select>
</div>
@ -323,7 +341,7 @@
<!-- form code start -->
<!-- form code start -->
<div *ngIf="checkFormCode">
<h4 style="font-weight: 300;display: inline;">Extension</h4>
<br>
@ -332,22 +350,27 @@
<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" />
<input *ngSwitchCase="'text'" [type]="field.fieldType" name="{{ field.extValue }}"
[(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
<!-- Date Input --> <label *ngSwitchCase="'date'">{{ field.fieldName }}</label>
<input *ngSwitchCase="'date'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
<input *ngSwitchCase="'date'" [type]="field.fieldType" name="{{ field.extValue }}"
[(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
<!-- Textarea --> <label *ngSwitchCase="'textarea'">{{ field.fieldName }}</label>
<textarea *ngSwitchCase="'textarea'" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" col="10" row="2"></textarea>
<textarea *ngSwitchCase="'textarea'" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]"
col="10" row="2"></textarea>
<!-- Checkbox --> <label *ngSwitchCase="'checkbox'">{{ field.fieldName }}</label><br>
<input *ngSwitchCase="'checkbox'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-checkbox" />
<input *ngSwitchCase="'checkbox'" [type]="field.fieldType" name="{{ field.extValue }}"
[(ngModel)]="rowSelected[field.extValue]" class="clr-checkbox" />
</ng-container>
</div>
</div>
</div>
</div>
<!-- form code end --> <div class="modal-footer">
<!-- form code end -->
<div class="modal-footer">
<button type="button" class="btn btn-outline" (click)="modalEdit = false">Cancel</button>
<button type="submit" class="btn btn-primary" (click)="onUpdate(rowSelected.id)">Update</button>
</div>
@ -360,13 +383,13 @@
<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>
<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 Visa_Administration
<h3 class="modal-title">Add Visa Administration
@ -381,58 +404,66 @@
<!-- aeroplane icon -->
&nbsp; &nbsp; &nbsp; &nbsp;
<a *ngIf="userrole.includes('ROLE_ADMIN')" style="float: right;" href="javascript:void(0)" role="tooltip" aria-haspopup="true"
class="tooltip tooltip-sm tooltip-bottom-left">
<a id="build_extension" [routerLink]="['../extension/all']" [queryParams]="{ formCode: 'Visa_administration_formCode' }">
<a *ngIf="userrole.includes('ROLE_ADMIN')" style="float: right;" href="javascript:void(0)" role="tooltip"
aria-haspopup="true" class="tooltip tooltip-sm tooltip-bottom-left">
<a id="build_extension" [routerLink]="['../extension/all']"
[queryParams]="{ formCode: 'Visa_administration_formCode' }">
<clr-icon shape="airplane" size="32"></clr-icon>
</a>
<span class="tooltip-content">Form Extension</span>
</a> </h3>
</a>
</h3>
<div class="modal-body">
<form [formGroup]="entryForm" >
<form [formGroup]="entryForm">
<div class="clr-row" style="height: fit-content;">
<div class="clr-col-sm-12">
<div class="clr-col-sm-12">
<label> Name</label>
<input class="clr-input" type="text" formControlName="name" />
</div>
<div class="clr-col-sm-12">
<div class="clr-col-sm-12">
<label> Description</label>
<textarea cols="10" rows="2" formControlName="description" placeholder="Textarea"> </textarea>
</div>
<div class="clr-col-sm-12">
<div class="clr-col-sm-12">
<label> Active</label>
<input type="checkbox" formControlName="active" clrToggle/> </div>
<input type="checkbox" formControlName="active" clrToggle />
</div>
<div class="clr-col-sm-12">
<div class="clr-col-sm-12">
<label> Emails</label>
<input class="clr-input" type="email" formControlName="emails" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$">
<div *ngIf="entryForm.controls['emails'].errors" class="error_mess">
<div *ngIf="entryForm.controls['emails'].hasError('pattern')" class="error_mess">* Email must be a valid email address
</div> </div>
</div>
<input class="clr-input" type="email" formControlName="emails"
pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$">
<div *ngIf="entryForm.controls['emails'].errors" class="error_mess">
<div *ngIf="entryForm.controls['emails'].hasError('pattern')" class="error_mess">* Email must be a valid
email address
</div>
</div>
</div>
<div class="clr-col-sm-12">
<div class="clr-col-sm-12">
<label> Visa status</label>
<select formControlName="visa_status">
<select formControlName="visa_status">
<option [value]="null">Choose Visa status</option>
<option *ngFor="let item of selectvisa_status" [value]="item.id">{{item.name}}</option>
</select> </div>
</select>
</div>
<div class="clr-col-sm-12">
<div class="clr-col-sm-12">
<label> Nationality</label>
<select formControlName="nationality">
<select formControlName="nationality">
<option [value]="null">Choose Nationality</option>
<option *ngFor="let item of selectnationality" [value]="item.id">{{item.name}}</option>
</select> </div>
</select>
</div>
@ -475,11 +506,12 @@
</div>
</div>
</div>
<!-- form code end --> <div class="modal-footer">
<button type="button" class="btn btn-outline" (click)="modalAdd = false">Cancel</button>
<!-- 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>
</form>
</div>
</clr-modal>
@ -494,4 +526,4 @@
<!-- htmlpopup -->
<!-- htmlpopup -->

View File

@ -1,10 +1,10 @@
<ol class="breadcrumb breadcrumb-arrow font-trirong">
<li><a href="javascript://"> Visa_Application</a></li>
<li><a href="javascript://"> Visa Application</a></li>
</ol>
<div class="dg-wrapper">
<div class="clr-row">
<div class="clr-col-8">
<h3>Visa_Application </h3>
<h3>Visa Application </h3>
</div>
<div class="clr-col-4" style="text-align: right;">
<button *ngIf="cardButton" id="add" class="btn btn-primary btn-icon" (click)="changeView()" >
@ -387,7 +387,7 @@
<!-- // EDIT DATA......... -->
<clr-modal [(clrModalOpen)]="modalEdit" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
<h3 class="modal-title">Update Visa_application <!--update button -->
<h3 class="modal-title">Update Visa Application <!--update button -->
@ -681,7 +681,7 @@
</clr-modal>
<!-- ADD FORM ..... -->
<clr-modal [(clrModalOpen)]="modalAdd" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
<h3 class="modal-title">Add Visa_Application
<h3 class="modal-title">Add Visa Application

View File

@ -1,7 +1,7 @@
import { Component, OnInit } from '@angular/core';
import { ToastrService } from 'ngx-toastr';
import { AlertService } from 'src/app/services/alert.service';
import { Visa_applicationservice} from './Visa_application.service';
import { Visa_applicationservice } from './Visa_application.service';
import { AbstractControl, FormArray, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms';
import { ExtensionService } from 'src/app/services/fnd/extension.service';
import { DashboardContentModel2 } from 'src/app/models/builder/dashboard';
@ -18,7 +18,7 @@ export class Visa_applicationComponent implements OnInit {
cardmodeldata = Visa_applicationcardvariable.cardmodeldata;
public dashboardArray: DashboardContentModel2[];
isCardview = Visa_applicationcardvariable.cardButton;
cardmodal; changeView(){
cardmodal; changeView() {
this.isCardview = !this.isCardview;
}
beforeText(fieldtext: string): string { // Extract the text before the first '<'
@ -34,121 +34,78 @@ export class Visa_applicationComponent implements OnInit {
return match ? match[1] : ''; // Extract the text between '<' and '>'
}
userrole;
rowSelected :any= {};
modaldelete=false;
modalEdit=false;
modalAdd= false;
rowSelected: any = {};
modaldelete = false;
modalEdit = false;
modalAdd = false;
public entryForm: FormGroup;
loading = false;
product;
modalOpenedforNewLine = false;
newLine:any;
newLine: any;
additionalFieldsFromBackend: any[] = [];
formcode = 'Visa_application_formCode'
tableName = 'Visa_application'; checkFormCode; selected: any[] = []; constructor(
tableName = 'Visa_application'; checkFormCode; selected: any[] = []; constructor(
private extensionService: ExtensionService,
private userInfoService:UserInfoService,
private mainService:Visa_applicationservice,
private userInfoService: UserInfoService,
private mainService: Visa_applicationservice,
private alertService: AlertService,
private toastr: ToastrService,
private _fb: FormBuilder,
) { }
// component button
// component button
ngOnInit(): void {
if(this.cardmodeldata !== ''){
if (this.cardmodeldata !== '') {
this.cardmodal = JSON.parse(this.cardmodeldata);
this.dashboardArray = this.cardmodal.dashboard.slice();
console.log(this.dashboardArray)
}
this.userrole=this.userInfoService.getRoles();
this.userrole = this.userInfoService.getRoles();
this.getData();
this.entryForm = this._fb.group({
name : [null],
description : [null],
active : [false],
visa_entry_type : [null],
visa_duration : [null],
visa_processing : [null],
travel_start_date : [null],
travel_end_date : [null],
passport_number : [null,[Validators.required]],
passport_issue_date : [null],
passport_expiry_date : [null],
email : [null],
phone_number: ['+91'],
birth_place : [null],
date_of_birth : [null],
gender : [null],
profession : [null],
visa_cost : [null, { updateOn: 'blur' }],
referrer : [null],
nationality : [null],
supplier : [null],
agent : [null],
name: [null],
description: [null],
active: [false],
visa_entry_type: [null],
visa_duration: [null],
visa_processing: [null],
travel_start_date: [null],
travel_end_date: [null],
passport_number: [null, [Validators.required]],
passport_issue_date: [null],
passport_expiry_date: [null],
email: [null],
phone_number: ['+91'],
birth_place: [null],
date_of_birth: [null],
gender: [null],
profession: [null],
visa_cost: [null, { updateOn: 'blur' }],
referrer: [null],
nationality: [null],
supplier: [null],
agent: [null],
@ -176,47 +133,21 @@ agent : [null],
// form code end
this.getallvisa_entry_type();
this.getallvisa_duration();
this.getallvisa_processing();
this.getallgender();
this.getallvisa_entry_type();
this.getallreferrer();
this.getallvisa_duration();
this.getallnationality();
this.getallvisa_processing();
this.getallsupplier();
this.getallgender();
this.getallreferrer();
this.getallnationality();
this.getallsupplier();
this.getallagent();
this.getallagent();
}
@ -269,13 +200,13 @@ this.getallagent();
this.mainService.getAll().subscribe((data) => {
console.log(data);
this.product = data;
if(this.product.length==0){
this.error="No Data Available"
if (this.product.length == 0) {
this.error = "No Data Available"
}
},(error) => {
}, (error) => {
console.log(error);
if(error){
this.error="Server Error";
if (error) {
this.error = "Server Error";
}
});
}
@ -330,12 +261,11 @@ this.getallagent();
}
onDelete(row) {
this.rowSelected = row;
this.modaldelete=true;
this.modaldelete = true;
}
delete(id)
{
delete(id) {
this.modaldelete = false;
console.log("in delete "+id);
console.log("in delete " + id);
this.mainService.delete(id).subscribe(
(data) => {
console.log(data);
@ -399,7 +329,7 @@ this.getallagent();
if (data || data.status >= 200 && data.status <= 299) {
this.toastr.success("Update Successfully");
}
setTimeout(() => {
setTimeout(() => {
this.ngOnInit();
}, 500);
@ -462,8 +392,8 @@ setTimeout(() => {
this.ngOnInit();
}, 500);
}
onCreate() {
this.modalAdd=false;
onCreate() {
this.modalAdd = false;
@ -514,7 +444,7 @@ onCreate() {
if (data || data.status >= 200 && data.status <= 299) {
this.toastr.success("Added Successfully");
}
setTimeout(() => {
setTimeout(() => {
this.ngOnInit();
}, 500);
@ -578,7 +508,7 @@ setTimeout(() => {
}, 500);
}
goToAdd(row) {
this.modalAdd = true; this.submitted = false;
this.modalAdd = true; this.submitted = false;
@ -625,112 +555,113 @@ this.modalAdd = true; this.submitted = false;
}
submitted = false;
onSubmit() {
onSubmit() {
console.log(this.entryForm.value);
this.submitted = true;
if (this.entryForm.invalid) {
return;
}this.onCreate();
} this.onCreate();
}
}
rsModaldescription = false;
goToReplaceStringdescription(row){
this.rowSelected = row; this.rsModaldescription =true; }
rsModaldescription = false;
goToReplaceStringdescription(row) {
this.rowSelected = row; this.rsModaldescription = true;
}
selectvisa_entry_type ;
getallvisa_entry_type() {
this.mainService.getAllvisa_entry_type().subscribe(data=>{
this.selectvisa_entry_type = data;
console.log(data);
},(error) => { console.log(error); }); }
selectvisa_entry_type;
getallvisa_entry_type() {
this.mainService.getAllvisa_entry_type().subscribe(data => {
this.selectvisa_entry_type = data;
console.log(data);
}, (error) => { console.log(error); });
}
selectvisa_duration ;
getallvisa_duration() {
this.mainService.getAllvisa_duration().subscribe(data=>{
this.selectvisa_duration = data;
console.log(data);
},(error) => { console.log(error); }); }
selectvisa_duration;
getallvisa_duration() {
this.mainService.getAllvisa_duration().subscribe(data => {
this.selectvisa_duration = data;
console.log(data);
}, (error) => { console.log(error); });
}
selectvisa_processing ;
getallvisa_processing() {
this.mainService.getAllvisa_processing().subscribe(data=>{
this.selectvisa_processing = data;
console.log(data);
},(error) => { console.log(error); }); }
selectvisa_processing;
getallvisa_processing() {
this.mainService.getAllvisa_processing().subscribe(data => {
this.selectvisa_processing = data;
console.log('visa processing ', data);
}, (error) => { console.log(error); });
}
isValidemail(email: string): boolean {
isValidemail(email: string): boolean {
const emailPattern = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
return emailPattern.test(email); }
return emailPattern.test(email);
}
isValidPhone_number(phone: string): boolean {
isValidPhone_number(phone: string): boolean {
const phonePattern = /^(\+[1-9][0-9]{0,2})?[1-9][0-9]{9}$/;
return phonePattern.test(phone);
}
}
selectgender ;
getallgender() {
this.mainService.getAllgender().subscribe(data=>{
this.selectgender = data;
console.log(data);
},(error) => { console.log(error); }); }
selectgender;
getallgender() {
this.mainService.getAllgender().subscribe(data => {
this.selectgender = data;
console.log(data);
}, (error) => { console.log(error); });
}
//currency field start
formatCurrencyvisa_cost () {
//currency field start
formatCurrencyvisa_cost() {
// Format the currency with two decimal places
this.rowSelected.visa_cost = Number(this.rowSelected.visa_cost ).toFixed(2);
this.rowSelected.visa_cost = Number(this.rowSelected.visa_cost).toFixed(2);
// Remove commas from the formatted currency
this.rowSelected.visa_cost = this.rowSelected.visa_cost?.replace(/,/g, ''); }
this.rowSelected.visa_cost = this.rowSelected.visa_cost?.replace(/,/g, '');
}
//currency field end
selectreferrer ;
getallreferrer() {
this.mainService.getAllreferrer().subscribe(data=>{
this.selectreferrer = data;
console.log(data);
},(error) => { console.log(error); }); }
selectreferrer;
getallreferrer() {
this.mainService.getAllreferrer().subscribe(data => {
this.selectreferrer = data;
console.log(data);
}, (error) => { console.log(error); });
}
selectnationality ;
getallnationality() {
this.mainService.getAllnationality().subscribe(data=>{
this.selectnationality = data;
console.log(data);
},(error) => { console.log(error); }); }
selectnationality;
getallnationality() {
this.mainService.getAllnationality().subscribe(data => {
this.selectnationality = data;
console.log(data);
}, (error) => { console.log(error); });
}
selectsupplier ;
getallsupplier() {
this.mainService.getAllsupplier().subscribe(data=>{
this.selectsupplier = data;
console.log(data);
},(error) => { console.log(error); }); }
selectsupplier;
getallsupplier() {
this.mainService.getAllsupplier().subscribe(data => {
this.selectsupplier = data;
console.log(data);
}, (error) => { console.log(error); });
}
selectagent ;
getallagent() {
this.mainService.getAllagent().subscribe(data=>{
this.selectagent = data;
console.log(data);
},(error) => { console.log(error); }); }
selectagent;
getallagent() {
this.mainService.getAllagent().subscribe(data => {
this.selectagent = data;
console.log(data);
}, (error) => { console.log(error); });
}
// updateaction
// updateaction
}

View File

@ -42,7 +42,7 @@ getAllvisa_duration(): Observable<any> {
return this.apiRequest.get("Visa_duration_ListFilter1/Visa_duration_ListFilter1"); }
getAllvisa_processing(): Observable<any> {
return this.apiRequest.get("Visa_Processing_ListFilter1/Visa_Processing_ListFilter1"); }
return this.apiRequest.get("Visa_processing_ListFilter1/Visa_processing_ListFilter1"); }

View File

@ -1,28 +1,31 @@
<ol class="breadcrumb breadcrumb-arrow font-trirong">
<li><a href="javascript://"> Visa_Bundle</a></li>
<li><a href="javascript://"> Visa Bundle</a></li>
</ol>
<div class="dg-wrapper">
<div class="clr-row">
<div class="clr-col-8">
<h3>Visa_Bundle </h3>
<h3>Visa Bundle </h3>
</div>
<div class="clr-col-4" style="text-align: right;">
<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>
<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>
</button>
<!-- upload and download template -->
<!-- upload and download template -->
<button class="btn btn-outline" (click)="goToDataM()">
Upload
</button>
<button class="btn btn-outline" (click)="downloadCSV(tableName)" >
<clr-icon shape="export" ></clr-icon> Download
<button class="btn btn-outline" (click)="downloadCSV(tableName)">
<clr-icon shape="export"></clr-icon> Download
</button>
<!-- upload and download template end here--> <!-- button -->
<button id="add" class="btn btn-primary" (click)="goToAdd(product)" >
<button id="add" class="btn btn-primary" (click)="goToAdd(product)">
<clr-icon shape="plus"></clr-icon>ADD
</button>
</div></div>
<ng-container *ngIf="!isCardview"> <!-- GET ALL --> <clr-datagrid [clrDgLoading]="loading" [(clrDgSelected)]="selected">
</div>
</div>
<ng-container *ngIf="!isCardview"> <!-- GET ALL --> <clr-datagrid [clrDgLoading]="loading"
[(clrDgSelected)]="selected">
<clr-dg-placeholder>
<ng-template #loadingSpinner>
<clr-spinner>Loading ... </clr-spinner>
@ -30,15 +33,15 @@
<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>
<clr-dg-column [clrDgField]="' description'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Description
<clr-dg-column [clrDgField]="' description'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Description
</ng-container></clr-dg-column>
<clr-dg-column [clrDgField]="' active'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Active
<clr-dg-column [clrDgField]="' active'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Active
</ng-container></clr-dg-column>
@ -52,22 +55,24 @@
<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 (click)="goToReplaceStringdescription (user.description)" style="cursor: pointer; align-items: center;"><clr-icon shape="details"></clr-icon>
</clr-dg-cell>
<clr-dg-cell (click)="goToReplaceStringdescription (user.description)"
style="cursor: pointer; align-items: center;"><clr-icon shape="details"></clr-icon>
</clr-dg-cell>
<clr-dg-cell>{{user. active }}</clr-dg-cell>
<clr-dg-cell>{{user. active }}</clr-dg-cell>
<!-- who column -->
<clr-dg-cell>
<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>
<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>
@ -94,7 +99,7 @@
</clr-dg-pagination>
</clr-dg-footer>
</clr-datagrid> </ng-container>
<ng-template #showInfo>
<ng-template #showInfo>
<div class="alert alert-info" role="alert">
<div class="alert-items">
<div class="alert-item static">
@ -106,16 +111,18 @@
</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 *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-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-body" style="display: grid; grid-template-columns: repeat(13, 1fr); grid-template-rows: repeat(7, 1fr); gap: 5px;">
<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;">
<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"
[style.gridRowEnd]="item.y + item.rows + 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">
<div *ngIf="item.name === 'textField'" class="title-card card-title"
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
@ -125,7 +132,8 @@
[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'))"
[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">
{{beforeText(item.fieldtext)}}
{{ app[transform(item.fieldtext) ] }}
@ -141,7 +149,8 @@
[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'))"
[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">
{{beforeText(item.fieldtext)}}
{{ app[transform(item.fieldtext) ] | date}}
@ -156,7 +165,8 @@
[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'))"
[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">
{{beforeText(item.fieldtext)}}
{{ app[transform(item.fieldtext) ]}}
@ -186,8 +196,7 @@
[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'))"
[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>
</div>
@ -202,7 +211,8 @@
[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.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.height]="item.imagewidth !== '' ? item.imagewidth + 'px' : '100px'"></div>
</div>
@ -221,7 +231,8 @@
<clr-modal [(clrModalOpen)]="rsModaldescription" [clrModalSize]="'xl'" [clrModalStaticBackdrop]="true">
<div class="modal-body">
<textarea class="form-control" style="width:100%; height: 400px;" readonly>{{rowSelected}}</textarea>
</div></clr-modal>
</div>
</clr-modal>
@ -229,7 +240,7 @@
<!-- // EDIT DATA......... -->
<clr-modal [(clrModalOpen)]="modalEdit" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
<h3 class="modal-title">Update Visa_bundle <!--update button -->
<h3 class="modal-title">Update Visa Bundle <!--update button -->
@ -237,25 +248,27 @@
</h3>
</h3>
<div class="modal-body" *ngIf="rowSelected.id">
<h2 class="heading">{{rowSelected.id}}</h2>
<!-- button -->
<form >
<div class="clr-row">
<div class="clr-col-sm-12">
<label>Name</label>
<!-- button -->
<form>
<div class="clr-row">
<div class="clr-col-sm-12">
<label>Name</label>
<input class="clr-input" type="text" [(ngModel)]="rowSelected.name" name="name" />
</div>
<div class="clr-col-sm-12">
<label> Description</label>
<textarea cols="10" rows="2"[(ngModel)]="rowSelected.description" name="description " placeholder="Textarea"> </textarea>
<div class="clr-col-sm-12">
<label> Description</label>
<textarea cols="10" rows="2" [(ngModel)]="rowSelected.description" name="description "
placeholder="Textarea"> </textarea>
</div>
<div class="clr-col-sm-12">
<label> Active</label>
<input type="checkbox" name="active" clrToggle [(ngModel)]="rowSelected.active" /> </div>
<div class="clr-col-sm-12">
<label> Active</label>
<input type="checkbox" name="active" clrToggle [(ngModel)]="rowSelected.active" />
</div>
@ -266,7 +279,7 @@
<h6> List of visa_bundle</h6>
<h6> List of Visa Bundle</h6>
<div class="clr-row" style="margin-top: 10px;">
<table class="table">
@ -279,21 +292,24 @@
<th>Cancel</th>
</tr>
</thead>
<tbody >
<tbody>
<tr *ngFor="let attach of FileDatavisa_bundle; let i=index">
<td style="width: 70px;"><input type="text" class="clr-input" value={{i+1}} [readonly]="true"> </td>
<td><input type="file" (change)="onFileChangedvisa_bundle($event, i)" accept = "application/pdf,.csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel"/>
<td><input type="file" (change)="onFileChangedvisa_bundle($event, i)"
accept="application/pdf,.csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" />
</td>
<td>{{attach.uploadedfile_name}}</td>
<td > <img [src]="attach.filePreview" alt="File Preview" [ngModelOptions]="{standalone: true}" name="filePreview" width="100px" height="100px"></td>
<td> <img [src]="attach.filePreview" alt="File Preview" [ngModelOptions]="{standalone: true}"
name="filePreview" width="100px" height="100px"></td>
<td>
<clr-signpost style="padding-right: 10px;">
<clr-icon shape="trash" class="is-error" aria-label="Icon Button Trigger" clrSignpostTrigger></clr-icon>
<clr-icon shape="trash" class="is-error" aria-label="Icon Button Trigger"
clrSignpostTrigger></clr-icon>
<clr-signpost-content [clrPosition]="'bottom-middle'" *clrIfOpen>
<div style="text-align: center;"><b >Are you sure?</b></div>
<div style="text-align: center;"><b>Are you sure?</b></div>
<button class="btn btn-outline" [clrSignpostTrigger]="false">cancel</button>&nbsp;
<button class="btn btn-primary" (click)="deleteRowvisa_bundle(i,attach.id)" >Delete</button>
<button class="btn btn-primary" (click)="deleteRowvisa_bundle(i,attach.id)">Delete</button>
</clr-signpost-content>
</clr-signpost>
@ -302,13 +318,15 @@
</tbody>
<button type="button" class="btn btn-primary button1" style="margin-left: 20px;" (click)="onAddLinesvisa_bundle()">
<button type="button" class="btn btn-primary button1" style="margin-left: 20px;"
(click)="onAddLinesvisa_bundle()">
<clr-icon shape="plus"></clr-icon>
</button>
</table> </div>
</table>
</div>
<!-- form code start -->
<!-- form code start -->
<div *ngIf="checkFormCode">
<h4 style="font-weight: 300;display: inline;">Extension</h4>
<br>
@ -317,22 +335,27 @@
<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" />
<input *ngSwitchCase="'text'" [type]="field.fieldType" name="{{ field.extValue }}"
[(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
<!-- Date Input --> <label *ngSwitchCase="'date'">{{ field.fieldName }}</label>
<input *ngSwitchCase="'date'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
<input *ngSwitchCase="'date'" [type]="field.fieldType" name="{{ field.extValue }}"
[(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
<!-- Textarea --> <label *ngSwitchCase="'textarea'">{{ field.fieldName }}</label>
<textarea *ngSwitchCase="'textarea'" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" col="10" row="2"></textarea>
<textarea *ngSwitchCase="'textarea'" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]"
col="10" row="2"></textarea>
<!-- Checkbox --> <label *ngSwitchCase="'checkbox'">{{ field.fieldName }}</label><br>
<input *ngSwitchCase="'checkbox'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-checkbox" />
<input *ngSwitchCase="'checkbox'" [type]="field.fieldType" name="{{ field.extValue }}"
[(ngModel)]="rowSelected[field.extValue]" class="clr-checkbox" />
</ng-container>
</div>
</div>
</div>
</div>
<!-- form code end --> <div class="modal-footer">
<!-- form code end -->
<div class="modal-footer">
<button type="button" class="btn btn-outline" (click)="modalEdit = false">Cancel</button>
<button type="submit" class="btn btn-primary" (click)="onUpdate(rowSelected.id)">Update</button>
</div>
@ -345,13 +368,13 @@
<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>
<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 Visa_Bundle
<h3 class="modal-title">Add Visa Bundle
@ -362,30 +385,32 @@
<!-- aeroplane icon -->
&nbsp; &nbsp; &nbsp; &nbsp;
<a *ngIf="userrole.includes('ROLE_ADMIN')" style="float: right;" href="javascript:void(0)" role="tooltip" aria-haspopup="true"
class="tooltip tooltip-sm tooltip-bottom-left">
<a *ngIf="userrole.includes('ROLE_ADMIN')" style="float: right;" href="javascript:void(0)" role="tooltip"
aria-haspopup="true" class="tooltip tooltip-sm tooltip-bottom-left">
<a id="build_extension" [routerLink]="['../extension/all']" [queryParams]="{ formCode: 'Visa_bundle_formCode' }">
<clr-icon shape="airplane" size="32"></clr-icon>
</a>
<span class="tooltip-content">Form Extension</span>
</a> </h3>
</a>
</h3>
<div class="modal-body">
<form [formGroup]="entryForm" >
<form [formGroup]="entryForm">
<div class="clr-row" style="height: fit-content;">
<div class="clr-col-sm-12">
<div class="clr-col-sm-12">
<label> Name</label>
<input class="clr-input" type="text" formControlName="name" />
</div>
<div class="clr-col-sm-12">
<div class="clr-col-sm-12">
<label> Description</label>
<textarea cols="10" rows="2" formControlName="description" placeholder="Textarea"> </textarea>
</div>
<div class="clr-col-sm-12">
<div class="clr-col-sm-12">
<label> Active</label>
<input type="checkbox" formControlName="active" clrToggle/> </div>
<input type="checkbox" formControlName="active" clrToggle />
</div>
@ -397,7 +422,7 @@
<h6> List of visa_bundle</h6>
<h6> List of Visa Bundle</h6>
<div class="clr-row" style="margin-top: 10px;">
<table class="table">
@ -410,13 +435,15 @@
<th>Cancel</th>
</tr>
</thead>
<tbody >
<tbody>
<tr *ngFor="let attach of FileDatavisa_bundle; let i=index">
<td style="width: 70px;"><input type="text" class="clr-input" value={{i+1}} [readonly]="true"> </td>
<td><input type="file" (change)="onFileChangedvisa_bundle($event, i)" accept = "application/pdf,.csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" /><!--accept=".pdf,.doc,.docx,.jpg,.msg"-->
<td><input type="file" (change)="onFileChangedvisa_bundle($event, i)"
accept="application/pdf,.csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel" /><!--accept=".pdf,.doc,.docx,.jpg,.msg"-->
</td>
<td>{{attach.uploadedfile_name}}</td>
<td > <img [src]="attach.filePreview" alt="File Preview" [ngModelOptions]="{standalone: true}" name="filePreview" width="100px" height="100px"></td>
<td> <img [src]="attach.filePreview" alt="File Preview" [ngModelOptions]="{standalone: true}"
name="filePreview" width="100px" height="100px"></td>
<td>
<a (click)="deleteRowvisa_bundle(i)">
<clr-icon shape="trash" class="is-error"></clr-icon>
@ -426,11 +453,13 @@
</tbody>
<button type="button" class="btn btn-primary button1" style="margin-left: 20px;" (click)="onAddLinesvisa_bundle()">
<button type="button" class="btn btn-primary button1" style="margin-left: 20px;"
(click)="onAddLinesvisa_bundle()">
<clr-icon shape="plus"></clr-icon>
</button>
</table> </div>
</table>
</div>
@ -457,11 +486,12 @@
</div>
</div>
</div>
<!-- form code end --> <div class="modal-footer">
<button type="button" class="btn btn-outline" (click)="modalAdd = false">Cancel</button>
<!-- 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>
</form>
</div>
</clr-modal>
@ -472,4 +502,4 @@
<!-- htmlpopup -->
<!-- htmlpopup -->

View File

@ -1,28 +1,31 @@
<ol class="breadcrumb breadcrumb-arrow font-trirong">
<li><a href="javascript://"> Visa_duration</a></li>
<li><a href="javascript://"> Visa Duration</a></li>
</ol>
<div class="dg-wrapper">
<div class="clr-row">
<div class="clr-col-8">
<h3>Visa_duration </h3>
<h3>Visa Duration </h3>
</div>
<div class="clr-col-4" style="text-align: right;">
<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>
<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>
</button>
<!-- upload and download template -->
<!-- upload and download template -->
<button class="btn btn-outline" (click)="goToDataM()">
Upload
</button>
<button class="btn btn-outline" (click)="downloadCSV(tableName)" >
<clr-icon shape="export" ></clr-icon> Download
<button class="btn btn-outline" (click)="downloadCSV(tableName)">
<clr-icon shape="export"></clr-icon> Download
</button>
<!-- upload and download template end here--> <!-- button -->
<button id="add" class="btn btn-primary" (click)="goToAdd(product)" >
<button id="add" class="btn btn-primary" (click)="goToAdd(product)">
<clr-icon shape="plus"></clr-icon>ADD
</button>
</div></div>
<ng-container *ngIf="!isCardview"> <!-- GET ALL --> <clr-datagrid [clrDgLoading]="loading" [(clrDgSelected)]="selected">
</div>
</div>
<ng-container *ngIf="!isCardview"> <!-- GET ALL --> <clr-datagrid [clrDgLoading]="loading"
[(clrDgSelected)]="selected">
<clr-dg-placeholder>
<ng-template #loadingSpinner>
<clr-spinner>Loading ... </clr-spinner>
@ -30,15 +33,15 @@
<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>
<clr-dg-column [clrDgField]="' description'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Description
<clr-dg-column [clrDgField]="' description'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Description
</ng-container></clr-dg-column>
<clr-dg-column [clrDgField]="' active'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Active
<clr-dg-column [clrDgField]="' active'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Active
</ng-container></clr-dg-column>
@ -50,20 +53,22 @@
<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 (click)="goToReplaceStringdescription (user.description)" style="cursor: pointer; align-items: center;"><clr-icon shape="details"></clr-icon>
</clr-dg-cell>
<clr-dg-cell (click)="goToReplaceStringdescription (user.description)"
style="cursor: pointer; align-items: center;"><clr-icon shape="details"></clr-icon>
</clr-dg-cell>
<clr-dg-cell>{{user. active }}</clr-dg-cell>
<clr-dg-cell>{{user. active }}</clr-dg-cell>
<!-- who column -->
<clr-dg-cell>
<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>
<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>
@ -90,7 +95,7 @@
</clr-dg-pagination>
</clr-dg-footer>
</clr-datagrid> </ng-container>
<ng-template #showInfo>
<ng-template #showInfo>
<div class="alert alert-info" role="alert">
<div class="alert-items">
<div class="alert-item static">
@ -102,16 +107,18 @@
</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 *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-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-body" style="display: grid; grid-template-columns: repeat(13, 1fr); grid-template-rows: repeat(7, 1fr); gap: 5px;">
<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;">
<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"
[style.gridRowEnd]="item.y + item.rows + 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">
<div *ngIf="item.name === 'textField'" class="title-card card-title"
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
@ -121,7 +128,8 @@
[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'))"
[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">
{{beforeText(item.fieldtext)}}
{{ app[transform(item.fieldtext) ] }}
@ -137,7 +145,8 @@
[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'))"
[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">
{{beforeText(item.fieldtext)}}
{{ app[transform(item.fieldtext) ] | date}}
@ -152,7 +161,8 @@
[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'))"
[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">
{{beforeText(item.fieldtext)}}
{{ app[transform(item.fieldtext) ]}}
@ -182,8 +192,7 @@
[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'))"
[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>
</div>
@ -198,7 +207,8 @@
[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.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.height]="item.imagewidth !== '' ? item.imagewidth + 'px' : '100px'"></div>
</div>
@ -217,37 +227,40 @@
<clr-modal [(clrModalOpen)]="rsModaldescription" [clrModalSize]="'xl'" [clrModalStaticBackdrop]="true">
<div class="modal-body">
<textarea class="form-control" style="width:100%; height: 400px;" readonly>{{rowSelected}}</textarea>
</div></clr-modal>
</div>
</clr-modal>
<!-- // EDIT DATA......... -->
<clr-modal [(clrModalOpen)]="modalEdit" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
<h3 class="modal-title">Update Visa_duration <!--update button -->
<h3 class="modal-title">Update Visa Duration <!--update button -->
</h3>
</h3>
<div class="modal-body" *ngIf="rowSelected.id">
<h2 class="heading">{{rowSelected.id}}</h2>
<!-- button -->
<form >
<div class="clr-row">
<div class="clr-col-sm-12">
<label>Name</label>
<!-- button -->
<form>
<div class="clr-row">
<div class="clr-col-sm-12">
<label>Name</label>
<input class="clr-input" type="text" [(ngModel)]="rowSelected.name" name="name" />
</div>
<div class="clr-col-sm-12">
<label> Description</label>
<textarea cols="10" rows="2"[(ngModel)]="rowSelected.description" name="description " placeholder="Textarea"> </textarea>
<div class="clr-col-sm-12">
<label> Description</label>
<textarea cols="10" rows="2" [(ngModel)]="rowSelected.description" name="description "
placeholder="Textarea"> </textarea>
</div>
<div class="clr-col-sm-12">
<label> Active</label>
<input type="checkbox" name="active" clrToggle [(ngModel)]="rowSelected.active" /> </div>
<div class="clr-col-sm-12">
<label> Active</label>
<input type="checkbox" name="active" clrToggle [(ngModel)]="rowSelected.active" />
</div>
</div>
@ -256,7 +269,7 @@
<!-- form code start -->
<!-- form code start -->
<div *ngIf="checkFormCode">
<h4 style="font-weight: 300;display: inline;">Extension</h4>
<br>
@ -265,22 +278,27 @@
<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" />
<input *ngSwitchCase="'text'" [type]="field.fieldType" name="{{ field.extValue }}"
[(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
<!-- Date Input --> <label *ngSwitchCase="'date'">{{ field.fieldName }}</label>
<input *ngSwitchCase="'date'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
<input *ngSwitchCase="'date'" [type]="field.fieldType" name="{{ field.extValue }}"
[(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
<!-- Textarea --> <label *ngSwitchCase="'textarea'">{{ field.fieldName }}</label>
<textarea *ngSwitchCase="'textarea'" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" col="10" row="2"></textarea>
<textarea *ngSwitchCase="'textarea'" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]"
col="10" row="2"></textarea>
<!-- Checkbox --> <label *ngSwitchCase="'checkbox'">{{ field.fieldName }}</label><br>
<input *ngSwitchCase="'checkbox'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-checkbox" />
<input *ngSwitchCase="'checkbox'" [type]="field.fieldType" name="{{ field.extValue }}"
[(ngModel)]="rowSelected[field.extValue]" class="clr-checkbox" />
</ng-container>
</div>
</div>
</div>
</div>
<!-- form code end --> <div class="modal-footer">
<!-- form code end -->
<div class="modal-footer">
<button type="button" class="btn btn-outline" (click)="modalEdit = false">Cancel</button>
<button type="submit" class="btn btn-primary" (click)="onUpdate(rowSelected.id)">Update</button>
</div>
@ -293,13 +311,13 @@
<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>
<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 Visa_duration
<h3 class="modal-title">Add Visa Duration
@ -308,30 +326,33 @@
<!-- aeroplane icon -->
&nbsp; &nbsp; &nbsp; &nbsp;
<a *ngIf="userrole.includes('ROLE_ADMIN')" style="float: right;" href="javascript:void(0)" role="tooltip" aria-haspopup="true"
class="tooltip tooltip-sm tooltip-bottom-left">
<a id="build_extension" [routerLink]="['../extension/all']" [queryParams]="{ formCode: 'Visa_duration_formCode' }">
<a *ngIf="userrole.includes('ROLE_ADMIN')" style="float: right;" href="javascript:void(0)" role="tooltip"
aria-haspopup="true" class="tooltip tooltip-sm tooltip-bottom-left">
<a id="build_extension" [routerLink]="['../extension/all']"
[queryParams]="{ formCode: 'Visa_duration_formCode' }">
<clr-icon shape="airplane" size="32"></clr-icon>
</a>
<span class="tooltip-content">Form Extension</span>
</a> </h3>
</a>
</h3>
<div class="modal-body">
<form [formGroup]="entryForm" >
<form [formGroup]="entryForm">
<div class="clr-row" style="height: fit-content;">
<div class="clr-col-sm-12">
<div class="clr-col-sm-12">
<label> Name</label>
<input class="clr-input" type="text" formControlName="name" />
</div>
<div class="clr-col-sm-12">
<div class="clr-col-sm-12">
<label> Description</label>
<textarea cols="10" rows="2" formControlName="description" placeholder="Textarea"> </textarea>
</div>
<div class="clr-col-sm-12">
<div class="clr-col-sm-12">
<label> Active</label>
<input type="checkbox" formControlName="active" clrToggle/> </div>
<input type="checkbox" formControlName="active" clrToggle />
</div>
</div>
@ -366,11 +387,12 @@
</div>
</div>
</div>
<!-- form code end --> <div class="modal-footer">
<button type="button" class="btn btn-outline" (click)="modalAdd = false">Cancel</button>
<!-- 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>
</form>
</div>
</clr-modal>
@ -379,4 +401,4 @@
<!-- htmlpopup -->
<!-- htmlpopup -->

View File

@ -1,10 +1,10 @@
<ol class="breadcrumb breadcrumb-arrow font-trirong">
<li><a href="javascript://"> Visa_entry</a></li>
<li><a href="javascript://"> Visa Entry</a></li>
</ol>
<div class="dg-wrapper">
<div class="clr-row">
<div class="clr-col-8">
<h3>Visa_entry </h3>
<h3>Visa Entry </h3>
</div>
<div class="clr-col-4" style="text-align: right;">
<button *ngIf="cardButton" id="add" class="btn btn-primary btn-icon" (click)="changeView()" >
@ -223,7 +223,7 @@
<!-- // EDIT DATA......... -->
<clr-modal [(clrModalOpen)]="modalEdit" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
<h3 class="modal-title">Update Visa_entry <!--update button -->
<h3 class="modal-title">Update Visa Entry <!--update button -->
@ -299,7 +299,7 @@
</clr-modal>
<!-- ADD FORM ..... -->
<clr-modal [(clrModalOpen)]="modalAdd" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
<h3 class="modal-title">Add Visa_entry
<h3 class="modal-title">Add Visa Entry

View File

@ -1,10 +1,10 @@
<ol class="breadcrumb breadcrumb-arrow font-trirong">
<li><a href="javascript://"> Visa_Prices</a></li>
<li><a href="javascript://"> Visa Prices</a></li>
</ol>
<div class="dg-wrapper">
<div class="clr-row">
<div class="clr-col-8">
<h3>Visa_Prices </h3>
<h3>Visa Prices </h3>
</div>
<div class="clr-col-4" style="text-align: right;">
<button *ngIf="cardButton" id="add" class="btn btn-primary btn-icon" (click)="changeView()" >
@ -268,7 +268,7 @@
<!-- // EDIT DATA......... -->
<clr-modal [(clrModalOpen)]="modalEdit" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
<h3 class="modal-title">Update Visa_prices <!--update button -->
<h3 class="modal-title">Update Visa Prices <!--update button -->
@ -408,7 +408,7 @@
</clr-modal>
<!-- ADD FORM ..... -->
<clr-modal [(clrModalOpen)]="modalAdd" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
<h3 class="modal-title">Add Visa_Prices
<h3 class="modal-title">Add Visa Prices

View File

@ -1,10 +1,10 @@
<ol class="breadcrumb breadcrumb-arrow font-trirong">
<li><a href="javascript://"> Visa_Processing</a></li>
<li><a href="javascript://"> Visa Processing</a></li>
</ol>
<div class="dg-wrapper">
<div class="clr-row">
<div class="clr-col-8">
<h3>Visa_Processing </h3>
<h3>Visa Processing </h3>
</div>
<div class="clr-col-4" style="text-align: right;">
<button *ngIf="cardButton" id="add" class="btn btn-primary btn-icon" (click)="changeView()" >
@ -223,7 +223,7 @@
<!-- // EDIT DATA......... -->
<clr-modal [(clrModalOpen)]="modalEdit" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
<h3 class="modal-title">Update Visa_processing <!--update button -->
<h3 class="modal-title">Update Visa Processing <!--update button -->
@ -299,7 +299,7 @@
</clr-modal>
<!-- ADD FORM ..... -->
<clr-modal [(clrModalOpen)]="modalAdd" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
<h3 class="modal-title">Add Visa_Processing
<h3 class="modal-title">Add Visa Processing

View File

@ -1,21 +1,24 @@
<ol class="breadcrumb breadcrumb-arrow font-trirong">
<li><a href="javascript://"> Visa_Status</a></li>
<li><a href="javascript://"> Visa Status</a></li>
</ol>
<div class="dg-wrapper">
<div class="clr-row">
<div class="clr-col-8">
<h3>Visa_Status </h3>
<h3>Visa Status </h3>
</div>
<div class="clr-col-4" style="text-align: right;">
<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>
<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>
</button>
<!-- button -->
<button id="add" class="btn btn-primary" (click)="goToAdd(product)" >
<button id="add" class="btn btn-primary" (click)="goToAdd(product)">
<clr-icon shape="plus"></clr-icon>ADD
</button>
</div></div>
<ng-container *ngIf="!isCardview"> <!-- GET ALL --> <clr-datagrid [clrDgLoading]="loading" [(clrDgSelected)]="selected">
</div>
</div>
<ng-container *ngIf="!isCardview"> <!-- GET ALL --> <clr-datagrid [clrDgLoading]="loading"
[(clrDgSelected)]="selected">
<clr-dg-placeholder>
<ng-template #loadingSpinner>
<clr-spinner>Loading ... </clr-spinner>
@ -23,15 +26,15 @@
<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>
<clr-dg-column [clrDgField]="' description'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Description
<clr-dg-column [clrDgField]="' description'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Description
</ng-container></clr-dg-column>
<clr-dg-column [clrDgField]="' active'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Active
<clr-dg-column [clrDgField]="' active'"> <ng-container *clrDgHideableColumn="{hidden: false}"> Active
</ng-container></clr-dg-column>
@ -43,20 +46,22 @@
<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 (click)="goToReplaceStringdescription (user.description)" style="cursor: pointer; align-items: center;"><clr-icon shape="details"></clr-icon>
</clr-dg-cell>
<clr-dg-cell (click)="goToReplaceStringdescription (user.description)"
style="cursor: pointer; align-items: center;"><clr-icon shape="details"></clr-icon>
</clr-dg-cell>
<clr-dg-cell>{{user. active }}</clr-dg-cell>
<clr-dg-cell>{{user. active }}</clr-dg-cell>
<!-- who column -->
<clr-dg-cell>
<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>
<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>
@ -83,7 +88,7 @@
</clr-dg-pagination>
</clr-dg-footer>
</clr-datagrid> </ng-container>
<ng-template #showInfo>
<ng-template #showInfo>
<div class="alert alert-info" role="alert">
<div class="alert-items">
<div class="alert-item static">
@ -95,16 +100,18 @@
</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 *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-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-body" style="display: grid; grid-template-columns: repeat(13, 1fr); grid-template-rows: repeat(7, 1fr); gap: 5px;">
<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;">
<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"
[style.gridRowEnd]="item.y + item.rows + 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">
<div *ngIf="item.name === 'textField'" class="title-card card-title"
[style.text-align]="item.alignment !== '' ? item.alignment : 'left'"
[style.line-height]="item.textlineheight !== '' ? item.textlineheight : '1'"
@ -114,7 +121,8 @@
[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'))"
[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">
{{beforeText(item.fieldtext)}}
{{ app[transform(item.fieldtext) ] }}
@ -130,7 +138,8 @@
[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'))"
[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">
{{beforeText(item.fieldtext)}}
{{ app[transform(item.fieldtext) ] | date}}
@ -145,7 +154,8 @@
[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'))"
[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">
{{beforeText(item.fieldtext)}}
{{ app[transform(item.fieldtext) ]}}
@ -175,8 +185,7 @@
[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'))"
[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>
</div>
@ -191,7 +200,8 @@
[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.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.height]="item.imagewidth !== '' ? item.imagewidth + 'px' : '100px'"></div>
</div>
@ -210,37 +220,40 @@
<clr-modal [(clrModalOpen)]="rsModaldescription" [clrModalSize]="'xl'" [clrModalStaticBackdrop]="true">
<div class="modal-body">
<textarea class="form-control" style="width:100%; height: 400px;" readonly>{{rowSelected}}</textarea>
</div></clr-modal>
</div>
</clr-modal>
<!-- // EDIT DATA......... -->
<clr-modal [(clrModalOpen)]="modalEdit" [clrModalSize]="'lg'" [clrModalStaticBackdrop]="true">
<h3 class="modal-title">Update Visa_status <!--update button -->
<h3 class="modal-title">Update Visa Status <!--update button -->
</h3>
</h3>
<div class="modal-body" *ngIf="rowSelected.id">
<h2 class="heading">{{rowSelected.id}}</h2>
<!-- button -->
<form >
<div class="clr-row">
<div class="clr-col-sm-12">
<label>Name</label>
<!-- button -->
<form>
<div class="clr-row">
<div class="clr-col-sm-12">
<label>Name</label>
<input class="clr-input" type="text" [(ngModel)]="rowSelected.name" name="name" />
</div>
<div class="clr-col-sm-12">
<label> Description</label>
<textarea cols="10" rows="2"[(ngModel)]="rowSelected.description" name="description " placeholder="Textarea"> </textarea>
<div class="clr-col-sm-12">
<label> Description</label>
<textarea cols="10" rows="2" [(ngModel)]="rowSelected.description" name="description "
placeholder="Textarea"> </textarea>
</div>
<div class="clr-col-sm-12">
<label> Active</label>
<input type="checkbox" name="active" clrToggle [(ngModel)]="rowSelected.active" /> </div>
<div class="clr-col-sm-12">
<label> Active</label>
<input type="checkbox" name="active" clrToggle [(ngModel)]="rowSelected.active" />
</div>
</div>
@ -249,7 +262,7 @@
<!-- form code start -->
<!-- form code start -->
<div *ngIf="checkFormCode">
<h4 style="font-weight: 300;display: inline;">Extension</h4>
<br>
@ -258,22 +271,27 @@
<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" />
<input *ngSwitchCase="'text'" [type]="field.fieldType" name="{{ field.extValue }}"
[(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
<!-- Date Input --> <label *ngSwitchCase="'date'">{{ field.fieldName }}</label>
<input *ngSwitchCase="'date'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
<input *ngSwitchCase="'date'" [type]="field.fieldType" name="{{ field.extValue }}"
[(ngModel)]="rowSelected[field.extValue]" class="clr-input" />
<!-- Textarea --> <label *ngSwitchCase="'textarea'">{{ field.fieldName }}</label>
<textarea *ngSwitchCase="'textarea'" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" col="10" row="2"></textarea>
<textarea *ngSwitchCase="'textarea'" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]"
col="10" row="2"></textarea>
<!-- Checkbox --> <label *ngSwitchCase="'checkbox'">{{ field.fieldName }}</label><br>
<input *ngSwitchCase="'checkbox'" [type]="field.fieldType" name="{{ field.extValue }}" [(ngModel)]="rowSelected[field.extValue]" class="clr-checkbox" />
<input *ngSwitchCase="'checkbox'" [type]="field.fieldType" name="{{ field.extValue }}"
[(ngModel)]="rowSelected[field.extValue]" class="clr-checkbox" />
</ng-container>
</div>
</div>
</div>
</div>
<!-- form code end --> <div class="modal-footer">
<!-- form code end -->
<div class="modal-footer">
<button type="button" class="btn btn-outline" (click)="modalEdit = false">Cancel</button>
<button type="submit" class="btn btn-primary" (click)="onUpdate(rowSelected.id)">Update</button>
</div>
@ -286,13 +304,13 @@
<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>
<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 Visa_Status
<h3 class="modal-title">Add Visa Status
@ -301,30 +319,32 @@
<!-- aeroplane icon -->
&nbsp; &nbsp; &nbsp; &nbsp;
<a *ngIf="userrole.includes('ROLE_ADMIN')" style="float: right;" href="javascript:void(0)" role="tooltip" aria-haspopup="true"
class="tooltip tooltip-sm tooltip-bottom-left">
<a *ngIf="userrole.includes('ROLE_ADMIN')" style="float: right;" href="javascript:void(0)" role="tooltip"
aria-haspopup="true" class="tooltip tooltip-sm tooltip-bottom-left">
<a id="build_extension" [routerLink]="['../extension/all']" [queryParams]="{ formCode: 'Visa_status_formCode' }">
<clr-icon shape="airplane" size="32"></clr-icon>
</a>
<span class="tooltip-content">Form Extension</span>
</a> </h3>
</a>
</h3>
<div class="modal-body">
<form [formGroup]="entryForm" >
<form [formGroup]="entryForm">
<div class="clr-row" style="height: fit-content;">
<div class="clr-col-sm-12">
<div class="clr-col-sm-12">
<label> Name</label>
<input class="clr-input" type="text" formControlName="name" />
</div>
<div class="clr-col-sm-12">
<div class="clr-col-sm-12">
<label> Description</label>
<textarea cols="10" rows="2" formControlName="description" placeholder="Textarea"> </textarea>
</div>
<div class="clr-col-sm-12">
<div class="clr-col-sm-12">
<label> Active</label>
<input type="checkbox" formControlName="active" clrToggle/> </div>
<input type="checkbox" formControlName="active" clrToggle />
</div>
</div>
@ -359,11 +379,12 @@
</div>
</div>
</div>
<!-- form code end --> <div class="modal-footer">
<button type="button" class="btn btn-outline" (click)="modalAdd = false">Cancel</button>
<!-- 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>
</form>
</div>
</clr-modal>
@ -372,4 +393,4 @@
<!-- htmlpopup -->
<!-- htmlpopup -->

View File

@ -10,7 +10,8 @@ export const environment = {
// changeblelocal configs url
captchaSiteKey: '6LfrdSUpAAAAALkYDmnvdX3GLLCArgPWNHfXasjP',
backport:'31701/visaproject36808/back',backendUrl:'/visaproject36808/back',
// backport:'31701/visaproject36808/back',
backendUrl:'http://localhost:9292/back',
};