Refine billing schema and enhance visuals of PricingTable
Removed redundant validation for 'lifetime' subscription plans in billing schema. Extensively updated the UI, layout and visuals of PricingTable component to offer a more user-friendly and aesthetically pleasing interface, improving overall user experience.
This commit is contained in:
@@ -104,21 +104,6 @@ export const PlanSchema = z
|
||||
path: ['lineItems'],
|
||||
},
|
||||
)
|
||||
.refine(
|
||||
(data) => {
|
||||
if (data.paymentType === 'one-time') {
|
||||
const meteredItems = data.lineItems.filter(
|
||||
(item) => item.type === 'metered',
|
||||
);
|
||||
|
||||
return meteredItems.length === 0;
|
||||
}
|
||||
},
|
||||
{
|
||||
message: 'One-time plans must not have metered line items',
|
||||
path: ['paymentType', 'lineItems'],
|
||||
},
|
||||
)
|
||||
.refine(
|
||||
(data) => {
|
||||
if (data.paymentType === 'one-time') {
|
||||
@@ -126,6 +111,8 @@ export const PlanSchema = z
|
||||
|
||||
return baseItems.length === 0;
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
{
|
||||
message: 'One-time plans must not have non-base line items',
|
||||
|
||||
Reference in New Issue
Block a user