statusChipColor (use-appointments.ts)

ZaloCRM · appointments, list-filtering, crud-operations, crm

Composable for appointment (lịch hẹn) management: - List with filters (date range, status, contact) - CRUD operations - Today / upcoming shortcuts /

/**
 * Composable for appointment (lịch hẹn) management:
 * - List with filters (date range, status, contact)
 * - CRUD operations
 * - Today / upcoming shortcuts
 */
import { ref, reactive } from 'vue';
import { api } from '@/api/index';

export interface Appointment {
  id: string;
  contactId: string;
  contact?: { id: string; fullName: string | null; phone: string | null };
  appointmentDate: string;
  appointmentTime: string;
  type: string;
  status: string;
  notes: string | null;
  createdAt: string;
}

export interface AppointmentFilters {
  from: string;
  to: string;
  status: string;
  contactId: string;
}

export const APPOINTMENT_STATUS_OPTIONS = [
  { text: 'Đã lên lịch', value: 'scheduled' },
  { text: 'Hoàn thành', value: 'completed' },
  { text: 'Đã huỷ', value: 'cancelle

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key