feat(dds): batch run preview on its own page, runs popup, projected GLs in approvals

- Generate opens the run on /organization/dds-batch-processing/run/:id with a back arrow,
  Post and Discard beside the figures, agent-wise table, View popup and CSV export; the
  table scrolls inside the page. A posted, running or failed run opens there read-only
- Batch screen lists generated-but-unposted runs as buttons to reopen them; Previous runs
  moved into a popup with status and job chips, search, date range, pagination, row
  detail and export; posting progress is followed from the run status
- Shared helpers for job names, money and agent grouping
- Approval review shows, for a calculation run, the entries its matching Posting run will
  book, marked "when posted"

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-28 22:04:26 +05:30
co-authored by Claude Sonnet 5.5
parent 0275a46326
commit c766a6f092
10 changed files with 1752 additions and 796 deletions
@@ -33,6 +33,10 @@ $red: #b91c1c;
gap: 14px;
margin-bottom: 16px;
&__spacer {
flex: 1;
}
&__ic {
display: grid;
place-items: center;
@@ -360,7 +364,7 @@ $red: #b91c1c;
// ── 3. Preview ────────────────────────────────────────────────────────────────────────────────────────
.bp-kpis {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
gap: 10px;
margin-bottom: 12px;
}
@@ -818,3 +822,336 @@ $red: #b91c1c;
}
}
}
// ── Previous runs button (header) and popup ──────────────────────────────────────────────────────────
.bp-runs-btn {
position: relative;
color: $primary;
i {
margin-right: 6px;
}
&__count {
margin-left: 8px;
padding: 1px 9px;
border-radius: 999px;
background: $primary-soft;
font-size: 12px;
font-weight: 700;
}
&__warn {
position: absolute;
top: 6px;
right: 6px;
width: 9px;
height: 9px;
border-radius: 50%;
background: $red;
}
}
.bpr {
display: flex;
flex-direction: column;
max-height: 90vh;
color: $text;
&-head {
display: flex;
align-items: center;
gap: 12px;
padding: 16px 20px;
border-bottom: 1px solid $border;
&__ic {
display: grid;
place-items: center;
flex: none;
width: 38px;
height: 38px;
border-radius: 10px;
background: $primary-soft;
color: $primary;
}
&__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;
}
}
}
&-icon-btn {
border: 0;
background: transparent;
color: $text-mid;
font-size: 15px;
cursor: pointer;
}
&-body {
flex: 1;
min-height: 0;
padding: 14px 20px 6px;
overflow-y: auto;
}
&-statuses,
&-jobs {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px;
margin-bottom: 10px;
}
&-jobs__label,
&-total {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.05em;
text-transform: uppercase;
color: $text-soft;
}
&-total {
margin-left: auto;
}
&-chip {
padding: 4px 12px;
border: 1px solid $border;
border-radius: 999px;
background: #fff;
color: $text-mid;
font: inherit;
font-size: 12.5px;
font-weight: 500;
cursor: pointer;
b {
margin-left: 4px;
}
&:hover {
border-color: $primary;
color: $primary;
}
&--on {
border-color: $primary;
background: $primary;
color: #fff;
&:hover {
color: #fff;
}
}
&--posted:not(&--on) {
background: #f0fdf4;
color: $green;
}
&--failed:not(&--on) {
background: #fef2f2;
color: $red;
}
&--posting:not(&--on) {
background: #eff6ff;
color: #1d4ed8;
}
}
&-filters {
display: flex;
flex-wrap: wrap;
align-items: flex-end;
gap: 12px;
margin-bottom: 10px;
}
&-field {
display: flex;
flex-direction: column;
gap: 3px;
span {
font-size: 11px;
font-weight: 600;
color: $text-soft;
}
input {
padding: 7px 10px;
border: 1px solid $border;
border-radius: 8px;
font: inherit;
font-size: 13px;
}
&--search {
flex: 1;
min-width: 200px;
}
}
&-clear {
border: 0;
background: transparent;
color: $primary;
font: inherit;
font-size: 12.5px;
font-weight: 600;
cursor: pointer;
}
&-scroll {
max-height: 42vh;
overflow-y: auto;
}
&-caret {
width: 28px;
color: $text-soft;
font-size: 11px;
}
&-row {
cursor: pointer;
&--open td {
background: #f0fdf9;
}
}
&-detail td {
padding: 0 12px 12px 40px;
background: #f0fdf9;
}
&-detail__grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
gap: 8px;
div {
display: flex;
flex-direction: column;
gap: 2px;
padding: 8px 12px;
border: 1px solid $border;
border-radius: 8px;
background: #fff;
}
span {
font-size: 11px;
font-weight: 700;
letter-spacing: 0.04em;
text-transform: uppercase;
color: $text-soft;
}
strong {
font-size: 13px;
font-variant-numeric: tabular-nums;
}
}
&-detail__fail {
margin: 8px 0 0;
padding: 8px 12px;
border-radius: 8px;
background: #fef2f2;
color: $red;
font-size: 12.5px;
i {
margin-right: 6px;
}
}
&-actions {
display: flex;
align-items: center;
gap: 10px;
padding: 12px 20px;
border-top: 1px solid $border;
i {
margin-right: 6px;
}
}
}
// ── Runs generated and not yet posted: one button each, to go back to its page ──────────────────────
.bp-previews {
&__list {
display: flex;
flex-wrap: wrap;
gap: 10px;
}
}
.bp-preview-btn {
display: flex;
align-items: center;
gap: 14px;
padding: 10px 16px;
border: 1.5px solid $border;
border-radius: 10px;
background: #fff;
color: $text;
font: inherit;
text-align: left;
cursor: pointer;
&:hover {
border-color: $primary;
box-shadow: 0 0 0 3px rgb(15 118 110 / 10%);
}
&__job {
font-size: 14px;
font-weight: 700;
}
&__meta {
font-size: 12px;
color: $text-mid;
}
&__go {
margin-left: auto;
color: $primary;
font-size: 12.5px;
font-weight: 700;
i {
margin-left: 4px;
}
}
}
.bpr-detail__open {
margin: 8px 0 0;
i {
margin-right: 6px;
}
}