fix: key top up supplier
This commit is contained in:
commit
923f788a59
|
@ -38,13 +38,13 @@ export const SupplierComponent = observer((props) => {
|
||||||
setIdData(data.id);
|
setIdData(data.id);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleTopup = async (data) => {
|
const handleTopup = (data) => {
|
||||||
store.supplier.code = data.code;
|
console.log(data, "isi data");
|
||||||
console.log(data.code, "isi data");
|
|
||||||
form.setFieldsValue({
|
form.setFieldsValue({
|
||||||
supplier: data.code,
|
supplier: data.code,
|
||||||
});
|
});
|
||||||
store.supplier.visibleModalTransaction = true;
|
store.supplier.visibleModalTransaction = true;
|
||||||
|
store.supplier.code = data.code;
|
||||||
};
|
};
|
||||||
|
|
||||||
const changeStatus = async (id, isActive) => {
|
const changeStatus = async (id, isActive) => {
|
||||||
|
@ -185,7 +185,6 @@ export const SupplierComponent = observer((props) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleCancel = () => {
|
const handleCancel = () => {
|
||||||
form.resetFields();
|
|
||||||
setIdData("");
|
setIdData("");
|
||||||
store.supplier.visibleModalSupplier = false;
|
store.supplier.visibleModalSupplier = false;
|
||||||
};
|
};
|
||||||
|
@ -372,6 +371,7 @@ export const SupplierComponent = observer((props) => {
|
||||||
okText={idData ? "Edit" : "Buat"}
|
okText={idData ? "Edit" : "Buat"}
|
||||||
cancelText="Batal"
|
cancelText="Batal"
|
||||||
onCancel={() => {
|
onCancel={() => {
|
||||||
|
form.resetFields();
|
||||||
handleCancel();
|
handleCancel();
|
||||||
}}
|
}}
|
||||||
onOk={() => {
|
onOk={() => {
|
||||||
|
@ -395,50 +395,6 @@ export const SupplierComponent = observer((props) => {
|
||||||
>
|
>
|
||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
|
||||||
name="name"
|
|
||||||
label="Name"
|
|
||||||
rules={[{ required: true, message: "Please input url!" }]}
|
|
||||||
>
|
|
||||||
<Input />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item
|
|
||||||
name="url"
|
|
||||||
label="Url"
|
|
||||||
rules={[{ required: true, message: "Please input url!" }]}
|
|
||||||
>
|
|
||||||
<Input />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item
|
|
||||||
name="irs_pin"
|
|
||||||
label="Pin"
|
|
||||||
rules={[{ required: true, message: "Please input url!" }]}
|
|
||||||
>
|
|
||||||
<Input />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item
|
|
||||||
name="irs_user"
|
|
||||||
label="User"
|
|
||||||
rules={[{ required: true, message: "Please input url!" }]}
|
|
||||||
>
|
|
||||||
<Input />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item
|
|
||||||
name="irs_pass"
|
|
||||||
label="Password"
|
|
||||||
rules={[{ required: true, message: "Please input url!" }]}
|
|
||||||
>
|
|
||||||
<Input />
|
|
||||||
</Form.Item>
|
|
||||||
{!idData && (
|
|
||||||
<Form.Item
|
|
||||||
name="code"
|
|
||||||
label="Kode"
|
|
||||||
rules={[{ required: true, message: "Please input kode!" }]}
|
|
||||||
>
|
|
||||||
<Input />
|
|
||||||
</Form.Item>
|
|
||||||
)}
|
|
||||||
</Form>
|
</Form>
|
||||||
</Modal>
|
</Modal>
|
||||||
<Modal
|
<Modal
|
||||||
|
|
Loading…
Reference in New Issue
Block a user