mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
feat: style vendor form and list.
feat: items state selectors.
This commit is contained in:
@@ -52,5 +52,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