feat(accounting): redesign Migrate Opening Balances for clarity, point env at abc_bank tenant
- Replaces the flat, hard-to-scan opening-balances form with a stepped layout: branch pick, a clearly-explained contra account, a pinned Debit/Credit balance status (green "Balanced" vs red "Out of balance by X"), and account rows grouped by type with a mobile-responsive grid. No behavior change - same form controls, same validation, same submit flow. - env.js: default/available tenant switched from default,socity_bank to abc_bank. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+291
-6
@@ -6,14 +6,299 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
.content {
|
||||
padding-top: 20px;
|
||||
.mob {
|
||||
max-width: 960px;
|
||||
}
|
||||
|
||||
div {
|
||||
word-wrap: break-word;
|
||||
.mob-card {
|
||||
margin-bottom: 14px;
|
||||
border-radius: 8px;
|
||||
|
||||
&.header {
|
||||
font-weight: 500;
|
||||
&--flush mat-card-content {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.mob-intro {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 8px;
|
||||
padding: 10px 14px;
|
||||
margin-bottom: 14px;
|
||||
background: #eff6ff;
|
||||
border: 1px solid #bfdbfe;
|
||||
border-radius: 8px;
|
||||
color: #1e40af;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
|
||||
mat-icon {
|
||||
font-size: 18px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
flex: none;
|
||||
}
|
||||
}
|
||||
|
||||
.mob-row {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 16px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.mob-office {
|
||||
flex: 1 1 320px;
|
||||
}
|
||||
|
||||
.mob-field {
|
||||
flex: 1 1 240px;
|
||||
}
|
||||
|
||||
.mob-contra {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 10px;
|
||||
padding: 10px 14px;
|
||||
margin-bottom: 16px;
|
||||
background: #f8fafc;
|
||||
border: 1px solid #e2e8f0;
|
||||
border-left: 4px solid #0ea5e9;
|
||||
border-radius: 8px;
|
||||
|
||||
mat-icon {
|
||||
color: #0ea5e9;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
&__label {
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.02em;
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
&__value {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: #0d1b2a;
|
||||
margin: 2px 0 4px;
|
||||
}
|
||||
|
||||
&__hint {
|
||||
font-size: 11px;
|
||||
color: #64748b;
|
||||
line-height: 1.4;
|
||||
}
|
||||
}
|
||||
|
||||
/* The one figure that decides whether this can be submitted — kept visually separate from the
|
||||
cards around it so it reads as a status, not just another form section. */
|
||||
.mob-balance {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 24px;
|
||||
flex-wrap: wrap;
|
||||
padding: 12px 16px;
|
||||
margin-bottom: 14px;
|
||||
background: #fef2f2;
|
||||
border: 1px solid #fecaca;
|
||||
border-left: 4px solid #dc2626;
|
||||
border-radius: 8px;
|
||||
|
||||
&--ok {
|
||||
background: #f0fdf4;
|
||||
border-color: #bbf7d0;
|
||||
border-left-color: #16a34a;
|
||||
}
|
||||
|
||||
&__figure {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
&__label {
|
||||
font-size: 11px;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.02em;
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
&__amt {
|
||||
font-variant-numeric: tabular-nums;
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
white-space: nowrap;
|
||||
|
||||
&--dr {
|
||||
color: #b91c1c;
|
||||
}
|
||||
|
||||
&--cr {
|
||||
color: #15803d;
|
||||
}
|
||||
}
|
||||
|
||||
&__status {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
margin-left: auto;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: #b91c1c;
|
||||
|
||||
mat-icon {
|
||||
font-size: 20px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
&--ok &__status {
|
||||
color: #15803d;
|
||||
}
|
||||
}
|
||||
|
||||
/* Account entry grid: a header row, a section label per account type, then one row per account. */
|
||||
.mob-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 90px 1fr 160px 160px;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 0 14px;
|
||||
|
||||
&--head {
|
||||
padding: 12px 14px;
|
||||
background: #f8fafc;
|
||||
border-bottom: 1px solid #e2e8f0;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.02em;
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
&__section {
|
||||
padding: 8px 14px 4px;
|
||||
margin-top: 6px;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.04em;
|
||||
color: #0ea5e9;
|
||||
border-top: 1px solid #e2e8f0;
|
||||
|
||||
&:first-of-type {
|
||||
border-top: none;
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
&--data {
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
border-bottom: 1px solid #f1f5f9;
|
||||
}
|
||||
|
||||
&__row {
|
||||
display: contents;
|
||||
}
|
||||
|
||||
&__code {
|
||||
font-variant-numeric: tabular-nums;
|
||||
font-size: 12px;
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
&__name {
|
||||
font-size: 13px;
|
||||
color: #0d1b2a;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
&__amt {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
&__input {
|
||||
width: 100%;
|
||||
|
||||
::ng-deep .mat-mdc-form-field-infix {
|
||||
padding-top: 10px;
|
||||
padding-bottom: 10px;
|
||||
min-height: unset;
|
||||
}
|
||||
|
||||
::ng-deep .mat-mdc-text-field-wrapper {
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
input {
|
||||
text-align: right;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mob-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
margin-top: 16px;
|
||||
padding-bottom: 24px;
|
||||
}
|
||||
|
||||
.mob-actions__spacer {
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
.mob-actions__hint {
|
||||
font-size: 12px;
|
||||
color: #b91c1c;
|
||||
}
|
||||
|
||||
@media (width <= 640px) {
|
||||
.mob-grid {
|
||||
grid-template-columns: 70px 1fr;
|
||||
row-gap: 4px;
|
||||
|
||||
&--head {
|
||||
display: none;
|
||||
}
|
||||
|
||||
&__row {
|
||||
display: grid;
|
||||
grid-template-columns: 70px 1fr;
|
||||
grid-template-areas:
|
||||
'code name'
|
||||
'debit debit'
|
||||
'credit credit';
|
||||
gap: 4px;
|
||||
padding: 10px 0;
|
||||
border-bottom: 1px solid #f1f5f9;
|
||||
}
|
||||
|
||||
&__code {
|
||||
grid-area: code;
|
||||
}
|
||||
|
||||
&__name {
|
||||
grid-area: name;
|
||||
}
|
||||
|
||||
&__amt:nth-of-type(1) {
|
||||
grid-area: debit;
|
||||
}
|
||||
|
||||
&__amt:nth-of-type(2) {
|
||||
grid-area: credit;
|
||||
}
|
||||
|
||||
&__amt {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user