datamanagemnet
This commit is contained in:
parent
01a0a2f959
commit
006f503e27
@ -24,7 +24,8 @@
|
||||
</div>
|
||||
<clr-datagrid [clrDgLoading]="loading">
|
||||
<clr-dg-placeholder><ng-template #loadingSpinner><clr-spinner>Loading ... </clr-spinner></ng-template>
|
||||
<div *ngIf="error;else loadingSpinner">{{error}}</div></clr-dg-placeholder>
|
||||
<div *ngIf="error;else loadingSpinner">{{error}}</div>
|
||||
</clr-dg-placeholder>
|
||||
|
||||
<clr-dg-column [clrDgField]="''"><ng-container *clrDgHideableColumn="{hidden: false}">
|
||||
Go To
|
||||
@ -44,12 +45,14 @@
|
||||
Action
|
||||
</ng-container></clr-dg-column>
|
||||
<clr-dg-row *clrDgItems="let user of data?.reverse()?.slice();" [clrDgItem]="user">
|
||||
<clr-dg-cell><span class="label label-light-blue" style="display: inline;margin-left: 10px; cursor: pointer;" (click)="work(user.id)">Workflow</span></clr-dg-cell>
|
||||
<clr-dg-cell>{{user.entityName}}</clr-dg-cell>
|
||||
<clr-dg-cell><span class="label label-light-blue" style="display: inline;margin-left: 10px; cursor: pointer;"
|
||||
(click)="work(user.id)">Workflow</span></clr-dg-cell>
|
||||
<clr-dg-cell>{{user.entity_name}}</clr-dg-cell>
|
||||
<clr-dg-cell>{{user.file_name}}</clr-dg-cell>
|
||||
<clr-dg-cell>
|
||||
<a href="javascript:void(0)" role="tooltip" aria-haspopup="true" class="tooltip tooltip-sm tooltip-top-left">
|
||||
<span style="cursor: pointer;"><clr-icon shape="trash" (click)="onDelete(user)" class="red is-error" style="color: red;"></clr-icon></span>
|
||||
<span style="cursor: pointer;"><clr-icon shape="trash" (click)="onDelete(user)" class="red is-error"
|
||||
style="color: red;"></clr-icon></span>
|
||||
<span class="tooltip-content">Delete</span>
|
||||
</a>
|
||||
</clr-dg-cell>
|
||||
|
||||
@ -51,7 +51,7 @@ export class DatamanagementComponent implements OnInit {
|
||||
}
|
||||
getall() {
|
||||
this.datamservice.getall().subscribe((data) => {
|
||||
console.log(data);
|
||||
console.log('data managemnt ', data);
|
||||
this.data = data;
|
||||
if (this.data.length == 0) {
|
||||
this.error = "No data Available";
|
||||
@ -139,8 +139,7 @@ this.modalAdd=false;
|
||||
this.modaldelete = true;
|
||||
}
|
||||
|
||||
delete(id)
|
||||
{
|
||||
delete(id) {
|
||||
this.modaldelete = false;
|
||||
console.log("in delete " + id);
|
||||
this.datamservice.delete(id).subscribe(
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
<ol class="breadcrumb breadcrumb-arrow font-trirong">
|
||||
<li><a href="javascript://" [routerLink]="['/']">Admin</a></li>
|
||||
<li><a href="javascript://">Data Import </a></li>
|
||||
@ -13,8 +12,10 @@
|
||||
<span class="spacer"></span>
|
||||
<button class="btn btn-sm btn-primary" (click)="reset()">Reset</button>
|
||||
|
||||
<button class="btn btn-sm btn-primary" (click)="changeToHorizonTal()" *ngIf="layout.direction === 'vertical'">HorizonTal Layout</button>
|
||||
<button class="btn btn-sm btn-primary" (click)="changeToVertical()" *ngIf="layout.direction === 'horizontal'">Vertical Layout</button>
|
||||
<button class="btn btn-sm btn-primary" (click)="changeToHorizonTal()"
|
||||
*ngIf="layout.direction === 'vertical'">HorizonTal Layout</button>
|
||||
<button class="btn btn-sm btn-primary" (click)="changeToVertical()" *ngIf="layout.direction === 'horizontal'">Vertical
|
||||
Layout</button>
|
||||
|
||||
</div>
|
||||
|
||||
@ -126,8 +127,10 @@
|
||||
<div class="button">
|
||||
<!-- <button type="submit" class="btn btn-primary" [disabled]="!contactForm.valid">Submit</button> -->
|
||||
|
||||
<button type="button" class="btn btn-primary"(click)=" this.timelineStyle.step0 ={ state: 'success', open: false };this.timelineStyle.step1 ={ state: 'current', open: true }; this.getColumns(tableName); getColumnforstep1();" >Complete</button>
|
||||
<button type="button" class="btn btn-primary" (click)=" this.timelineStyle.step0 ={state:'current',open:false};this.timelineStyle.step1 ={state:'not-started',open:true}">Next</button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
(click)=" this.timelineStyle.step0 ={ state: 'success', open: false };this.timelineStyle.step1 ={ state: 'current', open: true }; this.getColumns(tableName); getColumnforstep1();">Complete</button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
(click)=" this.timelineStyle.step0 ={state:'current',open:false};this.timelineStyle.step1 ={state:'not-started',open:true}">Next</button>
|
||||
|
||||
</div>
|
||||
|
||||
@ -138,7 +141,8 @@
|
||||
|
||||
</div>
|
||||
|
||||
</div></div>
|
||||
</div>
|
||||
</div>
|
||||
<!--STEP 1-->
|
||||
<div class="card" *ngIf="timelineStyle.step1.open">
|
||||
<div class="card-header">
|
||||
@ -159,10 +163,12 @@
|
||||
<tbody>
|
||||
<tr *ngFor="let data of columnJson; let i = index">
|
||||
<td class="left">
|
||||
<input type="text" [(ngModel)]="data.sheetName" [ngModelOptions]="{standalone: true}" name="sheetName" class="clr-input" readonly/>
|
||||
<input type="text" [(ngModel)]="data.sheetName" [ngModelOptions]="{standalone: true}"
|
||||
name="sheetName" class="clr-input" readonly />
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" [(ngModel)]="data.TableName" [ngModelOptions]="{standalone: true}" name="TableName" class="clr-input"/>
|
||||
<input type="text" [(ngModel)]="data.TableName" [ngModelOptions]="{standalone: true}"
|
||||
name="TableName" class="clr-input" />
|
||||
<!-- <select [(ngModel)]="data.TableName" [ngModelOptions]="{standalone: true}" name="TableName">
|
||||
<option *ngFor="let data of headerData" [value]="data">{{data}}</option>
|
||||
</select> -->
|
||||
@ -174,12 +180,16 @@
|
||||
</div>
|
||||
<!-- <button type="submit" class="btn btn-primary" >Submit</button> -->
|
||||
|
||||
<button type="button" class="btn btn-primary" (click)="this.timelineStyle.step1 ={ state: 'success', open: false };this.timelineStyle.step2 ={ state: 'current', open: true }; this.getHeadersById(id,sheetNames[0]); this.rulechecking()">Complete</button>
|
||||
<button class="btn btn-primary-outline" (click)="this.timelineStyle.step0 ={ state: 'success', open: true };this.timelineStyle.step1 ={ state: 'not-started', open: false };">Back</button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
(click)="this.timelineStyle.step1 ={ state: 'success', open: false };this.timelineStyle.step2 ={ state: 'current', open: true }; this.getHeadersById(id,sheetNames[0]); this.rulechecking()">Complete</button>
|
||||
<button class="btn btn-primary-outline"
|
||||
(click)="this.timelineStyle.step0 ={ state: 'success', open: true };this.timelineStyle.step1 ={ state: 'not-started', open: false };">Back</button>
|
||||
|
||||
<button type="button" class="btn btn-primary" (click)="this.timelineStyle.step1 ={state:'not-started',open:false};this.timelineStyle.step2 ={state:'not-started',open:true}">Next</button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
(click)="this.timelineStyle.step1 ={state:'not-started',open:false};this.timelineStyle.step2 ={state:'not-started',open:true}">Next</button>
|
||||
|
||||
</div></form>
|
||||
</div>
|
||||
</form>
|
||||
<div class="container">
|
||||
<div class="clr-col-6">
|
||||
|
||||
@ -188,7 +198,8 @@
|
||||
<div class="container">
|
||||
|
||||
</div>
|
||||
</div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card" *ngIf="timelineStyle.step2.open">
|
||||
@ -206,31 +217,42 @@
|
||||
<textarea type="text" style="height:150px; background-color:#d6d6d6;" readonly></textarea>
|
||||
</div>
|
||||
<div *ngIf="transform">
|
||||
<label for="sequence" style="font-weight: bold;">Mapper Fields <span class="label label-light-green p7 lbutton" (click)="goFromMapper()">OPEN</span><span class="label label-light-green p7 lbutton" (click)="transReset()">RESET</span></label>
|
||||
<textarea type="text" name="mapperText" style="height:150px;" [(ngModel)]="mapperText" readonly></textarea>
|
||||
<label for="sequence" style="font-weight: bold;">Mapper Fields <span
|
||||
class="label label-light-green p7 lbutton" (click)="goFromMapper()">OPEN</span><span
|
||||
class="label label-light-green p7 lbutton" (click)="transReset()">RESET</span></label>
|
||||
<textarea type="text" name="mapperText" style="height:150px;" [(ngModel)]="mapperText"
|
||||
readonly></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="horizontal1 clr-col-6">
|
||||
<div *ngIf="checkRule"><!--*ngIf="checkRule"-->
|
||||
<div style="text-align: right; width: 100px;"> <span style="cursor: pointer;" class="label label-light-green p7 lbutton" (click)="checkRules()">Add Rule line</span></div>
|
||||
<div style="text-align: right; width: 100px;"> <span style="cursor: pointer;"
|
||||
class="label label-light-green p7 lbutton" (click)="checkRules()">Add Rule line</span></div>
|
||||
<!-- <label for="sequence" style="font-weight: bold; cursor: pointer;" (click)="goFromMapper()">Mapper Fields (Transform) <clr-icon shape="pop-out"></clr-icon></label> -->
|
||||
<textarea type="text" style="height:150px; background-color:#d6d6d6;" readonly></textarea>
|
||||
</div>
|
||||
<div *ngIf="Rule">
|
||||
<label for="sequence" style="font-weight: bold;"><span class="label label-light-green p7 lbutton" (click)="goFromRule()">OPEN</span><span class="label label-light-green p7 lbutton" (click)="resetRule()">RESET</span></label>
|
||||
<textarea type="text" name="RuleData" style="height:150px;" [(ngModel)]="RuleData" readonly></textarea>
|
||||
<label for="sequence" style="font-weight: bold;"><span class="label label-light-green p7 lbutton"
|
||||
(click)="goFromRule()">OPEN</span><span class="label label-light-green p7 lbutton"
|
||||
(click)="resetRule()">RESET</span></label>
|
||||
<textarea type="text" name="RuleData" style="height:150px;" [(ngModel)]="RuleData"
|
||||
readonly></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <button type="submit" class="btn btn-primary" >Submit</button> -->
|
||||
|
||||
<button type="button" class="btn btn-primary" (click)="this.timelineStyle.step2 ={ state: 'success', open: false };this.timelineStyle.step3 ={ state: 'current', open: true }; ">Complete</button>
|
||||
<button class="btn btn-primary-outline" (click)="this.timelineStyle.step1 ={ state: 'success', open: true };this.timelineStyle.step2 ={ state: 'not-started', open: false };">Back</button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
(click)="this.timelineStyle.step2 ={ state: 'success', open: false };this.timelineStyle.step3 ={ state: 'current', open: true }; ">Complete</button>
|
||||
<button class="btn btn-primary-outline"
|
||||
(click)="this.timelineStyle.step1 ={ state: 'success', open: true };this.timelineStyle.step2 ={ state: 'not-started', open: false };">Back</button>
|
||||
|
||||
<button type="button" class="btn btn-primary" (click)="this.timelineStyle.step2 ={state:'not-started',open:false};this.timelineStyle.step3 ={state:'not-started',open:true}">Next</button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
(click)="this.timelineStyle.step2 ={state:'not-started',open:false};this.timelineStyle.step3 ={state:'not-started',open:true}">Next</button>
|
||||
|
||||
</div></form>
|
||||
</div>
|
||||
</form>
|
||||
<div class="container">
|
||||
<div class="clr-col-6">
|
||||
|
||||
@ -239,7 +261,9 @@
|
||||
<div class="container">
|
||||
|
||||
</div>
|
||||
</div></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!--STEP 2-->
|
||||
<div class="card" *ngIf="timelineStyle.step3.open">
|
||||
<div class="card-header">
|
||||
@ -295,11 +319,19 @@
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<button type="button" class="btn btn-primary"(click)="this.timelineStyle.step3 ={ state: 'success', open: false };this.timelineStyle.step4 ={ state: 'current', open: true }; this.downloadExcel(id);">Complete</button>
|
||||
<button class="btn btn-primary-outline" (click)="this.timelineStyle.step2 ={ state: 'success', open: true };this.timelineStyle.step3 ={ state: 'not-started', open: false };">Back</button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
(click)="this.timelineStyle.step3 ={ state: 'success', open: false };this.timelineStyle.step4 ={ state: 'current', open: true }; this.downloadExcel(id);">Complete</button>
|
||||
<button class="btn btn-primary-outline"
|
||||
(click)="this.timelineStyle.step2 ={ state: 'success', open: true };this.timelineStyle.step3 ={ state: 'not-started', open: false };">Back</button>
|
||||
|
||||
<button type="button" class="btn btn-primary"
|
||||
(click)="this.timelineStyle.step3 ={state:'not-started',open:false};this.timelineStyle.step4 ={state:'not-started',open:true}">Next</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="button" class="btn btn-primary" (click)="this.timelineStyle.step3 ={state:'not-started',open:false};this.timelineStyle.step4 ={state:'not-started',open:true}">Next</button>
|
||||
</div></div></div></div></div>
|
||||
<!--STEP 3-->
|
||||
<div class="card" *ngIf="timelineStyle.step4.open;">
|
||||
<div class="card-header">
|
||||
@ -307,20 +339,29 @@
|
||||
<div class="clr-row">
|
||||
</div>
|
||||
<div class="container">
|
||||
<button type="button" class="btn btn-primary"(click)="this.timelineStyle.step4 ={ state: 'success', open: false };this.timelineStyle.step5 ={ state: 'current', open: true }; ">Complete</button>
|
||||
<button class="btn btn-primary-outline" (click)="this.timelineStyle.step3 ={ state: 'success', open: true };this.timelineStyle.step4 ={ state: 'not-started', open: false };">Back</button>
|
||||
<button type="button" class="btn btn-primary"
|
||||
(click)="this.timelineStyle.step4 ={ state: 'success', open: false };this.timelineStyle.step5 ={ state: 'current', open: true }; ">Complete</button>
|
||||
<button class="btn btn-primary-outline"
|
||||
(click)="this.timelineStyle.step3 ={ state: 'success', open: true };this.timelineStyle.step4 ={ state: 'not-started', open: false };">Back</button>
|
||||
|
||||
<button type="button" class="btn btn-primary" (click)="this.timelineStyle.step4 ={state:'not-started',open:false};this.timelineStyle.step5 ={state:'not-started',open:true}" >Next</button>
|
||||
</div></div></div>
|
||||
<button type="button" class="btn btn-primary"
|
||||
(click)="this.timelineStyle.step4 ={state:'not-started',open:false};this.timelineStyle.step5 ={state:'not-started',open:true}">Next</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--STEP 4-->
|
||||
<div class="card" *ngIf="timelineStyle.step5.open">
|
||||
<div class="card-header">
|
||||
<h3 style="text-align: center;" *ngIf="!appToUpdate">File is Downloaded</h3>
|
||||
<div class="container">
|
||||
<button class="btn btn-primary-outline" (click)="this.timelineStyle.step4 ={ state: 'current', open: true };this.timelineStyle.step5 ={ state: 'not-started', open: false };">Back</button>
|
||||
<button class="btn btn-primary" (click)="this.timelineStyle.step5 ={ state: 'success', open: false }; this.back()"> Finish</button>
|
||||
<button class="btn btn-primary-outline"
|
||||
(click)="this.timelineStyle.step4 ={ state: 'current', open: true };this.timelineStyle.step5 ={ state: 'not-started', open: false };">Back</button>
|
||||
<button class="btn btn-primary"
|
||||
(click)="this.timelineStyle.step5 ={ state: 'success', open: false }; this.back()"> Finish</button>
|
||||
|
||||
</div></div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
@ -347,7 +388,8 @@
|
||||
<tbody>
|
||||
<tr *ngFor="let data of JsonHeader[selectedSheetName]; let i = index">
|
||||
<td class="left">
|
||||
<input type="text" [(ngModel)]="data.headerName" [ngModelOptions]="{standalone: true}" name="headerName" class="clr-input" readonly/>
|
||||
<input type="text" [(ngModel)]="data.headerName" [ngModelOptions]="{standalone: true}"
|
||||
name="headerName" class="clr-input" readonly />
|
||||
</td>
|
||||
<td>
|
||||
<!-- <input type="text" [(ngModel)]="data.value" [ngModelOptions]="{standalone: true}" name="value" class="clr-input"/> -->
|
||||
@ -396,31 +438,40 @@
|
||||
<tbody>
|
||||
<tr *ngFor="let data of RuleHeader; let i = index">
|
||||
<td>
|
||||
<input type="text" [(ngModel)]="data.rulename" [ngModelOptions]="{standalone: true}" name="rulename" class="clr-input">
|
||||
<input type="text" [(ngModel)]="data.rulename" [ngModelOptions]="{standalone: true}" name="rulename"
|
||||
class="clr-input">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" [(ngModel)]="data.fromsheet" [ngModelOptions]="{standalone: true}" name="fromsheet" class="clr-input">
|
||||
<input type="text" [(ngModel)]="data.fromsheet" [ngModelOptions]="{standalone: true}"
|
||||
name="fromsheet" class="clr-input">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" [(ngModel)]="data.fromColumn" [ngModelOptions]="{standalone: true}" name="fromcolomn" class="clr-input">
|
||||
<input type="text" [(ngModel)]="data.fromColumn" [ngModelOptions]="{standalone: true}"
|
||||
name="fromcolomn" class="clr-input">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" [(ngModel)]="data.validationTable" [ngModelOptions]="{standalone: true}" name="validationtable" class="clr-input">
|
||||
<input type="text" [(ngModel)]="data.validationTable" [ngModelOptions]="{standalone: true}"
|
||||
name="validationtable" class="clr-input">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" [(ngModel)]="data.checkColumn" [ngModelOptions]="{standalone: true}" name="checkcolumn" class="clr-input">
|
||||
<input type="text" [(ngModel)]="data.checkColumn" [ngModelOptions]="{standalone: true}"
|
||||
name="checkcolumn" class="clr-input">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" [(ngModel)]="data.useColumn" [ngModelOptions]="{standalone: true}" name="useColumn" class="clr-input">
|
||||
<input type="text" [(ngModel)]="data.useColumn" [ngModelOptions]="{standalone: true}"
|
||||
name="useColumn" class="clr-input">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" [(ngModel)]="data.replacementTable" [ngModelOptions]="{standalone: true}" name="replacementTable" class="clr-input">
|
||||
<input type="text" [(ngModel)]="data.replacementTable" [ngModelOptions]="{standalone: true}"
|
||||
name="replacementTable" class="clr-input">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" [(ngModel)]="data.replacementcolumn" [ngModelOptions]="{standalone: true}" name="replacementcolumn" class="clr-input">
|
||||
<input type="text" [(ngModel)]="data.replacementcolumn" [ngModelOptions]="{standalone: true}"
|
||||
name="replacementcolumn" class="clr-input">
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" [(ngModel)]="data.errormsg" [ngModelOptions]="{standalone: true}" name="errormsg" class="clr-input">
|
||||
<input type="text" [(ngModel)]="data.errormsg" [ngModelOptions]="{standalone: true}" name="errormsg"
|
||||
class="clr-input">
|
||||
</td>
|
||||
<td style="width:40px;">
|
||||
<a (click)="deleteRow(i)">
|
||||
@ -444,6 +495,3 @@
|
||||
</form>
|
||||
</div>
|
||||
</clr-modal>
|
||||
|
||||
|
||||
|
||||
|
||||
@ -264,13 +264,10 @@ this.rows = [this.rows]
|
||||
var j;
|
||||
var cart = [];
|
||||
|
||||
for(var i = 0; i < data.length; i++)
|
||||
{
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
var columnsIn = data[i];
|
||||
if(i==1)
|
||||
{
|
||||
for(var key in columnsIn)
|
||||
{
|
||||
if (i == 1) {
|
||||
for (var key in columnsIn) {
|
||||
j = { prop: key, name: key };
|
||||
cart.push(j)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user