lavoce #4
@@ -13,6 +13,7 @@ const DetailUnit = (props) => {
|
||||
unit_id: '',
|
||||
unit_code: '',
|
||||
unit_name: '',
|
||||
description: '',
|
||||
is_active: true,
|
||||
};
|
||||
|
||||
@@ -27,9 +28,7 @@ const DetailUnit = (props) => {
|
||||
setConfirmLoading(true);
|
||||
|
||||
// Daftar aturan validasi
|
||||
const validationRules = [
|
||||
{ field: 'unit_name', label: 'Unit Name', required: true },
|
||||
];
|
||||
const validationRules = [{ field: 'unit_name', label: 'Unit Name', required: true }];
|
||||
|
||||
if (
|
||||
validateRun(formData, validationRules, (errorMessages) => {
|
||||
@@ -47,6 +46,7 @@ const DetailUnit = (props) => {
|
||||
const payload = {
|
||||
is_active: formData.is_active,
|
||||
unit_name: formData.unit_name,
|
||||
description: formData.description,
|
||||
};
|
||||
|
||||
const response =
|
||||
@@ -202,10 +202,22 @@ const DetailUnit = (props) => {
|
||||
readOnly={props.readOnly}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div style={{ marginBottom: 12 }}>
|
||||
<Text strong>Description</Text>
|
||||
<Input.TextArea
|
||||
name="description"
|
||||
value={formData.description}
|
||||
onChange={handleInputChange}
|
||||
placeholder="Enter Description"
|
||||
readOnly={props.readOnly}
|
||||
rows={4}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
|
||||
export default DetailUnit;
|
||||
export default DetailUnit;
|
||||
|
||||
@@ -32,6 +32,13 @@ const columns = (showPreviewModal, showEditModal, showDeleteDialog) => [
|
||||
key: 'unit_name',
|
||||
width: '20%',
|
||||
},
|
||||
{
|
||||
title: 'Description',
|
||||
dataIndex: 'description',
|
||||
key: 'description',
|
||||
width: '25%',
|
||||
render: (text) => text || '-',
|
||||
},
|
||||
{
|
||||
title: 'Status',
|
||||
dataIndex: 'is_active',
|
||||
|
||||
Reference in New Issue
Block a user