File manager - Edit - /var/www/payraty/inventory_main/public/js/chunks/665.f0fb9703dc7b99e7.js
Back
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[665],{7665:(t,e,s)=>{s.r(e),s.d(e,{default:()=>a});const i={props:["attributes"],data:function(){return{items:[{attribute:"",attribute_items:[]}]}},methods:{getAttributeItem:function(t,e){var s=this;if(this.items.filter((function(t){return t.attribute==e.target.value})).length>1)return this.deleteItem(t),void this.$swal("Error!!!","Already added.","warning");axios.get("/admin/api/attribute-items/"+e.target.value).then((function(e){s.items[t].attribute_items=[],s.items[t].attribute_items=e.data})).catch((function(t){}))},addItem:function(){this.items.push({attribute:"",attribute_items:[]})},deleteItem:function(t){this.items.splice(t,1)}}};const a=(0,s(1900).Z)(i,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"row"},[e("div",{staticClass:"col-lg-12"},[e("div",{staticClass:"row"},[e("div",{staticClass:"col-sm-10"},[e("table",{staticClass:"table table-bordered"},t._l(t.items,(function(s,i){return e("tr",{key:i},[e("td",{attrs:{width:"30%"}},[e("select",{directives:[{name:"model",rawName:"v-model",value:s.attribute,expression:"item.attribute"}],staticClass:"form-control",attrs:{name:"attribute_data["+i+"][attribute]"},on:{change:[function(e){var i=Array.prototype.filter.call(e.target.options,(function(t){return t.selected})).map((function(t){return"_value"in t?t._value:t.value}));t.$set(s,"attribute",e.target.multiple?i:i[0])},function(e){return t.getAttributeItem(i,e)}]}},[e("option",{attrs:{value:""}},[t._v("Select")]),t._v(" "),t._l(t.attributes,(function(s,i){return e("option",{key:i,domProps:{value:s.id}},[t._v("\n "+t._s(s.name)+"\n ")])}))],2)]),t._v(" "),e("td",[e("div",{staticClass:"ic-select-content"},[e("div",{staticClass:"row"},t._l(s.attribute_items,(function(s,a){return e("div",{key:a,staticClass:"col-sm-4"},[e("div",{staticClass:"custom-control custom-checkbox"},[e("input",{staticClass:"form-check-input custom-control-input",attrs:{name:"attribute_data["+i+"][attribute_items][]",type:"checkbox",id:"attribute_item_"+i+a},domProps:{value:s.id}}),t._v(" "),e("label",{staticClass:"form-check-label custom-control-label checkbox-label",attrs:{for:"attribute_item_"+i+a}},[t._v("\n "+t._s(s.name)+"\n ")])])])})),0)])]),t._v(" "),e("td",{attrs:{width:"5%"}},[e("button",{staticClass:"btn btn-sm btn-outline-danger",attrs:{type:"button"},on:{click:function(e){return t.deleteItem(i)}}},[e("i",{staticClass:"fa fa-trash"})])])])})),0)]),t._v(" "),e("div",{staticClass:"col-sm-2"},[e("button",{staticClass:"btn btn-sm btn-info",attrs:{type:"button"},on:{click:t.addItem}},[e("i",{staticClass:"fa fa-plus"}),t._v(" "),e("span",[t._v(t._s(t.__("custom.add")))])])])])])])}),[],!1,null,null,null).exports},1900:(t,e,s)=>{function i(t,e,s,i,a,n,r,o){var c,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=s,l._compiled=!0),i&&(l.functional=!0),n&&(l._scopeId="data-v-"+n),r?(c=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__),a&&a.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},l._ssrRegister=c):a&&(c=o?function(){a.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:a),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(t,e){return c.call(e),u(t,e)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,c):[c]}return{exports:t,options:l}}s.d(e,{Z:()=>i})}}]);
| ver. 1.4 |
Github
|
.
| PHP 8.3.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings