PageSourceSearch

https://mediasphere.ai/assets/ActiveWorkflowsList-CQHWfqux.js

js mediasphere.ai collected 2026-10-05 12:18:01 UTC 4,155 bytes, 1 lines download raw bytes

1import{j as e,g as i,d as s,k as p,v as h,a as N,T as v,a3 as _}from"./index-k0AW3ROl.js";import{C as d}from"./clock-BUcX_QcR.js";import{P as C}from"./pause-DxEMy-KB.js";import{P as $}from"./play-BuJZE51t.js";import{C as m}from"./chevron-right-0J6XumZj.js";const x={"In Progress":{icon:$,bg:`${s.colors.blue}20`,text:s.colors.blue},Completed:{icon:h,bg:`${s.colors.green}20`,text:s.colors.green},"On Hold":{icon:C,bg:`${s.colors.yellow}20`,text:s.colors.yellow},Cancelled:{icon:p,bg:`${s.colors.accent}20`,text:s.colors.accent}};function I({workflows:o,creatives:g,templates:u}){const y=t=>{var a;return((a=g.find(r=>r.id===t))==null?void 0:a.title)||"Unknown Creative"},j=t=>{var a,r;return((a=t.template_snapshot)==null?void 0:a.name)||((r=u.find(l=>l.id===t.workflow_template_id))==null?void 0:r.name)||"Unknown Template"},b=t=>`/creativeDetails?id=${t}`,f=t=>{var l;const a=(l=t.stage_history)==null?void 0:l[t.stage_history.length-1];if(!(a!=null&&a.sla_deadline))return null;const r=(new Date(a.sla_deadline)-new Date)/(1e3*60*60);return r<0?{label:`${Math.abs(Math.floor(r))}h overdue`,color:s.colors.accent,urgent:!0}:r<12?{label:`${Math.floor(r)}h left`,color:s.colors.yellow,urgent:!1}:null};return o.length===0?e.jsxs("div",{className:"text-center py-16",style:i,children:[e.jsx("div",{className:"w-16 h-16 rounded-xl mx-auto mb-4 flex items-center justify-center",style:{background:`${s.colors.purple}15`},children:e.jsx(d,{className:"w-8 h-8",style:{color:s.colors.purple}})}),e.jsx("h3",{className:"text-lg font-bold mb-2",style:{color:s.text.primary},children:"No Active Workflows"}),e.jsx("p",{className:"text-sm",style:{color:s.text.secondary},children:"Workflows will appear here when creatives enter the approval process"})]}):e.jsx("div",{className:"space-y-3",children:o.map(t=>{const a=x[t.status]||x["In Progress"],r=a.icon,l=f(t);return e.jsxs(N,{to:b(t.creative_id),className:"group block p-5 transition-all hover:shadow-lg",style:i,children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1.5 flex-wrap",children:[e.jsxs("span",{className:"px-2.5 py-1 text-[10px] font-bold uppercase flex items-center gap-1.5",style:{background:a.bg,color:a.text,borderRadius:s.radius.sm},children:[e.jsx(r,{className:"w-3 h-3"}),t.status]}),l&&e.jsxs("span",{className:"px-2 py-0.5 text-[10px] font-bold flex items-center gap-1",style:{background:`${l.color}15`,color:l.color,borderRadius:s.radius.sm},children:[e.jsx(v,{className:"w-3 h-3"}),l.label]})]}),e.jsx("h3",{className:"text-base font-semibold mb-0.5 truncate",style:{color:s.text.primary},children:y(t.creative_id)}),e.jsxs("div",{className:"flex items-center gap-3 text-xs",style:{color:s.text.tertiary},children:[e.jsx("span",{children:j(t)}),t.current_stage_id&&e.jsxs(e.Fragment,{children:[e.jsx("span",{children:"•"}),e.jsxs("span",{className:"font-medium",style:{color:s.text.secondary},children:["Stage: ",t.current_stage_id]})]})]})]}),e.jsx(m,{className:"w-5 h-5 transition-all group-hover:translate-x-1 flex-shrink-0",style:{color:s.text.tertiary}})]}),t.stage_history&&t.stage_history.length>0&&e.jsx("div",{className:"mt-4 pt-3 flex items-center gap-2 overflow-x-auto",style:{borderTop:"1px solid rgba(0,0,0,0.06)"},children:t.stage_history.slice(-4).map((c,n)=>e.jsxs(_.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-1.5 px-2.5 py-1.5 text-xs flex-shrink-0",style:{background:c.decision==="approved"?`${s.colors.green}10`:c.decision==="rejected"?`${s.colors.accent}10`:"rgba(0,0,0,0.04)",borderRadius:s.radius.sm},children:[c.decision==="approved"&&e.jsx(h,{className:"w-3 h-3",style:{color:s.colors.green}}),c.decision==="rejected"&&e.jsx(p,{className:"w-3 h-3",style:{color:s.colors.accent}}),!c.decision&&e.jsx(d,{className:"w-3 h-3",style:{color:s.colors.blue}}),e.jsx("span",{className:"font-medium",style:{color:s.text.primary},children:c.stage_name})]}),n<Math.min(t.stage_history.length,4)-1&&e.jsx(m,{className:"w-3.5 h-3.5 flex-shrink-0",style:{color:s.text.tertiary}})]},n))})]},t.id)})})}export{I as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.