k
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
flex-wrap: wrap;
|
||||
|
||||
@mixin light {
|
||||
background-color: var(--mantine-color-gray-0);
|
||||
background-color: var(--mantine-color-gray-1);
|
||||
}
|
||||
@mixin dark {
|
||||
background-color: var(--mantine-color-dark-5);
|
||||
|
||||
@@ -12,7 +12,7 @@ const BaseMarketplaceSelect: FC<Props> = (props) => {
|
||||
<ObjectSelect
|
||||
renderOption={(baseMarketplace) =>
|
||||
<>
|
||||
<ActionIcon variant={"transparent"}>
|
||||
<ActionIcon radius={"md"} variant={"transparent"}>
|
||||
<Image
|
||||
src={baseMarketplaces.find(el => baseMarketplace.option.value === el.key)?.iconUrl || ""}/>
|
||||
</ActionIcon>
|
||||
|
||||
19
src/components/Selects/PayRateSelect/PayRateSelect.tsx
Normal file
19
src/components/Selects/PayRateSelect/PayRateSelect.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import ObjectSelect, {ObjectSelectProps} from "../../ObjectSelect/ObjectSelect.tsx";
|
||||
import {PayRateSchema} from "../../../client";
|
||||
import {FC} from "react";
|
||||
import usePayRatesList from "../../../pages/AdminPage/hooks/usePayRatesList.tsx";
|
||||
|
||||
type Props = Omit<ObjectSelectProps<PayRateSchema>, 'data' | 'getValueFn' | 'getLabelFn'>
|
||||
|
||||
const PayRateSelect: FC<Props> = (props) => {
|
||||
const {objects: payRates} = usePayRatesList();
|
||||
return (
|
||||
<ObjectSelect
|
||||
getValueFn={(baseMarketplace) => baseMarketplace.id.toLocaleString()}
|
||||
getLabelFn={(baseMarketplace) => baseMarketplace.name}
|
||||
data={payRates}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
export default PayRateSelect;
|
||||
@@ -0,0 +1,19 @@
|
||||
import ObjectSelect, {ObjectSelectProps} from "../../ObjectSelect/ObjectSelect.tsx";
|
||||
import {PayrollSchemeSchema} from "../../../client";
|
||||
import {FC} from "react";
|
||||
import usePayrollSchemasList from "../../../hooks/usePayrollSchemasList.tsx";
|
||||
|
||||
type Props = Omit<ObjectSelectProps<PayrollSchemeSchema>, 'data' | 'getValueFn' | 'getLabelFn'>
|
||||
|
||||
const PayrollSchemeSelect: FC<Props> = (props) => {
|
||||
const {objects: payrollSchemeSchemas} = usePayrollSchemasList();
|
||||
return (
|
||||
<ObjectSelect
|
||||
getValueFn={(baseMarketplace) => baseMarketplace.key}
|
||||
getLabelFn={(baseMarketplace) => baseMarketplace.name}
|
||||
data={payrollSchemeSchemas}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
}
|
||||
export default PayrollSchemeSelect
|
||||
Reference in New Issue
Block a user