File manager - Edit - /var/www/payraty/inventory_main/public/js/chunks/85.2f6be6747cc98a12.js
Back
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[85],{85:(t,e,n)=>{n.r(e),n.d(e,{default:()=>o});const a={props:["currency_symbol"],data:function(){return{formData:{items:[{item_name:"",amount:0,item_qty:1,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.quantity")))]),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:"number",name:"data["+a+"][item_qty]",maxlength:"100",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:{min:"0",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,r){var m,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=n,l._compiled=!0),a&&(l.functional=!0),s&&(l._scopeId="data-v-"+s),i?(m=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)},l._ssrRegister=m):o&&(m=r?function(){o.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:o),m)if(l.functional){l._injectStyles=m;var u=l.render;l.render=function(t,e){return m.call(e),u(t,e)}}else{var c=l.beforeCreate;l.beforeCreate=c?[].concat(c,m):[m]}return{exports:t,options:l}}n.d(e,{Z:()=>a})}}]);
| ver. 1.4 |
Github
|
.
| PHP 8.3.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings