diff --git a/src/pages/master/status/component/DetailStatus.jsx b/src/pages/master/status/component/DetailStatus.jsx index 167dbab..efe499d 100644 --- a/src/pages/master/status/component/DetailStatus.jsx +++ b/src/pages/master/status/component/DetailStatus.jsx @@ -1,5 +1,16 @@ import React, { useEffect, useState } from 'react'; -import { Modal, Input, Divider, Typography, Button, ConfigProvider, InputNumber, Switch, Row, Col } from 'antd'; +import { + Modal, + Input, + Divider, + Typography, + Button, + InputNumber, + Switch, + Row, + Col, + Radio, +} from 'antd'; import { NotifAlert, NotifOk } from '../../../../components/Global/ToastNotif'; import { validateRun } from '../../../../Utils/validate'; import { createStatus, updateStatus } from '../../../../api/master-status'; @@ -7,6 +18,18 @@ import { createStatus, updateStatus } from '../../../../api/master-status'; const { Text } = Typography; const { TextArea } = Input; +// Daftar 8 warna yang tersedia +const COLOR_OPTIONS = [ + { label: 'Merah', value: '#EF4444', hex: '#EF4444' }, + { label: 'Biru', value: '#3B82F6', hex: '#3B82F6' }, + { label: 'Hijau', value: '#10B981', hex: '#10B981' }, + { label: 'Kuning', value: '#F59E0B', hex: '#F59E0B' }, + { label: 'Ungu', value: '#8B5CF6', hex: '#8B5CF6' }, + { label: 'Pink', value: '#EC4899', hex: '#EC4899' }, + { label: 'Orange', value: '#F97316', hex: '#F97316' }, + { label: 'Teal', value: '#14B8A6', hex: '#14B8A6' }, +]; + const DetailStatus = (props) => { const [confirmLoading, setConfirmLoading] = useState(false); @@ -34,6 +57,10 @@ const DetailStatus = (props) => { setFormData({ ...formData, is_active: checked }); }; + const handleColorChange = (e) => { + setFormData({ ...formData, status_color: e.target.value }); + }; + const handleCancel = () => { props.setSelectedData(null); props.setActionMode('list'); @@ -123,7 +150,14 @@ const DetailStatus = (props) => { onCancel={handleCancel} footer={ !props.readOnly && ( -