feat(dds): savings-style DDS account view, batch processing redesign, slab master in Products

- DDS account view: Transactions and Passbook tabs laid out like savings, a per-line
  View Transaction popup (general, payment details, accounting and audit, receipt print)
  with actions menu (view, receipt, journal entries)
- DDS batch processing: job tiles with calculate then post pairs, compact agent and party
  ranges, agent-wise preview with a View popup of each agent's accounts, search, and CSV
  export of all details or one agent; previous runs summary; OD interest hidden
- Discard removes the generated preview on the server
- Commission Slab Master moved from Organization to Products, with a how-to card, rates
  and commission at "To", gap warnings to the paisa, loading state and a calculator popup
- Party edit: scheme terms and agent locked on an active account, with a lock badge

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-28 17:13:33 +05:30
co-authored by Claude Sonnet 5.5
parent 53bb97d6ed
commit 306af59099
22 changed files with 4581 additions and 1264 deletions
@@ -6,28 +6,54 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
// The DDS screens' teal, with amber for "moves money" and the usual green/red for done/failed.
$primary: #0f766e;
$primary-dark: #134e4a;
$primary-soft: #e6f4ee;
$border: #e2e8f0;
$text: #0f172a;
$text-mid: #475569;
$text-soft: #94a3b8;
$amber: #b45309;
$amber-soft: #fffbeb;
$green: #15803d;
$red: #b91c1c;
.bp-container {
// The commission breakdown carries eight columns; anything narrower makes it scroll on every
// screen rather than only on small ones.
max-width: 1180px;
max-width: 1120px;
margin: 0 auto;
padding: 24px 16px;
display: flex;
flex-direction: column;
gap: 20px;
padding: 24px 16px 40px;
color: $text;
}
// ── Header ────────────────────────────────────────────────────────────────────────────────────────────
.bp-header {
display: flex;
align-items: center;
gap: 16px;
gap: 14px;
margin-bottom: 16px;
&__ic {
display: grid;
place-items: center;
flex: none;
width: 44px;
height: 44px;
border-radius: 12px;
background: linear-gradient(135deg, $primary, $primary-dark);
color: #fff;
}
&__title {
margin: 0;
font-size: 22px;
font-weight: 500;
font-size: 21px;
font-weight: 600;
}
&__sub {
margin: 2px 0 0;
font-size: 13px;
color: $text-mid;
}
}
@@ -35,90 +61,365 @@ $primary: #0f766e;
color: $primary;
}
// ── Cards and step headings ───────────────────────────────────────────────────────────────────────────
.bp-card {
margin-bottom: 16px;
padding: 18px 20px 20px;
border: 1px solid $border;
border-radius: 12px;
background: var(--md-sys-color-surface, #fff);
border-radius: 8px;
box-shadow: 0 2px 8px rgb(0 0 0 / 8%);
padding: 20px 24px 24px;
box-shadow: 0 1px 3px rgb(0 0 0 / 5%);
}
.bp-step-head {
display: flex;
align-items: flex-start;
gap: 12px;
margin-bottom: 14px;
h3 {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px;
margin: 0;
font-size: 15px;
font-weight: 700;
}
p {
margin: 2px 0 0;
font-size: 12.5px;
color: $text-mid;
}
&--plain {
margin-bottom: 0;
}
}
.bp-step-no {
display: grid;
place-items: center;
flex: none;
width: 28px;
height: 28px;
border-radius: 50%;
background: $primary;
color: #fff;
font-size: 13px;
font-weight: 700;
&--muted {
background: $primary-soft;
color: $primary;
}
}
.bp-kind {
padding: 2px 10px;
border-radius: 999px;
background: $primary-soft;
color: $primary;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.04em;
text-transform: uppercase;
&--post {
background: #fef3c7;
color: $amber;
}
}
// ── 1. Job tiles ──────────────────────────────────────────────────────────────────────────────────────
.bp-jobs {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 12px;
@media (width <= 980px) {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (width <= 560px) {
grid-template-columns: 1fr;
}
}
.bp-job {
display: flex;
flex-direction: column;
gap: 12px;
padding: 14px;
border: 1.5px solid $border;
border-radius: 12px;
background: #fff;
transition:
border-color 0.15s,
box-shadow 0.15s;
&--active {
border-color: $primary;
box-shadow: 0 0 0 3px rgb(15 118 110 / 12%);
}
&__head {
display: flex;
align-items: flex-start;
gap: 10px;
}
&__ic {
display: grid;
place-items: center;
flex: none;
width: 34px;
height: 34px;
border-radius: 9px;
background: $primary-soft;
color: $primary;
}
&__title {
display: block;
font-size: 14px;
font-weight: 700;
}
&__hint {
display: block;
margin-top: 2px;
font-size: 11.5px;
line-height: 1.35;
color: $text-mid;
}
&__steps {
display: flex;
align-items: center;
gap: 6px;
margin-top: auto;
}
&__step {
flex: 1;
display: inline-flex;
align-items: center;
justify-content: center;
gap: 6px;
padding: 7px 8px;
border: 1px solid $border;
border-radius: 8px;
background: #f8fafc;
color: $text-mid;
font: inherit;
font-size: 12.5px;
font-weight: 600;
cursor: pointer;
&:hover {
border-color: $primary;
color: $primary;
}
&--on {
border-color: $primary;
background: $primary;
color: #fff;
&:hover {
color: #fff;
}
}
}
&__arrow {
font-size: 11px;
color: $text-soft;
}
}
// ── 2. Scope and date ─────────────────────────────────────────────────────────────────────────────────
.bp-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 8px 16px;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 14px 16px;
@media (width <= 860px) {
grid-template-columns: 1fr;
}
}
.bp-field {
width: 100%;
&--wide {
grid-column: span 3;
grid-column: 1 / -1;
}
}
.bp-group-label {
display: block;
margin-bottom: 6px;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.06em;
text-transform: uppercase;
color: $text-soft;
i {
margin-right: 4px;
}
}
.bp-ranges {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 16px;
margin-top: 4px;
@media (width <= 860px) {
grid-template-columns: 1fr;
}
}
.bp-range {
padding: 10px 12px 12px;
border: 1px solid $border;
border-radius: 10px;
background: #f8fafc;
&__fields {
display: grid;
grid-template-columns: 1fr auto 1fr;
align-items: center;
gap: 10px;
}
&__to {
font-size: 12px;
color: $text-soft;
}
}
.bp-branch-checklist {
display: flex;
flex-wrap: wrap;
gap: 8px 20px;
align-items: center;
padding: 8px 0;
padding: 10px 12px;
border: 1px solid $border;
border-radius: 10px;
background: #f8fafc;
&__list {
display: flex;
flex-wrap: wrap;
gap: 4px 18px;
}
}
.bp-callout {
display: flex;
gap: 10px;
align-items: flex-start;
background: rgb(15 118 110 / 6%);
border-left: 3px solid $primary;
border-radius: 0 8px 8px 0;
padding: 12px 16px;
margin: 16px 0;
gap: 10px;
margin-top: 16px;
padding: 11px 14px;
border: 1px solid #bae6fd;
border-radius: 10px;
background: #f0f9ff;
color: #0c4a6e;
font-size: 13px;
line-height: 1.5;
i {
color: $primary;
margin-top: 2px;
margin-top: 3px;
}
&--post {
border-color: #fde68a;
background: $amber-soft;
color: $amber;
}
}
.bp-section {
padding: 16px 0;
border-top: 1px solid rgb(0 0 0 / 8%);
.bp-action-bar {
display: flex;
align-items: center;
gap: 10px;
margin-top: 16px;
padding-top: 14px;
border-top: 1px solid $border;
&__header {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 12px;
i {
color: $primary;
}
h3 {
margin: 0;
font-size: 16px;
font-weight: 600;
flex: 0 0 auto;
}
&__spacer {
flex: 1;
}
&__note {
margin-left: auto;
font-size: 12px;
color: rgb(0 0 0 / 45%);
i {
margin-right: 4px;
}
}
// ── 3. Preview ────────────────────────────────────────────────────────────────────────────────────────
.bp-kpis {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 10px;
margin-bottom: 12px;
}
.bp-kpi {
display: flex;
flex-direction: column;
gap: 3px;
padding: 10px 14px;
border: 1px solid $border;
border-radius: 10px;
background: #f8fafc;
span {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.05em;
text-transform: uppercase;
color: $text-soft;
}
strong {
font-size: 17px;
font-variant-numeric: tabular-nums;
}
&--accent {
border-color: #a7f3d0;
background: $primary-soft;
strong {
color: $primary-dark;
}
}
}
.bp-empty {
color: rgb(0 0 0 / 50%);
font-size: 14px;
margin: 0;
margin: 6px 0;
font-size: 13px;
color: $text-mid;
&--box {
padding: 16px;
border: 1.5px dashed #cbd5e1;
border-radius: 10px;
background: #f8fafc;
text-align: center;
}
i {
margin-right: 6px;
}
}
// A wide table scrolls inside its own box rather than pushing the whole page sideways.
// ── Tables ────────────────────────────────────────────────────────────────────────────────────────────
.bp-table-scroll {
overflow-x: auto;
border: 1px solid $border;
border-radius: 10px;
}
.bp-table {
@@ -127,129 +428,393 @@ $primary: #0f766e;
font-size: 13px;
th {
padding: 9px 12px;
border-bottom: 1px solid $border;
background: #f8fafc;
font-size: 11px;
font-weight: 700;
letter-spacing: 0.05em;
text-align: left;
font-size: 12px;
text-transform: uppercase;
letter-spacing: 0.04em;
color: rgb(0 0 0 / 55%);
padding: 8px 10px;
border-bottom: 2px solid rgb(0 0 0 / 10%);
white-space: nowrap;
color: $text-soft;
}
td {
padding: 7px 10px;
border-bottom: 1px solid rgb(0 0 0 / 6%);
vertical-align: top;
padding: 9px 12px;
border-bottom: 1px solid #eef2f6;
vertical-align: middle;
}
tbody tr:hover {
background: #f0fdf9;
}
tbody tr:last-child td {
border-bottom: 0;
}
tfoot td {
border-bottom: none;
border-top: 2px solid rgb(0 0 0 / 10%);
font-weight: 600;
border-top: 1.5px solid $border;
background: $primary-soft;
font-weight: 700;
color: $primary-dark;
}
}
// Figures line up column-wise so a wrong order of magnitude is visible at a glance.
.bp-num {
text-align: right;
font-variant-numeric: tabular-nums;
white-space: nowrap;
}
.bp-num {
text-align: right !important;
white-space: nowrap;
font-variant-numeric: tabular-nums;
}
.bp-minus {
color: #b91c1c;
}
.bp-minus {
color: $red;
}
.bp-total {
font-weight: 600;
}
.bp-total {
font-weight: 700;
}
.bp-period {
white-space: nowrap;
color: rgb(0 0 0 / 60%);
}
.bp-period {
white-space: nowrap;
color: $text-mid;
}
.bp-code {
display: block;
font-weight: 600;
font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
font-size: 12.5px;
font-weight: 700;
color: $primary-dark;
&--muted {
color: $text-mid;
}
}
.bp-sub {
display: block;
font-size: 12px;
color: rgb(0 0 0 / 55%);
color: $text-mid;
}
.bp-status {
display: inline-block;
padding: 2px 8px;
border-radius: 10px;
.bp-rate {
padding: 1px 7px;
border-radius: 6px;
background: $primary-soft;
color: $primary;
font-weight: 700;
}
// ── Previous runs ─────────────────────────────────────────────────────────────────────────────────────
.bp-runs-head {
display: flex;
flex-wrap: wrap;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
margin-bottom: 12px;
}
.bp-stats {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.bp-stat {
padding: 3px 10px;
border-radius: 999px;
background: #f1f5f9;
color: $text-mid;
font-size: 12px;
font-weight: 600;
background: rgb(180 83 9 / 12%);
color: #92400e;
&--posted {
background: rgb(15 118 110 / 12%);
color: $primary;
background: #dcfce7;
color: $green;
}
/* Still crediting. Blue rather than the amber of a run nobody has posted — one is work in hand,
the other is work forgotten, and a clerk who reads them the same way runs it twice. */
&--running {
background: rgb(22 84 143 / 12%);
color: #16548f;
display: inline-flex;
align-items: center;
gap: 5px;
background: #dbeafe;
color: #1d4ed8;
}
&--failed {
background: rgb(163 42 28 / 12%);
color: #a32a1c;
background: #fee2e2;
color: $red;
}
}
.bp-runid {
font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
color: $text-mid;
}
.bp-jobname {
font-weight: 600;
}
.bp-status {
display: inline-flex;
align-items: center;
gap: 5px;
padding: 2px 10px;
border-radius: 999px;
background: #f1f5f9;
color: $text-mid;
font-size: 12px;
font-weight: 600;
white-space: nowrap;
&--posted {
background: #dcfce7;
color: $green;
}
&--running {
background: #dbeafe;
color: #1d4ed8;
}
&--failed {
background: #fee2e2;
color: $red;
cursor: help;
}
}
/* Says a run is still going after the clerk has left the button behind. */
.bp-running {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 16px;
padding: 12px 16px;
border: 1px solid rgb(22 84 143 / 25%);
border-left: 3px solid #16548f;
border-radius: 6px;
background: rgb(22 84 143 / 6%);
color: #16548f;
border: 1px solid #bfdbfe;
border-radius: 10px;
background: #eff6ff;
color: #1e3a8a;
font-size: 13px;
}
strong {
font-weight: 600;
// Loading placeholder for the runs list.
.bp-skeleton {
display: flex;
flex-direction: column;
gap: 10px;
&__bar {
height: 14px;
border-radius: 6px;
background: linear-gradient(90deg, #eef2f6 25%, #e2e8f0 37%, #eef2f6 63%);
background-size: 400% 100%;
animation: bp-shimmer 1.2s ease-in-out infinite;
}
}
.bp-action-bar {
@keyframes bp-shimmer {
0% {
background-position: 100% 50%;
}
100% {
background-position: 0 50%;
}
}
// ── Agent-wise preview: tools row, agent lines, View button ───────────────────────────────────────────
.bp-tools {
display: flex;
justify-content: flex-end;
gap: 12px;
margin-top: 20px;
padding-top: 16px;
border-top: 1px solid rgb(0 0 0 / 8%);
align-items: center;
gap: 10px;
margin-bottom: 10px;
flex-wrap: wrap;
&__hint {
font-size: 12.5px;
color: $text-mid;
}
&__spacer {
flex: 1;
}
i {
margin-right: 6px;
}
}
@media (width <= 900px) {
.bp-grid {
grid-template-columns: repeat(2, 1fr);
}
.bp-agent-row td {
padding-block: 11px;
}
.bp-field--wide {
grid-column: span 2;
.bp-avatar {
display: inline-grid;
place-items: center;
width: 30px;
height: 30px;
margin-right: 10px;
border-radius: 50%;
background: $primary-soft;
color: $primary;
font-size: 12px;
font-weight: 700;
vertical-align: middle;
}
.bp-code--inline {
display: inline;
margin-right: 8px;
}
.bp-sub--inline {
display: inline;
}
.bp-view-col {
width: 1%;
text-align: right;
white-space: nowrap;
}
.bp-view-btn {
color: $primary;
i {
margin-right: 6px;
}
}
// ── One agent's accounts, in a popup ──────────────────────────────────────────────────────────────────
.bpd {
display: flex;
flex-direction: column;
max-height: 88vh;
color: $text;
&-head {
display: flex;
align-items: center;
gap: 12px;
padding: 16px 20px;
border-bottom: 1px solid $border;
&__text {
flex: 1;
min-width: 0;
h3 {
margin: 0;
font-size: 16px;
font-weight: 700;
}
p {
margin: 2px 0 0;
font-size: 12px;
color: $text-mid;
}
}
}
&-av {
display: grid;
place-items: center;
flex: none;
width: 40px;
height: 40px;
border-radius: 50%;
background: linear-gradient(135deg, $primary, $primary-dark);
color: #fff;
font-weight: 700;
}
&-close {
border: 0;
background: transparent;
color: $text-mid;
font-size: 16px;
cursor: pointer;
}
&-body {
flex: 1;
min-height: 0;
padding: 14px 20px;
overflow-y: auto;
}
&-kpis,
&-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 10px;
margin-bottom: 12px;
}
&-cell {
display: flex;
flex-direction: column;
gap: 3px;
padding: 10px 14px;
border: 1px solid $border;
border-radius: 10px;
background: #f8fafc;
span {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.05em;
text-transform: uppercase;
color: $text-soft;
}
strong {
font-size: 16px;
font-variant-numeric: tabular-nums;
}
&--net {
border-color: #a7f3d0;
background: $primary-soft;
strong {
color: $primary-dark;
}
}
}
&-search {
width: 100%;
margin-bottom: 10px;
padding: 9px 12px;
border: 1px solid $border;
border-radius: 8px;
font: inherit;
font-size: 13px;
}
&-scroll {
max-height: 44vh;
overflow-y: auto;
}
&-note {
margin: 0 0 10px;
font-size: 12.5px;
color: $text-mid;
}
&-actions {
display: flex;
align-items: center;
gap: 10px;
padding: 12px 20px;
border-top: 1px solid $border;
i {
margin-right: 6px;
}
}
}