PageSourceSearch

https://boardowl.com/assets/MembershipPlansMaintenance-f1f951a2.js

js boardowl.com collected 2026-10-04 06:50:59 UTC 3,347 bytes, 1 lines download raw bytes

1var k=Object.defineProperty;var U=(t,e,s)=>e in t?k(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s;var P=(t,e,s)=>(U(t,typeof e!="symbol"?e+"":e,s),s);import{aA as V,aB as I,at as L,h as d,i as R,aC as x,d as S,n as E,m,b as h,e as f,f as _,u as b,c as D,w as A,q as $,H as g,b9 as i,o as u,I as q}from"./index-58382804.js";import{D as F}from"./DataTable-14eccf43.js";import{_ as G,a as j}from"./DynamicInputType.vue_vue_type_script_setup_true_lang-1bed0ec3.js";import"./Input-79fd3556.js";import"./Dropdown-e90694bd.js";import"./ExpandIcon-c026ef46.js";import"./CloseIcon.vue_vue_type_script_setup_true_lang-65198601.js";import"./CustomCheckbox-e43b3b7d.js";class y{static async getMembershipPlans(){return(await V({url:`${this.rootUrl}`})).data}static async updateMembershipPlan(e,s,c,a,l,p){return(await I({url:`${this.rootUrl}update`,data:{id:e,name:s,recurringPrice:c,oneOffPrice:a,benefits:l,isCompany:p}})).data}}P(y,"rootUrl","/api/membershipplans/");const H=L("membershipPlans",()=>{const t=d([]),e=R(),s=async()=>{try{const a=await y.getMembershipPlans();a.success?t.value=a.data:e.showMessageBox(a.errorMessage,"Get Membership Plans","gemp")}catch(a){x(e.showMessageBox,a,"mep1")}};return{membershipPlans:t,getMembershipPlans:s,updateMembershipPlan:async a=>{try{const l=await y.updateMembershipPlan(a.id,a.name,a.recurringPrice,a.oneOffPrice,a.benefits,a.isCompany);l.success?s():e.showMessageBox(l.errorMessage,"Update Membership Plan","updm")}catch(l){x(e.showMessageBox,l,"mep2")}}}}),W=f("div",{class:"mt-10 d-flex justify-center fs-30px"}," Welcome to Membership Plans Maintenance ",-1),Y={class:"ml-25 mr-25"},z={class:"ml-40 mr-40"},ne=S({__name:"MembershipPlansMaintenance",setup(t){const e=d(!1),s=d(""),c=d(null),a=H();E(()=>{a.getMembershipPlans()});const l=n=>{s.value=n,e.value=!0,c.value={...w.value.find(o=>o.id===s.value)}},p=(n,o)=>{if(n.controlType===i.currency){const r=parseFloat(o);Number.isNaN(r)?o=0:o=r}c.value[n.name]=o},T=()=>{e.value=!1,s.value=""},v=()=>{e.value=!1,a.updateMembershipPlan(c.value),s.value=""},N=m(()=>{const n=[];return n.push(...M.filter(o=>o.showOnTable)),n.push({name:"edit",showOnTable:!0}),n}),C=m(()=>M),w=m(()=>O.value),M=[{name:"id",displayName:"ID",controlType:i.textBox,showOnTable:!0,maxLength:25},{name:"name",displayName:"Name",controlType:i.textBox,showOnTable:!0,maxLength:100},{name:"oneOffPrice",displayName:"One-off Price",controlType:i.currency,showOnTable:!0},{name:"recurringPrice",displayName:"Reccuring Price",controlType:i.currency,showOnTable:!0},{name:"benefits",displayName:"Benefits",controlType:i.textArea,showOnTable:!1},{name:"isCompany",displayName:"For Company",controlType:i.checkbox,showOnTable:!0}],O=m(()=>a.membershipPlans);return(n,o)=>(u(),h(g,null,[W,f("div",Y,[_(b(F),{headers:N.value,rows:w.value,onEditItem:l},null,8,["headers","rows"]),e.value?(u(),D(b(j),{key:0,title:"Edit Membership Plan",updateEnabled:!0,validationIssues:"",onCancel:T,onUpdate:v},{default:A(()=>[f("div",z,[(u(!0),h(g,null,q(C.value,r=>(u(),h("div",{key:r.name,class:"mb-25"},[_(b(G),{modelValue:c.value[r.name],label:r.displayName,controlType:r.controlType,maxLength:r.maxLength,"onUpdate:modelValue":B=>p(r,B)},null,8,["modelValue","label","controlType","maxLength","onUpdate:modelValue"])]))),128))])]),_:1})):$("",!0)])],64))}});export{ne 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.