Skip to content

Commit afc0732

Browse files
feat(marketplace): full overhaul of two-sided marketplace, dual-role architecture, 2-level navigation, proposals and direct offers
1 parent 237319b commit afc0732

18 files changed

Lines changed: 3687 additions & 756 deletions

File tree

‎app/mutaxassis/ish-elonlari/page.tsx‎

Lines changed: 325 additions & 127 deletions
Large diffs are not rendered by default.

‎app/mutaxassis/page.tsx‎

Lines changed: 293 additions & 94 deletions
Large diffs are not rendered by default.

‎app/mutaxassis/shartnomalar/[id]/page.tsx‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import { MilestoneProgress } from "@/components/shared/MilestoneProgress";
1919
import { DisputeSummary } from "@/components/shared/DisputeSummary";
2020
import { ContractStatusBadge } from "@/components/shared/StatusBadge";
2121
import { ReceiptModal } from "@/components/shared/ReceiptModal";
22+
import { ContractWorkroomChat } from "@/components/shared/ContractWorkroomChat";
2223
import { contractsService, disputesService, milestonesService } from "@/lib/api";
2324
import type { Contract, Dispute, Milestone } from "@/lib/types";
2425
import { formatDate, formatMoney } from "@/lib/format";
@@ -238,6 +239,16 @@ export default function ShartnomaWorkroomPage() {
238239
</div>
239240
</section>
240241

242+
{/* Ishchi xona muloqoti va fayllar (Chat & Deliverables) */}
243+
<section className="flex flex-col gap-3">
244+
<ContractWorkroomChat
245+
contract={contract}
246+
milestones={milestones}
247+
counterpartName={contract.buyerName}
248+
role="mutaxassis"
249+
/>
250+
</section>
251+
241252
{/* Ishni topshirish modali */}
242253
<Modal
243254
open={!!submitTarget}

‎app/xaridor/bozor/mutaxassis/[id]/page.tsx‎

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export default function MutaxassisProfiliPage() {
3030
const [services, setServices] = useState<Service[]>([]);
3131
const [reviews, setReviews] = useState<Review[]>([]);
3232
const [offerOpen, setOfferOpen] = useState(false);
33+
const [messageOpen, setMessageOpen] = useState(false);
3334
const [viewingPortfolio, setViewingPortfolio] = useState<PortfolioItem | null>(null);
3435
const [selectedRatingFilter, setSelectedRatingFilter] = useState<number | null>(null);
3536
const [loadError, setLoadError] = useState<unknown>(null);
@@ -380,13 +381,23 @@ export default function MutaxassisProfiliPage() {
380381
</p>
381382
</div>
382383

383-
<Button
384-
size="lg"
385-
onClick={() => setOfferOpen(true)}
386-
className="w-full justify-center shadow-btn"
387-
>
388-
{t("offer.send")} →
389-
</Button>
384+
<div className="flex flex-col gap-2">
385+
<Button
386+
size="lg"
387+
onClick={() => setOfferOpen(true)}
388+
className="w-full justify-center shadow-btn"
389+
>
390+
{t("offer.send")} →
391+
</Button>
392+
<Button
393+
variant="secondary"
394+
size="md"
395+
onClick={() => setMessageOpen(true)}
396+
className="w-full justify-center text-xs"
397+
>
398+
💬 {t("market.sendMessageBtn")}
399+
</Button>
400+
</div>
390401

391402
{/* Quick Metrics */}
392403
<div className="flex flex-col divide-y divide-line rounded-input border border-line bg-surface text-xs">
@@ -497,6 +508,15 @@ export default function MutaxassisProfiliPage() {
497508
open={offerOpen}
498509
onClose={() => setOfferOpen(false)}
499510
sellerId={user.id}
511+
mode="offer"
512+
/>
513+
514+
{/* Xabar yuborish modali */}
515+
<OfferModal
516+
open={messageOpen}
517+
onClose={() => setMessageOpen(false)}
518+
sellerId={user.id}
519+
mode="message"
500520
/>
501521
</div>
502522
);

0 commit comments

Comments
 (0)