1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-04-08 23:53:53 +02:00

(bug) unable to hide machine/space deleted in price of plan

This commit is contained in:
Du Peng 2025-04-01 11:54:01 +02:00
parent 20595d5ed2
commit bd9694ccac

View File

@ -71,7 +71,7 @@ export const PlanPricingForm = <TContext extends object>({ register, control, fo
const renderPriceElement = (price: Price, index: number) => {
const item: Space | Machine = (price.priceable_type === 'Machine' && machines?.find(m => m.id === price.priceable_id)) ||
(price.priceable_type === 'Space' && spaces?.find(s => s.id === price.priceable_id));
if (!item?.disabled) {
if (item && !item.disabled) {
return (
<div key={price.id}>
<FormInput register={register}