PageSourceSearch

https://technopark.in/build/assets/AddGalleryAlbum-3eda6894.js

js technopark.in collected 2026-10-03 00:25:47 UTC 3,825 bytes, 1 lines download raw bytes

1import{r as n,j as t,F as d,a as e,g as x}from"./app-74eb9902.js";import{u as y}from"./use419Error-53647906.js";import{u as N}from"./useCustomForm-b0fcc6ff.js";import{u as D}from"./useNameUrl-86b636c7.js";import{B as C}from"./Button-bdf47a0e.js";import{I as A}from"./ImagePickButton-9f2530f3.js";import{C as M}from"./Card-693f1b49.js";import{C as E}from"./CardHeader-25f34a31.js";import{C as I}from"./CheckBox-d0155bd6.js";import{D as P}from"./DatePicker-4cec9958.js";import{I as c}from"./Input-f7a9f394.js";import{T as p}from"./TextArea-615137e0.js";import{M as k}from"./Modal-7de8ddc9.js";import{C as B}from"./ChooseImage-159bf536.js";import{P as F}from"./PaddedDashboardContent-5e9ee9d0.js";import"./alerts-5f981877.js";import"./Spinner-6c54e570.js";import"./EditButton-a14de60d.js";import"./index-96501707.js";import"./BackButton-cfa40a5d.js";import"./motion-9c0c3292.js";import"./Tabs-fa70c7ea.js";import"./useClick-044ac582.js";import"./Localization-efa65e34.js";import"./FullSpinnerWrapper-67cd3ccc.js";import"./FullSpinner-02516e71.js";import"./RestPagination-a515a2a7.js";
1import"./UploadNewImage-45a33559.js";import"./FileSelect-736c71c4.js";import"./DashboardLayout-81574c43.js";import"./ChevronLeft-01471edc.js";import"./Logo-195fa348.js";const j=({album:a})=>{const[f,s]=n.useState(!1),{form:r,setAll:m,setFormValue:o,toggleBoolean:g}=N({name:"",name_malayalam:"",description:"",description_malayalam:"",cover_image:"",published:!1,event_date:""}),l=y(!1);n.useEffect(()=>{a!=null&&m({name:a.name,name_malayalam:a.name_malayalam==null?"":a.name_malayalam,description:a.description==null?"":a.description,description_malayalam:a.description_malayalam==null?"":a.description_malayalam,cover_image:a.cover_photo,published:a.published===1,event_date:a.event_date==null?"":a.event_date})},[a,m]);const h=D(r.name),v=()=>{s(!0)},u=i=>{if(s(!1),i==null||i.url==null){o("cover_image")("");return}o("cover_image")(i.url)},_=i=>{i.preventDefault(),x.post("/manage-gallery",{...r,id:a==null?"":a.id,url:h})};return t(d,{children:[t(M,{children:[e(E,{title:a==null?"Add Album":"Edit "+a.name,back:a==null?"/manage-gallery":"/manage-gallery/"+a.id}),t("form",{className:"mt-10 flex flex-col gap-5",onSubmit:_,children:[t("div",{className:"grid grid-cols-1 gap-5 md:grid-cols-2",children:[e("div",{className:"flex flex-col",children:e(c,{setData:o("name"),data:r.name,label:"Name *",error:l.name})}),e("div",{className:"flex flex-col",children:e(c,{setData:o("name_malayalam"),data:r.name_malayalam,label:"Name (Malayalam)",error:l.nameMalayalam})})]}),t("div",{className:"grid grid-cols-1 gap-5 md:grid-cols-2",children:[e("div",{className:"flex flex-col",children:e(p,{setData:o("description"),data:r.description,label:"Description *",error:l.description})}),e("div",{className:"flex flex-col",children:e(p,{setData:o("description_malayalam"),data:r.description_malayalam,label:"Description (Malayalam)",error:l.descriptionMalayalam})})]}),e("div",{className:"grid grid-cols-2 gap-5",children:e("div",{className:"flex flex-col",children:e(P,{label:"Event Date",data:r.event_date,setData:o("event_date"),error:l.event_date})})}),e("div",{className:"flex flex-col",children:e(I,{toggle:g("published"),data:r.published,label:"Publish Gallery",error:l.published})}),e("div",{className:"flex justify-start",children:e(A,{onClick:v})}),t("div",{className:"flex flex-col gap-3",children:[r.cover_image!=""&&e("img",{className:"h-16 w-16 rounded-full",src:r.cover_image,loading:"lazy"}),l.cover_image!=null&&e("span",{className:"error-text",children:l.cover_image})]}),e("div",{className:"flex items-center ",children:e(C,{label:a==null?"CREATE":"UPDATE"})})]})]}),e(d,{children:f&&e(k,{setShowModal:s,title:"Add Image",large:!0,children:e(B,{onImage:u})})})]})},ce=({album:a})=>e(F,{children:e(j,{album:a})});export{ce 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.