text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-9dd1d28a"],{"11ec":function(e,t,r){"use strict";r("758b")},3853:function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[e.user?r("div",[r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:6,xs:24}},[r("user-card",{attrs:{user:e.user}})],1),e._v(" "),r("el-col",{attrs:{span:18,xs:24}},[r("el-card",[r("el-tabs",{model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[this.DriverForm.DriverUserId==this.user.Id||"Developer"==this.user.name?r("el-tab-pane",{attrs:{label:e.$t("Delivery.DriverAccount"),name:"DriverAccount"}},[r("Driver",{attrs:{DriverForm:e.DriverForm}})],1):e._e(),e._v(" "),r("el-tab-pane",{attrs:{label:e.$t("Delivery.Account"),name:"account"}},[r("account",{attrs:{user:e.user}})],1)],1)],1)],1)],1)],1):e._e()])},a=[],n=(r("8e6e"),r("ac6a"),r("456d"),r("7f7f"),r("ade3")),s=r("2f62"),i=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-card",{staticStyle:{"margin-bottom":"20px"}},[r("div",{attrs:{slot:"header"},slot:"header"},[r("div",{staticClass:"user-name text-center"},[e._v(e._s(e.user.name))])]),e._v(" "),r("div",{staticClass:"user-profile"},[r("span",[e._v("About me : "+e._s(e.user.name))]),e._v(" "),r("div",{staticClass:"box-center"},[r("pan-thumb",{attrs:{height:"100px",width:"100px",image:e.user.avatar,hoverable:!1}},[r("el-button",{attrs:{type:"primary",icon:"el-icon-upload"},on:{click:function(t){e.imagecropperShow=!0}}}),e._v(" "),r("web-cam",{attrs:{TableName:"User",ObjectId:e.user.phone}})],1),e._v(" "),r("image-cropper",{directives:[{name:"show",rawName:"v-show",value:e.imagecropperShow,expression:"imagecropperShow"}],key:e.imagecropperKey,attrs:{width:150,height:150,"lang-type":"ar",TableName:"User",ObjectId:e.user.phone},on:{close:e.close,"crop-upload-success":e.cropSuccess}})],1),e._v(" "),r("div",{staticClass:"box-center"},[r("div",{staticClass:"user-role text-center text-muted"},[e._v("\n        "+e._s(e._f("uppercaseFirst")(e.user.role))+"\n      ")])])])])},l=[],c=r("3cbc"),u=r("26c2"),m=r("896b"),p={components:{PanThumb:c["a"],WebCam:u["a"],ImageCropper:m["a"]},data:function(){return{imagecropperShow:!1,imagecropperKey:0}},props:{user:{type:Object,default:function(){return{Id:"",name:"",phone:0,email:"",avatar:"",roles:""}}}},methods:{cropSuccess:function(e){this.imagecropperShow=!1,this.imagecropperKey=this.imagecropperKey+1},close:function(){this.imagecropperShow=!1}}},d=p,v=(r("e5b4"),r("2877")),f=Object(v["a"])(d,i,l,!1,null,"54599306",null),b=f.exports,h=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-form",{ref:"dataForm",staticClass:"demo-form-inline",attrs:{model:e.tempForm,rules:e.rulesForm}},[r("el-form-item",{attrs:{label:"Old Password",prop:"OldPassword"}},[r("el-input",{attrs:{type:"password",autocomplete:"off"},model:{value:e.tempForm.OldPassword,callback:function(t){e.$set(e.tempForm,"OldPassword",t)},expression:"tempForm.OldPassword"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"New Password",prop:"NewPassword"}},[r("el-input",{attrs:{type:"password",autocomplete:"off"},model:{value:e.tempForm.NewPassword,callback:function(t){e.$set(e.tempForm,"NewPassword",t)},expression:"tempForm.NewPassword"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"Confirm",prop:"ConfirmPassword"}},[r("el-input",{attrs:{type:"password",autocomplete:"off"},model:{value:e.tempForm.ConfirmPassword,callback:function(t){e.$set(e.tempForm,"ConfirmPassword",t)},expression:"tempForm.ConfirmPassword"}})],1),e._v(" "),r("el-button",{attrs:{type:"success"},on:{click:function(t){return e.submit()}}},[e._v(e._s(e.$t("AddVendors.Save")))])],1)},D=[],F=r("9fb8"),y={data:function(){var e=this,t=function(t,r,o){""===r?o(new Error("Please input the password")):(""!==e.tempForm.ConfirmPassword&&e.$refs["dataForm"].validateField("ConfirmPassword"),o())},r=function(t,r,o){""===r?o(new Error("Please input the password again")):r!==e.tempForm.NewPassword?o(new Error("Two inputs don't match!")):o()};return{tempForm:{OldPassword:"",NewPassword:"",ConfirmPassword:""},rulesForm:{OldPassword:{required:!0,message:"يجب كلمة السر القديمة ",trigger:"blur"},NewPassword:[{validator:t,trigger:"blur"}],ConfirmPassword:[{validator:r,trigger:"blur"}]}}},methods:{submit:function(){var e=this;this.$refs["dataForm"].validate((function(t){if(!t)return console.log("error submit!!"),!1;Object(F["b"])(e.tempForm).then((function(t){e.resetTempForm(),e.$notify({title:"تم ",message:"تم تغير كلمة السر بنجاح",type:"success",duration:2e3})})).catch((function(e){console.log(e)}))}))},resetTempForm:function(){this.tempForm={OldPassword:"",NewPassword:"",ConfirmPassword:""}}}},w=y,g=Object(v["a"])(w,h,D,!1,null,null,null),_=g.exports,O=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-row",[r("el-col",{attrs:{span:20}},[r("el-row",{attrs:{type:"flex"}},[r("el-col",{attrs:{span:4}},[r("span",[e._v("الرقم الوظيفي ")])]),e._v(" "),r("el-col",{attrs:{span:4}},[r("el-input",{attrs:{disabled:""},model:{value:e.DriverForm.Id,callback:function(t){e.$set(e.DriverForm,"Id",t)},expression:"DriverForm.Id"}})],1),e._v(" "),r("el-col",{attrs:{span:4}},[r("span",[e._v("اسم الموظف")])]),e._v(" "),r("el-col",{attrs:{span:12}},[r("el-input",{attrs:{disabled:""},model:{value:e.DriverForm.Name,callback:function(t){e.$set(e.DriverForm,"Name",t)},expression:"DriverForm.Name"}})],1)],1),e._v(" "),r("el-row",{attrs:{type:"flex"}},[r("el-col",{attrs:{span:4}},[r("span",[e._v("البريد الالكتروني")])]),e._v(" "),r("el-col",{attrs:{span:8}},[r("el-input",{attrs:{disabled:""},model:{value:e.DriverForm.Email,callback:function(t){e.$set(e.DriverForm,"Email",t)},expression:"DriverForm.Email"}})],1),e._v(" "),r("el-col",{attrs:{span:4}},[r("span",[e._v("تاريخ الميلاد")])]),e._v(" "),r("el-col",{attrs:{span:8}},[r("el-date-picker",{attrs:{format:"dd/MM/yyyy",type:"date",disabled:""},model:{value:e.DriverForm.DateofBirth,callback:function(t){e.$set(e.DriverForm,"DateofBirth",t)},expression:"DriverForm.DateofBirth"}})],1)],1),e._v(" "),r("el-row",{attrs:{type:"flex"}},[r("el-col",{attrs:{span:4}},[r("span",[e._v("رقم الهاتف1")])]),e._v(" "),r("el-col",{attrs:{span:8}},[r("el-input",{attrs:{disabled:""},model:{value:e.DriverForm.PhoneNumber1,callback:function(t){e.$set(e.DriverForm,"PhoneNumber1",t)},expression:"DriverForm.PhoneNumber1"}})],1),e._v(" "),r("el-col",{attrs:{span:4}},[r("span",[e._v("رقم الهاتف2")])]),e._v(" "),r("el-col",{attrs:{span:8}},[r("el-input",{attrs:{disabled:""},model:{value:e.DriverForm.PhoneNumber2,callback:function(t){e.$set(e.DriverForm,"PhoneNumber2",t)},expression:"DriverForm.PhoneNumber2"}})],1)],1),e._v(" "),r("el-row",{attrs:{type:"flex"}},[r("el-col",{attrs:{span:4}},[r("span",[e._v("الرقم الوطني")])]),e._v(" "),r("el-col",{attrs:{span:8}},[r("el-input",{attrs:{disabled:""},model:{value:e.DriverForm.Ssn,callback:function(t){e.$set(e.DriverForm,"Ssn",t)},expression:"DriverForm.Ssn"}})],1),e._v(" "),r("el-col",{attrs:{span:4}},[r("span",[e._v("حالة الموظف")])]),e._v(" "),r("el-col",{attrs:{span:8}},[r("Status-Tag",{attrs:{Status:e.DriverForm.IsActive,TableName:"DriverIsActive"}})],1)],1)],1)],1),e._v(" "),r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:4}},[1==e.DriverForm.IsActive?r("div",[r("el-tooltip",{attrs:{content:"الغاء تفعيل الحساب وايقاف استلام الطلبات",placement:"top"}},[r("el-popconfirm",{attrs:{"confirm-button-text":" موافق","cancel-button-text":"لا, شكرا","confirm-button-type":"danger",icon:"el-icon-error",title:"الغاء تفعيل الحساب وايقاف استلام الطلبات"},on:{confirm:function(t){return e.DeActivation()}}},[r("el-button",{attrs:{slot:"reference",type:"danger",icon:"el-icon-error"},on:{click:function(t){return e.DeActivation()}},slot:"reference"},[e._v("\n          الغاء التفعيل\n        ")])],1)],1)],1):r("div",[r("el-tooltip",{attrs:{content:"تفعيل الحساب وبدء استقبال الطلبات",placement:"top"}},[r("el-popconfirm",{attrs:{"confirm-button-text":"موافق","cancel-button-text":"لا, شكرا","confirm-button-type":"success",icon:"el-icon-info",title:"تفعيل الحساب وبدء استقبال الطلبات"},on:{confirm:function(t){return e.Activation()}}},[r("el-button",{attrs:{slot:"reference",type:"success",icon:"el-icon-success"},slot:"reference"},[e._v("\n          تفعيل\n        ")])],1)],1)],1)]),e._v(" "),r("el-col",{attrs:{span:20}},[r("el-button",{attrs:{type:"primary",icon:"el-icon-edit"},on:{click:function(t){e.ShowEdit=!0}}},[e._v("\n           "+e._s(e.$t("table.edit"))+"\n        ")])],1)],1),e._v(" "),r("el-dialog",{staticStyle:{"margin-top":"-13vh"},attrs:{rules:e.rulesForm,title:"تعديل البيانات الشخصية",visible:e.ShowEdit},on:{"update:visible":function(t){e.ShowEdit=t}}},[r("el-form",{ref:"driverForm",staticStyle:{width:"400px margin-left:50px"},attrs:{model:e.DriverForm,"label-position":"top","label-width":"70px"}},[r("el-form-item",{attrs:{label:"الاسم",prop:"Name"}},[r("el-input",{attrs:{type:"textarea"},model:{value:e.DriverForm.Name,callback:function(t){e.$set(e.DriverForm,"Name",t)},expression:"DriverForm.Name"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"تاريخ ميلاد",prop:"DateofBirth",rules:[{required:!0,message:"لايمكن ترك التاريخ فارغ",trigger:"blur"}]}},[r("el-date-picker",{attrs:{format:"dd/MM/yyyy",type:"date",placeholder:"تاريخ ميلاد"},model:{value:e.DriverForm.DateofBirth,callback:function(t){e.$set(e.DriverForm,"DateofBirth",t)},expression:"DriverForm.DateofBirth"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"البريد الالكتروني",prop:"Email"}},[r("el-input",{attrs:{type:"textarea"},model:{value:e.DriverForm.Email,callback:function(t){e.$set(e.DriverForm,"Email",t)},expression:"DriverForm.Email"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"رقم الهاتف1",prop:"PhoneNumber1"}},[r("el-input",{attrs:{type:"textarea"},model:{value:e.DriverForm.PhoneNumber1,callback:function(t){e.$set(e.DriverForm,"PhoneNumber1",t)},expression:"DriverForm.PhoneNumber1"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"رقم الهاتف2",prop:"PhoneNumber2"}},[r("el-input",{attrs:{type:"textarea"},model:{value:e.DriverForm.PhoneNumber2,callback:function(t){e.$set(e.DriverForm,"PhoneNumber2",t)},expression:"DriverForm.PhoneNumber2"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"الرقم الوطني",prop:"Ssn"}},[r("el-input",{attrs:{type:"textarea"},model:{value:e.DriverForm.Ssn,callback:function(t){e.$set(e.DriverForm,"Ssn",t)},expression:"DriverForm.Ssn"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"اسم الشركة",prop:"Company"}},[r("el-input",{attrs:{type:"textarea"},model:{value:e.DriverForm.Company,callback:function(t){e.$set(e.DriverForm,"Company",t)},expression:"DriverForm.Company"}})],1)],1),e._v(" "),r("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.updateData()}}},[e._v(e._s(e.$t("AddVendors.Save")))])],1)],1)],1)},P=[],x=r("00f2"),j=r("c96b"),N={components:{StatusTag:x["a"]},props:{DriverForm:{type:Object,default:function(){}}},data:function(){return{ShowEdit:!1,rulesForm:{Name:[{required:!0,message:"يجب إدخال إسم ",trigger:"blur"},{minlength:3,maxlength:50,message:"الرجاء إدخال إسم لا يقل عن 3 أحرف و لا يزيد عن 50 حرف",trigger:"blur"}]}}},methods:{updateData:function(){var e=this;this.$refs["driverForm"].validate((function(t){if(!t)return console.log("error submit!!"),!1;Object(j["e"])(e.DriverForm).then((function(t){e.ShowEdit=!1,e.$notify({title:"تم",message:"تم التعديل بنجاح",type:"success",duration:2e3})})).catch((function(e){console.log(e)}))}))},Activation:function(){var e=this;Object(j["c"])({Id:this.DriverForm.Id}).then((function(t){e.$notify({title:"تم",message:"تم التفعيل بنجاح",type:"success",duration:2e3})}))},DeActivation:function(){var e=this;Object(j["d"])({Id:this.DriverForm.Id}).then((function(t){e.$notify({title:"تم",message:"تم الغاء التفعيل بنجاح",type:"success",duration:2e3})}))}}},$=N,k=Object(v["a"])($,O,P,!1,null,null,null),S=k.exports;function C(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?C(Object(r),!0).forEach((function(t){Object(n["a"])(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var E={name:"Profile",components:{UserCard:b,Account:_,Driver:S},data:function(){return{user:{},activeTab:"account",DriverForm:{}}},computed:I({},Object(s["b"])(["Id","name","phone","avatar","roles"])),created:function(){this.getUser(),this.GetDriverData()},methods:{getUser:function(){this.user={Id:this.Id,name:this.name,phone:this.phone,role:this.roles.join(" | "),email:"admin@test.com",avatar:this.avatar}},GetDriverData:function(){var e=this;Object(j["g"])({UserId:this.user.Id,name:this.user.name}).then((function(t){e.DriverForm=t}))}}},A=E,T=(r("11ec"),Object(v["a"])(A,o,a,!1,null,null,null));t["default"]=T.exports},"392b":function(e,t,r){"use strict";r.d(t,"a",(function(){return s})),r.d(t,"e",(function(){return i})),r.d(t,"d",(function(){return l})),r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return u}));var o=r("b7e2"),a=r("4328"),n=r.n(a);function s(e){return Object(o["a"])({url:"/Files/Create",method:"post",data:n.a.stringify(e)})}function i(e){return Object(o["a"])({url:"/Files/SetTypeByObjId",method:"post",data:n.a.stringify(e)})}function l(e){return Object(o["a"])({url:"/Files/GetProfilePictureByObjId",method:"get",params:e})}function c(e){return Object(o["a"])({url:"/Files/GetFileByObjId",method:"get",params:e})}function u(e){return Object(o["a"])({url:"/Files/GetFilesByObjId",method:"get",params:e})}},7514:function(e,t,r){"use strict";var o=r("5ca1"),a=r("0a49")(5),n="find",s=!0;n in[]&&Array(1)[n]((function(){s=!1})),o(o.P+o.F*s,"Array",{find:function(e){return a(this,e,arguments.length>1?arguments[1]:void 0)}}),r("9c6c")(n)},"758b":function(e,t,r){},"787b":function(e,t,r){},c96b:function(e,t,r){"use strict";r.d(t,"h",(function(){return s})),r.d(t,"f",(function(){return i})),r.d(t,"a",(function(){return l})),r.d(t,"g",(function(){return c})),r.d(t,"c",(function(){return u})),r.d(t,"d",(function(){return m})),r.d(t,"b",(function(){return p})),r.d(t,"e",(function(){return d}));var o=r("b7e2"),a=r("4328"),n=r.n(a);function s(e){return Object(o["a"])({url:"/Driver/GetDriversLabel",method:"get",params:e})}function i(e){return Object(o["a"])({url:"/Driver/GetByListQ",method:"post",data:n.a.stringify(e)})}function l(e){return Object(o["a"])({url:"/Driver/CheckDriverIsExist",method:"get",params:e})}function c(e){return Object(o["a"])({url:"/Driver/GetDriverInfo",method:"get",params:e})}function u(e){return Object(o["a"])({url:"/Driver/DriverActivation",method:"get",params:e})}function m(e){return Object(o["a"])({url:"/Driver/DriverDeActivation",method:"get",params:e})}function p(e){return Object(o["a"])({url:"/Driver/Create",method:"post",data:n.a.stringify(e)})}function d(e){return Object(o["a"])({url:"/Driver/Edit",method:"post",data:n.a.stringify(e)})}},e5b4:function(e,t,r){"use strict";r("787b")}}]);