mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-11 17:27:31 +02:00
Adjust layout to place quick create button to the left of advertisements
Refactor CalendarGrid component to reposition the Quick Create Button next to advertisements, enhancing usability. Replit-Commit-Author: Agent Replit-Commit-Session-Id: fba33a9c-2c78-4001-992e-48eb46f716ef Replit-Commit-Checkpoint-Type: full_checkpoint
This commit is contained in:
1 parent
abb720d797
commit
4d52d3b2d2
3 files changed
+38
-20
No files matched your search
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
@@ -539,16 +539,32 @@ export default function CalendarGrid({
|
||||
{/* Publicities et Quick Create Button ensemble */}
|
||||
{isCurrentMonth && (
|
||||
<div className="absolute top-2 right-2 flex flex-col items-end gap-1">
|
||||
{/* Publicities avec design épuré */}
|
||||
{/* Publicities avec Quick Create Button à gauche */}
|
||||
{dayPublicities.length > 0 && (
|
||||
<>
|
||||
{dayPublicities.slice(0, 2).map((pub, idx) => (
|
||||
<div
|
||||
key={`${pub.id}-${idx}`}
|
||||
className="bg-purple-300 text-purple-800 text-xs px-2 py-1 font-bold shadow-md cursor-help transform hover:scale-105 transition-transform duration-150 border border-purple-400"
|
||||
title={`Pub ${pub.pubNumber}: ${pub.designation}${pub.participations ? ` - Magasins: ${pub.participations.map((pg: any) => pg.group?.name).join(', ')}` : ''}`}
|
||||
>
|
||||
{pub.pubNumber}
|
||||
<div key={`${pub.id}-${idx}`} className="flex items-center gap-1">
|
||||
{/* Quick Create Button à gauche de la première publicité */}
|
||||
{idx === 0 && (
|
||||
<div className="opacity-0 group-hover:opacity-100 transition-all duration-200">
|
||||
<Button
|
||||
size="sm"
|
||||
className="w-6 h-6 bg-orange-300 text-orange-800 p-0 hover:bg-orange-400 shadow-md transform hover:scale-110 transition-all duration-150 border border-orange-500"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
onDateClick(date);
|
||||
}}
|
||||
>
|
||||
<Plus className="w-3 h-3" />
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
<div
|
||||
className="bg-purple-300 text-purple-800 text-xs px-2 py-1 font-bold shadow-md cursor-help transform hover:scale-105 transition-transform duration-150 border border-purple-400"
|
||||
title={`Pub ${pub.pubNumber}: ${pub.designation}${pub.participations ? ` - Magasins: ${pub.participations.map((pg: any) => pg.group?.name).join(', ')}` : ''}`}
|
||||
>
|
||||
{pub.pubNumber}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
{dayPublicities.length > 2 && (
|
||||
@@ -559,19 +575,21 @@ export default function CalendarGrid({
|
||||
</>
|
||||
)}
|
||||
|
||||
{/* Quick Create Button à côté des publicités */}
|
||||
<div className="opacity-0 group-hover:opacity-100 transition-all duration-200">
|
||||
<Button
|
||||
size="sm"
|
||||
className="w-6 h-6 bg-orange-300 text-orange-800 p-0 hover:bg-orange-400 shadow-md transform hover:scale-110 transition-all duration-150 border border-orange-500"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
onDateClick(date);
|
||||
}}
|
||||
>
|
||||
<Plus className="w-3 h-3" />
|
||||
</Button>
|
||||
</div>
|
||||
{/* Quick Create Button quand pas de publicité */}
|
||||
{dayPublicities.length === 0 && (
|
||||
<div className="opacity-0 group-hover:opacity-100 transition-all duration-200">
|
||||
<Button
|
||||
size="sm"
|
||||
className="w-6 h-6 bg-orange-300 text-orange-800 p-0 hover:bg-orange-400 shadow-md transform hover:scale-110 transition-all duration-150 border border-orange-500"
|
||||
onClick={(e) => {
|
||||
e.stopPropagation();
|
||||
onDateClick(date);
|
||||
}}
|
||||
>
|
||||
<Plus className="w-3 h-3" />
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user