ca-grow-ops-manager/frontend/src/lib/roomsApi.ts
fullsizemalt 32fd739ccf
Some checks failed
Deploy to Production / deploy (push) Failing after 0s
Test / backend-test (push) Failing after 0s
Test / frontend-test (push) Failing after 0s
feat: Complete Phases 8-13 implementation
Phase 8: Visitor Management
- Visitor/VisitorLog/AccessZone models
- Check-in/out with badge generation
- Zone occupancy tracking
- Kiosk and management pages

Phase 9: Messaging & Communication
- Announcements with priority levels
- Acknowledgement tracking
- Shift notes for team handoffs
- AnnouncementBanner component

Phase 10: Compliance & Audit Trail
- Immutable AuditLog model
- Document versioning and approval workflow
- Acknowledgement tracking for SOPs
- CSV export for audit logs

Phase 11: Accessibility & i18n
- WCAG 2.1 AA compliance utilities
- react-i18next with EN/ES translations
- User preferences context (theme, font size, etc)
- High contrast and reduced motion support

Phase 12: Hardware Integration
- QR code generation for batches/plants/visitors
- Printable label system
- Visitor badge printing

Phase 13: Advanced Features
- Environmental monitoring (sensors, readings, alerts)
- Financial tracking (transactions, P&L reports)
- AI/ML insights (yield predictions, anomaly detection)
2025-12-11 00:26:25 -08:00

29 lines
755 B
TypeScript

import api from './api';
export type RoomType = 'VEG' | 'FLOWER' | 'DRY' | 'CURE' | 'MOTHER' | 'CLONE' | 'FACILITY';
export type RoomStatus = 'ACTIVE' | 'CLEANING' | 'MAINTENANCE';
export interface Room {
id: string;
name: string;
type: RoomType;
status: RoomStatus;
sqft?: number;
capacity?: number;
targetTemp?: number;
targetHumidity?: number;
targetVPD?: number;
batches?: { id: string; name: string; status: string }[];
}
export const roomsApi = {
getAll: async () => {
const response = await api.get<Room[]>('/rooms');
return response.data;
},
create: async (data: any) => {
const response = await api.post<Room>('/rooms', data);
return response.data;
}
};