refactor: transform payload status to number in subscribe plan requests and update type definitions
This commit is contained in:
@@ -2,7 +2,7 @@ import DT from 'datatables.net-dt'
|
||||
import DataTable from 'datatables.net-react'
|
||||
import { Link, useRouteLoaderData } from 'react-router'
|
||||
|
||||
import type { TSubscribePlanSchema } from '~/apis/common/get-subscribe-plan'
|
||||
import type { TSubscribePlanResponse } from '~/apis/common/get-subscribe-plan'
|
||||
import { Button } from '~/components/ui/button'
|
||||
import { getStatusBadge, type TColorBadge } from '~/components/ui/color-badge'
|
||||
import { UiTable } from '~/components/ui/table'
|
||||
@@ -66,8 +66,10 @@ export const SubscribePlanPage = () => {
|
||||
{value === 1 ? 'Active' : 'Inactive'}
|
||||
</span>
|
||||
),
|
||||
6: (value: string, _type: unknown, data: TSubscribePlanSchema) =>
|
||||
data.code !== 'basic' && (
|
||||
6: (value: string, _type: unknown, data: TSubscribePlanResponse) =>
|
||||
data.code === 'basic' ? (
|
||||
''
|
||||
) : (
|
||||
<Button
|
||||
as="a"
|
||||
href={`/lg-admin/subscribe-plan/update/${value}`}
|
||||
|
||||
Reference in New Issue
Block a user