imeshuek commited on
Commit
ef8cb24
·
verified ·
1 Parent(s): 8e410f3

Upload vendor-contracts/page.tsx

Browse files
Files changed (1) hide show
  1. vendor-contracts/page.tsx +79 -0
vendor-contracts/page.tsx ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ 'use client'
2
+ import { useState } from 'react'
3
+
4
+ type ContractStatus = 'draft' | 'sent' | 'signed' | 'amended' | 'disputed' | 'completed'
5
+
6
+ const vendorContracts = [
7
+ { id:'CTR-001', client:'Amaya & Ruwan', type:'Full Day Photography', status:'signed' as ContractStatus, date:'Nov 1, 2026', amount:'₨ 150,000', version:1 },
8
+ { id:'CTR-005', client:'Nisha & Kaveen', type:'Ceremony Coverage', status:'sent' as ContractStatus, date:'Nov 8, 2026', amount:'₨ 85,000', version:1 },
9
+ { id:'CTR-008', client:'Thilini & Ashan', type:'Pre-Wedding Shoot', status:'draft' as ContractStatus, date:'Nov 10, 2026', amount:'₨ 65,000', version:1 },
10
+ { id:'CTR-012', client:'Sara & Ruwan', type:'Full Day Photography', status:'amended' as ContractStatus, date:'Oct 28, 2026', amount:'₨ 150,000', version:2 },
11
+ ]
12
+
13
+ const sCfg: Record<ContractStatus,{label:string;bg:string;text:string}> = {
14
+ draft:{label:'Draft',bg:'bg-charcoal-100',text:'text-charcoal-400'},
15
+ sent:{label:'Sent',bg:'bg-gold-50',text:'text-gold-600'},
16
+ signed:{label:'Signed',bg:'bg-sage-50',text:'text-sage-600'},
17
+ amended:{label:'Amended',bg:'bg-rose-50',text:'text-rose-500'},
18
+ disputed:{label:'Disputed',bg:'bg-rose-100',text:'text-rose-600'},
19
+ completed:{label:'Completed',bg:'bg-sage-100',text:'text-sage-700'},
20
+ }
21
+
22
+ export default function VendorContracts() {
23
+ const [filter, setFilter] = useState('all')
24
+
25
+ const filtered = vendorContracts.filter(c => {
26
+ if(filter==='all') return true
27
+ if(filter==='pending') return c.status==='sent'||c.status==='amended'||c.status==='draft'
28
+ if(filter==='active') return c.status==='signed'
29
+ if(filter==='completed') return c.status==='completed'
30
+ return true
31
+ })
32
+
33
+ return (
34
+ <div className="min-h-screen bg-ivory-50">
35
+ <div className="wedding-section py-8">
36
+ <div className="flex items-center justify-between mb-8">
37
+ <div>
38
+ <h1 className="font-heading text-3xl font-semibold text-charcoal-700">Contracts</h1>
39
+ <p className="text-charcoal-400 mt-1">{vendorContracts.length} total · {vendorContracts.filter(c=>c.status==='sent').length} pending client action</p>
40
+ </div>
41
+ <button className="wedding-btn-gold text-sm">+ Build New Contract</button>
42
+ </div>
43
+
44
+ <div className="flex gap-1 bg-ivory-100 rounded-xl p-1 mb-6">
45
+ {['all','pending','active','completed'].map(t=>(
46
+ <button key={t} onClick={()=>setFilter(t)}
47
+ className={"px-4 py-2 rounded-lg text-sm font-medium capitalize transition-colors "+(filter===t?'bg-white text-charcoal-700 shadow-soft':'text-charcoal-400 hover:text-charcoal-600')}>{t}</button>
48
+ ))}
49
+ </div>
50
+
51
+ <div className="space-y-4">
52
+ {filtered.map(c=>{
53
+ const cfg=sCfg[c.status]
54
+ return (
55
+ <a key={c.id} href={"#"} className="wedding-card-hover block p-6">
56
+ <div className="flex items-start justify-between">
57
+ <div>
58
+ <div className="flex items-center gap-3 mb-2">
59
+ <h3 className="font-heading text-lg font-semibold text-charcoal-700">{c.client}</h3>
60
+ <span className={"wedding-badge "+cfg.bg+" "+cfg.text}>{cfg.label}</span>
61
+ {(c.status==='sent'||c.status==='amended')&&<span className="wedding-badge bg-rose-50 text-rose-500 animate-pulse">Awaiting Client</span>}
62
+ </div>
63
+ <div className="flex items-center gap-4 text-sm text-charcoal-400">
64
+ <span>{c.id}</span><span>·</span><span>{c.type}</span><span>·</span><span>v{c.version}</span><span>·</span><span>{c.date}</span>
65
+ </div>
66
+ </div>
67
+ <div className="text-right">
68
+ <p className="font-heading text-lg font-semibold text-charcoal-700">{c.amount}</p>
69
+ <p className="text-xs text-charcoal-400">contract value</p>
70
+ </div>
71
+ </div>
72
+ </a>
73
+ )
74
+ })}
75
+ </div>
76
+ </div>
77
+ </div>
78
+ )
79
+ }