File manager - Edit - /var/www/payraty/inventory_main/public/js/chunks/845.dc55c6c61469d2e7.js
Back
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[845],{845:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const a={props:["item_data","currency_symbol"],data:function(){return{formData:{items:[{item_name:"",item_qty:1,amount:0,note:""}]}}},mounted:function(){var t=this;this.formData.items=[],this.item_data.map((function(e){t.formData.items.push({item_name:e.item_name,item_qty:e.item_qty,amount:e.amount,note:e.note})}))},computed:{calculateTotal:function(){var t=0;return this.formData.items.map((function(e){t+=Number(e.amount)})),t}},methods:{addItem:function(){this.formData.items.push({item_name:"",item_qty:1,amount:0,note:""})},deleteItem:function(t){this.formData.items.splice(t,1)}}};const o=(0,n(1900).Z)(a,(function(){var t=this,e=t._self._c;return e("div",[e("table",{staticClass:"table table-bordered table-striped table-sm"},[e("thead",[e("tr",[e("th",[t._v(t._s(t.__("custom.item_name")))]),t._v(" "),e("th",[t._v(t._s(t.__("custom.item_qty")))]),t._v(" "),e("th",[t._v(t._s(t.__("custom.amount"))+"("+t._s(t.currency_symbol)+")")]),t._v(" "),e("th",[t._v(t._s(t.__("custom.note")))]),t._v(" "),e("th",[t._v(t._s(t.__("custom.total")))])])]),t._v(" "),e("tbody",t._l(t.formData.items,(function(n,a){return e("tr",{key:a},[e("td",[e("input",{directives:[{name:"model",rawName:"v-model",value:n.item_name,expression:"item.item_name"}],staticClass:"form-control",attrs:{type:"text",name:"data["+a+"][item_name]",maxlength:"100",placeholder:"Item name"},domProps:{value:n.item_name},on:{input:function(e){e.target.composing||t.$set(n,"item_name",e.target.value)}}})]),t._v(" "),e("td",[e("input",{directives:[{name:"model",rawName:"v-model",value:n.item_qty,expression:"item.item_qty"}],staticClass:"form-control",attrs:{type:"text",name:"data["+a+"][item_qty]",placeholder:"Item quantity"},domProps:{value:n.item_qty},on:{input:function(e){e.target.composing||t.$set(n,"item_qty",e.target.value)}}})]),t._v(" "),e("td",[e("input",{directives:[{name:"model",rawName:"v-model",value:n.amount,expression:"item.amount"}],staticClass:"form-control",attrs:{type:"number",name:"data["+a+"][amount]",placeholder:"Amount"},domProps:{value:n.amount},on:{input:function(e){e.target.composing||t.$set(n,"amount",e.target.value)}}})]),t._v(" "),e("td",[e("input",{directives:[{name:"model",rawName:"v-model",value:n.note,expression:"item.note"}],staticClass:"form-control",attrs:{type:"text",name:"data["+a+"][note]",maxlength:"100",placeholder:"Note"},domProps:{value:n.note},on:{input:function(e){e.target.composing||t.$set(n,"note",e.target.value)}}})]),t._v(" "),e("td",[e("button",{staticClass:"btn btn-sm btn-outline-danger",on:{click:function(e){return t.deleteItem(a)}}},[e("i",{staticClass:"fa fa-trash"})])])])})),0),t._v(" "),e("tfoot",[e("tr",[e("td",{attrs:{colspan:"4"}},[e("label",{attrs:{for:""}},[t._v(t._s(t.__("custom.total")))])]),t._v(" "),e("td",[e("p",[e("b",[t._v(t._s(t.currency_symbol)+t._s(t.calculateTotal))])])])])])]),t._v(" "),e("button",{staticClass:"btn btn-info btn-sm",attrs:{type:"button"},on:{click:t.addItem}},[e("i",{staticClass:"fa fa-plus"}),t._v(" "+t._s(t.__("custom.add_item"))+"\n ")])])}),[],!1,null,null,null).exports},1900:(t,e,n)=>{function a(t,e,n,a,o,s,i,m){var r,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),a&&(u.functional=!0),s&&(u._scopeId="data-v-"+s),i?(r=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},u._ssrRegister=r):o&&(r=m?function(){o.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:o),r)if(u.functional){u._injectStyles=r;var l=u.render;u.render=function(t,e){return r.call(e),l(t,e)}}else{var _=u.beforeCreate;u.beforeCreate=_?[].concat(_,r):[r]}return{exports:t,options:u}}n.d(e,{Z:()=>a})}}]);
| ver. 1.4 |
Github
|
.
| PHP 8.3.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings