PageSourceSearch

https://bnoon.net/build/assets/Create-CL-8vT4b.js

js bnoon.net collected 2026-09-24 15:07:58 UTC 3,745 bytes, 1 lines download raw bytes

1import{_ as U}from"./AuthenticatedLayout-BgtF0RA-.js";import{k as F,c as N,T as R,r as $,n as I,a as c,b as M,o as i,w as l,d as r,e as a,t as d,u as t,g as m,F as j,j as S,h,i as D,E as y}from"./app-TZrj4Qx7.js";import{s as O}from"./settings-QLQwRoUN.js";import{B as P}from"./BreadcrumbComponent-DlzdHYVr.js";import"./SwitchLang-Ddu7CyDQ.js";import"./usePermission-Cd9JkKQR.js";/* empty css            *//* empty css                                                                            */import"./_plugin-vue_export-helper-DlAUqK2U.js";const q={class:"pagetitle row"},z={class:"section dashboard"},A={class:"row"},G={class:"col-lg-12"},H={class:"card"},J={class:"card-body"},K={class:"card-title"},Q={key:0,class:"error-message"},W={key:0,class:"error-message"},X={class:"mb-3 col-md-6"},Y={key:0,class:"error-message"},Z={class:"mb-3 col-md-6"},x={class:"text-center"},de={__name:"Create",props:{banner:Object},setup(V){const{t:k}=F(),g=O.supportedLanguages,n=V,_=N(()=>!!n.banner),e=R({title:"",image:"",sort_order:0,is_active:!1,translations:g.reduce((o,u)=>(o[u]={title:"",description:""},o),{})});_.value&&(console.log(n.banner),e.title=n.banner.title,e.image=n.banner.image,e.is_active=n.banner.is_active);const v=$([]),w=$(null);I(()=>{e.image&&(v.value=[{name:"Current Image",url:`/storage/${e.image}`}])}),console.log(e.image);const C=o=>{e.image=o.raw,v.value=[o]},B=()=>{e.post(route("banners.store"),{onSuccess:()=>{y({type:"success",message:k("created_successfully")})},onError:()=>{y({type:"error",message:e.errors})}})};return(o,u)=>{const b=c("el-input"),p=c("el-form-item"),L=c("el-upload"),T=c("el-button"),E=c("el-form");return i(),M(U,null,{default:l(()=>[r("div",q,[a(P,{pageTitle:o.$t("banners"),mainRoute:"banners.index",subTitle:o.$t("add_new"),isIndexPage:!1,showMainRoute:!1,homeLabel:o.$t("home")},null,8,["pageTitle","subTitle","homeLabel"])]),r("section",z,[r("div",A,[r("div",G,[r("div",H,[r("div",J,[r("h5",K,d(_.value?o.$t("edit"):o.$t("create")),1),a(E,{model:t(e),rules:o.rules,ref_key:"formRef",ref:w,"label-width":"120px",class:"row g-3"},{default:l(()=>[(i(!0),m(j,null,S(t(g),s=>(i(),m("div",{class:"col-md-6",key:s},[a(p,{label:o.$t("title")+" ("+o.$t(s)+")"},{default:l(()=>[a(b,{modelValue:t(e).translations[s].title,"onUpdate:modelValue":f=>t(e).translations[s].title=f,placeholder:o.$t("title")},null,8,["modelValue","onUpdate:modelValue","placeholder"]),t(e).errors[`translations.${s}.title`]?(i(),m("div",Q,d(t(e).errors[`translations.${s}.title`]),1)):h("",!0)]),_:2},1032,["label"]),a(p,{label:o.$t("description")+" ("+o.$t(s)+")"},{default:l(()=>[a(b,{type:"textarea",modelValue:t(e).translations[s].description,"onUpdate:modelValue":f=>t(e).translations[s].description=f,placeholder:o.$t("description"),rows:3},null,8,["modelValue","onUpdate:modelValue","placeholder"]),t(e).errors[`translations.${s}.description`]?(i(),m("div",W,d(t(e).errors[`translations.${s}.description`]),1)):h("",!0)]),_:2},1032,["label"])]))),128)),r("div",X,[a(p,{label:o.$t("sort_order")},{default:l(()=>[a(b,{modelValue:t(e).sort_order,"onUpdate:modelValue":u[0]||(u[0]=s=>t(e).sort_order=s),type:"number",placeholder:o.$t("sort_order"),error:t(e).errors.sort_order},null,8,["modelValue","placeholder","error"]),t(e).errors.sort_order?(i(),m("div",Y,d(t(e).errors.sort_order),1)):h("",!0)]),_:1},8,["label"])]),r("div",Z,[a(p,{label:o.$t("image")},{default:l(()=>[a(L,{action:"","auto-upload":!1,"on-change":C,"list-type":"picture-card"})]),_:1},8,["label"])]),r("div",x,[a(T,{type:"primary",loading:t(e).processing,onClick:B},{default:l(()=>[D(d(_.value?o.$t("update"):o.$t("save")),1)]),_:1},8,["loading"])])]),_:1},8,["model","rules"])])])])])]),r("pre",null,d(n.banner),1)]),_:1})}}};export{de 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.