feat: add sale flow with Boopos Cloud

This commit is contained in:
Luis Felipe Cadavid 2024-10-01 13:45:34 -05:00
parent 0a14fe8882
commit 9cb4302fc9
19 changed files with 449 additions and 398 deletions

View file

@ -1,6 +1,4 @@
import { useSetAtom } from 'jotai';
import { useEffect, useState } from 'react';
import CustomerAtom from '@atoms/states/CustomerAtom';
import { CustomerInterface, CustomerResponseInterface } from '@interfaces/ResponseInterfaces/Customer/CustomerResponseInterface';
import { CustomerDniTypeInterface, CustomerDniTypeResponseInterface } from '@interfaces/ResponseInterfaces/Customer/DNITypeResponseInterface';
import { GetCustomer } from '@package/config/api/Customer/Customer/GetCustomer/page';
@ -17,7 +15,8 @@ export const useClientSearchLogic = () => {
idNumber: ''
});
const setCustomer = useSetAtom(CustomerAtom);
// Cliente seleccionado
const [customer, setCustomer] = useState<CustomerInterface | null>(null);
const fetchIdTypes = async () => {
setLoading(true);
@ -91,6 +90,7 @@ export const useClientSearchLogic = () => {
formData,
handleInputChange,
handleSubmitForm,
isAffiliated
isAffiliated,
customer
};
};