fix: add code in partner

This commit is contained in:
ilham 2021-12-26 11:19:57 +07:00
parent 69fc55338d
commit 668c64f193
2 changed files with 23 additions and 3 deletions

View File

@ -48,6 +48,7 @@ export const PartnerComponent = observer((props) => {
name: data.name, name: data.name,
npwp: data.npwp, npwp: data.npwp,
address: data.address, address: data.address,
code: data.code,
}); });
setIsChangePassword(false); setIsChangePassword(false);
store.partner.visibleModalPartner = true; store.partner.visibleModalPartner = true;
@ -72,6 +73,11 @@ export const PartnerComponent = observer((props) => {
dataIndex: "name", dataIndex: "name",
key: "name", key: "name",
}, },
{
title: "Kode",
dataIndex: "code",
key: "code",
},
{ {
title: "Npwp", title: "Npwp",
dataIndex: "npwp", dataIndex: "npwp",
@ -274,7 +280,7 @@ export const PartnerComponent = observer((props) => {
> >
{item?.status === true ? "Inactive" : "Active"} {item?.status === true ? "Inactive" : "Active"}
</Button> </Button>
<Button onClick={() => handleEditButton(item)}> <Button onClick={(owner,name) => handleEditButton(item)}>
Edit Edit
</Button> </Button>
{/* <Button onClick={() => handleDelete(record.id)}>Delete</Button> */} {/* <Button onClick={() => handleDelete(record.id)}>Delete</Button> */}
@ -351,6 +357,19 @@ export const PartnerComponent = observer((props) => {
<Input /> <Input />
</Form.Item> </Form.Item>
)} )}
{!idData && (
<Form.Item
name="code"
label="Kode"
rules={[
idData
? { required: false }
: { required: true, message: "Please input code partner!" },
]}
>
<Input />
</Form.Item>
)}
{!idData && ( {!idData && (
<Form.Item <Form.Item
name="owner" name="owner"
@ -358,7 +377,7 @@ export const PartnerComponent = observer((props) => {
rules={[ rules={[
idData idData
? { required: false } ? { required: false }
: { required: true, message: "Please input password owner!" }, : { required: true, message: "Please input owner name!" },
]} ]}
> >
<Input /> <Input />

View File

@ -1,5 +1,6 @@
export const appConfig = { export const appConfig = {
apiUrl: 'https://ppob-backend.k3s.bangun-kreatif.com/v1' // apiUrl: 'https://ppob-backend.k3s.bangun-kreatif.com/v1'
apiUrl: 'http://localhost:3222/v1'
// apiUrl: 'http://localhost:3222/v1' // apiUrl: 'http://localhost:3222/v1'
}; };