/home/techb158/ileadtechnology.com/SSM/public/js/configuration/customField
Edit: /home/techb158/ileadtechnology.com/SSM/public/js/configuration/customField/index.js (26679B)
(window.webpackJsonp=window.webpackJsonp||[]).push([[72],{HzfF:function(t,e,o){"use strict";var s={data:function(){return{customFieldForm:new Form({name:"",type:"",width:"",form:"",min_length:"",max_length:"",min_value:"",max_value:"",decimal_place:2,is_required:!1,values:[]}),forms:[],types:[],widths:[]}},props:["id"],mounted:function(){this.getPreRequisite()},methods:{getPreRequisite:function(){var t=this,e=this.$loading.show();axios.get("/api/custom-field/pre-requisite").then((function(o){t.forms=o.forms,t.types=o.types,t.widths=o.widths,t.id&&t.get(),e.hide()})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},addRow:function(){this.customFieldForm.values.push({name:""})},getValueName:function(t){return t+"_value_name"},confirmDeleteValue:function(t){var e=this;return function(o){return e.deleteValue(t)}},deleteValue:function(t){this.customFieldForm.values.splice(t,1)},proceed:function(){this.id?this.update():this.store()},store:function(){var t=this,e=this.$loading.show();this.customFieldForm.post("/api/custom-field").then((function(o){toastr.success(o.message),t.customFieldForm.values=[],t.$emit("completed"),e.hide()})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},get:function(){var t=this,e=this.$loading.show();axios.get("/api/custom-field/"+this.id).then((function(o){t.customFieldForm.name=o.name,t.customFieldForm.type=o.type,t.customFieldForm.form=o.form,t.customFieldForm.width=o.width,t.customFieldForm.is_required=o.is_required,t.customFieldForm.min_length=o.options.hasOwnProperty("min_length")?o.options.min_length:"",t.customFieldForm.max_length=o.options.hasOwnProperty("max_length")?o.options.max_length:"",t.customFieldForm.min_value=o.options.hasOwnProperty("min_value")?o.options.min_value:"",t.customFieldForm.max_value=o.options.hasOwnProperty("max_value")?o.options.max_value:"",t.customFieldForm.decimal_place=o.options.hasOwnProperty("decimal_place")?o.options.decimal_place:"",o.values.forEach((function(e){t.customFieldForm.values.push({name:e})})),e.hide()})).catch((function(o){e.hide(),helper.showErrorMsg(o),t.$router.push("/configuration/custom-field")}))},update:function(){var t=this,e=this.$loading.show();this.customFieldForm.patch("/api/custom-field/"+this.id).then((function(o){toastr.success(o.message),e.hide(),t.$router.push("/configuration/custom-field")})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))}},computed:{showValue:function(){return"checkbox_input"==this.customFieldForm.type||"radio_input"==this.customFieldForm.type||"dropdown_input"==this.customFieldForm.type}}},i=o("KHd+"),a=Object(i.a)(s,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("form",{on:{submit:function(e){return e.preventDefault(),t.proceed(e)},keydown:function(e){return t.customFieldForm.errors.clear(e.target.name)}}},[o("div",{staticClass:"row"},[o("div",{staticClass:"col-12 col-sm-4"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[t._v(t._s(t.trans("configuration.custom_field_form")))]),t._v(" "),o("select",{directives:[{name:"model",rawName:"v-model",value:t.customFieldForm.form,expression:"customFieldForm.form"}],staticClass:"custom-select col-12",attrs:{placeholder:t.trans("general.select_one"),name:"form"},on:{change:[function(e){var o=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(t.customFieldForm,"form",e.target.multiple?o:o[0])},function(e){return t.customFieldForm.errors.clear("form")}]}},[o("option",{attrs:{value:""}},[t._v(t._s(t.trans("general.select_one")))]),t._v(" "),t._l(t.forms,(function(e){return o("option",{domProps:{value:e.value}},[t._v("\n "+t._s(e.text)+"\n ")])}))],2),t._v(" "),o("show-error",{attrs:{"form-name":t.customFieldForm,"prop-name":"form"}})],1)]),t._v(" "),o("div",{staticClass:"col-12 col-sm-4"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[t._v(t._s(t.trans("configuration.custom_field_name")))]),t._v(" "),o("input",{directives:[{name:"model",rawName:"v-model",value:t.customFieldForm.name,expression:"customFieldForm.name"}],staticClass:"form-control",attrs:{type:"text",name:"name",placeholder:t.trans("configuration.custom_field_name")},domProps:{value:t.customFieldForm.name},on:{input:function(e){e.target.composing||t.$set(t.customFieldForm,"name",e.target.value)}}}),t._v(" "),o("show-error",{attrs:{"form-name":t.customFieldForm,"prop-name":"name"}})],1)]),t._v(" "),o("div",{staticClass:"col-12 col-sm-4"},[o("div",{staticClass:"form-group"},[o("label",{staticClass:"custom-control custom-checkbox m-t-20"},[o("br"),t._v(" "),o("input",{directives:[{name:"model",rawName:"v-model",value:t.customFieldForm.is_required,expression:"customFieldForm.is_required"}],staticClass:"custom-control-input",attrs:{type:"checkbox",value:"1",name:"is_required"},domProps:{checked:Array.isArray(t.customFieldForm.is_required)?t._i(t.customFieldForm.is_required,"1")>-1:t.customFieldForm.is_required},on:{change:function(e){var o=t.customFieldForm.is_required,s=e.target,i=!!s.checked;if(Array.isArray(o)){var a=t._i(o,"1");s.checked?a<0&&t.$set(t.customFieldForm,"is_required",o.concat(["1"])):a>-1&&t.$set(t.customFieldForm,"is_required",o.slice(0,a).concat(o.slice(a+1)))}else t.$set(t.customFieldForm,"is_required",i)}}}),t._v(" "),o("span",{staticClass:"custom-control-label"},[t._v(t._s(t.trans("configuration.custom_field_required")))])]),t._v(" "),o("show-error",{attrs:{"form-name":t.customFieldForm,"prop-name":"is_required"}})],1)]),t._v(" "),o("div",{staticClass:"col-12 col-sm-4"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[t._v(t._s(t.trans("configuration.custom_field_type")))]),t._v(" "),o("select",{directives:[{name:"model",rawName:"v-model",value:t.customFieldForm.type,expression:"customFieldForm.type"}],staticClass:"custom-select col-12",attrs:{name:"type"},on:{change:[function(e){var o=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(t.customFieldForm,"type",e.target.multiple?o:o[0])},function(e){return t.customFieldForm.errors.clear("type")}]}},[o("option",{attrs:{value:""}},[t._v(t._s(t.trans("general.select_one")))]),t._v(" "),t._l(t.types,(function(e){return o("option",{domProps:{value:e.value}},[t._v("\n "+t._s(e.text)+"\n ")])}))],2),t._v(" "),o("show-error",{attrs:{"form-name":t.customFieldForm,"prop-name":"type"}})],1)]),t._v(" "),"numeric_input"===t.customFieldForm.type?[o("div",{staticClass:"col-12 col-sm-4"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[t._v(t._s(t.trans("configuration.custom_field_min_value")))]),t._v(" "),o("input",{directives:[{name:"model",rawName:"v-model",value:t.customFieldForm.min_value,expression:"customFieldForm.min_value"}],staticClass:"form-control",attrs:{type:"number",name:"min_value",placeholder:t.trans("configuration.custom_field_min_value")},domProps:{value:t.customFieldForm.min_value},on:{input:function(e){e.target.composing||t.$set(t.customFieldForm,"min_value",e.target.value)}}}),t._v(" "),o("show-error",{attrs:{"form-name":t.customFieldForm,"prop-name":"min_value"}})],1)]),t._v(" "),o("div",{staticClass:"col-12 col-sm-4"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[t._v(t._s(t.trans("configuration.custom_field_max_value")))]),t._v(" "),o("input",{directives:[{name:"model",rawName:"v-model",value:t.customFieldForm.max_value,expression:"customFieldForm.max_value"}],staticClass:"form-control",attrs:{type:"number",name:"max_value",placeholder:t.trans("configuration.custom_field_max_value")},domProps:{value:t.customFieldForm.max_value},on:{input:function(e){e.target.composing||t.$set(t.customFieldForm,"max_value",e.target.value)}}}),t._v(" "),o("show-error",{attrs:{"form-name":t.customFieldForm,"prop-name":"max_value"}})],1)]),t._v(" "),o("div",{staticClass:"col-12 col-sm-4"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[t._v(t._s(t.trans("configuration.custom_field_decimal_place")))]),t._v(" "),o("input",{directives:[{name:"model",rawName:"v-model",value:t.customFieldForm.decimal_place,expression:"customFieldForm.decimal_place"}],staticClass:"form-control",attrs:{type:"number",name:"decimal_place",placeholder:t.trans("configuration.custom_field_decimal_place")},domProps:{value:t.customFieldForm.decimal_place},on:{input:function(e){e.target.composing||t.$set(t.customFieldForm,"decimal_place",e.target.value)}}}),t._v(" "),o("show-error",{attrs:{"form-name":t.customFieldForm,"prop-name":"decimal_place"}})],1)])]:t._e(),t._v(" "),"text_input"===t.customFieldForm.type||"multi_line_input"===t.customFieldForm.type?[o("div",{staticClass:"col-12 col-sm-4"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[t._v(t._s(t.trans("configuration.custom_field_min_length")))]),t._v(" "),o("input",{directives:[{name:"model",rawName:"v-model",value:t.customFieldForm.min_length,expression:"customFieldForm.min_length"}],staticClass:"form-control",attrs:{type:"number",name:"min_length",placeholder:t.trans("configuration.custom_field_min_length")},domProps:{value:t.customFieldForm.min_length},on:{input:function(e){e.target.composing||t.$set(t.customFieldForm,"min_length",e.target.value)}}}),t._v(" "),o("show-error",{attrs:{"form-name":t.customFieldForm,"prop-name":"min_length"}})],1)]),t._v(" "),o("div",{staticClass:"col-12 col-sm-4"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[t._v(t._s(t.trans("configuration.custom_field_max_length")))]),t._v(" "),o("input",{directives:[{name:"model",rawName:"v-model",value:t.customFieldForm.max_length,expression:"customFieldForm.max_length"}],staticClass:"form-control",attrs:{type:"number",name:"max_length",placeholder:t.trans("configuration.custom_field_max_length")},domProps:{value:t.customFieldForm.max_length},on:{input:function(e){e.target.composing||t.$set(t.customFieldForm,"max_length",e.target.value)}}}),t._v(" "),o("show-error",{attrs:{"form-name":t.customFieldForm,"prop-name":"max_length"}})],1)])]:t._e(),t._v(" "),o("div",{staticClass:"col-12 col-sm-4"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[t._v(t._s(t.trans("configuration.custom_field_width")))]),t._v(" "),o("select",{directives:[{name:"model",rawName:"v-model",value:t.customFieldForm.width,expression:"customFieldForm.width"}],staticClass:"custom-select col-12",attrs:{name:"width"},on:{change:[function(e){var o=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(t.customFieldForm,"width",e.target.multiple?o:o[0])},function(e){return t.customFieldForm.errors.clear("width")}]}},[o("option",{attrs:{value:""}},[t._v(t._s(t.trans("general.select_one")))]),t._v(" "),t._l(t.widths,(function(e){return o("option",{domProps:{value:e.value}},[t._v("\n "+t._s(e.text)+"\n ")])}))],2),t._v(" "),o("show-error",{attrs:{"form-name":t.customFieldForm,"prop-name":"width"}})],1)]),t._v(" "),t.showValue?o("div",{staticClass:"col-12 col-sm-4"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[t._v(" ")]),t._v(" "),o("br"),t._v(" "),o("button",{staticClass:"btn btn-info btn-sm waves-effect waves-light",attrs:{type:"button"},on:{click:t.addRow}},[t._v(t._s(t.trans("configuration.add_new_custom_field_value")))])])]):t._e()],2),t._v(" "),t.showValue?o("div",{staticClass:"row"},[o("div",{staticClass:"col-12 col-sm-6"},t._l(t.customFieldForm.values,(function(e,s){return o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[t._v(t._s(t.trans("configuration.custom_field_value"))+" "+t._s(s+1))]),t._v(" "),o("div",{staticClass:"row"},[o("div",{staticClass:"col-12 col-sm-8"},[o("input",{directives:[{name:"model",rawName:"v-model",value:e.name,expression:"value.name"}],staticClass:"form-control",attrs:{type:"text",name:t.getValueName(s),placeholder:t.trans("configuration.custom_field_value_name")},domProps:{value:e.name},on:{input:function(o){o.target.composing||t.$set(e,"name",o.target.value)}}}),t._v(" "),o("show-error",{attrs:{"form-name":t.customFieldForm,"prop-name":t.getValueName(s)}})],1),t._v(" "),o("div",{staticClass:"col-12 col-sm-4"},[o("label",{attrs:{for:""}},[o("button",{directives:[{name:"confirm",rawName:"v-confirm",value:{ok:t.confirmDeleteValue(s)},expression:"{ok: confirmDeleteValue(index)}"},{name:"tooltip",rawName:"v-tooltip",value:t.trans("configuration.delete_custom_field_value"),expression:"trans('configuration.delete_custom_field_value')"}],key:s+"_delete_value",staticClass:"btn btn-xs btn-danger",attrs:{type:"button"}},[o("i",{staticClass:"fas fa-times"})])])])])])})),0)]):t._e(),t._v(" "),o("div",{staticClass:"card-footer text-right"},[o("router-link",{directives:[{name:"show",rawName:"v-show",value:t.id,expression:"id"}],staticClass:"btn btn-danger waves-effect waves-light ",attrs:{to:"/configuration/custom-field"}},[t._v(t._s(t.trans("general.cancel")))]),t._v(" "),t.id?t._e():o("button",{staticClass:"btn btn-danger waves-effect waves-light ",attrs:{type:"button"},on:{click:function(e){return t.$emit("cancel")}}},[t._v(t._s(t.trans("general.cancel")))]),t._v(" "),o("button",{staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"submit"}},[t.id?o("span",[t._v(t._s(t.trans("general.update")))]):o("span",[t._v(t._s(t.trans("general.save")))])])],1)])])}),[],!1,null,null,null);e.a=a.exports},SDNb:function(t,e,o){"use strict";o.r(e);var s={components:{customFieldForm:o("HzfF").a},data:function(){return{custom_fields:{total:0,data:[]},reorder_custom_fields:[],filter:{sort_by:"position",order:"asc",form:"",page_length:helper.getConfig("page_length")},orderByOptions:[{value:"name",translation:i18n.configuration.custom_field_name},{value:"position",translation:i18n.configuration.custom_field_position},{value:"form",translation:i18n.configuration.custom_field_form},{value:"type",translation:i18n.configuration.custom_field_type}],forms:[],showCreatePanel:!1,showFilterPanel:!1,showReorderModal:!1,help_topic:""}},mounted:function(){helper.hasPermission("access-configuration")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),this.getCustomFields()},methods:{getConfig:function(t){return helper.getConfig(t)},hasPermission:function(t){return helper.hasPermission(t)},getCustomFields:function(t){var e=this,o=this.$loading.show();"number"!=typeof t&&(t=1);var s=helper.getFilterURL(this.filter);axios.get("/api/custom-field?page="+t+s).then((function(t){e.custom_fields=t.custom_fields,e.forms=t.filters.forms,o.hide()})).catch((function(t){o.hide(),helper.showErrorMsg(t)}))},editCustomField:function(t){this.$router.push("/configuration/custom-field/"+t.id+"/edit")},confirmDelete:function(t){var e=this;return function(o){return e.deleteCustomField(t)}},deleteCustomField:function(t){var e=this,o=this.$loading.show();axios.delete("/api/custom-field/"+t.id).then((function(t){toastr.success(t.message),e.getCustomFields(),o.hide()})).catch((function(t){o.hide(),helper.showErrorMsg(t)}))},print:function(){var t=this.$loading.show();axios.post("/api/custom-field/print",{filter:this.filter}).then((function(e){var o=window.open("/print");t.hide(),o.document.write(e)})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},pdf:function(){var t=this,e=this.$loading.show();axios.post("/api/custom-field/pdf",{filter:this.filter}).then((function(o){e.hide(),window.open("/download/report/"+o+"?token="+t.authToken)})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},showReorderAction:function(t){var e=this,o=this.$loading.show();axios.get("/api/custom-field/fetch?form="+t).then((function(t){e.reorder_custom_fields=t,o.hide(),e.showReorderModal=!0})).catch((function(t){o.hide(),helper.showErrorMsg(t)}))},reorderCustomField:function(){var t=this,e=this.$loading.show();axios.post("/api/custom-field/reorder",{list:this.reorder_custom_fields}).then((function(o){t.showReorderModal=!1,e.hide(),toastr.success(o.message)})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))}},filters:{momentDateTime:function(t){return helper.formatDateTime(t)}},watch:{"filter.sort_by":function(t){this.getCustomFields()},"filter.order":function(t){this.getCustomFields()},"filter.page_length":function(t){this.getCustomFields()}},computed:{authToken:function(){return helper.getAuthToken()}}},i=o("KHd+"),a=Object(i.a)(s,(function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("div",{staticClass:"page-titles"},[o("div",{staticClass:"row"},[o("div",{staticClass:"col-12 col-sm-6"},[o("h3",{staticClass:"text-themecolor"},[t._v(t._s(t.trans("configuration.custom_field"))+" \n "),t.custom_fields.total?o("span",{staticClass:"card-subtitle d-none d-sm-inline"},[t._v(t._s(t.trans("general.total_result_found",{count:t.custom_fields.total,from:t.custom_fields.from,to:t.custom_fields.to})))]):o("span",{staticClass:"card-subtitle d-none d-sm-inline"},[t._v(t._s(t.trans("general.no_result_found")))])])]),t._v(" "),o("div",{staticClass:"col-12 col-sm-6"},[o("div",{staticClass:"action-buttons pull-right"},[t.custom_fields.total&&!t.showCreatePanel?o("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("general.add_new"),expression:"trans('general.add_new')"}],staticClass:"btn btn-info btn-sm",on:{click:function(e){t.showCreatePanel=!t.showCreatePanel}}},[o("i",{staticClass:"fas fa-plus"}),t._v(" "),o("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("configuration.add_new_custom_field")))])]):t._e(),t._v(" "),t.showFilterPanel?t._e():o("button",{staticClass:"btn btn-info btn-sm",on:{click:function(e){t.showFilterPanel=!t.showFilterPanel}}},[o("i",{staticClass:"fas fa-filter"}),t._v(" "),o("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("general.filter")))])]),t._v(" "),o("sort-by",{attrs:{"order-by-options":t.orderByOptions,"sort-by":t.filter.sort_by,order:t.filter.order},on:{updateSortBy:function(e){t.filter.sort_by=e},updateOrder:function(e){t.filter.order=e}}}),t._v(" "),o("div",{staticClass:"btn-group"},[o("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("general.more_option"),expression:"trans('general.more_option')"}],staticClass:"btn btn-info btn-sm dropdown-toggle no-caret ",attrs:{type:"button",role:"menu",id:"moreOption","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false"}},[o("i",{staticClass:"fas fa-ellipsis-h"}),t._v(" "),o("span",{staticClass:"d-none d-sm-inline"})]),t._v(" "),o("div",{class:["dropdown-menu","ltr"==t.getConfig("direction")?"dropdown-menu-right":""],attrs:{"aria-labelledby":"moreOption"}},[o("button",{staticClass:"dropdown-item custom-dropdown",on:{click:t.print}},[o("i",{staticClass:"fas fa-print"}),t._v(" "+t._s(t.trans("general.print")))]),t._v(" "),o("button",{staticClass:"dropdown-item custom-dropdown",on:{click:t.pdf}},[o("i",{staticClass:"fas fa-file-pdf"}),t._v(" "+t._s(t.trans("general.generate_pdf")))])])]),t._v(" "),o("help-button",{on:{clicked:function(e){t.help_topic="configuration.custom_field"}}})],1)])])]),t._v(" "),o("div",{staticClass:"container-fluid"},[o("transition",{attrs:{name:"fade"}},[t.showFilterPanel?o("div",{staticClass:"card card-form"},[o("div",{staticClass:"card-body"},[o("h4",{staticClass:"card-title"},[t._v(t._s(t.trans("general.filter")))]),t._v(" "),o("div",{staticClass:"row"},[o("div",{staticClass:"col-12 col-sm-4"},[o("div",{staticClass:"form-group"},[o("label",{attrs:{for:""}},[t._v(t._s(t.trans("configuration.custom_field_form")))]),t._v(" "),o("select",{directives:[{name:"model",rawName:"v-model",value:t.filter.form,expression:"filter.form"}],staticClass:"custom-select col-12",on:{change:function(e){var o=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(t.filter,"form",e.target.multiple?o:o[0])}}},[o("option",{attrs:{value:"",selected:""}},[t._v(t._s(t.trans("general.select_one")))]),t._v(" "),t._l(t.forms,(function(e){return o("option",{domProps:{value:e.value}},[t._v("\n "+t._s(e.text)+"\n ")])}))],2)])])]),t._v(" "),o("div",{staticClass:"card-footer text-right"},[o("button",{staticClass:"btn btn-danger",attrs:{type:"button"},on:{click:function(e){t.showFilterPanel=!1}}},[t._v(t._s(t.trans("general.cancel")))]),t._v(" "),o("button",{staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"button"},on:{click:t.getCustomFields}},[t._v(t._s(t.trans("general.filter")))])])])]):t._e()]),t._v(" "),o("transition",{attrs:{name:"fade"}},[t.showCreatePanel?o("div",{staticClass:"card card-form"},[o("div",{staticClass:"card-body"},[o("h4",{staticClass:"card-title"},[t._v(t._s(t.trans("configuration.add_new_custom_field")))]),t._v(" "),o("custom-field-form",{on:{completed:t.getCustomFields,cancel:function(e){t.showCreatePanel=!t.showCreatePanel}}})],1)]):t._e()]),t._v(" "),o("div",{staticClass:"card"},[o("div",{staticClass:"card-body"},[t.custom_fields.total?o("div",{staticClass:"table-responsive"},[o("table",{staticClass:"table table-sm"},[o("thead",[o("tr",[o("th",[t._v(t._s(t.trans("configuration.custom_field_form")))]),t._v(" "),o("th",[t._v(t._s(t.trans("configuration.custom_field_name")))]),t._v(" "),o("th",[t._v(t._s(t.trans("configuration.custom_field_type")))]),t._v(" "),o("th",[t._v(t._s(t.trans("configuration.custom_field_width")))]),t._v(" "),o("th",[t._v(t._s(t.trans("configuration.custom_field_required")))]),t._v(" "),o("th",[t._v(t._s(t.trans("configuration.custom_field_value")))]),t._v(" "),o("th",{staticClass:"table-option"},[t._v(t._s(t.trans("general.action")))])])]),t._v(" "),o("tbody",t._l(t.custom_fields.data,(function(e){return o("tr",[o("td",[t._v(t._s(t.trans("configuration.custom_field_form_"+e.form))+"\n ")]),t._v(" "),o("td",{domProps:{textContent:t._s(e.name)}}),t._v(" "),o("td",[t._v("\n "+t._s(t.trans("list."+e.type))+"\n "),"numeric_input"==e.type?o("span",[o("br"),t._v(" "),o("small",[t._v(t._s(t.trans("configuration.custom_field_min_value"))+": "+t._s(e.options.hasOwnProperty("min_value")?e.options.min_value:""))]),t._v(" "),o("br"),t._v(" "),o("small",[t._v(t._s(t.trans("configuration.custom_field_max_value"))+": "+t._s(e.options.hasOwnProperty("max_value")?e.options.max_value:""))]),t._v(" "),o("br"),t._v(" "),o("small",[t._v(t._s(t.trans("configuration.custom_field_decimal_place"))+": "+t._s(e.options.hasOwnProperty("decimal_place")?e.options.decimal_place:""))])]):t._e(),t._v(" "),"text_input"==e.type||"multi_line_input"==e.type?o("span",[o("br"),t._v(" "),o("small",[t._v(t._s(t.trans("configuration.custom_field_min_length"))+": "+t._s(e.options.hasOwnProperty("min_length")?e.options.min_length:""))]),t._v(" "),o("br"),t._v(" "),o("small",[t._v(t._s(t.trans("configuration.custom_field_max_length"))+": "+t._s(e.options.hasOwnProperty("max_length")?e.options.max_length:""))])]):t._e()]),t._v(" "),o("td",[t._v(t._s(t.trans("list."+e.width)))]),t._v(" "),o("td",[e.is_required?o("i",{staticClass:"fas fa-check"}):o("i",{staticClass:"fas fa-times"})]),t._v(" "),o("td",[t._v("\n "+t._s(e.values.join(", "))+"\n ")]),t._v(" "),o("td",{staticClass:"table-option"},[o("div",{staticClass:"btn-group"},[o("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("configuration.reorder_custom_field"),expression:"trans('configuration.reorder_custom_field')"}],staticClass:"btn btn-success btn-sm",on:{click:function(o){return o.preventDefault(),t.showReorderAction(e.form)}}},[o("i",{staticClass:"fas fa-arrows-alt"})]),t._v(" "),o("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("configuration.edit_custom_field"),expression:"trans('configuration.edit_custom_field')"}],staticClass:"btn btn-info btn-sm",on:{click:function(o){return o.preventDefault(),t.editCustomField(e)}}},[o("i",{staticClass:"fas fa-edit"})]),t._v(" "),o("button",{directives:[{name:"confirm",rawName:"v-confirm",value:{ok:t.confirmDelete(e)},expression:"{ok: confirmDelete(custom_field)}"},{name:"tooltip",rawName:"v-tooltip",value:t.trans("configuration.delete_custom_field"),expression:"trans('configuration.delete_custom_field')"}],key:e.id,staticClass:"btn btn-danger btn-sm"},[o("i",{staticClass:"fas fa-trash"})])])])])})),0)])]):t._e(),t._v(" "),t.custom_fields.total?t._e():o("module-info",{attrs:{module:"configuration",title:"custom_field_module_title",description:"custom_field_module_description",icon:"list"}},[o("div",{attrs:{slot:"btn"},slot:"btn"},[t.showCreatePanel?t._e():o("button",{staticClass:"btn btn-info btn-md",on:{click:function(e){t.showCreatePanel=!t.showCreatePanel}}},[o("i",{staticClass:"fas fa-plus"}),t._v(" "+t._s(t.trans("general.add_new")))])])]),t._v(" "),o("pagination-record",{attrs:{"page-length":t.filter.page_length,records:t.custom_fields},on:{"update:pageLength":function(e){return t.$set(t.filter,"page_length",e)},"update:page-length":function(e){return t.$set(t.filter,"page_length",e)},updateRecords:t.getCustomFields},nativeOn:{change:function(e){return t.getCustomFields(e)}}})],1)])],1),t._v(" "),o("right-panel",{attrs:{topic:t.help_topic}}),t._v(" "),t.showReorderModal?o("transition",{attrs:{name:"modal"}},[o("div",{staticClass:"modal-mask"},[o("div",{staticClass:"modal-wrapper"},[o("div",{staticClass:"modal-container modal-lg"},[o("div",{staticClass:"modal-header"},[t._t("header",[t._v("\n "+t._s(t.trans("configuration.reorder_custom_field"))+"\n "),o("span",{staticClass:"float-right pointer",on:{click:function(e){t.showReorderModal=!1}}},[t._v("x")])])],2),t._v(" "),o("div",{staticClass:"modal-body"},[t._t("body",[o("draggable",{staticClass:"list-group",on:{start:function(e){t.drag=!0},end:function(e){t.drag=!1}},model:{value:t.reorder_custom_fields,callback:function(e){t.reorder_custom_fields=e},expression:"reorder_custom_fields"}},t._l(t.reorder_custom_fields,(function(e){return o("div",{key:e.id,staticClass:"list-group-item pointer"},[o("i",{staticClass:"fas fa-arrows-alt"}),t._v(" "+t._s(e.name))])})),0),t._v(" "),o("button",{staticClass:"btn btn-info pull-right m-t-10",attrs:{type:"button"},on:{click:t.reorderCustomField}},[t._v(t._s(t.trans("general.save")))])])],2)])])])]):t._e()],1)}),[],!1,null,null,null);e.default=a.exports}}]);
//# sourceMappingURL=index.js.map?id=7701101a194ad5ed0353