(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4966fb52"],{"129f":function(t,e,a){"use strict";t.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!==t&&e!==e}},1583:function(t,e,a){"use strict";a("f516")},3666:function(t,e,a){(function(e,a,r){t.exports=r(),t.exports["default"]=r()})(0,0,(function(){var t=JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E\'","Ը":"Y\'","Թ":"T\'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C\'","Կ":"K","Հ":"H","Ձ":"D\'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R\'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P\'","Ք":"Q\'","Օ":"O\'\'","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"\'","’":"\'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}'),e=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function a(a,r){if("string"!==typeof a)throw new Error("slugify: string argument expected");r="string"===typeof r?{replacement:r}:r||{};var i=e[r.locale]||{},n=void 0===r.replacement?"-":r.replacement,s=void 0===r.trim||r.trim,o=a.normalize().split("").reduce((function(e,a){var s=i[a];return void 0===s&&(s=t[a]),void 0===s&&(s=a),s===n&&(s=" "),e+s.replace(r.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")}),"");return r.strict&&(o=o.replace(/[^A-Za-z0-9\s]/g,"")),s&&(o=o.trim()),o=o.replace(/\s+/g,n),r.lower&&(o=o.toLowerCase()),o}return a.extend=function(e){Object.assign(t,e)},a}))},4318:function(t,e,a){},5716:function(t,e,a){"use strict";a("ff51")},"6ec1":function(t,e,a){"use strict";a.r(e);a("14d9");var r=function(){var t=this,e=t._self._c;return e("div",{staticClass:"main-content"},[e("input",{ref:"source-link",staticStyle:{position:"absolute","z-index":"-10000",opacity:"0"},attrs:{id:"source-link",type:"text"}}),e("breadcumb",{attrs:{page:"List Projects",folder:"Project"}}),e("b-card",{staticClass:"wrapper"},[e("b-row",[e("b-col",{attrs:{sm:"4"}},[e("b-form-group",{staticClass:"mb-4",attrs:{label:"Cari Project"}},[e("b-input-group",[e("b-form-input",{attrs:{id:"filter-input",type:"search",placeholder:"Cari Nama Project"},model:{value:t.filterCampaign,callback:function(e){t.filterCampaign=e},expression:"filterCampaign"}})],1)],1)],1),e("b-col",{attrs:{sm:"4"}},[e("b-form-group",{staticClass:"mb-4",attrs:{label:"Pilih Kategori"}},[e("b-input-group",[e("multiselect",{attrs:{options:t.categories,"custom-label":t.nameWithCategory,placeholder:"Search Category",label:"text","track-by":"text"},model:{value:t.selectedCategory,callback:function(e){t.selectedCategory=e},expression:"selectedCategory"}})],1)],1)],1),"AE"===t.accountData.role||"AR"===t.accountData.role?e("b-col",{attrs:{sm:"4"}},[e("b-form-group",{staticClass:"mb-4",attrs:{label:"Pilih Program"}},[e("b-input-group",[e("multiselect",{attrs:{options:t.programs,"custom-label":t.nameWithProgram,placeholder:"Search Program",label:"text","track-by":"text"},model:{value:t.selectedProgram,callback:function(e){t.selectedProgram=e},expression:"selectedProgram"}})],1)],1)],1):t._e(),"AA"===t.accountData.role?e("b-col",{attrs:{sm:"4"}},[e("b-form-group",{staticClass:"mb-4",attrs:{label:"Pilih Lembaga"}},[e("multiselect",{attrs:{options:t.companies,"custom-label":t.nameWithCompany,placeholder:"Search Company",label:"text","track-by":"text"},model:{value:t.selectedCompany,callback:function(e){t.selectedCompany=e},expression:"selectedCompany"}})],1)],1):t._e(),e("b-col",{attrs:{sm:"12"}},[e("b-form-group",{attrs:{label:"Created Date"}},[e("date-range-picker",{ref:"picker",staticClass:"w-100",class:t.isAEOrAR?"datepicker-ae-or-ar":null,attrs:{singleDatePicker:!1},on:{update:function(e){return t.handleFilterCreateDate(t.dateRange.startDate,t.dateRange.endDate)}},model:{value:t.dateRange,callback:function(e){t.dateRange=e},expression:"dateRange"}})],1)],1),e("b-col",{attrs:{sm:"12"}},[e("b-form-group",{staticClass:"text-left"},[e("b-button",{attrs:{size:"sm",variant:"info m-1",disabled:t.isBusy},on:{click:t.handleFilterCampaign}},[t._v("Filter")]),e("b-button",{attrs:{size:"sm",variant:"info m-1"},on:{click:t.handleResetFilterCampaign}},[t._v("Reset Filter")]),e("b-button",{attrs:{size:"sm",variant:"success m-1"},on:{click:t.handleCSVCampaign}},[t._v("Download")])],1)],1)],1),t.isUserAdmin()?e("b-form-group",{staticClass:"text-right mt-2"},[e("b-button",{staticClass:"btn-rounded",attrs:{variant:"primary"},on:{click:function(e){return t.$router.push("/app/projects/create")}}},[t._v(" Add Project ")])],1):t._e(),e("b-table",{staticClass:"mt-4",attrs:{hover:"",fields:t.fields,items:t.campaigns,busy:t.isBusy,"current-page":t.currentPage,"per-page":0,"show-empty":""},scopedSlots:t._u([{key:"empty",fn:function(){return[e("div",{staticClass:"text-center"},[t._v("Data project masih kosong")])]},proxy:!0},{key:"head(wakaf_name)",fn:function(){return[t._v(" Title ")]},proxy:!0},{key:"table-busy",fn:function(){return[e("div",{staticClass:"text-center text-primary my-2",class:t.isAEOrAR?"text-ae-ar":"text-primary"},[e("b-spinner",{staticClass:"align-middle"}),e("strong",[t._v("Loading...")])],1)]},proxy:!0},{key:"cell(wakaf_status)",fn:function(a){return["published"===a.value?e("b-badge",{attrs:{variant:"success"}},[t._v("Terbit")]):"draft"===a.value?e("b-badge",{attrs:{variant:"info"}},[t._v("Draft")]):"fullfunded"===a.value?e("b-badge",{attrs:{variant:"warning"}},[t._v("Selesai")]):t._e()]}},{key:"cell(wakaf_name)",fn:function(a){return[t.isUserAdmin()?e("router-link",{attrs:{to:"/app/projects/".concat(a.item.wakaf_id,"/detail?tab=overview")}},[t._v(" "+t._s(a.value)+" ")]):e("span",[t._v(t._s(a.value))])]}},{key:"cell(summary.total_terhimpun)",fn:function(e){return[t._v(" Rp. "+t._s(t.$formatPrice(e.value))+" ")]}},{key:"cell(created_at)",fn:function(e){return[t._v(" "+t._s(t.$moment(e.value).format("YYYY-MM-DD"))+" ")]}},{key:"cell(updated_at)",fn:function(e){return[t._v(" "+t._s(t.$moment(e.value).format("YYYY-MM-DD"))+" ")]}},{key:"cell(target)",fn:function(e){return[t._v(" Rp. "+t._s(t.$formatPrice(e.value))+" ")]}},{key:"cell(target_date)",fn:function(e){return[t._v(" "+t._s(e.value?t.$moment(e.value).format("YYYY-MM-DD"):"-")+" ")]}},{key:"cell(actions)",fn:function(r){return[t.isUserAE()||t.isUserAR()?e("div",{staticClass:"d-flex"},[e("div",{staticClass:"cursor-pointer",on:{click:function(e){return t.copySourceLink(r.item)}}},[e("i",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"i-Link text-25 text-success mr-2",attrs:{title:"Salin URL"}})]),e("div",{staticClass:"cursor-pointer",on:{click:function(e){return t.getShortenUrl(r.item.wakaf_id,r.item.wakaf_name,r.item.white_label?r.item.white_label.domain_name:"")}}},[e("img",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],staticClass:"mr-2",staticStyle:{width:"25px"},attrs:{src:"/img/shorten-icon.png",alt:"",title:"URL Pendek"}})]),e("a",{attrs:{href:t.shareLink(t.WHATSAPP,r.item),target:"_blank"}},[e("img",{staticStyle:{width:"30px",height:"30px"},attrs:{src:a("a8cc")}})]),e("a",{attrs:{href:t.shareLink(t.FACEBOOK,r.item),target:"_blank"}},[e("i",{staticClass:"i-Facebook-2 text-25 text-info mr-2"})]),e("a",{attrs:{href:t.shareLink("Kampanye",r.item),target:"_blank"},on:{click:function(e){e.preventDefault(),t.accountData&&t.copyKampanye("https://bwa.id/peta-project?ag=".concat(t.accountData.agent_code))}}},[e("span",{staticClass:"mr-2"},[e("img",{attrs:{src:a("8757"),height:"25",alt:""}})])])]):t._e(),t.isUserAdmin()||t.$store.getters.accountData.has_community?e("router-link",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{to:"/app/projects/".concat(r.item.wakaf_id,"/detail?tab=detil"),title:"Detail"}},[e("i",{staticClass:"i-Eye-Visible text-25 text-success mr-2"})]):t._e(),t.isUserAdmin()?e("a",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{href:"javascript:void(0)",title:"Delete"},on:{click:function(e){return t.handleDeleteCampaign(r.item.wakaf_id)}}},[e("i",{staticClass:"i-Close-Window text-25 text-danger mr-2"})]):t._e(),t.isUserAdmin()?e("router-link",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover",modifiers:{hover:!0}}],attrs:{to:"/app/projects/".concat(r.item.wakaf_id,"/detail?tab=overview"),title:"Report"}},[e("i",{staticClass:"i-Add-File text-25 text-info"})]):t._e()]}}])}),e("b-col",{staticClass:"my-1",attrs:{md:"0"}},[e("b-pagination",{staticClass:"my-0",class:t.isAEOrAR?"pagination-ae-or-ar":null,attrs:{"total-rows":t.totalCampaigns,"per-page":t.perPage,align:"right",size:"sm"},model:{value:t.currentPage,callback:function(e){t.currentPage=e},expression:"currentPage"}})],1)],1),e("shorten-url-modal",{ref:"shortenUrlModal",on:{submitted:t.handleFilterCampaign}})],1)},i=[],n=a("5530"),s=(a("99af"),a("4de4"),a("d81d"),a("e9f5"),a("910d"),a("7d54"),a("ab43"),a("d3b7"),a("ac1f"),a("25f0"),a("3ca3"),a("841c"),a("159b"),a("ddb0"),a("2b3d"),a("bf19"),a("9861"),a("88a7"),a("271a"),a("5494"),a("8e5f")),o=a.n(s),c=a("bbf5"),l=a.n(c),u=(a("53b4"),a("2f62")),d=a("4360"),h=a("a553"),p=d["a"].getters.accountData.role,m=function(){return p===h["f"]},f=function(){return p===h["f"]||p===h["h"]},g=function(){return p===h["g"]},b=function(){return p===h["i"]},v=function(){var t=this,e=t._self._c;return e("div",[e("b-modal",{ref:"shortenUrlModal",attrs:{title:"URL Pendek","hide-footer":""}},["show"===t.view?e("div",[e("div",[e("p",[t._v(t._s(t.model.wakaf_title))])]),e("div",{staticClass:"mb-2"},[e("b-input-group",[e("b-input",{ref:"short_url_hidden",attrs:{readonly:""},model:{value:t.model.short_url,callback:function(e){t.$set(t.model,"short_url",e)},expression:"model.short_url"}}),e("b-input",{staticStyle:{opacity:"0","z-index":"-100",position:"absolute"},model:{value:t.model.short_url,callback:function(e){t.$set(t.model,"short_url",e)},expression:"model.short_url"}}),e("b-btn",{staticStyle:{padding:"0.4rem"},attrs:{variant:"secondary"},on:{click:function(e){return e.preventDefault(),t.copyShortUrl.apply(null,arguments)}}},[e("img",{staticStyle:{width:"20px"},attrs:{src:"/img/copy-solid.svg",alt:""}})])],1)],1),e("div",{staticClass:"mb-2"},[e("b-btn",{attrs:{variant:"primary"},on:{click:function(e){e.preventDefault(),t.view="edit"}}},[t._v(" Ubah ")])],1)]):e("div",[e("div",[e("p",[t._v(t._s(t.model.wakaf_title))])]),e("div",{staticClass:"mb-2"},[e("b-input-group",[e("span",{staticStyle:{"padding-right":"3px",display:"inline-flex","align-items":"center"}},[t._v("https://"+t._s(t.model.domain_name))]),e("b-input",{attrs:{placeholder:""},on:{blur:function(e){return t.slug()}},model:{value:t.model.url_short,callback:function(e){t.$set(t.model,"url_short",e)},expression:"model.url_short"}}),e("small",{staticStyle:{width:"100%",display:"block"}},[t._v("Isi akhiran url, misal: kampanye-bersama-kami. Tanpa Spasi.")])],1)],1),e("div",[null!==t.model.url_shortener_id?e("b-alert",{staticStyle:{"font-size":"12px"},attrs:{variant:"warning",show:""}},[t._v("Mengubah URL akan membuat URL lama tidak akan dapat diakses lagi.")]):t._e(),e("b-btn",{attrs:{disabled:t.isLoading,variant:"primary"},on:{click:function(e){return e.preventDefault(),t.doSubmit.apply(null,arguments)}}},[t._v(" Simpan ")]),e("b-btn",{staticClass:"ml-3",attrs:{disabled:t.isLoading,variant:"secondary"},on:{click:function(e){e.preventDefault(),t.model.url_shortener_id?t.view="show":t.hide()}}},[t._v(" Batal ")])],1)])])],1)},_=[],y=a("c7eb"),k=a("1da1"),w=a("3666"),C=a.n(w),A={data:function(){return{isLoading:!1,view:"show",model:{domain_name:null,wakaf_title:null,url_shortener_id:null,source_id:null,short_url:null,wakaf_id:null,url_short:null,long_url:null}}},mounted:function(){},watch:{"model.id":function(t){this.model.selected=null,t&&(this.model.selected=this.list.dpt[0].detail)}},methods:{slug:function(){this.model.url_short=C()(this.model.url_short)},copyShortUrl:function(){var t=this.$refs.short_url_hidden;t.select(),navigator.clipboard.writeText(t.value),this.$store.dispatch("success","Tersalin ".concat(t.value))},show:function(t,e,a){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;this.view="show",this.model.wakaf_id=null,this.model.wakaf_title=null,this.model.url_shortener_id=null,this.model.long_url=null,this.model.source_id=null,this.model.short_url=null,this.model.domain_name=a,this.model.wakaf_title=e,this.model.wakaf_id=t,this.model.url_short=r,r?this.getDetail():this.view="edit",this.$refs.shortenUrlModal.show()},hide:function(){this.$refs.shortenUrlModal.hide()},getDetail:function(){var t=this;return Object(k["a"])(Object(y["a"])().mark((function e(){var a;return Object(y["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.isLoading=!0,e.prev=1,e.next=4,t.$http.get("https://orchestrator.bwa.id/api/v1/campaigns/url-shorteners/"+t.model.url_short,{headers:{Authorization:"Bearer ".concat(t.$store.getters["accessToken"])}});case 4:a=e.sent,t.model.url_shortener_id=a.data.url_shortener_id,t.model.long_url=a.data.long_url,t.model.source_id=a.data.source_id,t.model.short_url=a.data.short_url,e.next=14;break;case 11:e.prev=11,e.t0=e["catch"](1),t.$store.dispatch("notification/error",e.t0);case 14:t.isLoading=!1;case 15:case"end":return e.stop()}}),e,null,[[1,11]])})))()},doSubmit:function(){var t=this;return Object(k["a"])(Object(y["a"])().mark((function e(){var a,r;return Object(y["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.isLoading=!0,t.model.url_shortener_id){e.next=17;break}return e.prev=2,e.next=5,t.$http.post("https://orchestrator.bwa.id/api/v1/campaigns/url-shorteners",{wakaf_id:t.model.wakaf_id,url_short:t.model.url_short},{headers:{Authorization:"Bearer ".concat(t.$store.getters["accessToken"])}});case 5:return a=e.sent,t.model.url_short=a.data.url_short,e.next=9,t.getDetail();case 9:t.view="show",e.next=15;break;case 12:e.prev=12,e.t0=e["catch"](2),t.$store.dispatch("notification/error",e.t0);case 15:e.next=30;break;case 17:return e.prev=17,e.next=20,t.$http.patch("https://orchestrator.bwa.id/api/v1/campaigns/url-shorteners/"+t.model.url_shortener_id,{wakaf_id:t.model.wakaf_id,url_short:t.model.url_short},{headers:{Authorization:"Bearer ".concat(t.$store.getters["accessToken"])}});case 20:return r=e.sent,t.model.url_short=r.data.url_short,e.next=24,t.getDetail();case 24:t.view="show",e.next=30;break;case 27:e.prev=27,e.t1=e["catch"](17),t.$store.dispatch("notification/error",e.t1);case 30:t.$emit("submitted"),t.isLoading=!1;case 32:case"end":return e.stop()}}),e,null,[[2,12],[17,27]])})))()}}},x=A,D=a("2877"),U=Object(D["a"])(x,v,_,!1,null,null,null),E=U.exports,S={metaInfo:{title:"Project"},components:{DateRangePicker:l.a,Multiselect:o.a,shortenUrlModal:E},setup:function(){return{isUserAE:g,isUserAR:b,isUserAdmin:f,isUserSuperAdmin:m,WHATSAPP:h["j"],FACEBOOK:h["a"]}},data:function(){return{fields:[],data:[],campaigns:[],selectedCategory:"",selectedProgram:"",selectedCompany:"",categories:[],programs:[],companies:[],filterCampaign:"",val:"",currentPage:1,perPage:15,totalCampaigns:0,date:"",isBusy:!0,dateRange:{startDate:"",endDate:""},filterStartDate:"",filterEndDate:"",loadingCompany:!0,loadingCategory:!0,loadingProgram:!0,isLoading:!0,shortenUrl:[]}},watch:{currentPage:{handler:function(t){this.getListCampaigns(t)}},campaigns:{handler:function(t){var e=this;this.$http.get("https://orchestrator.bwa.id/api/v1/campaigns/url-shorteners?wakaf_ids="+t.map((function(t){return t.wakaf_id})),{headers:{Authorization:"Bearer ".concat(this.$store.getters["accessToken"])}}).then((function(t){var a=t.data;e.shortenUrl=a.data}))}}},created:function(){this.getFieldTable()},mounted:function(){this.getListCampaigns(this.currentPage),this.getCategory(),(this.isUserAE()||this.isUserAR())&&this.getPrograms(),this.isUserSuperAdmin()&&this.getCompany()},computed:Object(n["a"])({},Object(u["c"])(["accountData","isAEOrAR"])),methods:{isUserAE:function(){return g()},isUserAR:function(){return b()},isUserAdmin:function(){return f()},isUserSuperAdmin:function(){return m()},getFieldTable:function(){this.isUserAE()||this.isUserAR()?this.fields=[{key:"wakaf_name",label:"Title",sortable:!0,sortDirection:"desc",thStyle:{width:"50%"}},{key:"summary.total_terhimpun",label:"Pencapaian",sortable:!0},{key:"target",label:"Target",sortable:!0},{key:"actions",label:"Actions"}]:this.fields=[{key:"wakaf_name",label:"Title",sortable:!0,sortDirection:"desc"},{key:"wakaf_status",label:"Status",sortable:!0,class:"text-center"},{key:"summary.total_terhimpun",label:"Terkumpul",sortable:!0},{key:"category.cat_name",label:"Kategori"},{key:"company.company_name",label:"Lembaga"},{key:"created_at",label:"Created Date",sortable:!0},{key:"updated_at",label:"Updated Date"},{key:"target_date",label:"Target",sortable:!0},{key:"actions",label:"Actions"}]},getSourceLink:function(t){var e="";return null===t.white_label&&(e="uat-donors.bawa.id/".concat(t.wakaf_url,"?ag=").concat(this.accountData.agent_code)),e="".concat(t.white_label?t.white_label.domain_name:"","/").concat(t.wakaf_url,"?ag=").concat(this.accountData.agent_code),e},copySourceLink:function(t){var e=document.getElementById("source-link");e.value=this.getSourceLink(t),e.select(),e.setSelectionRange(0,99999),navigator.clipboard.writeText(e.value),this.$store.dispatch("success","Tersalin ".concat(e.value))},copyKampanye:function(t){var e=document.getElementById("source-link");e.value=t,e.select(),e.setSelectionRange(0,99999),navigator.clipboard.writeText(e.value),this.$store.dispatch("success","Tersalin ".concat(e.value))},getShortenUrl:function(t,e,a){var r=this.shortenUrl.filter((function(e){return e.wakaf_id===t}));this.$refs.shortenUrlModal.show(t,e,a,r.length?r[0].url_short:null)},shareLink:function(t,e){var a="",r="".concat(e.white_label?e.white_label.domain_name:"","/").concat(e.wakaf_url,"?ag=").concat(this.accountData.agent_code);if(t===h["j"]){var i=r+"%26ref=whatsapp";a="https://wa.me/?text=".concat(i)}else t===h["a"]?a="https://www.facebook.com/sharer/sharer.php?u=".concat(r):"kampanye"===t&&(a="https://bwa.id/peta-project?ag=".concat(this.accountData.agent_code));return a},nameWithProgram:function(t){var e=t.text;return e},nameWithCategory:function(t){var e=t.text;return e},nameWithCompany:function(t){var e=t.text;return e},handleSearchCampaign:function(){var t=this;clearTimeout(this.timeout),this.timeout=setTimeout((function(){t.doFunction()}),500)},doFunction:function(){this.getListCampaigns()},handleFilterCategory:function(){this.isBusy=!0,this.getListCampaigns()},handleFilterCompany:function(){this.isBusy=!0,this.getListCampaigns()},handleFilterCreateDate:function(t,e){this.filterStartDate=this.$moment(t).format("Y-MM-DD"),this.filterEndDate=this.$moment(e).format("Y-MM-DD")},handleFilterCampaign:function(){var t=this.currentPage;this.getListCampaigns(t)},handleResetFilterCampaign:function(){this.isBusy=!0,this.selectedCategory="",this.selectedProgram="",this.selectedCompany="",this.getListCampaigns()},handleCSVCampaign:function(){var t=this,e=new URL(window.location.href),a=new URLSearchParams(e.search);a.append("csv","1"),a.append("need_cat",1),this.isUserAE()||this.isUserAR()?a.append("wakaf_status","published"):a.append("wakaf_status","-1"),a.append("ignore_description",1),a.append("order","created_at"),a.append("ascending","0"),this.$store.getters.accountData.has_community&&a.append("community_id",this.$store.getters.accountData.community.community_id),this.isBusy=!0,this.$http.get("".concat("https://orchestrator.bwa.id/api/v1/","campaigns?").concat(a.toString()),{headers:{Authorization:"Bearer ".concat(this.$store.getters["accessToken"])}}).then((function(e){var a=e.data,r=window.URL.createObjectURL(new Blob([a],{type:"text/csv"})),i=document.createElement("a");i.href=r,i.setAttribute("download","campaign.csv"),document.body.appendChild(i),i.click(),t.isBusy=!1})).catch((function(){t.$store.dispatch("error","Maaf, terjadi kesalahan")}))},getListCampaigns:function(t){var e=this;this.isBusy=!0;var a=new URL(window.location.href),r=new URLSearchParams(a.search);!this.accountData.company_id||this.isUserAdmin()||this.isUserAR()||this.isUserAE()||r.append("company_id",this.accountData.company_id),r.append("need_cat",1),r.append("page",t),r.append("limit",this.perPage),this.isUserAE()||this.isUserAR()?r.append("wakaf_status","published"):r.append("wakaf_status","-1"),r.append("ignore_description",1),r.append("order","created_at"),r.append("ascending","0"),""!==this.filterCampaign&&r.append("q",this.filterCampaign),""!==this.selectedCategory&&r.append("cat_id",this.selectedCategory.value),""!==this.selectedProgram&&r.append("program_id",this.selectedProgram.value),"AA"===this.role?this.selectedCompany&&""!==this.selectedCompany&&r.append("company_id",this.selectedCompany.value):this.accountData.company_id&&r.append("company_id",this.accountData.company_id),""!==this.filterStartDate&&r.append("created_at[]",this.filterStartDate),""!==this.filterEndDate&&r.append("created_at[]",this.filterEndDate),this.$store.getters.accountData.has_community&&r.append("community_id",this.$store.getters.accountData.community.community_id),this.$http.get("".concat("https://orchestrator.bwa.id/api/v1/","campaigns?").concat(r.toString()),{headers:{Authorization:"Bearer ".concat(this.$store.getters["accessToken"])}}).then((function(t){var a=t.data.data;e.totalCampaigns=t.data.meta.total,e.campaigns=a,e.totalCampaigns=t.data.meta.total,e.isBusy=!1})).catch((function(t){e.isBusy=!1,e.$store.dispatch("error",t)}))},getPrograms:function(){var t=this;this.loadingProgram=!0,this.$http.get("".concat("https://orchestrator.bwa.id/api/v1/","campaign-programs?limit=500"),{headers:{Authorization:"Bearer ".concat(this.$store.getters["accessToken"])}}).then((function(e){var a=e.data.data;a.forEach((function(e){var a={value:e.program_id,text:e.program_name};t.programs.push(a)})),t.loadingProgram=!1})).catch((function(e){t.$store.dispatch("error",e),t.loadingProgram=!1}))},getCategory:function(){var t=this;this.$http.get("".concat("https://orchestrator.bwa.id/api/v1/","campaign-categories"),{headers:{Authorization:"Bearer ".concat(this.$store.getters["accessToken"])}}).then((function(e){var a=e.data.data;a.forEach((function(e){var a={value:e.cat_id,text:e.cat_name};t.categories.push(a),t.loadingCategory=!1}))})).catch((function(e){t.$store.dispatch("error",e)}))},getCompany:function(){var t=this;this.$http.get("".concat("https://orchestrator.bwa.id/api/v1/","companies?company_verified=-1"),{headers:{Authorization:"Bearer ".concat(this.$store.getters["accessToken"])}}).then((function(e){var a=e.data.data;a.forEach((function(e){var a={value:e.company_id,text:e.company_name};t.companies.push(a),t.loadingCompany=!1}))})).catch((function(e){t.$store.dispatch("error",e)}))},handleDeleteCampaign:function(t){var e=this;this.$swal({title:"Apakah kamu yakin?",text:"Ingin menghapus campaign ini",type:"warning",showCancelButton:!0,confirmButtonColor:"#3085d6",cancelButtonColor:"#d33",confirmButtonText:"Hapus"}).then((function(a){a.value&&e.$http.delete("".concat("https://orchestrator.bwa.id/api/v1/","campaigns/").concat(t),{headers:{Authorization:"Bearer ".concat(e.$store.getters["accessToken"])}}).then((function(t){200===t.status&&(e.getListCampaigns(),e.$store.dispatch("success","Project berhasil dihapus"))})).catch((function(){e.$store.dispatch("error","Maaf, terjadi kesalahan")}))}))}}},$=S,P=(a("5716"),a("1583"),a("d5ec"),Object(D["a"])($,r,i,!1,null,"4b91a444",null));e["default"]=P.exports},"841c":function(t,e,a){"use strict";var r=a("c65b"),i=a("d784"),n=a("825a"),s=a("861d"),o=a("1d80"),c=a("129f"),l=a("577e"),u=a("dc4a"),d=a("14c3");i("search",(function(t,e,a){return[function(e){var a=o(this),i=s(e)?u(e,t):void 0;return i?r(i,e,a):new RegExp(e)[t](l(a))},function(t){var r=n(this),i=l(t),s=a(e,r,i);if(s.done)return s.value;var o=r.lastIndex;c(o,0)||(r.lastIndex=0);var u=d(r,i);return c(r.lastIndex,o)||(r.lastIndex=o),null===u?-1:u.index}]}))},8757:function(t,e,a){t.exports=a.p+"img/agent-bwa-logo.d23b2402.png"},a8cc:function(t,e,a){t.exports=a.p+"img/whatsapp-logo.2ae55f7d.png"},ab43:function(t,e,a){"use strict";var r=a("23e7"),i=a("c65b"),n=a("59ed"),s=a("825a"),o=a("46c4"),c=a("c5cc"),l=a("9bdd"),u=a("2a62"),d=a("f99f"),h=a("c430"),p=!h&&d("map",TypeError),m=c((function(){var t=this.iterator,e=s(i(this.next,t)),a=this.done=!!e.done;if(!a)return l(t,this.mapper,[e.value,this.counter++],!0)}));r({target:"Iterator",proto:!0,real:!0,forced:h||p},{map:function(t){s(this);try{n(t)}catch(e){u(this,"throw",e)}return p?i(p,this,t):new m(o(this),{mapper:t})}})},d5ec:function(t,e,a){"use strict";a("4318")},d81d:function(t,e,a){"use strict";var r=a("23e7"),i=a("b727").map,n=a("1dde"),s=n("map");r({target:"Array",proto:!0,forced:!s},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},f516:function(t,e,a){},ff51:function(t,e,a){}}]);