This commit is contained in:
ashok 2026-03-17 10:50:02 +05:30
parent 545654685b
commit 0397bf7324
4 changed files with 17 additions and 9 deletions

View File

@ -1,5 +1,5 @@
import React, { useState, useRef, useEffect } from 'react';
import { Search, Bell, ChevronDown, LogOut, User, Settings, Shield } from 'lucide-react';
import { Search, ChevronDown, LogOut, User, Settings, Shield } from 'lucide-react';
export default function Header({ profile }) {
const [isProfileOpen, setIsProfileOpen] = useState(false);
@ -49,10 +49,6 @@ export default function Header({ profile }) {
{/* User Actions */}
<div className="flex items-center gap-6 ml-auto">
<button className="relative p-2 text-gray-400 hover:text-gray-900 hover:bg-gray-100 rounded-full transition-all text-xs font-bold uppercase tracking-widest">
<Bell size={22} />
<span className="absolute top-2 right-2 w-2.5 h-2.5 bg-red-500 border-2 border-white rounded-full"></span>
</button>
<div className="relative" ref={dropdownRef}>
<div

View File

@ -300,6 +300,7 @@ export default function NewSaleModal({ isOpen, onClose, onSave, branches, produc
placeholder="Why is adjusted?"
value={adjustmentRemarks}
onChange={(e) => setAdjustmentRemarks(e.target.value)}
maxLength={120}
className="w-full bg-amber-50/30 border border-amber-100 py-1.5 px-3 rounded-lg text-xs font-bold text-gray-900 focus:outline-none focus:border-amber-300 transition-all resize-none shadow-sm min-h-[40px]"
/>
</div>

View File

@ -269,7 +269,7 @@ export default function StaffView({ id }) {
</div>
<div className="flex items-center gap-1.5">
<Shield size={14} className="text-gray-400" />
<span>{staff.designation || 'N/A'}</span>
<span>{staff.role || staff.designation || 'N/A'}</span>
</div>
</div>
</div>
@ -323,7 +323,7 @@ export default function StaffView({ id }) {
<p className="text-[10px] font-bold text-gray-400 uppercase tracking-widest mb-1">Designation</p>
<div className="flex items-center gap-2 text-sm font-bold text-gray-900">
<Building size={12} className="text-gray-300" />
<span>{staff.designation || 'N/A'}</span>
<span>{staff.role || staff.designation || 'N/A'}</span>
</div>
</div>
<div>
@ -554,7 +554,12 @@ export default function StaffView({ id }) {
payments.slice(0, 3).map((p) => (
<tr key={p.id}>
<td className="px-6 py-4 text-xs font-bold text-gray-900">{p.payment_date}</td>
<td className="px-6 py-4 text-xs font-semibold text-gray-500">{p.payment_type}</td>
<td className="px-6 py-4 text-xs font-semibold text-gray-500">
{p.payment_type}
{p.payment_type === 'Salary Settlement' && p.settlement_month && (
<span className="block text-[8px] text-gray-400 font-black uppercase tracking-widest mt-0.5">({p.settlement_month})</span>
)}
</td>
<td className="px-6 py-4 text-xs font-black text-emerald-600">{(parseFloat(p.amount) || 0).toLocaleString()} AED</td>
<td className="px-6 py-4">
<span className="px-2 py-0.5 bg-emerald-50 text-emerald-600 rounded-full text-[10px] font-black uppercase tracking-wider">{p.status}</span>
@ -1106,7 +1111,12 @@ export default function StaffView({ id }) {
{payments.map((p) => (
<tr key={p.id} className="hover:bg-gray-50/30 transition-colors">
<td className="px-6 py-4 text-xs font-bold text-gray-900">{p.payment_date}</td>
<td className="px-6 py-4 text-xs font-semibold text-gray-500">{p.payment_type}</td>
<td className="px-6 py-4 text-xs font-semibold text-gray-500">
{p.payment_type}
{p.payment_type === 'Salary Settlement' && p.settlement_month && (
<span className="block text-[8px] text-gray-400 font-black uppercase tracking-widest mt-0.5">({p.settlement_month})</span>
)}
</td>
<td className="px-6 py-4 text-xs font-black text-emerald-600">{(parseFloat(p.amount) || 0).toLocaleString()} AED</td>
<td className="px-6 py-4">
<span className="px-2 py-0.5 bg-emerald-50 text-emerald-600 rounded-full text-[10px] font-black uppercase tracking-wider">{p.status}</span>

View File

@ -359,6 +359,7 @@ export default function POS() {
placeholder="Why is adjusted?"
value={adjustmentRemarks}
onChange={(e) => setAdjustmentRemarks(e.target.value)}
maxLength={120}
className="w-full bg-amber-50/30 border border-amber-100 py-1.5 px-3 rounded-lg text-xs font-bold text-gray-900 focus:outline-none focus:border-amber-300 transition-all resize-none shadow-sm min-h-[40px]"
/>
</div>