Skip to content

Instantly share code, notes, and snippets.

"use client";
import React from 'react';
import type { UseFormReturn, UseFieldArrayReturn } from "react-hook-form";
import { FormField, FormControl, FormItem, FormLabel, FormMessage, FormDescription } from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import { Textarea } from "@/components/ui/textarea";
import { Button } from "@/components/ui/button";
import { Card } from "@/components/ui/card";
import { Checkbox } from "@/components/ui/checkbox";
import type { Customer } from '@/types/customer';
import type { FilterCriterion } from '@/types/segment';
import { Timestamp } from 'firebase/firestore';
export const applyFiltersToCustomersWithCount = (
customers: Customer[],
criteria: FilterCriterion[]
): { customers: Customer[]; memberCount: number } => {
if (!criteria || criteria.length === 0) {
return { customers, memberCount: customers.length };
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
Job Card Template
</title>
<script src="https://cdn.tailwindcss.com">
@mohdsuhail23
mohdsuhail23 / code js file
Created September 1, 2025 15:01
hotel booking
/****************************************************
* Lodging PMS – Updated Core Server Code (2-step)
****************************************************/
// ====== CONFIG ======
const sheetId = "1HhhuY7QEptHfir5Zk1RxbP_HGK5o2i_IxLqPrncxMIQ";
const CONFIG_SHEET = "Config";
const BOOKINGS_SHEET = "Bookings";
const CLEANING_SHEET = "Cleaning";
const UNIT_SHEET = "Units";
@mohdsuhail23
mohdsuhail23 / code js file
Last active September 1, 2025 10:42
bookig system project
/****************************************************
* Lodging PMS – Updated Core Server Code (2-step)
****************************************************/
// ====== CONFIG ======
const sheetId = "1HhhuY7QEptHfir5Zk1RxbP_HGK5o2i_IxLqPrncxMIQ";
const CONFIG_SHEET = "Config";
const BOOKINGS_SHEET = "Bookings";
const CLEANING_SHEET = "Cleaning";
const UNIT_SHEET = "Units";