hidden jadwal shift and master-shift
This commit is contained in:
@@ -12,8 +12,6 @@ import { useNavigate } from 'react-router-dom';
|
||||
import { NotifAlert, NotifConfirmDialog } from '../../../components/Global/ToastNotif';
|
||||
import { getAllContact, deleteContact } from '../../../api/contact';
|
||||
|
||||
const { TabPane } = Tabs;
|
||||
|
||||
const ContactCard = memo(function ContactCard({ contact, showEditModal, showDeleteModal }) {
|
||||
return (
|
||||
<Col xs={24} sm={12} md={8} lg={6}>
|
||||
@@ -118,7 +116,14 @@ const ContactCard = memo(function ContactCard({ contact, showEditModal, showDele
|
||||
</div>
|
||||
|
||||
{/* Edit and Delete Buttons - Bottom Right */}
|
||||
<div style={{ display: 'flex', justifyContent: 'flex-end', gap: '8px', marginTop: '8px' }}>
|
||||
<div
|
||||
style={{
|
||||
display: 'flex',
|
||||
justifyContent: 'flex-end',
|
||||
gap: '8px',
|
||||
marginTop: '8px',
|
||||
}}
|
||||
>
|
||||
<Space>
|
||||
<Button
|
||||
type="text"
|
||||
@@ -127,9 +132,11 @@ const ContactCard = memo(function ContactCard({ contact, showEditModal, showDele
|
||||
borderColor: '#faad14',
|
||||
padding: '2px 6px',
|
||||
fontSize: '11px',
|
||||
height: '24px'
|
||||
height: '24px',
|
||||
}}
|
||||
icon={<EditOutlined style={{ color: '#faad14', fontSize: '11px' }} />}
|
||||
icon={
|
||||
<EditOutlined style={{ color: '#faad14', fontSize: '11px' }} />
|
||||
}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
showEditModal(contact);
|
||||
@@ -145,7 +152,7 @@ const ContactCard = memo(function ContactCard({ contact, showEditModal, showDele
|
||||
borderColor: 'red',
|
||||
padding: '2px 6px',
|
||||
fontSize: '11px',
|
||||
height: '24px'
|
||||
height: '24px',
|
||||
}}
|
||||
icon={<DeleteOutlined style={{ fontSize: '11px' }} />}
|
||||
onClick={(e) => {
|
||||
@@ -282,7 +289,6 @@ const ListContact = memo(function ListContact(props) {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Card>
|
||||
@@ -302,7 +308,11 @@ const ListContact = memo(function ListContact(props) {
|
||||
}}
|
||||
onSearch={(value) => setFormDataFilter({ criteria: value })}
|
||||
allowClear={{
|
||||
clearIcon: <span onClick={() => setFormDataFilter(defaultFilter)}>✕</span>,
|
||||
clearIcon: (
|
||||
<span onClick={() => setFormDataFilter(defaultFilter)}>
|
||||
✕
|
||||
</span>
|
||||
),
|
||||
}}
|
||||
enterButton={
|
||||
<Button
|
||||
@@ -353,12 +363,25 @@ const ListContact = memo(function ListContact(props) {
|
||||
marginBottom: '16px',
|
||||
}}
|
||||
>
|
||||
<Tabs activeKey={activeTab} onChange={setActiveTab} size="large">
|
||||
<TabPane tab="All" key="all" />
|
||||
<TabPane tab="Operator" key="operator" />
|
||||
<TabPane tab="Gudang" key="gudang" />
|
||||
</Tabs>
|
||||
|
||||
<Tabs
|
||||
activeKey={activeTab}
|
||||
onChange={setActiveTab}
|
||||
size="large"
|
||||
items={[
|
||||
{
|
||||
key: 'all',
|
||||
label: 'All',
|
||||
},
|
||||
{
|
||||
key: 'operator',
|
||||
label: 'Operator',
|
||||
},
|
||||
{
|
||||
key: 'gudang',
|
||||
label: 'Gudang',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</div>
|
||||
|
||||
{getFilteredContacts().length === 0 ? (
|
||||
@@ -377,7 +400,7 @@ const ListContact = memo(function ListContact(props) {
|
||||
id: contact.contact_id || contact.id,
|
||||
name: contact.contact_name || contact.name,
|
||||
phone: contact.contact_phone || contact.phone,
|
||||
status: contact.is_active ? 'active' : 'inactive'
|
||||
status: contact.is_active ? 'active' : 'inactive',
|
||||
}}
|
||||
showEditModal={showEditModal}
|
||||
showDeleteModal={showDeleteModal}
|
||||
|
||||
Reference in New Issue
Block a user