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,15 +3,15 @@ import React from 'react';
const VendorDeleteAlert = React.lazy(() =>
import('../Alerts/Vendors/VendorDeleteAlert'),
);
const ContactActivateAlert = React.lazy(() =>
import('../Alerts/Contacts/ContactActivateAlert'),
const VendorActivateAlert = React.lazy(() =>
import('../Alerts/Vendors/VendorActivateAlert'),
);
const ContactInactivateAlert = React.lazy(() =>
import('../Alerts/Contacts/ContactInactivateAlert'),
const VendorInactivateAlert = React.lazy(() =>
import('../Alerts/Vendors/VendorInactivateAlert'),
);
export default [
{ name: 'vendor-delete', component: VendorDeleteAlert },
{ name: 'contact-activate', component: ContactActivateAlert },
{ name: 'contact-inactivate', component: ContactInactivateAlert },
{ name: 'vendor-activate', component: VendorActivateAlert },
{ name: 'vendor-inactivate', component: VendorInactivateAlert },
];

View File

@@ -67,15 +67,15 @@ function VendorsTable({
// Handle cancel/confirm inactive.
const handleInactiveVendor = ({ id, contact_service }) => {
openAlert('contact-inactivate', {
contactId: id,
openAlert('vendor-inactivate', {
vendorId: id,
service: contact_service,
});
};
// Handle cancel/confirm activate.
// Handle cancel/confirm activate.
const handleActivateVendor = ({ id, contact_service }) => {
openAlert('contact-activate', { contactId: id, service: contact_service });
openAlert('vendor-activate', { vendorId: id, service: contact_service });
};
// Handle click delete vendor.