(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-131f7372"],{"9f9a":function(a,e,n){},d2f0:function(a,e,n){"use strict";n.r(e);var r=function(){var a=this,e=a._self._c;return e("div",{staticClass:"main-content"},[e("breadcumb",{attrs:{page:"Edit Lembaga",folder:"Lembaga",link:"/app/companies"}}),e("b-row",[e("b-col",{attrs:{md:"12"}},[e("b-overlay",{attrs:{show:a.loading,rounded:"sm"}},[e("b-card",{ref:"formContainer",staticClass:"wrapper"},[e("b-form",{on:{submit:function(e){return e.preventDefault(),a.handleUpdateCompany.apply(null,arguments)}}},[e("b-form-group",{staticClass:"col-md-12 mb-3",attrs:{label:"Nama Lembaga","label-for":"input-1"}},[e("b-form-input",{directives:[{name:"validate",rawName:"v-validate",value:"required",expression:"'required'"}],class:{input:!0,"is-danger":a.errors.has("nama lembaga")},attrs:{placeholder:"Masukkan Nama Lembaga",name:"nama lembaga"},model:{value:a.detailCompany.companyName,callback:function(e){a.$set(a.detailCompany,"companyName",e)},expression:"detailCompany.companyName"}}),e("p",{directives:[{name:"show",rawName:"v-show",value:a.errors.has("nama lembaga"),expression:"errors.has('nama lembaga')"}],staticClass:"text-danger"},[a._v(a._s(a.errors.first("nama lembaga")))])],1),e("b-form-group",{staticClass:"col-md-12 mb-3",attrs:{label:"Nama Pimpinan Lembaga","label-for":"input-1"}},[e("b-form-input",{directives:[{name:"validate",rawName:"v-validate",value:"required",expression:"'required'"}],class:{input:!0,"is-danger":a.errors.has("nama pimpinan")},attrs:{placeholder:"Masukkan Nama Pimpinan Lembaga",name:"nama pimpinan"},model:{value:a.detailCompany.companyLeaderName,callback:function(e){a.$set(a.detailCompany,"companyLeaderName",e)},expression:"detailCompany.companyLeaderName"}}),e("p",{directives:[{name:"show",rawName:"v-show",value:a.errors.has("nama pimpinan"),expression:"errors.has('nama pimpinan')"}],staticClass:"text-danger"},[a._v(a._s(a.errors.first("nama pimpinan")))])],1),e("b-form-group",{staticClass:"col-md-12 mb-3",attrs:{label:"Nomor Ponsel Pimpinan Lembaga","label-for":"input-1"}},[e("b-form-input",{directives:[{name:"validate",rawName:"v-validate",value:"required|min:10|max:13|numeric",expression:"'required|min:10|max:13|numeric'"}],class:{input:!0,"is-danger":a.errors.has("nomor ponsel pimpinan")},attrs:{placeholder:"Masukkan Nomor Ponsel Pimpinan Lembaga",name:"nomor ponsel pimpinan"},model:{value:a.detailCompany.companyLeaderPhoneNumber,callback:function(e){a.$set(a.detailCompany,"companyLeaderPhoneNumber",e)},expression:"detailCompany.companyLeaderPhoneNumber"}}),e("p",{directives:[{name:"show",rawName:"v-show",value:a.errors.has("nomor ponsel pimpinan"),expression:"errors.has('nomor ponsel pimpinan')"}],staticClass:"text-danger"},[a._v(a._s(a.errors.first("nomor ponsel pimpinan")))])],1),e("b-form-group",{staticClass:"col-md-12 mb-3",attrs:{label:"Alamat Lembaga","label-for":"input-1"}},[e("b-form-textarea",{directives:[{name:"validate",rawName:"v-validate",value:"required",expression:"'required'"}],class:{input:!0,"is-danger":a.errors.has("alamat lembaga")},attrs:{id:"textarea",placeholder:"Masukkan Alamat Lembaga",rows:"3","max-rows":"6",name:"alamat lembaga"},model:{value:a.detailCompany.companyAddress,callback:function(e){a.$set(a.detailCompany,"companyAddress",e)},expression:"detailCompany.companyAddress"}}),e("p",{directives:[{name:"show",rawName:"v-show",value:a.errors.has("alamat lembaga"),expression:"errors.has('alamat lembaga')"}],staticClass:"text-danger"},[a._v(a._s(a.errors.first("alamat lembaga")))])],1),e("b-form-group",{staticClass:"col-md-12 mb-3",attrs:{label:"Nama PIC Fundraising Lembaga","label-for":"input-1"}},[e("b-form-input",{directives:[{name:"validate",rawName:"v-validate",value:"required",expression:"'required'"}],class:{input:!0,"is-danger":a.errors.has("pic fundraising lembaga")},attrs:{placeholder:"Masukkan Nama PIC Fundraising Lembaga",name:"pic fundraising lembaga"},model:{value:a.detailCompany.companyContactPersonName,callback:function(e){a.$set(a.detailCompany,"companyContactPersonName",e)},expression:"detailCompany.companyContactPersonName"}}),e("p",{directives:[{name:"show",rawName:"v-show",value:a.errors.has("pic fundraising lembaga"),expression:"errors.has('pic fundraising lembaga')"}],staticClass:"text-danger"},[a._v(a._s(a.errors.first("pic fundraising lembaga")))])],1),e("b-form-group",{staticClass:"col-md-12 mb-3",attrs:{label:"Nomor Ponsel PIC Fundraising Lembaga","label-for":"input-1"}},[e("b-form-input",{directives:[{name:"validate",rawName:"v-validate",value:"required",expression:"'required'"}],class:{input:!0,"is-danger":a.errors.has("nomor ponsel pic fundraising lembaga")},attrs:{placeholder:"Masukkan Nomor Ponsel PIC Fundraising Lembaga",name:"nomor ponsel pic fundraising lembaga"},model:{value:a.detailCompany.companyContactPersonPhoneNumber,callback:function(e){a.$set(a.detailCompany,"companyContactPersonPhoneNumber",e)},expression:"detailCompany.companyContactPersonPhoneNumber"}}),e("p",{directives:[{name:"show",rawName:"v-show",value:a.errors.has("nomor ponsel pic fundraising lembaga"),expression:"errors.has('nomor ponsel pic fundraising lembaga')"}],staticClass:"text-danger"},[a._v(a._s(a.errors.first("nomor ponsel oic fundraising lembaga")))])],1),e("b-form-group",{staticClass:"col-md-12 mb-3",attrs:{label:"Logo Lembaga","label-for":"input-1"}},[e("b-form-file",{directives:[{name:"validate",rawName:"v-validate",value:"required|size:900",expression:"'required|size:900'"}],class:{input:!0,"is-danger":a.errors.has("logo lembaga")},attrs:{state:Boolean(a.detailCompany.companyLogo),placeholder:"Choose a file or drop it here...","drop-placeholder":"Drop file here...",accept:"image/jpg, image/png",name:"logo lembaga"},model:{value:a.detailCompany.companyLogo,callback:function(e){a.$set(a.detailCompany,"companyLogo",e)},expression:"detailCompany.companyLogo"}}),e("p",{directives:[{name:"show",rawName:"v-show",value:a.errors.has("logo lembaga"),expression:"errors.has('logo lembaga')"}],staticClass:"text-danger"},[a._v(a._s(a.errors.first("logo lembaga")))])],1),e("b-form-group",{staticClass:"col-md-12 mb-3",attrs:{label:"Legalitas Dokumen Lembaga","label-for":"input-1"}},[e("b-form-file",{directives:[{name:"validate",rawName:"v-validate",value:"required|size:10240",expression:"'required|size:10240'"}],class:{input:!0,"is-danger":a.errors.has("legalitas lembaga")},attrs:{state:Boolean(a.detailCompany.companyLegalDocument),placeholder:"Choose a file or drop it here...","drop-placeholder":"Drop file here...",accept:"image/jpg, application/pdf",name:"legalitas lembaga"},model:{value:a.detailCompany.companyLegalDocument,callback:function(e){a.$set(a.detailCompany,"companyLegalDocument",e)},expression:"detailCompany.companyLegalDocument"}}),e("p",{directives:[{name:"show",rawName:"v-show",value:a.errors.has("legalitas lembaga"),expression:"errors.has('legalitas lembaga')"}],staticClass:"text-danger"},[a._v(a._s(a.errors.first("legalitas lembaga")))])],1),e("b-form-group",{staticClass:"col-md-12 mb-3",attrs:{label:"Nomor NPWP","label-for":"input-1"}},[e("b-form-input",{directives:[{name:"validate",rawName:"v-validate",value:"required|numeric",expression:"'required|numeric'"}],class:{input:!0,"is-danger":a.errors.has("nomor npwp")},attrs:{placeholder:"Masukkan Nomor NPWP",name:"nomor npwp"},model:{value:a.detailCompany.companyNpwpNumber,callback:function(e){a.$set(a.detailCompany,"companyNpwpNumber",e)},expression:"detailCompany.companyNpwpNumber"}}),e("p",{directives:[{name:"show",rawName:"v-show",value:a.errors.has("nomor npwp"),expression:"errors.has('nomor npwp')"}],staticClass:"text-danger"},[a._v(a._s(a.errors.first("nomor npwp")))])],1),e("b-form-group",{staticClass:"col-md-12 mb-3",attrs:{label:"Nomor NIK","label-for":"input-1"}},[e("b-form-input",{directives:[{name:"validate",rawName:"v-validate",value:"required|numeric",expression:"'required|numeric'"}],class:{input:!0,"is-danger":a.errors.has("nomor nik")},attrs:{placeholder:"Masukkan Nomor NIK",name:"nomor nik"},model:{value:a.detailCompany.companyIdCardNumber,callback:function(e){a.$set(a.detailCompany,"companyIdCardNumber",e)},expression:"detailCompany.companyIdCardNumber"}}),e("p",{directives:[{name:"show",rawName:"v-show",value:a.errors.has("nomor nik"),expression:"errors.has('nomor nik')"}],staticClass:"text-danger"},[a._v(a._s(a.errors.first("nomor nik")))])],1),e("b-form-group",{staticClass:"col-md-12 mb-3",attrs:{label:"Nomor Rekening","label-for":"input-1"}},[e("b-form-input",{directives:[{name:"validate",rawName:"v-validate",value:"required|numeric",expression:"'required|numeric'"}],class:{input:!0,"is-danger":a.errors.has("nomor rekening")},attrs:{placeholder:"Masukkan Nomor Rekening",name:"nomor rekening"},model:{value:a.detailCompany.companyBankAccountNumber,callback:function(e){a.$set(a.detailCompany,"companyBankAccountNumber",e)},expression:"detailCompany.companyBankAccountNumber"}}),e("p",{directives:[{name:"show",rawName:"v-show",value:a.errors.has("nomor rekening"),expression:"errors.has('nomor rekening')"}],staticClass:"text-danger"},[a._v(a._s(a.errors.first("nomor rekening")))])],1),e("b-form-group",{staticClass:"col-md-12 mb-3",attrs:{label:"Nama Bank","label-for":"input-1"}},[e("b-form-input",{directives:[{name:"validate",rawName:"v-validate",value:"required",expression:"'required'"}],class:{input:!0,"is-danger":a.errors.has("nama bank")},attrs:{placeholder:"Masukkan Nama Bank",name:"nama bank"},model:{value:a.detailCompany.companyBankAccountName,callback:function(e){a.$set(a.detailCompany,"companyBankAccountName",e)},expression:"detailCompany.companyBankAccountName"}}),e("p",{directives:[{name:"show",rawName:"v-show",value:a.errors.has("nama bank"),expression:"errors.has('nama bank')"}],staticClass:"text-danger"},[a._v(a._s(a.errors.first("nama bank")))])],1),e("b-form-group",{staticClass:"col-md-12 mb-3",attrs:{label:"Status Lemabga","label-for":"input-1"}},[e("b-form-select",{directives:[{name:"validate",rawName:"v-validate",value:"required",expression:"'required'"}],class:{input:!0,"is-danger":a.errors.has("status lembaga")},attrs:{options:a.status,id:"inline-form-custom-select-pref",name:"status lembaga"},model:{value:a.detailCompany.companyStatus,callback:function(e){a.$set(a.detailCompany,"companyStatus",e)},expression:"detailCompany.companyStatus"}},[e("p",{directives:[{name:"show",rawName:"v-show",value:a.errors.has("status lembaga"),expression:"errors.has('status lembaga')"}],staticClass:"text-danger"},[a._v(a._s(a.errors.first("status lembaga")))])])],1),e("b-form-group",{staticClass:"col-md-12 mb-3"},[e("button",{staticClass:"btn btn-primary btn-sm",attrs:{type:"submit"}},[a._v("Simpan")])])],1)],1)],1)],1)],1)],1)},o=[],s=(n("99af"),n("14d9"),{data:function(){return{loading:!0,companyId:this.$route.params.uuid,detailCompany:{companyName:"",companyLeaderName:"",companyContactPersonName:"",companyAddress:"",companyLegalDocument:null,companyLeaderPhoneNumber:"",companyContactPersonPhoneNumber:"",companyLogo:null,companyNpwpNumber:"",companyIdCardNumber:"",companyBankAccountNumber:"",companyBankAccountName:"",companyStatus:""},status:[{text:"Menunggu",value:"pending"},{text:"Aktif",value:"active"},{text:"Suspend",value:"suspend"},{text:"Disabled",value:"disabled"}]}},mounted:function(){this.getDetailCompany()},methods:{getDetailCompany:function(){var a=this;this.$http.get("".concat("https://orchestrator.bwa.id/api/v1/","companies/").concat(this.$route.params.uuid),{headers:{Authorization:"Bearer ".concat(this.$store.getters["accessToken"])}}).then((function(e){var n=e.data;a.detailCompany={companyName:n.company_name,companyLeaderName:n.company_leader,companyContactPersonName:n.company_contact_person_name,companyAddress:n.company_address,companyLeaderPhoneNumber:n.company_leader_phone_number,companyContactPersonPhoneNumber:n.company_contact_person_phone_number,companyNpwpNumber:n.company_npwp_number,companyIdCardNumber:n.company_id_card_number,companyBankAccountNumber:n.company_bank_account_number,companyBankAccountName:n.company_bank_account_name,companyStatus:n.company_status},a.loading=!1})).catch((function(){a.loading=!1,a.$store.dispatch("error","Maaf, terjadi kesalahan")}))},handleUpdateCompany:function(){var a=this;this.loading=!0;var e=this.$loading.show({container:this.$refs.formContainer});this.$validator.validateAll().then((function(n){if(n){var r=new FormData;r.append("company_name",a.detailCompany.companyName),r.append("company_leader",a.detailCompany.companyLeaderName),r.append("company_leader_phone_number",a.detailCompany.companyLeaderPhoneNumber),r.append("company_address",a.detailCompany.companyAddress),r.append("company_contact_person_name",a.detailCompany.companyContactPersonName),r.append("company_contact_person_phone_number",a.detailCompany.companyContactPersonPhoneNumber),r.append("company_logo",a.detailCompany.companyLogo),r.append("company_legal_document",a.detailCompany.companyLegalDocument),r.append("company_npwp_number",a.detailCompany.companyNpwpNumber),r.append("company_id_card_number",a.detailCompany.companyIdCardNumber),r.append("company_bank_account_number",a.detailCompany.companyBankAccountNumber),r.append("company_bank_account_name",a.detailCompany.companyBankAccountName),r.append("company_status",a.detailCompany.companyStatus),r.append("_method","PATCH"),a.$http.post("".concat("https://orchestrator.bwa.id/api/v1/","companies/").concat(a.companyId),r,{headers:{Authorization:"Bearer ".concat(a.$store.getters["accessToken"])}}).then((function(){a.loading=!1,e.hide(),a.$router.push("/app/companies"),a.$store.dispatch("success","Lembaga berhasil diubah")})).catch((function(n){a.loading=!1,e.hide(),a.$store.dispatch("error",n)}))}else e.hide(),a.loading=!1}))}}}),t=s,m=(n("de75"),n("2877")),i=Object(m["a"])(t,r,o,!1,null,"67c7d022",null);e["default"]=i.exports},de75:function(a,e,n){"use strict";n("9f9a")}}]);