mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-21 05:45:46 +00:00
refactor(FE-62,63,65): refactor Movement and ProductWarehouse APIs, update MovementForm schema, and enhance MovementTable functionality
This commit is contained in:
@@ -7,6 +7,7 @@ interface TableRowOptionsProps {
|
||||
recordId: string | number;
|
||||
basePath: string;
|
||||
onDelete?: () => void;
|
||||
queryParam?: string;
|
||||
}
|
||||
|
||||
export const TableRowOptions = ({
|
||||
@@ -14,6 +15,7 @@ export const TableRowOptions = ({
|
||||
recordId,
|
||||
basePath,
|
||||
onDelete,
|
||||
queryParam = 'id',
|
||||
}: TableRowOptionsProps) => (
|
||||
<div
|
||||
tabIndex={type === 'dropdown' ? 0 : undefined}
|
||||
@@ -26,7 +28,7 @@ export const TableRowOptions = ({
|
||||
)}
|
||||
>
|
||||
<Button
|
||||
href={`${basePath}/detail/?id=${recordId}`}
|
||||
href={`${basePath}/detail/?${queryParam}=${recordId}`}
|
||||
variant='ghost'
|
||||
color='primary'
|
||||
className='justify-start text-sm'
|
||||
@@ -35,12 +37,12 @@ export const TableRowOptions = ({
|
||||
Detail
|
||||
</Button>
|
||||
<Button
|
||||
href={`${basePath}/detail/edit/?id=${recordId}`}
|
||||
href={`${basePath}/detail/edit/?${queryParam}=${recordId}`}
|
||||
variant='ghost'
|
||||
color='warning'
|
||||
className='justify-start text-sm'
|
||||
>
|
||||
<Icon icon='material-symbols:edit-outline' width={16} height={16} />
|
||||
<Icon icon='mdi:pencil-outline' width={16} height={16} />
|
||||
Edit
|
||||
</Button>
|
||||
{onDelete && (
|
||||
@@ -51,9 +53,10 @@ export const TableRowOptions = ({
|
||||
className='text-error hover:text-inherit justify-start text-sm'
|
||||
>
|
||||
<Icon
|
||||
icon='material-symbols:delete-outline-rounded'
|
||||
icon='mdi:delete-outline'
|
||||
width={16}
|
||||
height={16}
|
||||
className='justify-start text-sm'
|
||||
/>
|
||||
Delete
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user