Skip to content

Commit e6dddd5

Browse files
Merge pull request #2842 from JaySoni1/WEB-438-improve-visibility-and-placement-of-edit-and-delete-buttons-on-product-mix-page
WEB-438 Improve visibility and placement of edit and delete buttons on product mix page
2 parents 47db5c5 + 8c13238 commit e6dddd5

File tree

2 files changed

+62
-23
lines changed

2 files changed

+62
-23
lines changed
Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
1-
<div class="container m-b-20 layout-row layout-lt-md-column layout-align-end gap-20px">
2-
<button mat-raised-button color="primary" [routerLink]="['edit']" *mifosxHasPermission="'UPDATE_PRODUCTMIX'">
3-
<fa-icon icon="edit" class="m-r-10"></fa-icon>
4-
{{ 'labels.buttons.Edit' | translate }}
5-
</button>
6-
<button mat-raised-button color="warn" (click)="delete()" *mifosxHasPermission="'DELETE_PRODUCTMIX'">
7-
<fa-icon icon="trash" class="m-r-10"></fa-icon>
8-
{{ 'labels.buttons.Delete' | translate }}
9-
</button>
10-
</div>
11-
12-
<div class="container">
1+
<div class="product-mix-row">
132
<div class="mat-elevation-z8 inline-table">
143
<table mat-table [dataSource]="allowedProductsDatasource" matSort>
154
<ng-container matColumnDef="name">
@@ -25,18 +14,31 @@
2514

2615
<mat-paginator #allowed [pageSizeOptions]="[10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
2716
</div>
17+
<div class="restricted-products-col">
18+
<div class="action-buttons">
19+
<button mat-raised-button color="primary" [routerLink]="['edit']" *mifosxHasPermission="'UPDATE_PRODUCTMIX'">
20+
<fa-icon icon="edit" class="m-r-10"></fa-icon>
21+
{{ 'labels.buttons.Edit' | translate }}
22+
</button>
23+
<button mat-raised-button color="warn" (click)="delete()" *mifosxHasPermission="'DELETE_PRODUCTMIX'">
24+
<fa-icon icon="trash" class="m-r-10"></fa-icon>
25+
{{ 'labels.buttons.Delete' | translate }}
26+
</button>
27+
</div>
28+
<div class="mat-elevation-z8 inline-table restricted-products-box">
29+
<table mat-table [dataSource]="restrictedProductsDatasource" matSort>
30+
<ng-container matColumnDef="name">
31+
<th mat-header-cell *matHeaderCellDef mat-sort-header>
32+
{{ 'labels.inputs.Restricted products' | translate }}
33+
</th>
34+
<td mat-cell *matCellDef="let product">{{ product.name }}</td>
35+
</ng-container>
2836

29-
<div class="mat-elevation-z8 inline-table">
30-
<table mat-table [dataSource]="restrictedProductsDatasource" matSort>
31-
<ng-container matColumnDef="name">
32-
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.Restricted products' | translate }}</th>
33-
<td mat-cell *matCellDef="let product">{{ product.name }}</td>
34-
</ng-container>
35-
36-
<tr mat-header-row *matHeaderRowDef="restrictedProductsDisplayedColumns"></tr>
37-
<tr mat-row *matRowDef="let row; columns: restrictedProductsDisplayedColumns"></tr>
38-
</table>
37+
<tr mat-header-row *matHeaderRowDef="restrictedProductsDisplayedColumns"></tr>
38+
<tr mat-row *matRowDef="let row; columns: restrictedProductsDisplayedColumns"></tr>
39+
</table>
3940

40-
<mat-paginator #restricted [pageSizeOptions]="[10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
41+
<mat-paginator #restricted [pageSizeOptions]="[10, 25, 50, 100]" showFirstLastButtons></mat-paginator>
42+
</div>
4143
</div>
4244
</div>

src/app/products/products-mix/view-product-mix/view-product-mix.component.scss

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,40 @@
1+
.allowed-products-align {
2+
margin-top: 19px;
3+
}
4+
5+
.product-mix-row {
6+
display: flex;
7+
align-items: flex-start;
8+
gap: 32px;
9+
justify-content: center;
10+
width: 100%;
11+
}
12+
13+
.restricted-products-col {
14+
display: flex;
15+
flex-direction: column;
16+
align-items: flex-end;
17+
min-width: 340px;
18+
justify-content: flex-start;
19+
}
20+
21+
.action-buttons-wrapper {
22+
width: 45%;
23+
margin-left: auto;
24+
margin-bottom: 8px;
25+
}
26+
27+
.restricted-products-box {
28+
position: relative;
29+
}
30+
31+
.action-buttons {
32+
display: flex;
33+
justify-content: flex-end;
34+
gap: 12px;
35+
margin-bottom: 16px;
36+
}
37+
138
.container {
239
display: flex;
340
align-items: flex-start;

0 commit comments

Comments
 (0)