/
home
/
maktab
/
admin
/
js
/
File Upload :
llllll
Current File: /home/maktab/admin/js/chunk-46b94a97.fad516de.js
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-46b94a97"],{2819:function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"flex gap-1 w-full max-w-fit"},[n("ATooltip",[n("template",{slot:"title"},[e._v("\n نمایش جزئیات\n ")]),n("span",{on:{click:function(t){return e.$emit("view")}}},[n("Icon",{staticClass:"!text-[25px] cursor-pointer",attrs:{icon:"vuesax:clipboard-text-linear"}})],1)],2),e.hasEdit?n("ATooltip",{attrs:{placement:"bottom"}},[n("template",{slot:"title"},[e._v("\n ویرایش\n ")]),n("div",{on:{click:function(t){return e.$emit("edit")}}},[n("Icon",{class:"!text-[25px] cursor-pointer text-success",attrs:{icon:"vuesax:edit-linear"}})],1)],2):e._e(),e.hasDelete?n("ATooltip",{attrs:{placement:"bottom"}},[n("template",{slot:"title"},[e._v("\n حذف\n ")]),n("ConfirmBtn",{attrs:{title:"آیتم حذف شود؟",icon:"vuesax:trash-linear",iconClass:"!text-[25px] cursor-pointer text-danger"},on:{confirm:function(t){return e.$emit("delete")}}})],2):e._e(),e.hasActive?n("ATooltip",{attrs:{placement:"bottom"}},[n("template",{slot:"title"},[e._v("\n "+e._s(e.isActive(!e.record[e.activeKey])+" کردن")+"\n ")]),n("ConfirmBtn",{attrs:{title:"آیتم "+e.isActive(!e.record[e.activeKey])+" شود؟",icon:e.record[e.activeKey]?"vuesax:tick-square-linear":"vuesax:close-square-linear",iconClass:"!text-[25px] cursor-pointer "+(e.record[e.activeKey]?"text-primary":"text-danger")},on:{confirm:function(t){return e.$emit("active")}}})],2):e._e(),e._t("default")],2)},i=[],a=n("947d"),c=n("dc19"),o={name:"RestFullActionSheet",components:{Icon:c["a"],ConfirmBtn:a["a"]},props:{record:Object,rowKey:String,hasActive:Boolean,hasEdit:Boolean,hasDelete:Boolean,activeKey:String},methods:{isActive:function(e){return e?"فعال":"غیر فعال"}}},s=o,l=n("2877"),u=Object(l["a"])(s,r,i,!1,null,"3f179bc8",null);t["a"]=u.exports},"5b82":function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("vx-card",{ref:"filterCard",staticClass:"vx-card",attrs:{removeCardAction:!1,title:"لیست دانش آموزان"}},[n("div",[n("XTable",{ref:"tbl",attrs:{model:e.cols},scopedSlots:e._u([{key:"active",fn:function(t){var n=t.text;return[e._v("\n "+e._s(e.isActive(n))+"\n ")]}},{key:"created_at",fn:function(t){var n=t.text;return[e._v("\n "+e._s(e._f("jdateNoTime")(n))+"\n ")]}},{key:"operator",fn:function(t){var r=t.record;return n("RestFullActionSheet",{attrs:{record:r,activeKey:"active","has-delete":!0,"has-active":!0,"has-edit":!1},on:{active:function(t){return e.toggleActive(r.id)},edit:function(t){return e.toEdit(r.id)},delete:function(t){return e.deleteItem(r.id)},view:function(t){return e.setInitialValue(r)}}})}}])})],1)])],1)},i=[],a=(n("96cf"),n("1da1")),c=n("e0d2"),o=new c["b"]("/api/student/table","لیست دانش آموزان");o.add(new c["a"]("id","شناسه").filterText()),o.add(new c["a"]("name","نام").filterText()),o.add(new c["a"]("maktab.title","مکتب").filterText()),o.add(new c["a"]("mobile","موبایل").filterNumber()),o.add(new c["a"]("created_at","تاریخ ثبت").filterDate().renderSlot("created_at")),o.add(new c["a"]("active","وضعیت").renderSlot("active")),o.add(new c["a"]("operator","عملیات").renderSlot("operator"));var s=o,l=n("ff6e"),u=n("bb36"),d=n("2819"),f={name:"list",components:{RestFullActionSheet:d["a"],XTable:l["a"]},data:function(){return{cols:null,initialValue:void 0,view:!1}},methods:{toggleActive:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,this.$refs.tbl.loading=!0,e.next=4,u["b"].get("/api/student/active/".concat(t));case 4:return this.$message.success("وضعیت کاربر با موفقیت تغیر کرد"),e.next=7,this.$refs.tbl.fetch();case 7:e.next=13;break;case 9:e.prev=9,e.t0=e["catch"](0),console.log(e.t0),this.$message.error("خطا در تعیین وضعیت");case 13:return e.prev=13,this.$refs.tbl.loading=!1,e.finish(13);case 16:case"end":return e.stop()}}),e,this,[[0,9,13,16]])})));function t(t){return e.apply(this,arguments)}return t}(),setInitialValue:function(e){window.open("/admin/students/info/".concat(e.id),"_blank").focus()},deleteItem:function(){var e=Object(a["a"])(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,this.$refs.tbl.loading=!0,e.next=4,u["b"].delete("/api/student/".concat(t));case 4:return e.next=6,this.$refs.tbl.fetch();case 6:this.$message.success("آیتم با موفقیت حذف شد"),e.next=13;break;case 9:e.prev=9,e.t0=e["catch"](0),this.$message.error("خطا در حذف آیتم"),console.log(e.t0);case 13:return e.prev=13,this.$refs.tbl.loading=!1,e.finish(13);case 16:case"end":return e.stop()}}),e,this,[[0,9,13,16]])})));function t(t){return e.apply(this,arguments)}return t}(),isActive:function(e){return e?"فعال":"غیر فعال"}},created:function(){this.cols=s}},p=f,v=n("2877"),m=Object(v["a"])(p,r,i,!1,null,"59289932",null);t["default"]=m.exports},"947d":function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("APopconfirm",{attrs:{"ok-text":e.okText||"بله","cancel-text":e.cancelText||"خیر"},on:{confirm:function(t){return e.$emit("confirm")}}},[n("template",{slot:"title"},[e._v("\n "+e._s(e.title)+"\n ")]),n("Icon",{class:e.iconClass,attrs:{icon:e.icon}})],2)},i=[],a=n("dc19"),c={name:"TooltipBtn",components:{Icon:a["a"]},props:{icon:{type:String,required:!0},title:{type:String,required:!1},iconClass:{type:String,required:!1},okText:{type:String,required:!1},cancelText:{type:String,required:!1}}},o=c,s=n("2877"),l=Object(s["a"])(o,r,i,!1,null,"2ae9e054",null);t["a"]=l.exports}}]); //# sourceMappingURL=chunk-46b94a97.fad516de.js.map
Copyright ©2k19 -
Hexid
|
Tex7ure