PageSourceSearch

https://mygtc.app/assets/UpdateInvitationGroup-D7zemdwr.js

js mygtc.app collected 2026-10-03 22:55:06 UTC 3,980 bytes, 1 lines download raw bytes

1import{A as e,Dt as t,Kt as r,Q as o,S as a,V as l,at as i,b as n,d as s,f as p,gt as m,nt as c,p as u,vt as d}from"./runtime-core.esm-bundler-DQQ_4B2-.js";import"./modalManager-CNln-kP4.js";import"./vue-types-Cyjj0J5i.js";import"./vc-trigger-B4FAFrG7.js";import{n as v,t as f}from"./form-D363g1kf.js";import"./GtcTable-D-ltUCkD.js";import"./compressor-Dd_idyYq.js";import{Ot as j,n as g}from"./components-JR0eFQrd.js";import"./CountryBusinessPermissionTip-D5AMQcRd.js";import{Rt as G}from"./store-V8lH7rZL.js";import"./GtcRangePicker-DoOk62gb.js";import"./GtcDatePicker-BY-8STi6.js";import{n as b}from"./vue-i18n-Cwve0frC.js";import"./__vite-browser-external-BXEh5nXE.js";import"./en-US-Bx_dxbVL.js";import"./lodash-Bd9D_7c2.js";import"./SvgIcon-CSrwEzy_.js";import"./notifications-BiAl65R7.js";import"./GtcButton-D-OBgleC.js";import"./GtcBreadcrumb-Dq6l-3EA.js";import"./GtcEmpty-nrm-xACr.js";import"./out-platform-copy-SCLoREgB.js";import"./GtcAmountInput-BrNITUqt.js";import"./RiskControlWarning-BLjUWlAJ.js";import"./gtc-alert-ByPmEyZN.js";import"./GtcInput-1pNUIAoM.js";import"./GtcSelect-mYnm6Km9.js";import"./m-kline-chart-CLUGXzP_.js";import"./klinechart-pro-HcVGhB-P2.js";import"./core-DJQE0WV0.js";import"./ZSlider-BbJMpYL-.js";var h={class:"w-full my-6 gap-4 flex flex-col ink-14 text-ink-950"},_={class:"flex items-center gap-2"},y=a({__name:"UpdateInvitationGroup",props:e({title:null,record:null,onSubmit:{type:Function}},{open:{type:Boolean,default:!1},openModifiers:{}}),emits:e(["cancel","confirm"],["update:open"]),setup(e,{emit:a}){const y=o(e,"open"),k=e,x=a,{loading:I,data:w}=G({url:"/api/agent/open_group_item",params:{member_id:k.record.member_id}}),S=s(()=>(w.value||[]).map(e=>{const{exchange_name:t,server_id:r,group:o}=e;return{label:t,value:r,children:(o||[]).map(e=>{const{invent_code:t,tag:r}=e;return{label:r,value:t}})}})),C=m({selectedGroup:[]});c(()=>[w.value,k.record.from_invent_code],([e,t])=>{e&&t&&(C.selectedGroup=(e=>{if(!e||0===e.length)return[];const t=[],r=w.value||[];return e.forEach(e=>{for(const o of r){const r=(o.group||[]).find(t=>t.invent_code===e);if(r){t.push([o.server_id,r.invent_code]);break}}}),t})(t.split(",")))},{immediate:!0});const{t:P}=b(),B=d({selectedGroup:[{validator:(e,t)=>{const r=P("modals.updateInvitationGroup.validation.selectGroupRequired");return t&&0!==t.length?t.some(e=>!Array.isArray(e)||e.length<2||!e[1])?Promise.reject(new Error(r)):Promise.resolve():Promise.reject(new Error(r))},trigger:["change","blur"]}]}),R=d(!1),A=d(),D=()=>{x("cancel")},E=async()=>{if(!R.value){try{await(A.value?.validate())}catch(e){return}R.value=!0;try{const e=C.selectedGroup.map(e=>e[1]);await k.onSubmit(e),x("confirm")}catch(e){}finally{R.value=!1}}};return(o,a)=>{const s=v,m=f;return l(),u(j,{open:y.value,title:e.title,"confirm-loading":R.value,width:"500px","ok-text":t(P)("modals.updateInvitationGroup.button.submit"),"cancel-text":t(P)("modals.updateInvitationGroup.button.cancel"),onOk:E,onCancel:D},{default:i(()=>[n(m,{ref_key:"formRef",ref:A,model:C,"required-mark":!1,layout:"vertical",rules:B.value},{default:i(()=>[p("div",h,[p("div",null,r(e.record.realname||"")+"-"+r(e.record.email||""),1),p("div",_,[p("div",null,r(t(P)("modals.updateInvitationGroup.label.parentName")),1),p("div",null,r(e.record.parent_realname||""),1)]),n(s,{name:"selectedGroup",label:t(P)("modals.updateInvitationGroup.label.invitationGroup")},{default:i(()=>[n(t(g),{allowClear:"",multiple:"",showSearch:"",options:S.value,disabled:t(I),loading:t(I),value:C.selectedGroup,"onUpdate:value":a[0]||(a[0]=e=>C.selectedGroup=e),"show-checked-strategy":"SHOW_CHILD","max-tag-count":2,placeholder:t(P)("modals.updateInvitationGroup.placeholder.selectGroup"),"field-names":{label:"label",value:"value",children:"children"}},null,8,["options","disabled","loading","value","placeholder"])]),_:1},8,["label"])])]),_:1},8,["model","rules"])]),_:1},8,["open","title","confirm-loading","ok-text","cancel-text"])}}});export{y 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.