/
home
/
liman
/
panel
/
js
/
File Upload :
llllll
Current File: /home/liman/panel/js/4134-legacy.95f0b70c.js
(self["webpackChunkliman"]=self["webpackChunkliman"]||[]).push([[4134],{86546:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return m}});var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("sedmed-form",{attrs:{items:e.fromItems,"initial-value":e.initialValue,okText:(e.id?"ویرایش":"ثبت")+" ادمین "},on:{create:function(t){e.create(Object.assign(t,{full_name:t.first_name+" "+t.last_name}))},update:function(t){e.update(Object.assign(t,{full_name:t.first_name+" "+t.last_name}))}}})},a=[],i=n(24688),o=n(89058),c=n(11179),u={name:"addEditUser",components:{SedmedForm:o.Z},data:function(){return{fromItems:Object.assign(Object.assign({},i),{user_type:{cls:"hidden",initialValue:1},email:{label:"ایمیل",decorator:[{defaultKey:"mail"}]},national_code:{label:"کد ملی",decorator:[{defaultKey:"len",defaultVal:10}]},phone:{label:"تلفن ثابت",decorator:[{defaultKey:"phone"}]},access_level:{label:"سطح دسترسی",custom:{type:"number",min:0,max:100}},profile_img:{label:"تصویر پروفایل",custom:{type:"upload",mode:"single",urlKey:"avatar_url"},initialValue:[]}})}},mixins:[c.Z]},s=u,l=n(38e3),f=(0,l.Z)(s,r,a,!1,null,"4ae7a9ce",null),m=f.exports},11179:function(e,t,n){"use strict";var r=n(37703);n(49955),n(49966),n(97244),n(776),n(50098);t["Z"]={data:function(){return{initialValue:void 0,model:void 0,view:!1}},computed:{id:function(){return this.$route.params.id},restfull:function(){return this.$route.meta.restfull},restfullPath:function(){return this.$route.meta.restfullPath||this.$route.meta.restfull},customRoute:function(){return this.$route.meta.isCustomRoute}},created:function(){var e=this;return(0,r.Z)(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,n(18847)("./".concat(e.restfull,"Tbl"));case 2:if(r=t.sent,e.model=r.default,!e.id||e.customRoute){t.next=7;break}return t.next=7,e.getData();case 7:if(!(e.initialValue&&e.initialValue.city&&e.initialValue.province)){t.next=10;break}return t.next=10,e.getCities(e.initialValue.province);case 10:case"end":return t.stop()}}),t)})))()},methods:{getData:function(){var e=arguments,t=this;return(0,r.Z)(regeneratorRuntime.mark((function n(){var r,a,i;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return r=e.length>0&&void 0!==e[0]?e[0]:void 0,n.prev=1,t.$store.commit("setLoading",!0),n.next=5,t.$axios.get("/".concat(t.restfullPath,"/").concat(r||t.id,"/"));case 5:a=n.sent,i=a.data,i&&i.city&&i.city.id&&i.city.parent&&i.city.parent.id?t.initialValue=Object.assign(i,{province:i.city.parent.id,city:i.city.id}):t.initialValue=i,n.next=13;break;case 10:n.prev=10,n.t0=n["catch"](1),console.log(n.t0);case 13:return n.prev=13,t.$store.commit("setLoading",!1),n.finish(13);case 16:case"end":return n.stop()}}),n,null,[[1,10,13,16]])})))()},update:function(e){var t=this;return(0,r.Z)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,t.$store.commit("setLoading",!0),n.next=4,t.$axios.patch("/".concat(t.restfullPath,"/").concat(t.id,"/"),e);case 4:return t.$ntSuccess("اطلاعات با موفقیت آپدیت شد"),n.next=7,t.$router.push({name:"".concat(t.restfull,"_list")});case 7:n.next=12;break;case 9:n.prev=9,n.t0=n["catch"](0),console.log(n.t0);case 12:return n.prev=12,t.$store.commit("setLoading",!1),n.finish(12);case 15:case"end":return n.stop()}}),n,null,[[0,9,12,15]])})))()},create:function(e){var t=this;return(0,r.Z)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,t.$store.commit("setLoading",!0),n.next=4,t.$axios.post("/".concat(t.restfullPath,"/"),e);case 4:return t.$ntSuccess("اطلاعات با موفقیت ثبت شد"),n.next=7,t.$router.push({name:"".concat(t.restfull,"_list")});case 7:n.next=12;break;case 9:n.prev=9,n.t0=n["catch"](0),console.log(n.t0);case 12:return n.prev=12,t.$store.commit("setLoading",!1),n.finish(12);case 15:case"end":return n.stop()}}),n,null,[[0,9,12,15]])})))()},toEdit:function(e){window.open("/".concat(this.restfull,"/edit/").concat(e),"_blank").focus()},setInitialValue:function(e){this.initialValue=e,this.view=!0},toView:function(e){var t=this;return(0,r.Z)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.getData(e);case 2:t.view=!0;case 3:case"end":return n.stop()}}),n)})))()},deleteItem:function(e){var t=this;return(0,r.Z)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.prev=0,t.$store.commit("setLoading",!0),n.next=4,t.$axios.delete("/".concat(t.restfullPath,"/").concat(e,"/"));case 4:return t.$ntSuccess("آیتم با موفقیت حذف شد"),n.next=7,t.$refs["".concat(t.restfull,"Tbl")].fetch();case 7:n.next=12;break;case 9:n.prev=9,n.t0=n["catch"](0),console.log(n.t0);case 12:return n.prev=12,t.$store.commit("setLoading",!1),n.finish(12);case 15:case"end":return n.stop()}}),n,null,[[0,9,12,15]])})))()}}}},18847:function(e,t,n){var r={"./brandTbl":[79989,4660],"./categoryTbl":[22881,2881],"./constantTbl":[77041,7041],"./customerTbl":[61003,1003],"./documentTbl":[1370,1370],"./factorTbl":[13159,3159],"./negotiable-typeTbl":[47429,7429],"./negotiableTbl":[2941,2941],"./orderTbl":[56730,6730],"./porsantTbl":[45693,5693],"./porterTbl":[63685,3685],"./productTbl":[44740,4740],"./sasheTbl":[45868,5868],"./userTbl":[66896,6896]};function a(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],a=t[0];return n.e(t[1]).then((function(){return n(a)}))}a.keys=function(){return Object.keys(r)},a.id=18847,e.exports=a},24688:function(e){"use strict";e.exports=JSON.parse('{"first_name":{"label":"نام","decorator":[{"defaultKey":"required"},{"defaultKey":"fa"}]},"last_name":{"label":"نام خانوادگی","decorator":[{"defaultKey":"required"},{"defaultKey":"fa"}]},"mobile":{"label":"تلفن همراه","decorator":[{"defaultKey":"required"},{"defaultKey":"mobile"}]}}')}}]); //# sourceMappingURL=4134-legacy.95f0b70c.js.map
Copyright ©2k19 -
Hexid
|
Tex7ure