PageSourceSearch

https://ifexindonesia.com/build/assets/Edit-CdCOVBIw.js

js ifexindonesia.com collected 2026-10-06 04:51:56 UTC 3,965 bytes, 1 lines download raw bytes

1import{b6 as j,aY as e}from"./.pnpm-DsWhPSJO.js";import{I as r}from"./InputError-Co5soRld.js";import{I as i}from"./InputLabel-DcgV6JrA.js";import{N as f}from"./NewsLetterPreview-Dz56CPCz.js";import{P as v}from"./PrimaryButton-BnxW91VA.js";import{T as N}from"./TextArea-SDKbgSIG.js";import{T as C}from"./TextInput-C3mRuXC8.js";import{R as m}from"./RichTextEditor-VT1r6MWL.js";import{U as T}from"./UploadFileWithView-DhroyJ1-.js";import{D as _}from"./DashboardLayout-D6O3WOCK.js";import{S as I}from"./Select-ZEyjvwMB.js";import"./assetPath-bsj2iDPi.js";import"./MenuToggle-B7LuEM26.js";function F({newsLetter:s}){const{data:a,setData:l,post:p,processing:h,errors:o}=j({_method:"PUT",thumbnail:null,publish:String(s.status??""),description:s.description??"",date_publish:s.published_at??"",title:s.main_title??"",rawTitle:s.title??"",contents:(s.news_letter_dt??[]).map(t=>t.content??"")}),c=t=>{if(t.target instanceof HTMLInputElement&&t.target.type==="file"){l("thumbnail",t.target.files?.[0]??null);return}const n=t.target.name;l(n,t.target.value)},u=(t,n)=>{const d=[...a.contents];d[t]=n,l({...a,contents:d})},x=t=>{const n=[...a.contents];n.splice(t,1),l({...a,contents:n})},b=(t,n)=>{l({...a,rawTitle:t,title:n})},g=t=>{t.preventDefault(),p(`/dashboard/admin/news-letter/${s.id}`)};return e.jsxs(_,{header:"Edit News Letter "+(s.main_title??""),subTitle:"Edit News Letter "+(s.main_title??""),children:[e.jsx(f,{title:a.title,rawTitle:a.rawTitle,contents:a.contents}),e.jsxs("form",{className:"grid grid-cols-12 gap-2",onSubmit:g,children:[e.jsxs("div",{className:"col-span-12 md:col-span-4 grid grid-cols-12 gap-2",children:[e.jsxs("div",{className:"col-span-12",children:[e.jsx(i,{forInput:"thumbnail",value:"Thumbnail (max 512kb)"}),e.jsx(T,{name:"thumbnail",handleChange:c,labelText:"Upload Thumbnail (max 512kb)",accept:"image/png, image/jpg, image/jpeg",withCurrent:s.thumbnail?`https://ifex23.s3.ap-southeast-1.amazonaws.com/news-letter/${s.id}/thumbnail/${s.thumbnail}`:!1}),e.jsx(r,{message:o.thumbnail,className:"mt-1"})]}),e.jsxs("div",{className:"col-span-12",children:[e.jsx(i,{forInput:"description",value:"Description (max 255 chars)"}),e.jsx(N,{name:"description",value:a.description,handleChange:c,placeholder:"Description (Max 255 chars)",required:!0}),e.jsx(r,{message:o.description})]}),e.jsxs("div",{className:"col-span-12",children:[e.jsx(i,{forInput:"date_publish",value:"Date Publish"}),e.jsx(C,{name:"date_publish",type:"date",value:a.date_publish,handleChange:c,placeholder:"Date Publish"}),e.jsx(r,{message:o.date_publish})]}),e.jsxs("div",{className:"col-span-12",children:[e.jsx(i,{forInput:"publish",value:"Publish Status"}),e.jsxs(I,{name:"publish",value:a.publish,handleChange:c,children:[e.jsx("option",{value:"1",children:"Publish"}),e.jsx("option",{value:"0",children:"Archive"})]}),e.jsx(r,{message:o.publish})]})]}),e.jsxs("div",{className:"col-span-12 md:col-span-8",children:[e.jsx(i,{forInput:"title",value:"Title"}),e.jsx(m,{changeMode:"html-and-text",value:a.rawTitle,height:250,handleChange:b,endPoint:"/dashboard/admin/upload-image"}),e.jsx(r,{message:o.title,className:"mt-1"})]}),e.jsxs("div",{className:"col-span-12 grid grid-cols-12 gap-2 py-6",children:[e.jsxs("div",{className:"col-span-12 flex space-x-2 items-center",children:[e.jsx(i,{value:"Contents"}),e.jsx("button",{type:"button",className:"btn btn-primary btn-xs",onClick:()=>l({...a,contents:[...a.contents,""]}),children:"Add Content"})]}),a.contents.map((t,n)=>e.jsxs("div",{className:"col-span-12 grid gap-2 py-4",children:[e.jsx("div",{className:"flex ",children:e.jsx("button",{type:"button",className:"btn btn-error bt
1n-sm text-sm text-white",onClick:()=>x(n),children:"Delete"})}),e.jsx("div",{children:e.jsx(m,{changeMode:"html-and-text",value:t,height:400,handleChange:d=>u(n,d)})})]},n))]}),e.jsx("div",{className:"col-span-12 my-6",children:e.jsx(v,{className:"w-full text-white",processing:h,children:"Save"})})]})]})}export{F 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.