Skip to content

Commit 692420d

Browse files
committed
fix: Delete the debug section in the console log
1 parent a1f59c8 commit 692420d

File tree

4 files changed

+1
-16
lines changed

4 files changed

+1
-16
lines changed

frontend/src/hooks/brands.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@ export function useFetchBrands() {
1212
const fetchBrands = async () => {
1313
try {
1414
setLoading(true);
15-
console.log('[Brands Hook] Fetching brands from /api/brands...');
1615
const response = await api.get('/brands');
17-
console.log('[Brands Hook] Raw response status:', response.status);
18-
console.log('[Brands Hook] Raw response data:', response.data);
1916
const data = Array.isArray(response.data) ? response.data : [];
20-
console.log('[Brands Hook] Parsed brands count:', data.length);
2117
setBrands(data);
2218
setError(null);
2319
} catch (err) {

frontend/src/pages/Pos/PaymentModal.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ const QRTransferModal = ({ amount, onCancel, onSuccess }) => {
2929
}
3030
);
3131
const data = await response.json();
32-
console.log("SePay API response:", JSON.stringify(data));
3332

3433
if (data.transactions && data.transactions.length > 0) {
3534
// Double-check: verify at least one transaction content contains our exact payment code

frontend/src/pages/Products/ProductManager/ProductList.jsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,6 @@ export function ProductListScreen() {
7676
const { brands } = useFetchBrands();
7777
const { taxRates } = useFetchTaxRates();
7878

79-
// Debug: Check if categories are loaded
80-
useEffect(() => {
81-
console.log('Categories loaded:', categories);
82-
}, [categories]);
8379

8480
// --- CÁC HÀM TIỆN ÍCH (HELPER) ---
8581
const getCategoryName = (categoryId) => {
@@ -160,7 +156,6 @@ export function ProductListScreen() {
160156

161157
// --- CASCADE RESET HANDLERS ---
162158
const handleCategoryChange = (val) => {
163-
console.log('handleCategoryChange called with:', val);
164159
setFilterCategory(val);
165160
setFilterBrand(null);
166161
setFilterProduct(null);
@@ -181,8 +176,6 @@ export function ProductListScreen() {
181176
};
182177

183178
const handleVariantChange = (val) => {
184-
console.log('handleVariantChange called with:', val);
185-
console.log('variantsData:', variantsData);
186179
setFilterVariant(val);
187180
};
188181

@@ -338,13 +331,10 @@ export function ProductListScreen() {
338331

339332
// --- DROPDOWN OPTIONS ---
340333
const categoryOptions = useMemo(() => {
341-
console.log('Creating categoryOptions, categories:', categories);
342334
const options = [
343335
{ value: null, label: 'Tất cả danh mục' },
344336
...(categories || []).map((c) => ({ value: String(c.id), label: c.name })),
345337
];
346-
console.log('CategoryOptions created:', options);
347-
console.log('Current filterCategory:', filterCategory);
348338
return options;
349339
}, [categories, filterCategory]);
350340

frontend/test-api.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ axios.post('http://localhost:8081/api/ai/chat', {
33
query: "Hello",
44
sessionId: null,
55
contextDate: "2025-02-20"
6-
}).then(res => console.log(JSON.stringify(res.data, null, 2)))
6+
}).then(() => {})
77
.catch(err => console.error(err.message));

0 commit comments

Comments
 (0)