PageSourceSearch

https://kolabo.co.id/assets/CalendarEventDetail-BRffttNX.js

js kolabo.co.id collected 2026-10-05 01:05:29 UTC 7,459 bytes, 1 lines download raw bytes

1import{j as e,ak as T,u as A,r as O,S as B,B as r,L as m,aS as b,b as u,Q as v,ah as I,f as i,I as d,J as c,g as x,p as R,ae as z,ag as K}from"./index-CxTzo_i5.js";import{C as _,u as F,i as U,c as p,a as W,S as k}from"./use-content-planner-emoccKY7.js";import{P as $}from"./platform-badge-VhdmkjZz.js";import{p as w,f as C,n as J,S as H}from"./schedule-content-dialog-CF_rdbAm.js";import{A as M}from"./arrow-left-B8GMcwgo.js";import{P as Q}from"./pencil-Bay03jLk.js";import{E as q}from"./external-link-Ddpd7fdt.js";import"./types-vOKYguEV.js";import"./instagram-CWN_PyAU.js";import"./youtube-Bmjd9M1z.js";import"./facebook-DGnUkk1Y.js";import"./twitter-B1GXq6mI.js";import"./input-CcS2mpyJ.js";import"./label-u97y7T5C.js";import"./select-yCbIaiw_.js";import"./index-BG_NryTU.js";import"./chevron-up-DNE74ONe.js";function l({label:o,value:n}){return e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] font-bold uppercase tracking-wide text-muted-foreground",children:o}),e.jsx("div",{className:"mt-1 text-sm font-semibold text-foreground",children:n})]})}function G(){const{id:o=""}=T(),n=A(),{getPlan:P,loading:S,updatePlan:y,canEdit:E}=F(),[D,h]=O.useState(!1),a=P(o);if(S)return e.jsx(B,{className:"m-6 h-[520px] rounded-xl"});if(!a)return e.jsxs("div",{className:"p-6",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Konten tidak ditemukan."}),e.jsx(r,{variant:"outline",className:"mt-3",onClick:()=>n("/calendar"),children:"Kembali ke Calendar"})]});const j=w(a.targetPublishDate||""),g=w(a.productionDeadline||""),f=U(a),L=p.indexOf(a.status),t=a.performance;return e.jsxs("div",{className:"space-y-5 p-4 md:p-6",children:[e.jsxs("nav",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[e.jsx(m,{to:"/calendar",className:"hover:text-foreground",children:"Calendar"}),e.jsx(b,{className:"h-3 w-3"}),e.jsx("span",{className:"font-semibold text-foreground",children:a.code})]}),e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(r,{variant:"ghost",size:"icon",onClick:()=>n("/calendar"),"aria-label":"Kembali",children:e.jsx(M,{className:"h-4 w-4"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold text-foreground",children:a.title}),e.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[e.jsx("span",{className:u("rounded-md border px-2 py-0.5 font-bold",W[a.status].badge),children:k[a.status]}),f&&e.jsx("span",{className:"rounded-md border border-destructive/30 bg-destructive/10 px-2 py-0.5 font-bold text-destructive",children:"Overdue"}),e.jsx("span",{children:a.campaign})]})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(r,{variant:"outline",size:"sm",onClick:()=>h(!0),children:[e.jsx(Q,{className:"mr-1.5 h-3.5 w-3.5"})," Edit Schedule"]}),e.jsx(r,{variant:"outline",size:"sm",asChild:!0,children:e.jsxs(m,{to:`/planner/${a.id}`,children:[e.jsx(q,{className:"mr-1.5 h-3.5 w-3.5"})," Open in Content Planner"]})}),e.jsxs(r,{variant:"outline",size:"sm",className:"text-destructive",onClick:async()=>{if(!E){v.error("Anda tidak punya izin mengubah jadwal konten");return}await y(a.id,{targetPublishDate:""},"membatalkan jadwal publish"),v.success("Jadwal dibatalkan"),n("/calendar")},children:[e.jsx(I,{className:"mr-1.5 h-3.5 w-3.5"})," Cancel Schedule"]})]})]}),e.jsxs("div",{className:"grid gap-5 lg:grid-cols-[minmax(0,1fr)_340px]",children:[e.jsxs("div",{className:"space-y-5",children:[e.jsxs(i,{children:[e.jsx(d,{className:"pb-3",children:e.jsx(c,{className:"text-base",children:"Content Preview"})}),e.jsxs(x,{className:"space-y-3",children:[e.jsx("p",{className:"text-sm leading-relaxed text-muted-foreground",children:a.brief||"Belum ada brief untuk konten ini."}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:(a.references??[]).map(s=>e.jsx("span",{className:"rounded-md bg-muted px-2 py-0.5 text-[11px] text-muted-foreground",children:s},s))})]})]}),e.jsxs(i,{children:[e.jsx(d,{className:"pb-3",children:e.jsx(c,{className:"text-base",children:"Production Timeline"})}),e.jsxs(x,{children:[e.jsx("div",{className:"flex flex-wrap items-center gap-2",children:p.map((s,N)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:u("rounded-lg border px-2.5 py-1 text-xs font-semibold",N<=L?"border-brand/40 bg-brand/10 text-brand":"border-border text-muted-foreground"),children:k[s]}),N<p.length-1&&e.jsx(b,{className:"h-3 w-3 text-muted-foreground"})]},s))}),e.jsx("div",{className:"mt-4 h-2 overflow-hidden rounded-full bg-muted",children:e.jsx("div",{className:"h-full rounded-full bg-brand",style:{width:`${a.progress??0}%`}})}),e.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:["Progress produksi ",a.progress??0,"%"]})]})]}),e.jsxs(i,{children:[e.jsx(d,{className:"pb-3",children:e.jsx(c,{className:"text-base",children:"Performance Summary"})}),e.jsxs(x,{className:"grid grid-cols-2 gap-4 md:grid-cols-4",children:[e.jsx(l,{label:"Reach",value:((t==null?void 0:t.reach)??0).toLocaleStr
1ing("id-ID")}),e.jsx(l,{label:"Engagement",value:((t==null?void 0:t.engagement)??0).toLocaleString("id-ID")}),e.jsx(l,{label:"ER",value:`${(t==null?void 0:t.engagementRate)??0}%`}),e.jsx(l,{label:"Clicks",value:((t==null?void 0:t.clicks)??0).toLocaleString("id-ID")}),e.jsx("div",{className:"col-span-2 md:col-span-4",children:e.jsx(r,{variant:"link",className:"h-auto p-0 text-xs text-brand",asChild:!0,children:e.jsx(m,{to:"/social-analytics",children:"Lihat detail di Social Analytics →"})})})]})]}),e.jsxs(i,{children:[e.jsx(d,{className:"pb-3",children:e.jsx(c,{className:"text-base",children:"Activity Log"})}),e.jsxs(x,{className:"space-y-3",children:[(a.activity??[]).slice(0,8).map(s=>e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("span",{className:"mt-1.5 h-1.5 w-1.5 shrink-0 rounded-full bg-brand"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-foreground",children:s.action}),e.jsxs("p",{className:"text-[11px] text-muted-foreground",children:[s.actor," · ",s.at]})]})]},s.id)),(a.activity??[]).length===0&&e.jsx("p",{className:"text-xs text-muted-foreground",children:"Belum ada aktivitas."})]})]})]}),e.jsx("div",{className:"space-y-5",children:e.jsxs(i,{children:[e.jsx(d,{className:"pb-3",children:e.jsx(c,{className:"text-base",children:"Overview"})}),e.jsxs(x,{className:"space-y-4",children:[e.jsx(l,{label:"Target Publish",value:j?e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(R,{className:"h-4 w-4 text-brand"}),C(j)," · ",J(a.targetPublishTime||"09:00")," WIB"]}):"Belum dijadwalkan"}),e.jsx(l,{label:"Deadline Produksi",value:e.jsx("span",{className:u(f&&"text-destructive"),children:g?C(g):"-"})}),e.jsx(l,{label:"Platform",value:e.jsx("span",{className:"flex flex-wrap gap-1.5",children:a.platforms.map(s=>e.jsx($,{platform:s,variant:"icon-only",className:"h-7 w-7"},s))})}),e.jsx(l,{label:"Format",value:a.format}),e.jsx(l,{label:"Pillar",value:a.pillar}),e.jsx(l,{label:"PIC",value:e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx(z,{className:"h-6 w-6",children:e.jsx(K,{className:"text-[10px] font-bold",children:a.pic.initials})}),a.pic.name]})}),e.jsx(l,{label:"Campaign",value:a.campaign})]})]})})]}),e.jsx(H,{open:D,onOpenChange:h,plan:a})]})}function ue(){return e.jsx(_,{children:e.jsx(G,{})})}export{ue 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.