currentFilter
inquries
searched
sortKey
page
currentFilter
의 변화에 따라 inquires
를 필터링해서 InquiryList
컴포넌트에 건네줍니다.sortkey
, searched
값에 따라 데이터를 다시 불러옵니다.soryKey
의 값은 아래의 3개 중 하나가 될 수 있습니다.
currentInquiry
와 currentCustomer
를 새롭게 세팅합니다.
Inquiry/inquiry-id
채널을 구독합니다. 구독하는 순간 만약 읽지 않은 메시지가 있었다면 읽었다는 신호를 다른 모두에게 보내줍니다.api/inquiries?search={searched}&sort={sortKey}&page={page}&limit={LIMIT}
웹소켓 서버에서 inquiries
라는 이벤트를 구독합니다.
const socket = io.connect(SERVER);
// back
socket.emit('inquiries', function(데이터) {
// 전송
});
// front
// 구독
socket.on('inquiries', setInquries(data));
inquiries
에 데이터를 전송해줍니다.