adserver-dashboard 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.ci/staging.yml +191 -0
- package/.dockerignore +117 -0
- package/.env +40 -0
- package/.env.staging +38 -0
- package/.gitlab-ci.yml +16 -0
- package/DEMO_STATUS.md +579 -0
- package/Dockerfile +61 -0
- package/Influence-MW-AdServer-12-02-2026/client/index.html +17 -0
- package/Influence-MW-AdServer-12-02-2026/client/public/favicon.png +0 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/App.tsx +91 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/advanced-map-drawer.tsx +1131 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ai-recommendation-panel.tsx +379 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/app-sidebar.tsx +183 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/auto-optimize-button.tsx +184 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/availability-drawer.tsx +385 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/brand-insights-panel.tsx +87 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/create-agency-drawer.tsx +198 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/create-brand-drawer.tsx +275 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/creative-assignment.tsx +526 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/data-table-toolbar.tsx +148 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/data-table.tsx +158 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/filter-drawer.tsx +356 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/form-insights-panel.tsx +82 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/geography-selector.tsx +699 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/header-user-menu.tsx +178 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/history-drawer.tsx +313 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/inventory-availability-section.tsx +176 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/inventory-format-drawer.tsx +173 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/inventory-selector.tsx +401 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/manual-inventory-drawer.tsx +368 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/mapbox-map.tsx +368 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/market-insights-panel.tsx +202 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/media-owner-drawer.tsx +217 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/metric-card.tsx +58 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/page-header.tsx +27 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/player-status-indicator.tsx +137 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/poi-targeting-drawer.tsx +298 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/recommendation-score-badge.tsx +102 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/recommended-inventories-panel.tsx +248 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/searchable-combobox.tsx +134 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/signal-visualizations.tsx +407 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/status-badge.tsx +35 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/theme-provider.tsx +73 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/theme-toggle.tsx +37 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/traffic-slider.tsx +75 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/accordion.tsx +56 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/alert-dialog.tsx +139 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/alert.tsx +59 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/aspect-ratio.tsx +5 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/avatar.tsx +51 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/badge.tsx +38 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/breadcrumb.tsx +115 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/button.tsx +62 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/calendar.tsx +68 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/card.tsx +85 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/carousel.tsx +260 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/chart.tsx +365 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/checkbox.tsx +28 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/collapsible.tsx +11 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/command.tsx +151 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/context-menu.tsx +198 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/dialog.tsx +122 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/drawer.tsx +118 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/dropdown-menu.tsx +198 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/form.tsx +178 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/hover-card.tsx +29 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/input-otp.tsx +69 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/input.tsx +23 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/label.tsx +24 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/menubar.tsx +256 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/navigation-menu.tsx +128 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/pagination.tsx +117 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/popover.tsx +29 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/progress.tsx +28 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/radio-group.tsx +42 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/resizable.tsx +45 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/scroll-area.tsx +46 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/select.tsx +160 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/separator.tsx +29 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/sheet.tsx +140 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/sidebar.tsx +727 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/skeleton.tsx +15 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/slider.tsx +26 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/switch.tsx +27 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/table.tsx +117 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/tabs.tsx +53 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/textarea.tsx +22 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/toast.tsx +127 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/toaster.tsx +33 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/toggle-group.tsx +61 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/toggle.tsx +43 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/ui/tooltip.tsx +30 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/vendor-stores-modal.tsx +336 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/venue-type-drawer.tsx +359 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/components/venue-type-selector.tsx +436 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/hooks/use-mobile.tsx +19 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/hooks/use-toast.ts +191 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/index.css +244 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/lib/queryClient.ts +57 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/lib/utils.ts +39 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/lib/venue-taxonomy.ts +532 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/main.tsx +5 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/assign-creative.tsx +781 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/content-hub.tsx +995 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/custom-pois.tsx +431 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/dashboard.tsx +620 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/deal-detail.tsx +1062 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/deal-form.tsx +1570 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/deals.tsx +716 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/edit-creative-assignment.tsx +1051 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/geotargeting.tsx +675 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/integrations.tsx +425 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/line-item-creatives.tsx +622 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/line-item-form.tsx +3132 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/line-items.tsx +530 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/not-found.tsx +21 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/proof-of-play-upload.tsx +479 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/proof-of-play.tsx +880 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/reports.tsx +235 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/settings.tsx +652 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/signal-form.tsx +1117 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/signals.tsx +366 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/tags.tsx +332 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/pages/venues.tsx +381 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/types/mapbox-gl-draw.d.ts +37 -0
- package/Influence-MW-AdServer-12-02-2026/client/src/types/react-simple-maps.d.ts +57 -0
- package/Influence-MW-AdServer-12-02-2026/components.json +20 -0
- package/Influence-MW-AdServer-12-02-2026/docs/PRD.md +3373 -0
- package/Influence-MW-AdServer-12-02-2026/docs/influence-feature-mapping.csv +498 -0
- package/Influence-MW-AdServer-12-02-2026/drizzle.config.ts +14 -0
- package/Influence-MW-AdServer-12-02-2026/package-lock.json +9672 -0
- package/Influence-MW-AdServer-12-02-2026/package.json +118 -0
- package/Influence-MW-AdServer-12-02-2026/postcss.config.js +6 -0
- package/Influence-MW-AdServer-12-02-2026/replit.md +91 -0
- package/Influence-MW-AdServer-12-02-2026/script/build.ts +67 -0
- package/Influence-MW-AdServer-12-02-2026/scripts/create-miro-diagrams.cjs +318 -0
- package/Influence-MW-AdServer-12-02-2026/scripts/create-remaining-diagrams.cjs +270 -0
- package/Influence-MW-AdServer-12-02-2026/server/index.ts +103 -0
- package/Influence-MW-AdServer-12-02-2026/server/recommendation-service.ts +319 -0
- package/Influence-MW-AdServer-12-02-2026/server/routes.ts +1890 -0
- package/Influence-MW-AdServer-12-02-2026/server/static.ts +19 -0
- package/Influence-MW-AdServer-12-02-2026/server/storage.ts +2058 -0
- package/Influence-MW-AdServer-12-02-2026/server/vite.ts +58 -0
- package/Influence-MW-AdServer-12-02-2026/shared/schema.ts +1595 -0
- package/Influence-MW-AdServer-12-02-2026/tailwind.config.ts +107 -0
- package/Influence-MW-AdServer-12-02-2026/tsconfig.json +23 -0
- package/Influence-MW-AdServer-12-02-2026/vite.config.ts +40 -0
- package/LINE_ITEM_BUDGET_FIELD_MAPPING.md +178 -0
- package/PCM/.env.example +92 -0
- package/PCM/README.md +558 -0
- package/PCM/docs/TEST_CASES.md +422 -0
- package/PCM/index.js +106 -0
- package/PCM/package-lock.json +3282 -0
- package/PCM/package.json +32 -0
- package/PCM/replit.md +64 -0
- package/PCM/schema.sql +495 -0
- package/PCM/scripts/export-schema.js +183 -0
- package/PCM/scripts/seed-comprehensive.js +631 -0
- package/PCM/scripts/seed-production.js +477 -0
- package/PCM/src/config/db.js +56 -0
- package/PCM/src/config/swagger.js +5975 -0
- package/PCM/src/dto/EmailRequestDTO.js +166 -0
- package/PCM/src/middleware/errorHandler.js +52 -0
- package/PCM/src/middleware/logger.js +26 -0
- package/PCM/src/migrations/001_add_campaign_mode_fields.sql +36 -0
- package/PCM/src/migrations/002_create_deal_id_counters.sql +22 -0
- package/PCM/src/migrations/003_update_publishers_column.sql +15 -0
- package/PCM/src/migrations/004_add_direct_dealtype_and_advertiser.sql +5 -0
- package/PCM/src/migrations/005_add_programmatic_fields_and_update_enums.sql +31 -0
- package/PCM/src/migrations/006_add_line_item_programmatic_fields.sql +12 -0
- package/PCM/src/migrations/007_add_line_item_direct_fields.sql +15 -0
- package/PCM/src/migrations/008_add_inventory_fields.sql +45 -0
- package/PCM/src/migrations/009_move_inventory_fields_to_metadata.sql +32 -0
- package/PCM/src/migrations/010_add_draft_status_and_line_items_count.sql +23 -0
- package/PCM/src/migrations/011_add_planning_field.sql +21 -0
- package/PCM/src/migrations/012_fix_inventory_composite_pk.sql +17 -0
- package/PCM/src/migrations/013_make_external_id_optional.sql +3 -0
- package/PCM/src/migrations/014_create_change_history.sql +38 -0
- package/PCM/src/migrations/016_create_publisher_insertion_orders.sql +33 -0
- package/PCM/src/migrations/017_fix_line_item_id_fk_reference.sql +86 -0
- package/PCM/src/migrations/018_create_approval_tables.sql +44 -0
- package/PCM/src/migrations/019_add_encrypted_token_column.sql +2 -0
- package/PCM/src/migrations/020_add_rejection_reason_to_deals.sql +10 -0
- package/PCM/src/migrations/021_add_publisher_external_id_to_inventories.sql +12 -0
- package/PCM/src/migrations/022_add_line_item_extended_fields.sql +24 -0
- package/PCM/src/migrations/023_add_base_price_fields.sql +8 -0
- package/PCM/src/migrations/run-migrations.js +46 -0
- package/PCM/src/models/ApprovalOTP.js +51 -0
- package/PCM/src/models/ApprovalToken.js +79 -0
- package/PCM/src/models/ChangeHistory.js +107 -0
- package/PCM/src/models/Deal.js +186 -0
- package/PCM/src/models/DealIdCounter.js +28 -0
- package/PCM/src/models/LineItem.js +227 -0
- package/PCM/src/models/LineItemCreative.js +89 -0
- package/PCM/src/models/LineItemInventory.js +115 -0
- package/PCM/src/models/PublisherInsertionOrder.js +93 -0
- package/PCM/src/models/TransactionHistory.js +34 -0
- package/PCM/src/models/associations.js +81 -0
- package/PCM/src/routes/approval.js +321 -0
- package/PCM/src/routes/creatives.js +437 -0
- package/PCM/src/routes/deals.js +1638 -0
- package/PCM/src/routes/digitalSignage.js +242 -0
- package/PCM/src/routes/insertionOrders.js +380 -0
- package/PCM/src/routes/lineItems.js +926 -0
- package/PCM/src/routes/system.js +384 -0
- package/PCM/src/services/ApprovalService.js +885 -0
- package/PCM/src/services/CampaignImportConverter.js +631 -0
- package/PCM/src/services/CampaignModeService.js +273 -0
- package/PCM/src/services/CampaignStatusService.js +395 -0
- package/PCM/src/services/ChangeHistoryService.js +316 -0
- package/PCM/src/services/DealIdService.js +94 -0
- package/PCM/src/services/DealResponseFormatter.js +90 -0
- package/PCM/src/services/EmailNotificationService.js +315 -0
- package/PCM/src/services/LineItemResponseFormatter.js +122 -0
- package/PCM/src/services/LineItemStatusService.js +380 -0
- package/PCM/src/tests/comprehensiveTestRunner.js +360 -0
- package/PCM/src/tests/comprehensiveTests.js +1277 -0
- package/PCM/src/tests/dealTypeUnitTests.js +1058 -0
- package/PCM/src/tests/testRunner.js +248 -0
- package/PCM/src/utils/caseConverter.js +92 -0
- package/PCM/src/utils/dealCalculations.js +206 -0
- package/PCM/src/utils/lineItemPayloadNormalizer.js +41 -0
- package/PCM/src/utils/payloadNormalizer.js +34 -0
- package/PCM/src/utils/sourceNormalizer.js +56 -0
- package/PCM/src/validators/creativeValidator.js +27 -0
- package/PCM/src/validators/dealValidator.js +203 -0
- package/PCM/src/validators/lineItemValidator.js +489 -0
- package/PCM/tests/approval-flows.test.js +238 -0
- package/PCM/tests/approval-workflow.test.js +291 -0
- package/PCM/tests/campaign-import-converter.test.js +543 -0
- package/PCM/tests/campaign-import-e2e.test.js +520 -0
- package/PCM/tests/campaign-status.test.js +539 -0
- package/PCM/tests/direct-publisher-split-reimport.test.js +460 -0
- package/PCM/tests/e2e/digital-signage.test.js +145 -0
- package/PCM/tests/e2e/search-filter-pagination.test.js +399 -0
- package/PCM/tests/e2e-comprehensive.test.js +3446 -0
- package/PCM/tests/edge-cases.test.js +340 -0
- package/PCM/tests/line-item-status.test.js +340 -0
- package/PCM/tests/seller-account-external-ids.test.js +877 -0
- package/PCM/tests/source-validation.test.js +324 -0
- package/PRD.md +3373 -0
- package/README.md +186 -0
- package/client/index.html +35 -0
- package/client/public/DEMO_STATUS.md +579 -0
- package/client/public/img/MW-logo-trans_1754045676555.png +0 -0
- package/client/public/locales/ar/approval.json +144 -0
- package/client/public/locales/ar/buyer.json +61 -0
- package/client/public/locales/ar/campaigns.json +1 -0
- package/client/public/locales/ar/common.json +218 -0
- package/client/public/locales/ar/contentHub.json +266 -0
- package/client/public/locales/ar/creatives.json +79 -0
- package/client/public/locales/ar/dashboard.json +57 -0
- package/client/public/locales/ar/deals.json +886 -0
- package/client/public/locales/ar/dsp.json +131 -0
- package/client/public/locales/ar/inventory.json +201 -0
- package/client/public/locales/ar/lineItems.json +553 -0
- package/client/public/locales/ar/navigation.json +48 -0
- package/client/public/locales/ar/wizard.json +1 -0
- package/client/public/locales/en/approval.json +144 -0
- package/client/public/locales/en/buyer.json +65 -0
- package/client/public/locales/en/campaigns.json +1 -0
- package/client/public/locales/en/common.json +218 -0
- package/client/public/locales/en/contentHub.json +266 -0
- package/client/public/locales/en/creatives.json +79 -0
- package/client/public/locales/en/dashboard.json +57 -0
- package/client/public/locales/en/deals.json +886 -0
- package/client/public/locales/en/dsp.json +131 -0
- package/client/public/locales/en/inventory.json +201 -0
- package/client/public/locales/en/lineItems.json +659 -0
- package/client/public/locales/en/navigation.json +48 -0
- package/client/public/locales/en/wizard.json +1 -0
- package/client/public/locales/ja/approval.json +144 -0
- package/client/public/locales/ja/buyer.json +61 -0
- package/client/public/locales/ja/campaigns.json +1 -0
- package/client/public/locales/ja/common.json +218 -0
- package/client/public/locales/ja/contentHub.json +266 -0
- package/client/public/locales/ja/creatives.json +79 -0
- package/client/public/locales/ja/dashboard.json +57 -0
- package/client/public/locales/ja/deals.json +886 -0
- package/client/public/locales/ja/dsp.json +131 -0
- package/client/public/locales/ja/inventory.json +201 -0
- package/client/public/locales/ja/lineItems.json +553 -0
- package/client/public/locales/ja/navigation.json +48 -0
- package/client/public/locales/ja/wizard.json +1 -0
- package/client/public/locales/zh/approval.json +144 -0
- package/client/public/locales/zh/buyer.json +61 -0
- package/client/public/locales/zh/campaigns.json +1 -0
- package/client/public/locales/zh/common.json +218 -0
- package/client/public/locales/zh/contentHub.json +266 -0
- package/client/public/locales/zh/creatives.json +79 -0
- package/client/public/locales/zh/dashboard.json +57 -0
- package/client/public/locales/zh/deals.json +886 -0
- package/client/public/locales/zh/dsp.json +131 -0
- package/client/public/locales/zh/inventory.json +201 -0
- package/client/public/locales/zh/lineItems.json +553 -0
- package/client/public/locales/zh/navigation.json +48 -0
- package/client/public/locales/zh/wizard.json +1 -0
- package/client/public/manifest.json +36 -0
- package/client/src/App.tsx +464 -0
- package/client/src/components/app-sidebar.tsx +312 -0
- package/client/src/components/approval/approval-decision-form.test.tsx +294 -0
- package/client/src/components/approval/approval-decision-form.tsx +326 -0
- package/client/src/components/approval/approval-sheet.tsx +631 -0
- package/client/src/components/approval/line-item-details-sheet.tsx +371 -0
- package/client/src/components/approval/otp-verification.test.tsx +337 -0
- package/client/src/components/approval/otp-verification.tsx +180 -0
- package/client/src/components/content-hub/bulk-transcode-dialog.tsx +379 -0
- package/client/src/components/content-hub/content-hub-manager-v2.tsx +574 -0
- package/client/src/components/content-hub/content-hub-manager.tsx +330 -0
- package/client/src/components/content-hub/creative-card.tsx +456 -0
- package/client/src/components/content-hub/creative-detail-sheet.tsx +685 -0
- package/client/src/components/content-hub/creative-filters.tsx +457 -0
- package/client/src/components/content-hub/creative-grid.tsx +329 -0
- package/client/src/components/content-hub/creative-selector.tsx +415 -0
- package/client/src/components/content-hub/creative-upload.tsx +547 -0
- package/client/src/components/content-hub/folder-dialogs.tsx +445 -0
- package/client/src/components/content-hub/folder-list.tsx +280 -0
- package/client/src/components/content-hub/review-dialogs.tsx +268 -0
- package/client/src/components/content-hub/transcode-dialog.tsx +226 -0
- package/client/src/components/creative-library/creative-details-view.tsx +446 -0
- package/client/src/components/creative-library/creative-filters-panel.tsx +203 -0
- package/client/src/components/creative-library/creative-list.tsx +360 -0
- package/client/src/components/creative-library/creative-status-badge.tsx +71 -0
- package/client/src/components/creative-library/folder-card.tsx +78 -0
- package/client/src/components/creative-library/index.ts +27 -0
- package/client/src/components/creative-library/new-creative-card.tsx +211 -0
- package/client/src/components/creative-library/upload-creative-dialog.tsx +261 -0
- package/client/src/components/dashboard-overview.tsx +109 -0
- package/client/src/components/deals/approval-history-panel.test.tsx +240 -0
- package/client/src/components/deals/approval-history-panel.tsx +156 -0
- package/client/src/components/deals/deal-status-badge.tsx +92 -0
- package/client/src/components/deals/import-from-planner-dialog.tsx +399 -0
- package/client/src/components/deals/market-insights-panel.tsx +237 -0
- package/client/src/components/deals/reopen-deal-sheet.tsx +191 -0
- package/client/src/components/deals/request-approval-sheet.test.tsx +323 -0
- package/client/src/components/deals/request-approval-sheet.tsx +136 -0
- package/client/src/components/deals/resend-approval-sheet.tsx +201 -0
- package/client/src/components/direct-campaigns/campaign-card.tsx +283 -0
- package/client/src/components/direct-campaigns/deal-filter-panel.tsx +325 -0
- package/client/src/components/inventory/advanced-filters-panel.tsx +273 -0
- package/client/src/components/inventory/csv-upload-modal.tsx +639 -0
- package/client/src/components/inventory/inventory-availability-view.tsx +486 -0
- package/client/src/components/inventory/inventory-details-sheet.tsx +376 -0
- package/client/src/components/inventory/inventory-map-view.tsx +596 -0
- package/client/src/components/inventory/inventory-settings-menu.tsx +52 -0
- package/client/src/components/language-switcher.tsx +53 -0
- package/client/src/components/line-items/campaign-forecast-panel.tsx +138 -0
- package/client/src/components/line-items/form-insights.tsx +89 -0
- package/client/src/components/line-items/geofencing/LocationCsvUploadDrawer.tsx +100 -0
- package/client/src/components/line-items/geofencing/POIDropdown.tsx +379 -0
- package/client/src/components/line-items/geofencing/SelectedLocationsSidebar.tsx +436 -0
- package/client/src/components/line-items/geofencing/ViewFileLocationDrawer.tsx +199 -0
- package/client/src/components/line-items/geofencing/components/ExistingFilesTab.tsx +268 -0
- package/client/src/components/line-items/geofencing/components/TemplateDownloadSection.tsx +59 -0
- package/client/src/components/line-items/geofencing/components/UploadTab.tsx +215 -0
- package/client/src/components/line-items/geofencing-map.tsx +1270 -0
- package/client/src/components/line-items/inventory-availability-section.tsx +178 -0
- package/client/src/components/line-items/line-item-schedule-manager.tsx +313 -0
- package/client/src/components/line-items/manual-inventory-drawer.tsx +346 -0
- package/client/src/components/line-items/planner-inventory-card.tsx +495 -0
- package/client/src/components/line-items/planner-schedule-grid.tsx +495 -0
- package/client/src/components/line-items/schedule-rule-editor.tsx +649 -0
- package/client/src/components/line-items/schedule-rule-types.ts +122 -0
- package/client/src/components/line-items/steps/creatives-step.tsx +681 -0
- package/client/src/components/line-items/steps/inventory-schedule-step.tsx +1596 -0
- package/client/src/components/line-items/steps/inventory-step.tsx +1533 -0
- package/client/src/components/line-items/steps/line-item-details-step.tsx +916 -0
- package/client/src/components/line-items/steps/schedule-step.tsx +273 -0
- package/client/src/components/line-items/steps/summary-step.tsx +680 -0
- package/client/src/components/line-items/steps/targeting-step.tsx +1708 -0
- package/client/src/components/product-switcher.tsx +105 -0
- package/client/src/components/protected-route.tsx +49 -0
- package/client/src/components/skip-link.tsx +22 -0
- package/client/src/components/stat-card.tsx +53 -0
- package/client/src/components/status-badge.tsx +96 -0
- package/client/src/components/ui/hierarchical-venue-selector.tsx +389 -0
- package/client/src/components/ui/toaster.tsx +111 -0
- package/client/src/contexts/auth-context.tsx +181 -0
- package/client/src/contexts/sidebar-state.tsx +50 -0
- package/client/src/contexts/theme-context.tsx +66 -0
- package/client/src/data/campaign-data.json +107 -0
- package/client/src/data/countries.json +22 -0
- package/client/src/hooks/use-approval.ts +366 -0
- package/client/src/hooks/use-keyboard-shortcuts.ts +74 -0
- package/client/src/hooks/use-media-query.ts +46 -0
- package/client/src/hooks/use-mobile.tsx +19 -0
- package/client/src/hooks/use-page-title.ts +21 -0
- package/client/src/hooks/use-toast.ts +195 -0
- package/client/src/index.css +694 -0
- package/client/src/lib/__tests__/accessibility.test.ts +104 -0
- package/client/src/lib/__tests__/date-utils.test.ts +199 -0
- package/client/src/lib/__tests__/dsp-buyer-api.test.ts +127 -0
- package/client/src/lib/__tests__/dsp-buyer-integration.test.ts +247 -0
- package/client/src/lib/__tests__/storage-utils.test.ts +167 -0
- package/client/src/lib/__tests__/utils.test.ts +57 -0
- package/client/src/lib/accessibility.ts +141 -0
- package/client/src/lib/api-config.ts +9 -0
- package/client/src/lib/auth-service.ts +209 -0
- package/client/src/lib/campaign-creative-api.ts +82 -0
- package/client/src/lib/company-api.ts +61 -0
- package/client/src/lib/content-hub-api.ts +407 -0
- package/client/src/lib/creative-mapper.ts +61 -0
- package/client/src/lib/date-utils.ts +119 -0
- package/client/src/lib/deal-helpers.ts +220 -0
- package/client/src/lib/dsp-buyer-api.ts +196 -0
- package/client/src/lib/geo-import-api.ts +151 -0
- package/client/src/lib/google-poi-api.ts +305 -0
- package/client/src/lib/i18n/__tests__/formatting.test.ts +202 -0
- package/client/src/lib/i18n/formatting.ts +130 -0
- package/client/src/lib/i18n/index.ts +8 -0
- package/client/src/lib/i18n-compat.ts +76 -0
- package/client/src/lib/influence-deals-api.ts +896 -0
- package/client/src/lib/inventory-api.ts +399 -0
- package/client/src/lib/oauth-service.ts +678 -0
- package/client/src/lib/poi-types.ts +75 -0
- package/client/src/lib/queryClient.ts +144 -0
- package/client/src/lib/recommendation-api.ts +380 -0
- package/client/src/lib/storage-utils.ts +104 -0
- package/client/src/lib/tolgee.ts +85 -0
- package/client/src/lib/utils.ts +0 -0
- package/client/src/main.tsx +67 -0
- package/client/src/mapbox-draw-modes.d.ts +32 -0
- package/client/src/pages/all-folders.tsx +203 -0
- package/client/src/pages/auth-callback.tsx +115 -0
- package/client/src/pages/buyer-form.tsx +339 -0
- package/client/src/pages/buyer-list.tsx +622 -0
- package/client/src/pages/content-hub.tsx +1358 -0
- package/client/src/pages/create-deal.tsx +2093 -0
- package/client/src/pages/creative-assignment-page.tsx +548 -0
- package/client/src/pages/creatives.tsx +5 -0
- package/client/src/pages/custom-pois.tsx +425 -0
- package/client/src/pages/dashboard.tsx +615 -0
- package/client/src/pages/deal-history.tsx +434 -0
- package/client/src/pages/deal-line-items.tsx +1703 -0
- package/client/src/pages/demo-status.tsx +113 -0
- package/client/src/pages/direct-campaign-details.tsx +361 -0
- package/client/src/pages/direct-campaigns-new.tsx +824 -0
- package/client/src/pages/dsp-form.tsx +803 -0
- package/client/src/pages/dsp-list.tsx +239 -0
- package/client/src/pages/folder-content.tsx +336 -0
- package/client/src/pages/integrations.tsx +429 -0
- package/client/src/pages/line-item-creatives.tsx +789 -0
- package/client/src/pages/line-item-detail-page.tsx +684 -0
- package/client/src/pages/line-item-form-page.tsx +3261 -0
- package/client/src/pages/line-item-wizard.tsx +1207 -0
- package/client/src/pages/login.tsx +154 -0
- package/client/src/pages/not-found.tsx +23 -0
- package/client/src/pages/proof-of-play.tsx +397 -0
- package/client/src/pages/public-approval.tsx +551 -0
- package/client/src/pages/reports.tsx +231 -0
- package/client/src/pages/settings.tsx +760 -0
- package/client/src/pages/signals.tsx +389 -0
- package/client/src/pages/tags.tsx +318 -0
- package/client/src/pages/test-results.tsx +328 -0
- package/client/src/store/hooks.ts +5 -0
- package/client/src/store/index.ts +15 -0
- package/client/src/store/mapMarkerLocationsSlice.ts +241 -0
- package/client/src/styles/design-tokens.css +324 -0
- package/client/src/test/setup.ts +261 -0
- package/client/src/test/test-utils.tsx +40 -0
- package/client/src/types/approval.ts +221 -0
- package/client/src/types/content-hub.ts +209 -0
- package/client/src/types/geofencing.ts +67 -0
- package/client/src/types/transcoding.ts +140 -0
- package/client/src/vite-env.d.ts +18 -0
- package/components.json +20 -0
- package/creative-api.json +1 -0
- package/docs/AI_REFERENCE.md +459 -0
- package/docs/MWDesign-Prompt.md +132 -0
- package/docs/MWDesign-System.md +344 -0
- package/docs/test-plan.md +277 -0
- package/e2e/AUTONOMOUS-TESTING.md +406 -0
- package/e2e/README.md +219 -0
- package/e2e/autonomous-flow.spec.ts +308 -0
- package/e2e/debug-sso.spec.ts +163 -0
- package/e2e/direct-campaigns.spec.ts +219 -0
- package/e2e/explore-sso.spec.ts +149 -0
- package/e2e/fixtures/auth.ts +26 -0
- package/e2e/fixtures/enhanced-test.ts +331 -0
- package/e2e/pagination.spec.ts +280 -0
- package/e2e/view-toggle.spec.ts +312 -0
- package/generated-icon.png +0 -0
- package/i18next-scanner.config.cjs +46 -0
- package/package.json +141 -0
- package/playwright.config.ts +93 -0
- package/postcss.config.js +6 -0
- package/replit.md +196 -0
- package/screenshot-after-login.png +0 -0
- package/screenshot-contenthub-grid.png +0 -0
- package/screenshot-contenthub-list-fixed.png +0 -0
- package/screenshot-contenthub-list.png +0 -0
- package/screenshot-create-deal.png +0 -0
- package/screenshot-dashboard.png +0 -0
- package/screenshot-deals.png +0 -0
- package/screenshot-login-filled.png +0 -0
- package/screenshot-login.png +0 -0
- package/screenshot.mjs +24 -0
- package/scripts/deploy-stg.sh +185 -0
- package/shared/direct-io-schema.ts +383 -0
- package/shared/schema.ts +439 -0
- package/shared/screen-types.ts +149 -0
- package/springdocDefault.json +1 -0
- package/swagger-ui-bundle.js +2 -0
- package/swagger-ui-init.js +10316 -0
- package/tailwind.config.ts +282 -0
- package/terraform/README.md +306 -0
- package/terraform/cloudfront.tf +289 -0
- package/terraform/ecs.tf +727 -0
- package/terraform/environments/dev.tfvars +59 -0
- package/terraform/environments/production.tfvars +60 -0
- package/terraform/main.tf +47 -0
- package/terraform/outputs.tf +145 -0
- package/terraform/s3.tf +192 -0
- package/terraform/variables.tf +226 -0
- package/terraform/waf.tf +165 -0
- package/terraform-frontend/.terraform.lock.hcl +25 -0
- package/terraform-frontend/README.md +85 -0
- package/terraform-frontend/cloudfront.tf +125 -0
- package/terraform-frontend/main.tf +31 -0
- package/terraform-frontend/outputs.tf +24 -0
- package/terraform-frontend/terraform.tfvars +12 -0
- package/terraform-frontend/variables.tf +53 -0
- package/tsconfig.json +23 -0
- package/vite.config.ts +226 -0
- package/vitest.config.ts +56 -0
|
@@ -0,0 +1,675 @@
|
|
|
1
|
+
import { useState, useMemo, useCallback, useEffect } from "react";
|
|
2
|
+
import { useQuery } from "@tanstack/react-query";
|
|
3
|
+
import { useLocation, useParams } from "wouter";
|
|
4
|
+
import {
|
|
5
|
+
MapPin,
|
|
6
|
+
Circle,
|
|
7
|
+
Pentagon,
|
|
8
|
+
Pencil,
|
|
9
|
+
Search,
|
|
10
|
+
X,
|
|
11
|
+
Check,
|
|
12
|
+
Eye,
|
|
13
|
+
EyeOff,
|
|
14
|
+
Minus,
|
|
15
|
+
Train,
|
|
16
|
+
Bus,
|
|
17
|
+
Car,
|
|
18
|
+
} from "lucide-react";
|
|
19
|
+
import { Button } from "@/components/ui/button";
|
|
20
|
+
import { Input } from "@/components/ui/input";
|
|
21
|
+
import { Card, CardContent } from "@/components/ui/card";
|
|
22
|
+
import { Badge } from "@/components/ui/badge";
|
|
23
|
+
import { Checkbox } from "@/components/ui/checkbox";
|
|
24
|
+
import { Label } from "@/components/ui/label";
|
|
25
|
+
import {
|
|
26
|
+
Tooltip,
|
|
27
|
+
TooltipContent,
|
|
28
|
+
TooltipTrigger,
|
|
29
|
+
} from "@/components/ui/tooltip";
|
|
30
|
+
import { MapboxMap, useMapboxGeocoder, DrawnShape } from "@/components/mapbox-map";
|
|
31
|
+
import { cn } from "@/lib/utils";
|
|
32
|
+
import type { POI, TransitRoute, TransitZone, GeoLocation, GeoShape } from "@shared/schema";
|
|
33
|
+
|
|
34
|
+
type TabMode = "regions" | "proximity";
|
|
35
|
+
|
|
36
|
+
interface SelectedLocation extends GeoLocation {
|
|
37
|
+
visible: boolean;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
interface SelectedShape extends GeoShape {
|
|
41
|
+
visible: boolean;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export default function Geotargeting() {
|
|
45
|
+
const { entityType, entityId } = useParams<{ entityType: string; entityId: string }>();
|
|
46
|
+
const [, setLocation] = useLocation();
|
|
47
|
+
|
|
48
|
+
const [activeTab, setActiveTab] = useState<TabMode>("regions");
|
|
49
|
+
const [searchQuery, setSearchQuery] = useState("");
|
|
50
|
+
const [searchResults, setSearchResults] = useState<Array<{
|
|
51
|
+
id: string;
|
|
52
|
+
name: string;
|
|
53
|
+
address: string;
|
|
54
|
+
lat: number;
|
|
55
|
+
lng: number;
|
|
56
|
+
}>>([]);
|
|
57
|
+
const [isSearching, setIsSearching] = useState(false);
|
|
58
|
+
|
|
59
|
+
const [selectedLocations, setSelectedLocations] = useState<SelectedLocation[]>([]);
|
|
60
|
+
const [selectedShapes, setSelectedShapes] = useState<SelectedShape[]>([]);
|
|
61
|
+
|
|
62
|
+
const [drawingMode, setDrawingMode] = useState<"polygon" | "circle" | "freeform" | null>(null);
|
|
63
|
+
|
|
64
|
+
const [poiSearch, setPoiSearch] = useState("");
|
|
65
|
+
const [poiCategories, setPoiCategories] = useState<string[]>([]);
|
|
66
|
+
const [showPoiPanel, setShowPoiPanel] = useState(false);
|
|
67
|
+
|
|
68
|
+
const { searchLocation } = useMapboxGeocoder();
|
|
69
|
+
|
|
70
|
+
const { data: transitRoutes = [] } = useQuery<TransitRoute[]>({
|
|
71
|
+
queryKey: ["/api/transit/routes"],
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
const { data: transitZones = [] } = useQuery<TransitZone[]>({
|
|
75
|
+
queryKey: ["/api/transit/zones"],
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
const { data: pois = [] } = useQuery<POI[]>({
|
|
79
|
+
queryKey: ["/api/poi/search", poiSearch, poiCategories.join(",")],
|
|
80
|
+
enabled: poiSearch.length > 0 || poiCategories.length > 0,
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
const handleSearch = useCallback(async (query: string) => {
|
|
84
|
+
setSearchQuery(query);
|
|
85
|
+
if (query.length < 2) {
|
|
86
|
+
setSearchResults([]);
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
setIsSearching(true);
|
|
91
|
+
const results = await searchLocation(query);
|
|
92
|
+
setSearchResults(results);
|
|
93
|
+
setIsSearching(false);
|
|
94
|
+
}, [searchLocation]);
|
|
95
|
+
|
|
96
|
+
const handleAddLocation = useCallback((result: { id: string; name: string; address: string; lat: number; lng: number }) => {
|
|
97
|
+
const newLocation: SelectedLocation = {
|
|
98
|
+
id: result.id,
|
|
99
|
+
name: result.name,
|
|
100
|
+
address: result.address,
|
|
101
|
+
lat: result.lat,
|
|
102
|
+
lng: result.lng,
|
|
103
|
+
radius: 2000,
|
|
104
|
+
include: true,
|
|
105
|
+
visible: true,
|
|
106
|
+
};
|
|
107
|
+
setSelectedLocations(prev => [...prev, newLocation]);
|
|
108
|
+
setSearchQuery("");
|
|
109
|
+
setSearchResults([]);
|
|
110
|
+
}, []);
|
|
111
|
+
|
|
112
|
+
const handleRemoveLocation = useCallback((id: string) => {
|
|
113
|
+
setSelectedLocations(prev => prev.filter(loc => loc.id !== id));
|
|
114
|
+
}, []);
|
|
115
|
+
|
|
116
|
+
const handleToggleLocationVisibility = useCallback((id: string) => {
|
|
117
|
+
setSelectedLocations(prev => prev.map(loc =>
|
|
118
|
+
loc.id === id ? { ...loc, visible: !loc.visible } : loc
|
|
119
|
+
));
|
|
120
|
+
}, []);
|
|
121
|
+
|
|
122
|
+
const handleLocationRadiusChange = useCallback((id: string, radius: number) => {
|
|
123
|
+
setSelectedLocations(prev => prev.map(loc =>
|
|
124
|
+
loc.id === id ? { ...loc, radius } : loc
|
|
125
|
+
));
|
|
126
|
+
}, []);
|
|
127
|
+
|
|
128
|
+
const handleToggleLocationInclude = useCallback((id: string) => {
|
|
129
|
+
setSelectedLocations(prev => prev.map(loc =>
|
|
130
|
+
loc.id === id ? { ...loc, include: !loc.include } : loc
|
|
131
|
+
));
|
|
132
|
+
}, []);
|
|
133
|
+
|
|
134
|
+
const handleAddPoiCategory = useCallback((category: string) => {
|
|
135
|
+
if (!poiCategories.includes(category)) {
|
|
136
|
+
setPoiCategories(prev => [...prev, category]);
|
|
137
|
+
}
|
|
138
|
+
}, [poiCategories]);
|
|
139
|
+
|
|
140
|
+
const handleRemovePoiCategory = useCallback((category: string) => {
|
|
141
|
+
setPoiCategories(prev => prev.filter(c => c !== category));
|
|
142
|
+
}, []);
|
|
143
|
+
|
|
144
|
+
const handleShapeCreated = useCallback((shape: DrawnShape) => {
|
|
145
|
+
const newShape: SelectedShape = {
|
|
146
|
+
id: shape.id,
|
|
147
|
+
type: shape.type,
|
|
148
|
+
coordinates: shape.coordinates as number[][][],
|
|
149
|
+
measurements: shape.measurements || "0 m²",
|
|
150
|
+
include: true,
|
|
151
|
+
visible: true,
|
|
152
|
+
};
|
|
153
|
+
setSelectedShapes(prev => [...prev, newShape]);
|
|
154
|
+
setDrawingMode(null);
|
|
155
|
+
}, []);
|
|
156
|
+
|
|
157
|
+
const handleShapeDeleted = useCallback((shapeId: string) => {
|
|
158
|
+
setSelectedShapes(prev => prev.filter(s => s.id !== shapeId));
|
|
159
|
+
}, []);
|
|
160
|
+
|
|
161
|
+
const handleRemoveShape = useCallback((id: string) => {
|
|
162
|
+
setSelectedShapes(prev => prev.filter(s => s.id !== id));
|
|
163
|
+
}, []);
|
|
164
|
+
|
|
165
|
+
const handleToggleShapeVisibility = useCallback((id: string) => {
|
|
166
|
+
setSelectedShapes(prev => prev.map(s =>
|
|
167
|
+
s.id === id ? { ...s, visible: !s.visible } : s
|
|
168
|
+
));
|
|
169
|
+
}, []);
|
|
170
|
+
|
|
171
|
+
const handleToggleShapeInclude = useCallback((id: string) => {
|
|
172
|
+
setSelectedShapes(prev => prev.map(s =>
|
|
173
|
+
s.id === id ? { ...s, include: !s.include } : s
|
|
174
|
+
));
|
|
175
|
+
}, []);
|
|
176
|
+
|
|
177
|
+
const handleCancel = useCallback(() => {
|
|
178
|
+
setLocation(entityId ? `/deals/${entityId}` : "/deals");
|
|
179
|
+
}, [entityId, setLocation]);
|
|
180
|
+
|
|
181
|
+
const handleDone = useCallback(() => {
|
|
182
|
+
console.log("Saving geotargeting rules:", {
|
|
183
|
+
locations: selectedLocations,
|
|
184
|
+
shapes: selectedShapes,
|
|
185
|
+
poiCategories,
|
|
186
|
+
});
|
|
187
|
+
setLocation(entityId ? `/deals/${entityId}` : "/deals");
|
|
188
|
+
}, [entityId, selectedLocations, selectedShapes, poiCategories, setLocation]);
|
|
189
|
+
|
|
190
|
+
const mapMarkers = useMemo(() => {
|
|
191
|
+
const markers = selectedLocations
|
|
192
|
+
.filter(loc => loc.visible)
|
|
193
|
+
.map(loc => ({
|
|
194
|
+
id: loc.id,
|
|
195
|
+
lng: loc.lng,
|
|
196
|
+
lat: loc.lat,
|
|
197
|
+
color: loc.include ? "#1E88E5" : "#E53935",
|
|
198
|
+
popup: `<strong>${loc.name}</strong><br/>${loc.address || ""}`,
|
|
199
|
+
}));
|
|
200
|
+
return markers;
|
|
201
|
+
}, [selectedLocations]);
|
|
202
|
+
|
|
203
|
+
const mapCircles = useMemo(() => {
|
|
204
|
+
return selectedLocations
|
|
205
|
+
.filter(loc => loc.visible)
|
|
206
|
+
.map(loc => ({
|
|
207
|
+
id: loc.id,
|
|
208
|
+
center: [loc.lng, loc.lat] as [number, number],
|
|
209
|
+
radius: loc.radius,
|
|
210
|
+
color: loc.include ? "#1E88E5" : "#E53935",
|
|
211
|
+
}));
|
|
212
|
+
}, [selectedLocations]);
|
|
213
|
+
|
|
214
|
+
const mapRoutes = useMemo(() => {
|
|
215
|
+
return transitRoutes.map(route => ({
|
|
216
|
+
id: route.id,
|
|
217
|
+
coordinates: (route.geojson as any).coordinates || [],
|
|
218
|
+
color: route.color || "#1E88E5",
|
|
219
|
+
name: route.name,
|
|
220
|
+
}));
|
|
221
|
+
}, [transitRoutes]);
|
|
222
|
+
|
|
223
|
+
const mapZones = useMemo(() => {
|
|
224
|
+
return transitZones.map(zone => ({
|
|
225
|
+
id: zone.id,
|
|
226
|
+
coordinates: (zone.geojson as any).coordinates || [],
|
|
227
|
+
color: zone.color || "#FFC107",
|
|
228
|
+
name: zone.name,
|
|
229
|
+
}));
|
|
230
|
+
}, [transitZones]);
|
|
231
|
+
|
|
232
|
+
return (
|
|
233
|
+
<div className="flex flex-col h-screen bg-background">
|
|
234
|
+
<div className="border-b px-6 py-4">
|
|
235
|
+
<h1 className="text-2xl font-semibold">Geography Targeting</h1>
|
|
236
|
+
</div>
|
|
237
|
+
|
|
238
|
+
<div className="flex-1 flex overflow-hidden">
|
|
239
|
+
<div className="w-[450px] border-r flex flex-col bg-card">
|
|
240
|
+
<div className="flex border-b">
|
|
241
|
+
<button
|
|
242
|
+
onClick={() => setActiveTab("regions")}
|
|
243
|
+
className={cn(
|
|
244
|
+
"flex-1 py-3 text-center font-medium transition-colors",
|
|
245
|
+
activeTab === "regions"
|
|
246
|
+
? "bg-primary text-primary-foreground"
|
|
247
|
+
: "bg-muted text-muted-foreground hover:bg-muted/80"
|
|
248
|
+
)}
|
|
249
|
+
data-testid="tab-regions"
|
|
250
|
+
>
|
|
251
|
+
Regions
|
|
252
|
+
</button>
|
|
253
|
+
<button
|
|
254
|
+
onClick={() => setActiveTab("proximity")}
|
|
255
|
+
className={cn(
|
|
256
|
+
"flex-1 py-3 text-center font-medium transition-colors",
|
|
257
|
+
activeTab === "proximity"
|
|
258
|
+
? "bg-primary text-primary-foreground"
|
|
259
|
+
: "bg-muted text-muted-foreground hover:bg-muted/80"
|
|
260
|
+
)}
|
|
261
|
+
data-testid="tab-proximity"
|
|
262
|
+
>
|
|
263
|
+
Proximity
|
|
264
|
+
</button>
|
|
265
|
+
</div>
|
|
266
|
+
|
|
267
|
+
<div className="flex-1 overflow-auto p-4">
|
|
268
|
+
{activeTab === "regions" && (
|
|
269
|
+
<div className="space-y-4">
|
|
270
|
+
<div className="relative">
|
|
271
|
+
<Search className="absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" />
|
|
272
|
+
<Input
|
|
273
|
+
placeholder="Search locations..."
|
|
274
|
+
value={searchQuery}
|
|
275
|
+
onChange={(e) => handleSearch(e.target.value)}
|
|
276
|
+
className="pl-9"
|
|
277
|
+
data-testid="input-location-search"
|
|
278
|
+
/>
|
|
279
|
+
</div>
|
|
280
|
+
|
|
281
|
+
{searchResults.length > 0 && (
|
|
282
|
+
<Card className="absolute z-10 w-[calc(100%-2rem)] mt-1 max-h-60 overflow-auto">
|
|
283
|
+
<CardContent className="p-0">
|
|
284
|
+
{searchResults.map((result) => (
|
|
285
|
+
<button
|
|
286
|
+
key={result.id}
|
|
287
|
+
onClick={() => handleAddLocation(result)}
|
|
288
|
+
className="w-full px-4 py-3 text-left hover:bg-muted border-b last:border-b-0"
|
|
289
|
+
data-testid={`search-result-${result.id}`}
|
|
290
|
+
>
|
|
291
|
+
<div className="font-medium">{result.name}</div>
|
|
292
|
+
<div className="text-sm text-muted-foreground">{result.address}</div>
|
|
293
|
+
</button>
|
|
294
|
+
))}
|
|
295
|
+
</CardContent>
|
|
296
|
+
</Card>
|
|
297
|
+
)}
|
|
298
|
+
|
|
299
|
+
{selectedLocations.length > 0 && (
|
|
300
|
+
<div className="space-y-2 mt-4">
|
|
301
|
+
<div className="grid grid-cols-12 gap-2 text-xs font-medium text-muted-foreground px-2">
|
|
302
|
+
<div className="col-span-1">#</div>
|
|
303
|
+
<div className="col-span-5">Location</div>
|
|
304
|
+
<div className="col-span-3">Radius</div>
|
|
305
|
+
<div className="col-span-3">Actions</div>
|
|
306
|
+
</div>
|
|
307
|
+
{selectedLocations.map((loc, index) => (
|
|
308
|
+
<div
|
|
309
|
+
key={loc.id}
|
|
310
|
+
className="grid grid-cols-12 gap-2 items-center p-2 bg-muted/50 rounded-md"
|
|
311
|
+
data-testid={`location-row-${index}`}
|
|
312
|
+
>
|
|
313
|
+
<div className="col-span-1 text-sm text-muted-foreground">{index + 1}</div>
|
|
314
|
+
<div className="col-span-5">
|
|
315
|
+
<div className="text-sm font-medium truncate">{loc.name}</div>
|
|
316
|
+
<div className="text-xs text-muted-foreground truncate">{loc.address}</div>
|
|
317
|
+
</div>
|
|
318
|
+
<div className="col-span-3 flex items-center gap-1">
|
|
319
|
+
<Input
|
|
320
|
+
type="number"
|
|
321
|
+
value={loc.radius}
|
|
322
|
+
onChange={(e) => handleLocationRadiusChange(loc.id, parseInt(e.target.value) || 0)}
|
|
323
|
+
className="h-7 w-16 text-xs"
|
|
324
|
+
data-testid={`input-radius-${index}`}
|
|
325
|
+
/>
|
|
326
|
+
<span className="text-xs text-muted-foreground">m</span>
|
|
327
|
+
</div>
|
|
328
|
+
<div className="col-span-3 flex items-center gap-1">
|
|
329
|
+
<Tooltip>
|
|
330
|
+
<TooltipTrigger asChild>
|
|
331
|
+
<Button
|
|
332
|
+
variant="ghost"
|
|
333
|
+
size="icon"
|
|
334
|
+
className="h-7 w-7"
|
|
335
|
+
onClick={() => handleToggleLocationInclude(loc.id)}
|
|
336
|
+
data-testid={`button-toggle-include-${index}`}
|
|
337
|
+
>
|
|
338
|
+
<Checkbox checked={loc.include} className="pointer-events-none" />
|
|
339
|
+
</Button>
|
|
340
|
+
</TooltipTrigger>
|
|
341
|
+
<TooltipContent>
|
|
342
|
+
{loc.include ? "Included" : "Excluded"}
|
|
343
|
+
</TooltipContent>
|
|
344
|
+
</Tooltip>
|
|
345
|
+
<Tooltip>
|
|
346
|
+
<TooltipTrigger asChild>
|
|
347
|
+
<Button
|
|
348
|
+
variant="ghost"
|
|
349
|
+
size="icon"
|
|
350
|
+
className="h-7 w-7"
|
|
351
|
+
onClick={() => handleToggleLocationVisibility(loc.id)}
|
|
352
|
+
data-testid={`button-toggle-visibility-${index}`}
|
|
353
|
+
>
|
|
354
|
+
{loc.visible ? <Eye className="h-4 w-4" /> : <EyeOff className="h-4 w-4" />}
|
|
355
|
+
</Button>
|
|
356
|
+
</TooltipTrigger>
|
|
357
|
+
<TooltipContent>
|
|
358
|
+
{loc.visible ? "Hide on map" : "Show on map"}
|
|
359
|
+
</TooltipContent>
|
|
360
|
+
</Tooltip>
|
|
361
|
+
<Tooltip>
|
|
362
|
+
<TooltipTrigger asChild>
|
|
363
|
+
<Button
|
|
364
|
+
variant="ghost"
|
|
365
|
+
size="icon"
|
|
366
|
+
className="h-7 w-7 text-destructive hover:text-destructive"
|
|
367
|
+
onClick={() => handleRemoveLocation(loc.id)}
|
|
368
|
+
data-testid={`button-remove-location-${index}`}
|
|
369
|
+
>
|
|
370
|
+
<Minus className="h-4 w-4" />
|
|
371
|
+
</Button>
|
|
372
|
+
</TooltipTrigger>
|
|
373
|
+
<TooltipContent>Remove</TooltipContent>
|
|
374
|
+
</Tooltip>
|
|
375
|
+
</div>
|
|
376
|
+
</div>
|
|
377
|
+
))}
|
|
378
|
+
</div>
|
|
379
|
+
)}
|
|
380
|
+
|
|
381
|
+
{selectedLocations.length === 0 && searchResults.length === 0 && (
|
|
382
|
+
<div className="text-center py-8 text-muted-foreground">
|
|
383
|
+
<MapPin className="h-12 w-12 mx-auto mb-3 opacity-50" />
|
|
384
|
+
<p>Search for locations to add to your targeting</p>
|
|
385
|
+
</div>
|
|
386
|
+
)}
|
|
387
|
+
</div>
|
|
388
|
+
)}
|
|
389
|
+
|
|
390
|
+
{activeTab === "proximity" && (
|
|
391
|
+
<div className="space-y-4">
|
|
392
|
+
<div className="border-l-4 border-primary bg-primary/5 p-4 rounded-r-md">
|
|
393
|
+
<p className="text-sm text-muted-foreground">
|
|
394
|
+
Draw your preferred shape on the map using the map tools and target the proximities.
|
|
395
|
+
You may choose to include or exclude the shape.
|
|
396
|
+
</p>
|
|
397
|
+
</div>
|
|
398
|
+
|
|
399
|
+
<div className="flex items-center gap-2">
|
|
400
|
+
<Tooltip>
|
|
401
|
+
<TooltipTrigger asChild>
|
|
402
|
+
<Button
|
|
403
|
+
variant={drawingMode === "polygon" ? "default" : "outline"}
|
|
404
|
+
size="icon"
|
|
405
|
+
onClick={() => setDrawingMode(drawingMode === "polygon" ? null : "polygon")}
|
|
406
|
+
data-testid="button-draw-polygon"
|
|
407
|
+
>
|
|
408
|
+
<Pentagon className="h-4 w-4" />
|
|
409
|
+
</Button>
|
|
410
|
+
</TooltipTrigger>
|
|
411
|
+
<TooltipContent>Draw Polygon</TooltipContent>
|
|
412
|
+
</Tooltip>
|
|
413
|
+
<Tooltip>
|
|
414
|
+
<TooltipTrigger asChild>
|
|
415
|
+
<Button
|
|
416
|
+
variant={drawingMode === "circle" ? "default" : "outline"}
|
|
417
|
+
size="icon"
|
|
418
|
+
onClick={() => setDrawingMode(drawingMode === "circle" ? null : "circle")}
|
|
419
|
+
data-testid="button-draw-circle"
|
|
420
|
+
>
|
|
421
|
+
<Circle className="h-4 w-4" />
|
|
422
|
+
</Button>
|
|
423
|
+
</TooltipTrigger>
|
|
424
|
+
<TooltipContent>Draw Circle</TooltipContent>
|
|
425
|
+
</Tooltip>
|
|
426
|
+
<Tooltip>
|
|
427
|
+
<TooltipTrigger asChild>
|
|
428
|
+
<Button
|
|
429
|
+
variant={drawingMode === "freeform" ? "default" : "outline"}
|
|
430
|
+
size="icon"
|
|
431
|
+
onClick={() => setDrawingMode(drawingMode === "freeform" ? null : "freeform")}
|
|
432
|
+
data-testid="button-draw-freeform"
|
|
433
|
+
>
|
|
434
|
+
<Pencil className="h-4 w-4" />
|
|
435
|
+
</Button>
|
|
436
|
+
</TooltipTrigger>
|
|
437
|
+
<TooltipContent>Freeform Draw</TooltipContent>
|
|
438
|
+
</Tooltip>
|
|
439
|
+
</div>
|
|
440
|
+
|
|
441
|
+
{selectedShapes.length > 0 && (
|
|
442
|
+
<div className="space-y-2 mt-4">
|
|
443
|
+
<div className="grid grid-cols-12 gap-2 text-xs font-medium text-muted-foreground px-2">
|
|
444
|
+
<div className="col-span-1">S.No</div>
|
|
445
|
+
<div className="col-span-5">List of Proximities</div>
|
|
446
|
+
<div className="col-span-3">Measurements</div>
|
|
447
|
+
<div className="col-span-3">Actions</div>
|
|
448
|
+
</div>
|
|
449
|
+
{selectedShapes.map((shape, index) => (
|
|
450
|
+
<div
|
|
451
|
+
key={shape.id}
|
|
452
|
+
className="grid grid-cols-12 gap-2 items-center p-2 bg-muted/50 rounded-md"
|
|
453
|
+
data-testid={`shape-row-${index}`}
|
|
454
|
+
>
|
|
455
|
+
<div className="col-span-1 text-sm text-muted-foreground">{index + 1}</div>
|
|
456
|
+
<div className="col-span-5">
|
|
457
|
+
<span className="text-sm font-medium capitalize">{shape.type} {index + 1}</span>
|
|
458
|
+
</div>
|
|
459
|
+
<div className="col-span-3 text-sm">{shape.measurements}</div>
|
|
460
|
+
<div className="col-span-3 flex items-center gap-1">
|
|
461
|
+
<Tooltip>
|
|
462
|
+
<TooltipTrigger asChild>
|
|
463
|
+
<Button
|
|
464
|
+
variant="ghost"
|
|
465
|
+
size="icon"
|
|
466
|
+
className="h-7 w-7"
|
|
467
|
+
onClick={() => handleToggleShapeInclude(shape.id)}
|
|
468
|
+
data-testid={`button-toggle-shape-include-${index}`}
|
|
469
|
+
>
|
|
470
|
+
<Checkbox checked={shape.include} className="pointer-events-none" />
|
|
471
|
+
</Button>
|
|
472
|
+
</TooltipTrigger>
|
|
473
|
+
<TooltipContent>
|
|
474
|
+
{shape.include ? "Included" : "Excluded"}
|
|
475
|
+
</TooltipContent>
|
|
476
|
+
</Tooltip>
|
|
477
|
+
<Tooltip>
|
|
478
|
+
<TooltipTrigger asChild>
|
|
479
|
+
<Button
|
|
480
|
+
variant="ghost"
|
|
481
|
+
size="icon"
|
|
482
|
+
className="h-7 w-7"
|
|
483
|
+
onClick={() => handleToggleShapeVisibility(shape.id)}
|
|
484
|
+
data-testid={`button-toggle-shape-visibility-${index}`}
|
|
485
|
+
>
|
|
486
|
+
{shape.visible ? <Eye className="h-4 w-4" /> : <EyeOff className="h-4 w-4" />}
|
|
487
|
+
</Button>
|
|
488
|
+
</TooltipTrigger>
|
|
489
|
+
<TooltipContent>
|
|
490
|
+
{shape.visible ? "Hide on map" : "Show on map"}
|
|
491
|
+
</TooltipContent>
|
|
492
|
+
</Tooltip>
|
|
493
|
+
<Tooltip>
|
|
494
|
+
<TooltipTrigger asChild>
|
|
495
|
+
<Button
|
|
496
|
+
variant="ghost"
|
|
497
|
+
size="icon"
|
|
498
|
+
className="h-7 w-7 text-destructive hover:text-destructive"
|
|
499
|
+
onClick={() => handleRemoveShape(shape.id)}
|
|
500
|
+
data-testid={`button-remove-shape-${index}`}
|
|
501
|
+
>
|
|
502
|
+
<Minus className="h-4 w-4" />
|
|
503
|
+
</Button>
|
|
504
|
+
</TooltipTrigger>
|
|
505
|
+
<TooltipContent>Remove</TooltipContent>
|
|
506
|
+
</Tooltip>
|
|
507
|
+
</div>
|
|
508
|
+
</div>
|
|
509
|
+
))}
|
|
510
|
+
</div>
|
|
511
|
+
)}
|
|
512
|
+
|
|
513
|
+
{selectedShapes.length === 0 && (
|
|
514
|
+
<div className="text-center py-8 text-muted-foreground">
|
|
515
|
+
<img
|
|
516
|
+
src="https://via.placeholder.com/200x150?text=Draw+on+Map"
|
|
517
|
+
alt="Draw on map"
|
|
518
|
+
className="mx-auto mb-3 rounded-lg"
|
|
519
|
+
/>
|
|
520
|
+
<p>Use the drawing tools to create proximity shapes</p>
|
|
521
|
+
</div>
|
|
522
|
+
)}
|
|
523
|
+
</div>
|
|
524
|
+
)}
|
|
525
|
+
</div>
|
|
526
|
+
</div>
|
|
527
|
+
|
|
528
|
+
<div className="flex-1 relative">
|
|
529
|
+
<MapboxMap
|
|
530
|
+
markers={mapMarkers}
|
|
531
|
+
circles={mapCircles}
|
|
532
|
+
routes={mapRoutes}
|
|
533
|
+
zones={mapZones}
|
|
534
|
+
drawingMode={drawingMode}
|
|
535
|
+
onShapeCreated={handleShapeCreated}
|
|
536
|
+
onShapeDeleted={handleShapeDeleted}
|
|
537
|
+
/>
|
|
538
|
+
|
|
539
|
+
<div className="absolute top-4 right-4 flex flex-col gap-2">
|
|
540
|
+
<Tooltip>
|
|
541
|
+
<TooltipTrigger asChild>
|
|
542
|
+
<Button
|
|
543
|
+
variant="outline"
|
|
544
|
+
size="icon"
|
|
545
|
+
className="bg-white shadow-md"
|
|
546
|
+
onClick={() => setShowPoiPanel(!showPoiPanel)}
|
|
547
|
+
data-testid="button-toggle-poi"
|
|
548
|
+
>
|
|
549
|
+
<MapPin className="h-4 w-4" />
|
|
550
|
+
</Button>
|
|
551
|
+
</TooltipTrigger>
|
|
552
|
+
<TooltipContent side="left">Search POIs</TooltipContent>
|
|
553
|
+
</Tooltip>
|
|
554
|
+
<Tooltip>
|
|
555
|
+
<TooltipTrigger asChild>
|
|
556
|
+
<Button
|
|
557
|
+
variant={drawingMode === "circle" ? "default" : "outline"}
|
|
558
|
+
size="icon"
|
|
559
|
+
className={cn("shadow-md", drawingMode !== "circle" && "bg-white")}
|
|
560
|
+
onClick={() => setDrawingMode(drawingMode === "circle" ? null : "circle")}
|
|
561
|
+
data-testid="button-map-circle"
|
|
562
|
+
>
|
|
563
|
+
<Circle className="h-4 w-4" />
|
|
564
|
+
</Button>
|
|
565
|
+
</TooltipTrigger>
|
|
566
|
+
<TooltipContent side="left">Draw Circle</TooltipContent>
|
|
567
|
+
</Tooltip>
|
|
568
|
+
<Tooltip>
|
|
569
|
+
<TooltipTrigger asChild>
|
|
570
|
+
<Button
|
|
571
|
+
variant={drawingMode === "freeform" ? "default" : "outline"}
|
|
572
|
+
size="icon"
|
|
573
|
+
className={cn("shadow-md", drawingMode !== "freeform" && "bg-white")}
|
|
574
|
+
onClick={() => setDrawingMode(drawingMode === "freeform" ? null : "freeform")}
|
|
575
|
+
data-testid="button-map-freeform"
|
|
576
|
+
>
|
|
577
|
+
<Pencil className="h-4 w-4" />
|
|
578
|
+
</Button>
|
|
579
|
+
</TooltipTrigger>
|
|
580
|
+
<TooltipContent side="left">Freeform Draw</TooltipContent>
|
|
581
|
+
</Tooltip>
|
|
582
|
+
</div>
|
|
583
|
+
|
|
584
|
+
{showPoiPanel && (
|
|
585
|
+
<div className="absolute top-4 left-4 w-72 bg-white rounded-lg shadow-lg p-4" data-testid="poi-panel">
|
|
586
|
+
<div className="flex items-center justify-between mb-3">
|
|
587
|
+
<h3 className="font-medium">Search POIs</h3>
|
|
588
|
+
<Button
|
|
589
|
+
variant="ghost"
|
|
590
|
+
size="icon"
|
|
591
|
+
className="h-6 w-6"
|
|
592
|
+
onClick={() => setShowPoiPanel(false)}
|
|
593
|
+
>
|
|
594
|
+
<X className="h-4 w-4" />
|
|
595
|
+
</Button>
|
|
596
|
+
</div>
|
|
597
|
+
<p className="text-xs text-muted-foreground mb-3">Maximum 5 POI labels can be added</p>
|
|
598
|
+
|
|
599
|
+
<div className="flex flex-wrap gap-1 mb-3">
|
|
600
|
+
{poiCategories.map(cat => (
|
|
601
|
+
<Badge key={cat} variant="secondary" className="gap-1">
|
|
602
|
+
{cat}
|
|
603
|
+
<button onClick={() => handleRemovePoiCategory(cat)}>
|
|
604
|
+
<X className="h-3 w-3" />
|
|
605
|
+
</button>
|
|
606
|
+
</Badge>
|
|
607
|
+
))}
|
|
608
|
+
</div>
|
|
609
|
+
|
|
610
|
+
<div className="flex gap-2 mb-3">
|
|
611
|
+
<Input
|
|
612
|
+
placeholder="Add category..."
|
|
613
|
+
value={poiSearch}
|
|
614
|
+
onChange={(e) => setPoiSearch(e.target.value)}
|
|
615
|
+
className="flex-1"
|
|
616
|
+
data-testid="input-poi-category"
|
|
617
|
+
/>
|
|
618
|
+
<Button
|
|
619
|
+
size="sm"
|
|
620
|
+
onClick={() => {
|
|
621
|
+
if (poiSearch && poiCategories.length < 5) {
|
|
622
|
+
handleAddPoiCategory(poiSearch);
|
|
623
|
+
setPoiSearch("");
|
|
624
|
+
}
|
|
625
|
+
}}
|
|
626
|
+
disabled={!poiSearch || poiCategories.length >= 5}
|
|
627
|
+
data-testid="button-add-poi-category"
|
|
628
|
+
>
|
|
629
|
+
Find POIs
|
|
630
|
+
</Button>
|
|
631
|
+
</div>
|
|
632
|
+
|
|
633
|
+
{pois.length > 0 && (
|
|
634
|
+
<div className="max-h-40 overflow-auto space-y-2">
|
|
635
|
+
{pois.slice(0, 10).map(poi => (
|
|
636
|
+
<div key={poi.id} className="p-2 bg-muted/50 rounded text-sm">
|
|
637
|
+
<div className="font-medium">{poi.name}</div>
|
|
638
|
+
<div className="text-xs text-muted-foreground">{poi.category}</div>
|
|
639
|
+
</div>
|
|
640
|
+
))}
|
|
641
|
+
</div>
|
|
642
|
+
)}
|
|
643
|
+
</div>
|
|
644
|
+
)}
|
|
645
|
+
|
|
646
|
+
<div className="absolute bottom-4 left-4 flex gap-2">
|
|
647
|
+
<div className="bg-white rounded-lg shadow-md px-3 py-2 flex items-center gap-4 text-xs">
|
|
648
|
+
<div className="flex items-center gap-1.5">
|
|
649
|
+
<Train className="h-4 w-4 text-blue-600" />
|
|
650
|
+
<span>MRT/LRT</span>
|
|
651
|
+
</div>
|
|
652
|
+
<div className="flex items-center gap-1.5">
|
|
653
|
+
<Bus className="h-4 w-4 text-green-600" />
|
|
654
|
+
<span>Bus</span>
|
|
655
|
+
</div>
|
|
656
|
+
<div className="flex items-center gap-1.5">
|
|
657
|
+
<Car className="h-4 w-4 text-amber-600" />
|
|
658
|
+
<span>Taxi Zone</span>
|
|
659
|
+
</div>
|
|
660
|
+
</div>
|
|
661
|
+
</div>
|
|
662
|
+
</div>
|
|
663
|
+
</div>
|
|
664
|
+
|
|
665
|
+
<div className="border-t px-6 py-4 flex justify-end gap-3">
|
|
666
|
+
<Button variant="outline" onClick={handleCancel} data-testid="button-cancel">
|
|
667
|
+
Cancel
|
|
668
|
+
</Button>
|
|
669
|
+
<Button onClick={handleDone} data-testid="button-done">
|
|
670
|
+
Done
|
|
671
|
+
</Button>
|
|
672
|
+
</div>
|
|
673
|
+
</div>
|
|
674
|
+
);
|
|
675
|
+
}
|