PageSourceSearch

https://vizops360.ai/assets/salesStore-DZSBJF3Y.js

js vizops360.ai collected 2026-10-05 13:51:08 UTC 18,786 bytes, 1 lines download raw bytes

1import{aP as P,aQ as C}from"./index-CpeGhXo5.js";import{c as T}from"./leadAiScore-DLZA4zjJ.js";import{d as n,C as I,p as d}from"./mockData-CiONmYY6.js";const y=["Discovery","Qualification","Proposal","Negotiation","Closed Won","Closed Lost"],D=[{id:"s1",platform:"Upwork",url:"https://www.upwork.com/freelancers/bhavya_dev",username:"bhavya_dev",displayName:"Bhavya_Dev ($23/hr)",ownerId:"p5",rateType:"Hourly",rateAmount:23,currency:"USD",status:"Active",jss:92,rating:4.9,tags:["high-performing","dev-focused"],createdAt:n(-180)},{id:"s2",platform:"Upwork",url:"https://www.upwork.com/freelancers/techstudio_in",username:"techstudio_in",displayName:"TechStudio_IN ($18/hr)",ownerId:"p1",rateType:"Hourly",rateAmount:18,currency:"USD",status:"Active",jss:85,rating:4.7,tags:["enterprise"],createdAt:n(-220)},{id:"s3",platform:"LinkedIn",url:"https://www.linkedin.com/in/priyamehta",username:"priyamehta",displayName:"Priya Mehta (Premium)",ownerId:"p2",rateType:"Monthly Subscription",rateAmount:80,currency:"USD",status:"Active",tags:["high-performing"],createdAt:n(-365)},{id:"s4",platform:"Fiverr",url:"https://www.fiverr.com/devstudio99",username:"devstudio99",displayName:"devstudio99 ($15/hr)",ownerId:"p7",rateType:"Hourly",rateAmount:15,currency:"USD",status:"Paused",rating:4.5,tags:[],createdAt:n(-150)},{id:"s5",platform:"Toptal",url:"https://www.toptal.com/resume/meera-nair",username:"meera-nair",displayName:"Meera Nair ($45/hr)",ownerId:"p8",rateType:"Hourly",rateAmount:45,currency:"USD",status:"Active",rating:5,tags:["enterprise","high-performing"],createdAt:n(-90)},{id:"s6",platform:"Website",url:"https://company.com/contact",username:"website-form",displayName:"Website Contact Form",ownerId:"p2",rateType:"Free",currency:"INR",status:"Active",tags:[],createdAt:n(-300)}],S=["new","contacted","qualified","proposal","negotiation","won","lost","on_hold"],L=["Critical","Urgent","High","Medium","Low"],N=["Web App","Mobile App","API","Design","AI/ML","Consulting"],p=["E-commerce Web App Development","Mobile App for Food Delivery","B2B SaaS Dashboard Redesign","REST API for Inventory System","AI Chatbot for Customer Support","Marketplace Platform MVP","Healthcare Patient Portal","Fintech Lending Application","Real Estate Listings Portal","Logistics Tracking System","EdTech LMS Platform","HR Management System","Subscription Billing Integration","Cross-platform React Native App","Data Analytics Dashboard"],v=["Arjun","Riya","Sanjay","Pooja","Karan","Tanya","Rohit","Ananya","Aditya","Isha","Nikhil","Kavya","Manish","Divya","Varun"],b=["Mehta","Iyer","Khanna","Verma","Reddy","Kapoor","Bhatt","Rao","Malhotra","Joshi","Nair","Shetty","Pillai","Saxena","Bose"],f=["India","USA","UK","Germany","Australia","UAE","Singapore"],m=["Technology","E-commerce","Healthcare","Finance","Education","Manufacturing","Retail"],$=[["React","Node.js"],["React Native","Firebase"],["Next.js","PostgreSQL"],["Python","FastAPI"],["Vue.js","Laravel"],["Flutter","Supabase"]],k=Array.from({length:16}).map((r,e)=>{const t=d(D,e),o=S[e%S.length],a=d(v,e),i=d(b,e+3),s=d(I,e),u=[8e4,12e4,25e4,42e4,68e4,12e5,18e5,35e4][e%8],c=-(e*2+1);return{id:`l${e+1}`,sourcePlatform:t.platform,sourceAccountId:t.id,leadType:["Bid Won","Direct Invite","Direct Lead","Referral","Inbound"][e%5],jobUrl:t.platform==="Upwork"?`https://www.upwork.com/jobs/~01abc${e}`:void 0,jobTitle:t.platform==="Upwork"?p[e%p.length]:void 0,bidAmount:t.platform==="Upwork"?50+e*10:void 0,contractType:t.platform==="Upwork"?e%2===0?"Fixed":"Hourly":void 0,company:s,companyWebsite:`https://${s.toLowerCase().replace(/[^a-z]/g,"")}.com`,industry:d(m,e),companySize:["11-50","51-200","201-1000"][e%3],country:d(f,e),city:["Bengaluru","Mumbai","Delhi","Pune","Hyderabad"][e%5],firstName:a,lastName:i,email:`${a.toLowerCase()}.${i.toLowerCase()}@${s.toLowerCase().replace(/[^a-z]/g,"")}.com`,phone:`+91 9${(8e8+e*1234567).toString().slice(0,9)}`,designation:["CTO","Product Manager","Founder","VP Engineering","Head of Product"][e%5],linkedin:`https://linkedin.com/in/${a.toLowerCase()}${i.toLowerCase()}`,timezone:"IST",preferredContact:"Email",title:d(p,e),description:`${s} is looking to build ${d(p,e).toLowerCase()}. They need a modern, scalable solution with focus on user experience and performance. Initial scope includes design, development, testing, and deployment.`,projectType:d(N,e),techStack:d($,e),budget:u,budgetCurrency:e%4===0?"USD":"INR",budgetType:["Fixed","Hourly","TBD"][e%3],timeline:["1-3 months","3-6 months","< 1 month","6-12 months"][e%4],complexity:["L
1ow","Medium","High","Enterprise"][e%4],priority:d(L,e),estimatedValue:u,assigneeId:d(["p2","p10","p5","p1"],e),team:"Sales East",followUpDate:n(e%5===0?-2:e%7+1),tags:e%3===0?["urgent","enterprise"]:e%3===1?["repeat-client"]:["inbound"],internalNotes:"",status:o,aiScore:Math.round(40+e*17%60),createdAt:n(c),createdById:"p1",lastActivityAt:n(c+1)}}),R=[{id:"a1",leadId:"l1",type:"Call",subject:"Discovery call with client",description:"Discussed scope, budget, and timeline. Client is keen.",outcome:"Positive",date:n(-1),duration:35,byId:"p2"},{id:"a2",leadId:"l1",type:"Email",subject:"Sent introductory deck",outcome:"Neutral",date:n(-2),byId:"p2"},{id:"a3",leadId:"l2",type:"Meeting",subject:"Product demo",description:"Walked through MVP build and timeline.",outcome:"Positive",date:n(-3),duration:60,byId:"p10"},{id:"a4",leadId:"l3",type:"Note",subject:"Client requested case studies",description:"Need to send 2 e-commerce case studies.",date:n(-4),byId:"p5"},{id:"a5",leadId:"l4",type:"Follow-up",subject:"Pinged on WhatsApp",outcome:"No Response",date:n(-5),byId:"p2"},{id:"a6",leadId:"l5",type:"Email",subject:"Proposal sent",outcome:"Positive",date:n(-1),byId:"p10"},{id:"a7",leadId:"l1",type:"Created",subject:"Lead created from Upwork (Bhavya_Dev)",date:n(-6),byId:"p1"}],E=[{id:"st1",leadId:"l1",title:"Research client's existing platform",type:"Research",assigneeId:"p4",dueDate:n(2),priority:"High",status:"In Progress"},{id:"st2",leadId:"l1",title:"Schedule technical deep-dive call",type:"Call",assigneeId:"p2",dueDate:n(1),priority:"Critical",status:"Open"},{id:"st3",leadId:"l2",title:"Draft initial proposal",type:"Proposal",assigneeId:"p10",dueDate:n(3),priority:"High",status:"Open"}],w=["Prospect","Lead","Active Client","Past Client","Partner"],h=["Enterprise","Mid-Market","SMB","Startup"],l=I.map((r,e)=>({id:`co${e+1}`,name:r,website:`https://${r.toLowerCase().replace(/[^a-z]/g,"")}.com`,industry:d(m,e),size:["11-50","51-200","201-1000","1000+"][e%4],country:d(f,e),city:["Bengaluru","Mumbai","Delhi","Pune","Hyderabad"][e%5],annualRevenue:["< ₹1 Cr","₹1-10 Cr","₹10-100 Cr","> ₹100 Cr"][e%4],foundedYear:2005+e%18,description:`${r} is a leading ${d(m,e).toLowerCase()} firm focused on innovation and customer outcomes.`,linkedin:`https://linkedin.com/company/${r.toLowerCase().replace(/[^a-z]/g,"")}`,gst:`27ABCDE${1e3+e}F1Z${e%10}`,pan:`ABCDE${1e3+e}F`,paymentTerms:["Net 15","Net 30","Net 45","Advance"][e%4],currency:e%5===0?"USD":"INR",clientType:w[e%w.length],accountTier:h[e%h.length],tags:e%2===0?["enterprise"]:["growth"],accountManagerId:d(["p2","p10"],e),createdAt:n(-(e*10+30))})),A=["IST","PST","EST","GMT","CET","AEST"],g=Array.from({length:18}).map((r,e)=>{const t=d(v,e),o=d(b,e+5),a=l[e%l.length];return{id:`ct${e+1}`,firstName:t,lastName:o,email:`${t.toLowerCase()}.${o.toLowerCase()}@${a.name.toLowerCase().replace(/[^a-z]/g,"")}.com`,phone:`+91 9${(8e8+e*7654321).toString().slice(0,9)}`,designation:["CTO","Product Manager","Founder","VP Engineering","Head of Product","CEO","Engineering Manager"][e%7],department:["Engineering","Product","Operations","Marketing"][e%4],linkedin:`https://linkedin.com/in/${t.toLowerCase()}${o.toLowerCase()}`,companyId:a.id,isPrimary:e%3===0,preferredContact:["Email","WhatsApp","Phone","LinkedIn"][e%4],bestTime:["Morning","Afternoon","Evening"][e%3],timezone:A[e%A.length],language:e%4===0?"Hindi":"English",notes:"",tags:e%2===0?["decision-maker"]:["technical"],createdAt:n(-(e*5+10))}}),M=Array.from({length:10}).map((r,e)=>{const t=y[e%y.length],o=l[e%l.length],a=[18e4,32e4,54e4,75e4,11e5,19e5,28e4,45e4,62e4,98e4][e],i=t==="Closed Won"||t==="Closed Lost";return{id:`d${e+1}`,title:`${p[e%p.length]} – ${o.name}`,leadId:e<6?`l${e+1}`:void 0,companyId:o.id,contactId:g[e%g.length].id,stage:t,value:a,currency:e%4===0?"USD":"INR",probability:t==="Closed Won"?100:t==="Closed Lost"?0:[20,40,60,80][e%4],expectedCloseDate:n(i?-(e*3):(e+1)*7),ownerId:d(["p2","p10","p5"],e),source:d(["Upwork","LinkedIn","Referral","Website"],e),tags:e%2===0?["enterprise"]:["growth"],notes:"",createdAt:n(-(e*4+5)),lastActivityAt:n(-(e%5))}}),H=r=>{switch(r){case"Draft":return"neutral";case"Sent":return"info";case"Viewed":return"purple";case"Accepted":return"success";case"Rejected":return"danger";case"Expired":return"warning"}},O=[{id:"pr1",number:"PROP-2025-001",title:"E-commerce Web App Proposal",leadId:"l1",dealId:"d1",companyId:l[0].id,portfolioProjectId:"pp1",preparedById:"p2",proposalDate:n(-5),val
1idUntil:n(25),currency:"INR",status:"Sent",sentDate:n(-4),executiveSummary:"We propose a modern, scalable e-commerce platform tailored to your business needs.",approach:"Agile delivery in 4 sprints with weekly demos and continuous client feedback.",scopeOfWork:"UI/UX design, frontend (React), backend API (Node.js), payment integration, deployment.",timeline:"12 weeks: Discovery (1w), Design (3w), Dev (6w), Testing (1w), Launch (1w).",terms:"50% advance, 25% mid-project, 25% on launch. 30 days post-launch support included.",lineItems:[{id:"li1",item:"UI/UX Design",description:"Figma screens for all pages",qty:1,unit:"Project",rate:8e4},{id:"li2",item:"Frontend Development",description:"React.js development",qty:1,unit:"Project",rate:15e4},{id:"li3",item:"Backend Development",description:"Node.js API & integrations",qty:1,unit:"Project",rate:12e4}],taxPercent:18,discount:0,createdAt:n(-5)},{id:"pr2",number:"PROP-2025-002",title:"Mobile App Development",leadId:"l2",companyId:l[1].id,preparedById:"p10",proposalDate:n(-2),validUntil:n(28),currency:"INR",status:"Draft",executiveSummary:"Cross-platform mobile app to extend your reach to mobile-first users.",approach:"React Native for shared codebase across iOS and Android.",scopeOfWork:"Design, development, testing, app store submission.",timeline:"10 weeks total.",terms:"Milestone-based payments.",lineItems:[{id:"li1",item:"App Design",description:"iOS + Android screens",qty:1,unit:"Project",rate:1e5},{id:"li2",item:"Development",description:"React Native build",qty:1,unit:"Project",rate:25e4}],taxPercent:18,discount:0,createdAt:n(-2)},{id:"pr3",number:"PROP-2025-003",title:"SaaS Dashboard Redesign",leadId:"l3",companyId:l[2].id,preparedById:"p2",proposalDate:n(-12),validUntil:n(18),currency:"USD",status:"Accepted",sentDate:n(-11),viewedDate:n(-10),executiveSummary:"Modernize your B2B dashboard with intuitive UX and improved performance.",approach:"Design-led process with data-driven UX decisions.",scopeOfWork:"Audit, redesign, frontend rebuild.",timeline:"8 weeks.",terms:"Net 30 invoicing.",lineItems:[{id:"li1",item:"UX Audit & Design",description:"Full audit and Figma redesign",qty:1,unit:"Project",rate:8e3},{id:"li2",item:"Frontend Rebuild",description:"React + Tailwind",qty:1,unit:"Project",rate:12e3}],taxPercent:0,discount:0,createdAt:n(-12)}],U=[{id:"au1",name:"Round-robin lead assignment",category:"Assignment",trigger:"New lead created",action:"Assign to next available rep in Sales team",enabled:!0,lastTriggered:n(-1),runs:142},{id:"au2",name:"Source-based assignment (Upwork → Bhavya)",category:"Assignment",trigger:"New lead from Upwork",action:"Assign to Bhavya Sharma",enabled:!0,lastTriggered:n(0),runs:48},{id:"au3",name:"High-value lead → Senior Sales",category:"Assignment",trigger:"Lead value > ₹5L",action:"Assign to Department Head",enabled:!0,lastTriggered:n(-3),runs:12},{id:"au4",name:"First-contact reminder (4h)",category:"Follow-up",trigger:"Lead assigned",condition:"After 4 hours",action:"Notify assignee: 'New lead waiting'",enabled:!0,lastTriggered:n(0),runs:89},{id:"au5",name:"Cold lead alert (5 days inactive)",category:"Follow-up",trigger:"No activity for 5 days",action:"Notify assignee + manager, raise priority",enabled:!0,lastTriggered:n(-1),runs:34},{id:"au6",name:"Proposal follow-up (3 days)",category:"Follow-up",trigger:"Proposal sent + 3 days no response",action:"Notify assignee, AI-draft follow-up email",enabled:!0,runs:21},{id:"au7",name:"Lead Qualified → PMS research task",category:"Status Change",trigger:"Lead status = Qualified",action:"Create PMS task: 'Research & RnD'",enabled:!0,lastTriggered:n(-2),runs:56},{id:"au8",name:"Deal Won → Project in Master Sheet",category:"Status Change",trigger:"Deal status = Won",action:"Create project, notify Finance, create FRD",enabled:!0,lastTriggered:n(-7),runs:18},{id:"au9",name:"Deal Lost → Log reason & notify",category:"Status Change",trigger:"Deal status = Lost",action:"Require loss reason, notify manager",enabled:!0,runs:9},{id:"au10",name:"High-value lead alert (>₹10L)",category:"Notification",trigger:"Lead value > ₹10L",action:"Notify Sales Manager + Dept Head immediately",enabled:!0,lastTriggered:n(-4),runs:7},{id:"au11",name:"AI score drop alert",category:"Notification",trigger:"AI score drops > 2 points in 24h",action:"Notify assignee",enabled:!1,runs:0}
1,{id:"au12",name:"Daily sales digest (9 AM)",category:"Notification",trigger:"Every day at 9:00 AM",action:"Send digest to each salesperson",enabled:!0,lastTriggered:n(0),runs:90}],W=P()(C(r=>({sources:D,leads:k,activities:R,tasks:E,companies:l,contacts:g,deals:M,proposals:O,automations:U,addSource:e=>{const t=`s${Date.now()}`;return r(o=>({sources:[{...e,id:t,createdAt:new Date().toISOString().slice(0,10)},...o.sources]})),t},updateSource:(e,t)=>r(o=>({sources:o.sources.map(a=>a.id===e?{...a,...t}:a)})),addLead:e=>{const t=`l${Date.now()}`,o=new Date().toISOString().slice(0,10),a=T(e);return r(i=>({leads:[{...e,id:t,aiScore:a,createdAt:o,lastActivityAt:o},...i.leads],activities:[{id:`a${Date.now()}`,leadId:t,type:"Created",subject:`Lead created from ${e.sourcePlatform}`,date:o,byId:e.createdById},...i.activities]})),t},updateLead:(e,t)=>r(o=>({leads:o.leads.map(a=>a.id===e?{...a,...t,lastActivityAt:new Date().toISOString().slice(0,10)}:a)})),setLeadStatus:(e,t,o="p1")=>r(a=>({leads:a.leads.map(i=>i.id===e?{...i,status:t,lastActivityAt:new Date().toISOString().slice(0,10)}:i),activities:[{id:`a${Date.now()}`,leadId:e,type:"Status Change",subject:`Status changed to ${t}`,date:new Date().toISOString().slice(0,10),byId:o},...a.activities]})),logActivity:e=>{const t=`a${Date.now()}`;return r(o=>({activities:[{...e,id:t},...o.activities],leads:e.leadId?o.leads.map(a=>a.id===e.leadId?{...a,lastActivityAt:e.date}:a):o.leads})),t},addTask:e=>{const t=`st${Date.now()}`;return r(o=>({tasks:[{...e,id:t},...o.tasks]})),t},setTaskStatus:(e,t)=>r(o=>({tasks:o.tasks.map(a=>a.id===e?{...a,status:t}:a)})),addCompany:e=>{const t=`co${Date.now()}`;return r(o=>({companies:[{...e,id:t,createdAt:new Date().toISOString().slice(0,10)},...o.companies]})),t},updateCompany:(e,t)=>r(o=>({companies:o.companies.map(a=>a.id===e?{...a,...t}:a)})),addContact:e=>{const t=`ct${Date.now()}`;return r(o=>({contacts:[{...e,id:t,createdAt:new Date().toISOString().slice(0,10)},...o.contacts]})),t},updateContact:(e,t)=>
1r(o=>({contacts:o.contacts.map(a=>a.id===e?{...a,...t}:a)})),addDeal:e=>{const t=`d${Date.now()}`,o=new Date().toISOString().slice(0,10);return r(a=>({deals:[{...e,id:t,createdAt:o,lastActivityAt:o},...a.deals]})),t},updateDeal:(e,t)=>r(o=>({deals:o.deals.map(a=>a.id===e?{...a,...t,lastActivityAt:new Date().toISOString().slice(0,10)}:a)})),setDealStage:(e,t)=>r(o=>({deals:o.deals.map(a=>a.id===e?{...a,stage:t,probability:t==="Closed Won"?100:t==="Closed Lost"?0:a.probability,lastActivityAt:new Date().toISOString().slice(0,10)}:a)})),convertLeadToDeal:e=>{const t=`d${Date.now()}`,o=new Date().toISOString().slice(0,10),a=t;return r(i=>{const s=i.leads.find(c=>c.id===e);return s?{deals:[{id:t,title:s.title,leadId:s.id,companyId:i.companies.find(c=>c.name===s.company)?.id,stage:"Qualification",value:s.estimatedValue??s.budget??0,currency:s.budgetCurrency,probability:40,expectedCloseDate:s.followUpDate??o,ownerId:s.assigneeId,source:s.sourcePlatform,tags:s.tags,notes:"",createdAt:o,lastActivityAt:o},...i.deals],leads:i.leads.map(c=>c.id===e?{...c,status:"qualified"}:c),activities:[{id:`a${Date.now()}`,leadId:e,dealId:t,type:"Status Change",subject:`Converted to deal: ${s.title}`,date:o,byId:s.assigneeId},...i.activities]}:{}}),a},addProposal:e=>{const t=`pr${Date.now()}`,o=new Date().toISOString().slice(0,10),a=t;return r(i=>{const s=`PROP-${new Date().getFullYear()}-${String(i.proposals.length+1).padStart(3,"0")}`;return{proposals:[{...e,id:t,number:s,createdAt:o},...i.proposals]}}),a},updateProposal:(e,t)=>r(o=>({proposals:o.proposals.map(a=>a.id===e?{...a,...t}:a)})),setProposalStatus:(e,t)=>r(o=>({proposals:o.proposals.map(a=>a.id===e?{...a,status:t,sentDate:t==="Sent"&&!a.sentDate?new Date().toISOString().slice(0,10):a.sentDate,viewedDate:t==="Viewed"&&!a.viewedDate?new Date().toISOString().slice(0,10):a.viewedDate}:a)})),toggleAutomation:e=>r(t=>({automations:t.automations.map(o=>o.id===e?{...o,enabled:!o.enabled}:o)})),addAutomation:e=>{const t=`au${Date.now()}`;return r(o=>({automations:[{...e,id:t,runs:0},...o.automations]})),t},removeAutomation:e=>r(t=>({automations:t.automations.filter(o=>o.id!==e)})),addLeadNote:(e,t,o="p1")=>r(a=>({leads:a.leads.map(i=>i.id===e?{...i,notes:[...i.notes??[],{id:`n${Date.now()}`,text:t,byId:o,createdAt:new Date().toISOString()}],lastActivityAt:new Date().toISOString().slice(0,10)}:i)})),addLeadAttachment:(e,t)=>r(o=>({leads:o.leads.map(a=>a.id===e?{...a,attachments:[...a.attachments??[],{...t,id:`at${Date.now()}`,uploadedAt:new Date().toISOString()}],lastActivityAt:new Date().toISOString().slice(0,10)}:a)})),removeLeadAttachment:(e,t)=>r(o=>({leads:o.leads.map(a=>a.id===e?{...a,attachments:(a.attachments??[]).filter(i=>i.id!==t)}:a)})),addDealNote:(e,t,o="p1")=>r(a=>({deals:a.deals.map(i=>i.id===e?{...i,noteList:[...i.noteList??[],{id:`n${Date.now()}`,text:t,byId:o,createdAt:new Date().toISOString()}],lastActivityAt:new Date().toISOString().slice(0,10)}:i)})),addDealAttachment:(e,t)=>r(o=>({deals:o.deals.map(a=>a.id===e?{...a,attachments:[...a.attachments??[],{...t,id:`at${Date.now()}`,uploadedAt:new Date().toISOString()}],lastActivityAt:new Date().toISOString().slice(0,10)}:a)})),removeDealAttachment:(e,t)=>r(o=>({deals:o.deals.map(a=>a.id===e?{...a,attachments:(a.attachments??[]).filter(i=>i.id!==t)}:a)}))}),{name:"crm-sales-state-v3"}));export{H as p,W as u};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.