k
This commit is contained in:
32
src/pages/AdminPage/components/PayRateTable/columns.tsx
Normal file
32
src/pages/AdminPage/components/PayRateTable/columns.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
import {useMemo} from "react";
|
||||
import {MRT_ColumnDef} from "mantine-react-table";
|
||||
import {PayRateSchema} from "../../../../client";
|
||||
|
||||
export const usePayRatesTableColumns = () => {
|
||||
return useMemo<MRT_ColumnDef<PayRateSchema>[]>(() => [
|
||||
{
|
||||
accessorKey: "name",
|
||||
header: "Название тарифа"
|
||||
},
|
||||
{
|
||||
accessorKey: "payrollScheme.name",
|
||||
header: "Система оплаты"
|
||||
},
|
||||
{
|
||||
accessorKey: "baseRate",
|
||||
header: "Базовая ставка",
|
||||
Cell: ({row}) => `${row.original.baseRate.toLocaleString("ru")}₽`
|
||||
|
||||
},
|
||||
{
|
||||
accessorKey: "overtimeThreshold",
|
||||
header: "Порог сверхурочных"
|
||||
},
|
||||
{
|
||||
accessorKey: "overtimeRate",
|
||||
header: "Сверхурочная ставка",
|
||||
Cell: ({row}) => row.original.overtimeRate && `${row.original.overtimeRate.toLocaleString("ru")}₽`
|
||||
|
||||
}
|
||||
], []);
|
||||
}
|
||||
Reference in New Issue
Block a user