mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-23 23:18:18 +02:00
feat(BAP): remplacer destinataire Celia par Jeremy
This commit is contained in:
1 parent
5ab5b32ca5
commit
8772e7e0b2
3 files changed
+34
-43
No files matched your search
@@ -383,9 +383,8 @@ export default function Sidebar() {
|
|||||||
// Classes responsives adaptées avec support tablette
|
// Classes responsives adaptées avec support tablette
|
||||||
const getSidebarClasses = () => {
|
const getSidebarClasses = () => {
|
||||||
if (isMobile) {
|
if (isMobile) {
|
||||||
return `fixed inset-y-0 left-0 z-50 w-64 bg-white border-r border-gray-200 shadow-lg transform transition-transform duration-300 ease-in-out ${
|
return `fixed inset-y-0 left-0 z-50 w-64 bg-white border-r border-gray-200 shadow-lg transform transition-transform duration-300 ease-in-out ${mobileMenuOpen ? 'translate-x-0' : '-translate-x-full'
|
||||||
mobileMenuOpen ? 'translate-x-0' : '-translate-x-full'
|
}`;
|
||||||
}`;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mode tablette : semi-collapsed par défaut ou collapsed si forcé
|
// Mode tablette : semi-collapsed par défaut ou collapsed si forcé
|
||||||
@@ -619,22 +618,20 @@ export default function Sidebar() {
|
|||||||
: isMobileOrTablet
|
: isMobileOrTablet
|
||||||
? 'px-4 py-2.5 min-h-10'
|
? 'px-4 py-2.5 min-h-10'
|
||||||
: 'px-3 py-2 min-h-9'
|
: 'px-3 py-2 min-h-9'
|
||||||
} ${
|
} ${active
|
||||||
active
|
|
||||||
? 'bg-blue-50 text-blue-700 border-r-2 border-blue-600'
|
? 'bg-blue-50 text-blue-700 border-r-2 border-blue-600'
|
||||||
: 'text-gray-700'
|
: 'text-gray-700'
|
||||||
}`}
|
}`}
|
||||||
title={sidebarCollapsed && !isMobile ? item.label : undefined}
|
title={sidebarCollapsed && !isMobile ? item.label : undefined}
|
||||||
onClick={handleMenuClick}
|
onClick={handleMenuClick}
|
||||||
>
|
>
|
||||||
<Icon className={`${
|
<Icon className={`${
|
||||||
// Tailles d'icônes adaptatives
|
// Tailles d'icônes adaptatives
|
||||||
isMobile ? 'h-5 w-5' :
|
isMobile ? 'h-5 w-5' :
|
||||||
isTablet ? 'h-6 w-6' :
|
isTablet ? 'h-6 w-6' :
|
||||||
'h-5 w-5'
|
'h-5 w-5'
|
||||||
} ${
|
} ${active ? 'text-blue-700' : 'text-gray-600'
|
||||||
active ? 'text-blue-700' : 'text-gray-600'
|
} ${sidebarCollapsed && !isMobile ? '' : 'mr-3'}`} />
|
||||||
} ${sidebarCollapsed && !isMobile ? '' : 'mr-3'}`} />
|
|
||||||
{(!sidebarCollapsed || isMobile) && (
|
{(!sidebarCollapsed || isMobile) && (
|
||||||
<span className={`${isMobileOrTablet ? 'text-base' : 'text-[15px]'} font-medium`}>
|
<span className={`${isMobileOrTablet ? 'text-base' : 'text-[15px]'} font-medium`}>
|
||||||
{item.label}
|
{item.label}
|
||||||
@@ -672,24 +669,22 @@ export default function Sidebar() {
|
|||||||
return (
|
return (
|
||||||
<div key={item.path}>
|
<div key={item.path}>
|
||||||
<div
|
<div
|
||||||
className={`flex items-center cursor-pointer transition-colors hover:bg-gray-100 rounded-md ${
|
className={`flex items-center cursor-pointer transition-colors hover:bg-gray-100 rounded-md ${sidebarCollapsed && !isMobile
|
||||||
sidebarCollapsed && !isMobile
|
|
||||||
? 'px-3 py-2 justify-center min-h-9'
|
? 'px-3 py-2 justify-center min-h-9'
|
||||||
: isMobileOrTablet
|
: isMobileOrTablet
|
||||||
? 'px-4 py-2.5 min-h-10'
|
? 'px-4 py-2.5 min-h-10'
|
||||||
: 'px-3 py-2 min-h-9'
|
: 'px-3 py-2 min-h-9'
|
||||||
} text-gray-700`}
|
} text-gray-700`}
|
||||||
title={sidebarCollapsed && !isMobile ? item.label : undefined}
|
title={sidebarCollapsed && !isMobile ? item.label : undefined}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setShowBapModal(true);
|
setShowBapModal(true);
|
||||||
if (isMobile) setMobileMenuOpen(false);
|
if (isMobile) setMobileMenuOpen(false);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Icon className={`${
|
<Icon className={`${isMobile ? 'h-5 w-5' :
|
||||||
isMobile ? 'h-5 w-5' :
|
isTablet ? 'h-6 w-6' :
|
||||||
isTablet ? 'h-6 w-6' :
|
'h-5 w-5'
|
||||||
'h-5 w-5'
|
} text-gray-600 ${sidebarCollapsed && !isMobile ? '' : 'mr-3'}`} />
|
||||||
} text-gray-600 ${sidebarCollapsed && !isMobile ? '' : 'mr-3'}`} />
|
|
||||||
{(!sidebarCollapsed || isMobile) && (
|
{(!sidebarCollapsed || isMobile) && (
|
||||||
<span className={`${isMobileOrTablet ? 'text-base' : 'text-[15px]'} font-medium`}>
|
<span className={`${isMobileOrTablet ? 'text-base' : 'text-[15px]'} font-medium`}>
|
||||||
{item.label}
|
{item.label}
|
||||||
@@ -703,27 +698,23 @@ export default function Sidebar() {
|
|||||||
return (
|
return (
|
||||||
<Link key={item.path} href={item.path}>
|
<Link key={item.path} href={item.path}>
|
||||||
<div
|
<div
|
||||||
className={`flex items-center transition-colors hover:bg-gray-100 rounded-md ${
|
className={`flex items-center transition-colors hover:bg-gray-100 rounded-md ${sidebarCollapsed && !isMobile
|
||||||
sidebarCollapsed && !isMobile
|
|
||||||
? 'px-3 py-2 justify-center min-h-9'
|
? 'px-3 py-2 justify-center min-h-9'
|
||||||
: isMobileOrTablet
|
: isMobileOrTablet
|
||||||
? 'px-4 py-2.5 min-h-10'
|
? 'px-4 py-2.5 min-h-10'
|
||||||
: 'px-3 py-2 min-h-9'
|
: 'px-3 py-2 min-h-9'
|
||||||
} ${
|
} ${active
|
||||||
active
|
|
||||||
? 'bg-blue-50 text-blue-700 border-r-2 border-blue-600'
|
? 'bg-blue-50 text-blue-700 border-r-2 border-blue-600'
|
||||||
: 'text-gray-700'
|
: 'text-gray-700'
|
||||||
}`}
|
}`}
|
||||||
title={sidebarCollapsed && !isMobile ? item.label : undefined}
|
title={sidebarCollapsed && !isMobile ? item.label : undefined}
|
||||||
onClick={handleMenuClick}
|
onClick={handleMenuClick}
|
||||||
>
|
>
|
||||||
<Icon className={`${
|
<Icon className={`${isMobile ? 'h-5 w-5' :
|
||||||
isMobile ? 'h-5 w-5' :
|
isTablet ? 'h-6 w-6' :
|
||||||
isTablet ? 'h-6 w-6' :
|
'h-5 w-5'
|
||||||
'h-5 w-5'
|
} ${active ? 'text-blue-700' : 'text-gray-600'
|
||||||
} ${
|
} ${sidebarCollapsed && !isMobile ? '' : 'mr-3'}`} />
|
||||||
active ? 'text-blue-700' : 'text-gray-600'
|
|
||||||
} ${sidebarCollapsed && !isMobile ? '' : 'mr-3'}`} />
|
|
||||||
{(!sidebarCollapsed || isMobile) && (
|
{(!sidebarCollapsed || isMobile) && (
|
||||||
<span className={`${isMobileOrTablet ? 'text-base' : 'text-[15px]'} font-medium`}>
|
<span className={`${isMobileOrTablet ? 'text-base' : 'text-[15px]'} font-medium`}>
|
||||||
{item.label}
|
{item.label}
|
||||||
@@ -827,12 +818,12 @@ export default function Sidebar() {
|
|||||||
<span className="font-medium">Prissela</span>
|
<span className="font-medium">Prissela</span>
|
||||||
</div>
|
</div>
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
<SelectItem value="Célia" className="py-3">
|
<SelectItem value="Jeremy" className="py-3">
|
||||||
<div className="flex items-center space-x-3">
|
<div className="flex items-center space-x-3">
|
||||||
<div className="h-8 w-8 bg-pink-100 rounded-full flex items-center justify-center">
|
<div className="h-8 w-8 bg-blue-100 rounded-full flex items-center justify-center">
|
||||||
<span className="text-sm font-medium text-pink-600">C</span>
|
<span className="text-sm font-medium text-blue-600">J</span>
|
||||||
</div>
|
</div>
|
||||||
<span className="font-medium">Célia</span>
|
<span className="font-medium">Jeremy</span>
|
||||||
</div>
|
</div>
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
@@ -870,7 +861,7 @@ export default function Sidebar() {
|
|||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
||||||
{/* Modal d'attente */}
|
{/* Modal d'attente */}
|
||||||
<Dialog open={showWaitingModal} onOpenChange={() => {}}>
|
<Dialog open={showWaitingModal} onOpenChange={() => { }}>
|
||||||
<DialogContent className="sm:max-w-md">
|
<DialogContent className="sm:max-w-md">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle className="flex items-center gap-2">
|
<DialogTitle className="flex items-center gap-2">
|
||||||
@@ -911,8 +902,8 @@ export default function Sidebar() {
|
|||||||
</p>
|
</p>
|
||||||
<p className="text-xs text-gray-500 truncate">
|
<p className="text-xs text-gray-500 truncate">
|
||||||
{user?.role === 'admin' ? 'Administrateur' :
|
{user?.role === 'admin' ? 'Administrateur' :
|
||||||
user?.role === 'manager' ? 'Manager' :
|
user?.role === 'manager' ? 'Manager' :
|
||||||
user?.role === 'directeur' ? 'Directeur' : 'Employé'}
|
user?.role === 'directeur' ? 'Directeur' : 'Employé'}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ export default function WebhookBAPConfig() {
|
|||||||
Configuration Webhook BAP
|
Configuration Webhook BAP
|
||||||
</CardTitle>
|
</CardTitle>
|
||||||
<CardDescription>
|
<CardDescription>
|
||||||
Configurez l'URL du webhook n8n pour l'envoi des fichiers BAP vers Prissela et Célia
|
Configurez l'URL du webhook n8n pour l'envoi des fichiers BAP vers Prissela et Jeremy
|
||||||
</CardDescription>
|
</CardDescription>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent className="space-y-6">
|
<CardContent className="space-y-6">
|
||||||
|
|||||||
+4
-4
@@ -685,7 +685,7 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
|||||||
return res.status(400).json({ error: 'Données manquantes: pdfBase64, fileName ou recipient' });
|
return res.status(400).json({ error: 'Données manquantes: pdfBase64, fileName ou recipient' });
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!['Prissela', 'Célia'].includes(recipient)) {
|
if (!['Prissela', 'Jeremy'].includes(recipient)) {
|
||||||
return res.status(400).json({ error: 'Destinataire invalide' });
|
return res.status(400).json({ error: 'Destinataire invalide' });
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1819,8 +1819,8 @@ export async function registerRoutes(app: Express): Promise<Server> {
|
|||||||
const supplier = suppliers.find((s: any) => s.id === updatedDelivery.supplierId);
|
const supplier = suppliers.find((s: any) => s.id === updatedDelivery.supplierId);
|
||||||
|
|
||||||
if (supplier?.automaticReconciliation &&
|
if (supplier?.automaticReconciliation &&
|
||||||
updatedDelivery.status === 'delivered' &&
|
updatedDelivery.status === 'delivered' &&
|
||||||
updatedDelivery.blNumber) {
|
updatedDelivery.blNumber) {
|
||||||
|
|
||||||
console.log(`🤖 Auto-reconciliation: Delivery #${id} from automatic supplier ${supplier.name}, auto-validating...`);
|
console.log(`🤖 Auto-reconciliation: Delivery #${id} from automatic supplier ${supplier.name}, auto-validating...`);
|
||||||
|
|
||||||
@@ -5977,7 +5977,7 @@ RÉSUMÉ DU SCAN
|
|||||||
let data: any;
|
let data: any;
|
||||||
let filename = `analytics_${type}_${new Date().toISOString().split('T')[0]}.csv`;
|
let filename = `analytics_${type}_${new Date().toISOString().split('T')[0]}.csv`;
|
||||||
|
|
||||||
switch(type) {
|
switch (type) {
|
||||||
case 'timeseries':
|
case 'timeseries':
|
||||||
data = await storage.getAnalyticsTimeseries({ ...filters, granularity: 'day' });
|
data = await storage.getAnalyticsTimeseries({ ...filters, granularity: 'day' });
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in new issue
Block a user