feat: shipping warehouse and cost
This commit is contained in:
@@ -41,8 +41,14 @@ export const useServicesTableColumns = () => {
|
||||
enableGrouping: false,
|
||||
enableSorting: false,
|
||||
Cell: ({row}) => getPriceRow(row.original)
|
||||
|
||||
},
|
||||
{
|
||||
accessorKey: "cost",
|
||||
header: "Себестоимость",
|
||||
enableGrouping: false,
|
||||
enableSorting: false,
|
||||
},
|
||||
|
||||
], []);
|
||||
|
||||
}
|
||||
@@ -2,7 +2,7 @@ import {ServicePriceRangeSchema, ServiceSchema} from "../../../client";
|
||||
import {useForm} from "@mantine/form";
|
||||
import {ContextModalProps} from "@mantine/modals";
|
||||
import BaseFormModal, {CreateEditFormProps} from "../../ClientsPage/modals/BaseFormModal/BaseFormModal.tsx";
|
||||
import {TextInput} from "@mantine/core";
|
||||
import {NumberInput, TextInput} from "@mantine/core";
|
||||
import ServiceCategorySelect from "../components/ServiceCategorySelect/ServiceCategorySelect.tsx";
|
||||
import ServiceTypeSelect from "../components/ServiceTypeSelect/ServiceTypeSelect.tsx";
|
||||
import ServicePriceInput from "../components/ServicePriceInput/ServicePriceInput.tsx";
|
||||
@@ -25,7 +25,8 @@ const CreateServiceModal = ({
|
||||
name: ''
|
||||
},
|
||||
serviceType: -1,
|
||||
priceRanges: [] as ServicePriceRangeSchema[]
|
||||
priceRanges: [] as ServicePriceRangeSchema[],
|
||||
cost: null
|
||||
}
|
||||
|
||||
const form = useForm<ServiceSchema>({
|
||||
@@ -72,6 +73,12 @@ const CreateServiceModal = ({
|
||||
label={"Тип услуги"}
|
||||
{...form.getInputProps('serviceType')}
|
||||
/>
|
||||
<NumberInput
|
||||
placeholder={"Введите себестоимость услуги"}
|
||||
label={"Себестоимость услуги"}
|
||||
hideControls
|
||||
{...form.getInputProps('cost')}
|
||||
/>
|
||||
<ServicePriceInput
|
||||
singlePriceInputProps={{
|
||||
hideControls: true,
|
||||
|
||||
Reference in New Issue
Block a user