BIG-277 Separate customer and vendor.

This commit is contained in:
elforjani13
2022-01-09 21:18:45 +02:00
parent 76d6cd0eaa
commit 5c847be420
10 changed files with 318 additions and 24 deletions

View File

@@ -3,11 +3,11 @@ import React from 'react';
const CustomerDeleteAlert = React.lazy(() =>
import('../Alerts/Customers/CustomerDeleteAlert'),
);
const ContactActivateAlert = React.lazy(() =>
import('../Alerts/Contacts/ContactActivateAlert'),
const CustomerActivateAlert = React.lazy(() =>
import('../Alerts/Customers/CustomerActivateAlert'),
);
const ContactInactivateAlert = React.lazy(() =>
import('../Alerts/Contacts/ContactInactivateAlert'),
const CustomerInactivateAlert = React.lazy(() =>
import('../Alerts/Customers/CustomerInactivateAlert'),
);
/**
@@ -15,6 +15,6 @@ const ContactInactivateAlert = React.lazy(() =>
*/
export default [
{ name: 'customer-delete', component: CustomerDeleteAlert },
{ name: 'contact-activate', component: ContactActivateAlert },
{ name: 'contact-inactivate', component: ContactInactivateAlert },
{ name: 'customer-activate', component: CustomerActivateAlert },
{ name: 'customer-inactivate', component: CustomerInactivateAlert },
];

View File

@@ -89,15 +89,17 @@ function CustomersTable({
// Handle cancel/confirm inactive.
const handleInactiveCustomer = ({ id, contact_service }) => {
openAlert('contact-inactivate', {
contactId: id,
service: contact_service,
openAlert('customer-inactivate', {
customerId: id,
});
};
// Handle cancel/confirm activate.
const handleActivateCustomer = ({ id, contact_service }) => {
openAlert('contact-activate', { contactId: id, service: contact_service });
openAlert('customer-activate', {
customerId: id,
service: contact_service,
});
};
// Handle view detail contact.