(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-44b9c258"],{"4fcd":function(e,t,a){"use strict";a.r(t);a("7f7f");var r,n=function(){var e=this,t=e._self._c;return t("div",[t("v-container",{attrs:{fluid:"","grid-list-xl":""}},[t("v-card",[t("v-container",[t("v-layout",{attrs:{row:"",wrap:""}},[t("v-flex",{attrs:{xs12:"",md12:"",lg6:""}},[t("v-container",[t("v-layout",{attrs:{column:"",wrap:""}},[e.getValue(e.item.status,"id")>0?t("h4",{staticClass:"grey--text"},[e._v(e._s("Posted Date: "+e.getDateTimeFromISO(e.getValue(e.item,"created_at"))))]):e._e(),t("div",[t("v-chip",{attrs:{label:"",color:e.statusColor(e.item),"text-color":"white"}},[t("v-avatar",[t("v-icon",[e._v("label")])],1),e._v("\n                    "+e._s(e.getStatusType(e.item))+"\n                  ")],1)],1),e.getValue(e.item.status,"id")>0?t("v-text-field",{attrs:{label:e.$t("message.ticketNumber"),value:e.item?e.item.ticket_number:"N/A",placeholder:" ",readonly:""}}):e._e(),t("v-text-field",{attrs:{label:e.$t("message.conciergeRequest"),value:e.item.concierge_category?e.item.concierge_category.name:"",placeholder:" ",readonly:""}}),t("v-text-field",{attrs:{label:e.$t("message.contactNumber"),value:e.item.contact_number,placeholder:" ",readonly:""}}),t("v-text-field",{attrs:{label:e.$t("message.subject"),value:e.item.subject,placeholder:" ",readonly:""}}),t("v-text-field",{directives:[{name:"show",rawName:"v-show",value:1==e.item.is_recurring,expression:"item.is_recurring == 1"}],attrs:{label:"Recurring",value:"Yes",readonly:""}}),t("v-text-field",{directives:[{name:"show",rawName:"v-show",value:1==e.item.is_recurring,expression:"item.is_recurring == 1"}],attrs:{label:"Recurring Type",value:e.item.recurring_type,readonly:""}}),t("v-text-field",{directives:[{name:"show",rawName:"v-show",value:1==e.item.is_recurring,expression:"item.is_recurring == 1"}],attrs:{label:"End Date",value:e.getDateFromISO(e.getValue(e.item.recurring_end_date,"date")),readonly:""}}),t("v-text-field",{attrs:{label:e.$t("message.description"),value:e.item.description?e.item.description:"",placeholder:" ",readonly:""}})],1)],1)],1),e.item.attachments.length>0?t("v-flex",{attrs:{xs12:"",md12:"",lg6:""}},[t("v-container",[t("v-layout",{attrs:{column:"",wrap:""}},[t("v-flex",{attrs:{"align-self-start":""}},[t("h4",{directives:[{name:"show",rawName:"v-show",value:e.item.attachments,expression:"item.attachments"}]},[e._v(e._s(e.$t("message.attachments")))]),e._l(e.item.attachments,(function(a,r){return t("div",{key:r},[t("v-btn",{attrs:{href:e.getValue(a,"url"),target:"_blank"}},[e._v(e._s(a.filename))])],1)}))],2)],1)],1)],1):t("v-flex",{attrs:{xs12:"",md12:"",lg6:""}})],1),t("v-layout",{directives:[{name:"show",rawName:"v-show",value:0==e.getValue(e.item.status,"id"),expression:"getValue(item.status, 'id') == 0"}]},[t("v-flex",{attrs:{xs12:""}},[t("v-btn",{attrs:{color:"primary",loading:"save"==e.form.action},on:{click:e.saveData}},[e._v(e._s(e.$t("message.submit")))])],1)],1),t("hr"),t("h4",[e._v(e._s(e.$t("message.comments")))]),t("v-layout",{attrs:{row:"",wrap:""}},[t("v-flex",{attrs:{xs12:"",md12:"",lg6:""}},[t("v-container",[t("v-layout",{attrs:{column:"",wrap:""}},[t("v-textarea",{attrs:{label:"Comment",placeholder:" ",outline:"","error-messages":e.getValue(e.errorMessages,"comment")},model:{value:e.commentRecord.comment,callback:function(t){e.$set(e.commentRecord,"comment",t)},expression:"commentRecord.comment"}}),t("v-btn",{attrs:{color:"primary",loading:"save"==e.form.action},on:{click:e.saveCommentData}},[e._v(e._s(e.$t("message.postComment")))])],1)],1)],1),t("v-flex",{attrs:{xs12:"",md12:"",lg6:""}},[t("v-container",{staticClass:"pa-3"},[t("v-layout",{attrs:{column:"",wrap:""}},[t("v-container",{staticClass:"pa-0"},[t("v-card",[t("v-toolbar",{attrs:{color:"cyan",dark:"",dense:""}},[t("v-toolbar-title",{staticClass:"text-xs-center body-2"},[e._v("Attachment")]),t("v-spacer"),t("input",{directives:[{name:"show",rawName:"v-show",value:!1,expression:"false"}],ref:"document",attrs:{type:"file",id:"document"},on:{change:function(t){return e.handleDocumentUpload()}}}),t("v-btn",{attrs:{icon:""},on:{click:function(t){return e.$refs.document.click()}}},[t("v-icon",[e._v("add")])],1)],1),t("v-list",[e._l(e.documents,(function(a,r){return[t("v-list-tile",{key:r,attrs:{avatar:""}},[t("v-list-tile-content",[t("v-list-tile-title",{domProps:{innerHTML:e._s(a.file.name)}})],1),t("v-list-tile-action",[t("v-btn",{attrs:{icon:"",ripple:""},on:{click:function(t){return e.documents.splice(r,1)}}},[t("v-icon",{attrs:{color:"grey lighten-1"}},[e._v("delete")])],1)],1)],1)]}))],2)],1)],1)],1)],1)],1)],1),t("v-layout",{attrs:{row:"",wrap:""}},[t("v-flex",{attrs:{xl12:"",lg12:"",md12:"",sm12:""}},[t("v-list",[e._l(e.commentItems,(function(a,r){return[t("div",{key:r},[t("div",{directives:[{name:"show",rawName:"v-show",value:"INTERNAL"!=a.type,expression:"selfcarecomment.type != 'INTERNAL'"}]},[e._v("\n                    "+e._s(e.$t("message.by")+" : "+a.created_by)),t("span",{domProps:{innerHTML:e._s("<br/>")}}),e._v("\n                    "+e._s(e.$t("message.date")+" : "+e.getDateTimeFromISO(a.created_at))),t("span",{domProps:{innerHTML:e._s("<br/>")}}),e._v("\n                    "+e._s(e.$t("message.comment")+" : "+a.comment)),t("span",{domProps:{innerHTML:e._s("<br /><br />")}})]),t("v-list",[e._l(a.attachments,(function(r,n){return[t("v-list-tile",{directives:[{name:"show",rawName:"v-show",value:"INTERNAL"!=a.type,expression:"selfcarecomment.type != 'INTERNAL'"}],key:n,attrs:{avatar:""}},[t("v-list-tile-content",[t("v-list-tile-title",[t("a",{attrs:{href:r.url,target:"_blank"}},[e._v(e._s(r.filename))])])],1)],1)]}))],2)],1)]}))],2)],1)],1)],1)],1)],1),t("snackbar",{attrs:{snackbar:e.snackbar}})],1)},s=[],o=(a("8e6e"),a("ac6a"),a("456d"),a("ade3")),i=a("365c"),c=a("2f62"),l=a("4da1"),m=a("323e"),u=a.n(m),d=a("7fb5"),p=a.n(d),_=(a("c1df"),a("8106"));function f(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function v(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?f(Object(a),!0).forEach((function(t){Object(o["a"])(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):f(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var h={constants:{STATUS_DRAFT:0,STATUS_IN_PROGRESS:1},components:{Snackbar:_["a"]},data:function(){return{appType:Object({NODE_ENV:"production",VUE_APP_API_BASEURL:"https://pms.putericoveresidences.net/service/api",VUE_APP_DESIGN_SITE_LOGO_WRAP_COLOR:"",VUE_APP_GOOGLE_ANALYTICS:"",VUE_APP_IDLE_TIME:"28740000",VUE_APP_IS_WHITE_LABEL:"true",VUE_APP_LOGO_ENDPOINT:"",VUE_APP_NAME:"PuteriCove",VUE_APP_PASSPORT_CLIENT_ID:"2",VUE_APP_PASSPORT_CLIENT_SECRET:"OiyeoNx5slPvbtYjwqV0R3i91VtTPjXrI1aXTGcv",VUE_APP_PROFILE_APP_LOGO:"/static/system_icons/putericove_logo.png",VUE_APP_PROFILE_DARK_LOGO:"/static/system_icons/putericove_logo.png",VUE_APP_PROFILE_DARK_LOGO2:"/static/system_icons/putericove_logo.png",VUE_APP_PROFILE_FAVICON:"static/favicons/putericove_favicon.ico",VUE_APP_PROFILE_PAGE_TITLE:"",VUE_APP_SELFCARE_HEADER_COLOR:"white",VUE_APP_SELFCARE_LOGO_HEADER:"/static/system_icons/putericove_logo.png",VUE_APP_SELFCARE_RESOURCE:"OWNER",VUE_APP_SELFCARE_SOFTWARE_TYPE:"iCommercial",VUE_APP_SERVICE_BASEURL:"https://pms.putericoveresidences.net/service",VUE_APP_SOCKET_BASEURL:"https://pms.putericoveresidences.net",VUE_APP_SOCKET_PORT:"6001",BASE_URL:"/prod/"}).VUE_APP_TYPE,reasonDescription:"",statusType:"",commentItems:{},commentRecord:{},record:{reported_unit:{},status:{}},errorMessages:null,id:this.$route.params.id,form:{loading:!1,action:null},snackbar:{show:!1,type:null,message:null},documents:[],item:{status:{},attachments:[]}}},computed:v({},Object(c["b"])(["selfcareScope"])),methods:(r={getDateTimeFromISO:function(e,t){return Object(l["g"])(e,t)},getValue:function(e,t){return Object(l["j"])(e,t)},getDateFromISO:function(e){return Object(l["e"])(e)}},Object(o["a"])(r,"getDateTimeFromISO",(function(e){return Object(l["g"])(e)})),Object(o["a"])(r,"handleDocumentUpload",(function(){this.documents.push({file:this.$refs.document.files[0]})})),Object(o["a"])(r,"statusColor",(function(e){var t="";if(Object(l["j"])(e,"status"))switch(e.status.id){case this.STATUS_PENDING:case this.STATUS_IN_PROGRESS:t="#FDD835";break}return t})),Object(o["a"])(r,"getStatusType",(function(e){var t=Object(l["j"])(e.status,"id");return 0==t?(this.statusType="Draft","Draft"):1==t?(this.statusType="Pending","Pending"):""})),Object(o["a"])(r,"getConciergeComments",(function(){var e=this;u.a.done(),i["a"].get("/selfcare/e-concierge/"+this.id+"/comment",{params:{project_id:this.selfcareScope.projectId,company_id:this.selfcareScope.companyId}}).then((function(t){e.commentItems=Object(l["j"])(t,"data.data")})).catch((function(e){console.log(e)})).then((function(){u.a.done()}))})),Object(o["a"])(r,"getConciergeDetail",(function(){var e=this;u.a.done(),i["a"].get("/selfcare/e-concierge/"+this.id,{params:{project_id:this.selfcareScope.projectId,company_id:this.selfcareScope.companyId,unit_id:this.selfcareScope.unitId,username:this.selfcareScope.username}}).then((function(t){e.item=Object(l["j"])(t,"data.data")})).catch((function(e){console.log(e)})).then((function(){u.a.done()}))})),Object(o["a"])(r,"saveData",(function(){var e=this;u.a.start(),this.form.loading=!0,this.form.action="save",this.errorMessages=null,this.record.project_id||(this.record.project_id=this.selfcareScope.projectId),this.record.company_id||(this.record.company_id=this.selfcareScope.companyId),this.record.my_username||(this.record.my_username=this.selfcareScope.username),this.record.reported_unit.id||(this.record.reported_unit.id=this.selfcareScope.unitId),this.record.status={id:1},i["a"].put("/selfcare/e-concierge/"+this.item.id,this.record).then((function(t){e.item=Object(l["j"])(t,"data.data"),e.snackbar.message=Object(l["j"])(t,"data.message"),e.snackbar.type="success",e.snackbar.show=!0,e.$router.push({name:"selfcare.econcierge.detail",params:{id:e.item.id}}),e.getConciergeDetail(),e.getConciergeComments()})).catch((function(t){e.snackbar.message=Object(l["j"])(t,"response.data.message"),e.snackbar.type="error",e.snackbar.show=!0,e.errorMessages=Object(l["j"])(t,"response.data.errors")})).then((function(){u.a.done(),e.form.loading=!1,e.form.action=null,e.getConciergeDetail(),e.getConciergeComments()}))})),Object(o["a"])(r,"saveCommentData",(function(){var e=this;u.a.start(),this.form.loading=!0,this.form.action="save",this.errorMessages=null,this.commentRecord.project_id||(this.commentRecord.project_id=this.selfcareScope.projectId),this.commentRecord.company_id||(this.commentRecord.company_id=this.selfcareScope.companyId),this.commentRecord.username||(this.commentRecord.username=this.selfcareScope.username),this.commentRecord.unit_id||(this.commentRecord.unit_id=this.selfcareScope.unitId),this.commentRecord.uploads={files:this.documents?this.documents:null};var t=p()(this.commentRecord);i["a"].post("/selfcare/e-concierge/"+this.id+"/comment",t).then((function(t){e.commentRecord={},e.documents=[],e.snackbar.message=Object(l["j"])(t,"data.message"),e.snackbar.type="success",e.snackbar.show=!0,e.$router.push({name:"selfcare.econcierge.detail",params:{id:e.id}})})).catch((function(t){e.snackbar.message=Object(l["j"])(t,"response.data.message"),e.snackbar.type="error",e.snackbar.show=!0,e.errorMessages=Object(l["j"])(t,"response.data.errors")})).then((function(){u.a.done(),e.form.loading=!1,e.form.action=null,e.getConciergeComments()}))})),r),beforeMount:function(){this.getConciergeDetail(),this.getConciergeComments()}},g=h,b=a("2877"),O=Object(b["a"])(g,n,s,!1,null,"00d9c6c8",null);t["default"]=O.exports},"7fb5":function(e,t,a){var r,n;(function(a,s){a||(a={}),r=[],n=function(){return a.jsonToFormData=s()}.apply(t,r),void 0===n||(e.exports=n)})(this,(function(){function e(e,t){return[e,t].reduce((function(e,t){return Object.keys(t).forEach((function(a){e[a]=t[a]})),e}),{})}function t(e){return"[object Array]"==={}.toString.call(e)}function a(e){return!t(e)&&"object"===typeof e&&!!e&&!(e instanceof Blob)&&!(e instanceof Date)}function r(e){return"function"===typeof e.append}function n(){return"function"===typeof FormData}function s(){if(n())return new FormData}function o(t,a){if(a&&a.initialFormData){if(!r(a.initialFormData))throw"initialFormData must have an append function."}else if(!n())throw"This environment does not have global form data. options.initialFormData must be specified.";var o={initialFormData:s(),showLeafArrayIndexes:!0,includeNullValues:!1,mapping:function(e){return"boolean"===typeof e?+e?"1":"0":e}},c=e(o,a||{});return i(t,c,c.initialFormData)}function i(e,r,n,s){var o=0;for(var c in e){if(e.hasOwnProperty(c)){var l=s||c,m=r.mapping(e[c]);if(s&&a(e)&&(l=s+"["+c+"]"),s&&t(e)&&(l=t(m)||r.showLeafArrayIndexes?s+"["+o+"]":s+"[]"),t(m)||a(m))i(m,r,n,l);else if(m instanceof FileList)for(var u=0;u<m.length;u++)n.append(l+"["+u+"]",m.item(u));else m instanceof Blob?n.append(l,m,m.name):m instanceof Date?n.append(l,m.toISOString()):(null===m&&r.includeNullValues||null!==m)&&void 0!==m&&n.append(l,m)}o++}return n}return o}))}}]);