summaryrefslogtreecommitdiff
path: root/makima
diff options
context:
space:
mode:
Diffstat (limited to 'makima')
-rw-r--r--makima/frontend/src/components/orders/OrderList.tsx2
-rw-r--r--makima/src/db/repository.rs13
-rw-r--r--makima/src/server/handlers/directives.rs1
3 files changed, 15 insertions, 1 deletions
diff --git a/makima/frontend/src/components/orders/OrderList.tsx b/makima/frontend/src/components/orders/OrderList.tsx
index 3d63c54..0ebd18d 100644
--- a/makima/frontend/src/components/orders/OrderList.tsx
+++ b/makima/frontend/src/components/orders/OrderList.tsx
@@ -4,7 +4,7 @@ import type { Order, OrderStatus, OrderPriority, OrderType } from "../../lib/api
const STATUS_BADGE: Record<OrderStatus, { color: string; label: string }> = {
open: { color: "text-[#75aafc] border-[rgba(117,170,252,0.4)]", label: "OPEN" },
in_progress: { color: "text-yellow-400 border-yellow-800", label: "IN PROGRESS" },
- under_review: { color: "text-amber-400 border-amber-800", label: "REVIEW" },
+ under_review: { color: "text-purple-400 border-purple-800", label: "REVIEW" },
done: { color: "text-emerald-400 border-emerald-800", label: "DONE" },
archived: { color: "text-[#556677] border-[#2a3a5a]", label: "ARCHIVED" },
};
diff --git a/makima/src/db/repository.rs b/makima/src/db/repository.rs
index aa1203a..c7b0a1f 100644
--- a/makima/src/db/repository.rs
+++ b/makima/src/db/repository.rs
@@ -5363,6 +5363,19 @@ pub async fn get_last_completed_step_task_id(
// Directive Step CRUD
// =============================================================================
+/// Get a single directive step by ID.
+pub async fn get_directive_step(
+ pool: &PgPool,
+ step_id: Uuid,
+) -> Result<Option<DirectiveStep>, sqlx::Error> {
+ sqlx::query_as::<_, DirectiveStep>(
+ r#"SELECT * FROM directive_steps WHERE id = $1"#,
+ )
+ .bind(step_id)
+ .fetch_optional(pool)
+ .await
+}
+
/// List all steps for a directive, ordered by order_index.
pub async fn list_directive_steps(
pool: &PgPool,
diff --git a/makima/src/server/handlers/directives.rs b/makima/src/server/handlers/directives.rs
index cb59581..b4b438a 100644
--- a/makima/src/server/handlers/directives.rs
+++ b/makima/src/server/handlers/directives.rs
@@ -13,6 +13,7 @@ use crate::db::models::{
CreateDirectiveStepRequest, Directive, DirectiveListResponse,
DirectiveStep, DirectiveWithSteps, PickUpOrdersResponse,
UpdateDirectiveRequest, UpdateDirectiveStepRequest, UpdateGoalRequest,
+ UpdateOrderRequest,
};
use crate::db::repository;
use crate::orchestration::directive::build_order_pickup_prompt;