PageSourceSearch

https://kiku.listen.org/2861.cdb9a82c52c1735d.bundle.js

js listen.org collected 2026-10-02 06:41:03 UTC 20,698 bytes, 1 lines download raw bytes

1"use strict";(self["webpackChunkclient"]=self["webpackChunkclient"]||[]).push([[2861],{72861:function(e,t,s){s.r(t),s.d(t,{default:function(){return ae}});s(18111),s(22489);var a=s(20641),l=s(90033);const i={key:0},n={class:"level"},r={class:"level-left"},u={class:"title"},o={class:"columns sticky mt-0 mx-0 mb-3"},d={class:"column feeFilters"},c={class:"fee-filter-label"},h={class:"fee-filter-label"},p={class:"fee-filter-label"},m={class:"dropdown-item fee-unit-search"},f={class:"fee-unit-option"},y={class:"column feeSummary"},v={class:"is-flex th-buttons"},g={key:0,class:"fee-table-wrapper"},k={class:"table has-mobile-cards"},b={class:"evenBackground"},C={class:"evenBackground"},F={class:"evenBackground"},L={class:"nowrap"},I={class:"whiteBg"},$={class:"whiteBg"},_={class:"whiteBg"},P={key:0,class:"fee-unit-tag"},U={class:"whiteBg"},w=["value"],E={key:1,class:"is-size-7 nowrap"},N={key:0,class:"columns"},T={key:0,class:"column"},V={class:"icon-text"},X={key:1,class:"column"},A={class:"note py-4 is-size-6-half"},D={class:"icon-text"},x={class:"icon is-small has-text-success"},W={class:"icon-text"},O={class:"icon is-small has-text-warning"},S={class:"icon-text"},Y={class:"icon is-small has-text-warning"};function B(e,t,s,B,M,Q){const K=(0,a.g2)("b-radio-button"),G=(0,a.g2)("b-field"),R=(0,a.g2)("font-awesome-icon"),q=(0,a.g2)("b-button"),z=(0,a.g2)("b-dropdown-item"),H=(0,a.g2)("b-dropdown"),j=(0,a.g2)("b-input"),J=(0,a.g2)("b-loading"),Z=(0,a.g2)("UserTypeThumbnail"),ee=(0,a.g2)("router-link"),te=(0,a.g2)("b-select"),se=(0,a.g2)("b-checkbox");return(e.isGranted("FINANCIAL_LOCAL")||Q.isUnitAdmin)&&e.tenant.settingFeatures.fees.hasLocalCenterMembersTable?((0,a.uX)(),(0,a.CE)("section",i,[(0,a.Lk)("div",n,[(0,a.Lk)("div",r,[(0,a.Lk)("h2",u,(0,l.v_)(e.$t("memberFees"))+" - "+(0,l.v_)(M.localCenterName),1)])]),t[12]||(t[12]=(0,a.Lk)("hr",null,null,-1)),(0,a.Lk)("div",o,[(0,a.Lk)("div",d,[e.tenant.settingFeatures.fees.feeLocalExists&&M.feeLocalProduct?((0,a.uX)(),(0,a.Wv)(G,{key:0},{default:(0,a.k6)(()=>[(0,a.bF)(K,{modelValue:M.filter.type,"onUpdate:modelValue":[t[0]||(t[0]=e=>M.filter.type=e),Q.changeFeeType],"native-value":"tenant"},{default:(0,a.k6)(()=>[(0,a.eW)((0,l.v_)(e.$t("tenant")),1)]),_:1},8,["modelValue","onUpdate:modelValue"]),(0,a.bF)(K,{modelValue:M.filter.type,"onUpdate:modelValue":[t[1]||(t[1]=e=>M.filter.type=e),Q.changeFeeType],"native-value":"local"},{default:(0,a.k6)(()=>[(0,a.eW)((0,l.v_)(e.$t("local")),1)]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:1})):(0,a.Q3)("",!0),M.filterYears?((0,a.uX)(),(0,a.Wv)(G,{key:1},{default:(0,a.k6)(()=>[(0,a.bF)(H,{modelValue:M.filterYear,"onUpdate:modelValue":[t[2]||(t[2]=e=>M.filterYear=e),Q.loadFees],"aria-role":"list",class:"fee-filter-dropdown",scrollable:"","max-height":"280px"},{trigger:(0,a.k6)(()=>[(0,a.bF)(q,{class:"is-rounded fee-filter-trigger"},{default:(0,a.k6)(()=>[(0,a.Lk)("span",c,(0,l.v_)(M.filterYear),1),(0,a.bF)(R,{icon:"fa-light fa-chevron-down",class:"ml-2"})]),_:1})]),default:(0,a.k6)(()=>[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(M.filterYears,e=>((0,a.uX)(),(0,a.Wv)(z,{key:e,value:e,"aria-role":"listitem",class:(0,l.C4)({"is-active":M.filterYear===e})},{default:(0,a.k6)(()=>[(0,a.eW)((0,l.v_)(e),1)]),_:2},1032,["value","class"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:1})):(0,a.Q3)("",!0),(0,a.bF)(G,null,{default:(0,a.k6)(()=>[(0,a.bF)(H,{modelValue:M.filter.status,"onUpdate:modelValue":[t[3]||(t[3]=e=>M.filter.status=e),Q.loadFees],"aria-role":"list",class:"fee-filter-dropdown",scrollable:"","max-height":"280px"},{trigger:(0,a.k6)(()=>[(0,a.bF)(q,{class:"is-rounded fee-filter-trigger"},{default:(0,a.k6)(()=>[(0,a.Lk)("span",h,(0,l.v_)(Q.statusLabel),1),(0,a.bF)(R,{icon:"fa-light fa-chevron-down",class:"ml-2"})]),_:1})]),default:(0,a.k6)(()=>[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(Q.statusOptions,e=>((0,a.uX)(),(0,a.Wv)(z,{key:e.value,value:e.value,"aria-role":"listitem",class:(0,l.C4)({"is-active":M.filter.status===e.value})},{default:(0,a.k6)(()=>[(0,a.eW)((0,l.v_)(e.label),1)]),_:2},1032,["value","class"]))),128))]),_:1},8,["modelValue","onUpdate:modelValue"])]),_:1}),Q.unitOptions.length?((0,a.uX)(),(0,a.Wv)(G,{key:2},{default:(0,a.k6)(()=>[(0,a.bF)(H,{modelValue:M.selectedUnitId,"onUpdate:modelValue":t[5]||(t[5]=e=>M.selectedUnitId=e),"aria-role":"list",class:"fee-filter-dropdown fee-unit-dropdown",scrollable:"","max-height":"320px",onActiveChange:Q.onUnitDropdownToggle},{trigger:(0,a.k6)(()=>[(0,a.bF)(q,{class:"is-rounded fee-filter-trigger"},{default:(0,a.k6)(()=>[Q.selectedUnit?((0,a.uX)(),(0,a.CE)("span",{key:0,class:"fee-unit-dot",style:(0,l.Tr)({backgroundColor:Q.selectedUnit.color||"transparent"})},null,4)):(0,a.Q3)("",!0),(0,a.Lk)("span",p,(0,l.v_)(Q.unitFilterLabel),1),(0,a.bF)(R,{icon:"fa-light fa-chevron-down",class:"ml-2"})]),_:1})]),default:(0,a.k6)(()=>[(0,a.Lk)("div",m,[(0,a.bF)(j,{ref:"unitSearchInput",modelValue:M.unitSearch,"onUpdate:modelValue":t[4]||(t[4]=e=>M.unitSearch=e),placeholder:e.$t("search"),size:"is-small",icon:"magnifying-glass","icon-pack":"fa-light"},null,8,["modelValue","placeholder"])]),(0,a.bF)(z,{value:"all","aria-role":"listitem",class:(0,l.C4)({"is-active":"all"===M.selectedUnitId})},{default:(0,a.k6)(()=>[(0,a.eW)((0,l.v_)(e.$t("allUnits")),1)]),_:1},8,["class"]),((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(Q.filteredUnitGroups,e=>((0,a.uX)(),(0,a.CE)(a.FK,{key:e.typeId??"noType"},[t[9]||(t[9]=(0,a.Lk)("hr",{class:"dropdown-divider"},null,-1)),((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(e.units,e=>((0,a.uX)(),(0,a.Wv)(z,{key:e.id,value:e.id,"aria-role":"listitem",class:(0,l.C4)({"is-active":M.selectedUnitId===e.id})},{default:(0,a.k6)(()=>[(0,a.Lk)("span",f,[(0,a.Lk)("span",{class:"fee-unit-dot",style:(0,l.Tr)({backgroundColor:e.color||"transparent"})},null,4),(0,a.eW)(" "+(0,l.v_)(e.name),1)])]),_:2},1032,["value","class"]))),128))],64))),128)),Q.filteredUnitGroups.length?(0,a.Q3)("",!0):((0,a.uX)(),(0,a.Wv)(z,{key:0,custom:"","aria-role":"listitem",class:"has-text-grey"},{default:(0,a.k6)(()=>[(0,a.eW)((0,l.v_)(e.$t("noResults")),1)]),_:1})),t[10]||(t[10]=(0,a.Lk)("hr",{class:"dropdown-divider"},null,-1)),(0,a.bF)(z,{value:"none","aria-role":"listitem",class:(0,l.C4)({"is-active":"none"===M.selectedUnitId})},{default:(0,a.k6)(()=>[(0,a.eW)((0,l.v_)(e.$t("noUnit")),1)]),_:1},8,["class"])]),_:1},8,["modelValue","onActiveChange"])]),_:1})):(0,a.Q3)("",!0)]),(0,a.Lk)("div",y,[(0,a.Lk)("div",v,[(0,a.Lk)("span",null,[(0,a.Lk)("strong",null,"Total: "+(0,l.v_)(e.$filters.money(Q.totalFeeValue,M.currency)),1)]),Q.canManageFees?((0,a.uX)(),(0,a.CE)("button",{key:0,class:(0,l.C4)(["button is-primary is-rounded",{"is-loading":e.$store.state.isLoadingButton}]),style:{margin:"0 10px 0 15px"},onClick:t[6]||(t[6]=e=>Q.saveNewPayment(!1))},(0,l.v_)(e.$t("save")),3)):(0,a.Q3)("",!0),Q.canRecordPayment&&Q.totalFeeValue>0&&M.membersFees.length?((0,a.uX)(),(0,a.CE)("button",{key:1,class:(0,l.C4)(["button is-success is-rounded",{"is-loading":e.$store.state.isLoadingButton}]),style:{"margin-right":"30px"},onClick:t[7]||(t[7]=e=>Q.saveNewPayment(!0))},(0,l.v_)(e.$t("pay"))+" "+(0,l.v_)(e.$filters.money(Q.totalFeeValue,M.currency)),3)):(0,a.Q3)("",!0)])])]),(0,a.Lk)("div",null,[(0,a.bF)(J,{modelValue:M.isLoading,"onUpdate:modelValue":t[8]||(t[8]=e=>M.isLoading=e),"is-full-page":!1},null,8,["modelValue"]),!M.isLoading&&M.membersFees.length?((0,a.uX)(),(0,a.CE)("div",g,[(0,a.Lk)("table",k,[(0,a.Lk)("thead",null,[(0,a.Lk)("tr",null,[t[11]||(t[11]=(0,a.Lk)("th",{class:"evenBackgroun
1d",style:{width:"1%"}},"   ",-1)),(0,a.Lk)("th",b,(0,l.v_)(e.$t("member")),1),(0,a.Lk)("th",C,(0,l.v_)(e.$t("unit")),1),(0,a.Lk)("th",F,(0,l.v_)(e.$t("fee")),1),((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(M.tableColumns,(e,t)=>((0,a.uX)(),(0,a.CE)(a.FK,{key:t},[e?((0,a.uX)(),(0,a.CE)("th",{key:0,class:(0,l.C4)({oddBackground:t%2!==0,evenBackground:t%2===0})},[(0,a.Lk)("span",L,(0,l.v_)(e.periodStartLabel)+" - "+(0,l.v_)(e.periodEndLabel),1)],2)):(0,a.Q3)("",!0)],64))),128))])]),(0,a.Lk)("tbody",null,[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(Q.filteredMembersFees,t=>((0,a.uX)(),(0,a.CE)("tr",{key:t.user.uid},[(0,a.Lk)("td",I,[t.user.type?((0,a.uX)(),(0,a.Wv)(Z,{key:0,"user-type":t.user.type,"is-small":!0},null,8,["user-type"])):(0,a.Q3)("",!0)]),(0,a.Lk)("td",$,[(0,a.bF)(ee,{to:{name:"UserShow",params:{item:t.user.uid}}},{default:(0,a.k6)(()=>[(0,a.eW)((0,l.v_)(e.$filters.personName(t.user)),1)]),_:2},1032,["to"])]),(0,a.Lk)("td",_,[t.user.unit?((0,a.uX)(),(0,a.CE)("span",P,[(0,a.Lk)("span",{class:"fee-unit-dot",style:(0,l.Tr)({backgroundColor:t.user.unit.color||"transparent"})},null,4),(0,a.eW)(" "+(0,l.v_)(t.user.unit.name),1)])):(0,a.Q3)("",!0)]),(0,a.Lk)("td",U,[Q.isFeeEditable(t.user,t.history)?((0,a.uX)(),(0,a.Wv)(te,{key:0,"model-value":null!=t.user.priceId?Number(t.user.priceId):null,loading:!!M.savingFeeFor[t.user.uid],size:"is-small","onUpdate:modelValue":e=>Q.changeFeePrice(t,e)},{default:(0,a.k6)(()=>[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(Q.availableFeePrices,t=>((0,a.uX)(),(0,a.CE)("option",{key:t.id,value:t.id},(0,l.v_)(t.name)+" ("+(0,l.v_)(e.$filters.money(t.price,t.currency||M.currency))+") ",9,w))),128))]),_:1},8,["model-value","loading","onUpdate:modelValue"])):((0,a.uX)(),(0,a.CE)("span",E,(0,l.v_)(t.user.priceName),1))]),((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(M.tableColumns,(s,i)=>((0,a.uX)(),(0,a.CE)("td",{key:i,class:(0,l.C4)({oddBackground:i%2===1,whiteBg:i%2===0})},[((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(t.history,i=>((0,a.uX)(),(0,a.CE)(a.FK,{key:i.intervalId},[void 0===i.notJoined&&i.intervalId===s.intervalId?((0,a.uX)(),(0,a.CE)("div",N,[0===i.unpaid||i.paid&&i.paid>0?((0,a.uX)(),(0,a.CE)("div",T,[(0,a.Lk)("span",V,[(0,a.Lk)("span",{class:(0,l.C4)(["icon is-small",{"has-text-warning":void 0!==i.isPending,"has-text-success":void 0===i.isPending}])},[(0,a.bF)(R,{icon:"fa-light fa-check"})],2),(0,a.Lk)("span",null,(0,l.v_)(i.paid),1)])])):(0,a.Q3)("",!0),i.unpaid>0&&e.userTypeEligibleForFee(t.user)?((0,a.uX)(),(0,a.CE)("div",X,[void 0!==i.paid&&0!==i.paid||void 0!==i.intervals?(0,a.Q3)("",!0):((0,a.uX)(),(0,a.Wv)(se,{key:0,modelValue:M.newPayment[t.user.uid+":"+i.intervalId],"onUpdate:modelValue":e=>M.newPayment[t.user.uid+":"+i.intervalId]=e,"true-value":i.unpaid},{default:(0,a.k6)(()=>[(0,a.eW)((0,l.v_)(parseFloat(i.unpaid)),1)]),_:2},1032,["modelValue","onUpdate:modelValue","true-value"])),((0,a.uX)(!0),(0,a.CE)(a.FK,null,(0,a.pI)(i.intervals,e=>((0,a.uX)(),(0,a.CE)(a.FK,{key:e.intervalId},[e&&void 0!==e.missing&&i.intervals&&e.intervalId?((0,a.uX)(),(0,a.Wv)(se,{key:0,modelValue:M.newPayment[t.user.uid+":"+e.intervalId],"onUpdate:modelValue":s=>M.newPayment[t.user.uid+":"+e.intervalId]=s,"true-value":e.amount},{default:(0,a.k6)(()=>[(0,a.eW)((0,l.v_)(parseFloat(e.amount)),1)]),_:2},1032,["modelValue","onUpdate:modelValue","true-value"])):(0,a.Q3)("",!0)],64))),128))])):(0,a.Q3)("",!0)])):(0,a.Q3)("",!0)],64))),128))],2))),128))]))),128))])])])):(0,a.Q3)("",!0),(0,a.Lk)("div",A,[(0,a.Lk)("p",null,(0,l.v_)(e.$t("feeOnlyThisLocalCenterPaid")),1),(0,a.Lk)("p",null,[(0,a.Lk)("span",D,[(0,a.Lk)("span",x,[(0,a.bF)(R,{icon:"fa-light fa-check"})]),(0,a.Lk)("span",null,(0,l.v_)(e.$t("paidSuccessfully")),1)])]),(0,a.Lk)("p",null,[(0,a.Lk)("span",W,[(0,a.Lk)("span",O,[(0,a.bF)(R,{icon:"fa-light fa-check"})]),(0,a.Lk)("span",null,(0,l.v_)(e.$t("pendingPayment")),1)])]),(0,a.Lk)("p",null,[(0,a.Lk)("span",S,[(0,a.Lk)("span",Y,[(0,a.bF)(R,{icon:"fa-light fa-square"})]),(0,a.Lk)("span",null,(0,l.v_)(e.$t("unpaid")),1)])])])])])):(0,a.Q3)("",!0)}s(44114),s(20116),s(13579);var M=s(43464),Q=s(40834),K=s(95256),G=s(69133);function R(e,t){return e&&"boolean"===typeof e.feeLocked?!e.feeLocked:!Array.isArray(t)||!t.some(e=>e&&Number(e.paid)>0)}function q(e,t){if(null===t||void 0===t||"all"===t)return!0;const s=e&&e.user&&e.user.unit||null;if("none"===t)return null===s;if(!s)return!1;const a=Array.isArray(s.units)&&s.units.length?s.units:[s.id];return a.includes(t)}function z(e){const t=new Map;for(const s of e||[]){const e=s&&s.user&&s.user.unit;e&&!t.has(e.id)&&t.set(e.id,{id:e.id,name:e.name,color:e.color||null,typeId:e.typeId??null,typeName:e.typeName??null})}return Array.from(t.values()).sort((e,t)=>
1(e.name||"").localeCompare(t.name||""))}function H(e){return(e||"").toString().normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim()}function j(e,t){const s=H(t);return s?(e||[]).filter(e=>H(e.name).includes(s)):e||[]}function J(e){const t=new Map;for(const s of e||[]){const e=s.typeId??"none";t.has(e)||t.set(e,{typeId:s.typeId??null,typeName:s.typeName??null,units:[]}),t.get(e).units.push(s)}return Array.from(t.values()).sort((e,t)=>null===e.typeId||null===t.typeId?e.typeId===t.typeId?0:null===e.typeId?1:-1:(e.typeName||"").localeCompare(t.typeName||""))}var Z=s(48108),ee={data(){new Date;let e=M.M.state.tenant.settingFeatures.fees;return{newPayment:{},localCenterId:this.$route.query.localCenter??null,localCenterName:this.$route.query.localCenterName??null,localCenterDateCreated:null,filterYear:null,filterYears:null,membersFees:[],selectedUnitId:this.$route.query.unit?parseInt(this.$route.query.unit):"all",unitSearch:"",savingFeeFor:{},filter:{type:"tenant",status:"ACTIVE"},isLoading:!1,tableColumns:[],feeProduct:null,feeLocalProduct:null,feeTenantProduct:null,userTypes:null,feeLocalExists:e.feeLocalExists,activeMembers:[],currency:this.$store.state.tenant.currency}},mounted(){this.setLocalCenter(),this.loadNonFeeData()},computed:{...(0,Q.L8)(["isGranted","user","userTypeEligibleForFee","tenant"]),totalFeeValue(){let e=0;for(let t of Object.keys(this.newPayment))this.newPayment[t]&&(e+=this.newPayment[t]);return parseFloat(e.toFixed(2))},isUnitAdmin(){return(0,Z.T)(this.user)},canManageFees(){return!!this.isGranted("ADMIN_TENANT")||(!(!this.isGranted("FINANCIAL_LOCAL")||!this.user.localCenter||parseInt(this.localCenterId)!==this.user.localCenter.id)||this.isUnitAdmin)},canRecordPayment(){return this.canManageFees||this.isUnitAdmin},unitOptions(){return z(this.membersFees)},filteredUnitGroups(){return J(j(this.unitOptions,this.unitSearch))},selectedUnit(){return this.unitOptions.find(e=>e.id===this.selectedUnitId)||null},unitFilterLabel(){return"none"===this.selectedUnitId?this.$t("noUnit"):this.selectedUnit?this.selectedUnit.name:this.$t("allUnits")},statusOptions(){const e=this.tenant.settingFeatures,t=[{value:"ACTIVE",label:this.$t("members")+" : "+this.$t("active")},{value:"INACTIVE",label:this.$t("members")+" : "+this.$t("inactive")},{value:"SUSPENDED",label:this.$t("members")+" : "+this.$t("suspended")}];return e.referral.isActive&&t.push({value:"AWAITING_REFERRAL",label:this.$t("awaiting_referral")}),e.statuses.EXCLUDED&&t.push({value:"EXCLUDED",label:this.$t("members")+" : "+this.$t("excluded")}),e.statuses.HELPING_HANDS&&t.push({value:"HELPING_HANDS",label:this.$t("members")+" : "+this.$t("HELPING_HANDS")}),e.statuses.CONTRIBUTOR&&t.push({value:"CONTRIBUTOR",label:this.$t("members")+" : "+this.$t("CONTRIBUTOR")}),t},statusLabel(){const e=this.statusOptions.find(e=>e.value===this.filter.status);return e?e.label:this.$t("members")},filteredMembersFees(){return this.membersFees.filter(e=>q(e,this.selectedUnitId))},availableFeePrices(){return this.feeProduct?.productPrices??[]}},methods:{isFeeEditable:R,floatTwoDecimals:K.pz,onUnitDropdownToggle(e){e?this.$nextTick(()=>{this.$refs.unitSearchInput&&this.$refs.unitSearchInput.focus()}):this.unitSearch=""},loadDraft(){return this.localCenterId?this.$http.plain.get("/fee-temporary/"+this.localCenterId+"?type="+this.filter.type).then(e=>{this.newPayment=e.data||{}}).catch(e=>{console.error(e),this.newPayment={}}):(this.newPayment={},Promise.resolve())},changeFeeType(){this.isLoading=!0,this.newPayment={},this.membersFees=[],this.feeProduct="local"===this.filter.type?this.feeLocalProduct:this.feeTenantProduct,Promise.all([this.loadDraft(),this.fetchFees()]).finally(()=>{this.isLoading=!1})},changeFeePrice(e,t){const s=Number(t);if(!s||s===Number(e.user.priceId))return;const a=e.user.priceId,l=e.user.priceName;this.savingFeeFor[e.user.uid]=!0,this.$http.plain.post("/user-fee-price/"+e.user.uid,{type:this.filter.type,price:s,year:this.filterYear}).then(t=>{e.user.priceId=t.data.priceId,e.user.priceName=t.data.priceName,e.user.price=t.data.price,this.$buefy.toast.o
1pen({type:"is-success",message:this.$t("feeUpdated")}),this.fetchFees()}).catch(t=>{console.error(t),e.user.priceId=a,e.user.priceName=l;const s=409===t?.response?.status?this.$t("feeAlreadyPaidCannotChange"):this.$t("errorOccurred");this.$buefy.toast.open({type:"is-danger",message:s})}).finally(()=>{this.savingFeeFor[e.user.uid]=!1})},setLocalCenter(){if(this.isGranted("ADMIN_TENANT"))this.localCenterId=this.$route.query.localCenter,this.localCenterName=this.$route.query.localCenterName,this.localCenterId||(this.localCenterId=this.user.localCenter?.id,this.localCenterName=this.user.localCenter?.name);else{if(!this.user.localCenter)return this.$router.push({name:"UserShow",params:{item:this.user.id},query:{fees:1}});this.localCenterId=this.user.localCenter.id,this.localCenterName=this.user.localCenter.name}},saveNewPayment(e){if(!this.localCenterId)return void this.$buefy.snackbar.open({type:"is-danger",message:this.$t("Select a local center")});const t=()=>{e?this.createManualFeePayment("iban"):this.$buefy.snackbar.open({type:"is-success",message:this.$t("updatedSuccessfully")})};this.canManageFees?this.$http.plain.post("/fee-temporary/"+this.localCenterId,{type:this.filter.type,fees:this.newPayment}).then(t).catch(e=>{console.error(e),this.$buefy.snackbar.open({type:"is-danger",message:this.$t("errorOccurred")})}):t()},createManualFeePayment(e){this.$http.plain.post("/fee_payments",{productId:this.feeProduct.id,type:this.filter.type,method:e,fees:this.newPayment,recordLocalCenter:this.localCenterId}).then(e=>{this.$buefy.snackbar.open({type:"is-success",message:this.$t("paymentSavedPending")}),this.newPayment={},this.$router.push({name:"FeePayments"})}).catch(e=>{console.error(e),this.$buefy.snackbar.open({type:"is-danger",message:this.$t("errorOccurred")})})},loadNonFeeData(){this.isLoading=!0,this.localCenterId?this.$http.plain.get("/local_centers/"+this.localCenterId).then(e=>{this.localCenterDateCreated=e.data.dateCreated;const t=e.data.feeProduct,s=t?t.uuid||(t["@id"]?t["@id"].split("/").pop():null):null;return this.$http.plain.get("/products/"+this.tenant.settingFeatures.fees.productUuid).then(e=>{this.feeTenantProduct=e.data;const a=s?this.$http.plain.get("/products/"+s).then(e=>{this.feeLocalProduct=e.data}):Promise.resolve().then(()=>{this.feeLocalProduct=t});return a.then(()=>(this.feeProduct="local"===this.filter.type?this.feeLocalProduct:this.feeTenantProduct,this.$http.plain.get("/roles?isUserType=1").then(e=>(this.userTypes=e.data["hydra:member"],Promise.all([this.loadDraft(),this.loadFees()])))))})}).catch(e=>console.error(e)).finally(()=>{this.isLoading=!1}):this.isLoading=!1},loadFees(){this.isLoading=!0,this.membersFees=[],this.fetchFees().finally(()=>{this.isLoading=!1})},fetchFees(){if(!this.feeProduct)return Promise.resolve();this.filterYear||(this.filterYear=parseInt((new Date).getFullYear()));let e=this.feeProduct.cycleMonth||1,t=("0"+e).slice(-2),s="?after="+this.filterYear+"-"+t+"-01";return s+="&lid="+this.localCenterId+"&status="+this.filter.status,this.$http.plain.get("/fee-history/"+this.filter.type+"/"+this.feeProduct.id+s).then(e=>{this.tableColumns=e.data.intervals;for(let[t,s]of Object.entries(e.data.history))e.data.history[t].user.type=this.userTypes.find(e=>e.id===s.user.typeId);this.membersFees=e.data.history,this.sortByUserType(),"all"===this.selectedUnitId||"none"===this.selectedUnitId||this.unitOptions.some(e=>e.id===this.selectedUnitId)||(this.selectedUnitId="all")}).catch(e=>{console.error(e)})},sortByUserType(){this.membersFees.sort((e,t)=>(e.user.type||(e.user.type={position:0}),t.user.type||(t.user.type={position:0}),e.user.type.position===t.user.type.position?e.user.lastName.localeCompare(t.user.lastName):e.user.type.position-t.user.type.position))}},watch:{feeProduct:function(){let e=new Date,t=e.getFullYear()-1;if("local"===this.filter.type&&this.localCenterDateCreated){let e=new Date(this.localCenterDateCreated);t=e.getFullYear()}else this.feeProduct.startingDate&&(t=(0,K.QE)(this.feeProduct.startingDate).getFullYear());this.filterYears=(0,K.y1)(t,e.getFullYear()+1).reverse(),this.filterYear=e.getFullYear();let s=this.feeProduct.cycleMonth;s&&s>1&&parseInt(e.getMonth())<s&&this.filterYear--}},components:{UserTypeThumbnail:G.A}},te=s(66262);const se=(0,te.A)(ee,[["render",B],["__scopeId","data-v-96a8e982"]]);var ae=se}}]);

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.