Initial commit

This commit is contained in:
gustavooth committed 2026-07-23 22:56:30 -03:00
commit 22a1006598
1816 files changed
+410742

No files matched your search

@@ -0,0 +1 @@
import{_ as e}from"../../../../fc-bits.js?ver=3.1.8";import{P as t,aH as a,aI as i,j as s,h as l,i as o,ay as n,aO as r,k as c,W as d,aJ as m,E as u,Z as _,bk as p,bl as h,aD as g,aA as f,g as b,o as v,c as w,_ as y,T as k,a6 as $,G as C,z as S,aP as E,aE as V,aF as T,ax as P,az as x,aT as F}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as q,W as A,Y as j,a5 as L,ab as M,a6 as z,X as D,aa as B,a8 as R,Z as H,b2 as I,ax as N,a9 as O,bW as U,a0 as W,J as Y,az as J,ac as Z}from"../../../../vendor.js?ver=3.1.8";import{P as K}from"../../../../PaginationBar.js?ver=3.1.8";import{D as Q}from"../../../../DataTable.js?ver=3.1.8";import{F as G}from"../../../../FloatingBulkActionShell.js?ver=3.1.8";import{C as X}from"../../../../Confirm.js?ver=3.1.8";import{O as ee}from"../../../../_OptionSelector.js?ver=3.1.8";import{B as te}from"../../../../Badge.js?ver=3.1.8";import{_ as ae,I as ie,a as se,T as le}from"../../../../fc-bits-ui.js?ver=3.1.8";import{S as oe}from"../../../../_StepPicker.js?ver=3.1.8";import{E as ne}from"../../../../EmailComposer.js?ver=3.1.8";import{M as re}from"../../../../_MailerConfig.js?ver=3.1.8";import"../../../../BlockComposer.js?ver=3.1.8";import"../../../../input-popover-dropdown.js?ver=3.1.8";import"../../../../_FormBuilder2.js?ver=3.1.8";import"../../../../PhotoWidget.js?ver=3.1.8";import"../../../../data_config.js?ver=3.1.8";import"../../../../_AjaxSelector.js?ver=3.1.8";import"../../../../_VerifiedEmailInput.js?ver=3.1.8";import"../../../../EmailPreview.js?ver=3.1.8";import"../../../../PreviewIframeBuilder.js?ver=3.1.8";import"../../../../TestEmail.js?ver=3.1.8";import"../../../../CampaignSubjectLines.js?ver=3.1.8";import"../../../../_MergeCodes.js?ver=3.1.8";import"../../../../BuiltinTemplateDrawer.js?ver=3.1.8";import"../../../../PromoCard.js?ver=3.1.8";const ce={class:"fcrm_table_header_inner_left_title"},de={class:"fcrm_contact_popover_header"},me={class:"fcrm_contact_popover_body fcrm_popover_email_section"},ue={key:0},_e=["title"],pe={key:0},he=["title"],ge={key:2},fe=["aria-label"],be={class:"el-popover__reference"},ve={class:"icon"};const we=ae({name:"ProfileEmailSequence",components:{Icons:ie,Badge:te,Confirm:X,PaginationBar:K,DataTable:Q,OptionSelector:ee,MoreFilled:t},props:["subscriber_id"],data:()=>({sequences:[],loading:!1,removing:!1,pagination:{total:0,per_page:10,current_page:1},selected_sequence:"",doing_action:!1}),methods:{fetch(){this.loading=!0,this.$get(`sequences/subscriber/${this.subscriber_id}/sequences`,{per_page:this.pagination.per_page,page:this.pagination.current_page}).then(e=>{this.sequences=e.sequence_trackers.data,this.pagination.total=e.sequence_trackers.total}).catch(e=>{this.handleError(e)}).finally(()=>{this.loading=!1})},removeFromSequence(e,t){this.removing=!0,this.$del(`sequences/${e}/subscribers`,{tracker_ids:[t]}).then(e=>{this.$notify.success(e.message),this.fetch()}).catch(e=>{this.handleError(e)}).finally(()=>{this.removing=!1})},addToSequence(){this.selected_sequence?(this.doing_action=!0,this.$post("subscribers/do-bulk-action",{action_name:"add_to_email_sequence",new_status:this.selected_sequence,subscriber_ids:[this.subscriber_id]}).then(e=>{var t;null==(t=this.$refs.popover)||t.hide(),this.selected_sequence="",this.$notify.success(e.message),this.fetch()}).catch(e=>{this.handleError(e)}).finally(()=>{this.doing_action=!1})):this.$notify.warning({title:this.$t("Warning"),message:this.$t("Please select an email sequence"),offset:19})}},mounted(){this.fetch()}},[["render",function(e,t,d,m,u,_){const p=c,h=q("option-selector"),g=r,f=i,b=q("Badge"),v=q("Icons"),w=q("confirm"),y=o,k=l,$=s,C=a,S=q("pagination-bar"),E=q("data-table"),V=n;return A(),j(E,{wrapper_border:!0,"has-selection":!1,class:"fcrm_mb_24"},{"header-left":L(()=>[H("h3",ce,B(e.$t("Email Sequences")),1)]),"header-actions":L(()=>[M(g,{ref:"popover",placement:"left",width:"350","hide-after":0,trigger:"click","popper-class":"fcrm_contact_popover"},{reference:L(()=>[M(p,{size:"small"},{default:L(()=>[O(B(e.$t("Add Sequence")),1)],void 0,!0),_:1})]),default:L(()=>[H("div",de,[H("h3",null,B(e.$t("Select Sequence")),1)]),H("div",me,[M(h,{modelValue:u.selected_sequence,"onUpdate:modelValue":t[0]||(t[0]=e=>u.selected_sequence=e),field:{option_key:"email_sequences",clearable:!0,size:"small",placeholder:e.$t("Select Email Sequence"),teleported:!1}},null,8,["modelValue","field"]),M(p,{onClick:_.addToSequence,loading:u.doing_action,type:"primary"},{default:L(()=>[O(B(e.$t("Add To Sequence")),1)],void 0,!0),_:1},8,["onClick","loading"])])],void 0,!0),_:1},512)]),table:L(()=>[z((A(),j(C,{"empty-text":e.$t("No Data Available"),stripe:"",border:"",data:u.sequences,style:{width:"100%"}},{default:L(()=>[M(f,{label:e.$t("Sequence")},{default:L(e=>[e.row.sequence?(A(),D("span",ue,B(e.row.sequence.title),1)):R("",!0)]),_:1},8,["label"]),M(f,{label:e.$t("Started At")},{default:L(t=>[H("span",{title:t.row.created_at},B(e.$nsHumanDiffTime(t.row.created_at)),9,_e)]),_:1},8,["label"]),M(f,{labeLine truncated
@@ -0,0 +1 @@
import{ay as a,aA as t,k as e,aD as s,aR as i}from"../../../../vendor-element-plus.js?ver=3.1.8";import{a6 as n,W as d,X as r,Z as l,ab as o,a5 as c,aa as f,a9 as _}from"../../../../vendor.js?ver=3.1.8";import{_ as u}from"../../../../fc-bits-ui.js?ver=3.1.8";const p={class:"fluentcrm_databox"},m={class:"fluentcrm_contact_header"},v={class:"fc_uploader_drawer"};const g=u({name:"ProfileFiles",props:["subscriber_id"],data:()=>({adding_file:!1,files:[],loading:!1,pagination:{total:0,per_page:10,current_page:1},new_note:{title:"",description:"",type:"note"}}),methods:{fetchAttachments(){}},mounted(){this.fetchAttachments()}},[["render",function(u,g,h,b,A,y){const j=t,w=e,x=s,k=i,C=a;return n((d(),r("div",p,[l("div",m,[o(x,{gutter:30},{default:c(()=>[o(j,{span:12},{default:c(()=>[l("h3",null,f(u.$t("Pro_Contact_F_A")),1)],void 0,!0),_:1}),o(j,{class:"text-align-right",span:12},{default:c(()=>[o(w,{onClick:g[0]||(g[0]=a=>A.adding_file=!A.adding_file),type:"primary",size:"small"},{default:c(()=>[_(f(u.$t("Add New")),1)],void 0,!0),_:1})],void 0,!0),_:1})],void 0),_:1})]),l("div",v,[o(k)]),g[1]||(g[1]=l("div",null,null,-1))])),[[C,A.loading]])}]]);export{g as default};
@@ -0,0 +1 @@
import{aB as i,aT as e,aH as s,aI as t,k as a,ay as o}from"../../../../vendor-element-plus.js?ver=3.1.8";import{W as n,Y as r,a5 as l,X as d,a8 as m,ab as c,Z as u,aa as p,bC as _,aQ as b,a6 as h,J as f,az as g,a9 as v}from"../../../../vendor.js?ver=3.1.8";import{P as w}from"../../../../PaginationBar.js?ver=3.1.8";import{D as y}from"../../../../DataTable.js?ver=3.1.8";import{_ as k}from"../../../../fc-bits-ui.js?ver=3.1.8";const C={key:0,class:"el-drawer__title"},D={key:0},V={key:1},F={key:2},$=["innerHTML"],T=["innerHTML"];const H={class:"fcrm_table_header_inner_left_title"},L=["innerHTML"];const M={key:0,class:"fcrm_profile_form_submissions_wrapper"},z={key:1},j={class:"text-align-center"};const B=k({name:"ProfileFormSubmissions",props:["subscriber_id"],components:{FormSubmissionBlock:k({name:"FormSubmissionsBlock",props:["provider","subscriber_id"],components:{DynamicWidgetContent:k({name:"DynamicWidgetContent",emits:["closed"],props:["provider","subscriber_id","params"],data:()=>({loading:!1,dataView:null,direction:"rtl",show:!0}),methods:{fetch(){this.loading=!0,this.$get(`subscribers/${this.subscriber_id}/dynamic-item-view`,{provider:this.provider.provider_key,params:this.params}).then(i=>{this.dataView=i.data_view}).catch(i=>{this.handleError(i),console.log(i)}).finally(()=>{this.loading=!1})}},mounted(){window.fcAdmin&&window.fcAdmin.is_rtl&&(this.direction="ltr"),this.fetch()}},[["render",function(s,t,a,o,_,b){const h=i,f=e;return n(),r(f,{"close-on-click-modal":!0,"append-to-body":!0,size:s.drawerWidth,modelValue:_.show,"onUpdate:modelValue":t[0]||(t[0]=i=>_.show=i),onClosed:t[1]||(t[1]=i=>s.$emit("closed")),direction:_.direction},{header:l(({close:i})=>[_.dataView?(n(),d("div",C,p(_.dataView.title),1)):m("",!0)]),default:l(()=>[_.loading?(n(),d("div",D,[c(h,{rows:5,animated:""})])):_.dataView?(n(),d("div",F,[_.dataView.content_html?(n(),d("div",{key:0,innerHTML:s.$sanitize(_.dataView.content_html)},null,8,$)):m("",!0)])):(n(),d("div",V,[u("p",null,p(s.$t("No data found")),1)]))]),footer:l(()=>[_.dataView&&_.dataView.footer_content?(n(),d("div",{key:0,innerHTML:s.$sanitize(_.dataView.footer_content)},null,8,T)):m("",!0)]),_:1},8,["size","modelValue","direction"])}]]),PaginationBar:w,DataTable:y},data:()=>({loading:!1,submissions:[],pagination:{per_page:10,current_page:1,total:0},columnsConfig:{},viewingDetails:null}),computed:{table_columns(){if(!_(this.columnsConfig))return this.columnsConfig;let i=[];return this.submissions.length&&(i=this.submissions[0]),i}},methods:{fetch(){this.loading=!0,this.$get(`subscribers/${this.subscriber_id}/form-submissions`,{provider:this.provider.provider_key,page:this.pagination.current_page,per_page:this.pagination.per_page}).then(i=>{i.submissions.columns_config&&(this.columnsConfig=i.submissions.columns_config),this.submissions=i.submissions.data,this.pagination.total=parseInt(i.submissions.total)}).catch(i=>{console.log(i)}).finally(()=>{this.loading=!1})},showDetails(i){this.viewingDetails={__id:i}}},mounted(){this.fetch()}},[["render",function(i,e,_,w,y,k){const C=a,D=t,V=s,F=b("DynamicWidgetContent"),$=b("pagination-bar"),T=b("data-table"),M=o;return n(),r(T,{wrapper_border:!0,"has-selection":!1},{"header-left":l(()=>[u("h3",H,p(_.provider.title),1)]),table:l(()=>[h((n(),r(V,{"empty-text":i.$t("No Data Found"),border:"",stripe:"",data:y.submissions},{empty:l(()=>[u("p",null,[v(p(i.$t("Form Submissions from"))+" ",1),u("b",null,p(_.provider.name),1),v(" "+p(i.$t("no_form_submissions_found_for_this_subscriber")),1)])]),default:l(()=>[(n(!0),d(f,null,g(k.table_columns,(e,s)=>(n(),r(D,{key:s,width:y.columnsConfig[s]?y.columnsConfig[s].width:"",label:y.columnsConfig[s]&&y.columnsConfig[s].label?y.columnsConfig[s].label:i.ucFirst(s)},{default:l(i=>[y.columnsConfig[s]&&y.columnsConfig[s].quick_action?(n(),r(C,{key:0,size:"small",onClick:e=>k.showDetails(i.row.__id),innerHTML:i.row[s]},null,8,["onClick","innerHTML"])):(n(),d("div",{key:1,innerHTML:i.row[s]},null,8,L))]),_:2},1032,["width","label"]))),128))],void 0,!0),_:1},8,["empty-text","data"])),[[M,y.loading]]),y.viewingDetails?(n(),r(F,{key:0,params:y.viewingDetails,provider:_.provider,subscriber_id:_.subscriber_id,onClosed:e[0]||(e[0]=i=>y.viewingDetails=null)},null,8,["params","provider","subscriber_id"])):m("",!0)]),pagination:l(()=>[c($,{pagination:y.pagination,onFetch:k.fetch},null,8,["pagination","onFetch"])]),_:1})}]])},data:()=>({providersData:{},app_ready:!1}),computed:{is_empty_item(){return this.isEmptyValue(this.providersData)}},mounted(){this.each(window.fcAdmin.form_submission_providers,(i,e)=>{const s={title:i.title,name:i.name,provider_key:e};this.providersData[e]=s}),this.app_ready=!0}},[["render",function(i,e,s,t,a,o){const l=b("form-submission-block");return a.app_ready?(n(),d("div",M,[o.is_empty_item?(n(),d("div",z,[u("h3",j,p(i.$t("Pro_Form_SfFFwbshCFF")),1)])):(n(!0),d(f,{key:0},g(a.providersData,(i,e)=>(n(),r(l,{key:e,provider:i,subscriber_id:s.subscriber_id},null,8,["provider","subscriLine truncated
@@ -0,0 +1 @@
import{a3 as e,a6 as t,a4 as s,D as i,ay as o,k as n,e as a,az as l,aT as r}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as d,a6 as c,W as h,X as _,Z as p,aa as u,a0 as m,ab as f,a5 as g,b2 as v,Y as b,a8 as y,a9 as k,J as w,az as N,ax as x,ac as C}from"../../../../vendor.js?ver=3.1.8";import{P as $}from"../../../../PaginationBar.js?ver=3.1.8";import{C as S}from"../../../../Confirm.js?ver=3.1.8";import{F as V}from"../../../../_FormBuilder2.js?ver=3.1.8";import{_ as M,I as L}from"../../../../fc-bits-ui.js?ver=3.1.8";import{c as j}from"../../../../clipboard.js?ver=3.1.8";import{F as B}from"../../../../FloatingBulkActionShell.js?ver=3.1.8";import"../../../../PhotoWidget.js?ver=3.1.8";import"../../../../input-popover-dropdown.js?ver=3.1.8";import"../../../../data_config.js?ver=3.1.8";import"../../../../_OptionSelector.js?ver=3.1.8";import"../../../../_AjaxSelector.js?ver=3.1.8";import"../../../../_VerifiedEmailInput.js?ver=3.1.8";const H={class:"fcrm_notes_wrapper_inner fcrm_object_notes_template"},D={class:"fcrm_notes_header"},A={class:"fcrm_notes_header_title"},T={class:"fcrm_notes_header_actions"},z={class:"icon"},I={class:"icon"},Z={class:"icon"},E={class:"fcrm_notes_body"},U={class:"fcrm_notes_list"},F=["data-note-id"],P=["onClick"],Y={class:"fcrm_note_header_left"},q={class:"fcrm_note_avatar"},O=["src","alt"],K={key:1,class:"fcrm_note_avatar_initials"},Q={class:"fcrm_note_info"},W={class:"fcrm_note_title"},G={class:"fcrm_note_meta"},J={key:0},X={key:1},R=["title"],ee={class:"fcrm_note_header_right"},te=["innerHTML"],se={key:1,class:"fcrm_empty_state"},ie={class:"fcrm_empty_state_text"},oe={class:"fc_company_save_wrap"},ne={class:"fcrm_bulk_action_bar"},ae={class:"fcrm_bulk_action_left"},le={class:"icon"},re={class:"fc_bulk_selection_count"},de={key:0,class:"fcrm_bulk_divider"},ce={class:"icon"};const he={class:"fc_notes_wrapper fcrm_notes_wrapper"};const _e=M({name:"ProfileNotes",props:["subscriber_id"],components:{ObjectNotesTemplate:M({name:"ObjectNoteTemplate",props:["subscriber_id","route_prefix","section_title","target_note_id"],emits:["added","deleted","updated"],components:{PaginationBar:$,Confirm:S,FormBuilder:V,Search:i,Download:s,Delete:t,Edit:e,FloatingBulkActionShell:B,Icons:L},data:()=>({direction:"rtl",loading:!1,notes:[],types:window.fcAdmin.activity_types,pagination:{total:0,per_page:10,current_page:1},editing_note:{title:"",description:"",type:"note",created_at:""},is_editing_note:!1,search:"",updating:!1,is_changed:!1,note_syncing_fields:{},showSearchBar:!1,expandedNotes:{},targetedNoteId:null,bulkMode:!1,selectedNotes:[]}),watch:{"editing_note.type"(e,t){this.handleValueUpdate(e,t)},"editing_note.title"(e,t){this.handleValueUpdate(e,t)},"editing_note.description"(e,t){this.handleValueUpdate(e,t)},"editing_note.created_at"(e,t){this.handleValueUpdate(e,t)}},computed:{isSubscriberNotesContext(){return"subscribers"===this.route_prefix},allSelected(){return this.notes.length>0&&this.selectedNotes.length===this.notes.length},someSelected(){return this.selectedNotes.length>0&&this.selectedNotes.length<this.notes.length}},methods:{toggleNote(e){this.expandedNotes={...this.expandedNotes,[e]:!this.expandedNotes[e]}},toggleAllNotes(){const e=this.notes.every(e=>this.expandedNotes[e.id]),t={};this.notes.forEach(s=>{t[s.id]=!e}),this.expandedNotes=t},toggleBulkMode(){this.bulkMode=!this.bulkMode,this.bulkMode||(this.selectedNotes=[])},toggleNoteSelection(e){if(!this.isSubscriberNotesContext||!this.bulkMode)return;const t=this.selectedNotes.indexOf(e);-1===t?this.selectedNotes.push(e):this.selectedNotes.splice(t,1)},toggleAllSelection(){this.isSubscriberNotesContext&&this.bulkMode&&(this.allSelected?this.selectedNotes=[]:this.selectedNotes=this.notes.map(e=>e.id))},getInitials:e=>e&&e.display_name?e.display_name.split(" ").map(e=>e[0]).join("").toUpperCase().substring(0,2):"A",handleValueUpdate(e,t){e!==t&&(this.is_changed=!0)},handleClose(e){this.is_changed?this.$confirm(this.$t("You have unsaved data, proceed?")).then(t=>{this.is_changed=!1,this.is_editing_note=!1,this.resetNoteData(),e()}).catch(e=>{console.log(e)}):e()},fetch(){this.loading=!0;const e={per_page:this.pagination.per_page,page:this.pagination.current_page,search:this.search};this.target_note_id&&1===this.pagination.current_page&&!this.search&&(e.include_id=this.target_note_id),this.$get(`${this.route_prefix}/${this.subscriber_id}/notes`,e).then(e=>{if(this.notes=e.notes.data,this.selectedNotes=[],this.pagination.total=e.notes.total,this.note_syncing_fields=e.fields,this.resetNoteData(),this.is_editing_note=!1,e.included_note&&this.notes.unshift(e.included_note),this.target_note_id){const e=parseInt(this.target_note_id);this.notes.some(t=>t.id===e)&&(this.expandedNotes={...this.expandedNotes,[e]:!0},this.targetedNoteId=e,this.$nextTick(()=>{const t=this.$el.querySelector('[data-note-id="'+e+'"]');t&&t.scrollIntoView({behavior:"smooth",block:"center"}),setTimeout(()=>{this.targetedNoteId=null},3e3)}))}}).catch(e=>{thLine truncated
@@ -0,0 +1 @@
import{aA as t,aB as r,aH as e,aI as a,ay as s,k as o,aD as i}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as n,W as l,X as d,ab as c,a5 as h,Z as _,Y as p,a6 as u,J as m,az as y,a9 as b,aa as f,a8 as g}from"../../../../vendor.js?ver=3.1.8";import{P as v}from"../../../../PaginationBar.js?ver=3.1.8";import{D as k}from"../../../../DataTable.js?ver=3.1.8";import{_ as S}from"../../../../fc-bits-ui.js?ver=3.1.8";const C={class:"purchase_history_block fcrm_mb_24"},P={class:"fcrm_table_header_inner_left_title"},w={class:"fcrm_purchase_history_table_header_actions"},H={class:"fcrm_purchase_history_table_body"},D=["innerHTML"],T=["innerHTML"],q=["innerHTML"];const $={key:0,class:"fluentcrm_purchase_history_wrapper"},B={key:1},L={class:"text-align-center"};const M=S({name:"ProfilePurchaseHistory",props:["subscriber_id"],components:{PurchaseHistoryBlock:S({name:"PurchaseHistoryBlock",props:["provider","subscriber_id"],components:{PaginationBar:v,DataTable:k},data:()=>({loading:!1,orders:[],pagination:{per_page:10,current_page:1,total:0},sidebar_html:"",after_html:"",has_recount:!1,columnsConfig:{},query_data:{sort_by:"",sort_type:""},sortState:{currentProp:"",direction:""}}),computed:{table_columns(){let t=[];return this.orders&&this.orders.length&&(t=this.orders[0]),t}},methods:{handleSortable(t){t.prop?(this.query_data.sort_by=t.prop,this.sortState.currentProp!==t.prop?(this.sortState.currentProp=t.prop,this.sortState.direction="ASC"):this.sortState.direction="ASC"===this.sortState.direction?"DESC":"ASC",this.query_data.sort_type=this.sortState.direction,this.fetch()):(this.query_data.sort_by="",this.query_data.sort_type="",this.sortState.currentProp="",this.sortState.direction="")},fetch(t=!1){this.loading=!0,this.$get(`subscribers/${this.subscriber_id}/purchase-history`,{provider:this.provider.provider_key,page:this.pagination.current_page,per_page:this.pagination.per_page,sort_by:this.query_data.sort_by,sort_type:this.query_data.sort_type,will_recount:t}).then(t=>{this.orders=t.orders.data,this.pagination.total=parseInt(t.orders.total),t.orders.sidebar_html&&(this.sidebar_html=t.orders.sidebar_html),t.orders.after_html&&(this.after_html=t.orders.after_html),this.has_recount=t.orders.has_recount,t.orders.columns_config&&(this.columnsConfig=t.orders.columns_config)}).catch(t=>{this.handleError(t)}).finally(()=>{this.loading=!1})}},mounted(){this.fetch()}},[["render",function(v,k,S,$,B,L){const M=o,j=r,A=a,x=e,E=n("pagination-bar"),F=n("data-table"),z=t,I=i,J=s;return l(),d("div",C,[c(I,{gutter:24},{default:h(()=>[c(z,{md:B.sidebar_html?16:24,sm:24},{default:h(()=>[c(F,{class:"fcrm_purchase_history_table_wrapper",wrapper_border:!0,"has-selection":!1},{"header-left":h(()=>[_("h3",P,f(S.provider.title),1)]),"header-actions":h(()=>[_("div",w,[B.has_recount?(l(),p(M,{key:0,class:"fcrm_purchase_history_resync_btn",onClick:k[0]||(k[0]=t=>L.fetch("yes")),type:"default",size:"small"},{default:h(()=>[b(f(v.$t("Re-Sync")),1)],void 0,!0),_:1})):g("",!0)])]),table:h(()=>[_("div",H,[B.loading?(l(),p(j,{key:0,animated:"",rows:10})):u((l(),p(x,{key:1,"empty-text":v.$t("No Data Found"),border:"",stripe:"",data:B.orders,onSortChange:L.handleSortable},{empty:h(()=>[_("p",null,[b(f(v.$t("Purchase History from"))+" ",1),_("b",null,f(S.provider.name),1),b(" "+f(v.$t("PurchaseHistoryBlock.empty_desc")),1)])]),default:h(()=>[(l(!0),d(m,null,y(L.table_columns,(t,r)=>{var e,a;return l(),p(A,{key:r,width:B.columnsConfig[r]?B.columnsConfig[r].width:"",label:B.columnsConfig[r]&&B.columnsConfig[r].label?B.columnsConfig[r].label:"",prop:(null==(e=B.columnsConfig[r])?void 0:e.sortable)?B.columnsConfig[r].key:"",sortable:!!(null==(a=B.columnsConfig[r])?void 0:a.sortable)},{default:h(t=>[_("div",{innerHTML:t.row[r]},null,8,D)]),_:2},1032,["width","label","prop","sortable"])}),128))],void 0,!0),_:1},8,["empty-text","data","onSortChange"])),[[J,B.loading]]),B.after_html?(l(),d("div",{key:2,class:"fc_history_before",innerHTML:B.after_html},null,8,T)):g("",!0)])]),pagination:h(()=>[c(E,{pagination:B.pagination,onFetch:L.fetch},null,8,["pagination","onFetch"])]),_:1})],void 0,!0),_:1},8,["md"]),B.sidebar_html?(l(),p(z,{key:0,md:8,sm:24},{default:h(()=>[_("div",{class:"fc_history_sidebar",innerHTML:B.sidebar_html},null,8,q)],void 0,!0),_:1})):g("",!0)],void 0),_:1})])}]])},data:()=>({providersData:{},app_ready:!1}),computed:{is_empty_item(){return this.isEmptyValue(this.providersData)}},mounted(){this.each(window.fcAdmin.purchase_providers,(t,r)=>{const e={title:t.title,name:t.name,provider_key:r};this.providersData[r]=e}),this.app_ready=!0}},[["render",function(t,r,e,a,s,o){const i=n("purchase-history-block");return s.app_ready?(l(),d("div",$,[o.is_empty_item?(l(),d("div",B,[_("h3",L,f(t.$t("Pro_Purchase_hfEwbsh")),1)])):(l(!0),d(m,{key:0},y(s.providersData,(t,r)=>(l(),p(i,{key:r,provider:t,subscriber_id:e.subscriber_id},null,8,["provider","subscriber_id"]))),128))])):g("",!0)}]]);export{M as default};
@@ -0,0 +1 @@
import{aH as t,aI as e,ay as a}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as i,W as s,X as r,ab as o,a5 as n,a6 as c,Y as p,J as l,az as d,Z as u,a9 as _,aa as m,a8 as h}from"../../../../vendor.js?ver=3.1.8";import{P as b}from"../../../../PaginationBar.js?ver=3.1.8";import{D as f}from"../../../../DataTable.js?ver=3.1.8";import{_ as g}from"../../../../fc-bits-ui.js?ver=3.1.8";const k={class:"purchase_history_block"},v={class:"fcrm_table_header_inner_left_title"},y=["innerHTML"];const T={key:0};const w=g({name:"ProfileSuportTickets",props:["subscriber_id"],components:{SupportTicketsBlock:g({name:"SupportTicketsBlock",props:["provider","subscriber_id"],components:{DataTable:f,PaginationBar:b},data:()=>({loading:!1,tickets:[],pagination:{per_page:10,current_page:1,total:0},columnsConfig:{}}),computed:{table_columns(){let t=[];return this.tickets&&this.tickets.length&&(t=this.tickets[0]),t}},methods:{fetch(){this.loading=!0,this.$get(`subscribers/${this.subscriber_id}/support-tickets`,{provider:this.provider.provider_key,page:this.pagination.current_page,per_page:this.pagination.per_page}).then(t=>{this.tickets=t.tickets.data,this.pagination.total=parseInt(t.tickets.total),t.tickets.columns_config&&(this.columnsConfig=t.tickets.columns_config)}).catch(t=>{this.handleError(t)}).finally(()=>{this.loading=!1})}},mounted(){this.fetch()}},[["render",function(h,b,f,g,T,w){const C=e,D=t,j=i("pagination-bar"),$=i("data-table"),B=a;return s(),r("div",k,[o($,{class:"fcrm_support_ticket_block",wrapper_border:!0,"has-selection":!1},{"header-left":n(()=>[u("h3",v,m(f.provider.title),1)]),table:n(()=>[c((s(),p(D,{"empty-text":h.$t("No Data Found"),border:"",stripe:"",data:T.tickets},{empty:n(()=>[u("p",null,[_(m(h.$t("Support Tickets from"))+" ",1),u("b",null,m(f.provider.name),1),_(" "+m(h.$t("no_tickets_found_for_this_subscriber")),1)])]),default:n(()=>[(s(!0),r(l,null,d(w.table_columns,(t,e)=>(s(),p(C,{key:e,width:T.columnsConfig[e]?T.columnsConfig[e].width:"",label:T.columnsConfig[e]&&T.columnsConfig[e].label?T.columnsConfig[e].label:h.ucFirst(e)},{default:n(t=>[u("div",{innerHTML:t.row[e]},null,8,y)]),_:2},1032,["width","label"]))),128))],void 0,!0),_:1},8,["empty-text","data"])),[[B,T.loading]])]),pagination:n(()=>[o(j,{pagination:T.pagination,onFetch:w.fetch},null,8,["pagination","onFetch"])]),_:1})])}]])},data:()=>({providersData:{},app_ready:!1}),computed:{},mounted(){this.each(window.fcAdmin.support_tickets_providers,(t,e)=>{const a={title:t.title,name:t.name,provider_key:e};this.providersData[e]=a}),this.app_ready=!0}},[["render",function(t,e,a,o,n,c){const u=i("support-tickets-block");return n.app_ready?(s(),r("div",T,[(s(!0),r(l,null,d(n.providersData,(t,e)=>(s(),p(u,{key:e,provider:t,subscriber_id:a.subscriber_id},null,8,["provider","subscriber_id"]))),128))])):h("",!0)}]]);export{w as default};
@@ -0,0 +1 @@
import{k as e,aT as t,aD as i,aA as r,aB as s}from"../../../../vendor-element-plus.js?ver=3.1.8";import{aQ as a,W as o,X as n,Z as d,aa as l,ab as c,a5 as h,a9 as _,a8 as m,a0 as f,Y as u}from"../../../../vendor.js?ver=3.1.8";import{F as p}from"../../../../_FormBuilder2.js?ver=3.1.8";import{_ as v}from"../../../../fc-bits-ui.js?ver=3.1.8";import"../../../../PhotoWidget.js?ver=3.1.8";import"../../../../input-popover-dropdown.js?ver=3.1.8";import"../../../../data_config.js?ver=3.1.8";import"../../../../_OptionSelector.js?ver=3.1.8";import"../../../../_AjaxSelector.js?ver=3.1.8";import"../../../../_VerifiedEmailInput.js?ver=3.1.8";const g={key:0,class:"fcrm_external_profile_wrapper"},b={class:"fcrm_external_profile_header"},w={class:"fcrm_external_profile_header--title"},y={key:0,class:"fcrm_external_profile_header--actions"},x=["innerHTML"],j={key:0},F={key:0,style:{padding:"10px 15px"}},k={class:"fc_drawer_footer"};const D=v({name:"SubscriberProfileExternalView",props:["subscriber","subscriber_id"],components:{FormBuilder:p},data(){return{direction:"rtl",profile_section:this.$route.query.handler,heading:"",content_html:"",loading:!0,crud:null,showForm:!1,crudConfig:{},saving:!1}},methods:{fetchData(){this.loading=!0,this.$get(`subscribers/${this.subscriber_id}/external_view`,{section_provider:this.profile_section}).then(e=>{this.heading=e.heading,this.content_html=e.content_html,e.crud&&(this.crud=e.crud)}).catch(e=>{this.handleError(e)}).finally(()=>{this.loading=!1})},initCrudForm(){if(!this.crud.fields)return;const e={};this.each(this.crud.fields,(t,i)=>{e[i]=t.default_value||""}),this.crudConfig.model=e,this.showForm=!0},saveData(){this.saving=!0,this.$post(`subscribers/${this.subscriber_id}/external_view`,{section_provider:this.profile_section,data:this.crudConfig.model}).then(e=>{this.$notify.success(e.message||"Saved successfully"),this.showForm=!1,e.content_html?(this.content_html=e.content_html,e.heading&&(this.heading=e.heading)):this.fetchData()}).catch(e=>{this.handleError(e)}).finally(()=>{this.saving=!1})}},mounted(){window.fcAdmin&&window.fcAdmin.is_rtl&&(this.direction="ltr"),this.fetchData()}},[["render",function(p,v,D,C,S,$){const V=e,z=a("form-builder"),A=t,E=s,B=r,T=i;return S.loading?(o(),u(E,{key:1,style:{"margin-top":"20px"},class:"fc_skeleton_loader",animated:""},{template:h(()=>[c(T,{gutter:30},{default:h(()=>[c(B,{span:12},{default:h(()=>[c(E,{rows:10})],void 0,!0),_:1}),c(B,{span:12},{default:h(()=>[c(E,{rows:3})],void 0,!0),_:1})],void 0,!0),_:1})]),_:1})):(o(),n("div",g,[d("div",b,[d("h3",w,l(S.heading),1),S.crud&&S.crud.btn_label?(o(),n("div",y,[c(V,{onClick:v[0]||(v[0]=e=>$.initCrudForm()),size:"small"},{default:h(()=>[_(l(S.crud.btn_label),1)],void 0),_:1})])):m("",!0)]),d("div",{class:f(["fcrm_external_profile_data","fcrm_section_"+S.profile_section]),innerHTML:S.content_html},null,10,x),S.crud&&S.crud.btn_label?(o(),n("div",j,[c(A,{direction:S.direction,class:"fc_company_info_drawer","with-header":!0,size:p.globalDrawerSize,title:S.crud.form_heading,"append-to-body":!0,modelValue:S.showForm,"onUpdate:modelValue":v[2]||(v[2]=e=>S.showForm=e)},{default:h(()=>[S.showForm?(o(),n("div",F,[c(z,{formData:S.crudConfig.model,fields:S.crud.fields},null,8,["formData","fields"]),d("div",k,[c(V,{type:"primary",onClick:v[1]||(v[1]=e=>$.saveData())},{default:h(()=>[_(l(S.crud.save_btn_text||"Save"),1)],void 0,!0),_:1})])])):m("",!0)],void 0),_:1},8,["direction","size","title","modelValue"])])):m("",!0)]))}]]);export{D as default};
@@ -0,0 +1 @@
import{aQ as e,aS as s,k as t,aB as i,T as a,aH as r,aI as o,aO as n,as as c,aK as l,aL as d,E as u,P as m,at as h,ay as p,h as _,i as b,j as f,D as g,e as y,az as v,aG as w,aT as C,aE as $,b9 as k,b5 as S,aq as x,ar as V,aN as L,ap as P,Q as A,aZ as M,a_ as H,aD as I,aA as T,aC as Z}from"../../../vendor-element-plus.js?ver=3.1.8";import{aQ as U,W as D,X as E,Z as z,aa as F,J as N,az as R,Y as B,a5 as q,ab as O,a8 as j,a9 as W,a0 as G,$ as K,_ as Q,a6 as Y,ax as J,b2 as X,bV as ee,ad as se,a7 as te,ac as ie,av as ae}from"../../../vendor.js?ver=3.1.8";import{T as re,E as oe,C as ne,u as ce}from"../../../Tagger.js?ver=3.1.8";import{_ as le,I as de}from"../../../fc-bits-ui.js?ver=3.1.8";import{P as ue}from"../../../PhotoWidget.js?ver=3.1.8";import{P as me}from"../../../PaginationBar.js?ver=3.1.8";import{C as he}from"../../../Confirm.js?ver=3.1.8";import{j as pe}from"../../../data_config.js?ver=3.1.8";import{P as _e}from"../../../PromoCard.js?ver=3.1.8";import{B as be}from"../../../Badge.js?ver=3.1.8";import"../../../CompanyEditForm.js?ver=3.1.8";import"../../../fc-bits.js?ver=3.1.8";import"../../../Filterer.js?ver=3.1.8";const fe={class:"header"},ge={class:"items"},ye={class:"items_actions"},ve={class:"items_inner"},we={key:0,class:"icon"},Ce={key:1,class:"icon"},$e={class:"fc_tagger_footer fcrm_mt_10"};const ke={class:"fcrm_profile_tagger fc_profile_tagger"},Se={key:0,class:"fcrm_profile_tagger_row"},xe={key:1,class:"fcrm_profile_tagger_row"};const Ve=le({name:"ProfileListTags",props:["subscriber"],components:{Tagger:le({name:"Tagger",components:{Editor:oe,Icons:de},data:()=>({new_payload:!1,showItem:!0}),props:["type","taggables","options","matched","creatable"],emits:["addedNew"],mixins:[re],computed:{none(){return"tags"==this.type?this.$t("No tags found"):"lists"==this.type?this.$t("No lists found"):"No "+this.type+" found"}},methods:{handleClose(e){this.$confirm(this.$t("Are you sure you want to remove this?"),this.$t("Warning"),{confirmButtonText:this.$t("OK"),cancelButtonText:this.$t("Cancel"),type:"warning"}).then(()=>{this.remove(e)}).catch(()=>{})},remove(e){this.subscribe({attach:[],detach:[e]})},updatePayLoad(e){this.new_payload=e},pushPayload(){this.new_payload?(this.subscribe(this.new_payload),setTimeout(()=>{this.showItem=!1,this.$nextTick(()=>{this.showItem=!0})},500)):this.$notify.error(this.$t("No changes found"))},getDescription(e){return e.pivot?this.$t("Added @ ")+e.pivot.created_at:""}}},[["render",function(i,a,r,o,n,c){const l=U("icons"),d=e,u=s,m=t,h=U("editor");return r.taggables&&n.showItem?(D(),E("div",{key:0,class:G("fcrm_profile_tagger_"+r.type)},[z("div",fe,[z("h2",null,F(i.$t(r.type)),1)]),z("div",ge,[z("div",ye,[z("div",ve,[(D(!0),E(N,null,R(r.taggables,e=>(D(),B(d,{key:e.title,class:"el-tag--white",title:c.getDescription(e),closable:"",onClose:s=>c.handleClose(e.slug)},{default:q(()=>["tags"===r.type?(D(),E("span",we,[O(l,{iconName:"TagIcon"})])):j("",!0),"lists"===r.type?(D(),E("span",Ce,[O(l,{iconName:"ListIcon"})])):j("",!0),W(" "+F(e.title),1)],void 0),_:2},1032,["title","onClose"]))),128)),r.taggables.length?j("",!0):(D(),B(u,{key:0,title:c.none,type:"info",closable:!1},null,8,["title"])),O(h,{type:r.type,options:i.choices,noMatch:i.noMatch,matched:r.matched,selectionCount:1,placement:"bottom-start",onSearch:i.search,onAddedNew:a[1]||(a[1]=e=>{i.$emit("addedNew",e)}),creatable:r.creatable,onSubscribe:c.updatePayLoad},{footer:q(()=>[z("div",$e,[O(m,{onClick:a[0]||(a[0]=e=>c.pushPayload()),style:{width:"100%"},type:"primary",size:"small"},{default:q(()=>[W(F(i.$t("Confirm")),1)],void 0,!0),_:1})])]),_:1},8,["type","options","noMatch","matched","onSearch","creatable","onSubscribe"])])])])],2)):j("",!0)}],["__scopeId","data-v-81e7743d"]])},data:()=>({options:{tags:[],lists:[]},matches:{tags:{},lists:{}},subscribing:!1}),methods:{setup(e){this.matches.tags=[],this.matches.lists=[],this.subscriber.tags=e.tags,this.subscriber.lists=e.lists,e.tags.forEach(e=>this.match(e,this.matches.tags)),e.lists.forEach(e=>this.match(e,this.matches.lists))},getOptions(){this.options={tags:this.appVars.available_tags,lists:this.appVars.available_lists}},subscribe({type:e,payload:s}){const{attach:t,detach:i}=s,a={type:e,attach:t,detach:i,subscribers:[this.subscriber.id]};this.subscribing=!0,this.$post("subscribers/sync-segments",a).then(e=>{const s=e.subscribers[0];this.setup(s),this.$notify.success({title:this.$t("Great!"),message:e.message,offset:19})}).catch(e=>{this.handleError(e)}).finally(()=>{this.subscribing=!1})},search(e,s){this.options[e]=s},match(e,s){s[e.slug]=1}},mounted(){this.getOptions(),this.setup(this.subscriber)}},[["render",function(e,s,t,a,r,o){const n=i,c=U("tagger");return D(),E("div",ke,[r.subscribing?(D(),E("div",Se,[O(n,{rows:3})])):(D(),E("div",xe,[O(c,{type:"lists",onSearch:o.search,onSubscribe:o.subscribe,class:"info-item",creatable:!0,options:r.options.lists,onAddedNew:s[0]||(s[0]=e=>{r.options.lists.push(e)}),matched:r.matches.lists,taggables:t.subscriber.lists},nLine truncated