Merge branch 'master' of https://bitbucket.org/sriramv18/sparqsineedge
This commit is contained in:
commit
972c7b4b7b
@ -5,13 +5,15 @@
|
|||||||
</form>
|
</form>
|
||||||
<div *ngIf="listOfBranch.length > 0">
|
<div *ngIf="listOfBranch.length > 0">
|
||||||
<mat-list role="list" class="inlist">
|
<mat-list role="list" class="inlist">
|
||||||
<mat-list-item role="listitem" *ngFor="let branch of listOfBranch; let i = index;" class="list-item" [ngStyle]="{ 'border-color': i === currentElement ? '#f44336' : 'gray'}">
|
<ng-container *ngFor="let branch of listOfBranch; let i = index;">
|
||||||
<label style="width: 80%" [hidden]="currentElement === i">{{branch.branch_name}}</label>
|
<mat-list-item role="listitem" *ngIf="branch.isactive == 1" class="list-item" [ngStyle]="{ 'border-color': i === currentElement ? '#f44336' : 'gray'}">
|
||||||
<input *ngIf="currentElement === i" matInput placeholder="Add Branch" [(ngModel)]="branch.branch_name">
|
<label style="width: 80%" [hidden]="currentElement === i">{{branch.branch_name}}</label>
|
||||||
<span (click)="editItem(i)" [hidden]="currentElement === i"><mat-icon>edit</mat-icon></span>
|
<input *ngIf="currentElement === i" matInput placeholder="Add Branch" [(ngModel)]="branch.branch_name">
|
||||||
<span (click)="editItem(-1)" *ngIf="currentElement === i"><mat-icon>check</mat-icon></span>
|
<span (click)="editItem(i)" [hidden]="currentElement === i"><mat-icon>edit</mat-icon></span>
|
||||||
<span (click)="deleteItem(i)"><mat-icon>delete</mat-icon></span>
|
<span (click)="editItem(-1)" *ngIf="currentElement === i"><mat-icon>check</mat-icon></span>
|
||||||
</mat-list-item>
|
<span (click)="deleteItem(branch, i)"><mat-icon>delete</mat-icon></span>
|
||||||
|
</mat-list-item>
|
||||||
|
</ng-container>
|
||||||
</mat-list>
|
</mat-list>
|
||||||
|
|
||||||
<div class="row" style="text-align:right;">
|
<div class="row" style="text-align:right;">
|
||||||
|
|||||||
@ -90,8 +90,12 @@ export class EntityBranchAddComponent implements OnInit {
|
|||||||
this.currentElement = i;
|
this.currentElement = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteItem(i): void {
|
deleteItem(obj, i): void {
|
||||||
this.listOfBranch.splice(i, 1);
|
if (obj.entity_lender_branch_id !== null) {
|
||||||
|
obj.isactive = 0;
|
||||||
|
} else {
|
||||||
|
this.listOfBranch.splice(i, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
saveBranch(): void {
|
saveBranch(): void {
|
||||||
@ -112,7 +116,6 @@ export class EntityBranchAddComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// "records": [
|
// "records": [
|
||||||
// {
|
// {
|
||||||
// "entity_lender_branch_id": null,
|
// "entity_lender_branch_id": null,
|
||||||
|
|||||||
@ -240,7 +240,7 @@
|
|||||||
</app-entity-edit-tat>
|
</app-entity-edit-tat>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
<mat-tab label="Branch">
|
<mat-tab *ngIf="localEntityType == 2" label="Branch">
|
||||||
<ng-template matTabContent>
|
<ng-template matTabContent>
|
||||||
<app-entity-branch-add [entityId]="entity_id">
|
<app-entity-branch-add [entityId]="entity_id">
|
||||||
</app-entity-branch-add>
|
</app-entity-branch-add>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user