Merge pull request #2670 from shubhamkumar9199/fix/view-gl-account-html
WEB-319 Fix View GL Account Component: HTML Structure & SCSS Formatting
This commit is contained in:
+35
-46
@@ -1,4 +1,4 @@
|
|||||||
<div class="layout-row align-end gap-2px responsive-column container m-b-20">
|
<div class="container m-b-20 layout-row layout-lt-md-column align-end gap-2percent">
|
||||||
<span *mifosxHasPermission="'CREATE_GLACCOUNT'">
|
<span *mifosxHasPermission="'CREATE_GLACCOUNT'">
|
||||||
<button
|
<button
|
||||||
mat-raised-button
|
mat-raised-button
|
||||||
@@ -11,90 +11,79 @@
|
|||||||
{{ 'labels.buttons.Subledger Account' | translate }}
|
{{ 'labels.buttons.Subledger Account' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span *mifosxHasPermission="'UPDATE_GLACCOUNT'">
|
<span *mifosxHasPermission="'UPDATE_GLACCOUNT'">
|
||||||
<button mat-raised-button color="primary" [routerLink]="['edit']">
|
<button mat-raised-button color="primary" [routerLink]="['edit']">
|
||||||
<fa-icon icon="edit" class="m-r-10"></fa-icon>
|
<fa-icon icon="edit" class="m-r-10"></fa-icon>
|
||||||
{{ 'labels.buttons.Edit' | translate }}
|
{{ 'labels.buttons.Edit' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span *mifosxHasPermission="'UPDATE_GLACCOUNT'">
|
<span *mifosxHasPermission="'UPDATE_GLACCOUNT'">
|
||||||
<button mat-raised-button color="warn" *ngIf="!glAccount.disabled" (click)="changeGlAccountState()">
|
<button mat-raised-button color="warn" *ngIf="!glAccount.disabled" (click)="changeGlAccountState()">
|
||||||
<fa-icon icon="lock" class="m-r-10"></fa-icon>
|
<fa-icon icon="lock" class="m-r-10"></fa-icon>
|
||||||
{{ 'labels.buttons.Disable' | translate }}
|
{{ 'labels.buttons.Disable' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span *mifosxHasPermission="'UPDATE_GLACCOUNT'">
|
<span *mifosxHasPermission="'UPDATE_GLACCOUNT'">
|
||||||
<button mat-raised-button color="accent" *ngIf="glAccount.disabled" (click)="changeGlAccountState()">
|
<button mat-raised-button color="accent" *ngIf="glAccount.disabled" (click)="changeGlAccountState()">
|
||||||
<fa-icon icon="lock-open" class="m-r-10"></fa-icon>
|
<fa-icon icon="lock-open" class="m-r-10"></fa-icon>
|
||||||
{{ 'labels.buttons.Enable' | translate }}
|
{{ 'labels.buttons.Enable' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<button mat-raised-button color="warn" (click)="deleteGlAccount()" *mifosxHasPermission="'DELETE_GLACCOUNT'">
|
<button mat-raised-button color="warn" (click)="deleteGlAccount()" *mifosxHasPermission="'DELETE_GLACCOUNT'">
|
||||||
<fa-icon icon="trash" class="m-r-10"></fa-icon>
|
<fa-icon icon="trash" class="m-r-10"></fa-icon>
|
||||||
{{ 'labels.buttons.Delete' | translate }}
|
{{ 'labels.buttons.Delete' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- GL Account Details -->
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<mat-card>
|
<mat-card>
|
||||||
<mat-card-content>
|
<mat-card-content>
|
||||||
<div class="layout-row-wrap">
|
<div class="content-rows">
|
||||||
<div class="flex-50 header">
|
<div class="content-row">
|
||||||
{{ 'labels.inputs.Account Type' | translate }}
|
<div class="label">{{ 'labels.inputs.Account Type' | translate }}</div>
|
||||||
|
<div class="value">{{ 'labels.inputs.accounting.' + glAccount.type?.value | translate }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex-50">
|
<div class="content-row">
|
||||||
{{ 'labels.inputs.accounting.' + glAccount.type?.value | translate }}
|
<div class="label">{{ 'labels.inputs.GL Code' | translate }}</div>
|
||||||
|
<div class="value">{{ glAccount.glCode }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex-50 header">
|
<div class="content-row" *ngIf="glAccount.parent">
|
||||||
{{ 'labels.inputs.GL Code' | translate }}
|
<div class="label">{{ 'labels.inputs.Parent Account Name' | translate }}</div>
|
||||||
|
<div class="value">
|
||||||
|
<a
|
||||||
|
class="tab-link"
|
||||||
|
[routerLink]="['/accounting/chart-of-accounts/gl-accounts/view/' + glAccount.parent.id]"
|
||||||
|
>
|
||||||
|
<mifosx-gl-account-display [glAccount]="glAccount.parent"></mifosx-gl-account-display>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex-50">
|
<div class="content-row" *ngIf="glAccount.tagId.id">
|
||||||
{{ glAccount.glCode }}
|
<div class="label">{{ 'labels.inputs.Tag' | translate }}</div>
|
||||||
|
<div class="value">{{ glAccount.tagId.name }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex-50 header" *ngIf="glAccount.parent">
|
<div class="content-row">
|
||||||
{{ 'labels.inputs.Parent Account Name' | translate }}
|
<div class="label">{{ 'labels.inputs.Account Usage' | translate }}</div>
|
||||||
|
<div class="value">{{ glAccount.usage?.value }}</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex-50" *ngIf="glAccount.parent">
|
<div class="content-row">
|
||||||
<a class="tab-link" [routerLink]="['/accounting/chart-of-accounts/gl-accounts/view/' + glAccount.parent.id]">
|
<div class="label">{{ 'labels.inputs.Manual Entries Allowed' | translate }}</div>
|
||||||
<mifosx-gl-account-display [glAccount]="glAccount.parent"></mifosx-gl-account-display>
|
<div class="value">{{ glAccount.manualEntriesAllowed | yesNo }}</div>
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex-50 header" *ngIf="glAccount.tagId.id">
|
<div class="content-row" *ngIf="glAccount.description">
|
||||||
{{ 'labels.inputs.Tag' | translate }}
|
<div class="label">{{ 'labels.inputs.Description' | translate }}</div>
|
||||||
</div>
|
<div class="value">{{ glAccount.description }}</div>
|
||||||
|
|
||||||
<div class="flex-50" *ngIf="glAccount.tagId.id">
|
|
||||||
{{ glAccount.tagId.name }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex-50 header">
|
|
||||||
{{ 'labels.inputs.Account Usage' | translate }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex-50">
|
|
||||||
{{ glAccount.usage?.value }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex-50 header">
|
|
||||||
{{ 'labels.inputs.Manual Entries Allowed' | translate }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex-50">
|
|
||||||
{{ glAccount.manualEntriesAllowed | yesNo }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex-50 header" *ngIf="glAccount.description">
|
|
||||||
{{ 'labels.inputs.Description' | translate }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex-50" *ngIf="glAccount.description">
|
|
||||||
{{ glAccount.description }}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</mat-card-content>
|
</mat-card-content>
|
||||||
|
|||||||
+90
-2
@@ -1,14 +1,102 @@
|
|||||||
.container {
|
.container {
|
||||||
max-width: 37rem;
|
max-width: 37rem;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 1rem;
|
||||||
|
|
||||||
|
mat-card {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
padding: 1.5rem;
|
||||||
|
box-shadow: 0 2px 4px rgb(0 0 0 / 10%);
|
||||||
|
border: 1px solid var(--border-color, #ddd);
|
||||||
|
border-radius: 8px;
|
||||||
|
background-color: var(--card-background, #fff);
|
||||||
|
transition:
|
||||||
|
background-color 0.3s ease,
|
||||||
|
border-color 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layout-row-wrap {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 50% 50%;
|
||||||
|
gap: 1rem;
|
||||||
|
|
||||||
|
.flex-50 {
|
||||||
|
padding: 0.5rem;
|
||||||
|
|
||||||
|
&.mat-body-strong {
|
||||||
|
color: var(--label-color, #555);
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
div {
|
div {
|
||||||
margin: 1rem 0;
|
margin: 1rem 0;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
|
|
||||||
&.header {
|
span {
|
||||||
font-weight: 500;
|
display: block;
|
||||||
|
padding: 0.25rem 0;
|
||||||
|
color: var(--text-color, inherit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.content-rows {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1rem;
|
||||||
|
|
||||||
|
.content-row {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
border-bottom: 1px solid var(--border-color-light, #eee);
|
||||||
|
padding-bottom: 0.5rem;
|
||||||
|
|
||||||
|
.label {
|
||||||
|
flex: 0 0 40%;
|
||||||
|
font-weight: 600;
|
||||||
|
color: var(--label-color, #555);
|
||||||
|
padding: 0.5rem 1rem 0.5rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.value {
|
||||||
|
flex: 0 0 60%;
|
||||||
|
padding: 0.5rem 0;
|
||||||
|
color: var(--text-color, inherit);
|
||||||
|
|
||||||
|
span {
|
||||||
|
display: block;
|
||||||
|
padding: 0.25rem 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.back-button-container {
|
||||||
|
margin-top: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
transition: all 0.2s ease;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
:host-context(.dark-theme) {
|
||||||
|
--border-color: #444;
|
||||||
|
--border-color-light: #3a3a3a;
|
||||||
|
--card-background: #2d2d2d;
|
||||||
|
--label-color: #b8b8b8;
|
||||||
|
--text-color: #e0e0e0;
|
||||||
|
|
||||||
|
.container {
|
||||||
|
mat-card {
|
||||||
|
box-shadow: 0 2px 4px rgb(0 0 0 / 30%);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user