[feat] negodata: 견적목록 상품조인 + 견적/카드 페이지네이션 + 견적중단 서버연동 + 발의→등록
- 견적 목록에 대표 상품(세션 item) 조인 노출 → '대상 상품 확인 불가' 해소 (backend protocol/crud/service + orval 재생성 + front mapQuotation 매핑) - 견적·협상카드 목록 클라이언트 페이지네이션 추가 (useClientPagination) - 견적중단을 서버 stop_quotation 호출로 영속 처리(상태=견적마감) - 신규 협상견적 라벨 발의→등록 통일 - 발의 위저드 카드선택에 협상/와일드 구분 뱃지 추가 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
53b8a78de7
commit
4f0e4c29ce
25 files changed
+668
-165
No files matched your search
@@ -4,7 +4,9 @@ import { showToast } from '@/lib/notify';
|
||||
import { confirm } from '@/lib/confirm';
|
||||
import { PageContainer } from '@/components/layout/PageContainer';
|
||||
import { SearchInput } from '@/components/layout/PageToolbar';
|
||||
import { TablePagination } from '@/components/ui/table-pagination';
|
||||
import { Typography } from '@/components/ui/typography';
|
||||
import { useClientPagination } from '@/lib/useClientPagination';
|
||||
import { useCards } from '@/features/cards/hooks/useCards';
|
||||
import { useCardFilters } from '@/features/cards/hooks/useCardFilters';
|
||||
import { CardTable } from '@/features/cards/components/CardTable';
|
||||
@@ -14,6 +16,7 @@ import type { CardTab, NegotiationCard } from '@/features/cards/types';
|
||||
export default function CardsPage() {
|
||||
const { cards, createCard, updateCard, deleteCard } = useCards();
|
||||
const { search, setSearch, activeTab, setActiveTab, filtered, counts } = useCardFilters(cards);
|
||||
const { page, setPage, pageSize, totalPages, totalCount, pageItems } = useClientPagination(filtered);
|
||||
|
||||
// 오버레이(폼)를 쿼리스트링으로 → 딥링크·뒤로가기·새로고침 지원.
|
||||
// ?edit=<id> 직접 접근 시 데이터 로드 후 수정 폼이 자동으로 열린다.
|
||||
@@ -93,7 +96,21 @@ export default function CardsPage() {
|
||||
placeholder="전체 카드이름, 카드번호, 코드 및 핵심멘트 검색..."
|
||||
/>
|
||||
|
||||
<CardTable data={filtered} onEdit={openEdit} />
|
||||
<CardTable
|
||||
data={pageItems}
|
||||
onEdit={openEdit}
|
||||
footer={
|
||||
<TablePagination
|
||||
page={page}
|
||||
totalPages={totalPages}
|
||||
totalCount={totalCount}
|
||||
pageSize={pageSize}
|
||||
onPageChange={setPage}
|
||||
label="전체 카드"
|
||||
unit="개"
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
{isFormOpen && (
|
||||
<CardFormSheet
|
||||
|
||||
@@ -2,7 +2,9 @@ import { Settings, Plus } from 'lucide-react';
|
||||
import { useOverlayParams } from '@/lib/useOverlayParams';
|
||||
import { PageContainer } from '@/components/layout/PageContainer';
|
||||
import { PageToolbar, SearchInput } from '@/components/layout/PageToolbar';
|
||||
import { TablePagination } from '@/components/ui/table-pagination';
|
||||
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select';
|
||||
import { useClientPagination } from '@/lib/useClientPagination';
|
||||
import { useQuotations } from '@/features/quotations/hooks/useQuotations';
|
||||
import { useQuotationFilters } from '@/features/quotations/hooks/useQuotationFilters';
|
||||
import { QuotationTable } from '@/features/quotations/components/QuotationTable';
|
||||
@@ -26,6 +28,7 @@ export default function QuotationPage() {
|
||||
|
||||
const { search, setSearch, statusFilter, setStatusFilter, typeFilter, setTypeFilter, filtered } =
|
||||
useQuotationFilters(quotations);
|
||||
const { page, setPage, pageSize, totalPages, totalCount, pageItems } = useClientPagination(filtered);
|
||||
|
||||
// 오버레이(상세/생성/세팅)를 쿼리스트링으로 → 딥링크·뒤로가기·새로고침 지원.
|
||||
// ?detail=<id> 로 직접 접근하면 데이터 로드 후 상세가 자동으로 열린다.
|
||||
@@ -56,7 +59,7 @@ export default function QuotationPage() {
|
||||
className="flex items-center gap-2 px-4 py-2.5 bg-primary text-primary-foreground text-xs font-bold rounded hover:opacity-95 cursor-pointer transition-colors animate-pulse"
|
||||
>
|
||||
<Plus size={15} />
|
||||
<span>신규 협상견적 발의</span>
|
||||
<span>신규 협상견적 등록</span>
|
||||
</button>
|
||||
</>
|
||||
}
|
||||
@@ -97,9 +100,20 @@ export default function QuotationPage() {
|
||||
</PageToolbar>
|
||||
|
||||
<QuotationTable
|
||||
data={filtered}
|
||||
data={pageItems}
|
||||
products={products}
|
||||
onOpenDetail={(id) => overlay.open('detail', id)}
|
||||
footer={
|
||||
<TablePagination
|
||||
page={page}
|
||||
totalPages={totalPages}
|
||||
totalCount={totalCount}
|
||||
pageSize={pageSize}
|
||||
onPageChange={setPage}
|
||||
label="전체 견적"
|
||||
unit="건"
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
{activeQuotation && (
|
||||
@@ -121,7 +135,11 @@ export default function QuotationPage() {
|
||||
partners={partners}
|
||||
cards={cards}
|
||||
quotationSettings={quotationSettings}
|
||||
onCreate={createQuotation}
|
||||
onCreate={async (input) => {
|
||||
const qtId = await createQuotation(input);
|
||||
if (qtId) overlay.open('detail', qtId); // 생성 완료된 실제 qt_id 로 상세(협상현황) 자동 오픈
|
||||
return !!qtId;
|
||||
}}
|
||||
onClose={overlay.close}
|
||||
/>
|
||||
)}
|
||||
|
||||
Reference in new issue
Block a user