From d7ce39fbfe3a88ba1c33bd32babe81f8da5f6cfb Mon Sep 17 00:00:00 2001 From: shubhamsharma9199 Date: Mon, 22 Sep 2025 19:19:03 +0530 Subject: [PATCH] fix: correct alignment and styling of AccountingRules 2 section --- .../view-rule/view-rule.component.html | 164 ++++++++---------- .../view-rule/view-rule.component.scss | 105 ++++++++++- 2 files changed, 169 insertions(+), 100 deletions(-) diff --git a/src/app/accounting/accounting-rules/view-rule/view-rule.component.html b/src/app/accounting/accounting-rules/view-rule/view-rule.component.html index 354862830..5fe5cd77e 100644 --- a/src/app/accounting/accounting-rules/view-rule/view-rule.component.html +++ b/src/app/accounting/accounting-rules/view-rule/view-rule.component.html @@ -1,101 +1,77 @@ -
- - -
- -
-
- - -
-
- {{ 'labels.inputs.Office' | translate }} -
- -
- {{ accountingRule.officeName }} -
- -
- {{ 'labels.inputs.Description' | translate }} -
- -
- {{ accountingRule.description }} -
- -
- {{ 'labels.inputs.Multiple Debit Entries Allowed' | translate }} -
- -
- {{ accountingRule.allowMultipleDebitEntries }} -
- -
- {{ 'labels.inputs.Multiple Credit Entries Allowed' | translate }} -
- -
- {{ accountingRule.allowMultipleCreditEntries }} -
-
-
-
+
+
+ +
-
- - -
-
-
- {{ 'labels.inputs.Debit Tags' | translate }} -
-
- {{ debitTag.tag.name }} -
-
+ + +
+
{{ 'labels.inputs.Office' | translate }}
+
{{ accountingRule.officeName }}
+
-
-
- {{ 'labels.inputs.Debit Account Name' | translate }} -
-
- {{ debitAccount.name + ' (' + debitAccount.glCode + ')' }} -
-
+
+
{{ 'labels.inputs.Description' | translate }}
+
{{ accountingRule.description }}
+
-
-
- {{ 'labels.inputs.Credit Tags' | translate }} -
-
- {{ creditTag.tag.name }} -
-
+
+
{{ 'labels.inputs.Multiple Debit Entries Allowed' | translate }}
+
{{ accountingRule.allowMultipleDebitEntries }}
+
-
-
- {{ 'labels.inputs.Credit Account Name' | translate }} -
-
- {{ creditAccount.name + ' (' + creditAccount.glCode + ')' }} -
-
+
+
{{ 'labels.inputs.Multiple Credit Entries Allowed' | translate }}
+
{{ accountingRule.allowMultipleCreditEntries }}
+
+
+
+ + + +
+
{{ 'labels.inputs.Debit Tags' | translate }}
+
+ {{ debitTag.tag.name }}
- - -
+
+ +
+
{{ 'labels.inputs.Debit Account Name' | translate }}
+
+ {{ + debitAccount.name + ' (' + debitAccount.glCode + ')' + }} +
+
+ +
+
{{ 'labels.inputs.Credit Tags' | translate }}
+
+ {{ creditTag.tag.name }} +
+
+ +
+
{{ 'labels.inputs.Credit Account Name' | translate }}
+
+ {{ + creditAccount.name + ' (' + creditAccount.glCode + ')' + }} +
+
+
+
diff --git a/src/app/accounting/accounting-rules/view-rule/view-rule.component.scss b/src/app/accounting/accounting-rules/view-rule/view-rule.component.scss index b78000682..3bc9a2739 100644 --- a/src/app/accounting/accounting-rules/view-rule/view-rule.component.scss +++ b/src/app/accounting/accounting-rules/view-rule/view-rule.component.scss @@ -1,10 +1,103 @@ -.content { - div { - margin: 1rem 0; - word-wrap: break-word; +.container { + max-width: 37rem; + margin: 0 auto; + padding: 1rem; - &.header { - font-weight: 500; + 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 { + div { + margin: 1rem 0; + word-wrap: break-word; + + span { + 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); + } + } +} + +// Dark mode styles +: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%); } } }