Backoffice stage 4: partners (agencies, venues) and sales CRM

- CRM: configurable pipeline (default: New → Contact → Meeting → Negotiation →
  Connected / Lost), drag-and-drop board, lead card with call/meeting/note history,
  photos and files, tasks with Telegram reminders at the due time, map of venues
  (OpenStreetMap via Leaflet), lost reason. Sales reps see only their own leads.
- "Connected" in one click: a venue becomes a club card partner with a one-time
  owner link to the work bot; an agency gets a code and a client link. The sales rep
  is recorded on the partner for the bonus.
- Sales bonus formula in settings (per venue, per agency, % of revenue from the
  rep's agency clients for N months); defaults are 0 until the owner sets them.
- Agencies (superadmin): clients, gift subscriptions, reward by month, payouts,
  client link, edit. Venues: offers by membership level (5 languages), staff,
  card checks, 8-week activity, owner link, map point.
- Schema: SalesStage/SalesLead/SalesActivity/SalesTask; salesId on Agency and
  Partner; lat/lng/phone/note on Partner; agencyId on Payout.
- Tests for stage rules, conversion, task reminders and bonus; dev:crm-demo.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
zabudko-ruandClaude Opus 5.5 committed 2026-10-21 03:02:03 +04:00
1 parent a848bb13e2
commit ac786cc5cc
30 files changed
+4311 -11

No files matched your search

+5 -1
View File
@@ -1272,7 +1272,11 @@
"transfer_standardPrice": "Transfer “Standard”, AMD",
"transfer_premiumPrice": "Transfer “Premium”, AMD",
"assign_auto": "Assign orders automatically",
"assign_maxAutoOffers": "How many providers to try automatically"
"assign_maxAutoOffers": "How many providers to try automatically",
"sales_bonusPerVenue": "Sales bonus per venue, ֏",
"sales_bonusPerAgency": "Sales bonus per agency, ֏",
"sales_bonusAgencyPct": "Sales bonus: % of revenue from their agencies’ clients",
"sales_bonusAgencyMonths": "…for how many months after the agency joins"
},
"presets": {
"add": "Add preset",
+5 -1
View File
@@ -1272,7 +1272,11 @@
"transfer_standardPrice": "Traslado «Estándar», AMD",
"transfer_premiumPrice": "Traslado «Premium», AMD",
"assign_auto": "Asignar pedidos automáticamente",
"assign_maxAutoOffers": "Cuántos profesionales probar automáticamente"
"assign_maxAutoOffers": "Cuántos profesionales probar automáticamente",
"sales_bonusPerVenue": "Bono de ventas por local, ֏",
"sales_bonusPerAgency": "Bono de ventas por agencia, ֏",
"sales_bonusAgencyPct": "Bono de ventas: % de ingresos de clientes de sus agencias",
"sales_bonusAgencyMonths": "…durante cuántos meses tras unirse la agencia"
},
"presets": {
"add": "Añadir plantilla",
+5 -1
View File
@@ -1272,7 +1272,11 @@
"transfer_standardPrice": "Տրանսֆեր «Ստանդարտ», ֏",
"transfer_premiumPrice": "Տրանսֆեր «Պրեմիում», ֏",
"assign_auto": "Պատվերների ավտոմատ բաշխում",
"assign_maxAutoOffers": "Քանի կատարող փորձել ավտոմատ"
"assign_maxAutoOffers": "Քանի կատարող փորձել ավտոմատ",
"sales_bonusPerVenue": "Վաճառողի բոնուս հաստատության համար, ֏",
"sales_bonusPerAgency": "Վաճառողի բոնուս գործակալության համար, ֏",
"sales_bonusAgencyPct": "Վաճառողի բոնուս՝ % գործակալությունների հաճախորդների եկամտից",
"sales_bonusAgencyMonths": "…քանի ամիս գործակալության միանալուց հետո"
},
"presets": {
"add": "Ավելացնել նախադրվածք",
+5 -1
View File
@@ -1272,7 +1272,11 @@
"transfer_standardPrice": "Трансфер «Стандарт», ֏",
"transfer_premiumPrice": "Трансфер «Премиум», ֏",
"assign_auto": "Автораспределение заказов",
"assign_maxAutoOffers": "Сколько исполнителей пробовать автоматически"
"assign_maxAutoOffers": "Сколько исполнителей пробовать автоматически",
"sales_bonusPerVenue": "Бонус продажника за заведение, ֏",
"sales_bonusPerAgency": "Бонус продажника за агентство, ֏",
"sales_bonusAgencyPct": "Бонус продажника: % выручки клиентов его агентств",
"sales_bonusAgencyMonths": "…сколько месяцев после подключения агентства"
},
"presets": {
"add": "Добавить пресет",
+5 -1
View File
@@ -1272,7 +1272,11 @@
"transfer_standardPrice": "接机「标准」,֏",
"transfer_premiumPrice": "接机「高级」,֏",
"assign_auto": "自动分配订单",
"assign_maxAutoOffers": "自动尝试的服务人员数量"
"assign_maxAutoOffers": "自动尝试的服务人员数量",
"sales_bonusPerVenue": "每个商户的销售奖金,֏",
"sales_bonusPerAgency": "每个代理的销售奖金,֏",
"sales_bonusAgencyPct": "销售奖金:其代理客户收入的百分比",
"sales_bonusAgencyMonths": "……代理加入后的月数"
},
"presets": {
"add": "添加方案",