@@ -226,7 +304,8 @@ function CounselListPage() {
onClick={() => setIsModalOpen(true)}
sx={{
backgroundColor: "#164F9E",
- "&:hover": { backgroundColor: "#0D3B7A" },
+ boxShadow: "none",
+ "&:hover": { backgroundColor: "#0D3B7A", boxShadow: "none" },
height: "36px",
fontSize: "13px",
padding: "0 16px",
@@ -291,15 +370,23 @@ function CounselListPage() {
- {(!counsel.dueDate || counsel.completed) ? "의뢰 마감" : "의뢰 진행중"}
+ {!counsel.dueDate || counsel.completed
+ ? "의뢰 마감"
+ : "의뢰 진행중"}
@@ -333,4 +420,4 @@ function CounselListPage() {
);
}
-export default CounselListPage;
\ No newline at end of file
+export default CounselListPage;
diff --git a/src/pages/CustomerDetailPage/CustomerDetailPage.tsx b/src/pages/CustomerDetailPage/CustomerDetailPage.tsx
index ef2ffda..994e904 100644
--- a/src/pages/CustomerDetailPage/CustomerDetailPage.tsx
+++ b/src/pages/CustomerDetailPage/CustomerDetailPage.tsx
@@ -24,6 +24,7 @@ import { toast } from "react-toastify";
import DeleteConfirmModal from "@components/DeleteConfirm/DeleteConfirmModal";
import RegionSelect from "@components/RegionSelect/RegionSelect";
import { formatPhoneNumber } from "@utils/numberUtil";
+import { showToast } from "@components/Toast/Toast";
interface CustomerData {
uid: number;
@@ -177,15 +178,24 @@ function CustomerDetailPage() {
try {
if (!editedCustomer.name) {
- toast.error("이름을 입력해주세요.");
+ showToast({
+ message: "이름을 입력해주세요.",
+ type: "error",
+ });
return;
}
if (!editedCustomer.phoneNo) {
- toast.error("전화번호를 입력해주세요.");
+ showToast({
+ message: "전화번호를 입력해주세요.",
+ type: "error",
+ });
return;
}
if (editedCustomer.birthDay && !/^\d{8}$/.test(editedCustomer.birthDay)) {
- toast.error("생년월일을 올바르게 입력해주세요. ex)19910501");
+ showToast({
+ message: "생년월일을 올바르게 입력해주세요. ex)19910501",
+ type: "error",
+ });
return;
}
@@ -215,13 +225,20 @@ function CustomerDetailPage() {
);
if (response.status === 200) {
- toast.success("고객 정보를 수정했습니다.");
+ showToast({
+ message: "고객 정보를 수정했습니다.",
+ type: "success",
+ });
setIsEditing(false);
fetchCustomerData();
}
} catch (error: any) {
console.error("Failed to update customer:", error);
- toast.error(error.response?.data?.message || "고객 정보 수정에 실패했습니다.");
+ showToast({
+ message:
+ error.response?.data?.message || "고객 정보 수정에 실패했습니다.",
+ type: "error",
+ });
}
};
@@ -237,7 +254,10 @@ function CustomerDetailPage() {
try {
const response = await apiClient.delete(`/customers/${customerId}`);
if (response.status === 200) {
- toast.success("고객이 삭제되었습니다.");
+ showToast({
+ message: "고객을 삭제했습니다.",
+ type: "success",
+ });
navigate("/customers");
}
} catch (error) {
@@ -328,18 +348,16 @@ function CustomerDetailPage() {
}}
>
}
onClick={handleEditClick}
sx={{
mr: 1,
- backgroundColor: "#164F9E",
- boxShadow: "none",
- "&:hover": {
- backgroundColor: "#0D3B7A",
- boxShadow: "none",
- },
+ color: "#164F9E",
+ minHeight: "32px",
+ marginLeft: "12px",
+ backgroundColor: "white",
}}
>
수정
@@ -886,6 +904,7 @@ function CustomerDetailPage() {
open={isDeleteModalOpen}
onConfirm={handleDeleteConfirm}
onCancel={handleDeleteCancel}
+ category="고객"
/>
);
diff --git a/src/pages/CustomerListPage/CustomerAddButtonList/CustomerAddButtonList.tsx b/src/pages/CustomerListPage/CustomerAddButtonList/CustomerAddButtonList.tsx
index 10351b5..19180a8 100644
--- a/src/pages/CustomerListPage/CustomerAddButtonList/CustomerAddButtonList.tsx
+++ b/src/pages/CustomerListPage/CustomerAddButtonList/CustomerAddButtonList.tsx
@@ -27,7 +27,8 @@ function CustomerAddButtonList({ fetchCustomerData }: Props) {
onClick={handleOpen}
sx={{
backgroundColor: "#164F9E",
- "&:hover": { backgroundColor: "#0D3B7A" },
+ boxShadow: "none",
+ "&:hover": { backgroundColor: "#0D3B7A", boxShadow: "none" },
height: "36px",
fontSize: "13px",
padding: "0 16px",
diff --git a/src/pages/CustomerListPage/CustomerAddButtonList/CustomerAddModal/CustomerAddModal.tsx b/src/pages/CustomerListPage/CustomerAddButtonList/CustomerAddModal/CustomerAddModal.tsx
index 05e1969..d1b0bf9 100644
--- a/src/pages/CustomerListPage/CustomerAddButtonList/CustomerAddModal/CustomerAddModal.tsx
+++ b/src/pages/CustomerListPage/CustomerAddButtonList/CustomerAddModal/CustomerAddModal.tsx
@@ -21,7 +21,9 @@ import {
import Button from "@components/Button";
import TextField from "@components/TextField";
import apiClient from "@apis/apiClient";
-import AddIcon from '@mui/icons-material/Add';
+import AddIcon from "@mui/icons-material/Add";
+
+import { showToast } from "@components/Toast/Toast";
import { toast } from "react-toastify";
const phoneRegex = /^\d{3}-\d{3,4}-\d{4}$/;
@@ -77,22 +79,22 @@ interface Label {
}
const initialFormData: CustomerFormData = {
- name: '',
- phoneNo: '',
- birthDay: '',
- telProvider: 'SKT',
- legalDistrictCode: '',
- trafficSource: '',
+ name: "",
+ phoneNo: "",
+ birthDay: "",
+ telProvider: "SKT",
+ legalDistrictCode: "",
+ trafficSource: "",
seller: false,
buyer: false,
tenant: false,
landlord: false,
- minPrice: '',
- maxPrice: '',
- minRent: '',
- maxRent: '',
- minDeposit: '',
- maxDeposit: '',
+ minPrice: "",
+ maxPrice: "",
+ minRent: "",
+ maxRent: "",
+ minDeposit: "",
+ maxDeposit: "",
labelUids: [],
};
@@ -113,45 +115,51 @@ function CustomerAddModal({
const [labels, setLabels] = useState