diff --git a/fusion_accounting_followup/__manifest__.py b/fusion_accounting_followup/__manifest__.py index 14adf203..da7aa950 100644 --- a/fusion_accounting_followup/__manifest__.py +++ b/fusion_accounting_followup/__manifest__.py @@ -1,6 +1,6 @@ { 'name': 'Fusion Accounting Follow-up', - 'version': '19.0.1.0.18', + 'version': '19.0.1.0.19', 'category': 'Accounting/Accounting', 'summary': 'AI-augmented customer follow-ups (dunning) for unpaid invoices.', 'description': """ @@ -37,6 +37,9 @@ menu hides; the engine + AI tools remain available for the chat. ], 'assets': { 'web.assets_backend': [ + 'fusion_accounting_followup/static/src/scss/_variables.scss', + 'fusion_accounting_followup/static/src/scss/followup.scss', + 'fusion_accounting_followup/static/src/scss/dark_mode.scss', ], }, 'installable': True, diff --git a/fusion_accounting_followup/static/src/scss/_variables.scss b/fusion_accounting_followup/static/src/scss/_variables.scss new file mode 100644 index 00000000..cb3d8f85 --- /dev/null +++ b/fusion_accounting_followup/static/src/scss/_variables.scss @@ -0,0 +1,51 @@ +// Fusion follow-up design tokens (extends Phases 1-3 tokens for consistency). + +$fu-bg-primary: #ffffff; +$fu-bg-secondary: #f9fafb; +$fu-bg-tertiary: #f3f4f6; +$fu-border: #e5e7eb; +$fu-text-primary: #111827; +$fu-text-secondary: #6b7280; +$fu-text-muted: #9ca3af; +$fu-accent: #3b82f6; +$fu-accent-bg: #eff6ff; + +// Status colors +$fu-status-no-action: #6b7280; +$fu-status-action-due: #f59e0b; +$fu-status-paused: #6366f1; +$fu-status-blocked: #ef4444; +$fu-status-with-credit: #8b5cf6; + +// Risk band colors +$fu-risk-low: #10b981; +$fu-risk-low-bg: #ecfdf5; +$fu-risk-medium: #f59e0b; +$fu-risk-medium-bg: #fffbeb; +$fu-risk-high: #ef4444; +$fu-risk-high-bg: #fef2f2; +$fu-risk-critical: #b91c1c; +$fu-risk-critical-bg: #fef2f2; + +// Aging bucket colors (escalating intensity) +$fu-bucket-current: #10b981; +$fu-bucket-1-30: #fbbf24; +$fu-bucket-31-60: #f59e0b; +$fu-bucket-61-90: #ef4444; +$fu-bucket-91-120: #dc2626; +$fu-bucket-120-plus: #7f1d1d; + +$fu-space-1: 0.25rem; +$fu-space-2: 0.5rem; +$fu-space-3: 0.75rem; +$fu-space-4: 1rem; +$fu-space-6: 1.5rem; + +$fu-font-size-xs: 0.75rem; +$fu-font-size-sm: 0.875rem; +$fu-font-size-base: 1rem; +$fu-font-size-lg: 1.125rem; +$fu-font-size-xl: 1.25rem; + +$fu-border-radius: 0.375rem; +$fu-border-radius-md: 0.5rem; diff --git a/fusion_accounting_followup/static/src/scss/dark_mode.scss b/fusion_accounting_followup/static/src/scss/dark_mode.scss new file mode 100644 index 00000000..25950570 --- /dev/null +++ b/fusion_accounting_followup/static/src/scss/dark_mode.scss @@ -0,0 +1,27 @@ +// Variables come from _variables.scss (loaded first in the asset bundle). + +[data-color-scheme="dark"] .o_fusion_followup { + background: #1f2937; color: #f9fafb; + + &_header, &_card, .fu-ai-text-panel { + background: #111827; border-color: #374151; color: #f9fafb; + } + + &_card { + &:hover { border-color: #60a5fa; } + &.selected { background: #1e3a8a; border-color: #60a5fa; } + .partner-numbers .label { color: #9ca3af; } + .partner-numbers .value { color: #f9fafb; } + } + + .btn_fu { + background: #374151; border-color: #4b5563; color: #f9fafb; + &:hover { background: #4b5563; } + &.primary { background: #3b82f6; } + } + + .fu-ai-text-panel { + .ai-subject { background: #1e3a8a; } + .ai-body { background: #1f2937; } + } +} diff --git a/fusion_accounting_followup/static/src/scss/followup.scss b/fusion_accounting_followup/static/src/scss/followup.scss new file mode 100644 index 00000000..8962e3dd --- /dev/null +++ b/fusion_accounting_followup/static/src/scss/followup.scss @@ -0,0 +1,190 @@ +// Variables come from _variables.scss (loaded first in the asset bundle). + +.o_fusion_followup { + background: $fu-bg-secondary; + min-height: 100vh; + + &_header { + background: $fu-bg-primary; + border-bottom: 1px solid $fu-border; + padding: $fu-space-4 $fu-space-6; + display: flex; + justify-content: space-between; + align-items: center; + + h1 { font-size: $fu-font-size-xl; margin: 0; } + + .summary { + display: flex; + gap: $fu-space-6; + font-size: $fu-font-size-sm; + color: $fu-text-secondary; + + .summary-value { + font-weight: 600; + color: $fu-text-primary; + margin-left: $fu-space-1; + } + } + } + + &_card { + background: $fu-bg-primary; + border: 1px solid $fu-border; + border-radius: $fu-border-radius-md; + padding: $fu-space-4; + margin-bottom: $fu-space-3; + cursor: pointer; + transition: all 200ms ease-in-out; + + &:hover { + border-color: $fu-accent; + box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); + } + + &.selected { + border-color: $fu-accent; + background: $fu-accent-bg; + } + + &_header { + display: flex; + justify-content: space-between; + align-items: flex-start; + margin-bottom: $fu-space-2; + + .partner-name { + font-weight: 600; + font-size: $fu-font-size-base; + } + } + + .partner-numbers { + display: grid; + grid-template-columns: 1fr 1fr; + gap: $fu-space-2; + font-size: $fu-font-size-sm; + color: $fu-text-secondary; + + .label { font-weight: 500; margin-right: $fu-space-2; } + .value { color: $fu-text-primary; font-weight: 500; } + } + } + + .btn_fu { + padding: $fu-space-2 $fu-space-4; + border-radius: $fu-border-radius; + background: $fu-bg-primary; + border: 1px solid $fu-border; + color: $fu-text-primary; + font-size: $fu-font-size-sm; + cursor: pointer; + + &:hover { background: $fu-bg-tertiary; } + &.primary { background: $fu-accent; border-color: $fu-accent; color: white; + &:hover { background: darken($fu-accent, 8%); } } + &.danger { background: $fu-status-blocked; border-color: $fu-status-blocked; color: white; } + } +} + +.fu-status-badge { + padding: $fu-space-1 $fu-space-2; + border-radius: $fu-border-radius; + font-size: $fu-font-size-xs; + font-weight: 500; + text-transform: uppercase; + + &[data-status="no_action"] { background: lighten($fu-status-no-action, 40%); color: $fu-status-no-action; } + &[data-status="action_due"] { background: lighten($fu-status-action-due, 35%); color: $fu-status-action-due; } + &[data-status="paused"] { background: lighten($fu-status-paused, 35%); color: $fu-status-paused; } + &[data-status="blocked"] { background: lighten($fu-status-blocked, 35%); color: $fu-status-blocked; } + &[data-status="with_credit_team"] { background: lighten($fu-status-with-credit, 35%); color: $fu-status-with-credit; } +} + +.fu-risk-badge { + display: inline-flex; + align-items: center; + padding: $fu-space-1 $fu-space-2; + border-radius: $fu-border-radius; + font-weight: 600; + font-size: $fu-font-size-xs; + + &[data-band="low"] { background: $fu-risk-low-bg; color: $fu-risk-low; } + &[data-band="medium"] { background: $fu-risk-medium-bg; color: $fu-risk-medium; } + &[data-band="high"] { background: $fu-risk-high-bg; color: $fu-risk-high; } + &[data-band="critical"] { background: $fu-risk-critical-bg; color: $fu-risk-critical; font-weight: 700; } +} + +.fu-aging-strip { + display: flex; + gap: 2px; + height: 8px; + border-radius: $fu-border-radius; + overflow: hidden; + margin: $fu-space-2 0; + + .bucket { + height: 100%; + + &[data-name="current"] { background: $fu-bucket-current; } + &[data-name="1_30"] { background: $fu-bucket-1-30; } + &[data-name="31_60"] { background: $fu-bucket-31-60; } + &[data-name="61_90"] { background: $fu-bucket-61-90; } + &[data-name="91_120"] { background: $fu-bucket-91-120; } + &[data-name="120_plus"] { background: $fu-bucket-120-plus; } + } +} + +.fu-ai-text-panel { + background: $fu-bg-primary; + border: 1px solid $fu-border; + border-radius: $fu-border-radius-md; + padding: $fu-space-4; + + h5 { margin: 0 0 $fu-space-2; font-size: $fu-font-size-base; } + + .ai-subject { + font-weight: 600; + margin-bottom: $fu-space-2; + padding: $fu-space-2; + background: $fu-accent-bg; + border-radius: $fu-border-radius; + } + + .ai-body { + white-space: pre-wrap; + font-family: monospace; + font-size: $fu-font-size-sm; + padding: $fu-space-3; + background: $fu-bg-secondary; + border-radius: $fu-border-radius; + max-height: 300px; + overflow-y: auto; + } + + .key-points { + margin-top: $fu-space-3; + font-size: $fu-font-size-sm; + color: $fu-text-secondary; + + ul { margin: 0; padding-left: $fu-space-4; } + } +} + +.fu-history-table { + width: 100%; + font-size: $fu-font-size-sm; + + th { + background: $fu-bg-tertiary; + padding: $fu-space-2 $fu-space-3; + text-align: left; + font-weight: 600; + color: $fu-text-secondary; + } + + td { + padding: $fu-space-2 $fu-space-3; + border-bottom: 1px solid lighten($fu-border, 5%); + } +}