Implemented the Organization Chart feature to create customer organizational

This commit is contained in:
2026-10-26 18:15:32 -03:00
parent bf48ed1dcb
commit 3229ce9c41
41 changed files with 4099 additions and 63 deletions

View File

@@ -0,0 +1,104 @@
.oe-org-modal { grid-template-columns: minmax(0, 1fr); }
.oe-org-dialog { --org-bg: #fff; --org-canvas: #faf9f8; --org-border: #dedbd7; --org-muted: #625d58; --org-accent: #00758f; --org-selected: #e3f1f4; width: min(1500px, 100%); height: min(880px, calc(100dvh - 40px)); max-height: calc(100dvh - 40px); display: flex; flex-direction: column; overflow: hidden; font-size: 13px; color: #312d2a; background: var(--org-bg); }
.opportunities-extension-modal[data-theme="dark"] .oe-org-dialog { --org-bg: #292725; --org-canvas: #211f1d; --org-border: #625d58; --org-muted: #c9c3bd; --org-accent: #80d6e8; --org-selected: #203f46; color: #f5f4f2; }
.oe-org-modal [hidden] { display: none !important; }
.oe-org-dialog * { box-sizing: border-box; letter-spacing: 0; }
.oe-org-dialog > header, .oe-org-toolbar, .oe-org-footer { flex: none; }
.oe-org-heading { min-width: 0; overflow-wrap: anywhere; }
.oe-org-heading p { margin: 5px 0 0; font-size: 12px; color: var(--org-muted); }
.oe-org-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--org-border); }
.oe-org-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.oe-org-count { color: var(--org-muted); font-variant-numeric: tabular-nums; }
.oe-org-zoom { width: 44px; text-align: center; font-variant-numeric: tabular-nums; }
.oe-org-modal .oe-org-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 34px; min-height: 34px; padding: 6px 9px; border: 1px solid var(--org-border, #8f8983); border-radius: 4px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.oe-org-modal svg { width: 17px; height: 17px; flex: none; }
.oe-org-dialog button:hover:not(:disabled) { background: var(--org-selected); }
.oe-org-dialog :focus-visible { outline: 2px solid var(--org-accent); outline-offset: 2px; }
.oe-org-modal .oe-org-primary { background: #006879; border-color: #006879; color: #fff; }
.oe-org-dialog .oe-org-primary:hover:not(:disabled) { background: #005563; }
.oe-org-dialog :disabled { opacity: .5; cursor: not-allowed; }
.oe-org-workspace { min-height: 0; min-width: 0; flex: 1; display: flex; overflow: hidden; }
.oe-org-viewport { position: relative; min-width: 0; min-height: 0; flex: 1; overflow: auto; background: var(--org-canvas); overscroll-behavior: contain; cursor: grab; }
.oe-org-sizing { position: relative; margin-inline: auto; }
.oe-org-canvas { position: relative; transform-origin: top left; }
.oe-org-canvas .oe-org-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.oe-org-lines path { stroke: var(--org-border); stroke-width: 2; fill: none; }
.oe-org-node { position: absolute; width: 236px; height: 146px; border: 1px solid var(--org-border); border-top: 3px solid var(--org-accent); border-radius: 4px; background: var(--org-bg); display: flex; flex-direction: column; cursor: default; }
.oe-org-node[data-selected="true"] { outline: 2px solid var(--org-accent); outline-offset: 2px; }
.oe-org-person { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; text-align: left; padding: 9px 12px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; border-radius: 0; width: 100%; }
.oe-org-person strong, .oe-org-person > span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; line-height: 18px; }
.oe-org-person > span { color: var(--org-muted); font-size: 12px; }
.oe-org-node-actions { flex: none; display: flex; align-items: center; gap: 4px; padding: 4px 8px; height: 38px; border-top: 1px solid var(--org-border); }
.oe-org-node-actions .oe-org-button { min-height: 28px; height: 28px; min-width: 28px; padding: 3px; border: 0; }
.oe-org-node-actions [aria-expanded] { margin-left: auto; font-size: 11px; }
.oe-org-note-marker { display: inline-flex; color: var(--org-muted); margin-left: auto; }
.oe-org-editor { flex: 0 0 310px; width: 310px; padding: 16px; border-left: 1px solid var(--org-border); overflow-y: auto; background: var(--org-bg); }
.oe-org-editor-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.oe-org-editor h3 { margin: 0; font-size: 15px; }
.oe-org-form { display: grid; gap: 16px; }
.oe-org-field { display: grid; gap: 6px; font-size: 12px; font-weight: 600; min-width: 0; }
.oe-org-dialog input, .oe-org-dialog textarea { min-width: 0; width: 100%; font: inherit; font-weight: 400; line-height: 20px; color: inherit; background: var(--org-bg); border: 1px solid var(--org-muted); border-radius: 3px; padding: 7px 8px; }
.oe-org-dialog textarea { resize: vertical; min-height: 100px; max-height: 300px; }
.oe-org-form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.oe-contact-name { position: relative; }
.oe-org-dialog .oe-contact-name > input { padding-right: 42px; }
.oe-org-modal .oe-contact-name > .oe-org-button { position: absolute; right: 2px; top: 2px; min-height: 30px; height: 30px; border: 0; }
.oe-org-dialog.oe-contact-dialog { width: min(680px, 100%); height: auto; padding: 20px; gap: 20px; overflow-y: auto; }
.oe-contact-dialog > header { margin: 0; }
.oe-org-dialog.oe-contact-opportunities { width: min(1200px, 100%); height: auto; padding: 20px; gap: 16px; }
.oe-contact-opportunities > header { margin: 0; }
.oe-contact-opportunities-table { overflow: auto; min-height: 0; }
.oe-contact-opportunities table { width: 100%; border-collapse: collapse; font-size: 12px; }
.oe-contact-opportunities th, .oe-contact-opportunities td { padding: 12px; text-align: left; border-bottom: 1px solid var(--org-border); }
.oe-contact-opportunities th { background: var(--org-canvas); white-space: nowrap; }
.oe-contact-opportunities .opportunities-extension-sort-button { white-space: nowrap; min-width: max-content; min-height: 28px; padding: 4px 18px 4px 0; justify-content: flex-start; text-align: left; }
.oe-contact-opportunities .opportunities-extension-sort-button::after { right: 0; }
.oe-contact-opportunities th:nth-child(5), .oe-contact-opportunities td:nth-child(5) { text-align: right; font-variant-numeric: tabular-nums; }
.oe-contact-opportunities th:nth-child(5) .opportunities-extension-sort-button { padding: 4px 0 4px 18px; justify-content: flex-end; text-align: right; }
.oe-contact-opportunities th:nth-child(5) .opportunities-extension-sort-button::after { left: 0; right: auto; }
.oe-contact-opportunities td:nth-child(5) .oe-contact-skeleton { margin-left: auto; }
.oe-contact-opportunities .opportunities-extension-sort-label { white-space: nowrap; overflow-wrap: normal; word-break: normal; }
.oe-contact-opportunities table { min-width: 900px; }
.oe-contact-opportunities a { color: var(--org-accent); }
.oe-contact-skeleton { display: block; height: 14px; min-width: 24px; border-radius: 4px; background: var(--org-border); animation: oe-time-pulse 1.3s ease-in-out infinite alternate; }
.oe-contact-skeleton-total { width: 110px; }
.oe-contact-opportunities table[aria-busy="true"] { table-layout: fixed; }
.oe-contact-opportunities table[aria-busy="true"] th:nth-child(3) { width: 28%; }
@media (prefers-reduced-motion: reduce) { .oe-contact-skeleton { animation: none; } }
.oe-contact-dialog [aria-invalid="true"] { border-color: #b3261e; outline: 1px solid #b3261e; }
.opportunities-extension-modal[data-theme="dark"] .oe-contact-dialog [aria-invalid="true"] { border-color: #ffaaa4; outline-color: #ffaaa4; }
.oe-contact-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.oe-contact-phone { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; border: 1px solid var(--org-border); border-radius: 4px; padding: 12px; min-width: 0; margin: 0; }
.oe-contact-form legend { font-weight: 600; padding: 0 4px; }
.oe-contact-primary { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 20px; border: 0; padding: 0; margin: 0; }
.oe-contact-primary label { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; }
.oe-contact-primary input { width: auto; accent-color: var(--org-accent); }
@media (max-width: 520px) { .oe-contact-form, .oe-contact-phone { grid-template-columns: minmax(0, 1fr); } }
.oe-org-dialog .oe-org-danger, .oe-org-error { color: #b3261e; }
.opportunities-extension-modal[data-theme="dark"] .oe-org-dialog .oe-org-danger, .opportunities-extension-modal[data-theme="dark"] .oe-org-error { color: #ffaaa4; }
.oe-org-footer { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--org-border); }
.oe-org-status { margin: 0 auto 0 0; font-size: 12px; overflow-wrap: anywhere; }
.oe-org-footer .oe-org-button { flex: none; }
.oe-org-empty { display: grid; place-content: center; justify-items: center; height: 100%; min-height: 180px; gap: 12px; }
.oe-org-empty > svg { width: 40px; height: 40px; color: var(--org-accent); }
.oe-org-empty h3 { margin: 0; font-size: 16px; }
.oe-org-tooltip { position: fixed; z-index: 20; max-width: min(360px, calc(100vw - 24px)); max-height: min(260px, 45dvh); overflow-y: auto; padding: 12px; background: #fff; color: #312d2a; border: 1px solid #8f8983; border-radius: 4px; box-shadow: 0 3px 12px #0002; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 18px; }
.opportunities-extension-modal[data-theme="dark"] .oe-org-tooltip { background: #35322f; color: #f5f4f2; }
.oe-org-tooltip { pointer-events: none; }
.oe-org-confirm { position: absolute; inset: 0; display: grid; place-items: center; background: #0006; z-index: 30; padding: 16px; }
.oe-org-confirm-panel { width: min(430px, 100%); background: #fff; color: #312d2a; border: 1px solid #8f8983; border-radius: 6px; padding: 24px; overflow-wrap: anywhere; }
.oe-org-confirm-panel h3 { margin: 0 0 12px; font-size: 18px; }
.oe-org-confirm-panel p { font-size: 13px; line-height: 20px; margin: 0 0 24px; }
.opportunities-extension-modal[data-theme="dark"] .oe-org-confirm-panel { background: #292725; color: #f5f4f2; }
.oe-org-skeleton { width: 236px; height: 146px; margin: 28px; border-radius: 4px; background: var(--org-border); animation: oe-time-pulse 1.3s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { .oe-org-skeleton { animation: none; } }
@media (max-width: 760px) {
.oe-org-modal { padding: 8px; }
.oe-org-dialog { height: calc(100dvh - 16px); max-height: calc(100dvh - 16px); }
.oe-org-workspace { flex-direction: column; }
.oe-org-editor { flex: 0 1 55%; width: 100%; border-left: 0; border-top: 1px solid var(--org-border); }
.oe-org-viewport { min-height: 140px; }
.oe-org-toolbar { padding: 8px; gap: 6px; }
.oe-org-tools { gap: 2px; }
.oe-org-footer { padding: 8px; }
}