diff --git a/public/Example.xlsx b/public/Example.xlsx new file mode 100644 index 0000000..f82ceee Binary files /dev/null and b/public/Example.xlsx differ diff --git a/src/app/(auth)/business/employees/_components/AddEmployeeModal.tsx b/src/app/(auth)/business/employees/_components/AddEmployeeModal.tsx index 429ac9b..36edc7f 100644 --- a/src/app/(auth)/business/employees/_components/AddEmployeeModal.tsx +++ b/src/app/(auth)/business/employees/_components/AddEmployeeModal.tsx @@ -24,7 +24,7 @@ const AddEmployeeModal = ({ isOpen, onClose, onRefresh }: AddEmployeeModalProps) const fileInputRef = useRef(null); const [notification, setNotification] = useState<{ isVisible: boolean; employeeName: string }>({ isVisible: false, - employeeName: '' + employeeName: '', }); const { signInAnonymouslyIfNeeded } = useFirebaseAuth(); @@ -88,18 +88,14 @@ const AddEmployeeModal = ({ isOpen, onClose, onRefresh }: AddEmployeeModalProps) // Sau đó thêm employee mới vào group chat console.log('Adding new employee to group chat...'); - await addEmployeeToBusinessGroupChat( - businessId, - newEmployeeId, - newEmployeeName - ); + await addEmployeeToBusinessGroupChat(businessId, newEmployeeId, newEmployeeName); console.log('Business group chat updated successfully'); // Hiển thị thông báo thành công setNotification({ isVisible: true, - employeeName: newEmployeeName + employeeName: newEmployeeName, }); // Tự động ẩn notification sau 5 giây @@ -117,7 +113,8 @@ const AddEmployeeModal = ({ isOpen, onClose, onRefresh }: AddEmployeeModalProps) // Hiển thị cảnh báo nhưng không block việc thêm employee toast({ title: 'Warning', - description: 'Employee added but group chat update failed. You can manually add them later.', + description: + 'Employee added but group chat update failed. You can manually add them later.', variant: 'destructive', }); } @@ -241,19 +238,21 @@ const AddEmployeeModal = ({ isOpen, onClose, onRefresh }: AddEmployeeModalProps)
@@ -285,7 +284,18 @@ const AddEmployeeModal = ({ isOpen, onClose, onRefresh }: AddEmployeeModalProps) {activeTab === 'file' && (
- +
+ + + 📥 Download Example.xlsx + +