1import"./base-pe7GV1XZ.js";import{E as R}from"./el-pagination-CFEjM4Hs.js";import"./el-scrollbar-jCUVLUnO.js";import{E as W,a as q}from"./el-select-DWefANXt.js";/* empty css */import"./el-input-CnmL_t4N.js";import{E as H,a as J}from"./el-table-column-CHhKiIHF.js";import"./el-checkbox-STTymSq4.js";import"./el-tooltip-l0sNRNKZ.js";import{r as p,v as K,a as Q,o as Y,c as I,b as u,d as t,w as o,u as Z,g as d,e as v,t as c,j as y,h as k,i as ee,F as te,y as le,_ as ae,m as D}from"./index-yrPBkgLG.js";import{E as oe}from"./el-dialog-RK4c9NpM.js";import"./el-overlay-CmjqFTe9.js";import{E as ne}from"./el-button-DJtZds9M.js";import{t as E}from"./TemplateService-Cw7f5OJc.js";import{s as ie}from"./SkillService-O1Q_gRGU.js";import{E as se}from"./index-CBD4M9Dc.js";import"./event-BB_Ol6Sd.js";import"./index-pfuQmdwN.js";import"./index-M7Y52XAl.js";import"./index-DWme1wXO.js";import"./index-cAzKqqYT.js";import"./aria--JZTNrRr.js";import"./constants-Dnj8X3EN.js";import"./use-form-common-props-C11eZE7M.js";import"./castArray-BFnFmXfp.js";import"./index-DNvpQlGu.js";import"./scroll-CJo2Uqhl.js";import"./toNumber-BXlDze-m.js";import"./index-CCntWDod.js";import"./vnode-B3H-aSbi.js";import"./_baseClone-uLppoVnS.js";import"./omit-DPP0qQjJ.js";import"./debounce-LRtN-bop.js";import"./raf-D65up9Ge.js";import"./index-Df5mbpRH.js";import"./index-DaE5gc7w.js";import"./index-r5W6hzzQ.js";import"./validator-BUysMGcF.js";const re={class:"mb-5 flex justify-end"},pe={class:"flex"},ue={class:"text-lg font-semibold"},de={class:"flex gap-10 my-6"},ce={class:"dialog-footer"},me={class:"flex justify-end mt-4"},Ze={__name:"table",setup(fe){const x=p([]),S=Z(),{locale:M,t:b}=K(),_=p(0),m=p(10),V=p(0),g=p(1),f=p(!1),z=p([]),n=Q({applicationType:null,sourceId:null,skillId:null});function $(e){e?S.push({name:"Update Notification",params:{id:e}}):S.push({name:"Add Notification"})}async function h(){const e=await E.GetAll({skip:_.value,take:m.value});x.value=e.data.content,V.value=e.data.total;const l=await ie.GetAll({params:{take:-1}});z.value=l.data.content}function A(e){m.value=e,g.value=1,_.value=0,h()}function N(e){g.value=e,_.value=(e-1)*m.value,h()}const P=async e=>{try{await se.confirm("Do you realy want to delete?","Error",{confirmButtonText:"Delete",cancelButtonText:"Cancel",type:"error"}),await E.Delete(e),await h(),D.Success("Delete completed")}catch{D.Info("Delete canceled")}};async function U(){const e=await E.PushAll(n);console.log(e),f.value=!1,C()}function X(e){f.value=!0,n.sourceId=e}function j(){f.value=!1,n.sourceId=null,C()}function C(){n.applicationType=null,n.skillId=null}const F=e=>_.value+e+1;return Y(h),(e,l)=>{const r=ne,i=J,w=q,T=W,G=oe,B=ae,O=H,L=R;return d(),I("div",null,[u("div",re,[t(r,{type:"primary",onClick:l[0]||(l[0]=s=>$())},{default:o(()=>[v(c(e.$t("Create")),1)]),_:1})]),t(O,{data:x.value,stripe:"",class:"w-full"},{default:o(()=>[t(i,{type:"index",label:"â",width:"60",index:F}),t(i,{prop:"title.uz",label:"Sarlavha uzb","min-width":"120"}),t(i,{prop:"title.ru",label:"Sarlavha rus","min-width":"120"}),t(i,{prop:"title.cyrl",label:"Sarlavha kiril","min-width":"120"}),t(i,{prop:"title.eng",label:"Sarlavha eng","min-width":"120"}),t(i,{prop:"description.uz",label:"Xabar uzb","min-width":"180"}),t(i,{prop:"description.ru",label:"Xabar rus","min-width":"180"}),t(i,{prop:"description.cyrl",label:"Xabar kiril","min-width":"180"}),t(i,{prop:"description.eng",label:"Xabar eng","min-width":"180"}),t(i,{label:"Tahrirlash","min-width":"300",fixed:"right"},{default:o(({row:s})=>[u("div",pe,[t(G,{modelValue:f.value,"onUpdate:modelValue":l[5]||(l[5]=a=>f.value=a),modal:!1},{footer:o(()=>[u("div",ce,[t(r,{onClick:j},{default:o(()=>[v(c(e.$t("cancel")),1)]),_:1}),t(r,{type:"success",onClick:U},{default:o(()=>[v(c(e.$t("push")),1)]),_:1})])]),default:o(()=>[u("h1",ue,c(y(b)("push_text")),1),u("div",de,[t(T,{modelValue:n.applicationType,"onUpdate:modelValue":l[1]||(l[1]=a=>n.applicationType=a),onChange:l[2]||(l[2]=a=>n.skillId=null),placeholder:y(b)("select_app"),style:{width:"240px"}},{default:o(()=>[(d(),k(w,{key:1,label:"Mening Biznesim",value:1})),(d(),k(w,{key:2,label:"Mening Buyurtmam",value:2}))]),_:1},8,["modelValue","placeholder"]),n.applicationType==1?(d(),k(T,{key:0,modelValue:n.skillId,"onUpdate:modelValue":l[3]||(l[3]=a=>n.skillId=a),placeholder:y(b)("select_skill"),style:{width:"240px"}},{default:o(()=>[(d(!0),I(te,null,le(z.value,a=>(d(),k(w,{key:a.id,label:a.name[y(M)],value:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"])):ee("",!0),t(r,{type:"primary",onClick:l[4]||(l[4]=a=>C())},{default:o(()=>[v(c(e.$t("clear")),1)]),_:1})])]),_:1},8,["modelValue"]),t(r,{type:"success",onClick:a=>X(s.id)},{default:o(()=>[v(c(e.$t("send_all")),1)]),_:1},8,["onClick"]),t(r,{type:"primary",onClick:a=>$(s.id)},{default:o(()=>[t(B,{name:"penWhite",class:"h-4",isSvg:""})]),_:1},8,["onClick"]),t(r,{onClick:a=>P(s.id)},{default:o(()=>[t(B,{name:"trash",class:"h-4",isSvg:""})]),_:1},8,["onClick"])])]),_:1})]),_:1},8,["data"]),u("div",me,[t(L,{"current-page":g.value,"onUpdate:currentPage":l[6]||(l[6]=s=>
1g.value=s),"page-size":m.value,"onUpdate:pageSize":l[7]||(l[7]=s=>m.value=s),"page-sizes":[10,20,50,100],total:V.value,layout:"total, sizes, prev, pager, next",onSizeChange:A,onCurrentChange:N},null,8,["current-page","page-size","total"])])])}}};export{Ze 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.