@@ -54,80 +54,46 @@ const UserSkillCard = ({ skill, onEndorse, isEndorsing }) => {
5454 } ;
5555
5656 return (
57- < div className = "bg-pink-50 border border-pink-100 rounded-lg p-6 hover:shadow-md transition-shadow duration-200" >
57+ < div className = "bg-pink-50 border border-pink-100 rounded-lg p-4 hover:shadow-md transition-shadow duration-200" >
5858 { /* Card Header */ }
59- < div className = "flex justify-between items-start mb-4" >
60- < div className = "flex-1" >
61- < h3 className = "text-lg font-semibold text-gray-900 mb-1" >
62- User Skill Request
63- </ h3 >
64- < h4 className = "text-md font-medium text-gray-800 mb-2" >
65- { skill . skill_id . name }
66- </ h4 >
67- < p className = "text-sm text-gray-600 mb-3" >
68- { skill . skill_id . category }
69- </ p >
70- < span
71- className = { `inline-block px-2 py-1 rounded-full text-xs font-medium ${ getProficiencyColor ( skill . proficiency_level ) } ` }
72- >
73- { skill . proficiency_level . charAt ( 0 ) . toUpperCase ( ) +
74- skill . proficiency_level . slice ( 1 ) }
75- </ span >
76- </ div >
59+ < div className = "mb-4" >
60+ < h3 className = "text-lg font-semibold text-gray-900 mb-2" >
61+ { skill . skill_id . name }
62+ </ h3 >
63+ < p className = "text-sm text-gray-600 mb-2" > { skill . skill_id . category } </ p >
64+ < span
65+ className = { `inline-block px-2 py-1 rounded-full text-xs font-medium ${ getProficiencyColor ( skill . proficiency_level ) } ` }
66+ >
67+ { skill . proficiency_level . charAt ( 0 ) . toUpperCase ( ) +
68+ skill . proficiency_level . slice ( 1 ) }
69+ </ span >
7770 </ div >
7871
7972 { /* User Information */ }
80- < div className = "mb-4" >
81- < div className = "flex items-center gap-2 mb-2 text-sm" >
82- < div className = "w-8 h-8 bg-gray-200 rounded-full flex items-center justify-center" >
83- < span className = "text-xs font-medium text-gray-700" >
84- { skill . user_id . personal_info . name . charAt ( 0 ) }
85- </ span >
86- </ div >
87- < div >
88- < p className = "font-medium text-gray-900" >
89- { skill . user_id . personal_info . name }
90- </ p >
91- < p className = "text-sm text-gray-600" > { skill . user_id . user_id } </ p >
92- </ div >
73+ < div className = "flex items-center gap-2 mb-3 text-sm" >
74+ < div className = "w-8 h-8 bg-gray-200 rounded-full flex items-center justify-center" >
75+ < span className = "text-xs font-medium text-gray-700" >
76+ { skill . user_id . personal_info . name . charAt ( 0 ) }
77+ </ span >
9378 </ div >
94- </ div >
95-
96- { /* Position Information */ }
97- { skill . position_id && (
98- < div className = "bg-white rounded-md p-3 mb-4" >
99- < p className = "text-sm font-medium text-gray-900" >
100- Position: { skill . position_id . title }
79+ < div >
80+ < p className = "font-medium text-gray-900" >
81+ { skill . user_id . personal_info . name }
10182 </ p >
83+ < p className = "text-sm text-gray-600" > { skill . user_id . user_id } </ p >
10284 </ div >
103- ) }
104-
105- { /* Date Information */ }
106- < div className = "flex items-center gap-2 mb-4 text-sm text-gray-600" >
107- < svg
108- className = "w-4 h-4"
109- fill = "none"
110- stroke = "currentColor"
111- viewBox = "0 0 24 24"
112- >
113- < path
114- strokeLinecap = "round"
115- strokeLinejoin = "round"
116- strokeWidth = { 2 }
117- d = "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
118- />
119- </ svg >
120- < span > Submitted: { formatDate ( skill . created_at ) } </ span >
12185 </ div >
12286
123- { /* Action Button */ }
124- < div className = "flex justify-end" >
125- < button
126- onClick = { ( ) => onEndorse ( skill . _id ) }
127- disabled = { isEndorsing }
128- className = "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium text-blue-600 hover:text-blue-800 transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
129- >
130- < span > { isEndorsing ? "Processing..." : "View" } </ span >
87+ { /* Position and Date Information */ }
88+ < div className = "space-y-2 mb-2" >
89+ { skill . position_id && (
90+ < div className = "bg-white rounded-md p-2" >
91+ < p className = "text-sm font-medium text-gray-900" >
92+ Position: { skill . position_id . title }
93+ </ p >
94+ </ div >
95+ ) }
96+ < div className = "flex items-center gap-2 text-sm text-gray-600" >
13197 < svg
13298 className = "w-4 h-4"
13399 fill = "none"
@@ -138,9 +104,21 @@ const UserSkillCard = ({ skill, onEndorse, isEndorsing }) => {
138104 strokeLinecap = "round"
139105 strokeLinejoin = "round"
140106 strokeWidth = { 2 }
141- d = "M9 5l7 7-7 7 "
107+ d = "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z "
142108 />
143109 </ svg >
110+ < span > Submitted: { formatDate ( skill . created_at ) } </ span >
111+ </ div >
112+ </ div >
113+
114+ { /* Action Button */ }
115+ < div className = "flex justify-end pt-2 border-t border-pink-200" >
116+ < button
117+ onClick = { ( ) => onEndorse ( skill . _id ) }
118+ disabled = { isEndorsing }
119+ className = "inline-flex items-center gap-2 px-4 py-2 bg-blue-600 text-white text-sm font-medium rounded-md hover:bg-blue-700 transition-colors disabled:opacity-50 disabled:cursor-not-allowed"
120+ >
121+ < span > { isEndorsing ? "Endorsing..." : "Endorse" } </ span >
144122 </ button >
145123 </ div >
146124 </ div >
0 commit comments