367 lines
7.3 KiB
SCSS
367 lines
7.3 KiB
SCSS
|
|
/* Master Mail Log - central email log styling.
|
||
|
|
Colours are stated once here so the same status reads the same way in the
|
||
|
|
progress card, the history grid and the recipient dialog. Styles live with
|
||
|
|
the component, so every screen that embeds it gets the same look for free. */
|
||
|
|
|
||
|
|
$mm-success: #1a7f37;
|
||
|
|
$mm-failed: #c2350f;
|
||
|
|
$mm-skipped: #9a6700;
|
||
|
|
$mm-muted: #6b7280;
|
||
|
|
$mm-border: #e3e6ea;
|
||
|
|
|
||
|
|
.mm-progress-card {
|
||
|
|
border: 1px solid $mm-border;
|
||
|
|
border-radius: 6px;
|
||
|
|
padding: 14px 16px;
|
||
|
|
background: #fbfcfd;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-progress-head {
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
justify-content: space-between;
|
||
|
|
margin-bottom: 10px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-progress-title {
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
gap: 8px;
|
||
|
|
font-weight: 600;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-progress-counts {
|
||
|
|
display: flex;
|
||
|
|
flex-wrap: wrap;
|
||
|
|
gap: 16px;
|
||
|
|
margin-top: 10px;
|
||
|
|
font-size: 13px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-progress-actions {
|
||
|
|
margin-top: 10px;
|
||
|
|
|
||
|
|
button {
|
||
|
|
margin-right: 6px;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-count {
|
||
|
|
font-weight: 600;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-count-total {
|
||
|
|
color: $mm-muted;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-count-success {
|
||
|
|
color: $mm-success;
|
||
|
|
font-weight: 600;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-count-failed {
|
||
|
|
color: $mm-failed;
|
||
|
|
font-weight: 600;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-count-skipped {
|
||
|
|
color: $mm-skipped;
|
||
|
|
font-weight: 600;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Status pills. The numeric suffixes match the enums on the server:
|
||
|
|
batch 1 Pending, 2 Processing, 3 Completed, 4 CompletedWithError, 5 Failed
|
||
|
|
detail 1 Pending, 2 Success, 3 Failed, 4 Skipped */
|
||
|
|
.mm-badge {
|
||
|
|
display: inline-block;
|
||
|
|
padding: 2px 9px;
|
||
|
|
border-radius: 10px;
|
||
|
|
font-size: 11px;
|
||
|
|
font-weight: 600;
|
||
|
|
line-height: 18px;
|
||
|
|
white-space: nowrap;
|
||
|
|
background: #eef1f4;
|
||
|
|
color: $mm-muted;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-badge-2,
|
||
|
|
.mm-status-1 {
|
||
|
|
background: #e7f0fb;
|
||
|
|
color: #0b5cad;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-badge-3,
|
||
|
|
.mm-status-2 {
|
||
|
|
background: #e6f4ea;
|
||
|
|
color: $mm-success;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-badge-4,
|
||
|
|
.mm-status-4 {
|
||
|
|
background: #fdf3d7;
|
||
|
|
color: $mm-skipped;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-badge-5,
|
||
|
|
.mm-status-3 {
|
||
|
|
background: #fbe6e1;
|
||
|
|
color: $mm-failed;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* A batch that is still running. The spinner and the trailing dots are the
|
||
|
|
only thing on screen that says "this is moving" while a thousand mails go
|
||
|
|
out, so they keep going for as long as the batch does. Both inherit the
|
||
|
|
badge's own colour through currentColor, which means they read correctly for
|
||
|
|
Pending and Processing alike without a rule per status. */
|
||
|
|
.mm-badge-live {
|
||
|
|
display: inline-flex;
|
||
|
|
align-items: center;
|
||
|
|
gap: 6px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-spinner {
|
||
|
|
display: inline-block;
|
||
|
|
flex: none;
|
||
|
|
width: 10px;
|
||
|
|
height: 10px;
|
||
|
|
border: 2px solid currentColor;
|
||
|
|
border-right-color: transparent;
|
||
|
|
border-radius: 50%;
|
||
|
|
animation: mm-spin 0.7s linear infinite;
|
||
|
|
}
|
||
|
|
|
||
|
|
@keyframes mm-spin {
|
||
|
|
to {
|
||
|
|
transform: rotate(360deg);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Real text nodes rather than animated `content`, so the dots render the same
|
||
|
|
way in every browser. A fixed width keeps the badge from jittering as they
|
||
|
|
fade in and out. */
|
||
|
|
.mm-dots {
|
||
|
|
display: inline-block;
|
||
|
|
width: 14px;
|
||
|
|
margin-left: -2px;
|
||
|
|
letter-spacing: 1px;
|
||
|
|
|
||
|
|
i {
|
||
|
|
font-style: normal;
|
||
|
|
opacity: 0;
|
||
|
|
animation: mm-dot 1.2s infinite;
|
||
|
|
}
|
||
|
|
|
||
|
|
i:nth-child(2) {
|
||
|
|
animation-delay: 0.2s;
|
||
|
|
}
|
||
|
|
|
||
|
|
i:nth-child(3) {
|
||
|
|
animation-delay: 0.4s;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
@keyframes mm-dot {
|
||
|
|
0%,
|
||
|
|
80%,
|
||
|
|
100% {
|
||
|
|
opacity: 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
40% {
|
||
|
|
opacity: 1;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Someone who has asked the system to stop animating still needs to see that
|
||
|
|
the batch is live, so the marks stay - they just hold still. */
|
||
|
|
@media (prefers-reduced-motion: reduce) {
|
||
|
|
|
||
|
|
.mm-spinner,
|
||
|
|
.mm-dots i {
|
||
|
|
animation: none;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-dots i {
|
||
|
|
opacity: 1;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-link {
|
||
|
|
cursor: pointer;
|
||
|
|
text-decoration: underline;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* History filter bar: Type, From, To, Search on one row. */
|
||
|
|
.mm-history-filter {
|
||
|
|
margin-bottom: 1rem;
|
||
|
|
align-items: flex-end;
|
||
|
|
|
||
|
|
label {
|
||
|
|
display: block;
|
||
|
|
margin-bottom: 4px;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-history-search {
|
||
|
|
padding-left: 0.5rem;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-empty {
|
||
|
|
padding: 10px 2px;
|
||
|
|
color: $mm-muted;
|
||
|
|
font-size: 13px;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Mail type tag. One log holds payslips, tax cards, tax certificates and plain
|
||
|
|
mail, so each type gets its own colour - the kind of batch is readable at a
|
||
|
|
glance instead of having to be read word by word. The numeric suffixes match
|
||
|
|
EnumEmailType: 1 Payslip, 2 TaxCertificate, 3 TaxCard, 4 BonusPayslip,
|
||
|
|
5 GeneralMail. */
|
||
|
|
.mm-type {
|
||
|
|
display: inline-block;
|
||
|
|
padding: 2px 10px;
|
||
|
|
border: 1px solid transparent;
|
||
|
|
border-radius: 4px;
|
||
|
|
font-size: 11px;
|
||
|
|
font-weight: 600;
|
||
|
|
line-height: 18px;
|
||
|
|
white-space: nowrap;
|
||
|
|
background: #eef1f4;
|
||
|
|
color: $mm-muted;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-type-1 {
|
||
|
|
background: #e7f0fb;
|
||
|
|
border-color: #c5dcf6;
|
||
|
|
color: #0b5cad;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-type-2 {
|
||
|
|
background: #efe8fb;
|
||
|
|
border-color: #ddcef7;
|
||
|
|
color: #5b32a8;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-type-3 {
|
||
|
|
background: #e6f4ea;
|
||
|
|
border-color: #c9e7d3;
|
||
|
|
color: $mm-success;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-type-4 {
|
||
|
|
background: #fdf3d7;
|
||
|
|
border-color: #f5e3ab;
|
||
|
|
color: $mm-skipped;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-type-5 {
|
||
|
|
background: #f1f2f4;
|
||
|
|
border-color: #dfe2e6;
|
||
|
|
color: #4b5563;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Error text can be long; let it wrap so the whole reason is readable. */
|
||
|
|
.mm-error {
|
||
|
|
white-space: normal;
|
||
|
|
overflow-wrap: anywhere;
|
||
|
|
color: $mm-failed;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Recipient dialog header: batch title + status filter buttons. */
|
||
|
|
.mm-detail-head {
|
||
|
|
margin-bottom: 12px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-detail-title {
|
||
|
|
display: flex;
|
||
|
|
align-items: center;
|
||
|
|
flex-wrap: wrap;
|
||
|
|
gap: 8px;
|
||
|
|
margin-bottom: 10px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-filter-bar {
|
||
|
|
display: flex;
|
||
|
|
flex-wrap: wrap;
|
||
|
|
gap: 8px;
|
||
|
|
}
|
||
|
|
|
||
|
|
/* Each filter is a pill with its label and a count chip. The accent colour is
|
||
|
|
set per status through --mm-accent / --mm-accent-bg; these buttons live in
|
||
|
|
this component's own template, so the custom properties resolve normally. */
|
||
|
|
.mm-filter {
|
||
|
|
--mm-accent: #{$mm-muted};
|
||
|
|
--mm-accent-bg: #eef1f4;
|
||
|
|
|
||
|
|
display: inline-flex;
|
||
|
|
align-items: center;
|
||
|
|
gap: 8px;
|
||
|
|
padding: 6px 8px 6px 14px;
|
||
|
|
border: 1px solid $mm-border;
|
||
|
|
border-radius: 999px;
|
||
|
|
background: #fff;
|
||
|
|
color: #374151;
|
||
|
|
font-size: 13px;
|
||
|
|
font-weight: 600;
|
||
|
|
line-height: 20px;
|
||
|
|
cursor: pointer;
|
||
|
|
transition: background-color 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
|
||
|
|
|
||
|
|
&:hover {
|
||
|
|
border-color: var(--mm-accent);
|
||
|
|
color: var(--mm-accent);
|
||
|
|
}
|
||
|
|
|
||
|
|
&:focus-visible {
|
||
|
|
outline: none;
|
||
|
|
box-shadow: 0 0 0 3px var(--mm-accent-bg);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-filter-count {
|
||
|
|
min-width: 24px;
|
||
|
|
padding: 0 7px;
|
||
|
|
border-radius: 999px;
|
||
|
|
background: var(--mm-accent-bg);
|
||
|
|
color: var(--mm-accent);
|
||
|
|
font-size: 12px;
|
||
|
|
text-align: center;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-filter-active {
|
||
|
|
border-color: var(--mm-accent);
|
||
|
|
background: var(--mm-accent);
|
||
|
|
color: #fff;
|
||
|
|
|
||
|
|
&:hover {
|
||
|
|
color: #fff;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-filter-count {
|
||
|
|
background: rgba(255, 255, 255, 0.25);
|
||
|
|
color: #fff;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-filter-all {
|
||
|
|
--mm-accent: #52527a;
|
||
|
|
--mm-accent-bg: #dedeff;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-filter-success {
|
||
|
|
--mm-accent: #{$mm-success};
|
||
|
|
--mm-accent-bg: #e6f4ea;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-filter-failed {
|
||
|
|
--mm-accent: #{$mm-failed};
|
||
|
|
--mm-accent-bg: #fbe6e1;
|
||
|
|
}
|
||
|
|
|
||
|
|
.mm-filter-skipped {
|
||
|
|
--mm-accent: #{$mm-skipped};
|
||
|
|
--mm-accent-bg: #fdf3d7;
|
||
|
|
}
|
||
|
|
::ng-deep .k-dropdownlist .k-input-inner, .k-dropdownlist .k-input-value-text, .k-dropdown .k-input-inner, .k-dropdown .k-input-value-text {
|
||
|
|
padding: 0px 1px !important;
|
||
|
|
}
|