/home/techb158/ileadtechnology.com/SSM/public/js/configuration/locale
NameSizeModeActions
edit.js45730644editdlrm
edit.js.map1690644editdlrm
index.js121570644editdlrm
index.js.map1620644editdlrm
show.js53440644editdlrm
show.js.map1690644editdlrm
Edit: /home/techb158/ileadtechnology.com/SSM/public/js/configuration/locale/index.js (12157B)
(window.webpackJsonp=window.webpackJsonp||[]).push([[118],{"g+gU":function(t,e,a){"use strict";var o={data:function(){return{localeForm:new Form({name:"",locale:""})}},props:["id"],mounted:function(){this.id&&this.getLocale()},methods:{proceed:function(){this.id?this.updateLocale():this.storeLocale()},storeLocale:function(){var t=this,e=this.$loading.show();this.localeForm.post("/api/locale").then((function(a){toastr.success(a.message),t.$emit("completed"),e.hide()})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))},getLocale:function(){var t=this,e=this.$loading.show();axios.get("/api/locale/"+this.id).then((function(a){t.localeForm.name=a.name,t.localeForm.locale=a.locale,e.hide()})).catch((function(a){e.hide(),helper.showErrorMsg(a),t.$router.push("/configuration/locale")}))},updateLocale:function(){var t=this,e=this.$loading.show();this.localeForm.patch("/api/locale/"+this.id).then((function(a){toastr.success(a.message),t.$router.push("/configuration/locale"),e.hide()})).catch((function(t){e.hide(),helper.showErrorMsg(t)}))}}},s=a("KHd+"),n=Object(s.a)(o,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("form",{on:{submit:function(e){return e.preventDefault(),t.proceed(e)},keydown:function(e){return t.localeForm.errors.clear(e.target.name)}}},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("configuration.locale_name")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.localeForm.name,expression:"localeForm.name"}],staticClass:"form-control",attrs:{type:"text",name:"name",placeholder:t.trans("configuration.locale_name")},domProps:{value:t.localeForm.name},on:{input:function(e){e.target.composing||t.$set(t.localeForm,"name",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.localeForm,"prop-name":"name"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("configuration.locale")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.localeForm.locale,expression:"localeForm.locale"}],staticClass:"form-control",attrs:{type:"text",name:"locale",placeholder:t.trans("configuration.locale")},domProps:{value:t.localeForm.locale},on:{input:function(e){e.target.composing||t.$set(t.localeForm,"locale",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.localeForm,"prop-name":"locale"}})],1)])]),t._v(" "),a("div",{staticClass:"card-footer text-right"},[a("router-link",{directives:[{name:"show",rawName:"v-show",value:t.id,expression:"id"}],staticClass:"btn btn-danger waves-effect waves-light ",attrs:{to:"/configuration/locale"}},[t._v(t._s(t.trans("general.cancel")))]),t._v(" "),t.id?t._e():a("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(" "),a("button",{staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"submit"}},[t.id?a("span",[t._v(t._s(t.trans("general.update")))]):a("span",[t._v(t._s(t.trans("general.save")))])])],1)])}),[],!1,null,null,null);e.a=n.exports},zok4:function(t,e,a){"use strict";a.r(e);var o={components:{localeForm:a("g+gU").a},data:function(){return{locales:{total:0,data:[]},filter:{page_length:helper.getConfig("page_length")},addWordForm:new Form({word:"",translation:"",module:""}),showCreatePanel:!1,showWordPanel:!1,modules:[],help_topic:""}},mounted:function(){helper.hasPermission("access-configuration")||(helper.notAccessibleMsg(),this.$router.push("/dashboard")),helper.featureAvailable("multilingual")||(helper.featureNotAvailableMsg(),this.$router.push("/dashboard")),this.getLocales()},methods:{getLocales:function(t){var e=this,a=this.$loading.show();"number"!=typeof t&&(t=1);var o=helper.getFilterURL(this.filter);axios.get("/api/locale?page="+t+o).then((function(t){e.locales=t.locales,e.modules=t.modules,a.hide()})).catch((function(t){a.hide(),helper.showErrorMsg(t)}))},editLocale:function(t){this.$router.push("/configuration/locale/"+t.id+"/edit")},confirmDelete:function(t){var e=this;return function(a){return e.deleteLocale(t)}},deleteLocale:function(t){var e=this,a=this.$loading.show();axios.delete("/api/locale/"+t.id).then((function(t){toastr.success(t.message),e.getLocales(),a.hide()})).catch((function(t){a.hide(),helper.showErrorMsg(t)}))},addWord:function(){var t=this.$loading.show();this.addWordForm.post("/api/locale/add-word").then((function(e){toastr.success(e.message),t.hide()})).catch((function(e){t.hide(),helper.showErrorMsg(e)}))},toWord:function(t){return helper.toWord(t)}},filters:{momentDateTime:function(t){return helper.formatDateTime(t)}}},s=a("KHd+"),n=Object(s.a)(o,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"page-titles"},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-6"},[a("h3",{staticClass:"text-themecolor"},[t._v(t._s(t.trans("configuration.locale"))+"\n "),t.locales.total?a("span",{staticClass:"card-subtitle d-none d-sm-inline"},[t._v(t._s(t.trans("general.total_result_found",{count:t.locales.total,from:t.locales.from,to:t.locales.to})))]):a("span",{staticClass:"card-subtitle d-none d-sm-inline"},[t._v(t._s(t.trans("general.no_result_found")))])])]),t._v(" "),a("div",{staticClass:"col-12 col-sm-6"},[a("div",{staticClass:"action-buttons pull-right"},[t.showWordPanel?t._e():a("button",{staticClass:"btn btn-info btn-sm",on:{click:function(e){t.showWordPanel=!t.showWordPanel}}},[a("i",{staticClass:"fas fa-plus"}),t._v(" "),a("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("configuration.add_new_word")))])]),t._v(" "),t.locales.total&&!t.showCreatePanel?a("button",{staticClass:"btn btn-info btn-sm",on:{click:function(e){t.showCreatePanel=!t.showCreatePanel}}},[a("i",{staticClass:"fas fa-globe"}),t._v(" "),a("span",{staticClass:"d-none d-sm-inline"},[t._v(t._s(t.trans("configuration.add_new_locale")))])]):t._e(),t._v(" "),a("help-button",{on:{clicked:function(e){t.help_topic="configuration.locale"}}})],1)])])]),t._v(" "),a("div",{staticClass:"container-fluid"},[a("transition",{attrs:{name:"fade"}},[t.showCreatePanel?a("div",{staticClass:"card card-form"},[a("div",{staticClass:"card-body"},[a("h4",{staticClass:"card-title"},[t._v(t._s(t.trans("configuration.add_new_locale")))]),t._v(" "),a("show-tip",{attrs:{module:"configuration",tip:"tip_locale"}}),t._v(" "),a("locale-form",{on:{completed:t.getLocales,cancel:function(e){t.showCreatePanel=!t.showCreatePanel}}})],1)]):t._e()]),t._v(" "),a("transition",{attrs:{name:"fade"}},[t.showWordPanel?a("div",{staticClass:"card card-form"},[a("div",{staticClass:"card-body"},[a("h4",{staticClass:"card-title m-t-20"},[t._v(t._s(t.trans("configuration.add_new_word")))]),t._v(" "),a("show-tip",{attrs:{module:"configuration",tip:"tip_locale_word"}}),t._v(" "),a("form",{on:{submit:function(e){return e.preventDefault(),t.addWord(e)},keydown:function(e){return t.addWordForm.errors.clear(e.target.name)}}},[a("div",{staticClass:"row"},[a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("configuration.locale_word")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.addWordForm.word,expression:"addWordForm.word"}],staticClass:"form-control",attrs:{type:"text",name:"word",placeholder:t.trans("configuration.locale_word")},domProps:{value:t.addWordForm.word},on:{input:function(e){e.target.composing||t.$set(t.addWordForm,"word",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.addWordForm,"prop-name":"word"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("configuration.locale_module")))]),t._v(" "),a("select",{directives:[{name:"model",rawName:"v-model",value:t.addWordForm.module,expression:"addWordForm.module"}],staticClass:"custom-select col-12",on:{change:[function(e){var a=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.addWordForm,"module",e.target.multiple?a:a[0])},function(e){return t.addWordForm.errors.clear("module")}]}},[a("option",{attrs:{value:"null",selected:""}},[t._v(t._s(t.trans("general.select_one")))]),t._v(" "),t._l(t.modules,(function(e){return a("option",{domProps:{value:e}},[t._v("\n "+t._s(t.toWord(e))+"\n ")])}))],2),t._v(" "),a("show-error",{attrs:{"form-name":t.addWordForm,"prop-name":"module"}})],1)]),t._v(" "),a("div",{staticClass:"col-12 col-sm-4"},[a("div",{staticClass:"form-group"},[a("label",{attrs:{for:""}},[t._v(t._s(t.trans("configuration.locale_translation")))]),t._v(" "),a("input",{directives:[{name:"model",rawName:"v-model",value:t.addWordForm.translation,expression:"addWordForm.translation"}],staticClass:"form-control",attrs:{type:"text",name:"translation",placeholder:t.trans("configuration.locale_translation")},domProps:{value:t.addWordForm.translation},on:{input:function(e){e.target.composing||t.$set(t.addWordForm,"translation",e.target.value)}}}),t._v(" "),a("show-error",{attrs:{"form-name":t.addWordForm,"prop-name":"translation"}})],1)])]),t._v(" "),a("div",{staticClass:"card-footer text-right"},[a("button",{staticClass:"btn btn-danger waves-effect waves-light ",attrs:{type:"button"},on:{click:function(e){t.showWordPanel=!t.showWordPanel}}},[t._v(t._s(t.trans("general.cancel")))]),t._v(" "),a("button",{staticClass:"btn btn-info waves-effect waves-light",attrs:{type:"submit"}},[t._v(t._s(t.trans("general.add")))])])])],1)]):t._e()]),t._v(" "),a("div",{staticClass:"card"},[a("div",{staticClass:"card-body"},[t.locales.total?a("div",{staticClass:"table-responsive"},[a("table",{staticClass:"table table-sm"},[a("thead",[a("tr",[a("th",[t._v(t._s(t.trans("configuration.locale_name")))]),t._v(" "),a("th",[t._v(t._s(t.trans("configuration.locale")))]),t._v(" "),a("th",{staticClass:"table-option"},[t._v(t._s(t.trans("general.action")))])])]),t._v(" "),a("tbody",t._l(t.locales.data,(function(e){return a("tr",[a("td",{domProps:{textContent:t._s(e.name)}}),t._v(" "),a("td",{domProps:{textContent:t._s(e.locale)}}),t._v(" "),a("td",{staticClass:"table-option"},[a("div",{staticClass:"btn-group"},[a("button",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("configuration.edit_locale"),expression:"trans('configuration.edit_locale')"}],staticClass:"btn btn-info btn-sm",on:{click:function(a){return a.preventDefault(),t.editLocale(e)}}},[a("i",{staticClass:"fas fa-edit"})]),t._v(" "),a("router-link",{directives:[{name:"tooltip",rawName:"v-tooltip",value:t.trans("locale.translation"),expression:"trans('locale.translation')"}],staticClass:"btn btn-success btn-sm",attrs:{to:"/configuration/locale/"+e.locale+"/auth"}},[a("i",{staticClass:"fas fa-arrow-circle-right"})]),t._v(" "),"en"!==e.locale?a("button",{directives:[{name:"confirm",rawName:"v-confirm",value:{ok:t.confirmDelete(e)},expression:"{ok: confirmDelete(locale)}"},{name:"tooltip",rawName:"v-tooltip",value:t.trans("configuration.delete_locale"),expression:"trans('configuration.delete_locale')"}],key:e.id,staticClass:"btn btn-danger btn-sm"},[a("i",{staticClass:"fas fa-trash"})]):t._e()],1)])])})),0)])]):t._e(),t._v(" "),t.locales.total?t._e():a("module-info",{attrs:{module:"configuration",title:"locale_module_title",description:"locale_module_description",icon:"list"}}),t._v(" "),a("pagination-record",{attrs:{"page-length":t.filter.page_length,records:t.locales},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.getLocales},nativeOn:{change:function(e){return t.getLocales(e)}}})],1)])],1),t._v(" "),a("right-panel",{attrs:{topic:t.help_topic}})],1)}),[],!1,null,null,null);e.default=n.exports}}]); //# sourceMappingURL=index.js.map?id=b3ea41186218a867800f