Files
cbsnexora/src/app/shared/accounting/view-journal-entry-transaction/view-journal-entry-transaction.component.scss
T
Jaanu423andClaude Sonnet 4.6 43bab670a0 feat: show account number in GL journal entry list and transaction detail views
- Add savingsAccountNo column to search-journal-entry table (SB/FD/RD/CA)
- Add account no column to view-journal-entry-transaction detail table
- Fix duplicate .gl-mat-table selector; merge column-width rules inside block

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 18:22:24 +05:30

518 lines
10 KiB
SCSS

/**
* Copyright since 2025 Mifos Initiative
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
$dr-color: #e53935;
$cr-color: #43a047;
$radius: 10px;
$shadow: 0 2px 12px rgb(0 0 0 / 8%);
.m-r-6 {
margin-right: 6px;
}
.m-r-8 {
margin-right: 8px;
}
.m-r-4 {
margin-right: 4px;
}
// ─── Page Layout ─────────────────────────────────────────────────────────────
.txn-detail-page {
padding: 0.5rem 0;
display: flex;
flex-direction: column;
gap: 1.1rem;
}
// ─── Header Bar ───────────────────────────────────────────────────────────────
.txn-header-bar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.75rem 0;
gap: 0.5rem;
flex-wrap: wrap;
&__left {
display: flex;
align-items: center;
gap: 0.6rem;
}
&__title-group {
display: flex;
flex-direction: column;
}
&__title {
margin: 0;
font-size: 1.2rem;
font-weight: 700;
color: var(--primary-text, #212121);
display: flex;
align-items: center;
}
&__txn-id {
font-size: 0.75rem;
color: #78909c;
font-family: 'Courier New', monospace;
margin-top: 2px;
}
&__actions {
display: flex;
gap: 0.5rem;
}
}
.txn-back-btn {
color: #546e7a;
&:hover {
color: #1976d2;
}
}
.txn-revert-btn {
border-radius: 8px !important;
font-weight: 600 !important;
}
// ─── Info Cards Grid ──────────────────────────────────────────────────────────
.txn-info-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
gap: 0.85rem;
}
.txn-info-card {
display: flex;
align-items: center;
gap: 0.85rem;
padding: 0.9rem 1.1rem;
border-radius: $radius;
background: #fff;
box-shadow: $shadow;
border-left: 4px solid #e0e0e0;
transition: transform 0.12s ease;
&:hover {
transform: translateY(-1px);
}
&__icon {
width: 38px;
height: 38px;
border-radius: 9px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1rem;
color: #fff;
flex-shrink: 0;
background: #90a4ae;
}
&__label {
font-size: 0.7rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
color: #9e9e9e;
margin-bottom: 0.15rem;
}
&__value {
font-size: 0.9rem;
font-weight: 600;
color: #212121;
&--small {
font-size: 0.78rem;
}
}
&--manual {
border-left-color: #f57f17;
.txn-info-card__icon {
background: linear-gradient(135deg, #f57f17, #ffb74d);
}
}
&--system {
border-left-color: #3949ab;
.txn-info-card__icon {
background: linear-gradient(135deg, #3949ab, #7986cb);
}
}
&--blue {
border-left-color: #1976d2;
.txn-info-card__icon {
background: linear-gradient(135deg, #1976d2, #42a5f5);
}
}
&--teal {
border-left-color: #00796b;
.txn-info-card__icon {
background: linear-gradient(135deg, #00796b, #4db6ac);
}
}
&--purple {
border-left-color: #6a1b9a;
.txn-info-card__icon {
background: linear-gradient(135deg, #6a1b9a, #ab47bc);
}
}
&--grey {
border-left-color: #546e7a;
.txn-info-card__icon {
background: linear-gradient(135deg, #546e7a, #90a4ae);
}
}
&--orange {
border-left-color: #e65100;
.txn-info-card__icon {
background: linear-gradient(135deg, #e65100, #ff8a65);
}
}
}
// ─── Summary Bar ──────────────────────────────────────────────────────────────
.txn-summary-bar {
display: flex;
align-items: center;
gap: 1.5rem;
padding: 0.85rem 1.25rem;
background: #fff;
border-radius: $radius;
box-shadow: $shadow;
flex-wrap: wrap;
&__item {
font-size: 0.85rem;
font-weight: 500;
display: flex;
align-items: center;
strong {
margin-left: 5px;
font-size: 1rem;
}
&--dr {
color: $dr-color;
}
&--cr {
color: $cr-color;
}
&--balanced {
color: #2e7d32;
font-weight: 700;
}
&--unbalanced {
color: #c62828;
font-weight: 700;
}
}
&__divider {
width: 1px;
height: 24px;
background: #e0e0e0;
}
}
// ─── Entries Card ─────────────────────────────────────────────────────────────
.txn-entries-card {
border-radius: $radius !important;
box-shadow: $shadow !important;
border: 1px solid var(--border-color, #e0e0e0);
overflow: hidden;
&__header {
padding: 0.85rem 1.25rem 0 !important;
mat-card-title {
font-size: 0.95rem !important;
font-weight: 600;
display: flex;
align-items: center;
gap: 0.5rem;
color: var(--primary-text, #424242);
}
}
&__content {
padding: 0 !important;
}
}
.txn-entries-count {
font-size: 0.72rem;
font-weight: 600;
padding: 2px 9px;
border-radius: 20px;
background: #e3f2fd;
color: #1976d2;
}
// ─── Table ────────────────────────────────────────────────────────────────────
.txn-table-wrapper {
overflow-x: auto;
}
.txn-table {
width: 100%;
.txn-header-row {
background: #f5f7fa;
th {
font-size: 0.72rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5px;
color: #616161;
padding: 0.7rem 1rem;
white-space: nowrap;
border-bottom: 2px solid #e0e0e0;
}
}
.txn-data-row {
cursor: pointer;
transition: background 0.1s ease;
td {
padding: 0.65rem 1rem;
font-size: 0.84rem;
border-bottom: 1px solid #f0f0f0;
vertical-align: middle;
}
&:hover {
background: #f8f9ff !important;
}
&.txn-row--dr td:first-child {
border-left: 3px solid rgba($dr-color, 0.4);
}
&.txn-row--cr td:first-child {
border-left: 3px solid rgba($cr-color, 0.4);
}
&:last-child td {
border-bottom: none;
}
}
}
.txn-th--center,
.txn-td--center {
text-align: center !important;
}
.txn-th--amount {
text-align: right !important;
}
.txn-td--amount {
text-align: right !important;
}
.txn-th--dr {
color: $dr-color !important;
}
.txn-th--cr {
color: $cr-color !important;
}
// ─── Cell Elements ────────────────────────────────────────────────────────────
.txn-entry-id {
font-weight: 600;
font-size: 0.78rem;
color: #1976d2;
background: #e3f2fd;
padding: 2px 8px;
border-radius: 20px;
}
.txn-acct-code {
font-family: 'Courier New', monospace;
font-size: 0.78rem;
font-weight: 600;
color: #455a64;
background: #eceff1;
padding: 2px 7px;
border-radius: 4px;
}
.txn-acct-name {
font-size: 0.84rem;
font-weight: 500;
color: #37474f;
}
// ─── Badges ───────────────────────────────────────────────────────────────────
.txn-acct-type-badge {
font-size: 0.7rem;
font-weight: 700;
padding: 3px 9px;
border-radius: 20px;
text-transform: uppercase;
letter-spacing: 0.4px;
&.txn-badge--asset {
background: #e3f2fd;
color: #1565c0;
}
&.txn-badge--liability {
background: #f3e5f5;
color: #6a1b9a;
}
&.txn-badge--income {
background: #e8f5e9;
color: #2e7d32;
}
&.txn-badge--expense {
background: #ffebee;
color: #c62828;
}
&.txn-badge--equity {
background: #fff3e0;
color: #e65100;
}
&.txn-badge--default {
background: #f5f5f5;
color: #616161;
}
}
.txn-drcr-badge {
font-size: 0.72rem;
font-weight: 800;
padding: 3px 11px;
border-radius: 20px;
letter-spacing: 0.8px;
&--dr {
background: #ffebee;
color: $dr-color;
border: 1px solid rgba($dr-color, 0.3);
}
&--cr {
background: #e8f5e9;
color: $cr-color;
border: 1px solid rgba($cr-color, 0.3);
}
}
// ─── Amounts ──────────────────────────────────────────────────────────────────
.txn-amount {
font-weight: 700;
font-size: 0.9rem;
white-space: nowrap;
&--dr {
color: $dr-color;
}
&--cr {
color: $cr-color;
}
}
.txn-amount--empty {
color: #bdbdbd;
}
// ─── Footer ───────────────────────────────────────────────────────────────────
.txn-footer-actions {
display: flex;
justify-content: flex-start;
padding: 0.25rem 0 0.5rem;
}
// ─── No Data ──────────────────────────────────────────────────────────────────
.txn-no-data {
display: flex;
justify-content: center;
align-items: center;
min-height: 60vh;
&__box {
text-align: center;
padding: 2.5rem;
border-radius: $radius;
background: #fff;
box-shadow: $shadow;
max-width: 400px;
h4 {
font-size: 1.1rem;
font-weight: 700;
color: #424242;
margin: 0.75rem 0 0.4rem;
}
p {
font-size: 0.85rem;
color: #757575;
margin-bottom: 1.25rem;
}
}
&__icon {
color: #e0e0e0;
margin-bottom: 0.5rem;
}
}
.txn-acct-no-chip {
display: inline-block;
padding: 2px 8px;
background: #e8f4fd;
border-radius: 4px;
font-family: 'Courier New', monospace;
font-size: 0.72rem;
color: #1565c0;
font-weight: 600;
border: 1px solid #bbdefb;
white-space: nowrap;
max-width: 130px;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: middle;
}