fix: key top up supplier
This commit is contained in:
commit
923f788a59
|
@ -38,13 +38,13 @@ export const SupplierComponent = observer((props) => {
|
|||
setIdData(data.id);
|
||||
};
|
||||
|
||||
const handleTopup = async (data) => {
|
||||
store.supplier.code = data.code;
|
||||
console.log(data.code, "isi data");
|
||||
const handleTopup = (data) => {
|
||||
console.log(data, "isi data");
|
||||
form.setFieldsValue({
|
||||
supplier: data.code,
|
||||
});
|
||||
store.supplier.visibleModalTransaction = true;
|
||||
store.supplier.code = data.code;
|
||||
};
|
||||
|
||||
const changeStatus = async (id, isActive) => {
|
||||
|
@ -185,7 +185,6 @@ export const SupplierComponent = observer((props) => {
|
|||
};
|
||||
|
||||
const handleCancel = () => {
|
||||
form.resetFields();
|
||||
setIdData("");
|
||||
store.supplier.visibleModalSupplier = false;
|
||||
};
|
||||
|
@ -372,6 +371,7 @@ export const SupplierComponent = observer((props) => {
|
|||
okText={idData ? "Edit" : "Buat"}
|
||||
cancelText="Batal"
|
||||
onCancel={() => {
|
||||
form.resetFields();
|
||||
handleCancel();
|
||||
}}
|
||||
onOk={() => {
|
||||
|
@ -395,50 +395,6 @@ export const SupplierComponent = observer((props) => {
|
|||
>
|
||||
<Input />
|
||||
</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>
|
||||
</Modal>
|
||||
<Modal
|
||||
|
|
Loading…
Reference in New Issue
Block a user