Lager - v5.2.0
    Preparing search index...

    Defines the structure for the application contexts.

    This interface outlines the types and functions available for managing the application's global state, including loading indicators, and the state for products, orders, deliveries, and invoices.

    AppContextType

    interface AppContextType {
        deliveries: null | Delivery[];
        invoices: null | Invoice[];
        isLoading: boolean;
        isRefreshing: boolean;
        orders: null | Order[];
        products: null | Product[];
        setDeliveries: (deliveries: null | Delivery[]) => void;
        setInvoices: (invoices: null | Invoice[]) => void;
        setIsLoading: (isLoading: boolean) => void;
        setIsRefreshing: (isRefreshing: boolean) => void;
        setOrders: (orders: null | Order[]) => void;
        setProducts: (products: null | Product[]) => void;
        setUserPosition: (userPosition: null | UserPosition) => void;
        userPosition: null | UserPosition;
    }
    Index

    Properties

    deliveries: null | Delivery[]

    The current list of deliveries or null if not loaded.

    invoices: null | Invoice[]

    The current list of invoices or null if not loaded.

    isLoading: boolean

    Indicates if the application is currently loading.

    isRefreshing: boolean

    Indicates if the application is currently refreshing data.

    orders: null | Order[]

    The current list of orders or null if not loaded.

    products: null | Product[]

    The current list of products or null if not loaded.

    setDeliveries: (deliveries: null | Delivery[]) => void

    Function to update the list of deliveries.

    setInvoices: (invoices: null | Invoice[]) => void

    Function to update the list of invoices.

    setIsLoading: (isLoading: boolean) => void

    Function to set the loading state.

    setIsRefreshing: (isRefreshing: boolean) => void

    Function to set the refreshing state.

    setOrders: (orders: null | Order[]) => void

    Function to update the list of orders.

    setProducts: (products: null | Product[]) => void

    Function to update the list of products.

    setUserPosition: (userPosition: null | UserPosition) => void

    Function to update the user position.

    userPosition: null | UserPosition

    The current user position or null if not set.