Skip to content

Commit

Permalink
Merge pull request #16 from pieceowater-dev/dev
Browse files Browse the repository at this point in the history
fix: bin
  • Loading branch information
baynt1 authored Jul 15, 2024
2 parents a40aa62 + 3dd524d commit fe9599d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/entities/settings/posts-table/model/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ export interface IPostsResponse {
name: string
address: string
identifier: string
bin: string
stopped?: boolean
}
7 changes: 7 additions & 0 deletions src/entities/settings/posts-table/use-posts-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export const usePostsTable = () => {
name: item.name,
address: item.address,
identifier: item.id,
bin: item.bin,
}))
const select = res.data.items.map((item: IPostsResponse) => ({
value: item.id,
Expand Down Expand Up @@ -86,6 +87,11 @@ export const usePostsTable = () => {
dataIndex: 'address',
key: 'address',
},
{
title: 'БИН',
dataIndex: 'bin',
key: 'bin',
},
{
title: 'Действие',
key: 'action',
Expand All @@ -98,6 +104,7 @@ export const usePostsTable = () => {
name: record.name,
address: record.address,
identifier: record.identifier,
bin: record.bin,
id: record.key,
})
handlePostModal()
Expand Down
2 changes: 1 addition & 1 deletion src/features/settings/new-post/model/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface INewPostProps {
export interface INewPostFormArgs {
name: string
address: string
identifier: string
bin: string
id?: number
users?: number[]
}
Expand Down
10 changes: 9 additions & 1 deletion src/features/settings/new-post/new-post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const NewPost: FC<INewPostProps> = ({ open, handeOpen, item, refetch }) =
initialValues={{
name: item?.name || '',
address: item?.address || '',
identifier: item?.identifier || '',
bin: item?.bin || '',
}}
style={{ height: '100%' }}
>
Expand All @@ -122,6 +122,14 @@ export const NewPost: FC<INewPostProps> = ({ open, handeOpen, item, refetch }) =
<Input />
</Form.Item>

<Form.Item<INewPostFormArgs>
label={'БИН'}
name={'bin'}
rules={[{ required: true, message: 'Введите бин' }]}
>
<Input />
</Form.Item>

{/* <Form.Item<INewPostFormArgs>*/}
{/* label={'Индификатор'}*/}
{/* name={'identifier'}*/}
Expand Down
1 change: 1 addition & 0 deletions src/pages/settings/ui/posts/model/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ export interface IPostsTableProps {
name: string
address: string
identifier: string
bin: string
}

0 comments on commit fe9599d

Please sign in to comment.