Index: src/api/customer.ts
===================================================================
--- src/api/customer.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/api/customer.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -1,5 +1,5 @@
 import { useMemo } from 'react';
 // types
-import { Customer } from 'src/schemas';
+import { Customer } from 'mvpmasters-shared';
 // db
 import { endpoints, fetcher } from 'src/utils/axios';
@@ -44,22 +44,2 @@
   }
 }
-
-export async function updateCustomer(
-  id: string,
-  customerData: Partial<Customer>
-): Promise<Customer> {
-  try {
-    const response = await axios.patch<Customer>(`${endpoints.customer}/${id}`, customerData);
-
-    // Mutate the SWR cache to update the customer
-    await mutate<Customer[]>(endpoints.customer, (currentData = []) =>
-      currentData.map((customer) =>
-        customer.id === id ? { ...customer, ...response.data } : customer
-      )
-    );
-
-    return response.data;
-  } catch (error) {
-    throw error;
-  }
-}
Index: src/api/employee.ts
===================================================================
--- src/api/employee.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,45 +1,0 @@
-import { useMemo } from 'react';
-// types
-import { Employee } from 'src/schemas';
-// db
-import { endpoints, fetcher } from 'src/utils/axios';
-import axios from 'src/utils/axios';
-// swr
-import useSWR, { mutate } from 'swr';
-
-export function useGetEmployees() {
-  const collectionName = endpoints.employee;
-
-  const { data, isLoading, error, isValidating } = useSWR(collectionName, fetcher<Employee[]>, {
-    revalidateOnFocus: false,
-  });
-
-  const memoizedValue = useMemo(
-    () => ({
-      employees: data || [],
-      employeesLoading: isLoading,
-      employeesError: error,
-      employeesValidating: isValidating,
-      employeesEmpty: !isLoading && !data?.length,
-    }),
-    [data, error, isLoading, isValidating]
-  );
-
-  return memoizedValue;
-}
-
-export async function createEmployee(employeeData: Partial<Employee>): Promise<Employee> {
-  try {
-    const response = await axios.post<Employee>(endpoints.employee, employeeData);
-
-    // Mutate the SWR cache to include the new employee
-    await mutate<Employee[]>(endpoints.employee, (currentData = []) => [
-      ...currentData,
-      response.data,
-    ]);
-
-    return response.data;
-  } catch (error) {
-    throw error;
-  }
-}
Index: src/api/invoice.ts
===================================================================
--- src/api/invoice.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/api/invoice.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -1,11 +1,8 @@
 import { useMemo } from 'react';
 // types
-import { Invoice, UpdateInvoice } from 'src/schemas';
+import { Invoice } from 'mvpmasters-shared';
 // db
 import useSWR from 'swr';
 import { endpoints, fetcher } from 'src/utils/axios';
-import axios from 'src/utils/axios';
-import { mutate } from 'swr';
-import { useSWRConfig } from 'swr';
 
 interface InvoiceFilters {
@@ -54,102 +51,26 @@
 }
 
-export function useGetInvoice({ id }: { id: string }) {
-  const path = endpoints.invoice;
+// export function useGetInvoice({ id }: { id: string }) {
+//   const collectionName = collections.invoice;
 
-  const { data, isLoading, error, isValidating } = useSWR(
-    `${path}/${id}`,
-    () => fetcher<Invoice>(`${path}/${id}`),
-    {
-      revalidateOnFocus: false,
-    }
-  );
+//   const { data, isLoading, error, isValidating } = useSWR(
+//     [collectionName, id],
+//     () => documentFetcher<Invoice>(collectionName, id),
+//     {
+//       revalidateOnFocus: false,
+//     }
+//   );
 
-  const memoizedValue = useMemo(
-    () => ({
-      currentInvoice: data || null,
-      currentInvoiceLoading: isLoading,
-      currentInvoiceError: error,
-      currentInvoiceValidating: isValidating,
-      currentInvoiceEmpty: !isLoading && !data,
-    }),
-    [data, error, isLoading, isValidating]
-  );
+//   const memoizedValue = useMemo(
+//     () => ({
+//       currentInvoice: data || null,
+//       currentInvoiceLoading: isLoading,
+//       currentInvoiceError: error,
+//       currentInvoiceValidating: isValidating,
+//       currentInvoiceEmpty: !isLoading && !data,
+//     }),
+//     [data, error, isLoading, isValidating]
+//   );
 
-  return memoizedValue;
-}
-
-// Add this interface for the create invoice payload
-interface CreateInvoicePayload {
-  issueDate: Date;
-  dueDate: Date;
-  items: any[];
-  invoiceNumber: string;
-  invoiceFrom: any;
-  invoiceTo: any;
-  currency: string;
-  quantityType: string;
-  month: string;
-  status?: string;
-  taxes?: number;
-  discount?: number;
-  totalAmount: number;
-  pdfRef?: string;
-}
-
-export async function createInvoice(data: CreateInvoicePayload): Promise<Invoice> {
-  const response = await axios.post<Invoice>(endpoints.invoice, data);
-
-  // Mutate the SWR cache to include the new invoice
-  await mutate(
-    endpoints.invoice,
-    (existingInvoices: Invoice[] = []) => [response.data, ...existingInvoices],
-    false // Set to false to avoid revalidation since we already have the new data
-  );
-
-  return response.data;
-}
-
-export async function updateInvoice(id: string, data: Partial<UpdateInvoice>) {
-  const response = await axios.patch<Invoice>(`${endpoints.invoice}/${id}`, data);
-
-  // Mutate the individual invoice cache
-  await mutate(`${endpoints.invoice}/${id}`, response.data, false);
-
-  // Mutate the invoice list cache
-  await mutate(
-    endpoints.invoice,
-    (existingInvoices: Invoice[] = []) =>
-      existingInvoices.map((invoice) => (invoice.id === id ? response.data : invoice)),
-    false
-  );
-
-  return response.data;
-}
-
-export async function deleteInvoice(id: string) {
-  const response = await axios.delete<Invoice>(`${endpoints.invoice}/${id}`);
-
-  // Mutate the invoice list cache to remove the deleted invoice
-  await mutate(
-    endpoints.invoice,
-    (existingInvoices: Invoice[] = []) => existingInvoices.filter((invoice) => invoice.id !== id),
-    false
-  );
-
-  return response.data;
-}
-
-// Update the useDeleteInvoice hook to use the new implementation
-export function useDeleteInvoice() {
-  const deleteInvoiceMutation = async (id: string) => {
-    try {
-      await deleteInvoice(id);
-      return true;
-    } catch (error) {
-      console.error('Error deleting invoice:', error);
-      throw error;
-    }
-  };
-
-  return { deleteInvoiceMutation };
-}
+//   return memoizedValue;
+// }
Index: src/api/invoice/index.ts
===================================================================
--- src/api/invoice/index.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,1 +1,0 @@
-export * from './use-fetch-analytics';
Index: src/api/invoice/use-fetch-analytics.ts
===================================================================
--- src/api/invoice/use-fetch-analytics.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,45 +1,0 @@
-import useSWR from 'swr';
-import axios from 'src/utils/axios';
-import { InvoiceStatus } from 'src/schemas';
-
-interface StatusTotals {
-  EUR: number;
-  USD: number;
-}
-
-export interface AnalyticsResults {
-  total: StatusTotals;
-  processing: StatusTotals;
-  paid: StatusTotals;
-  pending: StatusTotals;
-  overdue: StatusTotals;
-  draft: StatusTotals;
-}
-
-async function fetchAnalytics(startDate: Date) {
-  const { data } = await axios.get<AnalyticsResults>('/api/invoices/totals', {
-    params: { startDate: startDate.toISOString() },
-    withCredentials: true,
-    headers: {
-      'Content-Type': 'application/json',
-    },
-  });
-  return data;
-}
-
-export function useFetchAnalytics(startDate: Date | null) {
-  const { data, error, isLoading } = useSWR(
-    startDate ? ['invoiceTotals', startDate] : null,
-    () => startDate && fetchAnalytics(startDate),
-    {
-      revalidateOnFocus: false,
-      shouldRetryOnError: false,
-    }
-  );
-
-  return {
-    analytics: data,
-    analyticsError: error,
-    isAnalyticsLoading: isLoading,
-  };
-}
Index: src/api/service.ts
===================================================================
--- src/api/service.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/api/service.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -1,17 +1,16 @@
 import { useMemo } from 'react';
 // types
-import { Service } from 'src/schemas';
+import { Service } from 'mvpmasters-shared';
+// db
+import { collections, collectionFetcher as fetcher } from 'src/lib/firestore';
 // swr
 import useSWR from 'swr';
