Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(crm): take the stage definition name from system_properties (#6276)

Panat Taranat5e9c488200b8
diff --git a/crates/crm/Cargo.toml b/crates/crm/Cargo.toml
index d7521031d0..8cc8406ce1 100644
--- a/crates/crm/Cargo.toml
+++ b/crates/crm/Cargo.toml
@@ -12,7 +12,6 @@ ai_tools = [
"dep:models_properties",
"dep:properties",
"dep:schemars",
- "dep:system_properties",
"entity_access/ports",
"ports",
]
@@ -63,7 +62,7 @@ properties = { path = "../properties", default-features = false, features = [
"ports",
], optional = true }
schemars = { workspace = true, optional = true }
-system_properties = { path = "../system_properties", optional = true }
+system_properties = { path = "../system_properties" }
# Axum / inbound dependencies
axum = { workspace = true, optional = true }
diff --git a/crates/crm/src/domain/stages.rs b/crates/crm/src/domain/stages.rs
index e9be03a169..12463e1f85 100644
--- a/crates/crm/src/domain/stages.rs
+++ b/crates/crm/src/domain/stages.rs
@@ -14,7 +14,7 @@ use crate::domain::{
mod test;
/// Name of the team-scoped stage definition; `Stage` is reserved by a trigger.
-pub use properties::CRM_TEAM_STAGE_DEFINITION_NAME;
+pub use system_properties::CRM_TEAM_STAGE_DEFINITION_NAME;
/// Maximum stages in one pipeline.
pub const MAX_STAGES: usize = 50;
diff --git a/crates/properties/src/domain/model.rs b/crates/properties/src/domain/model.rs
index 0bfcf5ce9b..e93ee339e1 100644
--- a/crates/properties/src/domain/model.rs
+++ b/crates/properties/src/domain/model.rs
@@ -15,8 +15,7 @@ use models_properties::service::property_value::PropertyValue;
use models_properties::{DataType, EntityReference, EntityType, PropertyOwner};
use uuid::Uuid;
-/// Name of a team's CRM stage definition. Written by the CRM crate, read by the loaders here.
-pub const CRM_TEAM_STAGE_DEFINITION_NAME: &str = "Deal Stage";
+pub use system_properties::CRM_TEAM_STAGE_DEFINITION_NAME;
/// Map an internal properties storage type to its canonical entity type.
pub fn canonical_entity_type(entity_type: EntityType) -> AccessEntityType {
diff --git a/crates/system_properties/src/lib.rs b/crates/system_properties/src/lib.rs
index 7084af525b..b6b55ce141 100644
--- a/crates/system_properties/src/lib.rs
+++ b/crates/system_properties/src/lib.rs
@@ -51,5 +51,8 @@ pub use domain::model::{
StageOption, StatusOption, SystemPropertyError, SystemPropertyKey,
};
pub use domain::port::SystemPropertiesRepository;
+
+/// Name of a team's CRM stage definition. Written by the CRM crate, read by the property loaders.
+pub const CRM_TEAM_STAGE_DEFINITION_NAME: &str = "Deal Stage";
pub use domain::service::{SystemPropertiesService, SystemPropertiesServiceImpl};
pub use outbound::pgpool::PgSystemPropertiesRepository;