new version frontend-webpage

This commit is contained in:
José Salazar
2025-11-21 09:13:05 -05:00
parent 23dfba35cc
commit de1cc96ba0
56 changed files with 7736 additions and 3367 deletions

View File

@@ -29,10 +29,12 @@ const convertTo12Hour = (time24) => {
}
};
export default function ShiftCard({ shift, event }) {
export default function ShiftCard({ shift, event, currentUser }) {
const [assignModal, setAssignModal] = useState({ open: false, role: null });
const roles = shift?.roles || [];
const isVendor = currentUser?.user_role === 'vendor' || currentUser?.role === 'vendor';
const canAssignStaff = isVendor;
return (
<>
@@ -99,7 +101,7 @@ export default function ShiftCard({ shift, event }) {
</div>
</div>
{remainingCount > 0 && (
{canAssignStaff && remainingCount > 0 && (
<Button
onClick={() => setAssignModal({ open: true, role })}
className="bg-[#0A39DF] hover:bg-blue-700 gap-2 font-semibold"