-import { endpoints, fetcher } from 'src/utils/axios';
 
 export function useGetServices() {
-  const { data, isLoading, error, isValidating } = useSWR<Service[]>(
-    endpoints.service,
-    () => fetcher<Service[]>(endpoints.service),
-    {
-      revalidateOnFocus: false,
-    }
-  );
+  const collectionName = collections.service;
+
+  const { data, isLoading, error, isValidating } = useSWR(collectionName, fetcher<Service>, {
+    revalidateOnFocus: false,
+  });
 
   const memoizedValue = useMemo(
Index: src/api/settings.ts
===================================================================
--- src/api/settings.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/api/settings.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -0,0 +1,40 @@
+import { useMemo } from 'react';
+// types
+import { Settings } from 'src/types/settings';
+// db
+import { collections, collectionFetcher as fetcher } from 'src/lib/firestore';
+// swr
+import useSWR from 'swr';
+
+export function useGetSettings() {
+  const collectionName = collections.settings;
+
+  const { data, isLoading, error, isValidating } = useSWR(collectionName, fetcher<Settings>, {
+    revalidateOnFocus: false,
+  });
+
+  const dataObject = transformArrayToObject(data);
+
+  const memoizedValue = useMemo(
+    () => ({
+      settings: dataObject || null,
+      settingsLoading: isLoading,
+      settingsError: error,
+      settingsValidating: isValidating,
+      settingsEmpty: !isLoading && !dataObject,
+    }),
+    [dataObject, error, isLoading, isValidating]
+  );
+
+  return memoizedValue;
+}
+
+const transformArrayToObject = (data?: Settings[]): Settings | undefined => {
+  if (!data) return undefined;
+
+  return data.reduce((accumulator: Settings, doc) => {
+    const { id, ...fields } = doc;
+    accumulator[id as keyof Settings] = fields;
+    return accumulator;
+  }, {} as Settings);
+};
Index: src/api/tenant.ts
===================================================================
--- src/api/tenant.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,23 +1,0 @@
-import { useMemo } from 'react';
-import { Tenant } from 'src/schemas';
-import { endpoints, fetcher } from 'src/utils/axios';
-import useSWR from 'swr';
-
-export function useGetTenant() {
-  const { data, isLoading, error, isValidating } = useSWR(endpoints.tenant, fetcher<Tenant>, {
-    revalidateOnFocus: false,
-  });
-
-  const memoizedValue = useMemo(
-    () => ({
-      settings: data || null,
-      settingsLoading: isLoading,
-      settingsError: error,
-      settingsValidating: isValidating,
-      settingsEmpty: !isLoading && !data,
-    }),
-    [data, error, isLoading, isValidating]
-  );
-
-  return memoizedValue;
-}
Index: src/api/user.ts
===================================================================
--- src/api/user.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,7 +1,0 @@
-import { AuthUserType } from 'src/auth/types';
-import axiosInstance from 'src/utils/axios';
-
-export async function getUser(): Promise<AuthUserType> {
-  const response = await axiosInstance.get('/api/user');
-  return response.data;
-}
Index: src/app/api/clients/summary/route.ts
===================================================================
--- src/app/api/clients/summary/route.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,51 +1,0 @@
-import { NextRequest, NextResponse } from 'next/server';
-import prisma from 'src/lib/prisma';
-import { authenticateRequest } from 'src/lib/auth-middleware';
-
-// Simple API endpoint using SQL VIEWs
-export async function GET(request: NextRequest) {
-  try {
-    // Authenticate the request
-    const authResult = await authenticateRequest(request);
-    if (authResult instanceof NextResponse) {
-      return authResult;
-    }
-    const { userId, tenantId } = authResult;
-
-    // Use the comprehensive client financial summary view
-    const clientSummary = await prisma.$queryRaw`
-      SELECT 
-        client_name,
-        client_email,
-        client_status,
-        total_invoices,
-        paid_invoices,
-        pending_invoices,
-        overdue_invoices,
-        total_invoiced,
-        total_paid,
-        total_outstanding,
-        total_overdue,
-        average_invoice_amount,
-        risk_level,
-        payment_behavior
-      FROM v_client_financial_summary
-      WHERE tenant_id = ${tenantId}
-      ORDER BY total_invoiced DESC
-    `;
-
-    return NextResponse.json({
-      success: true,
-      data: clientSummary,
-      message: 'Client summary using SQL VIEW',
-    });
-  } catch (error) {
-    console.error('Error fetching client summary:', error);
-    return NextResponse.json(
-      {
-        error: 'Internal Server Error',
-      },
-      { status: 500 }
-    );
-  }
-}
Index: src/app/api/customers/[id]/route.ts
===================================================================
--- src/app/api/customers/[id]/route.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/app/api/customers/[id]/route.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -1,4 +1,4 @@
 import { NextRequest, NextResponse } from 'next/server';
-import { customerSchema } from 'src/schemas';
+import { customerSchema } from 'mvpmasters-shared';
 import prisma from 'src/lib/prisma';
 import { authenticateRequest } from 'src/lib/auth-middleware';
@@ -6,22 +6,15 @@
 export async function PATCH(request: NextRequest, { params }: { params: { id: string } }) {
   try {
-    const auth = await authenticateRequest(request);
-    if (!auth || auth instanceof NextResponse) {
+    const userId = await authenticateRequest(request);
+    if (!userId) {
       return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
     }
-
-    const { userId, tenantId } = auth;
 
     const body = await request.json();
     const validatedData = customerSchema.partial().parse(body);
 
-    console.log('validatedData', validatedData);
-
-    const customer = await prisma.client.update({
-      where: { id: params.id },
-      data: {
-        ...validatedData,
-        tenantId,
-      },
+    const customer = await prisma.customer.update({
+      where: { id: params.id, userId },
+      data: validatedData,
     });
 
Index: src/app/api/customers/route.ts
===================================================================
--- src/app/api/customers/route.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/app/api/customers/route.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -1,7 +1,6 @@
 import { NextRequest, NextResponse } from 'next/server';
-import { customerTableFiltersSchema, newCustomerSchema } from 'src/schemas';
+import { customerTableFiltersSchema, newCustomerSchema } from 'mvpmasters-shared';
 import prisma from 'src/lib/prisma';
 import { authenticateRequest } from 'src/lib/auth-middleware';
-import { Prisma, ClientStatus } from '@prisma/client';
 
 export async function GET(request: NextRequest) {
@@ -12,5 +11,5 @@
       return authResult;
     }
-    const { userId, tenantId } = authResult;
+    const { userId } = authResult;
 
     const searchParams = request.nextUrl.searchParams;
@@ -24,31 +23,14 @@
     const validatedFilters = customerTableFiltersSchema.parse(filters);
 
-    //   const customers = await prisma.$queryRaw`
-    //   SELECT * FROM "Client"
-    //   WHERE "tenant_id" = ${tenantId}
-    //     AND LOWER(name) LIKE LOWER(${`%${validatedFilters.name}%`})
-    //     ${
-    //       validatedFilters.status
-    //         ? Prisma.sql`AND status = ${validatedFilters.status}::"CustomerStatus"`
-    //         : Prisma.sql`AND TRUE`
-    //     }
-    // `;
-
-    const customers = await prisma.client.findMany({
+    const customers = await prisma.customer.findMany({
       where: {
-        tenantId,
-        name: {
-          contains: validatedFilters.name,
-          mode: 'insensitive',
-        },
-        ...(validatedFilters.status && {
-          status: validatedFilters.status as ClientStatus,
-        }),
+        name: { contains: validatedFilters.name, mode: 'insensitive' },
+        status: validatedFilters.status ? { equals: validatedFilters.status } : undefined,
       },
     });
+    console.log('customers', customers);
 
     return NextResponse.json(customers);
   } catch (error) {
-    console.error('Error fetching customers:', error);
     return NextResponse.json({ error: 'Internal Server Error' }, { status: 500 });
   }
@@ -62,5 +44,5 @@
       return authResult;
     }
-    const { userId, tenantId } = authResult;
+    const { userId } = authResult;
 
     const body = await request.json();
@@ -68,8 +50,8 @@
     console.log('validatedData', validatedData);
 
-    const customer = await prisma.client.create({
+    const customer = await prisma.customer.create({
       data: {
         ...validatedData,
-        tenantId,
+        // userId,
       },
     });
Index: src/app/api/employees/route.ts
===================================================================
--- src/app/api/employees/route.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,68 +1,0 @@
-import { NextRequest, NextResponse } from 'next/server';
-import { employeeTableFiltersSchema, newEmployeeSchema } from 'src/schemas';
-import prisma from 'src/lib/prisma';
-import { authenticateRequest } from 'src/lib/auth-middleware';
-import { Prisma } from '@prisma/client';
-
-export async function GET(request: NextRequest) {
-  try {
-    // Authenticate the request
-    const authResult = await authenticateRequest(request);
-    if (authResult instanceof NextResponse) {
-      return authResult;
-    }
-    const { userId, tenantId } = authResult;
-
-    const searchParams = request.nextUrl.searchParams;
-    const filters = {
-      name: searchParams.get('name') || '',
-      status: searchParams.get('status') || '',
-    };
-
-    // Validate filters
-    const validatedFilters = employeeTableFiltersSchema.parse(filters);
-
-    // Replace Prisma query with raw SQL
-    const employees = await prisma.$queryRaw`
-      SELECT * FROM "Employee"
-      WHERE "tenantId" = ${tenantId}
-        AND LOWER(name) LIKE LOWER(${`%${validatedFilters.name}%`})
-        ${
-          validatedFilters.status
-            ? Prisma.sql`AND status = ${validatedFilters.status}:::"EmployeeStatus"`
-            : Prisma.sql`AND TRUE`
-        }
-    `;
-
-    return NextResponse.json(employees);
-  } catch (error) {
-    console.error('Error fetching employees:', error);
-    return NextResponse.json({ error: 'Internal Server Error' }, { status: 500 });
-  }
-}
-
-export async function POST(request: NextRequest) {
-  try {
-    // Authenticate the request
-    const authResult = await authenticateRequest(request);
-    if (authResult instanceof NextResponse) {
-      return authResult;
-    }
-    const { userId, tenantId } = authResult;
-
-    const body = await request.json();
-    const validatedData = newEmployeeSchema.parse(body);
-
-    const employee = await prisma.employee.create({
-      data: {
-        ...validatedData,
-        tenantId,
-      },
-    });
-
-    return NextResponse.json(employee, { status: 201 });
-  } catch (error) {
-    console.error('Error creating employee:', error);
-    return NextResponse.json({ error: 'Internal Server Error' }, { status: 500 });
-  }
-}
Index: src/app/api/invoices/[id]/route.ts
===================================================================
--- src/app/api/invoices/[id]/route.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/app/api/invoices/[id]/route.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -1,16 +1,10 @@
 import { NextRequest, NextResponse } from 'next/server';
-import { updateInvoiceSchema } from 'src/schemas';
+import { invoiceSchema } from 'mvpmasters-shared';
 import prisma from 'src/lib/prisma';
 import { authenticateRequest } from 'src/lib/auth-middleware';
-import { Prisma } from '@prisma/client';
 
-export async function GET(request: NextRequest, { params }: { params: { id: string } }) {
+export async function PATCH(request: NextRequest, { params }: { params: { id: string } }) {
   try {
-    // Validate ID format
-    if (!params.id || !/^[0-9a-fA-F-]+$/.test(params.id)) {
-      return NextResponse.json({ error: 'Invalid invoice ID format' }, { status: 400 });
-    }
-
-    // Authenticate request
+    // Authenticate the request
     const authResult = await authenticateRequest(request);
     if (authResult instanceof NextResponse) {
@@ -19,181 +13,32 @@
     const { userId } = authResult;
 
-    // Fetch invoice with user check
-    const invoice = await prisma.invoice.findFirst({
-      where: {
-        id: params.id,
-        // invoiceFromId: userId,
+    const body = await request.json();
+    const validatedData = invoiceSchema.partial().parse(body);
+
+    const invoice = await prisma.invoice.update({
+      where: { id: params.id, userId },
+      data: {
+        ...validatedData,
+        items: validatedData.items
+          ? {
+              deleteMany: {},
+              create: validatedData.items,
+            }
+          : undefined,
       },
       include: {
+        items: {
+          include: {
+            service: true,
+          },
+        },
         invoiceFrom: true,
         invoiceTo: true,
-        items: true,
       },
     });
 
-    if (!invoice) {
-      return NextResponse.json({ error: 'Invoice not found or access denied' }, { status: 404 });
-    }
-
     return NextResponse.json(invoice);
   } catch (error) {
-    console.error('Error fetching invoice:', error);
-
-    if (error instanceof Prisma.PrismaClientKnownRequestError) {
-      return NextResponse.json({ error: 'Database error occurred' }, { status: 500 });
-    }
-
-    return NextResponse.json({ error: 'Internal server error' }, { status: 500 });
+    return NextResponse.json({ error: 'Internal Server Error' }, { status: 500 });
   }
 }
-
-export async function PATCH(request: NextRequest, { params }: { params: { id: string } }) {
-  try {
-    // Validate ID format
-    if (!params.id || !/^[0-9a-fA-F-]+$/.test(params.id)) {
-      return NextResponse.json({ error: 'Invalid invoice ID format' }, { status: 400 });
-    }
-
-    // Authenticate request
-    const authResult = await authenticateRequest(request);
-    if (authResult instanceof NextResponse) {
-      return authResult;
-    }
-    const { userId } = authResult;
-
-    // Parse and validate request body
-    const body = await request.json();
-
-    const validation = updateInvoiceSchema.partial().safeParse(body);
-
-    if (!validation.success) {
-      return NextResponse.json(
-        { error: 'Invalid invoice data', details: validation.error.format() },
-        { status: 400 }
-      );
-    }
-
-    // Verify invoice exists and belongs to user
-    const existingInvoice = await prisma.invoice.findFirst({
-      where: {
-        id: params.id,
-        // invoiceFromId: userId,
-      },
-    });
-
-    if (!existingInvoice) {
-      return NextResponse.json({ error: 'Invoice not found or access denied' }, { status: 404 });
-    }
-
-    // Update invoice and related data
-    const updatedInvoice = await prisma.$transaction(async (tx) => {
-      // Conditionally delete and recreate items only if they are provided
-      if (validation.data.items) {
-        await tx.lineItem.deleteMany({
-          where: { invoiceId: params.id },
-        });
-      }
-
-      // Update the invoice and create new items if provided
-      return tx.invoice.update({
-        where: { id: params.id },
-        data: {
-          invoiceNumber: validation.data.invoiceNumber,
-          issueDate: validation.data.issueDate,
-          dueDate: validation.data.dueDate,
-          status: validation.data.status,
-          currency: validation.data.currency,
-          quantityType: validation.data.quantityType,
-          subTotal: validation.data.subTotal,
-          month: validation.data.month,
-          totalAmount: validation.data.totalAmount,
-          discount: validation.data.discount,
-          taxes: validation.data.taxes,
-          pdfRef: validation.data.pdfRef,
-          invoiceTo: {
-            update: validation.data.invoiceTo,
-          },
-          items: validation.data.items
-            ? {
-                create: validation.data.items.map((item) => ({
-                  ...item,
-                  service: {
-                    connect: { id: item.service.id },
-                  },
-                })),
-              }
-            : undefined,
-        },
-        include: {
-          invoiceFrom: true,
-          invoiceTo: true,
-          items: true,
-        },
-      });
-    });
-
-    return NextResponse.json(updatedInvoice);
-  } catch (error) {
-    console.error('Error updating invoice:', error);
-
-    if (error instanceof Prisma.PrismaClientKnownRequestError) {
-      return NextResponse.json({ error: 'Database error occurred' }, { status: 500 });
-    }
-
-    return NextResponse.json({ error: 'Internal server error' }, { status: 500 });
-  }
-}
-
-export async function DELETE(request: NextRequest, { params }: { params: { id: string } }) {
-  try {
-    // Validate ID format
-    if (!params.id || !/^[0-9a-fA-F-]+$/.test(params.id)) {
-      return NextResponse.json({ error: 'Invalid invoice ID format' }, { status: 400 });
-    }
-
-    // Authenticate request
-    const authResult = await authenticateRequest(request);
-    if (authResult instanceof NextResponse) {
-      return authResult;
-    }
-    const { userId } = authResult;
-    console.log('userId', userId);
-
-    // Verify invoice exists and belongs to user
-    const existingInvoice = await prisma.invoice.findFirst({
-      where: {
-        id: params.id,
-      },
-    });
-
-    if (!existingInvoice) {
-      return NextResponse.json({ error: 'Invoice not found or access denied' }, { status: 404 });
-    }
-
-    // Delete invoice and related items in a transaction
-    await prisma.$transaction(async (tx) => {
-      // Delete related items first
-      await tx.lineItem.deleteMany({
-        where: { invoiceId: params.id },
-      });
-
-      // Delete the invoice
-      await tx.invoice.delete({
-        where: { id: params.id },
-      });
-    });
-
-    return NextResponse.json({ message: 'Invoice deleted successfully' }, { status: 200 });
-  } catch (error) {
-    console.error('Error deleting invoice:', error);
-
-    if (error instanceof Prisma.PrismaClientKnownRequestError) {
-      if (error.code === 'P2025') {
-        return NextResponse.json({ error: 'Invoice not found' }, { status: 404 });
-      }
-      return NextResponse.json({ error: 'Database error occurred' }, { status: 500 });
-    }
-
-    return NextResponse.json({ error: 'Internal server error' }, { status: 500 });
-  }
-}
Index: src/app/api/invoices/route.ts
===================================================================
--- src/app/api/invoices/route.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/app/api/invoices/route.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -1,7 +1,6 @@
 import { NextRequest, NextResponse } from 'next/server';
-import { createInvoiceSchema, invoiceSchema, invoiceTableFiltersSchema } from 'src/schemas';
+import { invoiceSchema, invoiceTableFiltersSchema } from 'mvpmasters-shared';
 import prisma from 'src/lib/prisma';
 import { auth } from 'src/lib/firebase-admin';
-import { InvoiceStatus } from '@prisma/client';
 
 // Helper function to get userId from Authorization header
@@ -24,7 +23,7 @@
   try {
     const userId = await getUserId(request);
-    // if (!userId) {
-    //   return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
-    // }
+    if (!userId) {
+      return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
+    }
 
     const searchParams = request.nextUrl.searchParams;
@@ -42,10 +41,9 @@
     const invoices = await prisma.invoice.findMany({
       where: {
-        status: validatedFilters.status
-          ? { equals: validatedFilters.status as InvoiceStatus }
-          : undefined,
-        issueDate: {
-          ...(validatedFilters.startDate && { gte: validatedFilters.startDate }),
-          ...(validatedFilters.endDate && { lte: validatedFilters.endDate }),
+        userId,
+        status: validatedFilters.status ? { equals: validatedFilters.status } : undefined,
+        createDate: {
+          gte: validatedFilters.startDate,
+          lte: validatedFilters.endDate,
         },
         items:
@@ -74,57 +72,17 @@
   try {
     const userId = await getUserId(request);
-    // if (!userId) {
-    //   return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
-    // }
+    if (!userId) {
+      return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
+    }
 
     const body = await request.json();
-    const validatedData = createInvoiceSchema.parse(body);
-
-    const tenant = await prisma.tenant.findUnique({
-      where: { id: validatedData.invoiceFrom.id },
-    });
-
-    const toCustomer = await prisma.client.findUnique({
-      where: { id: validatedData.invoiceTo.id },
-    });
-
-    if (!tenant || !toCustomer) {
-      return NextResponse.json({ error: 'Invoice sender or recipient not found' }, { status: 404 });
-    }
-
-    // Update lastInvoiceNumber in tenant
-    const updatedTenant = await prisma.tenant.update({
-      where: { id: tenant.id },
-      data: {
-        lastInvoiceNumber: validatedData.invoiceNumber,
-      },
-    });
+    const validatedData = invoiceSchema.parse(body);
 
     const invoice = await prisma.invoice.create({
       data: {
-        dueDate: validatedData.dueDate,
-        status: validatedData.status,
-        currency: validatedData.currency,
-        quantityType: validatedData.quantityType,
-        subTotal: validatedData.subTotal,
-        issueDate: validatedData.issueDate,
-        month: validatedData.month,
-        discount: validatedData.discount,
-        taxes: validatedData.taxes,
-        totalAmount: validatedData.totalAmount,
-        invoiceNumber: validatedData.invoiceNumber,
-        invoiceFromId: tenant.id,
-        invoiceToId: toCustomer.id,
+        ...validatedData,
+        userId,
         items: {
-          create: validatedData.items.map((item) => ({
-            title: item.title,
-            price: item.price,
-            total: item.total,
-            quantity: item.quantity,
-            description: item.description,
-            service: {
-              connect: { id: item.service.id },
-            },
-          })),
+          create: validatedData.items,
         },
       },
@@ -142,5 +100,4 @@
     return NextResponse.json(invoice, { status: 201 });
   } catch (error) {
-    console.error(error);
     return NextResponse.json({ error: 'Internal Server Error' }, { status: 500 });
   }
Index: src/app/api/invoices/totals/route.ts
===================================================================
--- src/app/api/invoices/totals/route.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,71 +1,0 @@
-import { NextRequest, NextResponse } from 'next/server';
-import prisma from 'src/lib/prisma';
-import { authenticateRequest } from 'src/lib/auth-middleware';
-
-type InvoiceStatus = 'processing' | 'paid' | 'pending' | 'overdue' | 'draft';
-type CurrencyTotals = { EUR: number; USD: number };
-type Results = Record<InvoiceStatus | 'total', CurrencyTotals>;
-
-export async function GET(request: NextRequest) {
-  try {
-    // Authenticate the request
-    const authResult = await authenticateRequest(request);
-
-    if (!authResult || authResult instanceof NextResponse) {
-      return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
-    }
-
-    const { userId, tenantId } = authResult;
-
-    const searchParams = request.nextUrl.searchParams;
-    const startDate = searchParams.get('startDate')
-      ? new Date(searchParams.get('issueDate')!)
-      : null;
-
-    if (!startDate) {
-      return NextResponse.json({ error: 'Start date is required' }, { status: 400 });
-    }
-
-    // Calculate totals using the business intelligence view
-    const totals = await prisma.$queryRaw`
-      SELECT 
-        invoice_status as status,
-        invoice_currency as currency,
-        SUM(invoice_total_amount) as total
-      FROM v_invoice_analytics
-      WHERE invoice_issue_date >= ${startDate}
-        AND tenant_id = ${tenantId}
-      GROUP BY invoice_status, invoice_currency
-    `;
-
-    // Format the response
-    const results: Results = {
-      total: { EUR: 0, USD: 0 },
-      processing: { EUR: 0, USD: 0 },
-      paid: { EUR: 0, USD: 0 },
-      pending: { EUR: 0, USD: 0 },
-      overdue: { EUR: 0, USD: 0 },
-      draft: { EUR: 0, USD: 0 },
-    };
-
-    // Process the results - adjusted for raw SQL response format
-    for (const row of totals as {
-      status: string;
-      currency: 'EUR' | 'USD';
-      total: string | number;
-    }[]) {
-      const { status, currency, total } = row;
-      const statusKey = status.toLowerCase() as InvoiceStatus;
-      if (statusKey in results && (currency === 'EUR' || currency === 'USD')) {
-        const amount = Number(total) || 0;
-        results[statusKey][currency] = amount;
-        results.total[currency] += amount;
-      }
-    }
-
-    return NextResponse.json(results);
-  } catch (error) {
-    console.error('Error calculating totals:', error);
-    return NextResponse.json({ error: 'Internal Server Error' }, { status: 500 });
-  }
-}
Index: src/app/api/services/route.ts
===================================================================
--- src/app/api/services/route.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,11 +1,0 @@
-import prisma from 'src/lib/prisma';
-import { NextResponse } from 'next/server';
-
-export async function GET() {
-  try {
-    const services = await prisma.service.findMany();
-    return NextResponse.json(services);
-  } catch (error) {
-    return NextResponse.json({ error: 'Failed to fetch services' }, { status: 500 });
-  }
-}
Index: src/app/api/tenant/route.ts
===================================================================
--- src/app/api/tenant/route.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,74 +1,0 @@
-import { NextRequest, NextResponse } from 'next/server';
-import prisma from 'src/lib/prisma';
-import { tenantSchema } from 'src/schemas';
-import { z } from 'zod';
-import { authenticateRequest } from 'src/lib/auth-middleware';
-
-export async function GET(request: NextRequest) {
-  try {
-    const auth = await authenticateRequest(request);
-    if (auth instanceof NextResponse) {
-      return auth; // Return error response if authentication failed
-    }
-    const { tenantId } = auth;
-
-    const tenant = await prisma.tenant.findUnique({
-      where: { id: tenantId },
-    });
-
-    if (!tenant) {
-      return NextResponse.json({ error: 'No tenant found' }, { status: 404 });
-    }
-
-    return NextResponse.json(tenant);
-  } catch (error) {
-    console.error('Error fetching tenant:', error);
-    return NextResponse.json({ error: 'Failed to fetch tenant' }, { status: 500 });
-  }
-}
-
-export async function POST(request: NextRequest) {
-  try {
-    const auth = await authenticateRequest(request);
-    if (auth instanceof NextResponse) {
-      return auth;
-    }
-    const { tenantId } = auth;
-
-    const body = await request.json();
-
-    // Validate request body
-    const validatedData = tenantSchema.parse(body);
-
-    // Check if tenant already exists
-    const existingTenant = await prisma.tenant.findUnique({
-      where: {
-        id: tenantId,
-      },
-    });
-
-    if (existingTenant) {
-      return NextResponse.json({ error: 'Tenant already exists' }, { status: 400 });
-    }
-
-    // Create new tenant with the authenticated tenantId
-    const tenant = await prisma.tenant.create({
-      data: {
-        ...validatedData,
-        id: tenantId, // Ensure the tenant is created with the authenticated tenantId
-      },
-    });
-
-    return NextResponse.json(tenant, { status: 201 });
-  } catch (error) {
-    if (error instanceof z.ZodError) {
-      return NextResponse.json(
-        { error: 'Invalid request data', details: error.errors },
-        { status: 400 }
-      );
-    }
-
-    console.error('Error creating tenant:', error);
-    return NextResponse.json({ error: 'Failed to create tenant' }, { status: 500 });
-  }
-}
Index: src/app/api/user/route.ts
===================================================================
--- src/app/api/user/route.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,30 +1,0 @@
-import { NextResponse } from 'next/server';
-import { authenticateRequest } from 'src/lib/auth-middleware';
-import { type NextRequest } from 'next/server';
-import prisma from 'src/lib/prisma';
-
-export async function GET(request: NextRequest) {
-  try {
-    const authResult = await authenticateRequest(request);
-
-    if (authResult instanceof NextResponse) {
-      return authResult;
-    }
-
-    // Get user from Prisma
-    const user = await prisma.user.findUnique({
-      where: {
-        id: authResult.userId,
-      },
-    });
-
-    if (!user) {
-      return NextResponse.json({ error: 'User not found' }, { status: 404 });
-    }
-
-    return NextResponse.json(user);
-  } catch (error) {
-    console.error(error);
-    return NextResponse.json({ error: 'Internal server error' }, { status: 500 });
-  }
-}
Index: src/app/dashboard/customer/list/page.tsx
===================================================================
--- src/app/dashboard/customer/list/page.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/app/dashboard/customer/list/page.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -1,4 +1,4 @@
 // sections
-import { CustomerListView } from 'src/sections/client/view';
+import { CustomerListView } from 'src/sections/user/view';
 
 // ----------------------------------------------------------------------
Index: src/app/dashboard/customer/new/page.tsx
===================================================================
--- src/app/dashboard/customer/new/page.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/app/dashboard/customer/new/page.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -1,4 +1,4 @@
 // sections
-import { CustomerCreateView } from 'src/sections/client/view';
+import { CustomerCreateView } from 'src/sections/user/view';
 
 // ----------------------------------------------------------------------
Index: src/app/dashboard/employee/list/page.tsx
===================================================================
--- src/app/dashboard/employee/list/page.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,9 +1,0 @@
-'use client';
-
-import { EmployeeListView } from 'src/sections/employee/view';
-
-// ----------------------------------------------------------------------
-
-export default function EmployeeListPage() {
-  return <EmployeeListView />;
-}
Index: src/app/dashboard/employee/new/page.tsx
===================================================================
--- src/app/dashboard/employee/new/page.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,9 +1,0 @@
-'use client';
-
-import { EmployeeCreateView } from 'src/sections/employee/view';
-
-// ----------------------------------------------------------------------
-
-export default function EmployeeCreatePage() {
-  return <EmployeeCreateView />;
-}
Index: src/app/error.tsx
===================================================================
--- src/app/error.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,28 +1,0 @@
-'use client';
-
-import { useEffect } from 'react';
-
-export default function Error({
-  error,
-  reset,
-}: {
-  error: Error & { digest?: string };
-  reset: () => void;
-}) {
-  useEffect(() => {
-    // Log the error to your error reporting service
-    console.error(error);
-  }, [error]);
-
-  return (
-    <div className="flex min-h-screen flex-col items-center justify-center">
-      <h2 className="text-2xl font-bold mb-4">Something went wrong!</h2>
-      <button
-        className="px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600"
-        onClick={() => reset()}
-      >
-        Try again
-      </button>
-    </div>
-  );
-}
Index: src/app/loading.tsx
===================================================================
--- src/app/loading.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/app/loading.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -7,8 +7,4 @@
 
 export default function Loading() {
-  return (
-    <div className="flex min-h-screen items-center justify-center">
-      <div className="animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-blue-500"></div>
-    </div>
-  );
+  return <SplashScreen />;
 }
Index: src/app/not-found.tsx
===================================================================
--- src/app/not-found.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/app/not-found.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -1,5 +1,4 @@
 // sections
 import { NotFoundView } from 'src/sections/error';
-import Link from 'next/link';
 
 // ----------------------------------------------------------------------
@@ -9,13 +8,5 @@
 };
 
-export default function NotFound() {
-  return (
-    <div className="flex min-h-screen flex-col items-center justify-center">
-      <h2 className="text-2xl font-bold mb-4">Page Not Found</h2>
-      <p className="mb-4">Could not find requested resource</p>
-      <Link href="/" className="px-4 py-2 bg-blue-500 text-white rounded hover:bg-blue-600">
-        Return Home
-      </Link>
-    </div>
-  );
+export default function NotFoundPage() {
+  return <NotFoundView />;
 }
Index: src/auth/context/firebase/auth-provider.tsx
===================================================================
--- src/auth/context/firebase/auth-provider.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/auth/context/firebase/auth-provider.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -21,5 +21,4 @@
 import { AuthContext } from './auth-context';
 import { ActionMapType, AuthStateType, AuthUserType } from '../../types';
-import { getUser } from 'src/api/user';
 
 // ----------------------------------------------------------------------
@@ -72,23 +71,20 @@
         if (user) {
           if (user.emailVerified) {
-            try {
-              const profile = await getUser();
-              console.log('profile', profile);
-
-              dispatch({
-                type: Types.INITIAL,
-                payload: {
-                  user: { ...profile, emailVerified: user.emailVerified },
+            const userProfile = doc(db, collections.administrator, user.uid);
+
+            const docSnap = await getDoc(userProfile);
+
+            const profile = docSnap.data();
+
+            dispatch({
+              type: Types.INITIAL,
+              payload: {
+                user: {
+                  ...user,
+                  ...profile,
+                  id: user.uid,
                 },
-              });
-            } catch (error) {
-              console.error('Failed to fetch user profile:', error);
-              dispatch({
-                type: Types.INITIAL,
-                payload: {
-                  user: null,
-                },
-              });
-            }
+              },
+            });
           } else {
             dispatch({
@@ -149,12 +145,15 @@
   const register = useCallback(
     async (email: string, password: string, firstName: string, lastName: string) => {
-      // const newUser = await createUserWithEmailAndPassword(auth, email, password);
-      // await sendEmailVerification(newUser.user);
-      // const userProfile = doc(collection(db, collections.administrator), newUser.user?.uid);
-      // await setDoc(userProfile, {
-      //   uid: newUser.user?.uid,
-      //   email,
-      //   displayName: `${firstName} ${lastName}`,
-      // });
+      const newUser = await createUserWithEmailAndPassword(auth, email, password);
+
+      await sendEmailVerification(newUser.user);
+
+      const userProfile = doc(collection(db, collections.administrator), newUser.user?.uid);
+
+      await setDoc(userProfile, {
+        uid: newUser.user?.uid,
+        email,
+        displayName: `${firstName} ${lastName}`,
+      });
     },
     []
Index: src/layouts/dashboard/config-navigation.tsx
===================================================================
--- src/layouts/dashboard/config-navigation.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/layouts/dashboard/config-navigation.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -53,5 +53,5 @@
         items: [
           {
-            title: 'dashboard',
+            title: 'banking',
             path: paths.dashboard.banking,
             icon: ICONS.banking,
@@ -85,13 +85,4 @@
             ],
           },
-          {
-            title: 'Employees',
-            path: paths.dashboard.employee.list,
-            icon: <SvgColor src="/assets/icons/navbar/ic_user.svg" />,
-            children: [
-              { title: 'list', path: paths.dashboard.employee.list },
-              { title: 'create', path: paths.dashboard.employee.new },
-            ],
-          },
         ],
       },
Index: src/layouts/dashboard/nav-horizontal.tsx
===================================================================
--- src/layouts/dashboard/nav-horizontal.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/layouts/dashboard/nav-horizontal.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -41,5 +41,5 @@
           data={navData}
           config={{
-            currentRole: user?.role || 'ADMIN',
+            currentRole: user?.role || 'admin',
           }}
         />
Index: src/layouts/dashboard/nav-mini.tsx
===================================================================
--- src/layouts/dashboard/nav-mini.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/layouts/dashboard/nav-mini.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -51,5 +51,5 @@
           data={navData}
           config={{
-            currentRole: user?.role || 'ADMIN',
+            currentRole: user?.role || 'admin',
           }}
         />
Index: src/layouts/dashboard/nav-vertical.tsx
===================================================================
--- src/layouts/dashboard/nav-vertical.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/layouts/dashboard/nav-vertical.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -58,5 +58,5 @@
         data={navData}
         config={{
-          currentRole: user?.role || 'ADMIN',
+          currentRole: user?.role || 'admin',
         }}
       />
Index: src/lib/auth-middleware.ts
===================================================================
--- src/lib/auth-middleware.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/lib/auth-middleware.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -4,10 +4,9 @@
 export interface AuthenticatedRequest extends NextRequest {
   userId: string;
-  tenantId: string;
 }
 
 export async function authenticateRequest(
   request: NextRequest
-): Promise<{ userId: string; tenantId: string } | NextResponse> {
+): Promise<{ userId: string } | NextResponse> {
   // Get the authorization header
   const authHeader = request.headers.get('Authorization');
@@ -24,13 +23,10 @@
     const userId = decodedToken.uid;
 
-    const tenantId = decodedToken.customClaims?.tenantId || 'cm7lxc3p00000pb7kmdrxsfod';
-
-    if (!userId || !tenantId) {
+    if (!userId) {
       return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
     }
 
-    return { userId, tenantId: 'cm7lxc3p00000pb7kmdrxsfod' };
+    return { userId };
   } catch (error) {
-    console.error('Error verifying token:', error);
     return NextResponse.json({ error: 'Unauthorized' }, { status: 401 });
   }
Index: src/routes/paths.ts
===================================================================
--- src/routes/paths.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/routes/paths.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -34,10 +34,4 @@
       list: `${ROOTS.DASHBOARD}/customer/list`,
     },
-    employee: {
-      root: '/dashboard/employee',
-      list: '/dashboard/employee/list',
-      new: '/dashboard/employee/new',
-      edit: (id: string) => `/dashboard/employee/${id}/edit`,
-    },
   },
 };
Index: src/schemas/customer.ts
===================================================================
--- src/schemas/customer.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,71 +1,0 @@
-import { z } from 'zod';
-
-export const customerTableFilterValueSchema = z.union([z.string(), z.array(z.string())]);
-
-export const customerTableFiltersSchema = z.object({
-  name: z.string(),
-  role: z.array(z.string()),
-  status: z.string(),
-});
-
-export const addressSchema = z.object({
-  street: z.string(),
-  city: z.string().optional(),
-  country: z.string(),
-  state: z.string().optional(),
-  zip: z.string(),
-});
-
-export const bankAccountSchema = z.object({
-  accountNumber: z.string().optional(),
-  bicSwift: z.string().optional(),
-  iban: z.string().optional(),
-  routingNumber: z.string().optional(),
-});
-
-export const customerStatusSchema = z.union([
-  z.literal('active'),
-  z.literal('banned'),
-  z.literal('inactive'),
-]);
-
-export const customerSchema = z.object({
-  id: z.string().optional(),
-  tenantId: z.string(),
-  name: z.string(),
-  email: z.string(),
-  address: addressSchema,
-  logoUrl: z.string().optional(),
-  phoneNumber: z.string().optional(),
-  vatNumber: z.string().optional(),
-  companyNumber: z.string().optional(),
-  representative: z.string(),
-  status: customerStatusSchema.optional(),
-});
-
-export const tenantSchema = customerSchema
-  .omit({
-    tenantId: true,
-    status: true,
-  })
-  .extend({
-    lastInvoiceNumber: z.string(),
-  });
-
-export const newCustomerSchema = z.object({
-  tenantId: z.string().optional(),
-  name: z.string(),
-  email: z.string(),
-  address: addressSchema,
-  logoUrl: z.any().nullable().optional(),
-  phoneNumber: z.string().optional(),
-  vatNumber: z.string().optional(),
-  companyNumber: z.string().optional(),
-  representative: z.string(),
-  status: customerStatusSchema,
-});
-
-export const updateCustomerSchema = newCustomerSchema.omit({
-  tenantId: true,
-  status: true,
-});
Index: src/schemas/employee.ts
===================================================================
--- src/schemas/employee.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,29 +1,0 @@
-import { z } from 'zod';
-
-export const employeeTableFilterValueSchema = z.union([z.string(), z.array(z.string())]);
-
-export const employeeTableFiltersSchema = z.object({
-  name: z.string(),
-  status: z.string(),
-});
-
-export const employeeStatusSchema = z.union([z.literal('active'), z.literal('inactive')]);
-
-export const employeeSchema = z.object({
-  id: z.string().optional(),
-  name: z.string(),
-  email: z.string().email(),
-  status: employeeStatusSchema.optional(),
-  iban: z.string().optional(),
-  cv: z.string().optional(),
-  photo: z.string().optional(),
-  project: z.string().optional(),
-});
-
-export const newEmployeeSchema = employeeSchema
-  .omit({
-    id: true,
-  })
-  .extend({
-    status: employeeStatusSchema,
-  });
Index: src/schemas/index.ts
===================================================================
--- src/schemas/index.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,15 +1,0 @@
-export * from './customer';
-export * from './invoice';
-
-export * from './models/customer';
-export * from './models/invoice';
-export * from './models/employee';
-
-// If not already exported, also export the schemas
-export {
-  employeeSchema,
-  employeeStatusSchema,
-  employeeTableFilterValueSchema,
-  employeeTableFiltersSchema,
-  newEmployeeSchema,
-} from './employee';
Index: src/schemas/invoice.ts
===================================================================
--- src/schemas/invoice.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,98 +1,0 @@
-import { z } from 'zod';
-import { customerSchema, tenantSchema } from './customer';
-
-export const serviceSchema = z.object({
-  id: z.string(),
-  name: z.string(),
-  sprint: z.number(),
-  hour: z.number(),
-  month: z.number(),
-});
-
-export const invoiceTableFilterValueSchema = z
-  .union([z.string(), z.array(z.string()), z.date()])
-  .nullable();
-
-export const invoiceTableFiltersSchema = z.object({
-  name: z.string(),
-  service: z.array(z.string()),
-  status: z.string(),
-  startDate: z.date().nullable(),
-  endDate: z.date().nullable(),
-});
-
-export const invoiceItemSchema = z.object({
-  title: z.string(),
-  price: z.number(),
-  total: z.number(),
-  service: serviceSchema,
-  quantity: z.number(),
-  description: z.string(),
-});
-
-export const invoiceStatusSchema = z.union([
-  z.literal('draft'),
-  z.literal('processing'),
-  z.literal('pending'),
-  z.literal('overdue'),
-  z.literal('paid'),
-]);
-
-export const monthSchema = z.union([
-  z.literal('January'),
-  z.literal('February'),
-  z.literal('March'),
-  z.literal('April'),
-  z.literal('May'),
-  z.literal('June'),
-  z.literal('July'),
-  z.literal('August'),
-  z.literal('September'),
-  z.literal('October'),
-  z.literal('November'),
-  z.literal('December'),
-]);
-
-export const invoiceSchema = z.object({
-  id: z.string(),
-  sent: z.number().optional(),
-  dueDate: z.coerce.date(),
-  status: invoiceStatusSchema,
-  currency: z.union([z.literal('EUR'), z.literal('USD')]),
-  quantityType: z.union([
-    z.literal('Unit'),
-    z.literal('Hour'),
-    z.literal('Sprint'),
-    z.literal('Month'),
-  ]),
-  subTotal: z.number(),
-  issueDate: z.coerce.date(),
-  month: monthSchema,
-  discount: z.number().optional(),
-  taxes: z.number().optional(),
-  totalAmount: z.number(),
-  invoiceNumber: z.string(),
-  items: z.array(invoiceItemSchema),
-  invoiceFrom: tenantSchema,
-  invoiceTo: customerSchema,
-  pdfRef: z.string().optional(),
-});
-
-export const updateInvoiceSchema = invoiceSchema.omit({
-  id: true,
-  sent: true,
-});
-
-export const createInvoiceSchema = invoiceSchema.omit({
-  id: true,
-  sent: true,
-});
-
-export interface InvoiceFilters {
-  name: string;
-  service: string[];
-  status: string;
-  startDate: Date | null;
-  endDate: Date | null;
-  where?: [string, string, any][];
-}
Index: src/schemas/models/customer.ts
===================================================================
--- src/schemas/models/customer.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,21 +1,0 @@
-import { z } from 'zod';
-import {
-  addressSchema,
-  bankAccountSchema,
-  customerSchema,
-  customerStatusSchema,
-  customerTableFilterValueSchema,
-  customerTableFiltersSchema,
-  newCustomerSchema,
-  tenantSchema,
-} from '../customer';
-
-export type CustomerTableFilters = z.infer<typeof customerTableFiltersSchema>;
-export type CustomerTableFilterValue = z.infer<typeof customerTableFilterValueSchema>;
-
-export type Address = z.infer<typeof addressSchema>;
-export type BankAccount = z.infer<typeof bankAccountSchema>;
-export type CustomerStatus = z.infer<typeof customerStatusSchema>;
-export type Customer = z.infer<typeof customerSchema>;
-export type NewCustomer = z.infer<typeof newCustomerSchema>;
-export type Tenant = z.infer<typeof tenantSchema>;
Index: src/schemas/models/employee.ts
===================================================================
--- src/schemas/models/employee.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,15 +1,0 @@
-import { z } from 'zod';
-import {
-  employeeSchema,
-  employeeStatusSchema,
-  employeeTableFilterValueSchema,
-  employeeTableFiltersSchema,
-  newEmployeeSchema,
-} from '../employee';
-
-export type EmployeeTableFilters = z.infer<typeof employeeTableFiltersSchema>;
-export type EmployeeTableFilterValue = z.infer<typeof employeeTableFilterValueSchema>;
-
-export type EmployeeStatus = z.infer<typeof employeeStatusSchema>;
-export type Employee = z.infer<typeof employeeSchema>;
-export type NewEmployee = z.infer<typeof newEmployeeSchema>;
Index: src/schemas/models/invoice.ts
===================================================================
--- src/schemas/models/invoice.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,23 +1,0 @@
-import { z } from 'zod';
-import {
-  createInvoiceSchema,
-  invoiceItemSchema,
-  invoiceSchema,
-  invoiceStatusSchema,
-  invoiceTableFilterValueSchema,
-  invoiceTableFiltersSchema,
-  monthSchema,
-  serviceSchema,
-  updateInvoiceSchema,
-} from '../invoice';
-
-export type InvoiceTableFilterValue = z.infer<typeof invoiceTableFilterValueSchema>;
-export type InvoiceTableFilters = z.infer<typeof invoiceTableFiltersSchema>;
-
-export type Service = z.infer<typeof serviceSchema>;
-export type InvoiceItem = z.infer<typeof invoiceItemSchema>;
-export type InvoiceStatus = z.infer<typeof invoiceStatusSchema>;
-export type Month = z.infer<typeof monthSchema>;
-export type Invoice = z.infer<typeof invoiceSchema>;
-export type CreateInvoice = z.infer<typeof createInvoiceSchema>;
-export type UpdateInvoice = z.infer<typeof updateInvoiceSchema>;
Index: src/schemas/models/user.ts
===================================================================
--- src/schemas/models/user.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,7 +1,0 @@
-import { z } from 'zod';
-import { userSchema, userRoleSchema } from '../user';
-
-export type User = z.infer<typeof userSchema>;
-export type UserRole = z.infer<typeof userRoleSchema>;
-export type NewUser = Omit<User, 'id'>;
-export type UpdateUser = Omit<User, 'id' | 'uid' | 'tenantId'>;
Index: src/schemas/user.ts
===================================================================
--- src/schemas/user.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,26 +1,0 @@
-import { z } from 'zod';
-
-export const userRoleSchema = z.union([
-  z.literal('ADMIN'),
-  z.literal('MANAGER'),
-  z.literal('USER'),
-]);
-
-export const userSchema = z.object({
-  id: z.string().optional(),
-  uid: z.string(),
-  email: z.string().email(),
-  displayName: z.string(),
-  role: userRoleSchema,
-  tenantId: z.string(),
-});
-
-export const newUserSchema = userSchema.omit({
-  id: true,
-});
-
-export const updateUserSchema = userSchema.omit({
-  id: true,
-  uid: true,
-  tenantId: true,
-});
Index: src/sections/auth/firebase/firebase-login-view.tsx
===================================================================
--- src/sections/auth/firebase/firebase-login-view.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/sections/auth/firebase/firebase-login-view.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -74,5 +74,5 @@
   const renderHead = (
     <Stack spacing={2} sx={{ mb: 5 }}>
-      <Typography variant="h4">Sign in to AgencyOS</Typography>
+      <Typography variant="h4">Sign in to MVP Masters</Typography>
     </Stack>
   );
Index: src/sections/client/customer-new-edit-form.tsx
===================================================================
--- src/sections/client/customer-new-edit-form.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,253 +1,0 @@
-import * as Yup from 'yup';
-import { useCallback, useMemo } from 'react';
-import { useForm, Controller } from 'react-hook-form';
-import { zodResolver } from '@hookform/resolvers/zod';
-// @mui
-import LoadingButton from '@mui/lab/LoadingButton';
-import Box from '@mui/material/Box';
-import Card from '@mui/material/Card';
-import Stack from '@mui/material/Stack';
-import Switch from '@mui/material/Switch';
-import Grid from '@mui/material/Unstable_Grid2';
-import Typography from '@mui/material/Typography';
-import FormControlLabel from '@mui/material/FormControlLabel';
-// utils
-import { fData } from 'src/utils/format-number';
-// routes
-import { paths } from 'src/routes/paths';
-import { useRouter } from 'src/routes/hooks';
-// types
-import { Customer, NewCustomer, newCustomerSchema } from 'src/schemas';
-// components
-import Label from 'src/components/label';
-import { useSnackbar } from 'src/components/snackbar';
-import FormProvider, { RHFTextField, RHFUploadAvatar } from 'src/components/hook-form';
-import uploadToFirebaseStorage from 'src/utils/upload-to-firebase-storage';
-import { addDoc, collection } from 'firebase/firestore';
-import { db } from 'src/lib/firebase';
-import { createCustomer } from 'src/api/customer';
-
-// ----------------------------------------------------------------------
-
-type Props = {
-  currentUser?: Customer;
-};
-
-export default function CustomerNewEditForm({ currentUser: currentCustomer }: Props) {
-  const router = useRouter();
-
-  const { enqueueSnackbar } = useSnackbar();
-
-  const defaultValues: NewCustomer = useMemo(
-    () => ({
-      name: currentCustomer?.name || '',
-      representative: currentCustomer?.representative || '',
-      email: currentCustomer?.email || '',
-      logoUrl: currentCustomer?.logoUrl || null,
-      address: currentCustomer?.address || {
-        country: '',
-        state: '',
-        street: '',
-        zip: '',
-        city: '',
-      },
-      vatNumber: currentCustomer?.vatNumber || '',
-      companyNumber: currentCustomer?.companyNumber || '',
-      id: currentCustomer?.id || '',
-      phoneNumber: currentCustomer?.phoneNumber || '',
-      status: 'active',
-    }),
-    [currentCustomer]
-  );
-
-  const methods = useForm({
-    resolver: zodResolver(newCustomerSchema),
-    defaultValues,
-  });
-
-  const {
-    reset,
-    watch,
-    control,
-    setValue,
-    handleSubmit,
-    formState: { isSubmitting },
-  } = methods;
-
-  const values = watch();
-
-  const onSubmit = handleSubmit(async (data) => {
-    try {
-      // await new Promise((resolve) => setTimeout(resolve, 500));
-      const logoFile = data.logoUrl as File & { preview: string };
-
-      const storagePath: string = `customers/${logoFile.name}`;
-      const logoUrl = await uploadToFirebaseStorage(logoFile, storagePath);
-
-      await createCustomer({ ...data, logoUrl });
-
-      reset();
-      enqueueSnackbar(currentCustomer ? 'Update success!' : 'Create success!');
-      router.push(paths.dashboard.customer.list);
-      console.info('DATA', data);
-    } catch (error) {
-      console.error(error);
-    }
-  });
-
-  const handleDrop = useCallback(
-    (acceptedFiles: File[]) => {
-      const file = acceptedFiles[0];
-
-      const newFile = Object.assign(file, {
-        preview: URL.createObjectURL(file),
-      });
-
-      if (file) {
-        setValue('logoUrl', newFile, { shouldValidate: true });
-      }
-    },
-    [setValue]
-  );
-
-  return (
-    <FormProvider methods={methods} onSubmit={onSubmit}>
-      <Grid container spacing={3}>
-        <Grid xs={12} md={4}>
-          <Card sx={{ pt: 10, pb: 5, px: 3 }}>
-            {currentCustomer && (
-              <Label
-                color={
-                  (values.status === 'active' && 'success') ||
-                  (values.status === 'banned' && 'error') ||
-                  'warning'
-                }
-                sx={{ position: 'absolute', top: 24, right: 24 }}
-              >
-                {values.status}
-              </Label>
-            )}
-
-            <Box sx={{ mb: 5 }}>
-              <RHFUploadAvatar
-                name="logoUrl"
-                maxSize={3145728}
-                onDrop={handleDrop}
-                helperText={
-                  <Typography
-                    variant="caption"
-                    sx={{
-                      mt: 3,
-                      mx: 'auto',
-                      display: 'block',
-                      textAlign: 'center',
-                      color: 'text.disabled',
-                    }}
-                  >
-                    Allowed *.jpeg, *.jpg, *.png, *.gif
-                    <br /> max size of {fData(3145728)}
-                  </Typography>
-                }
-              />
-            </Box>
-
-            {currentCustomer && (
-              <FormControlLabel
-                labelPlacement="start"
-                control={
-                  <Controller
-                    name="status"
-                    control={control}
-                    render={({ field }) => (
-                      <Switch
-                        {...field}
-                        checked={field.value !== 'active'}
-                        onChange={(event) =>
-                          field.onChange(event.target.checked ? 'banned' : 'active')
-                        }
-                      />
-                    )}
-                  />
-                }
-                label={
-                  <>
-                    <Typography variant="subtitle2" sx={{ mb: 0.5 }}>
-                      Banned
-                    </Typography>
-                    <Typography variant="body2" sx={{ color: 'text.secondary' }}>
-                      Apply disable account
-                    </Typography>
-                  </>
-                }
-                sx={{ mx: 0, mb: 3, width: 1, justifyContent: 'space-between' }}
-              />
-            )}
-          </Card>
-        </Grid>
-
-        <Grid xs={12} md={8}>
-          <Card sx={{ p: 3 }}>
-            <Box
-              rowGap={3}
-              columnGap={2}
-              display="grid"
-              gridTemplateColumns={{
-                xs: 'repeat(1, 1fr)',
-                sm: 'repeat(2, 1fr)',
-              }}
-            >
-              <RHFTextField name="name" label="Name" />
-              <RHFTextField name="email" label="Email Address" />
-              <RHFTextField name="representative" label="Representative" />
-              <RHFTextField name="phoneNumber" label="Phone Number" />
-
-              <RHFTextField name="address.country" label="Country" />
-
-              {/* <RHFAutocomplete
-                name="address.country"
-                label="Country"
-                options={countries.map((country) => country.label)}
-                getOptionLabel={(option) => option}
-                isOptionEqualToValue={(option, value) => option === value}
-                renderOption={(props, option) => {
-                  const { code, label, phone } = countries.filter(
-                    (country) => country.label === option
-                  )[0];
-
-                  if (!label) {
-                    return null;
-                  }
-
-                  return (
-                    <li {...props} key={label}>
-                      <Iconify
-                        key={label}
-                        icon={`circle-flags:${code.toLowerCase()}`}
-                        width={28}
-                        sx={{ mr: 1 }}
-                      />
-                      {label} ({code}) +{phone}
-                    </li>
-                  );
-                }}
-              /> */}
-
-              <RHFTextField name="address.state" label="State/Region" />
-              <RHFTextField name="address.city" label="City" />
-              <RHFTextField name="address.street" label="Street" />
-              <RHFTextField name="address.zip" label="Zip/Code" />
-              <RHFTextField name="vatNumber" label="VAT" />
-              <RHFTextField name="companyNumber" label="Company Number" />
-            </Box>
-
-            <Stack alignItems="flex-end" sx={{ mt: 3 }}>
-              <LoadingButton type="submit" variant="contained" loading={isSubmitting}>
-                {!currentCustomer ? 'Create Customer' : 'Save Changes'}
-              </LoadingButton>
-            </Stack>
-          </Card>
-        </Grid>
-      </Grid>
-    </FormProvider>
-  );
-}
Index: src/sections/client/customer-quick-edit-form.tsx
===================================================================
--- src/sections/client/customer-quick-edit-form.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,188 +1,0 @@
-import * as Yup from 'yup';
-import { useMemo } from 'react';
-import { useForm } from 'react-hook-form';
-import { zodResolver } from '@hookform/resolvers/zod';
-// @mui
-import LoadingButton from '@mui/lab/LoadingButton';
-import Box from '@mui/material/Box';
-import Alert from '@mui/material/Alert';
-import Button from '@mui/material/Button';
-import Dialog from '@mui/material/Dialog';
-import MenuItem from '@mui/material/MenuItem';
-import DialogTitle from '@mui/material/DialogTitle';
-import DialogActions from '@mui/material/DialogActions';
-import DialogContent from '@mui/material/DialogContent';
-// types
-import { Customer, updateCustomerSchema } from 'src/schemas';
-// assets
-import { countries } from 'src/assets/data';
-// components
-import Iconify from 'src/components/iconify';
-import { useSnackbar } from 'src/components/snackbar';
-import FormProvider, { RHFSelect, RHFTextField, RHFAutocomplete } from 'src/components/hook-form';
-import { updateCustomer } from 'src/api/customer';
-
-// ----------------------------------------------------------------------
-
-export const USER_STATUS_OPTIONS = [
-  { value: 'active', label: 'Active' },
-  { value: 'banned', label: 'Banned' },
-  { value: 'inactive', label: 'Inactive' },
-];
-
-type Props = {
-  open: boolean;
-  onClose: VoidFunction;
-  currentCustomer?: Customer;
-};
-
-export default function CustomerQuickEditForm({ currentCustomer, open, onClose }: Props) {
-  const { enqueueSnackbar } = useSnackbar();
-
-  // @ts-ignore
-  const defaultValues: Customer = useMemo(
-    () => ({
-      name: currentCustomer?.name || '',
-      representative: currentCustomer?.representative || '',
-      email: currentCustomer?.email || '',
-      logoUrl: currentCustomer?.logoUrl || '',
-      address: {
-        country: currentCustomer?.address?.country || '',
-        state: currentCustomer?.address?.state || '',
-        street: currentCustomer?.address?.street || '',
-        zip: currentCustomer?.address?.zip || '',
-        city: currentCustomer?.address?.city || '',
-      },
-      vatNumber: currentCustomer?.vatNumber || '',
-      companyNumber: currentCustomer?.companyNumber || '',
-      id: currentCustomer?.id || '',
-      phoneNumber: currentCustomer?.phoneNumber || '',
-      status: currentCustomer?.status || '',
-    }),
-    [currentCustomer]
-  );
-
-  const methods = useForm({
-    resolver: zodResolver(updateCustomerSchema),
-    defaultValues,
-  });
-
-  const {
-    reset,
-    handleSubmit,
-    formState: { isSubmitting },
-  } = methods;
-
-  const onSubmit = handleSubmit(async (data) => {
-    try {
-      console.log('currentCustomer', currentCustomer);
-      if (!currentCustomer) return;
-      console.log('data', data);
-      await updateCustomer(currentCustomer.id!, data);
-
-      reset();
-      onClose();
-      enqueueSnackbar('Update success!');
-      console.info('DATA', data);
-    } catch (error) {
-      console.error(error);
-      enqueueSnackbar('Update failed!', { variant: 'error' });
-    }
-  });
-
-  return (
-    <Dialog
-      fullWidth
-      maxWidth={false}
-      open={open}
-      onClose={onClose}
-      PaperProps={{
-        sx: { maxWidth: 720 },
-      }}
-    >
-      <FormProvider methods={methods} onSubmit={onSubmit}>
-        <DialogTitle>Quick Update</DialogTitle>
-
-        <DialogContent>
-          {/* <Alert variant="outlined" severity="info" sx={{ mb: 3 }}>
-            Account is waiting for confirmation
-          </Alert> */}
-
-          <Box
-            rowGap={3}
-            columnGap={2}
-            display="grid"
-            sx={{ mt: 3 }}
-            gridTemplateColumns={{
-              xs: 'repeat(1, 1fr)',
-              sm: 'repeat(2, 1fr)',
-            }}
-          >
-            <RHFSelect name="status" label="Status">
-              <MenuItem key="none" value="" />
-              {USER_STATUS_OPTIONS.map((status) => (
-                <MenuItem key={status.value} value={status.value}>
-                  {status.label}
-                </MenuItem>
-              ))}
-            </RHFSelect>
-
-            <Box sx={{ display: { xs: 'none', sm: 'block' } }} />
-
-            <RHFTextField name="name" label="Name" />
-            <RHFTextField name="representative" label="Representative" />
-            <RHFTextField name="email" label="Email Address" />
-            <RHFTextField name="phoneNumber" label="Phone Number" />
-
-            <RHFTextField name="address.country" label="Country" />
-
-            {/* <RHFAutocomplete
-              name="address.country"
-              label="Country"
-              options={countries.map((country) => country.code)}
-              getOptionLabel={(option) => option}
-              renderOption={(props, option) => {
-                const { code, label, phone } = countries.filter(
-                  (country) => country.label === option
-                )[0];
-
-                if (!label) {
-                  return null;
-                }
-
-                return (
-                  <li {...props} key={label}>
-                    <Iconify
-                      key={label}
-                      icon={`circle-flags:${code.toLowerCase()}`}
-                      width={28}
-                      sx={{ mr: 1 }}
-                    />
-                    {label} ({code}) +{phone}
-                  </li>
-                );
-              }}
-            /> */}
-
-            <RHFTextField name="address.state" label="State/Region" />
-            <RHFTextField name="address.city" label="City" />
-            <RHFTextField name="address.street" label="Street" />
-            <RHFTextField name="address.zip" label="Zip/Code" />
-            <RHFTextField name="vatNumber" label="VAT" />
-            <RHFTextField name="companyNumber" label="Company Number" />
-          </Box>
-        </DialogContent>
-
-        <DialogActions>
-          <Button variant="outlined" onClick={onClose}>
-            Cancel
-          </Button>
-
-          <LoadingButton type="submit" variant="contained" loading={isSubmitting}>
-            Update
-          </LoadingButton>
-        </DialogActions>
-      </FormProvider>
-    </Dialog>
-  );
-}
Index: src/sections/client/customer-table-filters-result.tsx
===================================================================
--- src/sections/client/customer-table-filters-result.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,109 +1,0 @@
-// @mui
-import Box from '@mui/material/Box';
-import Chip from '@mui/material/Chip';
-import Paper from '@mui/material/Paper';
-import Button from '@mui/material/Button';
-import Stack, { StackProps } from '@mui/material/Stack';
-// types
-
-// components
-import Iconify from 'src/components/iconify';
-import { CustomerTableFilterValue, CustomerTableFilters } from 'src/schemas';
-
-// ----------------------------------------------------------------------
-
-type Props = StackProps & {
-  filters: CustomerTableFilters;
-  onFilters: (name: string, value: CustomerTableFilterValue) => void;
-  //
-  onResetFilters: VoidFunction;
-  //
-  results: number;
-};
-
-export default function CustomerTableFiltersResult({
-  filters,
-  onFilters,
-  //
-  onResetFilters,
-  //
-  results,
-  ...other
-}: Props) {
-  const handleRemoveStatus = () => {
-    onFilters('status', 'all');
-  };
-
-  const handleRemoveRole = (inputValue: string) => {
-    const newValue = filters.role.filter((item) => item !== inputValue);
-    onFilters('role', newValue);
-  };
-
-  return (
-    <Stack spacing={1.5} {...other}>
-      <Box sx={{ typography: 'body2' }}>
-        <strong>{results}</strong>
-        <Box component="span" sx={{ color: 'text.secondary', ml: 0.25 }}>
-          results found
-        </Box>
-      </Box>
-
-      <Stack flexGrow={1} spacing={1} direction="row" flexWrap="wrap" alignItems="center">
-        {filters.status !== 'all' && (
-          <Block label="Status:">
-            <Chip size="small" label={filters.status} onDelete={handleRemoveStatus} />
-          </Block>
-        )}
-
-        {!!filters.role.length && (
-          <Block label="Role:">
-            {filters.role.map((item) => (
-              <Chip key={item} label={item} size="small" onDelete={() => handleRemoveRole(item)} />
-            ))}
-          </Block>
-        )}
-
-        <Button
-          color="error"
-          onClick={onResetFilters}
-          startIcon={<Iconify icon="solar:trash-bin-trash-bold" />}
-        >
-          Clear
-        </Button>
-      </Stack>
-    </Stack>
-  );
-}
-
-// ----------------------------------------------------------------------
-
-type BlockProps = StackProps & {
-  label: string;
-};
-
-function Block({ label, children, sx, ...other }: BlockProps) {
-  return (
-    <Stack
-      component={Paper}
-      variant="outlined"
-      spacing={1}
-      direction="row"
-      sx={{
-        p: 1,
-        borderRadius: 1,
-        overflow: 'hidden',
-        borderStyle: 'dashed',
-        ...sx,
-      }}
-      {...other}
-    >
-      <Box component="span" sx={{ typography: 'subtitle2' }}>
-        {label}
-      </Box>
-
-      <Stack spacing={1} direction="row" flexWrap="wrap">
-        {children}
-      </Stack>
-    </Stack>
-  );
-}
Index: src/sections/client/customer-table-row.tsx
===================================================================
--- src/sections/client/customer-table-row.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,103 +1,0 @@
-// @mui
-import Avatar from '@mui/material/Avatar';
-import Tooltip from '@mui/material/Tooltip';
-import MenuItem from '@mui/material/MenuItem';
-import TableRow from '@mui/material/TableRow';
-import TableCell from '@mui/material/TableCell';
-import IconButton from '@mui/material/IconButton';
-// hooks
-import { useBoolean } from 'src/hooks/use-boolean';
-// types
-import { Customer } from 'src/schemas';
-// components
-import Label from 'src/components/label';
-import Iconify from 'src/components/iconify';
-import CustomPopover, { usePopover } from 'src/components/custom-popover';
-//
-import CustomerQuickEditForm from './customer-quick-edit-form';
-
-// ----------------------------------------------------------------------
-
-type Props = {
-  selected: boolean;
-  onEditRow: VoidFunction;
-  row: Customer;
-};
-
-export default function CustomerTableRow({ row, selected, onEditRow }: Props) {
-  const { name, logoUrl, representative, status, email, phoneNumber } = row;
-
-  // const confirm = useBoolean();
-
-  const quickEdit = useBoolean();
-
-  // const popover = usePopover();
-
-  return (
-    <>
-      <TableRow hover selected={selected}>
-        {/* <TableCell padding="checkbox">
-          <Checkbox checked={selected} onClick={onSelectRow} />
-        </TableCell> */}
-
-        <TableCell sx={{ display: 'flex', alignItems: 'center' }}>
-          <Avatar alt={name} src={logoUrl} sx={{ mr: 2 }} />
-          <span>{name}</span>
-        </TableCell>
-
-        <TableCell sx={{ whiteSpace: 'nowrap' }}>{representative}</TableCell>
-
-        <TableCell sx={{ whiteSpace: 'nowrap' }}>{email}</TableCell>
-
-        <TableCell>
-          <Label
-            variant="soft"
-            color={
-              (status === 'active' && 'success') ||
-              (status === 'inactive' && 'warning') ||
-              (status === 'banned' && 'error') ||
-              'default'
-            }
-          >
-            {status}
-          </Label>
-        </TableCell>
-
-        <TableCell align="right" sx={{ px: 1, whiteSpace: 'nowrap' }}>
-          <Tooltip title="Quick Edit" placement="top" arrow>
-            <IconButton color={quickEdit.value ? 'inherit' : 'default'} onClick={quickEdit.onTrue}>
-              <Iconify icon="solar:pen-bold" />
-            </IconButton>
-          </Tooltip>
-          {/* 
-          <IconButton color={popover.open ? 'inherit' : 'default'} onClick={popover.onOpen}>
-            <Iconify icon="eva:more-vertical-fill" />
-          </IconButton> */}
-        </TableCell>
-      </TableRow>
-
-      <CustomerQuickEditForm
-        currentCustomer={row}
-        open={quickEdit.value}
-        onClose={quickEdit.onFalse}
-      />
-
-      {/* <CustomPopover
-        open={popover.open}
-        onClose={popover.onClose}
-        arrow="right-top"
-        sx={{ width: 140 }}
-      >
-        <MenuItem
-          onClick={() => {
-            onEditRow();
-            popover.onClose();
-          }}
-        >
-          <Iconify icon="solar:pen-bold" />
-          Edit
-        </MenuItem>
-      </CustomPopover> */}
-    </>
-  );
-}
Index: src/sections/client/customer-table-toolbar.tsx
===================================================================
--- src/sections/client/customer-table-toolbar.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,152 +1,0 @@
-import { useCallback } from 'react';
-// @mui
-import Stack from '@mui/material/Stack';
-import MenuItem from '@mui/material/MenuItem';
-import Checkbox from '@mui/material/Checkbox';
-import TextField from '@mui/material/TextField';
-import InputLabel from '@mui/material/InputLabel';
-import IconButton from '@mui/material/IconButton';
-import FormControl from '@mui/material/FormControl';
-import OutlinedInput from '@mui/material/OutlinedInput';
-import InputAdornment from '@mui/material/InputAdornment';
-import Select, { SelectChangeEvent } from '@mui/material/Select';
-// types
-import { CustomerTableFilters, CustomerTableFilterValue } from 'src/schemas';
-// components
-import Iconify from 'src/components/iconify';
-import CustomPopover, { usePopover } from 'src/components/custom-popover';
-
-// ----------------------------------------------------------------------
-
-type Props = {
-  filters: CustomerTableFilters;
-  onFilters: (name: string, value: CustomerTableFilterValue) => void;
-  //
-  roleOptions: string[];
-};
-
-export default function CustomerTableToolbar({
-  filters,
-  onFilters,
-  //
-  roleOptions,
-}: Props) {
-  const popover = usePopover();
-
-  const handleFilterName = useCallback(
-    (event: React.ChangeEvent<HTMLInputElement>) => {
-      onFilters('name', event.target.value);
-    },
-    [onFilters]
-  );
-
-  const handleFilterRole = useCallback(
-    (event: SelectChangeEvent<string[]>) => {
-      onFilters(
-        'role',
-        typeof event.target.value === 'string' ? event.target.value.split(',') : event.target.value
-      );
-    },
-    [onFilters]
-  );
-
-  return (
-    <>
-      <Stack
-        spacing={2}
-        alignItems={{ xs: 'flex-end', md: 'center' }}
-        direction={{
-          xs: 'column',
-          md: 'row',
-        }}
-        sx={{
-          p: 2.5,
-          pr: { xs: 2.5, md: 1 },
-        }}
-      >
-        <FormControl
-          sx={{
-            flexShrink: 0,
-            width: { xs: 1, md: 200 },
-          }}
-        >
-          <InputLabel>Role</InputLabel>
-
-          <Select
-            multiple
-            value={filters.role}
-            onChange={handleFilterRole}
-            input={<OutlinedInput label="Role" />}
-            renderValue={(selected) => selected.map((value) => value).join(', ')}
-            MenuProps={{
-              PaperProps: {
-                sx: { maxHeight: 240 },
-              },
-            }}
-          >
-            {roleOptions.map((option) => (
-              <MenuItem key={option} value={option}>
-                <Checkbox disableRipple size="small" checked={filters.role.includes(option)} />
-                {option}
-              </MenuItem>
-            ))}
-          </Select>
-        </FormControl>
-
-        <Stack direction="row" alignItems="center" spacing={2} flexGrow={1} sx={{ width: 1 }}>
-          <TextField
-            fullWidth
-            value={filters.name}
-            onChange={handleFilterName}
-            placeholder="Search..."
-            InputProps={{
-              startAdornment: (
-                <InputAdornment position="start">
-                  <Iconify icon="eva:search-fill" sx={{ color: 'text.disabled' }} />
-                </InputAdornment>
-              ),
-            }}
-          />
-
-          <IconButton onClick={popover.onOpen}>
-            <Iconify icon="eva:more-vertical-fill" />
-          </IconButton>
-        </Stack>
-      </Stack>
-
-      <CustomPopover
-        open={popover.open}
-        onClose={popover.onClose}
-        arrow="right-top"
-        sx={{ width: 140 }}
-      >
-        <MenuItem
-          onClick={() => {
-            popover.onClose();
-          }}
-        >
-          <Iconify icon="solar:printer-minimalistic-bold" />
-          Print
-        </MenuItem>
-
-        <MenuItem
-          onClick={() => {
-            popover.onClose();
-          }}
-        >
-          <Iconify icon="solar:import-bold" />
-          Import
-        </MenuItem>
-
-        <MenuItem
-          onClick={() => {
-            popover.onClose();
-          }}
-        >
-          <Iconify icon="solar:export-bold" />
-          Export
-        </MenuItem>
-      </CustomPopover>
-    </>
-  );
-}
Index: src/sections/client/view/customer-create-view.tsx
===================================================================
--- src/sections/client/view/customer-create-view.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,41 +1,0 @@
-'use client';
-
-// @mui
-import Container from '@mui/material/Container';
-// routes
-import { paths } from 'src/routes/paths';
-// components
-import { useSettingsContext } from 'src/components/settings';
-import CustomBreadcrumbs from 'src/components/custom-breadcrumbs';
-//
-import CustomerNewEditForm from '../customer-new-edit-form';
-
-// ----------------------------------------------------------------------
-
-export default function CustomerCreateView() {
-  const settings = useSettingsContext();
-
-  return (
-    <Container maxWidth={settings.themeStretch ? false : 'lg'}>
-      <CustomBreadcrumbs
-        heading="Create a new customer"
-        links={[
-          {
-            name: 'Dashboard',
-            href: paths.dashboard.root,
-          },
-          {
-            name: 'Customer',
-            href: paths.dashboard.customer.list,
-          },
-          { name: 'New customer' },
-        ]}
-        sx={{
-          mb: { xs: 3, md: 5 },
-        }}
-      />
-
-      <CustomerNewEditForm />
-    </Container>
-  );
-}
Index: src/sections/client/view/customer-list-view.tsx
===================================================================
--- src/sections/client/view/customer-list-view.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,335 +1,0 @@
-'use client';
-
-import isEqual from 'lodash/isEqual';
-import { useState, useCallback } from 'react';
-// @mui
-import { alpha } from '@mui/material/styles';
-import Tab from '@mui/material/Tab';
-import Tabs from '@mui/material/Tabs';
-import Card from '@mui/material/Card';
-import Table from '@mui/material/Table';
-import Button from '@mui/material/Button';
-import Container from '@mui/material/Container';
-import TableBody from '@mui/material/TableBody';
-import TableContainer from '@mui/material/TableContainer';
-// routes
-import { paths } from 'src/routes/paths';
-import { RouterLink } from 'src/routes/components';
-// hooks
-import { useBoolean } from 'src/hooks/use-boolean';
-// components
-import Label from 'src/components/label';
-import Iconify from 'src/components/iconify';
-import Scrollbar from 'src/components/scrollbar';
-import { useSettingsContext } from 'src/components/settings';
-import CustomBreadcrumbs from 'src/components/custom-breadcrumbs';
-import {
-  useTable,
-  getComparator,
-  emptyRows,
-  TableNoData,
-  TableEmptyRows,
-  TableHeadCustom,
-  TablePaginationCustom,
-} from 'src/components/table';
-// types
-import { Customer, CustomerTableFilters, CustomerTableFilterValue } from 'src/schemas';
-//
-import { useGetCustomers } from 'src/api/customer';
-import CustomerTableRow from '../customer-table-row';
-import CustomerTableFiltersResult from '../customer-table-filters-result';
-import { USER_STATUS_OPTIONS } from '../customer-quick-edit-form';
-
-// ----------------------------------------------------------------------
-
-const STATUS_OPTIONS = [{ value: 'all', label: 'All' }, ...USER_STATUS_OPTIONS];
-
-const TABLE_HEAD = [
-  { id: 'name', label: 'Name' },
-  { id: 'representative', label: 'Representative', width: 220 },
-  { id: 'email', label: 'Email' },
-  { id: 'status', label: 'Status', width: 100 },
-  { id: '', width: 88 },
-];
-
-const defaultFilters: CustomerTableFilters = {
-  name: '',
-  role: [],
-  status: 'all',
-};
-
-// ----------------------------------------------------------------------
-
-export default function CustomerListView() {
-  const table = useTable({ defaultDense: true, defaultRowsPerPage: 25 });
-
-  const settings = useSettingsContext();
-
-  // const router = useRouter();
-
-  const confirm = useBoolean();
-
-  const { customers } = useGetCustomers();
-
-  // const [tableData, setTableData] = useState(customers || []);
-
-  const [filters, setFilters] = useState(defaultFilters);
-
-  const dataFiltered = applyFilter({
-    inputData: customers,
-    comparator: getComparator(table.order, table.orderBy),
-    filters,
-  });
-
-  const dataInPage = dataFiltered.slice(
-    table.page * table.rowsPerPage,
-    table.page * table.rowsPerPage + table.rowsPerPage
-  );
-
-  const denseHeight = table.dense ? 52 : 72;
-
-  const canReset = !isEqual(defaultFilters, filters);
-
-  const notFound = (!dataFiltered.length && canReset) || !dataFiltered.length;
-
-  const handleFilters = useCallback(
-    (name: string, value: CustomerTableFilterValue) => {
-      table.onResetPage();
-      setFilters((prevState) => ({
-        ...prevState,
-        [name]: value,
-      }));
-    },
-    [table]
-  );
-
-  // const handleDeleteRow = useCallback(
-  //   (id: string) => {
-  //     const deleteRow = customers.filter((row) => row.id !== id);
-
-  //     table.onUpdatePageDeleteRow(dataInPage.length);
-  //   },
-  //   [dataInPage.length, table]
-  // );
-
-  // const handleDeleteRows = useCallback(() => {
-  //   const deleteRows = tableData.filter((row) => !table.selected.includes(row.id));
-  //   setTableData(deleteRows);
-
-  //   table.onUpdatePageDeleteRows({
-  //     totalRows: tableData.length,
-  //     totalRowsInPage: dataInPage.length,
-  //     totalRowsFiltered: dataFiltered.length,
-  //   });
-  // }, [dataFiltered.length, dataInPage.length, table, tableData]);
-
-  // const handleEditRow = useCallback(
-  //   (id: string) => {
-  //     router.push(paths.dashboard.user.edit(id));
-  //   },
-  //   [router]
-  // );
-
-  const handleFilterStatus = useCallback(
-    (event: React.SyntheticEvent, newValue: string) => {
-      handleFilters('status', newValue);
-    },
-    [handleFilters]
-  );
-
-  const handleResetFilters = useCallback(() => {
-    setFilters(defaultFilters);
-  }, []);
-
-  return (
-    <>
-      <Container maxWidth={settings.themeStretch ? false : 'lg'}>
-        <CustomBreadcrumbs
-          heading="List"
-          links={[
-            { name: 'Dashboard', href: paths.dashboard.root },
-            { name: 'Customer', href: paths.dashboard.customer.list },
-            { name: 'List' },
-          ]}
-          action={
-            <Button
-              component={RouterLink}
-              href={paths.dashboard.customer.new}
-              variant="contained"
-              startIcon={<Iconify icon="mingcute:add-line" />}
-            >
-              New Customer
-            </Button>
-          }
-          sx={{
-            mb: { xs: 3, md: 5 },
-          }}
-        />
-
-        <Card>
-          <Tabs
-            value={filters.status}
-            onChange={handleFilterStatus}
-            sx={{
-              px: 2.5,
-              boxShadow: (theme) => `inset 0 -2px 0 0 ${alpha(theme.palette.grey[500], 0.08)}`,
-            }}
-          >
-            {STATUS_OPTIONS.map((tab) => (
-              <Tab
-                key={tab.value}
-                iconPosition="end"
-                value={tab.value}
-                label={tab.label}
-                icon={
-                  <Label
-                    variant={
-                      ((tab.value === 'all' || tab.value === filters.status) && 'filled') || 'soft'
-                    }
-                    color={
-                      (tab.value === 'active' && 'success') ||
-                      (tab.value === 'pending' && 'warning') ||
-                      (tab.value === 'banned' && 'error') ||
-                      'default'
-                    }
-                  >
-                    {tab.value === 'all' && customers.length}
-
-                    {tab.value === 'active' &&
-                      customers.filter((customer) => customer.status === 'active').length}
-
-                    {tab.value === 'banned' &&
-                      customers.filter((customer) => customer.status === 'banned').length}
-
-                    {tab.value === 'inactive' &&
-                      customers.filter((customer) => customer.status === 'inactive').length}
-                  </Label>
-                }
-              />
-            ))}
-          </Tabs>
-
-          {canReset && (
-            <CustomerTableFiltersResult
-              filters={filters}
-              onFilters={handleFilters}
-              //
-              onResetFilters={handleResetFilters}
-              //
-              results={dataFiltered.length}
-              sx={{ p: 2.5, pt: 0 }}
-            />
-          )}
-
-          <TableContainer sx={{ position: 'relative', overflow: 'unset' }}>
-            <Scrollbar>
-              <Table size={table.dense ? 'small' : 'medium'} sx={{ minWidth: 960 }}>
-                <TableHeadCustom
-                  order={table.order}
-                  orderBy={table.orderBy}
-                  headLabel={TABLE_HEAD}
-                  rowCount={customers.length}
-                  numSelected={table.selected.length}
-                  onSort={table.onSort}
-                />
-
-                <TableBody>
-                  {dataFiltered
-                    .slice(
-                      table.page * table.rowsPerPage,
-                      table.page * table.rowsPerPage + table.rowsPerPage
-                    )
-                    .map((row) => (
-                      <CustomerTableRow
-                        key={row.id}
-                        row={row}
-                        selected={table.selected.includes(row.id!)}
-                        onEditRow={() => {}}
-                      />
-                    ))}
-
-                  <TableEmptyRows
-                    height={denseHeight}
-                    emptyRows={emptyRows(table.page, table.rowsPerPage, customers.length)}
-                  />
-
-                  <TableNoData notFound={notFound} />
-                </TableBody>
-              </Table>
-            </Scrollbar>
-          </TableContainer>
-
-          <TablePaginationCustom
-            count={dataFiltered.length}
-            page={table.page}
-            rowsPerPage={table.rowsPerPage}
-            onPageChange={table.onChangePage}
-            onRowsPerPageChange={table.onChangeRowsPerPage}
-            //
-            dense={table.dense}
-            onChangeDense={table.onChangeDense}
-          />
-        </Card>
-      </Container>
-
-      {/* <ConfirmDialog
-        open={confirm.value}
-        onClose={confirm.onFalse}
-        title="Delete"
-        content={
-          <>
-            Are you sure want to delete <strong> {table.selected.length} </strong> items?
-          </>
-        }
-        action={
-          <Button
-            variant="contained"
-            color="error"
-            onClick={() => {
-              handleDeleteRows();
-              confirm.onFalse();
-            }}
-          >
-            Delete
-          </Button>
-        }
-      /> */}
-    </>
-  );
-}
-
-// ----------------------------------------------------------------------
-
-function applyFilter({
-  inputData,
-  comparator,
-  filters,
-}: {
-  inputData: Customer[];
-  comparator: (a: any, b: any) => number;
-  filters: CustomerTableFilters;
-}) {
-  const { name, status, role } = filters;
-
-  const stabilizedThis = inputData.map((el, index) => [el, index] as const);
-
-  stabilizedThis.sort((a, b) => {
-    const order = comparator(a[0], b[0]);
-    if (order !== 0) return order;
-    return a[1] - b[1];
-  });
-
-  inputData = stabilizedThis.map((el) => el[0]);
-
-  if (name) {
-    inputData = inputData.filter(
-      (user) => user.name.toLowerCase().indexOf(name.toLowerCase()) !== -1
-    );
-  }
-
-  if (status !== 'all') {
-    inputData = inputData.filter((user) => user.status === status);
-  }
-
-  return inputData;
-}
Index: src/sections/client/view/index.ts
===================================================================
--- src/sections/client/view/index.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,2 +1,0 @@
-export { default as CustomerListView } from './customer-list-view';
-export { default as CustomerCreateView } from './customer-create-view';
Index: src/sections/company/company-item.tsx
===================================================================
--- src/sections/company/company-item.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/sections/company/company-item.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -4,5 +4,5 @@
 import Stack, { StackProps } from '@mui/material/Stack';
 // types
-import { Customer } from 'src/schemas';
+import { Customer } from 'mvpmasters-shared';
 // components
 import Label from 'src/components/label';
Index: src/sections/company/company-list-dialog.tsx
===================================================================
--- src/sections/company/company-list-dialog.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/sections/company/company-list-dialog.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -9,10 +9,9 @@
 import ListItemButton, { listItemButtonClasses } from '@mui/material/ListItemButton';
 // types
-import { Customer } from 'src/schemas';
+import { Customer } from 'mvpmasters-shared';
 // components
 import Iconify from 'src/components/iconify';
 import SearchNotFound from 'src/components/search-not-found';
 import { createFullAddress } from 'src/utils/create-full-address';
-import { Tenant } from 'src/schemas';
 
 // ----------------------------------------------------------------------
@@ -20,6 +19,5 @@
 type Props = {
   title?: string;
-  tenant?: Tenant;
-  list?: Customer[];
+  list: Customer[];
   action?: React.ReactNode;
   //
@@ -28,10 +26,9 @@
   //
   selected: (selectedId: string) => boolean;
-  onSelect: (address: Customer | Tenant | null) => void;
+  onSelect: (address: Customer | null) => void;
 };
 
 export default function AddressListDialog({
   title = 'Address Book',
-  tenant,
   list,
   action,
@@ -46,5 +43,5 @@
 
   const dataFiltered = applyFilter({
-    inputData: list || (tenant ? [tenant] : []),
+    inputData: list,
     query: searchCompany,
   });
@@ -57,5 +54,5 @@
 
   const handleSelectCompany = useCallback(
-    (company: Customer | Tenant | null) => {
+    (company: Customer | null) => {
       onSelect(company);
       setSearchCompany('');
@@ -159,5 +156,5 @@
 // ----------------------------------------------------------------------
 
-function applyFilter({ inputData, query }: { inputData: Tenant[] | Customer[]; query: string }) {
+function applyFilter({ inputData, query }: { inputData: Customer[]; query: string }) {
   if (query) {
     return inputData.filter(
Index: src/sections/employee/employee-new-edit-form.tsx
===================================================================
--- src/sections/employee/employee-new-edit-form.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,74 +1,0 @@
-import { useCallback } from 'react';
-import { useForm } from 'react-hook-form';
-import { zodResolver } from '@hookform/resolvers/zod';
-// @mui
-import LoadingButton from '@mui/lab/LoadingButton';
-import Card from '@mui/material/Card';
-import Stack from '@mui/material/Stack';
-import Grid from '@mui/material/Unstable_Grid2';
-// routes
-import { paths } from 'src/routes/paths';
-import { useRouter } from 'src/routes/hooks';
-// types
-import { NewEmployee, newEmployeeSchema } from 'src/schemas';
-// components
-import { useSnackbar } from 'src/components/snackbar';
-import FormProvider, { RHFTextField, RHFUploadAvatar } from 'src/components/hook-form';
-import { createEmployee } from 'src/api/employee';
-
-export default function EmployeeNewEditForm() {
-  const router = useRouter();
-  const { enqueueSnackbar } = useSnackbar();
-
-  const methods = useForm<NewEmployee>({
-    resolver: zodResolver(newEmployeeSchema),
-    defaultValues: {
-      name: '',
-      email: '',
-      status: 'active' as const,
-      project: '',
-      iban: '',
-      photo: '',
-      cv: '',
-    },
-  });
-
-  const {
-    handleSubmit,
-    formState: { isSubmitting },
-  } = methods;
-
-  const onSubmit = handleSubmit(async (data) => {
-    try {
-      await createEmployee(data);
-      enqueueSnackbar('Create success!');
-      router.push(paths.dashboard.employee.list);
-    } catch (error) {
-      console.error(error);
-    }
-  });
-
-  return (
-    <FormProvider methods={methods} onSubmit={onSubmit}>
-      <Grid container spacing={3}>
-        <Grid xs={12} md={8}>
-          <Card sx={{ p: 3 }}>
-            <Stack spacing={3}>
-              <RHFTextField name="name" label="Full Name" />
-              <RHFTextField name="email" label="Email Address" />
-              <RHFTextField name="project" label="Project" />
-              <RHFTextField name="iban" label="IBAN" />
-              <RHFTextField name="cv" label="CV Link" />
-            </Stack>
-
-            <Stack alignItems="flex-end" sx={{ mt: 3 }}>
-              <LoadingButton type="submit" variant="contained" loading={isSubmitting}>
-                Create Employee
-              </LoadingButton>
-            </Stack>
-          </Card>
-        </Grid>
-      </Grid>
-    </FormProvider>
-  );
-}
Index: src/sections/employee/employee-quick-edit-form.tsx
===================================================================
--- src/sections/employee/employee-quick-edit-form.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,110 +1,0 @@
-import * as Yup from 'yup';
-import { useMemo } from 'react';
-import { useForm } from 'react-hook-form';
-import { zodResolver } from '@hookform/resolvers/zod';
-// @mui
-import LoadingButton from '@mui/lab/LoadingButton';
-import Box from '@mui/material/Box';
-import Button from '@mui/material/Button';
-import Dialog from '@mui/material/Dialog';
-import MenuItem from '@mui/material/MenuItem';
-import DialogTitle from '@mui/material/DialogTitle';
-import DialogActions from '@mui/material/DialogActions';
-import DialogContent from '@mui/material/DialogContent';
-// types
-import { Employee, employeeSchema } from 'src/schemas';
-// components
-import { useSnackbar } from 'src/components/snackbar';
-import FormProvider, { RHFSelect, RHFTextField } from 'src/components/hook-form';
-
-// ----------------------------------------------------------------------
-
-type Props = {
-  open: boolean;
-  onClose: VoidFunction;
-  currentEmployee?: Employee;
-};
-
-export const EMPLOYEE_STATUS_OPTIONS = [
-  { value: 'active', label: 'Active' },
-  { value: 'inactive', label: 'Inactive' },
-];
-
-export default function EmployeeQuickEditForm({ currentEmployee, open, onClose }: Props) {
-  const { enqueueSnackbar } = useSnackbar();
-
-  const defaultValues = useMemo(
-    () => ({
-      name: currentEmployee?.name || '',
-      email: currentEmployee?.email || '',
-      status: currentEmployee?.status || 'active',
-      project: currentEmployee?.project || '',
-      iban: currentEmployee?.iban || '',
-    }),
-    [currentEmployee]
-  );
-
-  const methods = useForm({
-    resolver: zodResolver(employeeSchema),
-    defaultValues,
-  });
-
-  const {
-    reset,
-    handleSubmit,
-    formState: { isSubmitting },
-  } = methods;
-
-  const onSubmit = handleSubmit(async (data) => {
-    try {
-      await new Promise((resolve) => setTimeout(resolve, 500));
-      reset();
-      onClose();
-      enqueueSnackbar('Update success!');
-    } catch (error) {
-      console.error(error);
-    }
-  });
-
-  return (
-    <Dialog fullWidth maxWidth="xs" open={open} onClose={onClose}>
-      <FormProvider methods={methods} onSubmit={onSubmit}>
-        <DialogTitle>Quick Update</DialogTitle>
-
-        <DialogContent>
-          <Box
-            rowGap={3}
-            columnGap={2}
-            display="grid"
-            gridTemplateColumns={{
-              xs: 'repeat(1, 1fr)',
-            }}
-            sx={{ pt: 3 }}
-          >
-            <RHFTextField name="name" label="Full Name" />
-            <RHFTextField name="email" label="Email Address" />
-            <RHFTextField name="project" label="Project" />
-            <RHFTextField name="iban" label="IBAN" />
-            <RHFSelect name="status" label="Status">
-              {EMPLOYEE_STATUS_OPTIONS.map((status) => (
-                <MenuItem key={status.value} value={status.value}>
-                  {status.label}
-                </MenuItem>
-              ))}
-            </RHFSelect>
-          </Box>
-        </DialogContent>
-
-        <DialogActions>
-          <Button variant="outlined" onClick={onClose}>
-            Cancel
-          </Button>
-
-          <LoadingButton type="submit" variant="contained" loading={isSubmitting}>
-            Update
-          </LoadingButton>
-        </DialogActions>
-      </FormProvider>
-    </Dialog>
-  );
-}
Index: src/sections/employee/employee-table-filters-result.tsx
===================================================================
--- src/sections/employee/employee-table-filters-result.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,86 +1,0 @@
-// @mui
-import Box from '@mui/material/Box';
-import Chip from '@mui/material/Chip';
-import Paper from '@mui/material/Paper';
-import Button from '@mui/material/Button';
-import Stack, { StackProps } from '@mui/material/Stack';
-// types
-import { EmployeeTableFilters } from 'src/schemas';
-// components
-import Iconify from 'src/components/iconify';
-
-// ----------------------------------------------------------------------
-
-interface Props extends StackProps {
-  filters: EmployeeTableFilters;
-  onFilters: (name: string, value: string | string[]) => void;
-  onResetFilters: VoidFunction;
-  results: number;
-}
-
-export default function EmployeeTableFiltersResult({
-  filters,
-  onFilters,
-  onResetFilters,
-  results,
-  ...other
-}: Props) {
-  const handleRemoveStatus = () => {
-    onFilters('status', 'all');
-  };
-
-  const handleRemoveName = () => {
-    onFilters('name', '');
-  };
-
-  return (
-    <Stack spacing={1.5} {...other}>
-      <Box sx={{ typography: 'body2' }}>
-        <strong>{results}</strong>
-        <Box component="span" sx={{ color: 'text.secondary', ml: 0.25 }}>
-          results found
-        </Box>
-      </Box>
-
-      <Stack flexGrow={1} spacing={1} direction="row" flexWrap="wrap" alignItems="center">
-        {filters.status !== 'all' && (
-          <Block label="Status:">
-            <Chip size="small" label={filters.status} onDelete={handleRemoveStatus} />
-          </Block>
-        )}
-
-        {filters.name && (
-          <Block label="Name:">
-            <Chip size="small" label={filters.name} onDelete={handleRemoveName} />
-          </Block>
-        )}
-
-        <Button
-          color="error"
-          onClick={onResetFilters}
-          startIcon={<Iconify icon="solar:trash-bin-trash-bold" />}
-        >
-          Clear
-        </Button>
-      </Stack>
-    </Stack>
-  );
-}
-
-// ----------------------------------------------------------------------
-
-type BlockProps = {
-  label: string;
-  children: React.ReactNode;
-};
-
-function Block({ label, children }: BlockProps) {
-  return (
-    <Stack direction="row" alignItems="center" sx={{ typography: 'body2' }}>
-      <Box component="span" sx={{ color: 'text.secondary' }}>
-        {label}&nbsp;
-      </Box>
-      {children}
-    </Stack>
-  );
-}
Index: src/sections/employee/employee-table-row.tsx
===================================================================
--- src/sections/employee/employee-table-row.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,71 +1,0 @@
-// @mui
-import Avatar from '@mui/material/Avatar';
-import Tooltip from '@mui/material/Tooltip';
-import TableRow from '@mui/material/TableRow';
-import TableCell from '@mui/material/TableCell';
-import IconButton from '@mui/material/IconButton';
-// hooks
-import { useBoolean } from 'src/hooks/use-boolean';
-// types
-import { Employee } from 'src/schemas';
-// components
-import Label from 'src/components/label';
-import Iconify from 'src/components/iconify';
-//
-import EmployeeQuickEditForm from './employee-quick-edit-form';
-
-// ----------------------------------------------------------------------
-
-type Props = {
-  selected: boolean;
-  onEditRow: VoidFunction;
-  row: Employee;
-};
-
-export default function EmployeeTableRow({ row, selected, onEditRow }: Props) {
-  const { name, photo, project, status, email } = row;
-
-  const quickEdit = useBoolean();
-
-  return (
-    <>
-      <TableRow hover selected={selected}>
-        <TableCell sx={{ display: 'flex', alignItems: 'center' }}>
-          <Avatar alt={name} src={photo || ''} sx={{ mr: 2 }} />
-          <span>{name}</span>
-        </TableCell>
-
-        <TableCell sx={{ whiteSpace: 'nowrap' }}>{email}</TableCell>
-
-        <TableCell sx={{ whiteSpace: 'nowrap' }}>{project || '-'}</TableCell>
-
-        <TableCell>
-          <Label
-            variant="soft"
-            color={
-              (status === 'active' && 'success') ||
-              (status === 'inactive' && 'warning') ||
-              'default'
-            }
-          >
-            {status}
-          </Label>
-        </TableCell>
-
-        <TableCell align="right" sx={{ px: 1, whiteSpace: 'nowrap' }}>
-          <Tooltip title="Quick Edit" placement="top" arrow>
-            <IconButton color={quickEdit.value ? 'inherit' : 'default'} onClick={quickEdit.onTrue}>
-              <Iconify icon="solar:pen-bold" />
-            </IconButton>
-          </Tooltip>
-        </TableCell>
-      </TableRow>
-
-      <EmployeeQuickEditForm
-        currentEmployee={row}
-        open={quickEdit.value}
-        onClose={quickEdit.onFalse}
-      />
-    </>
-  );
-}
Index: src/sections/employee/view/employee-create-view.tsx
===================================================================
--- src/sections/employee/view/employee-create-view.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,41 +1,0 @@
-'use client';
-
-// @mui
-import Container from '@mui/material/Container';
-// routes
-import { paths } from 'src/routes/paths';
-// components
-import { useSettingsContext } from 'src/components/settings';
-import CustomBreadcrumbs from 'src/components/custom-breadcrumbs';
-//
-import EmployeeNewEditForm from '../employee-new-edit-form';
-
-// ----------------------------------------------------------------------
-
-export default function EmployeeCreateView() {
-  const settings = useSettingsContext();
-
-  return (
-    <Container maxWidth={settings.themeStretch ? false : 'lg'}>
-      <CustomBreadcrumbs
-        heading="Create a new employee"
-        links={[
-          {
-            name: 'Dashboard',
-            href: paths.dashboard.root,
-          },
-          {
-            name: 'Employee',
-            href: paths.dashboard.employee.list,
-          },
-          { name: 'New employee' },
-        ]}
-        sx={{
-          mb: { xs: 3, md: 5 },
-        }}
-      />
-
-      <EmployeeNewEditForm />
-    </Container>
-  );
-}
Index: src/sections/employee/view/employee-list-view.tsx
===================================================================
--- src/sections/employee/view/employee-list-view.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,265 +1,0 @@
-'use client';
-
-import isEqual from 'lodash/isEqual';
-import { useState, useCallback } from 'react';
-// @mui
-import { alpha } from '@mui/material/styles';
-import Tab from '@mui/material/Tab';
-import Tabs from '@mui/material/Tabs';
-import Card from '@mui/material/Card';
-import Table from '@mui/material/Table';
-import Button from '@mui/material/Button';
-import Container from '@mui/material/Container';
-import TableBody from '@mui/material/TableBody';
-import TableContainer from '@mui/material/TableContainer';
-// routes
-import { paths } from 'src/routes/paths';
-import { RouterLink } from 'src/routes/components';
-// hooks
-import { useBoolean } from 'src/hooks/use-boolean';
-// components
-import Label from 'src/components/label';
-import Iconify from 'src/components/iconify';
-import Scrollbar from 'src/components/scrollbar';
-import { useSettingsContext } from 'src/components/settings';
-import CustomBreadcrumbs from 'src/components/custom-breadcrumbs';
-import {
-  useTable,
-  getComparator,
-  emptyRows,
-  TableNoData,
-  TableEmptyRows,
-  TableHeadCustom,
-  TablePaginationCustom,
-} from 'src/components/table';
-// types
-import { Employee, EmployeeTableFilters, EmployeeTableFilterValue } from 'src/schemas';
-//
-import { useGetEmployees } from 'src/api/employee';
-import EmployeeTableRow from '../employee-table-row';
-import EmployeeTableFiltersResult from '../employee-table-filters-result';
-
-const STATUS_OPTIONS = [
-  { value: 'all', label: 'All' },
-  { value: 'active', label: 'Active' },
-  { value: 'inactive', label: 'Inactive' },
-];
-
-const TABLE_HEAD = [
-  { id: 'name', label: 'Name' },
-  { id: 'email', label: 'Email' },
-  { id: 'project', label: 'Project' },
-  { id: 'status', label: 'Status', width: 100 },
-  { id: '', width: 88 },
-];
-
-const defaultFilters: EmployeeTableFilters = {
-  name: '',
-  status: 'all',
-};
-
-export default function EmployeeListView() {
-  const table = useTable({ defaultDense: true });
-  const settings = useSettingsContext();
-  const { employees } = useGetEmployees();
-  const [filters, setFilters] = useState(defaultFilters);
-
-  const dataFiltered = applyFilter({
-    inputData: employees,
-    comparator: getComparator(table.order, table.orderBy),
-    filters,
-  });
-
-  const dataInPage = dataFiltered.slice(
-    table.page * table.rowsPerPage,
-    table.page * table.rowsPerPage + table.rowsPerPage
-  );
-
-  const denseHeight = table.dense ? 52 : 72;
-
-  const canReset = !isEqual(defaultFilters, filters);
-
-  const notFound = (!dataFiltered.length && canReset) || !dataFiltered.length;
-
-  const handleFilters = useCallback(
-    (name: string, value: EmployeeTableFilterValue) => {
-      table.onResetPage();
-      setFilters((prevState: EmployeeTableFilters) => ({
-        ...prevState,
-        [name]: value,
-      }));
-    },
-    [table]
-  );
-
-  const handleFilterStatus = useCallback(
-    (event: React.SyntheticEvent, newValue: string) => {
-      handleFilters('status', newValue);
-    },
-    [handleFilters]
-  );
-
-  const handleResetFilters = useCallback(() => {
-    setFilters(defaultFilters);
-  }, []);
-
-  return (
-    <>
-      <Container maxWidth={settings.themeStretch ? false : 'lg'}>
-        <CustomBreadcrumbs
-          heading="List"
-          links={[
-            { name: 'Dashboard', href: paths.dashboard.root },
-            { name: 'Employee', href: paths.dashboard.employee.list },
-            { name: 'List' },
-          ]}
-          action={
-            <Button
-              component={RouterLink}
-              href={paths.dashboard.employee.new}
-              variant="contained"
-              startIcon={<Iconify icon="mingcute:add-line" />}
-            >
-              New Employee
-            </Button>
-          }
-          sx={{
-            mb: { xs: 3, md: 5 },
-          }}
-        />
-
-        <Card>
-          <Tabs
-            value={filters.status}
-            onChange={handleFilterStatus}
-            sx={{
-              px: 2.5,
-              boxShadow: (theme) => `inset 0 -2px 0 0 ${alpha(theme.palette.grey[500], 0.08)}`,
-            }}
-          >
-            {STATUS_OPTIONS.map((tab) => (
-              <Tab
-                key={tab.value}
-                iconPosition="end"
-                value={tab.value}
-                label={tab.label}
-                icon={
-                  <Label
-                    variant={
-                      ((tab.value === 'all' || tab.value === filters.status) && 'filled') || 'soft'
-                    }
-                    color={
-                      (tab.value === 'active' && 'success') ||
-                      (tab.value === 'inactive' && 'warning') ||
-                      'default'
-                    }
-                  >
-                    {tab.value === 'all' && employees.length}
-                    {tab.value === 'active' &&
-                      employees.filter((employee) => employee.status === 'active').length}
-                    {tab.value === 'inactive' &&
-                      employees.filter((employee) => employee.status === 'inactive').length}
-                  </Label>
-                }
-              />
-            ))}
-          </Tabs>
-
-          {canReset && (
-            <EmployeeTableFiltersResult
-              filters={filters}
-              onFilters={handleFilters}
-              onResetFilters={handleResetFilters}
-              results={dataFiltered.length}
-              sx={{ p: 2.5, pt: 0 }}
-            />
-          )}
-
-          <TableContainer sx={{ position: 'relative', overflow: 'unset' }}>
-            <Scrollbar>
-              <Table size={table.dense ? 'small' : 'medium'} sx={{ minWidth: 960 }}>
-                <TableHeadCustom
-                  order={table.order}
-                  orderBy={table.orderBy}
-                  headLabel={TABLE_HEAD}
-                  rowCount={employees.length}
-                  numSelected={table.selected.length}
-                  onSort={table.onSort}
-                />
-
-                <TableBody>
-                  {dataFiltered
-                    .slice(
-                      table.page * table.rowsPerPage,
-                      table.page * table.rowsPerPage + table.rowsPerPage
-                    )
-                    .map((row) => (
-                      <EmployeeTableRow
-                        key={row.id}
-                        row={row}
-                        selected={table.selected.includes(row.id!)}
-                        onEditRow={() => {}}
-                      />
-                    ))}
-
-                  <TableEmptyRows
-                    height={denseHeight}
-                    emptyRows={emptyRows(table.page, table.rowsPerPage, employees.length)}
-                  />
-
-                  <TableNoData notFound={notFound} />
-                </TableBody>
-              </Table>
-            </Scrollbar>
-          </TableContainer>
-
-          <TablePaginationCustom
-            count={dataFiltered.length}
-            page={table.page}
-            rowsPerPage={table.rowsPerPage}
-            onPageChange={table.onChangePage}
-            onRowsPerPageChange={table.onChangeRowsPerPage}
-            dense={table.dense}
-            onChangeDense={table.onChangeDense}
-          />
-        </Card>
-      </Container>
-    </>
-  );
-}
-
-// ----------------------------------------------------------------------
-
-function applyFilter({
-  inputData,
-  comparator,
-  filters,
-}: {
-  inputData: Employee[];
-  comparator: (a: any, b: any) => number;
-  filters: EmployeeTableFilters;
-}) {
-  const { name, status } = filters;
-
-  const stabilizedThis = inputData.map((el, index) => [el, index] as const);
-
-  stabilizedThis.sort((a, b) => {
-    const order = comparator(a[0], b[0]);
-    if (order !== 0) return order;
-    return a[1] - b[1];
-  });
-
-  inputData = stabilizedThis.map((el) => el[0]);
-
-  if (name) {
-    inputData = inputData.filter(
-      (employee) => employee.name.toLowerCase().indexOf(name.toLowerCase()) !== -1
-    );
-  }
-
-  if (status !== 'all') {
-    inputData = inputData.filter((employee) => employee.status === status);
-  }
-
-  return inputData;
-}
Index: src/sections/employee/view/index.ts
===================================================================
--- src/sections/employee/view/index.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ 	(revision )
@@ -1,2 +1,0 @@
-export { default as EmployeeListView } from './employee-list-view';
-export { default as EmployeeCreateView } from './employee-create-view';
Index: src/sections/invoice/invoice-details.tsx
===================================================================
--- src/sections/invoice/invoice-details.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/sections/invoice/invoice-details.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -18,5 +18,5 @@
 import { fCurrency } from 'src/utils/format-number';
 // types
-import { Invoice } from 'src/schemas';
+import { Invoice } from 'mvpmasters-shared';
 // components
 import Label from 'src/components/label';
@@ -28,5 +28,4 @@
 import { getQuantityType } from 'src/utils/get-invoice-quantity-type';
 import InvoiceToolbar from './invoice-toolbar';
-import { updateInvoice } from 'src/api/invoice';
 
 // ----------------------------------------------------------------------
@@ -60,8 +59,5 @@
   const handleChangeStatus = useCallback(
     async (event: React.ChangeEvent<HTMLInputElement>) => {
-      // await updateDocument(collections.invoice, invoice.id, { status: event.target.value });
-      await updateInvoice(invoice.id, {
-        status: event.target.value as 'draft' | 'processing' | 'pending' | 'overdue' | 'paid',
-      });
+      await updateDocument(collections.invoice, invoice.id, { status: event.target.value });
       mutate([collections.invoice, invoice.id]);
     },
@@ -244,7 +240,7 @@
             {invoice.invoiceTo.name}
             <br />
-            {!!invoice.invoiceTo.companyNumber && (
+            {!!invoice.invoiceTo.companyId && (
               <>
-                Company ID: {invoice.invoiceTo.companyNumber}
+                Company ID: {invoice.invoiceTo.companyId}
                 <br />
               </>
@@ -261,5 +257,5 @@
               Date Issued
             </Typography>
-            {fDate(invoice.issueDate)}
+            {fDate(invoice.createDate.toDate())}
           </Stack>
 
@@ -268,5 +264,5 @@
               Due Date
             </Typography>
-            {fDate(invoice.dueDate)}
+            {fDate(invoice.dueDate.toDate())}
           </Stack>
         </Box>
Index: src/sections/invoice/invoice-ee-pdf.tsx
===================================================================
--- src/sections/invoice/invoice-ee-pdf.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/sections/invoice/invoice-ee-pdf.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -5,5 +5,5 @@
 import { fCurrency } from 'src/utils/format-number';
 // types
-import { Invoice } from 'src/schemas';
+import { Invoice } from 'mvpmasters-shared';
 import { createFullAddress } from 'src/utils/create-full-address';
 import { getQuantityType } from 'src/utils/get-invoice-quantity-type';
@@ -129,5 +129,5 @@
     discount,
     invoiceTo,
-    issueDate,
+    createDate,
     totalAmount,
     invoiceFrom,
@@ -229,9 +229,9 @@
           <View style={styles.col6}>
             <Text style={[styles.subtitle1, styles.mb4]}>Date Issued</Text>
-            <Text style={styles.body2}>{fDate(issueDate)}</Text>
+            <Text style={styles.body2}>{fDate(createDate.toDate())}</Text>
           </View>
           <View style={styles.col6}>
             <Text style={[styles.subtitle1, styles.mb4]}>Due date</Text>
-            <Text style={styles.body2}>{fDate(dueDate)}</Text>
+            <Text style={styles.body2}>{fDate(dueDate.toDate())}</Text>
           </View>
         </View>
Index: src/sections/invoice/invoice-mk-pdf.tsx
===================================================================
--- src/sections/invoice/invoice-mk-pdf.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/sections/invoice/invoice-mk-pdf.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -5,5 +5,5 @@
 import { fCurrency } from 'src/utils/format-number';
 // types
-import { Invoice } from 'src/schemas';
+import { Invoice } from 'mvpmasters-shared';
 import { createFullAddress } from 'src/utils/create-full-address';
 import { getQuantityType } from 'src/utils/get-invoice-quantity-type';
@@ -113,5 +113,5 @@
     discount,
     invoiceTo,
-    issueDate,
+    createDate,
     totalAmount,
     invoiceFrom,
@@ -179,9 +179,9 @@
           <View style={styles.col6}>
             <Text style={[styles.subtitle1, styles.mb4]}>Date Issued</Text>
-            <Text style={styles.body2}>{fDate(issueDate)}</Text>
+            <Text style={styles.body2}>{fDate(createDate.toDate())}</Text>
           </View>
           <View style={styles.col6}>
             <Text style={[styles.subtitle1, styles.mb4]}>Due date</Text>
-            <Text style={styles.body2}>{fDate(dueDate)}</Text>
+            <Text style={styles.body2}>{fDate(dueDate.toDate())}</Text>
           </View>
         </View>
Index: src/sections/invoice/invoice-new-edit-address.tsx
===================================================================
--- src/sections/invoice/invoice-new-edit-address.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/sections/invoice/invoice-new-edit-address.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -7,5 +7,5 @@
 import Typography from '@mui/material/Typography';
 // hooks
-import { useGetTenant } from 'src/api/tenant';
+import { useGetSettings } from 'src/api/settings';
 import { useBoolean } from 'src/hooks/use-boolean';
 import { useResponsive } from 'src/hooks/use-responsive';
@@ -32,5 +32,5 @@
   const { invoiceFrom, invoiceTo } = values;
 
-  const { settings: tenant } = useGetTenant();
+  const { settings } = useGetSettings();
   const { customers } = useGetCustomers();
 
@@ -100,5 +100,5 @@
       </Stack>
 
-      {tenant && (
+      {settings && (
         <CompanyListDialog
           title="Companies"
@@ -106,6 +106,6 @@
           onClose={from.onFalse}
           selected={(selectedId: string) => invoiceFrom?.id === selectedId}
-          onSelect={(tenant) => setValue('invoiceFrom', tenant)}
-          tenant={tenant}
+          onSelect={(company) => setValue('invoiceFrom', company)}
+          list={[settings?.company, settings?.['company-ee']]}
           action={
             <Button
Index: src/sections/invoice/invoice-new-edit-details.tsx
===================================================================
--- src/sections/invoice/invoice-new-edit-details.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/sections/invoice/invoice-new-edit-details.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -14,5 +14,5 @@
 import { fCurrency } from 'src/utils/format-number';
 // types
-import { InvoiceItem } from 'src/schemas';
+import { InvoiceItem } from 'mvpmasters-shared';
 // components
 import Iconify from 'src/components/iconify';
@@ -75,26 +75,14 @@
   const handleSelectService = useCallback(
     (index: number, option: string) => {
-      const service = invoiceServices.find((service) => service.id === option);
-      if (!service) return;
-
-      const quantityType = values.quantityType?.toLowerCase();
-      let price = 0;
-
-      switch (quantityType) {
-        case 'sprint':
-          price = service.sprint;
-          break;
-        case 'hour':
-          price = service.hour;
-          break;
-        case 'month':
-          price = service.month;
-          break;
-        default:
-          price = 0;
-      }
-
-      setValue(`items[${index}].price`, price);
-      setValue(`items[${index}].total`, values.items[index].quantity * price);
+      setValue(
+        `items[${index}].price`,
+        invoiceServices.find((service) => service.id === option)?.price?.[
+          values.quantityType?.toLowerCase() as 'sprint' | 'hour' | 'month'
+        ]
+      );
+      setValue(
+        `items[${index}].total`,
+        values.items.map((item: InvoiceItem) => item.quantity * item.price)[index]
+      );
     },
     [setValue, values.items, values.quantityType, invoiceServices]
Index: src/sections/invoice/invoice-new-edit-form.tsx
===================================================================
--- src/sections/invoice/invoice-new-edit-form.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/sections/invoice/invoice-new-edit-form.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -11,5 +11,5 @@
 import { useRouter } from 'src/routes/hooks';
 // types
-import { CreateInvoice, Invoice } from 'src/schemas';
+import { Invoice } from 'mvpmasters-shared';
 // hooks
 import { useBoolean } from 'src/hooks/use-boolean';
@@ -20,13 +20,19 @@
 import uploadToFirebaseStorage from 'src/utils/upload-to-firebase-storage';
 import { pdf } from '@react-pdf/renderer';
-import { useGetTenant } from 'src/api/tenant';
-import { collections, generateId, updateDocument } from 'src/lib/firestore';
+import { useGetSettings } from 'src/api/settings';
+import {
+  collections,
+  documents,
+  firestoreBatch,
+  generateId,
+  updateDocument,
+} from 'src/lib/firestore';
 import { useGetServices } from 'src/api/service';
 import { mutate } from 'swr';
+import { Timestamp } from 'firebase/firestore';
 import InvoiceNewEditStatusDate from './invoice-new-edit-status-date';
 import InvoiceNewEditAddress from './invoice-new-edit-address';
 import InvoiceNewEditDetails from './invoice-new-edit-details';
 import InvoicePDF from './invoice-pdf';
-import { createInvoice, updateInvoice } from 'src/api/invoice';
 
 // ----------------------------------------------------------------------
@@ -52,13 +58,4 @@
 ];
 
-interface InvoiceItem {
-  service: string | null;
-  title: string;
-  price: number;
-  total: number;
-  quantity: number;
-  description: string;
-}
-
 export default function InvoiceNewEditForm({ isCopy, currentInvoice }: Props) {
   const router = useRouter();
@@ -72,7 +69,5 @@
     description: Yup.string().required('Description is required'),
     service: Yup.string().nullable(),
-    quantity: Yup.number()
-      .required('Quantity is required')
-      .min(0.5, 'Quantity must be at least 0.5'),
+    quantity: Yup.number().required('Quantity is required').min(0.5, 'Quantity must be at least 1'),
     price: Yup.number().required('Price is required').min(0, 'Price must be at least 0'),
     total: Yup.number().required('Total is required').min(0, 'Total must be at least 0'),
@@ -81,5 +76,5 @@
   const NewInvoiceSchema = Yup.object().shape({
     invoiceNumber: Yup.string().nullable().required('Invoice number is required'),
-    issueDate: Yup.mixed<any>().nullable().required('Create date is required'),
+    createDate: Yup.mixed<any>().nullable().required('Create date is required'),
     dueDate: Yup.mixed<any>()
       .required('Due date is required')
@@ -87,5 +82,5 @@
         'date-min',
         'Due date must be later than create date',
-        (value, { parent }) => value.getTime() > parent.issueDate.getTime()
+        (value, { parent }) => value.getTime() > parent.createDate.getTime()
       ),
     invoiceFrom: Yup.mixed<any>().nullable().required('Invoice from is required'),
@@ -96,5 +91,5 @@
       .required('Quantity type is required'),
     month: Yup.string().oneOf(monthNames).required('Month is required'),
-    status: Yup.string().oneOf(['draft', 'processing', 'pending', 'overdue', 'paid']).required(),
+    status: Yup.string().required(),
     totalAmount: Yup.number().required(),
     // not required
@@ -108,6 +103,5 @@
 
   const { services: invoiceServices } = useGetServices();
-  console.log('invoiceServices', invoiceServices);
-  const { settings: tenant, settingsEmpty, settingsLoading } = useGetTenant();
+  const { settings, settingsEmpty, settingsLoading } = useGetSettings();
 
   const defaultValues = useMemo(
@@ -116,9 +110,7 @@
         !isCopy && currentInvoice?.invoiceNumber
           ? currentInvoice?.invoiceNumber
-          : incrementInvoiceNumber(tenant?.lastInvoiceNumber),
-      issueDate: currentInvoice?.issueDate ? new Date(currentInvoice.issueDate) : new Date(),
-      dueDate: currentInvoice?.dueDate
-        ? new Date(currentInvoice.dueDate)
-        : new Date(Date.now() + 30 * 24 * 60 * 60 * 1000),
+          : incrementInvoiceNumber(settings?.invoice?.lastInvoiceNumber),
+      createDate: currentInvoice?.createDate?.toDate() || new Date(),
+      dueDate: currentInvoice?.dueDate?.toDate() || null,
       invoiceFrom: currentInvoice?.invoiceFrom || null,
       invoiceTo: currentInvoice?.invoiceTo || null,
@@ -146,5 +138,5 @@
       totalAmount: currentInvoice?.totalAmount || 0,
     }),
-    [currentInvoice, isCopy, tenant]
+    [currentInvoice, isCopy, settings]
   );
 
@@ -172,16 +164,6 @@
 
     try {
+      // generate collection id
       const id = generateId(collections.invoice);
-
-      // Ensure dates are valid Date objects
-      const issueDate = data.issueDate instanceof Date ? data.issueDate : new Date(data.issueDate);
-      const dueDate = data.dueDate instanceof Date ? data.dueDate : new Date(data.dueDate);
-
-      const currentTime = new Date();
-      issueDate.setHours(
-        currentTime.getHours(),
-        currentTime.getMinutes(),
-        currentTime.getSeconds()
-      );
 
       // attach serivce details
@@ -191,16 +173,21 @@
       }));
 
+      const currentTime = new Date();
+      const createDateWithCurrentTime = new Date(data.createDate); // This creates a date object using the date from data.createDate
+      // Set the time of createDateWithCurrentTime to the current hour, minutes, and seconds
+      createDateWithCurrentTime.setHours(
+        currentTime.getHours(),
+        currentTime.getMinutes(),
+        currentTime.getSeconds()
+      );
+
       // transform data
-      const writeData: CreateInvoice = {
+      const writeData = {
         ...data,
-        invoiceNumber: incrementInvoiceNumber(tenant?.lastInvoiceNumber),
+        invoiceNumber: incrementInvoiceNumber(settings?.invoice.lastInvoiceNumber),
         status: 'draft',
-        issueDate,
-        dueDate,
-        items: items.filter((item) => item.service !== null) as CreateInvoice['items'],
-        subTotal: data.totalAmount - (data.taxes || 0) - (data.discount || 0),
-        month: data.month as Invoice['month'],
-        invoiceFrom: data.invoiceFrom!,
-        invoiceTo: data.invoiceTo!,
+        createDate: Timestamp.fromDate(createDateWithCurrentTime),
+        dueDate: Timestamp.fromDate(new Date(data.dueDate)),
+        items,
       };
 
@@ -208,25 +195,23 @@
       const invoicePdf = <InvoicePDF invoice={writeData as Invoice} currentStatus="pending" />;
       const blob: Blob = await pdf(invoicePdf).toBlob();
-      const storagePath: string = `invoices/${writeData.invoiceTo.name}-${writeData.invoiceNumber}.pdf`;
+      const storagePath: string = `invoices/${writeData.invoiceTo.name}/${id}-${writeData.invoiceNumber}.pdf`;
       await uploadToFirebaseStorage(blob, storagePath);
 
       // write to DB
-      // await firestoreBatch([
-      //   {
-      //     docPath: `${collections.invoice}/${id}`,
-      //     type: 'set',
-      //     data: {
-      //       ...writeData,
-      //       pdfRef: storagePath,
-      //     },
-      //   },
-      //   {
-      //     docPath: `${collections.settings}/${documents.settingsInvoice}`,
-      //     type: 'set',
-      //     data: { lastInvoiceNumber: writeData.invoiceNumber },
-      //   },
-      // ]);
-
-      await createInvoice({ ...writeData, pdfRef: storagePath });
+      await firestoreBatch([
+        {
+          docPath: `${collections.invoice}/${id}`,
+          type: 'set',
+          data: {
+            ...writeData,
+            pdfRef: storagePath,
+          },
+        },
+        {
+          docPath: `${collections.settings}/${documents.settingsInvoice}`,
+          type: 'set',
+          data: { lastInvoiceNumber: writeData.invoiceNumber },
+        },
+      ]);
 
       loadingSave.onFalse();
@@ -244,9 +229,4 @@
     try {
       if (currentInvoice) {
-        // Ensure dates are valid Date objects
-        const issueDate =
-          data.issueDate instanceof Date ? data.issueDate : new Date(data.issueDate);
-        const dueDate = data.dueDate instanceof Date ? data.dueDate : new Date(data.dueDate);
-
         // attach serivce details
         const items = data.items.map((item) => ({
@@ -258,9 +238,7 @@
         const writeData = {
           ...data,
-          issueDate,
-          dueDate,
+          createDate: Timestamp.fromDate(new Date(data.createDate)),
+          dueDate: Timestamp.fromDate(new Date(data.dueDate)),
           items,
-          invoiceFrom: data.invoiceFrom!,
-          invoiceTo: data.invoiceTo!,
         };
 
@@ -268,50 +246,18 @@
         const invoicePdf = <InvoicePDF invoice={writeData as Invoice} currentStatus="pending" />;
         const blob: Blob = await pdf(invoicePdf).toBlob();
-        const storagePath: string = `invoices/${data.invoiceTo.name}-${data.invoiceNumber}.pdf`;
+        const storagePath: string = `invoices/${data.invoiceTo.name}/${currentInvoice.id}-${data.invoiceNumber}.pdf`;
         await uploadToFirebaseStorage(blob, storagePath);
 
         // update DB
-        // await updateDocument(collections.invoice, currentInvoice.id, {
-        //   ...writeData,
-        //   pdfRef: storagePath,
-        // });
-
-        await updateInvoice(currentInvoice.id, {
+        await updateDocument(collections.invoice, currentInvoice.id, {
           ...writeData,
           pdfRef: storagePath,
-          status: data.status as 'draft' | 'processing' | 'pending' | 'overdue' | 'paid',
-          month: data.month as
-            | 'January'
-            | 'February'
-            | 'March'
-            | 'April'
-            | 'May'
-            | 'June'
-            | 'July'
-            | 'August'
-            | 'September'
-            | 'October'
-            | 'November'
-            | 'December',
-          items: items.filter((item) => item.service !== null) as {
-            service: { id: string; month: number; name: string; sprint: number; hour: number };
-            title: string;
-            price: number;
-            total: number;
-            quantity: number;
-            description: string;
-          }[],
         });
 
         // mutate current data
-        // mutate([collections.invoice, currentInvoice.id]);
+        mutate([collections.invoice, currentInvoice.id]);
       } else {
         // generate collection id
         const id = generateId(collections.invoice);
-
-        // Ensure dates are valid Date objects
-        const issueDate =
-          data.issueDate instanceof Date ? data.issueDate : new Date(data.issueDate);
-        const dueDate = data.dueDate instanceof Date ? data.dueDate : new Date(data.dueDate);
 
         // attach serivce details
@@ -324,9 +270,7 @@
         const writeData = {
           ...data,
-          issueDate,
-          dueDate,
+          createDate: Timestamp.fromDate(new Date(data.createDate)),
+          dueDate: Timestamp.fromDate(new Date(data.dueDate)),
           items,
-          invoiceFrom: data.invoiceFrom!,
-          invoiceTo: data.invoiceTo!,
         };
 
@@ -334,24 +278,23 @@
         const invoicePdf = <InvoicePDF invoice={writeData as Invoice} currentStatus="pending" />;
         const blob: Blob = await pdf(invoicePdf).toBlob();
-        const storagePath: string = `invoices/${data.invoiceTo.name}-${data.invoiceNumber}.pdf`;
+        const storagePath: string = `invoices/${data.invoiceTo.name}/${id}-${data.invoiceNumber}.pdf`;
         await uploadToFirebaseStorage(blob, storagePath);
 
         // write to DB
-        // await firestoreBatch([
-        //   {
-        //     docPath: `${collections.invoice}/${id}`,
-        //     type: 'set',
-        //     data: {
-        //       ...writeData,
-        //       pdfRef: storagePath,
-        //     },
-        //   },
-        //   {
-        //     docPath: `${collections.settings}/${documents.settingsInvoice}`,
-        //     type: 'set',
-        //     data: { lastInvoiceNumber: writeData.invoiceNumber },
-        //   },
-        // ]);
-        await createInvoice({ ...writeData, pdfRef: storagePath });
+        await firestoreBatch([
+          {
+            docPath: `${collections.invoice}/${id}`,
+            type: 'set',
+            data: {
+              ...writeData,
+              pdfRef: storagePath,
+            },
+          },
+          {
+            docPath: `${collections.settings}/${documents.settingsInvoice}`,
+            type: 'set',
+            data: { lastInvoiceNumber: writeData.invoiceNumber },
+          },
+        ]);
 
         reset();
@@ -371,5 +314,5 @@
     <FormProvider methods={methods}>
       <Card>
-        {!!tenant && <InvoiceNewEditAddress />}
+        {settings?.company && <InvoiceNewEditAddress />}
 
         <InvoiceNewEditStatusDate isCopy={isCopy} />
Index: src/sections/invoice/invoice-new-edit-status-date.tsx
===================================================================
--- src/sections/invoice/invoice-new-edit-status-date.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/sections/invoice/invoice-new-edit-status-date.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -7,5 +7,5 @@
 import { RHFSelect, RHFTextField } from 'src/components/hook-form';
 // api
-// import { useGetTenant } from 'src/api/settings';
+import { useGetSettings } from 'src/api/settings';
 // utils
 import { incrementInvoiceNumber } from 'src/utils/increment-invoice-number';
@@ -33,5 +33,5 @@
   const values = watch();
 
-  // const { settings } = useGetTenant();
+  const { settings } = useGetSettings();
 
   return (
@@ -109,5 +109,5 @@
 
       <Controller
-        name="issueDate"
+        name="createDate"
         control={control}
         render={({ field, fieldState: { error } }) => (
Index: src/sections/invoice/invoice-pdf.tsx
===================================================================
--- src/sections/invoice/invoice-pdf.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/sections/invoice/invoice-pdf.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -1,3 +1,3 @@
-import { Invoice } from 'src/schemas';
+import { Invoice } from 'mvpmasters-shared';
 import InvoiceEEPDF from './invoice-ee-pdf';
 import InvoiceMKPDF from './invoice-mk-pdf';
Index: src/sections/invoice/invoice-table-filters-result.tsx
===================================================================
--- src/sections/invoice/invoice-table-filters-result.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/sections/invoice/invoice-table-filters-result.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -6,5 +6,5 @@
 import Stack, { StackProps } from '@mui/material/Stack';
 // types
-import { InvoiceTableFilters, InvoiceTableFilterValue } from 'src/schemas';
+import { InvoiceTableFilters, InvoiceTableFilterValue } from 'mvpmasters-shared';
 // components
 import Iconify from 'src/components/iconify';
Index: src/sections/invoice/invoice-table-row.tsx
===================================================================
--- src/sections/invoice/invoice-table-row.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/sections/invoice/invoice-table-row.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -16,5 +16,5 @@
 import { fNumber } from 'src/utils/format-number';
 // types
-import { Invoice } from 'src/schemas';
+import { Invoice } from 'mvpmasters-shared';
 // components
 import Label from 'src/components/label';
@@ -51,5 +51,5 @@
     sent,
     invoiceNumber,
-    issueDate,
+    createDate,
     dueDate,
     status,
@@ -59,6 +59,4 @@
     month,
   } = row;
-
-  console.log(issueDate);
 
   const confirmSend = useBoolean();
@@ -107,6 +105,6 @@
         <TableCell>
           <ListItemText
-            primary={format(new Date(issueDate), 'dd MMM yyyy')}
-            secondary={format(new Date(issueDate), 'p')}
+            primary={format(createDate.toDate(), 'dd MMM yyyy')}
+            secondary={format(createDate.toDate(), 'p')}
             primaryTypographyProps={{ typography: 'body2', noWrap: true }}
             secondaryTypographyProps={{
@@ -120,6 +118,6 @@
         <TableCell>
           <ListItemText
-            primary={format(new Date(dueDate), 'dd MMM yyyy')}
-            secondary={format(new Date(dueDate), 'p')}
+            primary={format(dueDate.toDate(), 'dd MMM yyyy')}
+            secondary={format(dueDate.toDate(), 'p')}
             primaryTypographyProps={{ typography: 'body2', noWrap: true }}
             secondaryTypographyProps={{
Index: src/sections/invoice/invoice-table-toolbar.tsx
===================================================================
--- src/sections/invoice/invoice-table-toolbar.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/sections/invoice/invoice-table-toolbar.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -7,5 +7,5 @@
 import InputAdornment from '@mui/material/InputAdornment';
 // types
-import { InvoiceTableFilters, InvoiceTableFilterValue } from 'src/schemas';
+import { InvoiceTableFilters, InvoiceTableFilterValue } from 'mvpmasters-shared';
 // components
 import Iconify from 'src/components/iconify';
Index: src/sections/invoice/invoice-toolbar.tsx
===================================================================
--- src/sections/invoice/invoice-toolbar.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/sections/invoice/invoice-toolbar.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -18,5 +18,5 @@
 import { useBoolean } from 'src/hooks/use-boolean';
 // types
-import { Invoice } from 'src/schemas';
+import { Invoice } from 'mvpmasters-shared';
 // components
 import Iconify from 'src/components/iconify';
Index: src/sections/invoice/mail-compose.tsx
===================================================================
--- src/sections/invoice/mail-compose.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/sections/invoice/mail-compose.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -13,5 +13,5 @@
 import Iconify from 'src/components/iconify';
 import Editor from 'src/components/editor';
-import { Invoice } from 'src/schemas';
+import { Invoice } from 'mvpmasters-shared';
 import FormProvider from 'src/components/hook-form/form-provider';
 import { RHFTextField } from 'src/components/hook-form';
Index: src/sections/invoice/view/invoice-edit-view.tsx
===================================================================
--- src/sections/invoice/view/invoice-edit-view.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/sections/invoice/view/invoice-edit-view.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -23,5 +23,4 @@
 
   const { currentInvoice } = useGetInvoice({ id });
-  console.log('currentInvoice', currentInvoice);
 
   return (
Index: src/sections/invoice/view/invoice-list-view.tsx
===================================================================
--- src/sections/invoice/view/invoice-list-view.tsx	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/sections/invoice/view/invoice-list-view.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -36,9 +36,14 @@
 } from 'src/components/table';
 // types
-import { Invoice, InvoiceStatus, InvoiceTableFilters, InvoiceTableFilterValue } from 'src/schemas';
+import {
+  Invoice,
+  InvoiceStatus,
+  InvoiceTableFilters,
+  InvoiceTableFilterValue,
+} from 'mvpmasters-shared';
 //
 import deleteFromFirebaseStorage from 'src/utils/delete-from-firebase-storage';
 // fetch
-import { useDeleteInvoice, useGetInvoices } from 'src/api/invoice';
+import { useGetInvoices } from 'src/api/invoice';
 import { collections, removeDocument } from 'src/lib/firestore';
 import { mutate } from 'swr';
@@ -49,6 +54,4 @@
 import InvoiceTableToolbar from '../invoice-table-toolbar';
 import MailCompose from '../mail-compose';
-import { useFetchAnalytics } from 'src/api/invoice/use-fetch-analytics';
-import { endpoints } from 'src/utils/axios';
 
 // ----------------------------------------------------------------------
@@ -59,5 +62,5 @@
   { id: 'currency', label: 'Currency' },
   { id: 'invoicePeriod', label: 'Invoice Period' },
-  { id: 'issueDate', label: 'Create' },
+  { id: 'createDate', label: 'Create' },
   { id: 'dueDate', label: 'Due' },
   { id: 'sent', label: 'Sent', align: 'center' },
@@ -152,5 +155,5 @@
 
   const table = useTable({
-    defaultOrderBy: 'issueDate',
+    defaultOrderBy: 'createDate',
     defaultOrder: 'desc',
     defaultDense: true,
@@ -160,5 +163,9 @@
   const [filters, setFilters] = useState(defaultFilters);
 
-  const { invoices: tableData } = useGetInvoices({ startDate: filters.startDate?.toISOString() });
+  const { invoices: tableData } = useGetInvoices({
+    where: [['createDate', '>=', filters.startDate]],
+    orderBy: 'createDate',
+    direction: 'desc',
+  });
 
   const invoiceMutationKey = useMemo(
@@ -166,6 +173,6 @@
       collections.invoice,
       JSON.stringify({
-        where: [['issueDate', '>=', filters.startDate]],
-        orderBy: 'issueDate',
+        where: [['createDate', '>=', filters.startDate]],
+        orderBy: 'createDate',
         direction: 'desc',
       }),
@@ -210,21 +217,13 @@
   //   );
 
-  const {
-    analytics: analyticsData,
-    isAnalyticsLoading,
-    analyticsError,
-  } = useFetchAnalytics(filters.startDate);
-
   useEffect(() => {
-    if (analyticsData) {
-      setAnalytics(analyticsData);
+    if (tableData) {
+      const getAnalytics = async () => {
+        const analyticsStats = await getTotalAmountForAllStatuses(tableData);
+        setAnalytics(analyticsStats);
+      };
+      getAnalytics();
     }
-  }, [analyticsData]);
-
-  useEffect(() => {
-    if (analyticsError) {
-      console.error('Failed to load analytics:', analyticsError);
-    }
-  }, [analyticsError]);
+  }, [tableData]);
 
   const getPercentByStatus = (status: string) =>
@@ -270,20 +269,26 @@
   );
 
-  const { deleteInvoiceMutation } = useDeleteInvoice();
-
   const handleDeleteRow = useCallback(
     async (invoice: Invoice) => {
       const serializedParams = JSON.stringify({
-        where: [['issueDate', '>=', filters.startDate]],
-        orderBy: 'issueDate',
+        where: [['createDate', '>=', filters.startDate]],
+        orderBy: 'createDate',
         direction: 'desc',
-      });
-
-      await deleteInvoiceMutation(invoice.id);
+      }); // Get the same params as used in useGetInvoices
+
+      // Optimistically update the cache before the deletion
+      // mutate(
+      //   [collections.invoice, serializedParams],
+      //   (invoices: Invoice[] = []) => invoices.filter((row) => row.id !== invoice.id),
+      //   false
+      // );
+
+      await removeDocument(collections.invoice, invoice.id);
       await deleteFromFirebaseStorage(
-        `invoices/${invoice.invoiceTo.name}-${invoice.invoiceNumber}.pdf`
+        `invoices/${invoice.invoiceTo.name}/${invoice.id}-${invoice.invoiceNumber}.pdf`
       );
 
-      mutate(endpoints.invoice);
+      // Optionally, rollback optimistic update or refetch data
+      mutate(invoiceMutationKey);
     },
     [filters.startDate, invoiceMutationKey]
@@ -342,8 +347,4 @@
     setFilters(defaultFilters);
   }, []);
-
-  if (isAnalyticsLoading) {
-    // Show loading state
-  }
 
   return (
@@ -671,6 +672,6 @@
       inputData = inputData.filter(
         (invoice) =>
-          fTimestamp(invoice.issueDate.getTime()) >= fTimestamp(startDate.getTime()) &&
-          fTimestamp(invoice.issueDate.getTime()) <= fTimestamp(endDate.getTime())
+          fTimestamp(invoice.createDate.toMillis()) >= fTimestamp(startDate) &&
+          fTimestamp(invoice.createDate.toMillis()) <= fTimestamp(endDate)
       );
     }
Index: src/sections/user/customer-new-edit-form.tsx
===================================================================
--- src/sections/user/customer-new-edit-form.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/user/customer-new-edit-form.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -0,0 +1,256 @@
+import * as Yup from 'yup';
+import { useCallback, useMemo } from 'react';
+import { useForm, Controller } from 'react-hook-form';
+import { zodResolver } from '@hookform/resolvers/zod';
+// @mui
+import LoadingButton from '@mui/lab/LoadingButton';
+import Box from '@mui/material/Box';
+import Card from '@mui/material/Card';
+import Stack from '@mui/material/Stack';
+import Switch from '@mui/material/Switch';
+import Grid from '@mui/material/Unstable_Grid2';
+import Typography from '@mui/material/Typography';
+import FormControlLabel from '@mui/material/FormControlLabel';
+// utils
+import { fData } from 'src/utils/format-number';
+// routes
+import { paths } from 'src/routes/paths';
+import { useRouter } from 'src/routes/hooks';
+// types
+import { Customer, NewCustomer, newCustomerSchema } from 'mvpmasters-shared';
+// components
+import Label from 'src/components/label';
+import { useSnackbar } from 'src/components/snackbar';
+import FormProvider, { RHFTextField, RHFUploadAvatar } from 'src/components/hook-form';
+import uploadToFirebaseStorage from 'src/utils/upload-to-firebase-storage';
+import { addDoc, collection } from 'firebase/firestore';
+import { db } from 'src/lib/firebase';
+import { createCustomer } from 'src/api/customer';
+
+// ----------------------------------------------------------------------
+
+type Props = {
+  currentUser?: Customer;
+};
+
+export default function CustomerNewEditForm({ currentUser: currentCustomer }: Props) {
+  const router = useRouter();
+
+  const { enqueueSnackbar } = useSnackbar();
+
+  const defaultValues: NewCustomer = useMemo(
+    () => ({
+      name: currentCustomer?.name || '',
+      representative: currentCustomer?.representative || '',
+      email: currentCustomer?.email || '',
+      logoUrl: currentCustomer?.logoUrl || null,
+      address: currentCustomer?.address || {
+        country: '',
+        state: '',
+        street: '',
+        zip: '',
+        city: '',
+      },
+      vatNumber: currentCustomer?.vatNumber || '',
+      companyId: currentCustomer?.companyId || '',
+      companyNumber: currentCustomer?.companyNumber || '',
+      id: currentCustomer?.id || '',
+      phoneNumber: currentCustomer?.phoneNumber || '',
+      status: 'active',
+    }),
+    [currentCustomer]
+  );
+
+  const methods = useForm({
+    resolver: zodResolver(newCustomerSchema),
+    defaultValues,
+  });
+
+  const {
+    reset,
+    watch,
+    control,
+    setValue,
+    handleSubmit,
+    formState: { isSubmitting },
+  } = methods;
+
+  const values = watch();
+
+  const onSubmit = handleSubmit(async (data) => {
+    try {
+      // await new Promise((resolve) => setTimeout(resolve, 500));
+      const logoFile = data.logoUrl as File & { preview: string };
+
+      const storagePath: string = `customers/${logoFile.name}`;
+      const logoUrl = await uploadToFirebaseStorage(logoFile, storagePath);
+
+      // const customersRef = collection(db, 'customers');
+      // await addDoc(customersRef, { ...data, logoUrl });
+      await createCustomer({ ...data, logoUrl });
+
+      reset();
+      enqueueSnackbar(currentCustomer ? 'Update success!' : 'Create success!');
+      router.push(paths.dashboard.customer.list);
+      console.info('DATA', data);
+    } catch (error) {
+      console.error(error);
+    }
+  });
+
+  const handleDrop = useCallback(
+    (acceptedFiles: File[]) => {
+      const file = acceptedFiles[0];
+
+      const newFile = Object.assign(file, {
+        preview: URL.createObjectURL(file),
+      });
+
+      if (file) {
+        setValue('logoUrl', newFile, { shouldValidate: true });
+      }
+    },
+    [setValue]
+  );
+
+  return (
+    <FormProvider methods={methods} onSubmit={onSubmit}>
+      <Grid container spacing={3}>
+        <Grid xs={12} md={4}>
+          <Card sx={{ pt: 10, pb: 5, px: 3 }}>
+            {currentCustomer && (
+              <Label
+                color={
+                  (values.status === 'active' && 'success') ||
+                  (values.status === 'banned' && 'error') ||
+                  'warning'
+                }
+                sx={{ position: 'absolute', top: 24, right: 24 }}
+              >
+                {values.status}
+              </Label>
+            )}
+
+            <Box sx={{ mb: 5 }}>
+              <RHFUploadAvatar
+                name="logoUrl"
+                maxSize={3145728}
+                onDrop={handleDrop}
+                helperText={
+                  <Typography
+                    variant="caption"
+                    sx={{
+                      mt: 3,
+                      mx: 'auto',
+                      display: 'block',
+                      textAlign: 'center',
+                      color: 'text.disabled',
+                    }}
+                  >
+                    Allowed *.jpeg, *.jpg, *.png, *.gif
+                    <br /> max size of {fData(3145728)}
+                  </Typography>
+                }
+              />
+            </Box>
+
+            {currentCustomer && (
+              <FormControlLabel
+                labelPlacement="start"
+                control={
+                  <Controller
+                    name="status"
+                    control={control}
+                    render={({ field }) => (
+                      <Switch
+                        {...field}
+                        checked={field.value !== 'active'}
+                        onChange={(event) =>
+                          field.onChange(event.target.checked ? 'banned' : 'active')
+                        }
+                      />
+                    )}
+                  />
+                }
+                label={
+                  <>
+                    <Typography variant="subtitle2" sx={{ mb: 0.5 }}>
+                      Banned
+                    </Typography>
+                    <Typography variant="body2" sx={{ color: 'text.secondary' }}>
+                      Apply disable account
+                    </Typography>
+                  </>
+                }
+                sx={{ mx: 0, mb: 3, width: 1, justifyContent: 'space-between' }}
+              />
+            )}
+          </Card>
+        </Grid>
+
+        <Grid xs={12} md={8}>
+          <Card sx={{ p: 3 }}>
+            <Box
+              rowGap={3}
+              columnGap={2}
+              display="grid"
+              gridTemplateColumns={{
+                xs: 'repeat(1, 1fr)',
+                sm: 'repeat(2, 1fr)',
+              }}
+            >
+              <RHFTextField name="name" label="Name" />
+              <RHFTextField name="email" label="Email Address" />
+              <RHFTextField name="representative" label="Representative" />
+              <RHFTextField name="phoneNumber" label="Phone Number" />
+
+              <RHFTextField name="address.country" label="Country" />
+
+              {/* <RHFAutocomplete
+                name="address.country"
+                label="Country"
+                options={countries.map((country) => country.label)}
+                getOptionLabel={(option) => option}
+                isOptionEqualToValue={(option, value) => option === value}
+                renderOption={(props, option) => {
+                  const { code, label, phone } = countries.filter(
+                    (country) => country.label === option
+                  )[0];
+
+                  if (!label) {
+                    return null;
+                  }
+
+                  return (
+                    <li {...props} key={label}>
+                      <Iconify
+                        key={label}
+                        icon={`circle-flags:${code.toLowerCase()}`}
+                        width={28}
+                        sx={{ mr: 1 }}
+                      />
+                      {label} ({code}) +{phone}
+                    </li>
+                  );
+                }}
+              /> */}
+
+              <RHFTextField name="address.state" label="State/Region" />
+              <RHFTextField name="address.city" label="City" />
+              <RHFTextField name="address.street" label="Street" />
+              <RHFTextField name="address.zip" label="Zip/Code" />
+              <RHFTextField name="vatNumber" label="VAT" />
+              <RHFTextField name="companyNumber" label="Company Number" />
+            </Box>
+
+            <Stack alignItems="flex-end" sx={{ mt: 3 }}>
+              <LoadingButton type="submit" variant="contained" loading={isSubmitting}>
+                {!currentCustomer ? 'Create Customer' : 'Save Changes'}
+              </LoadingButton>
+            </Stack>
+          </Card>
+        </Grid>
+      </Grid>
+    </FormProvider>
+  );
+}
Index: src/sections/user/customer-quick-edit-form.tsx
===================================================================
--- src/sections/user/customer-quick-edit-form.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/user/customer-quick-edit-form.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -0,0 +1,193 @@
+import * as Yup from 'yup';
+import { useMemo } from 'react';
+import { useForm } from 'react-hook-form';
+import { zodResolver } from '@hookform/resolvers/zod';
+// @mui
+import LoadingButton from '@mui/lab/LoadingButton';
+import Box from '@mui/material/Box';
+import Alert from '@mui/material/Alert';
+import Button from '@mui/material/Button';
+import Dialog from '@mui/material/Dialog';
+import MenuItem from '@mui/material/MenuItem';
+import DialogTitle from '@mui/material/DialogTitle';
+import DialogActions from '@mui/material/DialogActions';
+import DialogContent from '@mui/material/DialogContent';
+// types
+import { Customer, customerSchema } from 'mvpmasters-shared';
+// assets
+import { countries } from 'src/assets/data';
+// components
+import Iconify from 'src/components/iconify';
+import { useSnackbar } from 'src/components/snackbar';
+import FormProvider, { RHFSelect, RHFTextField, RHFAutocomplete } from 'src/components/hook-form';
+import { doc, setDoc } from 'firebase/firestore';
+import { db } from 'src/lib/firebase';
+import { mutate } from 'swr';
+import { collections } from 'src/lib/firestore';
+
+// ----------------------------------------------------------------------
+
+export const USER_STATUS_OPTIONS = [
+  { value: 'active', label: 'Active' },
+  { value: 'banned', label: 'Banned' },
+  { value: 'inactive', label: 'Inactive' },
+];
+
+type Props = {
+  open: boolean;
+  onClose: VoidFunction;
+  currentCustomer?: Customer;
+};
+
+export default function CustomerQuickEditForm({ currentCustomer, open, onClose }: Props) {
+  const { enqueueSnackbar } = useSnackbar();
+
+  // @ts-ignore
+  const defaultValues: Customer = useMemo(
+    () => ({
+      name: currentCustomer?.name || '',
+      representative: currentCustomer?.representative || '',
+      email: currentCustomer?.email || '',
+      logoUrl: currentCustomer?.logoUrl || '',
+      address: {
+        country: currentCustomer?.address?.country || '',
+        state: currentCustomer?.address?.state || '',
+        street: currentCustomer?.address?.street || '',
+        zip: currentCustomer?.address?.zip || '',
+        city: currentCustomer?.address?.city || '',
+      },
+      vatNumber: currentCustomer?.vatNumber || '',
+      companyId: currentCustomer?.companyId || '',
+      companyNumber: currentCustomer?.companyNumber || '',
+      id: currentCustomer?.id || '',
+      phoneNumber: currentCustomer?.phoneNumber || '',
+      status: currentCustomer?.status || '',
+    }),
+    [currentCustomer]
+  );
+
+  const methods = useForm({
+    resolver: zodResolver(customerSchema),
+    defaultValues,
+  });
+
+  const {
+    reset,
+    handleSubmit,
+    formState: { isSubmitting },
+  } = methods;
+
+  const onSubmit = handleSubmit(async (data) => {
+    try {
+      if (!currentCustomer) return;
+      // await new Promise((resolve) => setTimeout(resolve, 500));
+
+      const docRef = doc(db, 'customers', currentCustomer.id!);
+      await setDoc(docRef, data, { merge: true });
+      mutate(collections.customer);
+
+      reset();
+      onClose();
+      enqueueSnackbar('Update success!');
+      console.info('DATA', data);
+    } catch (error) {
+      console.error(error);
+    }
+  });
+
+  return (
+    <Dialog
+      fullWidth
+      maxWidth={false}
+      open={open}
+      onClose={onClose}
+      PaperProps={{
+        sx: { maxWidth: 720 },
+      }}
+    >
+      <FormProvider methods={methods} onSubmit={onSubmit}>
+        <DialogTitle>Quick Update</DialogTitle>
+
+        <DialogContent>
+          {/* <Alert variant="outlined" severity="info" sx={{ mb: 3 }}>
+            Account is waiting for confirmation
+          </Alert> */}
+
+          <Box
+            rowGap={3}
+            columnGap={2}
+            display="grid"
+            sx={{ mt: 3 }}
+            gridTemplateColumns={{
+              xs: 'repeat(1, 1fr)',
+              sm: 'repeat(2, 1fr)',
+            }}
+          >
+            <RHFSelect name="status" label="Status">
+              <MenuItem key="none" value="" />
+              {USER_STATUS_OPTIONS.map((status) => (
+                <MenuItem key={status.value} value={status.value}>
+                  {status.label}
+                </MenuItem>
+              ))}
+            </RHFSelect>
+
+            <Box sx={{ display: { xs: 'none', sm: 'block' } }} />
+
+            <RHFTextField name="name" label="Name" />
+            <RHFTextField name="representative" label="Representative" />
+            <RHFTextField name="email" label="Email Address" />
+            <RHFTextField name="phoneNumber" label="Phone Number" />
+
+            <RHFTextField name="address.country" label="Country" />
+
+            {/* <RHFAutocomplete
+              name="address.country"
+              label="Country"
+              options={countries.map((country) => country.code)}
+              getOptionLabel={(option) => option}
+              renderOption={(props, option) => {
+                const { code, label, phone } = countries.filter(
+                  (country) => country.label === option
+                )[0];
+
+                if (!label) {
+                  return null;
+                }
+
+                return (
+                  <li {...props} key={label}>
+                    <Iconify
+                      key={label}
+                      icon={`circle-flags:${code.toLowerCase()}`}
+                      width={28}
+                      sx={{ mr: 1 }}
+                    />
+                    {label} ({code}) +{phone}
+                  </li>
+                );
+              }}
+            /> */}
+
+            <RHFTextField name="address.state" label="State/Region" />
+            <RHFTextField name="address.city" label="City" />
+            <RHFTextField name="address.street" label="Street" />
+            <RHFTextField name="address.zip" label="Zip/Code" />
+            <RHFTextField name="vatNumber" label="VAT" />
+            <RHFTextField name="companyNumber" label="Company Number" />
+          </Box>
+        </DialogContent>
+
+        <DialogActions>
+          <Button variant="outlined" onClick={onClose}>
+            Cancel
+          </Button>
+
+          <LoadingButton type="submit" variant="contained" loading={isSubmitting}>
+            Update
+          </LoadingButton>
+        </DialogActions>
+      </FormProvider>
+    </Dialog>
+  );
+}
Index: src/sections/user/customer-table-filters-result.tsx
===================================================================
--- src/sections/user/customer-table-filters-result.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/user/customer-table-filters-result.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -0,0 +1,109 @@
+// @mui
+import Box from '@mui/material/Box';
+import Chip from '@mui/material/Chip';
+import Paper from '@mui/material/Paper';
+import Button from '@mui/material/Button';
+import Stack, { StackProps } from '@mui/material/Stack';
+// types
+
+// components
+import Iconify from 'src/components/iconify';
+import { CustomerTableFilterValue, CustomerTableFilters } from 'mvpmasters-shared';
+
+// ----------------------------------------------------------------------
+
+type Props = StackProps & {
+  filters: CustomerTableFilters;
+  onFilters: (name: string, value: CustomerTableFilterValue) => void;
+  //
+  onResetFilters: VoidFunction;
+  //
+  results: number;
+};
+
+export default function CustomerTableFiltersResult({
+  filters,
+  onFilters,
+  //
+  onResetFilters,
+  //
+  results,
+  ...other
+}: Props) {
+  const handleRemoveStatus = () => {
+    onFilters('status', 'all');
+  };
+
+  const handleRemoveRole = (inputValue: string) => {
+    const newValue = filters.role.filter((item) => item !== inputValue);
+    onFilters('role', newValue);
+  };
+
+  return (
+    <Stack spacing={1.5} {...other}>
+      <Box sx={{ typography: 'body2' }}>
+        <strong>{results}</strong>
+        <Box component="span" sx={{ color: 'text.secondary', ml: 0.25 }}>
+          results found
+        </Box>
+      </Box>
+
+      <Stack flexGrow={1} spacing={1} direction="row" flexWrap="wrap" alignItems="center">
+        {filters.status !== 'all' && (
+          <Block label="Status:">
+            <Chip size="small" label={filters.status} onDelete={handleRemoveStatus} />
+          </Block>
+        )}
+
+        {!!filters.role.length && (
+          <Block label="Role:">
+            {filters.role.map((item) => (
+              <Chip key={item} label={item} size="small" onDelete={() => handleRemoveRole(item)} />
+            ))}
+          </Block>
+        )}
+
+        <Button
+          color="error"
+          onClick={onResetFilters}
+          startIcon={<Iconify icon="solar:trash-bin-trash-bold" />}
+        >
+          Clear
+        </Button>
+      </Stack>
+    </Stack>
+  );
+}
+
+// ----------------------------------------------------------------------
+
+type BlockProps = StackProps & {
+  label: string;
+};
+
+function Block({ label, children, sx, ...other }: BlockProps) {
+  return (
+    <Stack
+      component={Paper}
+      variant="outlined"
+      spacing={1}
+      direction="row"
+      sx={{
+        p: 1,
+        borderRadius: 1,
+        overflow: 'hidden',
+        borderStyle: 'dashed',
+        ...sx,
+      }}
+      {...other}
+    >
+      <Box component="span" sx={{ typography: 'subtitle2' }}>
+        {label}
+      </Box>
+
+      <Stack spacing={1} direction="row" flexWrap="wrap">
+        {children}
+      </Stack>
+    </Stack>
+  );
+}
Index: src/sections/user/customer-table-row.tsx
===================================================================
--- src/sections/user/customer-table-row.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/user/customer-table-row.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -0,0 +1,103 @@
+// @mui
+import Avatar from '@mui/material/Avatar';
+import Tooltip from '@mui/material/Tooltip';
+import MenuItem from '@mui/material/MenuItem';
+import TableRow from '@mui/material/TableRow';
+import TableCell from '@mui/material/TableCell';
+import IconButton from '@mui/material/IconButton';
+// hooks
+import { useBoolean } from 'src/hooks/use-boolean';
+// types
+import { Customer } from 'mvpmasters-shared';
+// components
+import Label from 'src/components/label';
+import Iconify from 'src/components/iconify';
+import CustomPopover, { usePopover } from 'src/components/custom-popover';
+//
+import CustomerQuickEditForm from './customer-quick-edit-form';
+
+// ----------------------------------------------------------------------
+
+type Props = {
+  selected: boolean;
+  onEditRow: VoidFunction;
+  row: Customer;
+};
+
+export default function CustomerTableRow({ row, selected, onEditRow }: Props) {
+  const { name, logoUrl, representative, status, email, phoneNumber } = row;
+
+  // const confirm = useBoolean();
+
+  const quickEdit = useBoolean();
+
+  // const popover = usePopover();
+
+  return (
+    <>
+      <TableRow hover selected={selected}>
+        {/* <TableCell padding="checkbox">
+          <Checkbox checked={selected} onClick={onSelectRow} />
+        </TableCell> */}
+
+        <TableCell sx={{ display: 'flex', alignItems: 'center' }}>
+          <Avatar alt={name} src={logoUrl} sx={{ mr: 2 }} />
+          <span>{name}</span>
+        </TableCell>
+
+        <TableCell sx={{ whiteSpace: 'nowrap' }}>{representative}</TableCell>
+
+        <TableCell sx={{ whiteSpace: 'nowrap' }}>{email}</TableCell>
+
+        <TableCell>
+          <Label
+            variant="soft"
+            color={
+              (status === 'active' && 'success') ||
+              (status === 'inactive' && 'warning') ||
+              (status === 'banned' && 'error') ||
+              'default'
+            }
+          >
+            {status}
+          </Label>
+        </TableCell>
+
+        <TableCell align="right" sx={{ px: 1, whiteSpace: 'nowrap' }}>
+          <Tooltip title="Quick Edit" placement="top" arrow>
+            <IconButton color={quickEdit.value ? 'inherit' : 'default'} onClick={quickEdit.onTrue}>
+              <Iconify icon="solar:pen-bold" />
+            </IconButton>
+          </Tooltip>
+          {/* 
+          <IconButton color={popover.open ? 'inherit' : 'default'} onClick={popover.onOpen}>
+            <Iconify icon="eva:more-vertical-fill" />
+          </IconButton> */}
+        </TableCell>
+      </TableRow>
+
+      <CustomerQuickEditForm
+        currentCustomer={row}
+        open={quickEdit.value}
+        onClose={quickEdit.onFalse}
+      />
+
+      {/* <CustomPopover
+        open={popover.open}
+        onClose={popover.onClose}
+        arrow="right-top"
+        sx={{ width: 140 }}
+      >
+        <MenuItem
+          onClick={() => {
+            onEditRow();
+            popover.onClose();
+          }}
+        >
+          <Iconify icon="solar:pen-bold" />
+          Edit
+        </MenuItem>
+      </CustomPopover> */}
+    </>
+  );
+}
Index: src/sections/user/customer-table-toolbar.tsx
===================================================================
--- src/sections/user/customer-table-toolbar.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/user/customer-table-toolbar.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -0,0 +1,152 @@
+import { useCallback } from 'react';
+// @mui
+import Stack from '@mui/material/Stack';
+import MenuItem from '@mui/material/MenuItem';
+import Checkbox from '@mui/material/Checkbox';
+import TextField from '@mui/material/TextField';
+import InputLabel from '@mui/material/InputLabel';
+import IconButton from '@mui/material/IconButton';
+import FormControl from '@mui/material/FormControl';
+import OutlinedInput from '@mui/material/OutlinedInput';
+import InputAdornment from '@mui/material/InputAdornment';
+import Select, { SelectChangeEvent } from '@mui/material/Select';
+// types
+import { CustomerTableFilters, CustomerTableFilterValue } from 'mvpmasters-shared';
+// components
+import Iconify from 'src/components/iconify';
+import CustomPopover, { usePopover } from 'src/components/custom-popover';
+
+// ----------------------------------------------------------------------
+
+type Props = {
+  filters: CustomerTableFilters;
+  onFilters: (name: string, value: CustomerTableFilterValue) => void;
+  //
+  roleOptions: string[];
+};
+
+export default function CustomerTableToolbar({
+  filters,
+  onFilters,
+  //
+  roleOptions,
+}: Props) {
+  const popover = usePopover();
+
+  const handleFilterName = useCallback(
+    (event: React.ChangeEvent<HTMLInputElement>) => {
+      onFilters('name', event.target.value);
+    },
+    [onFilters]
+  );
+
+  const handleFilterRole = useCallback(
+    (event: SelectChangeEvent<string[]>) => {
+      onFilters(
+        'role',
+        typeof event.target.value === 'string' ? event.target.value.split(',') : event.target.value
+      );
+    },
+    [onFilters]
+  );
+
+  return (
+    <>
+      <Stack
+        spacing={2}
+        alignItems={{ xs: 'flex-end', md: 'center' }}
+        direction={{
+          xs: 'column',
+          md: 'row',
+        }}
+        sx={{
+          p: 2.5,
+          pr: { xs: 2.5, md: 1 },
+        }}
+      >
+        <FormControl
+          sx={{
+            flexShrink: 0,
+            width: { xs: 1, md: 200 },
+          }}
+        >
+          <InputLabel>Role</InputLabel>
+
+          <Select
+            multiple
+            value={filters.role}
+            onChange={handleFilterRole}
+            input={<OutlinedInput label="Role" />}
+            renderValue={(selected) => selected.map((value) => value).join(', ')}
+            MenuProps={{
+              PaperProps: {
+                sx: { maxHeight: 240 },
+              },
+            }}
+          >
+            {roleOptions.map((option) => (
+              <MenuItem key={option} value={option}>
+                <Checkbox disableRipple size="small" checked={filters.role.includes(option)} />
+                {option}
+              </MenuItem>
+            ))}
+          </Select>
+        </FormControl>
+
+        <Stack direction="row" alignItems="center" spacing={2} flexGrow={1} sx={{ width: 1 }}>
+          <TextField
+            fullWidth
+            value={filters.name}
+            onChange={handleFilterName}
+            placeholder="Search..."
+            InputProps={{
+              startAdornment: (
+                <InputAdornment position="start">
+                  <Iconify icon="eva:search-fill" sx={{ color: 'text.disabled' }} />
+                </InputAdornment>
+              ),
+            }}
+          />
+
+          <IconButton onClick={popover.onOpen}>
+            <Iconify icon="eva:more-vertical-fill" />
+          </IconButton>
+        </Stack>
+      </Stack>
+
+      <CustomPopover
+        open={popover.open}
+        onClose={popover.onClose}
+        arrow="right-top"
+        sx={{ width: 140 }}
+      >
+        <MenuItem
+          onClick={() => {
+            popover.onClose();
+          }}
+        >
+          <Iconify icon="solar:printer-minimalistic-bold" />
+          Print
+        </MenuItem>
+
+        <MenuItem
+          onClick={() => {
+            popover.onClose();
+          }}
+        >
+          <Iconify icon="solar:import-bold" />
+          Import
+        </MenuItem>
+
+        <MenuItem
+          onClick={() => {
+            popover.onClose();
+          }}
+        >
+          <Iconify icon="solar:export-bold" />
+          Export
+        </MenuItem>
+      </CustomPopover>
+    </>
+  );
+}
Index: src/sections/user/view/customer-create-view.tsx
===================================================================
--- src/sections/user/view/customer-create-view.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/user/view/customer-create-view.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -0,0 +1,41 @@
+'use client';
+
+// @mui
+import Container from '@mui/material/Container';
+// routes
+import { paths } from 'src/routes/paths';
+// components
+import { useSettingsContext } from 'src/components/settings';
+import CustomBreadcrumbs from 'src/components/custom-breadcrumbs';
+//
+import CustomerNewEditForm from '../customer-new-edit-form';
+
+// ----------------------------------------------------------------------
+
+export default function CustomerCreateView() {
+  const settings = useSettingsContext();
+
+  return (
+    <Container maxWidth={settings.themeStretch ? false : 'lg'}>
+      <CustomBreadcrumbs
+        heading="Create a new customer"
+        links={[
+          {
+            name: 'Dashboard',
+            href: paths.dashboard.root,
+          },
+          {
+            name: 'Customer',
+            href: paths.dashboard.customer.list,
+          },
+          { name: 'New customer' },
+        ]}
+        sx={{
+          mb: { xs: 3, md: 5 },
+        }}
+      />
+
+      <CustomerNewEditForm />
+    </Container>
+  );
+}
Index: src/sections/user/view/customer-list-view.tsx
===================================================================
--- src/sections/user/view/customer-list-view.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/user/view/customer-list-view.tsx	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -0,0 +1,335 @@
+'use client';
+
+import isEqual from 'lodash/isEqual';
+import { useState, useCallback } from 'react';
+// @mui
+import { alpha } from '@mui/material/styles';
+import Tab from '@mui/material/Tab';
+import Tabs from '@mui/material/Tabs';
+import Card from '@mui/material/Card';
+import Table from '@mui/material/Table';
+import Button from '@mui/material/Button';
+import Container from '@mui/material/Container';
+import TableBody from '@mui/material/TableBody';
+import TableContainer from '@mui/material/TableContainer';
+// routes
+import { paths } from 'src/routes/paths';
+import { RouterLink } from 'src/routes/components';
+// hooks
+import { useBoolean } from 'src/hooks/use-boolean';
+// components
+import Label from 'src/components/label';
+import Iconify from 'src/components/iconify';
+import Scrollbar from 'src/components/scrollbar';
+import { useSettingsContext } from 'src/components/settings';
+import CustomBreadcrumbs from 'src/components/custom-breadcrumbs';
+import {
+  useTable,
+  getComparator,
+  emptyRows,
+  TableNoData,
+  TableEmptyRows,
+  TableHeadCustom,
+  TablePaginationCustom,
+} from 'src/components/table';
+// types
+import { Customer, CustomerTableFilters, CustomerTableFilterValue } from 'mvpmasters-shared';
+//
+import { useGetCustomers } from 'src/api/customer';
+import CustomerTableRow from '../customer-table-row';
+import CustomerTableFiltersResult from '../customer-table-filters-result';
+import { USER_STATUS_OPTIONS } from '../customer-quick-edit-form';
+
+// ----------------------------------------------------------------------
+
+const STATUS_OPTIONS = [{ value: 'all', label: 'All' }, ...USER_STATUS_OPTIONS];
+
+const TABLE_HEAD = [
+  { id: 'name', label: 'Name' },
+  { id: 'representative', label: 'Representative', width: 220 },
+  { id: 'email', label: 'Email' },
+  { id: 'status', label: 'Status', width: 100 },
+  { id: '', width: 88 },
+];
+
+const defaultFilters: CustomerTableFilters = {
+  name: '',
+  role: [],
+  status: 'all',
+};
+
+// ----------------------------------------------------------------------
+
+export default function CustomerListView() {
+  const table = useTable({ defaultDense: true, defaultRowsPerPage: 25 });
+
+  const settings = useSettingsContext();
+
+  // const router = useRouter();
+
+  const confirm = useBoolean();
+
+  const { customers } = useGetCustomers();
+
+  // const [tableData, setTableData] = useState(customers || []);
+
+  const [filters, setFilters] = useState(defaultFilters);
+
+  const dataFiltered = applyFilter({
+    inputData: customers,
+    comparator: getComparator(table.order, table.orderBy),
+    filters,
+  });
+
+  const dataInPage = dataFiltered.slice(
+    table.page * table.rowsPerPage,
+    table.page * table.rowsPerPage + table.rowsPerPage
+  );
+
+  const denseHeight = table.dense ? 52 : 72;
+
+  const canReset = !isEqual(defaultFilters, filters);
+
+  const notFound = (!dataFiltered.length && canReset) || !dataFiltered.length;
+
+  const handleFilters = useCallback(
+    (name: string, value: CustomerTableFilterValue) => {
+      table.onResetPage();
+      setFilters((prevState) => ({
+        ...prevState,
+        [name]: value,
+      }));
+    },
+    [table]
+  );
+
+  // const handleDeleteRow = useCallback(
+  //   (id: string) => {
+  //     const deleteRow = customers.filter((row) => row.id !== id);
+
+  //     table.onUpdatePageDeleteRow(dataInPage.length);
+  //   },
+  //   [dataInPage.length, table]
+  // );
+
+  // const handleDeleteRows = useCallback(() => {
+  //   const deleteRows = tableData.filter((row) => !table.selected.includes(row.id));
+  //   setTableData(deleteRows);
+
+  //   table.onUpdatePageDeleteRows({
+  //     totalRows: tableData.length,
+  //     totalRowsInPage: dataInPage.length,
+  //     totalRowsFiltered: dataFiltered.length,
+  //   });
+  // }, [dataFiltered.length, dataInPage.length, table, tableData]);
+
+  // const handleEditRow = useCallback(
+  //   (id: string) => {
+  //     router.push(paths.dashboard.user.edit(id));
+  //   },
+  //   [router]
+  // );
+
+  const handleFilterStatus = useCallback(
+    (event: React.SyntheticEvent, newValue: string) => {
+      handleFilters('status', newValue);
+    },
+    [handleFilters]
+  );
+
+  const handleResetFilters = useCallback(() => {
+    setFilters(defaultFilters);
+  }, []);
+
+  return (
+    <>
+      <Container maxWidth={settings.themeStretch ? false : 'lg'}>
+        <CustomBreadcrumbs
+          heading="List"
+          links={[
+            { name: 'Dashboard', href: paths.dashboard.root },
+            { name: 'Customer', href: paths.dashboard.customer.list },
+            { name: 'List' },
+          ]}
+          action={
+            <Button
+              component={RouterLink}
+              href={paths.dashboard.customer.new}
+              variant="contained"
+              startIcon={<Iconify icon="mingcute:add-line" />}
+            >
+              New Customer
+            </Button>
+          }
+          sx={{
+            mb: { xs: 3, md: 5 },
+          }}
+        />
+
+        <Card>
+          <Tabs
+            value={filters.status}
+            onChange={handleFilterStatus}
+            sx={{
+              px: 2.5,
+              boxShadow: (theme) => `inset 0 -2px 0 0 ${alpha(theme.palette.grey[500], 0.08)}`,
+            }}
+          >
+            {STATUS_OPTIONS.map((tab) => (
+              <Tab
+                key={tab.value}
+                iconPosition="end"
+                value={tab.value}
+                label={tab.label}
+                icon={
+                  <Label
+                    variant={
+                      ((tab.value === 'all' || tab.value === filters.status) && 'filled') || 'soft'
+                    }
+                    color={
+                      (tab.value === 'active' && 'success') ||
+                      (tab.value === 'pending' && 'warning') ||
+                      (tab.value === 'banned' && 'error') ||
+                      'default'
+                    }
+                  >
+                    {tab.value === 'all' && customers.length}
+
+                    {tab.value === 'active' &&
+                      customers.filter((customer) => customer.status === 'active').length}
+
+                    {tab.value === 'banned' &&
+                      customers.filter((customer) => customer.status === 'banned').length}
+
+                    {tab.value === 'inactive' &&
+                      customers.filter((customer) => customer.status === 'inactive').length}
+                  </Label>
+                }
+              />
+            ))}
+          </Tabs>
+
+          {canReset && (
+            <CustomerTableFiltersResult
+              filters={filters}
+              onFilters={handleFilters}
+              //
+              onResetFilters={handleResetFilters}
+              //
+              results={dataFiltered.length}
+              sx={{ p: 2.5, pt: 0 }}
+            />
+          )}
+
+          <TableContainer sx={{ position: 'relative', overflow: 'unset' }}>
+            <Scrollbar>
+              <Table size={table.dense ? 'small' : 'medium'} sx={{ minWidth: 960 }}>
+                <TableHeadCustom
+                  order={table.order}
+                  orderBy={table.orderBy}
+                  headLabel={TABLE_HEAD}
+                  rowCount={customers.length}
+                  numSelected={table.selected.length}
+                  onSort={table.onSort}
+                />
+
+                <TableBody>
+                  {dataFiltered
+                    .slice(
+                      table.page * table.rowsPerPage,
+                      table.page * table.rowsPerPage + table.rowsPerPage
+                    )
+                    .map((row) => (
+                      <CustomerTableRow
+                        key={row.id}
+                        row={row}
+                        selected={table.selected.includes(row.id!)}
+                        onEditRow={() => {}}
+                      />
+                    ))}
+
+                  <TableEmptyRows
+                    height={denseHeight}
+                    emptyRows={emptyRows(table.page, table.rowsPerPage, customers.length)}
+                  />
+
+                  <TableNoData notFound={notFound} />
+                </TableBody>
+              </Table>
+            </Scrollbar>
+          </TableContainer>
+
+          <TablePaginationCustom
+            count={dataFiltered.length}
+            page={table.page}
+            rowsPerPage={table.rowsPerPage}
+            onPageChange={table.onChangePage}
+            onRowsPerPageChange={table.onChangeRowsPerPage}
+            //
+            dense={table.dense}
+            onChangeDense={table.onChangeDense}
+          />
+        </Card>
+      </Container>
+
+      {/* <ConfirmDialog
+        open={confirm.value}
+        onClose={confirm.onFalse}
+        title="Delete"
+        content={
+          <>
+            Are you sure want to delete <strong> {table.selected.length} </strong> items?
+          </>
+        }
+        action={
+          <Button
+            variant="contained"
+            color="error"
+            onClick={() => {
+              handleDeleteRows();
+              confirm.onFalse();
+            }}
+          >
+            Delete
+          </Button>
+        }
+      /> */}
+    </>
+  );
+}
+
+// ----------------------------------------------------------------------
+
+function applyFilter({
+  inputData,
+  comparator,
+  filters,
+}: {
+  inputData: Customer[];
+  comparator: (a: any, b: any) => number;
+  filters: CustomerTableFilters;
+}) {
+  const { name, status, role } = filters;
+
+  const stabilizedThis = inputData.map((el, index) => [el, index] as const);
+
+  stabilizedThis.sort((a, b) => {
+    const order = comparator(a[0], b[0]);
+    if (order !== 0) return order;
+    return a[1] - b[1];
+  });
+
+  inputData = stabilizedThis.map((el) => el[0]);
+
+  if (name) {
+    inputData = inputData.filter(
+      (user) => user.name.toLowerCase().indexOf(name.toLowerCase()) !== -1
+    );
+  }
+
+  if (status !== 'all') {
+    inputData = inputData.filter((user) => user.status === status);
+  }
+
+  return inputData;
+}
Index: src/sections/user/view/index.ts
===================================================================
--- src/sections/user/view/index.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/sections/user/view/index.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -0,0 +1,2 @@
+export { default as CustomerListView } from './customer-list-view';
+export { default as CustomerCreateView } from './customer-create-view';
Index: src/types/settings.ts
===================================================================
--- src/types/settings.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
+++ src/types/settings.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -0,0 +1,8 @@
+import { Customer } from 'mvpmasters-shared';
+
+export type Settings = {
+  company: Customer;
+  'company-ee': Customer;
+  invoice: { lastInvoiceNumber: string };
+  [key: string]: any;
+};
Index: src/utils/axios.ts
===================================================================
--- src/utils/axios.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/utils/axios.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -45,8 +45,5 @@
 
 export const endpoints = {
-  invoice: '/api/invoices',
+  invoice: '/api/invoice',
   customer: '/api/customers',
-  tenant: '/api/tenant',
-  service: '/api/services',
-  employee: '/api/employees',
 };
Index: src/utils/create-full-address.ts
===================================================================
--- src/utils/create-full-address.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/utils/create-full-address.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -1,3 +1,3 @@
-import { Address } from 'src/schemas';
+import { Address } from 'mvpmasters-shared';
 
 export function createFullAddress(data: Address): string {
Index: src/utils/get-invoice-quantity-type.ts
===================================================================
--- src/utils/get-invoice-quantity-type.ts	(revision d808bc281c03f84bf239d4d696be946fdf1e0ed5)
+++ src/utils/get-invoice-quantity-type.ts	(revision 5d6f37a75130aab7d9a67b5b430603eff2c0ca6e)
@@ -1,3 +1,3 @@
-import { Invoice } from 'src/schemas';
+import { Invoice } from 'mvpmasters-shared';
 
 export const getQuantityType = (invoice: Invoice) => {
