- Added conditional rendering in SubscriptionInfoBar and LinksCard to hide components for users with the Client role. - Updated ProfileDataCard to use Enum_Customer_Role for role management. - Improved error handling in OrdersService to differentiate between master and client order limit errors.
28 lines
828 B
TypeScript
28 lines
828 B
TypeScript
/* eslint-disable canonical/id-match */
|
|
'use client';
|
|
|
|
import { LinkButton } from './link-button';
|
|
import { useCustomerQuery } from '@/hooks/api/customers';
|
|
import { Enum_Customer_Role } from '@repo/graphql/types';
|
|
|
|
export function LinksCard() {
|
|
const { data: { customer } = {} } = useCustomerQuery();
|
|
|
|
if (customer?.role === Enum_Customer_Role.Client) return null;
|
|
|
|
return (
|
|
<div className="flex flex-col gap-4 p-4 py-0">
|
|
<LinkButton
|
|
description="Указать доступные дни и время для записи"
|
|
href="/profile/schedule"
|
|
text="График работы"
|
|
/>
|
|
<LinkButton
|
|
description="Добавить и редактировать ваши услуги"
|
|
href="/profile/services"
|
|
text="Услуги"
|
|
/>
|
|
</div>
|
|
);
|
|
}
|