mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
Merge branch 'master' of https://github.com/abouolia/Bigcapital
This commit is contained in:
@@ -57,5 +57,14 @@ const Schema = Yup.object().shape({
|
||||
purchasable: Yup.boolean().required(),
|
||||
});
|
||||
|
||||
|
||||
export const transformItemFormData = (item, defaultValue) => {
|
||||
return {
|
||||
...item,
|
||||
sellable: item?.sellable ? Boolean(item.sellable) : defaultValue.sellable,
|
||||
purchasable: item?.purchasable ? Boolean(item.purchasable) : defaultValue.purchasable,
|
||||
};
|
||||
}
|
||||
|
||||
export const CreateItemFormSchema = Schema;
|
||||
export const EditItemFormSchema = Schema;
|
||||
|
||||
Reference in New Issue
Block a user