Files
boc/backups/2026-07-12-1023/landvex-prod/assets/Policy-rMsjW2x7.js
T
Bernt 58ca4e68db feat(boc): Complete Business Operations Center v1.0
- Go backend API with full CRUD for all modules (CRM, Sales, Finance, HR, Legal, Marketing, Support, Purchase, Inventory, Projects, Automation, Analytics)
- Rust analytics service with parallel report generation
- C runtime with POSIX shared memory IPC
- PostgreSQL schema with 30+ tables, full migrations
- Redis cache, sessions, pub/sub
- Kafka event streaming with Zookeeper
- WebSocket hub for real-time updates
- Automation engine with cron jobs, workflows, event triggers
- JWT authentication, multi-tenant from start
- Docker Compose with all services
- Nginx reverse proxy with rate limiting
- Integration tests passing
- Feature gap analysis against Fortnox/Odoo/Visma

Refs: BOC-001
2026-07-12 12:41:35 +00:00

22 lines
8.7 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{o as p,z as f,r as u,j as e,aw as y,q as i,b6 as k,b7 as v,T as j,S as N,x as w,B as C}from"./index-oAPVDf-r.js";import{T as S,a as M,b as T,c as I}from"./tabs-CYk3p-Aj.js";import{u as B}from"./useQuery-BxfmyRLz.js";import{S as E}from"./settings-BTJAoFnf.js";import{S as L}from"./server-BrxxSdWs.js";import{B as q}from"./blocks-CUUl6oOU.js";import{L as z}from"./landmark-BYZTTZdl.js";import{S as A}from"./shield-BWGzcrms.js";import{H as G}from"./heart-BjLemQnU.js";import{E as P}from"./eye-G89nJUb2.js";import{N as K,B as _}from"./network-DAH-TQsi.js";import{K as D}from"./key-BAzZqC6d.js";import{G as F}from"./graduation-cap-Bk5l1TQx.js";import{C as R}from"./chevron-down-QDDHZwZg.js";import{A as $}from"./index-B-MEeiYV.js";import"./index-DGH-oZ97.js";/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const H=p("Briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const O=p("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const V=p("Gavel",[["path",{d:"m14.5 12.5-8 8a2.119 2.119 0 1 1-3-3l8-8",key:"15492f"}],["path",{d:"m16 16 6-6",key:"vzrcl6"}],["path",{d:"m8 8 6-6",key:"18bi4p"}],["path",{d:"m9 7 8 8",key:"5jnvq1"}],["path",{d:"m21 11-8-8",key:"z4y7zo"}]]);/**
* @license lucide-react v0.462.0 - ISC
*
* This source code is licensed under the ISC license.
* See the LICENSE file in the root directory of this source tree.
*/const Z=p("Scale",[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]]),J=()=>B({queryKey:["policy-documents"],queryFn:async()=>{const{data:r,error:s}=await f.from("policy_documents").select("*").order("layer").order("order_index");if(s)throw s;return r}}),Q={target:j,"graduation-cap":F,wallet:v,key:D,brain:_,users:k,network:K,eye:P,heart:G,shield:A,scale:Z,landmark:z,blocks:q,cpu:O,server:L},g={operational:{label:"Operativt",icon:H,description:"Dagliga beslut och processer",color:"text-emerald-500",bgColor:"from-emerald-500/20 to-emerald-500/5 border-emerald-500/30"},legal:{label:"Juridiskt",icon:V,description:"Regelefterlevnad och ansvar",color:"text-blue-500",bgColor:"from-blue-500/20 to-blue-500/5 border-blue-500/30"},technical:{label:"Tekniskt",icon:E,description:"Arkitektur och systemdesign",color:"text-violet-500",bgColor:"from-violet-500/20 to-violet-500/5 border-violet-500/30"}},U=["from-emerald-500/20 to-emerald-500/5 border-emerald-500/30","from-green-500/20 to-green-500/5 border-green-500/30","from-teal-500/20 to-teal-500/5 border-teal-500/30","from-lime-500/20 to-lime-500/5 border-lime-500/30","from-emerald-600/20 to-emerald-600/5 border-emerald-600/30"],W=["from-blue-500/20 to-blue-500/5 border-blue-500/30","from-indigo-500/20 to-indigo-500/5 border-indigo-500/30","from-sky-500/20 to-sky-500/5 border-sky-500/30","from-cyan-500/20 to-cyan-500/5 border-cyan-500/30","from-blue-600/20 to-blue-600/5 border-blue-600/30"],X=["from-violet-500/20 to-violet-500/5 border-violet-500/30","from-purple-500/20 to-purple-500/5 border-purple-500/30","from-fuchsia-500/20 to-fuchsia-500/5 border-fuchsia-500/30","from-pink-500/20 to-pink-500/5 border-pink-500/30","from-violet-600/20 to-violet-600/5 border-violet-600/30"],Y=["text-emerald-500 bg-emerald-500/20","text-green-500 bg-green-500/20","text-teal-500 bg-teal-500/20","text-lime-500 bg-lime-500/20","text-emerald-600 bg-emerald-600/20"],ee=["text-blue-500 bg-blue-500/20","text-indigo-500 bg-indigo-500/20","text-sky-500 bg-sky-500/20","text-cyan-500 bg-cyan-500/20","text-blue-600 bg-blue-600/20"],te=["text-violet-500 bg-violet-500/20","text-purple-500 bg-purple-500/20","text-fuchsia-500 bg-fuchsia-500/20","text-pink-500 bg-pink-500/20","text-violet-600 bg-violet-600/20"],re=r=>{switch(r){case"operational":return{colors:U,iconColors:Y};case"legal":return{colors:W,iconColors:ee};case"technical":return{colors:X,iconColors:te}}},ae=({policy:r,index:s,isExpanded:c,onToggle:x})=>{const d=r.icon?Q[r.icon]:N,{colors:l,iconColors:m}=re(r.layer),h=l[s%l.length],n=m[s%m.length];return e.jsx(i.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4,delay:s*.08},children:e.jsx(w,{className:`overflow-hidden cursor-pointer transition-all duration-300 bg-gradient-to-br ${h} hover:shadow-lg border`,onClick:x,children:e.jsxs("div",{className:"p-5",children:[e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:`w-12 h-12 rounded-xl flex items-center justify-center shrink-0 ${n}`,children:d&&e.jsx(d,{className:"w-6 h-6"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"flex items-center gap-2 mb-1",children:e.jsx("span",{className:"text-xs font-bold text-muted-foreground opacity-60",children:String(r.order_index).padStart(2,"0")})}),e.jsx("h3",{className:"font-semibold text-lg text-foreground leading-tight",children:r.title}),e.jsx("p",{className:"text-sm text-muted-foreground mt-2 leading-relaxed",children:r.summary})]}),e.jsx(i.div,{animate:{rotate:c?180:0},transition:{duration:.2},className:"shrink-0 mt-1",children:e.jsx(R,{className:"w-5 h-5 text-muted-foreground"})})]}),e.jsx($,{children:c&&e.jsx(i.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3,ease:"easeInOut"},className:"overflow-hidden",children:e.jsx("div",{className:"pt-4 mt-4 border-t border-border/50",children:e.jsx("p",{className:"text-foreground/90 leading-relaxed whitespace-pre-line",children:r.content})})})})]})})})},oe=()=>{const{data:r,isLoading:s,error:c}=J(),[x,d]=u.useState(null),[l,m]=u.useState("operational"),h=t=>{d(a=>a===t?null:t)},n=r==null?void 0:r.reduce((t,a)=>{const o=a.layer;return t[o]||(t[o]=[]),t[o].push(a),t},{});return s?e.jsx("div",{className:"space-y-4 p-4",children:[...Array(4)].map((t,a)=>e.jsx(y,{className:"h-32 w-full rounded-xl"},a))}):c?e.jsx("div",{className:"p-4 text-center text-muted-foreground",children:"Kunde inte ladda policy-dokument"}):e.jsxs("div",{className:"space-y-6 p-4",children:[e.jsxs(i.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},className:"text-center space-y-3 pb-4",children:[e.jsx("h2",{className:"text-2xl font-bold text-foreground",children:"Policy Framework"}),e.jsx("p",{className:"text-muted-foreground max-w-md mx-auto text-sm leading-relaxed",children:"Tre lager av styrning: operativt, juridiskt och tekniskt."})]}),e.jsxs(S,{value:l,onValueChange:t=>m(t),className:"w-full",children:[e.jsx(M,{className:"grid w-full grid-cols-3 h-auto p-1",children:["operational","legal","technical"].map(t=>{const a=g[t],o=a.icon;return e.jsxs(T,{value:t,className:"flex flex-col items-center gap-1 py-3 data-[state=active]:bg-background",children:[e.jsx(o,{className:`w-5 h-5 ${l===t?a.color:"text-muted-foreground"}`}),e.jsx("span",{className:"text-xs font-medium",children:a.label})]},t)})}),["operational","legal","technical"].map(t=>{var a;return e.jsxs(I,{value:t,className:"mt-6",children:[e.jsx(i.div,{initial:{opacity:0},animate:{opacity:1},className:"mb-4 text-center",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:g[t].description})}),e.jsx("div",{className:"space-y-3",children:(a=n==null?void 0:n[t])==null?void 0:a.map((o,b)=>e.jsx(ae,{policy:o,index:b,isExpanded:x===o.id,onToggle:()=>h(o.id)},o.id))})]},t)})]}),e.jsx(i.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.8},className:"text-center pt-6 pb-2",children:e.jsx("p",{className:"text-xs text-muted-foreground italic max-w-sm mx-auto",children:'"Certified Global / Roxvolt Etisk, teknisk och samhällsbärande ram för utbildning, kompetens och systembyggande."'})})]})},ve=()=>e.jsxs("div",{className:"min-h-screen bg-background pb-24",children:[e.jsx("div",{className:"max-w-2xl mx-auto pt-6",children:e.jsx(oe,{})}),e.jsx(C,{})]});export{ve as default};