(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c9c4f15c"],{"291d":function(e,t,s){"use strict";s("dc43")},8359:function(e,t,s){"use strict";s("be97")},be97:function(e,t,s){},d5c0:function(e,t,s){"use strict";s.r(t);var a=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("PageLoader",{attrs:{isLoading:e.isLoading}}),s("div",{staticClass:"commen-hader"},[s("div",{staticClass:"container"},[s("div",{staticClass:"row"},[s("div",{staticClass:"col-sm-12"},[s("h2",[e._v(e._s(e.singleproduct.title))]),s("h5",[e._v(e._s(e.singleproduct.name))])])])])]),s("div",{staticClass:"profile-section"},[s("div",{staticClass:"container"},[s("div",{staticClass:"row"},[s("div",{staticClass:"col-lg-8 col-md-12 col-sm-12"},[s("ImageGallery",{attrs:{defaultImage:e.activeImage,images:e.singleproduct.image+"|"+e.singleproduct.multi_img}}),s("div",{staticClass:"profile-edit",staticStyle:{"margin-top":"30px","font-size":"0.8em"}},[e._m(0),s("div",{staticClass:"row px-0"},[s("div",{staticClass:"col-sm-2",staticStyle:{"background-color":"#f1f1f1",padding:"10px"}},[e._v(" Title ")]),s("div",{staticClass:"col-sm-4",staticStyle:{"background-color":"#fafafa",padding:"10px"}},[e._v(" "+e._s(e.singleproduct.title)+" ")]),s("div",{staticClass:"col-sm-2",staticStyle:{"background-color":"#f1f1f1",padding:"10px"}},[e._v(" Place ")]),s("div",{staticClass:"col-sm-4",staticStyle:{"background-color":"#fafafa",padding:"10px"}},[e._v(" "+e._s(e.singleproduct.address)+" ")]),s("div",{staticClass:"col-sm-2",staticStyle:{"background-color":"#f1f1f1",padding:"10px"}},[e._v(" State ")]),s("div",{staticClass:"col-sm-4",staticStyle:{"background-color":"#fafafa",padding:"10px"}},[e._v(" "+e._s(e.singleproduct.state&&e.singleproduct.state.state_name)+" ")]),s("div",{staticClass:"col-sm-2",staticStyle:{"background-color":"#f1f1f1",padding:"10px"}},[e._v(" City ")]),s("div",{staticClass:"col-sm-4",staticStyle:{"background-color":"#fafafa",padding:"10px"}},[e._v(" "+e._s(e.singleproduct.city&&e.singleproduct.city.city_name)+" ")])]),s("div",{staticClass:"row"}),s("div",{staticClass:"col-sm-12",staticStyle:{"margin-top":"30px"}},[s("h2",[e._v("DESCRIPTION")]),s("div",[""!=e.singleproduct.description?s("p",[e._v(" "+e._s(e.singleproduct.description)+" ")]):s("p",[e._v(" No Any Description. ")]),s("h2"),s("div",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],staticClass:"row"},[e._m(1)])])])]),e.isLogged?e._e():s("div",{staticClass:"profile-edit-left"},[s("button",{staticClass:"primary-button registerbtn",attrs:{type:"submit"},on:{click:e.register}},[e._v(" ENQUIRE NOW ")])]),e.isLogged?s("div",{staticClass:"profile-edit-left",staticStyle:{"margin-top":"30px"}},[s("h2",[e._v(" "+e._s(e.processingForm?"Please wait...":"ENQUIRE NOW")+" ")]),e.isMaterialTester||e.enquire?e._e():s("div",[e.user_id.user_id!=e.auth_user_id?s("form",{ref:"reset",staticClass:"about-me-profile"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.singleproduct.user_id,expression:"singleproduct.user_id"}],attrs:{type:"hidden",name:"user_id",id:"user_id"},domProps:{value:e.singleproduct.user_id},on:{input:function(t){t.target.composing||e.$set(e.singleproduct,"user_id",t.target.value)}}}),s("div",{staticClass:"form-group row"},[s("div",{staticClass:"col-6 mb-3"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.user_name,expression:"user_name"}],staticClass:"form-control",attrs:{type:"text",placeholder:"Full Name",id:"name",disabled:e.enquire&&e.enquire.product_id==e.id,readonly:""},domProps:{value:e.user_name},on:{input:function(t){t.target.composing||(e.user_name=t.target.value)}}}),s("span",{staticClass:"status small",attrs:{id:"name-status"}})]),s("div",{staticClass:"col-6 mb-3"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.user_email,expression:"user_email"}],staticClass:"form-control",attrs:{type:"text",placeholder:"Email",disabled:e.enquire&&e.enquire.product_id==e.id,id:"email",readonly:""},domProps:{value:e.user_email},on:{input:function(t){t.target.composing||(e.user_email=t.target.value)}}}),s("span",{staticClass:"status small",attrs:{id:"email-status"}})]),s("div",{staticClass:"col-6"},[s("input",{directives:[{name:"model",rawName:"v-model",value:e.subject,expression:"subject"}],staticClass:"form-control",attrs:{type:"text",placeholder:"Subject",required:"",disabled:e.enquire&&e.enquire.product_id==e.id},domProps:{value:e.subject},on:{input:function(t){t.target.composing||(e.subject=t.target.value)}}}),s("span",{staticClass:"status small",attrs:{id:"subject-status"}})]),s("div",{staticClass:"col-6"},[s("textarea",{directives:[{name:"model",rawName:"v-model",value:e.message,expression:"message"}],staticClass:"form-control",attrs:{placeholder:"Type your message",disabled:e.enquire&&e.enquire.product_id==e.id,required:""},domProps:{value:e.message},on:{input:function(t){t.target.composing||(e.message=t.target.value)}}}),s("span",{staticClass:"status small",attrs:{id:"message-status"}})])]),s("button",{staticClass:"registerbtn primary-button",attrs:{type:"submit",disabled:e.enquire&&e.enquire.product_id==e.id},on:{click:e.update}},[e._v(" ENQUIRE NOW ")])]):s("p",[e._v(" Sorry! You Can not Enquire about your own products! ")])]),e.isMaterialTester?s("p",[e._v(" Sorry! You Can not Enquire as a material inspector! ")]):e._e(),e.enquire?s("div",{staticClass:"mt-3"},[e._v(" You have already started conversation with the seller. "),s("button",{staticClass:"primary-button",on:{click:function(t){return e.$router.push({name:"enquire_details",params:{id:e.enquire&&e.enquire.ticket_id}})}}},[e._v(" Go to Messages ")])]):e._e()]):e._e()],1),s("div",{staticClass:"col-lg-4 col-md-12 col-sm-12"},[e.isLoading?e._e():s("DataFilter",{attrs:{noScrollTop:!0,showLoader:!1,filterType:"redirect"}})],1)])])])],1)},i=[function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("h2",[s("i",{staticClass:"fa fa-bars"}),e._v(" PRODUCT DETAILS")])},function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"col-sm-12"},[s("ul",{staticClass:"left-profile-link",staticStyle:{float:"right"}},[s("li",{staticStyle:{display:"inline","background-color":"white"}},[s("i",{staticClass:"fa fa-share-alt",staticStyle:{"background-color":"white",color:"black",width:"30px"}}),s("h3",{staticStyle:{display:"inline","margin-right":"10px","background-color":"white",padding:"0px"}},[e._v(" Share: ")])]),s("li"),s("li",{staticStyle:{"background-color":"#ffffff",display:"inline"}},[s("a",{attrs:{href:"#"}},[s("i",{staticClass:"fa fa-facebook-f",staticStyle:{width:"46px"}})])]),s("li",{staticStyle:{"background-color":"#ffffff",display:"inline"}},[s("a",{attrs:{href:"#"}},[s("i",{staticClass:"fa fa-google-plus",staticStyle:{width:"46px"}})])]),s("li",{staticStyle:{"background-color":"#ffffff",display:"inline"}},[s("a",{attrs:{href:"#"}},[s("i",{staticClass:"fa fa-pinterest-p",staticStyle:{width:"46px"}})])]),s("li",{staticStyle:{"background-color":"#ffffff",display:"inline"}},[s("a",{attrs:{href:"#"}},[s("i",{staticClass:"fa fa-linkedin",staticStyle:{width:"46px"}})])]),s("li",{staticStyle:{"background-color":"#ffffff",display:"inline"}},[s("a",{attrs:{href:"#"}},[s("i",{staticClass:"fa fa-instagram",staticStyle:{width:"46px"}})])])])])}],r=(s("b0c0"),s("96cf"),s("1da1")),l=s("5530"),n=s("bc3a"),c=s.n(n),o=s("f510"),d=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"image-gallery row"},[s("div",{staticClass:"image-gallery-list"},e._l(e.images.split("|"),(function(t,a){return s("div",{key:a,class:["image-gallery-list-item",{active:t===e.activeImage}],on:{click:function(s){e.activeImage=t}}},[s("div",{directives:[{name:"show",rawName:"v-show",value:t===e.activeImage,expression:"img === activeImage"}],staticClass:"active-gallery-image-overlay"}),s("ImageItem",t?{staticStyle:{"max-width":"100%",margin:"0px"},attrs:{src:e.imgsrc+t}}:{staticClass:"categorie_image",staticStyle:{"max-width":"100%",margin:"0px"},attrs:{src:"http://cliquecities.com/assets/no-image-e3699ae23f866f6cbdf8ba2443ee5c4e.jpg"}})],1)})),0),s("div",{staticClass:"image-gallery-large-container"},[s("enlargeable-image",{attrs:{src:e.imgsrc+e.activeImage,src_large:e.imgsrc+e.activeImage}},[s("ImageItem",{staticClass:"img-fluid large-image-view",attrs:{src:e.imgsrc+e.activeImage}})],1)],1)])},u=[],m=s("c56d"),g=s("df9f"),p={components:{EnlargeableImage:m["a"],ImageItem:g["a"]},props:{images:{type:Array,default:function(){return[]}},defaultImage:{type:String,default:""}},data:function(){return{imgsrc:c.a.defaults.uploadURL,activeImage:""}},watch:{defaultImage:function(e){this.activeImage=e}}},f=p,v=(s("291d"),s("2877")),h=Object(v["a"])(f,d,u,!1,null,"c205371c",null),_=h.exports,y=s("525b"),b=s("97af"),C=s("2f62"),w=s("555f"),x={name:"surplus",delimiters:["${","}"],components:{EnlargeableImage:m["a"],DataFilter:o["a"],ImageGallery:_,PageLoader:w["a"]},data:function(){return{imgsrc:c.a.defaults.uploadURL,filelist:[],activeImage:"",ress:{},id:this.$route.params.id,currentId:null,categores:null,subcategores:null,subbcategory:null,searchcat:"",singleproduct:"",name:"",email:"",message:"",subject:"",answer:"",enquire:"",auth_user_id:"",user_name:"",user_email:"",user_id:"",user_role:"",processingForm:!1,isLoading:!1,action:"/surplus"}},mounted:function(){Object(y["a"])(),this.auth_user_id=this.user.id,this.user_role=this.user.role_id,this.user_name=this.user.name,this.user_email=this.user.email;var e=document.createElement("script");e.setAttribute("src","//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-608a9e58897e109f"),document.head.appendChild(e)},computed:Object(l["a"])(Object(l["a"])({},Object(C["d"])("auth",{user:"user",isLogged:"authenticated"})),Object(C["c"])("auth",{isMaterialTester:"isMaterialTester"})),watch:{},methods:{register:function(e){e.preventDefault(),this.$toasted.error("Please login to continue!")},update:function(e){var t=this;if(e.preventDefault(),!this.processingForm&&(0==this.subject.length&&(document.getElementById("subject-status").innerHTML="You need to fill out this form."),0==this.message.length&&(document.getElementById("message-status").innerHTML="You need to fill out this form."),this.subject.length>0&&this.message.length>0)){this.ress={};var s=new FormData;s.append("name",this.user.name),s.append("email",this.user.email),s.append("subject",this.subject),s.append("message",this.message),s.append("product_id",this.id),s.append("user_id",this.singleproduct.user_id),this.processingForm=!0,b["a"].post("/enquire",s).then((function(e){t.$refs.reset.reset(),t.$toasted.success("Order request sent successfully!",{keepOnHover:!0,iconPack:"fontawesome",icon:"check",theme:"toasted-primary",duration:3e3}),t.$router.push({name:"enquire_details",params:{id:e.data.result.ticket_id}}),t.processingForm=!1})).catch((function(e){return 422===e.response.status&&(t.ress=e.response.data.errors||{}),t.processingForm=!1,e}))}},validateEmail:function(){var e,t=/^([_a-zA-Z0-9-]+)(\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+\.)+([a-zA-Z]{2,3})$/,s=t.test(this.email);return e=!1===s?"Email is not valid yet.":"Done!",document.getElementById("email-status").innerHTML=e,s},clickCallback:function(e){console.log(e)}},created:function(){var e=this;return Object(r["a"])(regeneratorRuntime.mark((function t(){var s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.isLoading=!0,t.prev=1,t.next=4,b["a"].get("/single-product/"+e.id);case 4:return s=t.sent,e.singleproduct=s.data,e.activeImage=e.singleproduct.image,t.next=9,b["a"].get("/user-single-product/"+e.id);case 9:return s=t.sent,e.user_id=s.data,console.log("getting enquire result"),t.next=14,b["a"].get("/get-enquire/"+e.id);case 14:s=t.sent,e.enquire=s.data.result,console.log("received enquire result","setting loader to false"),e.isLoading=!1,t.next=24;break;case 20:t.prev=20,t.t0=t["catch"](1),console.log("error in loading categories",t.t0),e.isLoading=!1;case 24:e.isLoading=!1;case 25:case"end":return t.stop()}}),t,null,[[1,20]])})))()},beforeDestroy:function(){console.log("single product unmounting")}},k=x,S=(s("8359"),Object(v["a"])(k,a,i,!1,null,null,null));t["default"]=S.exports},dc43:function(e,t,s){}}]);
//# sourceMappingURL=chunk-c9c4f15c.5a9ec3c8.js.map