"use strict";(self["webpackChunkacctg_ui"]=self["webpackChunkacctg_ui"]||[]).push([[8276],{5836:function(e,t,a){a.d(t,{q:function(){return r}});var n=a(2262),o=a(6252),s=a(8877);function r(){const e=(0,n.iH)([{alert_container:null}]),t=(0,n.qj)({header:"",icon:null,message:null});function a(e){1===e?(t.header="You have unsaved changes!",t.message="You will lose all changes you made. Are you sure you wish to close?"):alert("Undefined modal scope")}return(0,o.bv)((()=>{e.alert_container=new s.u_("#main-alert",{})})),{alertContent:t,setAlertState:a,state:e}}},9791:function(e,t,a){a.d(t,{R:function(){return r}});var n=a(8877),o=a(2262),s=a(6252);function r(){const e=(0,o.iH)([{notification_container:null}]),t=(0,o.iH)(0),a=(0,o.iH)(!0),r=(0,o.qj)({toastHeader:null,toastMessage:null});function u(){t.value=Math.floor(2*Math.random()),a.value=0!==t.value,l(t.value)}function l(e,t){0!==e?(r.toastHeader="Success",r.toastMessage=t,a.value=!0):(r.toastHeader="Failed",r.toastMessage=t,a.value=!1)}return(0,s.bv)((()=>{e.notification_container=new n.FN("#main-notification",{})})),{toastTexts:r,successIcon:a,generateRandom:u,setNotificationMessage:l,state:e}}},8276:function(e,t,a){a.r(t),a.d(t,{default:function(){return _}});a(560);var n=a(6252),o=a(2262),s=a(5113),r=a(4707),u=a(5836),l=a(9791),c=a(2201);const i={class:"p-3"},d={class:"d-flex justify-content-between"},p=(0,n._)("h2",null,"Journal Vouchers",-1),h={class:"btn-container d-flex justify-content-end"},m=(0,n._)("thead",null,[(0,n._)("tr",null,[(0,n._)("th",null,"Transaction Date"),(0,n._)("th",null,"Voucher No."),(0,n._)("th",null,"Particulars"),(0,n._)("th",null,"Total Amount")])],-1);var f={__name:"JournalVoucherList",props:["header"],setup(e){const t=(0,c.tv)(),a=((0,r.S)(),(0,u.q)()),f=(0,l.R)(),v=()=>{t.push({name:"addJournalVoucher"})},_=s,g=[{data:"transactionDate"},{data:"voucherNo"},{data:null,render:(e,t,a,n)=>`<span class="fs-5">${e.description}</span><br /><span>${e.suppliersName}</span>`},{data:"totalAmount"}];return(e,t)=>{const s=(0,n.up)("font-awesome-icon"),r=(0,n.up)("TableContainer"),u=(0,n.up)("Notification"),l=(0,n.up)("AlertContainer");return(0,n.wg)(),(0,n.iD)("div",i,[(0,n._)("div",null,[(0,n._)("div",d,[p,(0,n._)("div",h,[(0,n._)("button",{class:"add-btn btn btn-primary",onClick:v},[(0,n.Wm)(s,{icon:"fa-solid fa-plus"}),(0,n.Uk)(" Add Journal Voucher ")])])]),(0,n.Wm)(r,{columns:g,data:(0,o.SU)(_),class:"mt-3 header-alignment voucher-alignment"},{tableHeader:(0,n.w5)((()=>[m])),_:1},8,["data"])]),(0,n.Wm)(u,{isSuccess:(0,o.SU)(f).successIcon.value,message:(0,o.SU)(f).toastTexts.toastMessage,header:(0,o.SU)(f).toastTexts.toastHeader},null,8,["isSuccess","message","header"]),(0,n.Wm)(l,{alertHeader:(0,o.SU)(a).alertContent.header,"close-btn":!0,"proceed-btn":!0},null,8,["alertHeader"])])}}};const v=f;var _=v},5113:function(e){e.exports=JSON.parse('[{"transactionDate":"21-Jan-2023","voucherNo":"V0001","description":"Accounting","suppliersName":"Something","totalAmount":"$200,000"},{"transactionDate":"24-May-2023","voucherNo":"V0002","description":"Accounting","suppliersName":"Shiva","totalAmount":"$2,000"},{"transactionDate":"15-Feb-2023","voucherNo":"V0003","description":"Database Services","suppliersName":"Oracle","totalAmount":"$2,000"},{"transactionDate":"24-Mar-2023","voucherNo":"V0004","description":"Furniture","suppliersName":"IKEA","totalAmount":"$2,000"}]')}}]);
//# sourceMappingURL=8276.ff63d6da.js.map