Skip to content

Commit

Permalink
added status
Browse files Browse the repository at this point in the history
  • Loading branch information
akanshaaa19 committed Jul 26, 2024
1 parent fae7127 commit 5ab6226
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 0 additions & 4 deletions src/containers/ContactManagement/ContactManagement.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
import { Instructions } from './Instructions/Instructions';
import styles from './ContactManagement.module.css';
import AdminContactManagement from './AdminContactManagement/AdminContactManagement';
import { Heading } from 'components/UI/Heading/Heading';
import { useState } from 'react';
import UploadContactsDialog from './UploadContactsDialog/UploadContactsDialog';
import { Button } from 'components/UI/Form/Button/Button';
import SuperAdminContactManagement from './SuperAdminContactManagement/SuperAdminContactManagement';
import { getUserRole } from 'context/role';
import { UPLOAD_CONTACTS_SAMPLE } from 'config';

export const ContactManagement = () => {
const role = getUserRole();

console.log(role);

const [showUploadDialog, setShowUploadDialog] = useState(false);

let dialog;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@ export const UploadContactsDialog = ({ setDialog }: UploadContactsDialogProps) =

const [importContacts] = useMutation(IMPORT_CONTACTS, {
onCompleted: (data: any) => {
if (data.errors) {
const { errors, status } = data.importContacts;
if (errors) {
setNotification(data.errors[0].message, 'warning');
} else {
setUploadingContacts(false);
setNotification(t('Contacts have been uploaded'));
setNotification(status);
}
setDialog(false);
},
Expand Down

0 comments on commit 5ab6226

Please sign in to comment.